Skip to content
Advertisement

Getting lttng backtraces without liblttng-ust-cyg-profile

Is it possible to get backtraces from lttng without LD_PRELOADing liblttng-ust-cyg-profile and compiling with -finstrument-functions?

I can’t see from the lttng code what it’s doing differently when pre-loading that library to allow a trace viewer (tracecompass) to show the backtraces!?

Here’s my test app:

test_tracepoints.h:

JavaScript

test_tracepoints.c:

JavaScript

test.lttng.c:

JavaScript

I’m testing this with:

JavaScript

Advertisement

Answer

No, it’s currently not directly supported. But it’s definitely on the wishlist.

When you preload the function tracing helper (liblttng-ust-cyg-profile.so, or its -fast version), LTTng events are emitted (prefixed with lttng_ust_cyg_profile) at each function entry/exit. You need to create an event rule to enable them explicitly:

JavaScript

I’m not sure if Trace Compass uses those event records at all in its analyses, though.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement