STRUCT PERF_CPU(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct perf_cpu(9) β€” from the Kernel API Manual, bestie

okay so real talk, this one is a tiny little legend and i need you to appreciate it. it's struct perf_cpu, and it's basically a glow-up wrapper around a CPU number. that's it. that's the whole vibe. ✨


πŸŽ€ NAME

struct perf_cpu β€” a wrapper around a CPU number. lowkey iconic for how small it is.


🌸 SYNOPSIS

struct perf_cpu {
    int16_t cpu;
 };
yes bestie, that's the entire struct. no cap. she's compact and she knows it. πŸ’…

πŸ¦‹ Members

  • cpu β€” the CPU number itself. and listen: it's -1 for the "any CPU" / dummy value. so if you see a -1 in there, that's not a glitch, that's her saying "any CPU, idc, whichever" 🫢

πŸ’– Description

okay so here's the tea β€” it's int16_t, which means this whole thing is capped at 32767 CPUs. that's the limit, periodt. πŸ”₯

and widening it to int? not free, babe. that requires a libperf ABI bump, so it's a whole thing. if you want the full scope of that saga, go look at tools/lib/perf/TODO β€” it's all laid out in there. iykyk 😭


πŸ‘‘ SEE ALSO

like, go read the whole cpumap family, they're all main character energy together fr fr 🌈


and that's the page!! source/version live at ./tools/lib/perf/include/perf, dated October 2026 β€” so yes, she's recent, she's fresh, she ate and left no crumbs πŸ“πŸ’œ go forth and map those CPUs bestie 🧚⭐

πŸ“¦ where this page comes from