diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-12-23 06:17:29 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-23 06:45:24 -0500 |
commit | f650a672359819454c3d8d4135ecd1558cde0b24 (patch) | |
tree | 8157271c00949b1d228b2a81473c906a2d29b216 /arch | |
parent | 235c7fc7c500e4fd1700c4ad01b5612bcdc1b449 (diff) |
perfcounters: add PERF_COUNT_BUS_CYCLES
Generalize "bus cycles" hw events - and map them to CPU_CLK_Unhalted.Ref
on x86. (which is a good enough approximation)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/cpu/perf_counter.c | 3 |
1 files changed, 2 insertions, 1 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 | ||
42 | static const int intel_perfmon_event_map[] = | 42 | static 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 | ||
52 | static const int max_intel_perfmon_events = ARRAY_SIZE(intel_perfmon_event_map); | 53 | static const int max_intel_perfmon_events = ARRAY_SIZE(intel_perfmon_event_map); |