* [Bug testsuite/13430] New: user space stmt_rel.exp testcase counts the wrong thing
@ 2011-11-22 16:45 mjw at redhat dot com
2011-11-22 17:08 ` [Bug testsuite/13430] " scox at redhat dot com
0 siblings, 1 reply; 2+ messages in thread
From: mjw at redhat dot com @ 2011-11-22 16:45 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=13430
Bug #: 13430
Summary: user space stmt_rel.exp testcase counts the wrong
thing
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: testsuite
AssignedTo: systemtap@sourceware.org
ReportedBy: mjw@redhat.com
Classification: Unclassified
stmt_rel.exp has two test cases, a kernel one and a user space one.
The user space one tests setting a relative statement probe on the (inlined)
Move function of a towers of hanoi program. It then checks that that probe
point is being hit 8192 times.
But this is for a tower of 14 disks. So the number of Moves should be 2^14-1 =
16383. This is also the sanity check used in the stmt_rel.c program itself:
if (movesdone != 16383)
printf (" Error in Towers.\n");
The reason for this discrepancy (and why it fails on anything but x86_64) is
that only one of the inlined instances of Move is being probed.
Looking at the program with gdb disassemble /m we see:
91 static inline void
92 Move (int s1, int s2)
93 {
94 Push (Pop (s1), s2);
95 movesdone = movesdone + 1;
0x000000000040059e <+78>: addl $0x1,0x200e1b(%rip) # 0x6013c0
<movesdone>
0x0000000000400650 <+256>: addl $0x1,0x200d69(%rip) # 0x6013c0
<movesdone>
0x00000000004006f2 <+418>: addl $0x1,0x200cc7(%rip) # 0x6013c0
<movesdone>
96 }
But stap -vvv reveals that only one location is being probed (the last one):
probe Move@/home/mark/src/systemtap/testsuite/systemtap.base/stmt_rel.c:1
process=/usr/local/build/systemtap-obj/testsuite/stmt_rel.x reloc=.absolute
pc=0x4006f2
Using an unoptimized stmt_rel.x program does hit Move 16383 times (since there
is only one address to probe).
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug testsuite/13430] user space stmt_rel.exp testcase counts the wrong thing
2011-11-22 16:45 [Bug testsuite/13430] New: user space stmt_rel.exp testcase counts the wrong thing mjw at redhat dot com
@ 2011-11-22 17:08 ` scox at redhat dot com
0 siblings, 0 replies; 2+ messages in thread
From: scox at redhat dot com @ 2011-11-22 17:08 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=13430
Stan Cox <scox at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |scox at redhat dot com
AssignedTo|systemtap at sourceware dot |scox at redhat dot com
|org |
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-22 17:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-22 16:45 [Bug testsuite/13430] New: user space stmt_rel.exp testcase counts the wrong thing mjw at redhat dot com
2011-11-22 17:08 ` [Bug testsuite/13430] " scox at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).