1

I can generate ftrace data either manually (and then trace-cmd extract it) or via the convenient trace-cmd(1) front-end utility.

With trace-cmd, the output file is trace.dat by default; I know I can visually view it via kernelshark but would much prefer to use the Trace Compass GUI to do so. AFAIK, TraceCompass uses the .ctf file format. My question therefore:

How can I convert the ftrace or trace.dat file from trace-cmd to .ctf format?

(I know there's Q&A on converting perf(1) to CTF).

howlger
  • 31,050
  • 11
  • 59
  • 99
kaiwan
  • 2,114
  • 1
  • 18
  • 23

3 Answers3

4

Trace Compass developer here.

I want to announce Trace Compass natively supports version 6 of the ftrace trace.dat format. This is the trace generated by trace-cmd. Here is a video announcing and demoing the feature.

Also, feel free to ask trace compass questions on our mailing list or on the eclipse bugzilla (within trace compass, click on the help menu, report bug...) as we do not check stack overflow very often.

1

Trace Compass supports the raw textual format of various ftrace plugins. As explained here, you prior need to run the trace-cmd report -R command to get the trace in ASCII format.

Claudio
  • 10,614
  • 4
  • 31
  • 71
  • 1
    thanks; FYI, it only worked once i went to TC / Tools/Add-ons and selected the 'Trace Compass ftrace (incubation)' and 'Generic Callstack (incubation)' extensions. The FlameGraph 's are useful... (had to get the symbols in); still, cannot see anything in the Resource / Control Flow tabs, nor the func name and params in the usual place. – kaiwan Jan 23 '20 at 11:04
1

TraceCompass now supports loading raw binary ftraces. Just use the FTrace add-on from Incubation for Ftrace, it includes raw and text ftrace input support.

Zappa
  • 11
  • 1