Re: [perf] howto switch from pfmon

From: Brice Goglin
Date: Thu Aug 06 2009 - 12:59:42 EST


Ingo Molnar wrote:
> Update: based on your feedback the latest perfcounters tree includes
> the following new perf record features:
>
> -s, --stat per thread counts
> -n, --no-samples don't sample
>
> --stat instructs the kernel to gather precise per task/thread stats
> and emits those counts to the data file. Via --no-samples one can do
> non-profiling runs - i.e. only statistics collection.
>
> The 'perf stat' pretty printing side is not fully implemented yet -
> right now you can only see these stats if you look for
> PERF_EVENT_READ counts in the raw event log:
>
> perf report -D | grep PERF_EVENT_READ
>

Ok I am getting remote/local accesses for my threads now. But I am not
sure which line corresponds to which event.

$ /mnt/scratch/bgoglin/cpunode/linux-2.6.31/tools/perf/perf record -f -s
-e r1000001e0 -e r1000002e0 -e r1000004e0 -e r1000008e0 ./stream
[...]
$ /mnt/scratch/bgoglin/cpunode/linux-2.6.31/tools/perf/perf report -D |
grep PERF_EVENT_READ
0x7cd0 [0x30]: PERF_EVENT_READ: 4651 4651 210827
0x7388 [0x30]: PERF_EVENT_READ: 4651 4651 241742
0x8cf0 [0x30]: PERF_EVENT_READ: 4651 4651 315938
0x9da0 [0x30]: PERF_EVENT_READ: 4651 4651 9461794
0x7208 [0x30]: PERF_EVENT_READ: 4651 4652 24954
0x8c90 [0x30]: PERF_EVENT_READ: 4651 4652 408056
0x7ca0 [0x30]: PERF_EVENT_READ: 4651 4652 8962423
0x9ce0 [0x30]: PERF_EVENT_READ: 4651 4652 9117
0x7df0 [0x30]: PERF_EVENT_READ: 4651 4653 21645
0x9d70 [0x30]: PERF_EVENT_READ: 4651 4653 23606
0x7358 [0x30]: PERF_EVENT_READ: 4651 4653 29266
0x8e70 [0x30]: PERF_EVENT_READ: 4651 4653 9339173
[...]

I can easily sort them by thread id, but I don't know how to match my 4
events with each group of 4 line.

Maybe perf report earned some better way to show per-thread statistics
in the meantime?

Brice

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