diff options
author | Paul Mackerras <paulus@samba.org> | 2009-03-30 13:07:10 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-06 03:30:41 -0400 |
commit | 31f004df8d14212f0a8a2fb12a8ed44a3d80e2fb (patch) | |
tree | 514bcf29416b141aa661b255b6da52e763ddceb5 /include/asm-frv/mutex.h | |
parent | 9ea98e191255ee642e64a5745014424fc63f83b0 (diff) |
perf_counter tools: optionally scale counter values in perfstat mode
Impact: new functionality
This adds add an option to the perfstat mode of kerneltop to scale the
reported counter values according to the fraction of time that each
counter gets to count. This is invoked with the -l option (I used 'l'
because s, c, a and e were all taken already.) This uses the new
PERF_RECORD_TOTAL_TIME_{ENABLED,RUNNING} read format options.
With this, we get output like this:
$ ./perfstat -l -e 0:0,0:1,0:2,0:3,0:4,0:5 ./spin
Performance counter stats for './spin':
4016072055 CPU cycles (events) (scaled from 66.53%)
2005887318 instructions (events) (scaled from 66.53%)
1762849 cache references (events) (scaled from 66.69%)
165229 cache misses (events) (scaled from 66.85%)
1001298009 branches (events) (scaled from 66.78%)
41566 branch misses (events) (scaled from 66.61%)
Wall-clock time elapsed: 2438.227446 msecs
This also lets us detect when a counter is zero because the counter
never got to go on the CPU at all. In that case we print <not counted>
rather than 0.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Orig-LKML-Reference: <20090330171023.871484899@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-frv/mutex.h')
0 files changed, 0 insertions, 0 deletions