Commit 8dd1d9a3 authored by Ian Rogers's avatar Ian Rogers Committed by Arnaldo Carvalho de Melo
Browse files

perf metricgroup: Fix metricgroup__has_metric_or_groups()



Use metricgroup__for_each_metric() rather than
pmu_metrics_table__for_each_metric() that combines the
default metric table with, a potentially empty, CPUID table.

Fixes: cee275ed ("perf metricgroup: Don't early exit if no CPUID table exists")
Reviewed-by: default avatarLeo Yan <leo.yan@arm.com>
Signed-off-by: default avatarIan Rogers <irogers@google.com>
Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: default avatarLeo Yan <leo.yan@arm.com>
Cc: Ian Rogers <irogers@google.com>
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 81f86728
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1605,7 +1605,7 @@ bool metricgroup__has_metric_or_groups(const char *pmu, const char *metric_or_gr
		.metric_or_groups = metric_or_groups,
	};

	return pmu_metrics_table__for_each_metric(table,
	return metricgroup__for_each_metric(table,
					    metricgroup__has_metric_or_groups_callback,
					    &data)
		? true : false;