My aim is to generate call stack and hence flamegraph using lttng. I looked into the documentaion but it doesn't say anything about call stack. Then this stackoverflow question seems to have got callstack. But upon reconstructing the steps I couldn't get any call stack data. I also have a doubt that whether the call stack can be geerated only for the instrumented userspace programs or for kernelspace as well. Am I missing something? Tracecompass view of my trace
Asked
Active
Viewed 585 times
1 Answers
1
To use the Call Stack view of Trace Compass, you have to do the following steps in addition of the regular LTTng-UST session configuration:
- Compile your application with the GCC options
-g -finstrument-functions
- Enable the
vpid
,vtid
, andprocname
LTTng userspace contexts - Preload the
liblttng-ust-cyg-profile.so
See the Trace Compass documentation for more details

fdeslaur
- 144
- 2
- 8
-
I tried this but didn't work. What if I'm not bothered about userspace application but only the kernel modules and functions. Does this give the kernel functions in the flamegraph too? – Saty Anand Jun 13 '17 at 06:22
-
2No, this technique gathers the userspace callstack and not the kernel space callstack. This feature is planned but not ready yet. – fdeslaur Jun 13 '17 at 16:05