[lttng-dev] LTTng-UST 2.0 mutex usage

Oestman, Fredrik Fredrik_Oestman at mentor.com
Mon Jul 9 08:00:46 EDT 2012


Hi,


We're experimenting with tracing calls to the pthreads library using a LD_PRELOAD-ed interposer library, which is instrumented with UST tracepoints. In the startup phase, before the application has been called, probes are being registered, and one by one the tracepoints start emitting events. So some of the pthreads mutex motions of UST itself are being traced along.

What would be a good way of avoiding emitting events before the application itself has started, specifically events related to UST mutexes? The ust-ctl library appears to have a function ustctl_register_done(), is that useful? (Is there an API documentation?) Or would it be better to find out which mutexes belong to UST and filter them out?

By controlling our interposer library from within the application we can avoid the problem, but we'd rather do without recompiling the application, since it sort of would defeat the reason for using LD_PRELOAD in the first place.


Cheers,

Fredrik Östman




More information about the lttng-dev mailing list