mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-17 07:14:25 +00:00
perf python: Update ungrouped evsel leader in clone
evsels are cloned in the python code as they form part of the Python object pyrf_evsel. The cloning doesn't update the evsel's leader, do this for the case of an evsel being ungrouped. Reviewed-by: Howard Chu <howardchu95@gmail.com> Signed-off-by: Ian Rogers <irogers@google.com> Reviewed-by: Arnaldo Carvalho de Melo <acme@redhat.com> Link: https://lore.kernel.org/r/20250228222308.626803-8-irogers@google.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
@@ -1312,6 +1312,8 @@ static PyObject *pyrf_evsel__from_evsel(struct evsel *evsel)
|
||||
evsel__init(&pevsel->evsel, &evsel->core.attr, evsel->core.idx);
|
||||
|
||||
evsel__clone(&pevsel->evsel, evsel);
|
||||
if (evsel__is_group_leader(evsel))
|
||||
evsel__set_leader(&pevsel->evsel, &pevsel->evsel);
|
||||
return (PyObject *)pevsel;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user