On Fri, 2013-04-05 at 10:54 +0900, Yoshihiro YUNOMAE wrote:In this patch, trace-cmd reads trace_clock on debugfs in the report/extract
modes and outputs the data to trace.dat file. Then, in the report mode,
trace-cmd reads trace_clock data from the file and switches outputting format
of timestamp for each trace_clock.
Note that by applying this patch, the binary format of trace.data is changed
as follows:
<Current binary format>
...
[size of saved_cmdlines]
[saved_cmdlines contents]
[total cpu number]
...
<Changed binary format>
...
[size of saved_cmdlines]
[saved_cmdlines contents]
[size of trace_clock] <== add
[trace_clock contents] <== add
[total cpu number]
...
Hi Yoshihiro,
I don't mind the feature addition, but I don't like the implementation.
This will break backward compatibility with the trace.dat file, which
I've been working hard not to have happen.
That doesn't mean that you can't implement this feature. This is what
the options section is for. You can add an option that includes the
trace_clock contents, or just simply say what type of clock is being
used. Then a new trace-cmd can show the output like you want it to, and
the old version will still work but show the old way, as trace-cmd is
made to simply ignore options it does not know about.
I think it's time for me to push my latest updates to trace-cmd. As this
will probably end up being the 3.0 version. I have examples there that
use the options feature for more extensions that you can look at.