Re: perf.data file format specification draft

From: Arnaldo Carvalho de Melo
Date: Mon May 18 2015 - 12:00:53 EST


Em Mon, May 18, 2015 at 01:21:33PM +0900, Namhyung Kim escreveu:
> Hi Arnaldo and Andi,
>
> On Thu, May 14, 2015 at 10:11:29AM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Thu, May 14, 2015 at 02:25:17PM +0200, Andi Kleen escreveu:
> > > Hi,
> > >
> > > Since there are more and more consumers I started a description of the
> > > on-disk perf.data format. This does not replace the kernel perf event
> > > description or the manpage, but describes the parts that perf record
> > > adds.
> > >
> > > So far it is still has some gaps and needs review. Eventually this should
> > > become part of the perf documentation.
> > >
> > > Steven, would be good if you could fill in some details on how trace
> > > data works.
> >
> > I guess that would be Frédéric, and also I think this is a good
> > opportunity to remove some stuff that seem to be collected but unused,
> > namely a kallsyms copy and maybe something else.
>
> Let me try to describe. The tracing_data_get() does the work and it
> records the following for HEADER_TRACING_DATA in order:

Thanks for this! I'll try to write patches for the low hanging fruits,
and try to work a bit on other issues, like only collecting the format
files for events that the user asked for, perhaps even just for those
that had samples :-)

- Arnaldo

> * tracing header data
> - file magic bytes (including someone's birthday :) )
> - file version (it's 0.5 - the only thing I can see in diff with trace-cmd
> (version 6) is "saved-cmdline" file data which is unnecessary for perf
> - byte order, size of long and page size of the system
>
> * tracing header files
> - $tracefs/events/header_page and $tracefs/events/header_event
> - describe ftrace raw buffer format which is unnecessary for perf unless
> it reads the raw buffer directly (like my ftrace integration work?)
>
> * ftrace event files
> - format file for each event in $tracefs/events/ftrace directory
> - this is same as below but precedes other events, not sure why it's needed
>
> * (normal) event files
> - format file for each tracepoint event
>
> * /proc/kallsyms
> - for kernel symbol resolution, unnecessary for perf
>
> * tracing printk formats
> - for trace_printk? unnecessary for perf
>
> The last two can go away at least.
>
> Thanks,
> Namhyung
>
>
> >
> > > Adrian, would be good if you could fill in the missing bits for
> > > auxtrace/itrace.
> > > Everyone else, please review and add missing information.
> >
> > Thanks for doing this work!
> >
> > IIRC there is a presentation written by Jiri where parts of this is
> > documented, lemme try to find it...
> >
> > - Arnaldo
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@xxxxxxxxxxxxxxx
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/