perf_counter, x86: Fix generic cache events on P6-mobile CPUs
Commit-ID: f64ccccb8afa43abdd63fcbd230f818d6ea0883f Gitweb: http://git.kernel.org/tip/f64ccccb8afa43abdd63fcbd230f818d6ea0883f Author: Ingo Molnar <[email protected]> AuthorDate: Tue, 11 Aug 2009 10:26:33 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Tue, 11 Aug 2009 11:35:26 +0200
perf_counter, x86: Fix generic cache events on P6-mobile CPUs
Johannes Stezenbach reported that 'perf stat' does not count cache-miss and cache-references events on his Pentium-M based laptop.
This is because we left them blank in p6_perfmon_event_map[], fill them in.
Reported-by Johannes Stezenbach <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Frederic Weisbecker <[email protected]>
LKML-Reference: <new-submission>
Signed-off-by Ingo Molnar <[email protected]>
--- arch/x86/kernel/cpu/perf_counter.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/perf_counter.c +2 -2
@@ -72,8 +72,8 @@ static const u64 p6_perfmon_event_map[] = { [PERF_COUNT_HW_CPU_CYCLES] = 0x0079, [PERF_COUNT_HW_INSTRUCTIONS] = 0x00c0, - [PERF_COUNT_HW_CACHE_REFERENCES] = 0x0000, - [PERF_COUNT_HW_CACHE_MISSES] = 0x0000, + [PERF_COUNT_HW_CACHE_REFERENCES] = 0x0f2e, + [PERF_COUNT_HW_CACHE_MISSES] = 0x012e, [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x00c4, [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c5, [PERF_COUNT_HW_BUS_CYCLES] = 0x0062,