perf counters: implement PERF_COUNT_TASK_CLOCK
Impact: add new perf-counter type The 'task clock' counter counts the amount of time a task is executing, in nanoseconds. It stops ticking when a task is scheduled out either due to it blocking, sleeping or it being preempted. This counter type is a Linux kernel based abstraction, it is available even if the hardware does not support native hardware performance counters. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -50,8 +50,11 @@ enum hw_event_types {
|
||||
*/
|
||||
PERF_COUNT_CPU_CLOCK = -1,
|
||||
PERF_COUNT_TASK_CLOCK = -2,
|
||||
PERF_COUNT_PAGE_FAULTS = -3,
|
||||
PERF_COUNT_CONTEXT_SWITCHES = -4,
|
||||
/*
|
||||
* Future software events:
|
||||
*/
|
||||
/* PERF_COUNT_PAGE_FAULTS = -3,
|
||||
PERF_COUNT_CONTEXT_SWITCHES = -4, */
|
||||
};
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user