aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <[email protected]>2022-01-15 17:15:09 -0300
committerArnaldo Carvalho de Melo <[email protected]>2022-01-15 17:41:25 -0300
commit2eea0b56b0d6ace0172550477220a25d633ec5b9 (patch)
treede2af5d18ddad0a7e806e70f694408a15cbc1518
parent37be585807cb9a810f8395c39c4ee7bdbdc7b0dc (diff)
perf evlist: No need to do any affinity setup when profiling pids
The cpumap is dummy, so no need to go on figuring out affinity.o This way we reduce the setup time for simple scenarios like: $ perf stat sleep 1 Acked-by: Andi Kleen <[email protected]> Acked-by: Ian Rogers <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/util/evlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 11eb95b2106b..6e88d404b5b3 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -1290,7 +1290,7 @@ void evlist__close(struct evlist *evlist)
* With perf record core.cpus is usually NULL.
* Use the old method to handle this for now.
*/
- if (!evlist->core.cpus) {
+ if (!evlist->core.cpus || cpu_map__is_dummy(evlist->core.cpus)) {
evlist__for_each_entry_reverse(evlist, evsel)
evsel__close(evsel);
return;