Files
linux/kernel
Paul Mackerras a08b159fc2 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 <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Corey Ashford <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
2009-05-11 12:10:53 +02:00
..
2009-04-14 02:30:36 +02:00
…
2009-04-02 19:04:55 -07:00
…
…
…
…
…
…
2009-01-14 18:09:02 +01:00
…
2009-03-30 22:05:16 +10:30
…
…
2009-04-24 07:47:59 -07:00
2009-04-17 01:57:54 +02:00
…
2009-03-24 10:52:46 +11:00
…