Not capturing ust events

David Aldrich david.aldrich.ntml at gmail.com
Wed May 7 12:50:33 EDT 2025


Hi

I am just getting started with LTTng. I am trying to use
lttng_ust_tracef() initially.

I am running LTTng version 2.13 on Ubuntu 24.04 LTS, and viewing using
TraceCompass 10.3.0 on Windows 11.

I use  lttng_ust_tracef() in just one source file:

#include <lttng/tracef.h>
<snip>
{
    int my_integer = 0;
    string my_string = "Normal";
    lttng_ust_tracef("TaskManager: %d (%s)", my_integer, my_string.c_str());
}

I build with CMake and link to the lttng-ust library:

target_link_libraries(${_lib_name} lttng-ust)

On the target I created a session and enabled the event:

$ lttng create my_proj
$ lttng enable-event --userspace 'lttng_ust_tracef:*'

I have to run the application as root:

sudo -E lttng-record-trace -a ./my_app

When I import the trace directory into TraceCompass I tick both the
kernel and ust event boxes, and create an experiment, but then only
'kernel' shows under the experiments and Traces in the tree view, no
ust branch is shown.

I guess this isn't much to go on, but if anyone has any ideas why it's
not capturing ust events, I would be grateful.

Finally, which 'event_type' should I search for in the event viewer
for lttng_ust_tracef events?

Best regards
David


More information about the lttng-dev mailing list