From: Ian Rogers Date: Sat, 7 Feb 2026 00:49:56 +0000 (-0800) Subject: perf metricgroup: Fix metricgroup__has_metric_or_groups X-Git-Tag: v7.1-rc1~91^2~131 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c5a244bf17caf2de22f9e100832b75f72b31d3e6;p=thirdparty%2Fkernel%2Flinux.git 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: cee275edcdb1 ("perf metricgroup: Don't early exit if no CPUID table exists") Signed-off-by: Ian Rogers Reviewed-by: Leo Yan Tested-by: Leo Yan Signed-off-by: Namhyung Kim --- diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c index 46bf4dfeebc8c..7e39d469111b2 100644 --- a/tools/perf/util/metricgroup.c +++ b/tools/perf/util/metricgroup.c @@ -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; }