perf_cpu_map__max(9)
β¨ perf_cpu_map__max(9) β¨
okay so this is a page straight out of the Kernel API Manual, and bestie, it is short but it is serving exactly what it needs to serve. buckle up π
πΈ NAME πΈ
perf_cpu_map__max β literally returns the maximum CPU value, or -1 if the map is empty or if it's just the "any CPU"/dummy value. that's it. that's the whole vibe. π
π¦ SYNOPSIS π¦
LIBPERF_API struct perf_cpu perf_cpu_map__max (const struct perf_cpu_map *map );
copy it exactly, don't @ me π β LIBPERF_API is right there, then the return type struct perf_cpu, then the function name, then it takes a const struct perf_cpu_map * called map. periodt.
π ARGUMENTS π
mapβ ngl, the original docs just say-- undescribed --for this one π so that's genuinely all we've got. no cap, nobody wrote a description for it. it's theconst struct perf_cpu_map *you're passing in, and you're asking it for its max. that's the whole situation.
lowkey iconic that they shipped it with an undescribed argument, but fr fr we're not gonna invent details that aren't in the source. we stay honest in this group chat π
β SEE ALSO β
go touch some related pages, bestie, they're all linked from the kernel file ./tools/lib/perf/include/perf/cpumap.h:
struct 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__cpu(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)
π«Ά the cute sign-off π«Ά
this lil masterpiece lives in ./tools/lib/perf/include/perf and it's dated October 2026, and the page is of course perf_cpu_map__max(9). slay, go read perf_cpu_map__min(9) next, it's giving twin energy π§β¨π
π¦ 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