This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug testsuite/13430] New: user space stmt_rel.exp testcase counts the wrong thing
- From: "mjw at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Tue, 22 Nov 2011 16:44:57 +0000
- Subject: [Bug testsuite/13430] New: user space stmt_rel.exp testcase counts the wrong thing
- Auto-submitted: auto-generated
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.