Re: [PATCH] perf tools: Fix reading of perf.data file header

Brice Goglin
2009-08-06T20:02:58Z

Ingo Molnar wrote:
> * Brice Goglin <Brice.Goglin@inria.fr> wrote:
>
>
>> $ /mnt/scratch/bgoglin/cpunode/linux-2.6.31/tools/perf/perf report -D |
>> grep _READ | sort -k5
>> 0x8bb8 [0x30]: PERF_EVENT_READ: 6268 6268 raw 0x1000001e0 494628
>> 0x8fc0 [0x30]: PERF_EVENT_READ: 6268 6268 raw 0x1000002e0 209113
>> 0x9698 [0x30]: PERF_EVENT_READ: 6268 6268 raw 0x1000004e0 307215
>> 0x9cf8 [0x30]: PERF_EVENT_READ: 6268 6268 raw 0x1000008e0 9203221
>> 0x8a08 [0x30]: PERF_EVENT_READ: 6268 6269 raw 0x1000001e0 9210788
>> 0x9020 [0x30]: PERF_EVENT_READ: 6268 6269 raw 0x1000002e0 302344
>> 0x9608 [0x30]: PERF_EVENT_READ: 6268 6269 raw 0x1000004e0 198705
>> 0x9d28 [0x30]: PERF_EVENT_READ: 6268 6269 raw 0x1000008e0 473471
>> [...]
>>
>> Now I know which thread actually reads from where.
>> Looks like we're good to go now! thanks a lot Peter!
>>
>> Tested-by: Brice Goglin <Brice.Goglin@inria.fr>
>>
>
> Thanks Brice.
>
> It would be nice to add this as some "perf report -s/--stats" flag,
> to not have to go via -D (which is a 'print debug output' kind of
> ad-hoc thing and subject to format changes in the future).
>
> Would you be interested in sending a patch that adds that flag to
> 'perf report', to print out these statistics entries (if any), in a
> tabular form suitable for your purposes? Below is a past patch to
> builtin-report.c that shows how to add new options.
>
>

I'll see what I can do. I have been looking at the code tonight before
Peter fixed the last problem but I didn't manage to understand much of
the code so far. So thanks for the example patch :)

Brice