Skip to content

Commit 8dd1d9a

Browse files
captain5050acmel
authored andcommitted
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: cee275e ("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>
1 parent 81f8672 commit 8dd1d9a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tools/perf/util/metricgroup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,9 +1605,9 @@ bool metricgroup__has_metric_or_groups(const char *pmu, const char *metric_or_gr
16051605
.metric_or_groups = metric_or_groups,
16061606
};
16071607

1608-
return pmu_metrics_table__for_each_metric(table,
1609-
metricgroup__has_metric_or_groups_callback,
1610-
&data)
1608+
return metricgroup__for_each_metric(table,
1609+
metricgroup__has_metric_or_groups_callback,
1610+
&data)
16111611
? true : false;
16121612
}
16131613

0 commit comments

Comments
 (0)