linux/tools/lib/perf
Arnaldo Carvalho de Melo 7435c4069a libperf: Document code simplification case for widening struct perf_cpu
Add a bullet point to the libperf ABI TODO explaining the code
simplification benefit of widening struct perf_cpu.cpu from int16_t
to int: the narrow type forces defensive truncation checks at every
boundary where wider CPU indices are narrowed, and values > 32767
silently wrap to negative numbers (two's complement), bypassing
bounds validation without them.

Acked-by: Ian Rogers <irogers@google.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2026-06-10 15:23:54 -03:00
..
Documentation perf sched stats: Add record and rawdump support 2026-01-22 12:29:28 -03:00
include libperf: Document struct perf_cpu int16_t ABI limitation 2026-06-06 14:46:37 -03:00
tests
.gitignore
Build
core.c
cpumap.c libperf cpumap: Make index and nr types unsigned 2026-04-01 14:50:53 -07:00
evlist.c perf evlist: Special map propagation for tool events that read on 1 CPU 2026-02-10 09:33:28 -03:00
evsel.c libperf cpumap: Make index and nr types unsigned 2026-04-01 14:50:53 -07:00
internal.h
lib.c
libperf.map
libperf.pc.template
Makefile libperf build: Always place libperf includes first 2026-02-03 18:01:27 -03:00
mmap.c libperf mmap: In user mmap rdpmc avoid undefined behavior 2025-10-02 15:02:47 -03:00
threadmap.c libperf threadmap: Add perf_thread_map__idx() 2025-05-21 15:07:13 -03:00
TODO libperf: Document code simplification case for widening struct perf_cpu 2026-06-10 15:23:54 -03:00
xyarray.c