[PATCH 0 of 4] Add support for dtrace compatible sdt probes on GNU/Linux (original) (raw)

Mark Wielaard mjw at redhat.com
Sun Jul 22 00:17:47 PDT 2012


On Sun, 2012-07-22 at 08:10 +1000, David Holmes wrote:

How portable is sys/sdt.h? Does it vary from linux to linux? What happens if you build on linux A (as we do) and then run on linux B, C, D ... ? What if it is not available at runtime? Will we get dynamic link failures or ?

There is only one sys/sdt.h. The only code it "generates" is a NOP instruction. For the rest it is like debug info, just an additional ELF notes section with additional info on the binary (the only difference being that this one is never stripped away). There is no runtime. There are just tools like readelf, gdb, stap, that can interpret the extra observability info in the ELF note section (and place breakpoints on the NOP instructions if so instructed).

See also http://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation

Cheers,

Mark



More information about the hotspot-dev mailing list