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: cee275edcd ("perf metricgroup: Don't early exit if no CPUID table exists")
Reviewed-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Leo Yan <leo.yan@arm.com>
Cc: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Ian Rogers 2026-02-06 16:49:56 -08:00 committed by Arnaldo Carvalho de Melo
parent 81f86728a9
commit 8dd1d9a335
1 changed files with 3 additions and 3 deletions

View File

@ -1605,9 +1605,9 @@ 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,
metricgroup__has_metric_or_groups_callback,
&data)
return metricgroup__for_each_metric(table,
metricgroup__has_metric_or_groups_callback,
&data)
? true : false;
}