public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug runtime/15783] New: inode-uprobes not handling tail recursion properly
@ 2013-07-25 16:33 dsmith at redhat dot com
  2015-05-19 14:49 ` [Bug runtime/15783] " fche at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: dsmith at redhat dot com @ 2013-07-25 16:33 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=15783

            Bug ID: 15783
           Summary: inode-uprobes not handling tail recursion properly
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
          Assignee: systemtap at sourceware dot org
          Reporter: dsmith at redhat dot com

On RHEL6 (2.6.32-358.6.1.el6.x86_64):

====
# gcc -g -O0 testsuite/systemtap.context/fib.c -o fib
# stap -e 'global calls, returns; probe process("fib").function("fib") { calls
<<< 1 } probe process("fib").function("fib").return { returns <<< 1 }' -c
"./fib 10"
89
calls @count=177 @min=1 @max=1 @sum=177 @avg=1
returns @count=177 @min=1 @max=1 @sum=177 @avg=1
====

On rawhide (3.11.0-0.rc0.git7.1.fc20.x86_64):

====
# gcc -g -O0 testsuite/systemtap.context/fib.c -o fib
# stap -e 'global calls, returns; probe process("fib").function("fib") { calls
<<< 1 } probe process("fib").function("fib").return { returns <<< 1 }' -c
"./fib 10"
89
calls @count=177 @min=1 @max=1 @sum=177 @avg=1
returns @count=64 @min=1 @max=1 @sum=64 @avg=1
=====

It appears that inode-uprobes is missing probe hits when tail recursion is
used. This problem was pointed out by the testsuite/systemtap.context/fib.exp
test.


Just for reference sake, on that same rawhide system (with the same 'fib'
executable), using dyninst:

====
# stap --dyninst -e 'global calls, returns; probe
process("fib").function("fib") { calls <<< 1 } probe
process("fib").function("fib").return { returns <<< 1 }' -c "./fib 10"
89
calls @count=177 @min=1 @max=1 @sum=177 @avg=1
returns @count=177 @min=1 @max=1 @sum=177 @avg=1
====

This last test shows that this isn't a compiler issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug runtime/15783] inode-uprobes not handling tail recursion properly
  2013-07-25 16:33 [Bug runtime/15783] New: inode-uprobes not handling tail recursion properly dsmith at redhat dot com
@ 2015-05-19 14:49 ` fche at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: fche at redhat dot com @ 2015-05-19 14:49 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=15783

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |fche at redhat dot com
         Resolution|---                         |INVALID

--- Comment #1 from Frank Ch. Eigler <fche at redhat dot com> ---
Effects of compiler optimizations (with modern gcc -O3 doing a ton of inlining
etc.) make the test in comment #0 a bit misleadinmg.  The calls case should
have been ....function("fib").call, in which case it does happen to match up
calls & returns.

-- 
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:[~2015-05-19 14:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-25 16:33 [Bug runtime/15783] New: inode-uprobes not handling tail recursion properly dsmith at redhat dot com
2015-05-19 14:49 ` [Bug runtime/15783] " fche 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).