[PATCH 2/5] perf metricgroup: Support adding metrics for arm64

John Garry john.garry at huawei.com
Wed Mar 3 15:22:15 GMT 2021


Use find_cpumap() to get the cpumap for the common CPU PMU, if one exists.

Signed-off-by: John Garry <john.garry at huawei.com>
---
 tools/perf/util/metricgroup.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
index 9a2a23093961..c7c9ee9c04be 100644
--- a/tools/perf/util/metricgroup.c
+++ b/tools/perf/util/metricgroup.c
@@ -1275,8 +1275,7 @@ int metricgroup__parse_groups(const struct option *opt,
 			      struct rblist *metric_events)
 {
 	struct evlist *perf_evlist = *(struct evlist **)opt->value;
-	struct pmu_events_map *map = perf_pmu__find_map(NULL);
-
+	struct pmu_events_map *map = find_cpumap();
 
 	return parse_groups(perf_evlist, str, metric_no_group,
 			    metric_no_merge, NULL, metric_events, map);
-- 
2.26.2




More information about the linux-arm-kernel mailing list