diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-04-28 05:16:44 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-04-28 02:39:33 -0400 |
commit | 8a850cadca0e387c87a0911a61e99fd66aeb57ec (patch) | |
tree | 9a5de0cd113edde3dad5d6970818d03ce37c2060 | |
parent | 9ceb1c3d1fe15c2f9b55eaa8978019ef0e0a06ac (diff) |
perf event, x86: Use better stalled cycles metric
Use the UOPS_EXECUTED.*,c=1,i=1 event on Intel CPUs - it is a rather
good indicator of CPU execution stalls, more sensitive and more inclusive
than the 0xa2 resource stalls event (which does not count nearly as many
stall types).
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/n/tip-7y40wib8n1eqio7hjpn2dsrm@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c index 067a48b13a76..1ea94224f62e 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c | |||
@@ -1413,8 +1413,8 @@ 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 */ | 1416 | /* Install the stalled-cycles event: UOPS_EXECUTED.CORE_ACTIVE_CYCLES,c=1,i=1 */ |
1417 | intel_perfmon_event_map[PERF_COUNT_HW_STALLED_CYCLES] = 0xffa2; | 1417 | intel_perfmon_event_map[PERF_COUNT_HW_STALLED_CYCLES] = 0x1803fb1; |
1418 | 1418 | ||
1419 | if (ebx & 0x40) { | 1419 | if (ebx & 0x40) { |
1420 | /* | 1420 | /* |