[lttng-dev] Instrumenting a Shared Object

Brian Robbins brianrob at microsoft.com
Thu Aug 13 19:40:03 EDT 2015


I'm looking to instrument a shared object using LTTng-UST tracepoints.  The expectation is that users of the library will use dlopen to open it at the beginning of their application and dlclose right before process exit.  From what I've read at http://lttng.org/docs/#doc-building-tracepoint-providers-and-user-application, it sounds like there is some complexity with this as the tracepoint definition must remain in memory, but I want to make sure I fully understand.

If I want to instrument a shared object, is my only option to dynamically link and use LD_PRELOAD?  Also, do my options change if I know that the process will exit right after it calls dlclose on the library?

Thank you very much.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20150813/5fb5f459/attachment.html>

More information about the lttng-dev mailing list