summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-04-24 08:18:31 +0200
committerIngo Molnar <mingo@elte.hu>2011-04-26 20:04:53 +0200
commit94403f8863d0d1d2005291b2ef0719c2534aa303 (patch)
treeb0c8d9cf3ce49bf9faadcf5564e9996d0090b5c8 /arch
parentMerge branch 'perf/urgent' into perf/stat (diff)
downloadlinux-94403f8863d0d1d2005291b2ef0719c2534aa303.tar.xz
linux-94403f8863d0d1d2005291b2ef0719c2534aa303.zip
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.c3
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)
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