perf_counter tools: Allow perf top top users to switch between weighted and individual counter display
Add [w]eighted hotkey. Pressing [w] toggles between displaying
weighted total of all counters, and the counter selected via
[E]vent select key.
------------------------------------------------------------------------------
PerfTop: 90395 irqs/sec kernel:16.1% [cache-misses/cache-references/instructions], (all, 4 CPUs)
------------------------------------------------------------------------------
weight samples pcnt RIP kernel function
______ _______ _____ ________________ _______________
1275408.6 10881 - 5.3% -
ffffffff81146f70 : copy_page_c
553683.4 43569 - 21.3% -
ffffffff81146f20 : clear_page_c
74075.0 6768 - 3.3% -
ffffffff81147190 : copy_user_generic_string
40602.9 7538 - 3.7% -
ffffffff81284ba2 : _spin_lock
26882.1 965 - 0.5% -
ffffffff8109d280 : file_ra_state_init
[w]
------------------------------------------------------------------------------
PerfTop: 91221 irqs/sec kernel:14.5% [10000Hz cache-misses], (all, 4 CPUs)
------------------------------------------------------------------------------
weight samples pcnt RIP kernel function
______ _______ _____ ________________ _______________
47320.00 - 22.3% -
ffffffff81146f20 : clear_page_c
14261.00 - 6.7% -
ffffffff810992f5 : __rmqueue
11046.00 - 5.2% -
ffffffff81146f70 : copy_page_c
7842.00 - 3.7% -
ffffffff81284ba2 : _spin_lock
7234.00 - 3.4% -
ffffffff810aa1d6 : unmap_vmas
Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>