diff options
author | Matt Fleming <matt@console-pimps.org> | 2010-10-03 16:41:13 -0400 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2010-10-11 11:45:49 -0400 |
commit | 84c7991059c9c4530cc911137c5bf508a41ed129 (patch) | |
tree | 1fc9f7c8139f680f3d899328128a38e5087c30c7 /kernel/perf_event.c | |
parent | 3bf101ba42a1c89b5afbc7492e7647dae5e18735 (diff) |
perf: New helper function for pmu name
Introduce perf_pmu_name() helper function that returns the name of the
pmu. This gives us a generic way to get the name of a pmu regardless of
how an architecture identifies it internally.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r-- | kernel/perf_event.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 403d1804b198..e2534691db0d 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -85,6 +85,11 @@ void __weak hw_perf_enable(void) { barrier(); } | |||
85 | 85 | ||
86 | void __weak perf_event_print_debug(void) { } | 86 | void __weak perf_event_print_debug(void) { } |
87 | 87 | ||
88 | extern __weak const char *perf_pmu_name(void) | ||
89 | { | ||
90 | return "pmu"; | ||
91 | } | ||
92 | |||
88 | static DEFINE_PER_CPU(int, perf_disable_count); | 93 | static DEFINE_PER_CPU(int, perf_disable_count); |
89 | 94 | ||
90 | void perf_disable(void) | 95 | void perf_disable(void) |