perf stat: Move metric list from config to evlist
authorIan Rogers <irogers@google.com>
Thu, 10 Jul 2025 23:51:19 +0000 (16:51 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 11 Jul 2025 19:36:40 +0000 (12:36 -0700)
commitfaebee18d720d9e209946ece3e468c06cf13f5ec
tree63c1843370345040bc7996ec7346ce3125374d3a
parentcb336b6aaeb44be281df9a03684ddeadd3afab60
perf stat: Move metric list from config to evlist

The rblist of metric_event that then have a list of associated
metric_expr is moved out of the stat_config and into the evlist. This
is done as part of refactoring things for python, having the state
split in two places complicates that implementation. The evlist is
doing the harder work of enabling and disabling events, the metrics
are needed to compute a value and it doesn't seem unreasonable to hang
them from the evlist.

Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250710235126.1086011-7-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
15 files changed:
tools/perf/builtin-script.c
tools/perf/builtin-stat.c
tools/perf/tests/expand-cgroup.c
tools/perf/tests/parse-metric.c
tools/perf/tests/pmu-events.c
tools/perf/util/cgroup.c
tools/perf/util/cgroup.h
tools/perf/util/evlist.c
tools/perf/util/evlist.h
tools/perf/util/metricgroup.c
tools/perf/util/metricgroup.h
tools/perf/util/python.c
tools/perf/util/stat-display.c
tools/perf/util/stat-shadow.c
tools/perf/util/stat.h