mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-17 07:14:25 +00:00
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>
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "strbuf.h"
|
||||
#include "thread_map.h"
|
||||
#include "trace-event.h"
|
||||
#include "metricgroup.h"
|
||||
#include "mmap.h"
|
||||
#include "util/sample.h"
|
||||
#include <internal/lib.h>
|
||||
@@ -1544,6 +1545,9 @@ static PyObject *pyrf_evlist__from_evlist(struct evlist *evlist)
|
||||
|
||||
evlist__add(&pevlist->evlist, &pevsel->evsel);
|
||||
}
|
||||
metricgroup__copy_metric_events(&pevlist->evlist, /*cgrp=*/NULL,
|
||||
&pevlist->evlist.metric_events,
|
||||
&evlist->metric_events);
|
||||
return (PyObject *)pevlist;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user