perf_cpu_map__is_empty(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ perf_cpu_map__is_empty ✨

okay bestie so this one lives in the Kernel API Manual (that's the manual name, bestie, we're fancy) and it's literally the vibe check for a cpu map πŸŽ€


πŸ’– NAME πŸ’–

perf_cpu_map__is_empty β€” does the map contain no values and it doesn't contain the special "any CPU"/dummy value.

like, that's the whole personality. two conditions. both gotta be true. no cap. ✨


🌸 SYNOPSIS 🌸

LIBPERF_API bool perf_cpu_map__is_empty (const struct perf_cpu_map *map
);

that's it. that's the whole call. LIBPERF_API, returns a bool, takes a const struct perf_cpu_map *. clean. iconic. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • map β€” -- undescribed -- 🫢

ngl the original page just does not describe this one. it says -- undescribed -- and honestly? it ate. we respect the honesty. it's the const struct perf_cpu_map * you're checking. that's what we know, and that's what we're telling you. 😭


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./tools/lib/perf/include/perf/cpumap.h β€” go read it, iykyk πŸ“–

like the whole cpumap friend group is right there, go say hi πŸ’œ


πŸ’€ real talk though bestie: this is the strict one. perf_cpu_map__has_any_cpu_or_is_empty(9) and perf_cpu_map__is_any_cpu_or_is_empty(9) are the chill ones. perf_cpu_map__is_empty says "no values and no special "any CPU"/dummy value" β€” both. don't mix them up, that's how you end up debugging at 3am 😭✨

main character energy from ./tools/lib/perf/include/perf, version Kernel API Manual, dated October 2026 β€” slay, see you in the next one πŸ§šβ€β™€οΈπŸ’–πŸŒˆ

πŸ“¦ where this page comes from