OSDN Git Service

perf stat: No need to setup affinities when starting a workload
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 17 Jan 2022 16:09:29 +0000 (13:09 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 18 Jan 2022 12:24:58 +0000 (09:24 -0300)
commit49de179577e7b05b57f625bf05cdc60a72de38d0
tree21404b5c8dc4ba66b120a50c0121b9477f45907f
parent1855b796f2f672cbb25400be2d3171c26fc869a3
perf stat: No need to setup affinities when starting a workload

I.e. the simple:

  $ perf stat sleep 1

Uses a dummy CPU map and thus there is no need to setup/cleanup
affinities to avoid IPIs, etc.

With this we're down to a sched_getaffinity() call, in the libnuma
initialization, that probably can be removed in a followup patch.

Acked-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20220117160931.1191712-3-acme@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-stat.c