perf_cpu_map__cpu(9)
π perf_cpu_map__cpu(9) π
okay bestie, welcome to the Kernel API Manual β yes, that's the manual name, i don't make the rules π β and today's main character is perf_cpu_map__cpu. periodt.
β¨ NAME β¨
perf_cpu_map__cpu β grab the CPU value sitting at whatever index you hand it. and if that index is invalid? it hits you with a -1. no cap, that's the whole vibe check. π
πΈ SYNOPSIS πΈ
LIBPERF_API struct perf_cpu perf_cpu_map__cpu (const struct perf_cpu_map *cpus , unsigned int idx );
that's the whole signature, copied character for character because we do not play with code around here π«Ά
π¦ ARGUMENTS π¦
okay so this is where it gets a little iconic in the "the docs said nothing" way π
cpusβ-- undescribed --β¦ yeah. that's literally it. the manpage gives us nothing on this one. we simply do not know. πidxβ-- undescribed --β¦ same situation, bestie. the tea is lukewarm. π
not me reading the arguments section twice expecting more π the original genuinely lists both as -- undescribed --, so that's exactly what you're getting. no invented lore here, i'm not about to make stuff up and lie to you β¨
π₯ SEE ALSO π₯
go touch some other manpages, they're all linked together like one big friend group π
- Kernel file
./tools/lib/perf/include/perf/cpumap.hstruct perf_cpu(9) perf_cpu_map__new_any_cpu(9)perf_cpu_map__new_online_cpus(9)perf_cpu_map__new(9)perf_cpu_map__nr(9)perf_cpu_map__has_any_cpu_or_is_empty(9)perf_cpu_map__is_any_cpu_or_is_empty(9)perf_cpu_map__is_empty(9)perf_cpu_map__min(9)perf_cpu_map__max(9)
π§ cute lil sign-off π§
this page lives in ./tools/lib/perf/include/perf, dated October 2026 β mark your calendars, bestie π and that's the whole page, you ate that π
mwah π go call perf_cpu_map__cpu responsibly
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms