diff options
author | Paul Mackerras | 2009-05-11 07:46:10 +0200 |
---|---|---|
committer | Ingo Molnar | 2009-05-11 12:10:53 +0200 |
commit | a08b159fc243dbfe415250466d24cfc5010deee5 (patch) | |
tree | 39bb59aaf183021e6d9b02ed26dc8a4930d00f0b /README | |
parent | perf_counter: Put whole group on when enabling group leader (diff) | |
download | kernel-qcow2-linux-a08b159fc243dbfe415250466d24cfc5010deee5.tar.gz kernel-qcow2-linux-a08b159fc243dbfe415250466d24cfc5010deee5.tar.xz kernel-qcow2-linux-a08b159fc243dbfe415250466d24cfc5010deee5.zip |
perf_counter: don't count scheduler ticks as context switches
The context-switch software counter gives inflated values at present
because each scheduler tick and each process-wide counter
enable/disable prctl gets counted as a context switch.
This happens because perf_counter_task_tick, perf_counter_task_disable
and perf_counter_task_enable all call perf_counter_task_sched_out,
which calls perf_swcounter_event to record a context switch event.
This fixes it by introducing a variant of perf_counter_task_sched_out
with two underscores in front for internal use within the perf_counter
code, and makes perf_counter_task_{tick,disable,enable} call it. This
variant doesn't record a context switch event, and takes a struct
perf_counter_context *. This adds the new variant rather than
changing the behaviour or interface of perf_counter_task_sched_out
because that is called from other code.
[ Impact: fix inflated context-switch event counts ]
Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
LKML-Reference: <18951.48034.485580.498953@drongo.ozlabs.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions