diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-04-24 02:18:31 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-04-26 14:04:53 -0400 |
commit | 94403f8863d0d1d2005291b2ef0719c2534aa303 (patch) | |
tree | b0c8d9cf3ce49bf9faadcf5564e9996d0090b5c8 /arch | |
parent | 7bd5fafeb414cf00deee32c82834f8bf1426b9ac (diff) |
perf events: Add stalled cycles generic event - PERF_COUNT_HW_STALLED_CYCLES
The new PERF_COUNT_HW_STALLED_CYCLES event tries to approximate
cycles the CPU does nothing useful, because it is stalled on a
cache-miss or some other condition.
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/n/tip-fue11vymwqsoo5to72jxxjyl@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c index 9ae4a2aa7398..efa2704c9dfd 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c | |||
@@ -1413,6 +1413,9 @@ static __init int intel_pmu_init(void) | |||
1413 | x86_pmu.enable_all = intel_pmu_nhm_enable_all; | 1413 | x86_pmu.enable_all = intel_pmu_nhm_enable_all; |
1414 | x86_pmu.extra_regs = intel_nehalem_extra_regs; | 1414 | x86_pmu.extra_regs = intel_nehalem_extra_regs; |
1415 | 1415 | ||
1416 | /* Install the stalled-cycles event: 0xff: All reasons, 0xa2: Resource stalls */ | ||
1417 | intel_perfmon_event_map[PERF_COUNT_HW_STALLED_CYCLES] = 0xffa2; | ||
1418 | |||
1416 | if (ebx & 0x40) { | 1419 | if (ebx & 0x40) { |
1417 | /* | 1420 | /* |
1418 | * Erratum AAJ80 detected, we work it around by using | 1421 | * Erratum AAJ80 detected, we work it around by using |