Skip to content

Commit

Permalink
perf evlist: No need to do any affinity setup when profiling pids
Browse files Browse the repository at this point in the history
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 <andi@firstfloor.org>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Arnaldo Carvalho de Melo committed Jan 15, 2022
1 parent 37be585 commit 2eea0b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/util/evlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2eea0b5

Please sign in to comment.