Convert an ftrace trace.dat file to CTF format to use with TraceCompass

1.5k Views Asked by At

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).

3

There are 3 best solutions below

1
Claudio On

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.

0
Zappa On

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.

0
Matthew Khouzam On

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.