perf metricgroup: Factor out for-each function and move out printing
authorIan Rogers <irogers@google.com>
Thu, 10 Jul 2025 23:51:18 +0000 (16:51 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 11 Jul 2025 19:36:40 +0000 (12:36 -0700)
commitcb336b6aaeb44be281df9a03684ddeadd3afab60
treedf115296b3d18ed070ce04b2b6000ff4f831e8ca
parent8c75dc742089c702cab6d0f21be80c5ddd3c6067
perf metricgroup: Factor out for-each function and move out printing

Factor metricgroup__for_each_metric into its own function handling
regular and sys metrics. Make the metric adding and printing code use
it, move the printing code into print-events files.

Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250710235126.1086011-6-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/metricgroup.c
tools/perf/util/metricgroup.h
tools/perf/util/print-events.c
tools/perf/util/print-events.h