perf_cpu_map__max(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 the const 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:


🫢 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