[lttng-dev] I'm still getting empty ust traces using tracef

Brian Hutchinson b.hutchman at gmail.com
Thu May 11 14:42:55 EDT 2023


On Thu, May 11, 2023 at 2:14 PM Michael Jeanson <mjeanson at efficios.com> wrote:
>
> On 2023-05-11 12:36, Brian Hutchinson via lttng-dev wrote:
> > ... more background.  I've always used ltt in the kernel so I don't
> > have much experience with the user side of it and especially
> > multi-threaded, multi-core so I'm probably missing some fundamental
> > concepts that I need to understand.
> >
> > Regards,
> >
> > Brian
>
> Hi,
>
> If you are static linking 'liblttng-ust' then the library constructor won't be

All of the final executable is a bunch of statically linked libs (all
.a's) but lttng-ust isn't statically linked (using .so.1, not .a).

I couldn't build/link without linking -llttng-ust and -ldl.

> executed and you'll get no traces. While this setup is untested and
> unsupported, you could call the UST constructor from your application early
> initialisation but that would require patching lttng-ust to export the
> 'lttng_ust_ctor' symbol.
>
> And the first thing to do to start diagnosing UST tracing issues is to run
> your application with hte LTTNG_UST_DEBUG environment variable set, see [1]

Thanks!  I'll check that reference out.

Regards,

Brian

> for details.
>
> Cheers,
>
> Michael
>
> [1] https://lttng.org/man/3/lttng-ust/v2.13/#doc-_environment_variables
>


More information about the lttng-dev mailing list