]>
Commit | Line | Data |
---|---|---|
be3a75e0 GKH |
1 | From 1996388e9f4e3444db8273bc08d25164d2967c21 Mon Sep 17 00:00:00 2001 |
2 | From: Vince Weaver <vincent.weaver@maine.edu> | |
3 | Date: Mon, 14 Jul 2014 15:33:25 -0400 | |
4 | Subject: perf/x86/intel: Use proper dTLB-load-misses event on IvyBridge | |
5 | ||
6 | From: Vince Weaver <vincent.weaver@maine.edu> | |
7 | ||
8 | commit 1996388e9f4e3444db8273bc08d25164d2967c21 upstream. | |
9 | ||
10 | This was discussed back in February: | |
11 | ||
12 | https://lkml.org/lkml/2014/2/18/956 | |
13 | ||
14 | But I never saw a patch come out of it. | |
15 | ||
16 | On IvyBridge we share the SandyBridge cache event tables, but the | |
17 | dTLB-load-miss event is not compatible. Patch it up after | |
18 | the fact to the proper DTLB_LOAD_MISSES.DEMAND_LD_MISS_CAUSES_A_WALK | |
19 | ||
20 | Signed-off-by: Vince Weaver <vincent.weaver@maine.edu> | |
21 | Signed-off-by: Peter Zijlstra <peterz@infradead.org> | |
22 | Cc: Arnaldo Carvalho de Melo <acme@kernel.org> | |
23 | Cc: Linus Torvalds <torvalds@linux-foundation.org> | |
24 | Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1407141528200.17214@vincent-weaver-1.umelst.maine.edu | |
25 | Signed-off-by: Ingo Molnar <mingo@kernel.org> | |
26 | Cc: Hou Pengyang <houpengyang@huawei.com> | |
27 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
28 | ||
29 | --- | |
30 | arch/x86/kernel/cpu/perf_event_intel.c | 3 +++ | |
31 | 1 file changed, 3 insertions(+) | |
32 | ||
33 | --- a/arch/x86/kernel/cpu/perf_event_intel.c | |
34 | +++ b/arch/x86/kernel/cpu/perf_event_intel.c | |
35 | @@ -2475,6 +2475,9 @@ __init int intel_pmu_init(void) | |
36 | case 62: /* IvyBridge EP */ | |
37 | memcpy(hw_cache_event_ids, snb_hw_cache_event_ids, | |
38 | sizeof(hw_cache_event_ids)); | |
39 | + /* dTLB-load-misses on IVB is different than SNB */ | |
40 | + hw_cache_event_ids[C(DTLB)][C(OP_READ)][C(RESULT_MISS)] = 0x8108; /* DTLB_LOAD_MISSES.DEMAND_LD_MISS_CAUSES_A_WALK */ | |
41 | + | |
42 | memcpy(hw_cache_extra_regs, snb_hw_cache_extra_regs, | |
43 | sizeof(hw_cache_extra_regs)); | |
44 |