public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/18075] New: Add a return-probe variant of .callee
@ 2015-03-02 22:05 jistone at redhat dot com
  2015-05-15 16:45 ` [Bug translator/18075] " fche at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jistone at redhat dot com @ 2015-03-02 22:05 UTC (permalink / raw)
  To: systemtap

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

            Bug ID: 18075
           Summary: Add a return-probe variant of .callee
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: jistone at redhat dot com

AIUI, callee probes are essentially translated into respective call probes with
a filter to match the caller.  It would also be useful to have return probes of
this sort.  It might even be easier, because I think the registers of a return
probe will already be into the caller's frame.

For example, a fault injection script might wish to tweak the return value of a
function, but only for particular callers, like this glibc article is doing.
https://sourceware.org/glibc/wiki/Testing/WhiteBox

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

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

* [Bug translator/18075] Add a return-probe variant of .callee
  2015-03-02 22:05 [Bug translator/18075] New: Add a return-probe variant of .callee jistone at redhat dot com
@ 2015-05-15 16:45 ` fche at redhat dot com
  2015-06-08 20:56 ` flu at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: fche at redhat dot com @ 2015-05-15 16:45 UTC (permalink / raw)
  To: systemtap

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fche at redhat dot com

--- Comment #1 from Frank Ch. Eigler <fche at redhat dot com> ---
*** Bug 18415 has been marked as a duplicate of this bug. ***

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

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

* [Bug translator/18075] Add a return-probe variant of .callee
  2015-03-02 22:05 [Bug translator/18075] New: Add a return-probe variant of .callee jistone at redhat dot com
  2015-05-15 16:45 ` [Bug translator/18075] " fche at redhat dot com
@ 2015-06-08 20:56 ` flu at redhat dot com
  2015-06-08 22:41 ` jistone at redhat dot com
  2015-06-22 14:29 ` flu at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: flu at redhat dot com @ 2015-06-08 20:56 UTC (permalink / raw)
  To: systemtap

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

Felix Lu <flu at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |flu at redhat dot com

--- Comment #2 from Felix Lu <flu at redhat dot com> ---
The _caller_match() function can be used to match the return with caller.

Example:
stap -e 'probe process("stap").function("version").return { print_ubacktrace();
 println(_caller_match(1,1,"/opt/codebase/install/bin/stap", ".absolute",
0x40efff)) }'

 0x428d55 : _ZN17systemtap_session13parse_cmdlineEiPKPc+0x9b5/0x5dc0
[/opt/codebase/install/bin/stap]
 0x40efff : main+0x21f/0x1320 [/opt/codebase/install/bin/stap]
 0x7fe8fca69fe0 [/usr/lib64/libc-2.20.so+0x1ffe0/0x3bd000]
1

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

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

* [Bug translator/18075] Add a return-probe variant of .callee
  2015-03-02 22:05 [Bug translator/18075] New: Add a return-probe variant of .callee jistone at redhat dot com
  2015-05-15 16:45 ` [Bug translator/18075] " fche at redhat dot com
  2015-06-08 20:56 ` flu at redhat dot com
@ 2015-06-08 22:41 ` jistone at redhat dot com
  2015-06-22 14:29 ` flu at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: jistone at redhat dot com @ 2015-06-08 22:41 UTC (permalink / raw)
  To: systemtap

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

--- Comment #3 from Josh Stone <jistone at redhat dot com> ---
Why are you matching main though?  That's the second-level caller; version() is
actually called by parse_cmdline(), as seen in the first step of your
backtrace.  That's what I meant by the registers of a return probe already
reflecting the caller's frame.

So process.function("parse_cmdline").callee("version").return would be
translated to process.function("version").return, as you wrote, but with a
_caller_match(1,0,...) in this case.

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

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

* [Bug translator/18075] Add a return-probe variant of .callee
  2015-03-02 22:05 [Bug translator/18075] New: Add a return-probe variant of .callee jistone at redhat dot com
                   ` (2 preceding siblings ...)
  2015-06-08 22:41 ` jistone at redhat dot com
@ 2015-06-22 14:29 ` flu at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: flu at redhat dot com @ 2015-06-22 14:29 UTC (permalink / raw)
  To: systemtap

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

Felix Lu <flu at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|systemtap at sourceware dot org    |flu at redhat dot com

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

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

end of thread, other threads:[~2015-06-22 14:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-02 22:05 [Bug translator/18075] New: Add a return-probe variant of .callee jistone at redhat dot com
2015-05-15 16:45 ` [Bug translator/18075] " fche at redhat dot com
2015-06-08 20:56 ` flu at redhat dot com
2015-06-08 22:41 ` jistone at redhat dot com
2015-06-22 14:29 ` flu 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).