aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/cpu/perf_counter.c3
-rw-r--r--include/linux/perf_counter.h5
2 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c
index f3359c2b3910..86b2fdd344a6 100644
--- a/arch/x86/kernel/cpu/perf_counter.c
+++ b/arch/x86/kernel/cpu/perf_counter.c
@@ -41,12 +41,13 @@ static DEFINE_PER_CPU(struct cpu_hw_counters, cpu_hw_counters);
41 41
42static const int intel_perfmon_event_map[] = 42static const int intel_perfmon_event_map[] =
43{ 43{
44 [PERF_COUNT_CYCLES] = 0x003c, 44 [PERF_COUNT_CPU_CYCLES] = 0x003c,
45 [PERF_COUNT_INSTRUCTIONS] = 0x00c0, 45 [PERF_COUNT_INSTRUCTIONS] = 0x00c0,
46 [PERF_COUNT_CACHE_REFERENCES] = 0x4f2e, 46 [PERF_COUNT_CACHE_REFERENCES] = 0x4f2e,
47 [PERF_COUNT_CACHE_MISSES] = 0x412e, 47 [PERF_COUNT_CACHE_MISSES] = 0x412e,
48 [PERF_COUNT_BRANCH_INSTRUCTIONS] = 0x00c4, 48 [PERF_COUNT_BRANCH_INSTRUCTIONS] = 0x00c4,
49 [PERF_COUNT_BRANCH_MISSES] = 0x00c5, 49 [PERF_COUNT_BRANCH_MISSES] = 0x00c5,
50 [PERF_COUNT_BUS_CYCLES] = 0x013c,
50}; 51};
51 52
52static const int max_intel_perfmon_events = ARRAY_SIZE(intel_perfmon_event_map); 53static const int max_intel_perfmon_events = ARRAY_SIZE(intel_perfmon_event_map);
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index 1ea08e9f31ce..ec77d1643d37 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -36,14 +36,15 @@ enum hw_event_types {
36 /* 36 /*
37 * Common hardware events, generalized by the kernel: 37 * Common hardware events, generalized by the kernel:
38 */ 38 */
39 PERF_COUNT_CYCLES = 0, 39 PERF_COUNT_CPU_CYCLES = 0,
40 PERF_COUNT_INSTRUCTIONS = 1, 40 PERF_COUNT_INSTRUCTIONS = 1,
41 PERF_COUNT_CACHE_REFERENCES = 2, 41 PERF_COUNT_CACHE_REFERENCES = 2,
42 PERF_COUNT_CACHE_MISSES = 3, 42 PERF_COUNT_CACHE_MISSES = 3,
43 PERF_COUNT_BRANCH_INSTRUCTIONS = 4, 43 PERF_COUNT_BRANCH_INSTRUCTIONS = 4,
44 PERF_COUNT_BRANCH_MISSES = 5, 44 PERF_COUNT_BRANCH_MISSES = 5,
45 PERF_COUNT_BUS_CYCLES = 6,
45 46
46 PERF_HW_EVENTS_MAX = 6, 47 PERF_HW_EVENTS_MAX = 7,
47 48
48 /* 49 /*
49 * Special "software" counters provided by the kernel, even if 50 * Special "software" counters provided by the kernel, even if