[lttng-dev] "Hands-free" tracepoints using LD_PRELOAD

Brian Rossa br at f0cal.com
Fri Jan 18 14:05:30 EST 2019


Hello,

I have a custom tracing solution that I'm interested in porting to LTTng.
It works as follows:

   1. Input is a whitelist of mangled names taken from a target library,
   libfoo.so.
   2. For each name, generate a logging shim (example
   <https://www.linuxjournal.com/article/7795>) for the corresponding call.
   3. Compile all the logging shims into a shared library, libshim.so.
   4. Trace any application using libfoo by running it as
   LD_PRELOAD=libshim.so ./fooapp

There are two nice things about this approach that I would like to preserve:

   - The shim developer only needs to provide the whitelist and a bit of
   extra annotation. From there, the shim can be be authored using a
   boilerplate generator.
   - The app developer doesn't have to do anything other than pass the
   LD_PRELOAD flag.

The downside is that the only tracepoints are those corresponding to the
whitelist, but I'm fine with that.

Can this kind of "hands-free" developer experience be supported by LTTng?

Thanks!
~br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20190118/b47fe0f4/attachment.html>


More information about the lttng-dev mailing list