libperf: Add a perf_cpu_map__set_nr() available as an internal function for tools...
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 12 Apr 2023 17:53:35 +0000 (14:53 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 12 Apr 2023 17:53:35 +0000 (14:53 -0300)
commitb277851417e0149aff5e6986e1ad6e2d8054e4a6
treef8a1fce2c0d700da2dc7f2cf551adb51584654ae
parent1f94479edb4decdcec3e902528abb47f0ccd5d16
libperf: Add a perf_cpu_map__set_nr() available as an internal function for tools/perf to use

We'll need to reference count check 'struct perf_cpu_map', so wrap
accesses to its internal state to allow intercepting accesses to its
instances.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
Cc: Dmitriy Vyukov <dvyukov@google.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Riccardo Mancini <rickyman7@gmail.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Stephen Brennan <stephen.s.brennan@oracle.com>
Link: https://lore.kernel.org/
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/perf/cpumap.c
tools/lib/perf/include/internal/cpumap.h