[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220422162402.147958-22-adrian.hunter@intel.com>
Date: Fri, 22 Apr 2022 19:24:02 +0300
From: Adrian Hunter <adrian.hunter@...el.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Jiri Olsa <jolsa@...hat.com>, Ian Rogers <irogers@...gle.com>,
Alexey Bayduraev <alexey.v.bayduraev@...ux.intel.com>,
Namhyung Kim <namhyung@...nel.org>,
Leo Yan <leo.yan@...aro.org>, linux-kernel@...r.kernel.org
Subject: [PATCH RFC 21/21] perf tools: Allow system-wide events to keep their own threads
System-wide events do not have threads, so do not propagate threads to
them.
Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
---
tools/lib/perf/evlist.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/lib/perf/evlist.c b/tools/lib/perf/evlist.c
index 51fd550e326f..076a27650491 100644
--- a/tools/lib/perf/evlist.c
+++ b/tools/lib/perf/evlist.c
@@ -51,8 +51,11 @@ static void __perf_evlist__propagate_maps(struct perf_evlist *evlist,
evsel->cpus = perf_cpu_map__get(evsel->own_cpus);
}
- perf_thread_map__put(evsel->threads);
- evsel->threads = perf_thread_map__get(evlist->threads);
+ if (!evsel->system_wide) {
+ perf_thread_map__put(evsel->threads);
+ evsel->threads = perf_thread_map__get(evlist->threads);
+ }
+
evlist->all_cpus = perf_cpu_map__merge(evlist->all_cpus, evsel->cpus);
}
--
2.25.1
Powered by blists - more mailing lists