Skip to content

Commit 2eea0b5

Browse files
committed
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]>
1 parent 37be585 commit 2eea0b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/util/evlist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ void evlist__close(struct evlist *evlist)
12901290
* With perf record core.cpus is usually NULL.
12911291
* Use the old method to handle this for now.
12921292
*/
1293-
if (!evlist->core.cpus) {
1293+
if (!evlist->core.cpus || cpu_map__is_dummy(evlist->core.cpus)) {
12941294
evlist__for_each_entry_reverse(evlist, evsel)
12951295
evsel__close(evsel);
12961296
return;

0 commit comments

Comments
 (0)