[lttng-dev] LTTng-UST 2.0 mutex usage
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Thu May 2 16:36:07 EDT 2013
* Oestman, Fredrik (Fredrik_Oestman at mentor.com) wrote:
> 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?
one way would be to implement mutexes within lttng-ust, so we would stop
using the pthread mutexes.
> The ust-ctl library appears to have a function ustctl_register_done(),
> is that useful?
No. This function is called by the session daemon when it has completed
sending all commands to the application so its internal lttng-ust state
matches that of the active tracing sessions.
We need to be aware that a lttng-ust library can interact with up to 2
session daemons: one for the user, one for root.
> (Is there an API documentation?) Or would it be better
> to find out which mutexes belong to UST and filter them out?
custom implementation of mutexes within lttng-ust sounds like the best
approach.
Thanks,
Mathieu
> 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
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list