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>
This commit is contained in:
committed by
Robert Richter
parent
3bf101ba42
commit
84c7991059
@ -59,6 +59,15 @@ static inline int sh_pmu_initialized(void)
|
||||
return !!sh_pmu;
|
||||
}
|
||||
|
||||
const char *perf_pmu_name(void)
|
||||
{
|
||||
if (!sh_pmu)
|
||||
return NULL;
|
||||
|
||||
return sh_pmu->name;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(perf_pmu_name);
|
||||
|
||||
int perf_num_counters(void)
|
||||
{
|
||||
if (!sh_pmu)
|
||||
|
Reference in New Issue
Block a user