I have a ASCII trace named trace and I'd like to convert it to a .dat in order to analyze it with kernelshark (I cannot change tool such as TraceCompass, I am constrained to kernelshark).
These two tools of trace-cmd frontend are somehow similar to what I need:
trace-cmd-report - show in ASCII a trace created by trace-cmd record
Actually, I need the opposite.
I know that trace-cmd extract generates a .dat file from an existing trace, but it does it by re-reading the kernel ringbuffer (where tracing info are stored) and not from a ASCII trace.
tldr; there is not an automated tool to do it.
You need to (i) mastering the syntax of a
trace.datfile and (ii) writing your own binary parser that reads the .dat data and convert them into ASCII format.