* Robert ([email protected]) wrote: > Hello list, > > I am trying to understand the code of libust, and there are some questions. > > 1. How is *libust* executed? Why it can execute before the *main* function > of an application?
library constructor. See the gcc __attribute__((constructor)) function attribute. > 2. Why *init* needs pthread *mutex*? I check the code and execution, it > seems that *ltt_trace_alloc* and *ltt_trace_start* are totally > serialized. Which version/file/lineno are you refering to ? > Also, currently there is only one trace (with the name of *ust*) in the > list *ltt_traces.head*, right? This is going to change this summer. Multi-tracing-session work is on its way. > In the code, there are only two places that > modify the list, one is in *ltt_trace_alloc*, and the other happens in > destroying traces. But in execution they are serialized with other read to > the list during execution, then why we need *rcu_read_lock* and * > synchronize_rcu* there? To synchronize with respect to tracing probes which only use rcu_read_lock/unlock. Thanks, Mathieu > > Maybe stupid questions, but if you guys can kindly answer them I will > appreciate it. > > Thanks. > > -- *Robert* > * > * > _______________________________________________ > ltt-dev mailing list > [email protected] > http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev -- Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com _______________________________________________ ltt-dev mailing list [email protected] http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
