0

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

Saty Anand
  • 480
  • 3
  • 11

1 Answers1

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:

  1. Compile your application with the GCC options -g -finstrument-functions
  2. Enable the vpid, vtid, and procname LTTng userspace contexts
  3. 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
  • 2
    No, 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