cpu__get_die_id(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cpu__get_die_id(9) β€” the Kernel API Manual, but make it cute

okay so bestie, welcome to the Kernel API Manual, section 9, and today's main character is cpu__get_die_id ✨ no cap, this one's short but she's iconic.


🌸 NAME 🌸

cpu__get_die_id β€” returns the die id, and like… it literally reads it straight from /sys/devices/system/cpu/cpuX/topology/die_id for the CPU you hand it. that's the whole vibe. iykyk πŸ’«


πŸ¦‹ SYNOPSIS πŸ¦‹

int cpu__get_die_id (struct perf_cpu cpu );

that's it. that's the function. copy it exactly, bestie, don't be out here improvising πŸŽ€


πŸŽ€ ARGUMENTS πŸŽ€

  • cpu β€” undescribed πŸ™ˆ

okay so real talk: the docs literally just say undescribed for this one. not me making up lore that isn't there β€” the manual page gives us nothing on cpu beyond its name and its type in the synopsis, so that's all we're claiming. struct perf_cpu cpu, that's the girl. πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

like, go read these next, fr fr β€” they're all hanging out in the kernel file ./tools/perf/util/cpumap.h and they're giving family reunion energy 🫢

every single one, listed, not a crumb left behind πŸ’–

lowkey a warning tho: this page has no extra notes, no exit statuses, no signals, no environment variables, no bugs section β€” so don't let anyone tell you there is. what you see is what you get, and what we got is a die-id getter. periodt. πŸ”₯

🌈 sign-off 🌈

this lil masterpiece lives in ./tools/perf/util, dated October 2026, and it's filed under cpu__get_die_id(9) β€” go off, king πŸ‘‘πŸ’… slay πŸŒΈπŸ¦‹β­

πŸ“¦ where this page comes from