public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug tapsets/10603] New: Probing *@srcfile:line yields strange results
@ 2009-09-04  1:54 jistone at redhat dot com
  2009-09-17  2:00 ` [Bug tapsets/10603] " jistone at redhat dot com
  2009-09-17  2:01 ` jistone at redhat dot com
  0 siblings, 2 replies; 4+ messages in thread
From: jistone at redhat dot com @ 2009-09-04  1:54 UTC (permalink / raw)
  To: systemtap

The kernel function __put_unused_fd is static and only used in two places
(put_unused_fd and sys_close), so the compiler will inline it both times.  

Consider a function probe on it:

$ stap -l 'kernel.function("__put_unused_fd")' --vp 02
probe __put_unused_fd@fs/open.c:983 kernel reloc=.dynamic pc=0xffffffff810d34b1
probe __put_unused_fd@fs/open.c:983 kernel reloc=.dynamic pc=0xffffffff810d3643
kernel.function("__put_unused_fd@fs/open.c:983")
Pass 2: analyzed script: 2 probe(s), 0 function(s), 0 embed(s), 0 global(s) in
350usr/40sys/393real ms.
Running rm -rf /tmp/stap6ESYTD

Now consider a statement probe by its file:line number:

$ stap -l 'kernel.statement("*@fs/open.c:983")' --vp 02
probe sys_close@fs/open.c:985 kernel reloc=.dynamic pc=0xffffffff810d3643
probe __put_unused_fd@fs/open.c:983 kernel reloc=.dynamic pc=0xffffffff810d3643
kernel.statement("sys_close@fs/open.c:985")
kernel.statement("__put_unused_fd@fs/open.c:983")
Pass 2: analyzed script: 2 probe(s), 0 function(s), 0 embed(s), 0 global(s) in
140usr/40sys/191real ms.
Running rm -rf /tmp/stapc364ag

We get the call from sys_close twice, once for the inline instance and once for
the containing function.  We don't see the call from put_unused_fd at all.  The
one in the containing function also has the wrong scope/variables:

$ stap -e 'probe kernel.statement("*@fs/open.c:983") { println($$vars) }' -p2
--vp 01
# probes
kernel.statement("sys_close@fs/open.c:985") /* pc=_stext+0xca643 */ /* <-
kernel.statement("*@fs/open.c:983") */
println(sprint("fd=? filp=? files=? fdt=? retval=?"))
kernel.statement("__put_unused_fd@fs/open.c:983") /* pc=_stext+0xca643 */ /* <-
kernel.statement("*@fs/open.c:983") */
println(sprint("fd=? files=?"))
Pass 2: analyzed script: 2 probe(s), 0 function(s), 0 embed(s), 0 global(s) in
160usr/40sys/194real ms.

-- 
           Summary: Probing *@srcfile:line yields strange results
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: jistone at redhat dot com


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

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

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

* [Bug tapsets/10603] Probing *@srcfile:line yields strange results
  2009-09-04  1:54 [Bug tapsets/10603] New: Probing *@srcfile:line yields strange results jistone at redhat dot com
@ 2009-09-17  2:00 ` jistone at redhat dot com
  2009-09-17  2:01 ` jistone at redhat dot com
  1 sibling, 0 replies; 4+ messages in thread
From: jistone at redhat dot com @ 2009-09-17  2:00 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From jistone at redhat dot com  2009-09-17 02:00 -------
closing

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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

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

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

* [Bug tapsets/10603] Probing *@srcfile:line yields strange results
  2009-09-04  1:54 [Bug tapsets/10603] New: Probing *@srcfile:line yields strange results jistone at redhat dot com
  2009-09-17  2:00 ` [Bug tapsets/10603] " jistone at redhat dot com
@ 2009-09-17  2:01 ` jistone at redhat dot com
  1 sibling, 0 replies; 4+ messages in thread
From: jistone at redhat dot com @ 2009-09-17  2:01 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From jistone at redhat dot com  2009-09-17 02:00 -------
sorry, closed the wrong bug

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


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

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

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

* [Bug tapsets/10603] Probing *@srcfile:line yields strange results
       [not found] <bug-10603-6586@http.sourceware.org/bugzilla/>
@ 2014-06-08 18:01 ` fche at redhat dot com
  0 siblings, 0 replies; 4+ messages in thread
From: fche at redhat dot com @ 2014-06-08 18:01 UTC (permalink / raw)
  To: systemtap

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
                 CC|                            |fche at redhat dot com
         Resolution|---                         |FIXED

--- Comment #3 from Frank Ch. Eigler <fche at redhat dot com> ---
This appears to be working nicely now.

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

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

end of thread, other threads:[~2014-06-08 18:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-04  1:54 [Bug tapsets/10603] New: Probing *@srcfile:line yields strange results jistone at redhat dot com
2009-09-17  2:00 ` [Bug tapsets/10603] " jistone at redhat dot com
2009-09-17  2:01 ` jistone at redhat dot com
     [not found] <bug-10603-6586@http.sourceware.org/bugzilla/>
2014-06-08 18:01 ` 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).