On Tue, Sep 24, 2019 at 04:13:13PM +0000, Kramer, Zach wrote: > Hi Jonathan, > > Thanks for the extra info. We do indeed fork without a following exec call and > I experimented with this preloading recently. When I experimented, I noticed > no difference in the tracing when I preload liblttng-ust-fork.so. What exactly > is the consequence of not doing this?
It mostly ensure that the state of lttng-ust for the child is valid and the child will register to lttng-sessiond. It allows the child to trace between the fork call and the exec call if any. https://github.com/lttng/lttng-ust/blob/f596de62e69d1942ec545b8ba6b8f8b7244f8fb4/liblttng-ust/lttng-ust-comm.c#L2097 So in your case you definitely need it. The immediate consequence is that some context information will be completely wrong (pid/vtid). Mathieu Desnoyers could provide more information on the deeper side effects of not using the fork wrapper given that no exec call is done. I'm not completely sure of the possible side effects on the tracing buffers. Cheers -- Jonathan Rajotte-Julien EfficiOS _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev