Skip to content

Commit ba0cef3

Browse files
Stephane EranianIngo Molnar
authored andcommitted
perf_events: Fix bogus AMD64 generic TLB events
PERF_COUNT_HW_CACHE_DTLB:READ:MISS had a bogus umask value of 0 which counts nothing. Needed to be 0x7 (to count all possibilities). PERF_COUNT_HW_CACHE_ITLB:READ:MISS had a bogus umask value of 0 which counts nothing. Needed to be 0x3 (to count all possibilities). Signed-off-by: Stephane Eranian <eranian@google.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Robert Richter <robert.richter@amd.com> Cc: <stable@kernel.org> # as far back as it applies LKML-Reference: <4cb85478.41e9d80a.44e2.3f00@mx.google.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
1 parent c530ccd commit ba0cef3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/kernel/cpu/perf_event_amd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static __initconst const u64 amd_hw_cache_event_ids
5252
[ C(DTLB) ] = {
5353
[ C(OP_READ) ] = {
5454
[ C(RESULT_ACCESS) ] = 0x0040, /* Data Cache Accesses */
55-
[ C(RESULT_MISS) ] = 0x0046, /* L1 DTLB and L2 DLTB Miss */
55+
[ C(RESULT_MISS) ] = 0x0746, /* L1_DTLB_AND_L2_DLTB_MISS.ALL */
5656
},
5757
[ C(OP_WRITE) ] = {
5858
[ C(RESULT_ACCESS) ] = 0,
@@ -66,7 +66,7 @@ static __initconst const u64 amd_hw_cache_event_ids
6666
[ C(ITLB) ] = {
6767
[ C(OP_READ) ] = {
6868
[ C(RESULT_ACCESS) ] = 0x0080, /* Instruction fecthes */
69-
[ C(RESULT_MISS) ] = 0x0085, /* Instr. fetch ITLB misses */
69+
[ C(RESULT_MISS) ] = 0x0385, /* L1_ITLB_AND_L2_ITLB_MISS.ALL */
7070
},
7171
[ C(OP_WRITE) ] = {
7272
[ C(RESULT_ACCESS) ] = -1,

0 commit comments

Comments
 (0)