perfcounters: add task migrations counter

Impact: add new feature, new sw counter

Add a counter that counts the number of cross-CPU migrations a
task is suffering.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Ingo Molnar
2008-12-14 12:34:15 +01:00
parent 5d6a27d8a0
commit 6c594c21fc
4 changed files with 61 additions and 6 deletions

View File

@@ -42,6 +42,8 @@ enum hw_event_types {
PERF_COUNT_BRANCH_INSTRUCTIONS = 4,
PERF_COUNT_BRANCH_MISSES = 5,
PERF_HW_EVENTS_MAX = 6,
/*
* Special "software" counters provided by the kernel, even if
* the hardware does not support performance counters. These
@@ -50,11 +52,11 @@ enum hw_event_types {
*/
PERF_COUNT_CPU_CLOCK = -1,
PERF_COUNT_TASK_CLOCK = -2,
/*
* Future software events:
*/
PERF_COUNT_PAGE_FAULTS = -3,
PERF_COUNT_CONTEXT_SWITCHES = -4,
PERF_COUNT_CPU_MIGRATIONS = -5,
PERF_SW_EVENTS_MIN = -6,
};
/*