linux/tools/lib/perf/include/perf
Ian Rogers c760174401 perf cpumap: Reduce cpu size from int to int16_t
Fewer than 32k logical CPUs are currently supported by perf. A cpumap
is indexed by an integer (see perf_cpu_map__cpu) yielding a perf_cpu
that wraps a 4-byte int for the logical CPU - the wrapping is done
deliberately to avoid confusing a logical CPU with an index into a
cpumap. Using a 4-byte int within the perf_cpu is larger than required
so this patch reduces it to the 2-byte int16_t. For a cpumap
containing 16 entries this will reduce the array size from 64 to 32
bytes. For very large servers with lots of logical CPUs the size
savings will be greater.

Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Link: https://lore.kernel.org/r/20250210191231.156294-1-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2025-02-27 08:47:25 -08:00
..
bpf_perf.h perf util: Move bpf_perf definitions to a libperf header 2021-04-29 10:30:58 -03:00
core.h libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
cpumap.h perf cpumap: Reduce cpu size from int to int16_t 2025-02-27 08:47:25 -08:00
event.h perf record: Ensure space for lost samples 2024-06-13 20:45:31 -07:00
evlist.h perf evlist: Remove nr_groups 2023-03-13 17:42:27 -03:00
evsel.h libperf: Handle read format in perf_evsel__read() 2022-08-19 15:56:27 -03:00
mmap.h libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
threadmap.h libperf: Add API for allocating new thread map array 2022-02-23 14:40:23 -03:00