On Fri, Mar 05, 2021 at 11:06:58AM +0000, John Garry wrote:
Hi Jirka,right, so perf_pmu__find_map does not take perf_pmu as argument
Yes - but to be more accurate, arm64.- struct pmu_events_map *map = perf_pmu__find_map(NULL);so this is just for arm at the moment right?
+ struct pmu_events_map *map = find_cpumap();
At the moment, from the archs which use pmu-events, only arm64 and nds32
have versions of get_cpuid_str() which require a non-NULL pmu argument.
But then apparently nds32 only supports a single CPU, so this issue of
heterogeneous CPUs should not be a concern there:)
could we rather make this arch specific code, so we don't needWell I was thinking that this code should not be in metricgroup.c anyway.
to do the scanning on archs where this is not needed?
like marking perf_pmu__find_map as __weak and add arm specific
version?
So there is code which is common in current perf_pmu__find_map() for all
archs.
I could factor that out into a common function, below. Just a bit worried
about perf_pmu__find_map() and perf_pmu__find_pmu_map() being confused.
anymore, so the prefix does not fit, how about pmu_events_map__find ?