Re: perf report/stat and symbolic event names

From: Arnaldo Carvalho de Melo
Date: Thu Feb 03 2011 - 08:40:21 EST


Em Wed, Feb 02, 2011 at 05:18:21PM -0800, Tipp Moseley escreveu:
> Hey Arnaldo, Stephane suggested I mail you for this feature request to the
> perf tool.
>
> When I collect a "raw" event using perf record, perf report's output is
> pretty useless. E.g.:
> # Events: 833 raw 0x3d500a0
> So when I collect multiple events, I have to refer to the command line used
> to collect the profile and line up the event flags to figure out what I was
> collecting. With multiple collection runs, this can become quite confusing.
>
> The perf.data file doesn't seem to have the symbolic name of the event
> present.
> Do you think it would be reasonable to add a field to the profile to include
> the symbolic description of the event as it was given on the command line
> (e.g., "RS_UOPS_DISPATCHED:u:i:e:c=3")?

Its definetely a good idea to record in the perf.data header section the
command line that was passed to perf record.

A new tool, 'perf ls' could then look for files with the perf.data magic
number and show the contents of this section.

Extra enhancements would include globbing, so that one could do:

$ perf ls *UOPS*
$ perf ls *httpd*

Etc.

Recording the perf record on the header was suggested by Ingo a long
time ago, I just didn't got to implement it :-\

If you can try to implement it, please see how build ids are encoded in
the perf.data header.

Otherwise I'll try to do it at some point.

- 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/