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>
This commit is contained in:
Ingo Molnar
2011-04-24 08:18:31 +02:00
parent 7bd5fafeb4
commit 94403f8863
4 changed files with 6 additions and 0 deletions

View File

@@ -1413,6 +1413,9 @@ static __init int intel_pmu_init(void)
x86_pmu.enable_all = intel_pmu_nhm_enable_all;
x86_pmu.extra_regs = intel_nehalem_extra_regs;
/* Install the stalled-cycles event: 0xff: All reasons, 0xa2: Resource stalls */
intel_perfmon_event_map[PERF_COUNT_HW_STALLED_CYCLES] = 0xffa2;
if (ebx & 0x40) {
/*
* Erratum AAJ80 detected, we work it around by using