[lttng-dev] I'm still getting empty ust traces using tracef
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Thu May 11 14:15:01 EDT 2023
On 2023-05-11 14:13, Mathieu Desnoyers via lttng-dev 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.
>
> Which are the exact versions of LTTng-UST and LTTng-Tools you are using
> now ? (2.13.N or which git commit ?)
>
Also, can you try using lttng-ust stable-2.13 branch, which includes the following commit ?
commit be2ca8b563bab81be15cbce7b9f52422369f79f7
Author: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
Date: Tue Feb 21 14:29:49 2023 -0500
Fix: Reevaluate LTTNG_UST_TRACEPOINT_DEFINE each time tracepoint.h is included
Fix issues with missing symbols in use-cases where tracef.h is included
before defining LTTNG_UST_TRACEPOINT_DEFINE, e.g.:
#include <lttng/tracef.h>
#define LTTNG_UST_TRACEPOINT_DEFINE
#include <provider.h>
It is caused by the fact that tracef.h includes tracepoint.h in a
context which has LTTNG_UST_TRACEPOINT_DEFINE undefined, and this is not
re-evaluated for the following includes.
Fix this by lifting the definition code in tracepoint.h outside of the
header include guards, and #undef the old LTTNG_UST__DEFINE_TRACEPOINT
before re-defining it to its new semantic. Use a new
_LTTNG_UST_TRACEPOINT_DEFINE_ONCE include guard within the
LTTNG_UST_TRACEPOINT_DEFINE defined case to ensure symbols are not
duplicated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
Change-Id: I0ef720435003a7ca0bfcf29d7bf27866c5ff8678
Thanks,
Mathieu
> Thanks,
>
> Mathieu
>
>>
>> Regards,
>>
>> Brian
>>
>> On Thu, May 11, 2023 at 11:53 AM Brian Hutchinson
>> <b.hutchman at gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> I posted a while ago (thread - Using lttng 2.11 and UST doesn't appear
>>> to work - getting empty trace files) about this problem I'm having
>>> with getting empty trace logs.
>>>
>>> I've since upgraded to lttng v2.13 and while I can do a simple hello
>>> world program with tracef and get events in the log files, my more
>>> complicated large multi-threaded app I'm trying to debug is still
>>> getting empty log file traces.
>>>
>>> I can list the user space events in my app.
>>>
>>> Next I do:
>>>
>>> lttng enable-event --userspace 'lttng_ust_tracef:*'
>>>
>>> ... to enable the events, start lttng, start my app, .... and I get a
>>> trace directory structure that's empty.
>>>
>>> I feel like I've read every thread in the archives about people having
>>> the same problem.
>>>
>>> I did try using LD_PRELOAD with various libs thinking that was the
>>> problem but so far I'm still getting empty traces.
>>>
>>> So far I've tried:
>>>
>>> LD_PRELOAD=liblttng-ust-libc-wrapper.so.1:liblttng-ust-pthread-wrapper.so.1:liblttng-ust-dl.so.1:liblttng-ust-fork.so.1:liblttng-ust-fd.so.1
>>> /usr/local/bin/my_app
>>>
>>> I guess one question I have is how do I determine which "helper libs"
>>> I need to preload?
>>>
>>> The application I'm working on is made up of a bunch of smaller static
>>> libs linked together into one big executable and that is linked with
>>> -llttng-ust and -ldl.
>>>
>>> I'm pretty stuck at the moment. Anyone have any wisdom on what I
>>> might be doing wrong or how I can tell why I'm not getting events in
>>> the logs?
>>>
>>> Thanks,
>>>
>>> Brian
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev at lists.lttng.org
>> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
More information about the lttng-dev
mailing list