[lttng-dev] Using LLTNG within shared library (not dlopen-ed).

Sergei Dyshel qyron.private at gmail.com
Mon Aug 10 13:27:20 EDT 2015


Hi all,

I have some code using traces compiled as shared object (together with
trace provider).
This ".so" is linked to main code during compile-time.
When I run main application and try to read traces after that I get errors
about corrupted trace file.

I've read docs about dynamical linking of trace provider which recommends
compiling trace provider into separate .so and using LD_PRELOAD to preload
it. But that is only needed for shared objects loaded with "dlopen". In my
case "dlclose" isn't called and shared object is unloaded on the exit (i.e.
after all traces produced).

So this shouldn't be a problem... Am I right?
-- 
Regards,
Sergei Dyshel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20150810/f5b0bc1a/attachment.html>


More information about the lttng-dev mailing list