cpu__get_die_id(9)
π 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 π«Ά
cpu_map__is_dummy(9)cpu__get_node(9)cpu__get_socket_id(9)cpu__get_cluster_id(9)cpu__get_core_id(9)cpu_aggr_map__empty_new(9)cpu_aggr_map__new(9)aggr_cpu_id__socket(9)aggr_cpu_id__die(9)aggr_cpu_id__cluster(9)aggr_cpu_id__core(9)aggr_cpu_id__node(9)aggr_cpu_id__global(9)
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
- 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