[Ltrace-devel] Support for systemtap probes in ltrace
Petr Machata
pmachata at redhat.com
Sun Aug 7 01:58:17 UTC 2011
Hi there,
SDT probes are used by some application--typically, they are placed to
"strategic" places, such as when MySQL parses a query, or when OpenJDK
compiles a method. I believe it would be useful for ltrace to be able
to put breakpoints on these.
I wrote a small patch that implements support for SDT probes to ltrace.
SDT probes are used by some applications. This is how it looks when
used on a test binary of mine (edited to fit):
$ ./ltrace -x main ~/tmp/test
(0, 0, 561152, -1, 0x1f25bc2) = 0x33a9020260
__libc_start_main(0x400474, 1, 0x7fff451caf48 <unfinished ...>
main(1, 0x7fff451caf48, 0x7fff451caf58 <unfinished ...>
probe test::main() = <void>
probe test::other() = <void>
<... main resumed> ) = 0
+++ exited (status 0) +++
Probe arguments are not supported yet, and interpreting the GAS location
expressions, which the probe arguments use, might prove rather tricky
(and very arch-dependent). So right now it's all presented as '()',
even though the "other" probe in my example actually has one argument.
It's on pmachata/stapsdt. Comments welcome.
Thanks,
PM
P.S. if you want to learn more about the SDT probes:
http://sourceware.org/systemtap/wiki/AddingUserSpaceProbingToApps
http://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation
More information about the Ltrace-devel
mailing list