Function tracing not working

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Thu Jun 5 14:49:13 EDT 2025


On 2025-06-05 06:49, David Aldrich wrote:
> Hi Mathieu
> 
> I'd like to add some more detail.  I now run our app using this pattern:
> 
> LD_PRELOAD=liblttng-ust-cyg-profile.so ./app
> 
> On importing the trace into TraceCompass I see:
> 
> "null analysis for LTTng-UST CallStack"
> 
> Could the reason be the lttng commands I am using to capture UST and
> Kernel events:
> 
> lttng enable-event --userspace 'lttng_ust_tracef:*'
> lttng enable-channel --kernel --session app_trace kernel_channel
> lttng enable-event --kernel --all --channel kernel_channel --session app_trace

Indeed, You will also need to enable something like this:

lttng enable-event --userspace 'lttng_ust_cyg_profile:*'

See "man 3 lttng-ust-cyg-profile" for details.

Thanks,

Mathieu

> 
> Best regards
> David
> 
> On Wed, Jun 4, 2025 at 5:22 PM David Aldrich
> <david.aldrich.ntml at gmail.com> wrote:
>>
>> Hi Mathieu
>>
>>>> Any idea what I am doing wrong please?
>>>
>>> AFAIK, the "LD_PRELOAD" environment variable is cleared by
>>> sudo when running its child process for security purposes.
>>
>> Thanks for your answer, that does help. However, I have now adjusted
>> the code so that sudo is not required, but when I import the trace the
>> UST-CallStacks are still strikethrough.
>>
>> Any thoughts why this is happening?
>>
>> I don't see any runtime errors whether or not I specify the prefix:
>>
>> LD_PRELOAD=liblttng-ust-cyg-profile.so
>>
>> Is that expected?
>>
>> Best regards, David


-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com


More information about the lttng-dev mailing list