perf_cpu_map__is_empty(9)
β¨ 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 π
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__min(9)perf_cpu_map__max(9)
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)andperf_cpu_map__is_any_cpu_or_is_empty(9)are the chill ones.perf_cpu_map__is_emptysays "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
- 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