cpu__get_core_id(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– cpu__get_core_id β€” a whole manpage, but make it bestie πŸ’–

okay so this is cpu__get_core_id(9) from the Kernel API Manual β€” yes, the kernel has lore and yes we're gonna read it together 🫢


✨ NAME ✨

cpu__get_core_id β€” returns the core id, read straight out of /sys/devices/system/cpu/cpuX/topology/core_id, for the CPU you hand it. that's it. that's the whole job. and honestly? iconic for that 🌸


πŸŽ€ SYNOPSIS πŸŽ€

int cpu__get_core_id (struct perf_cpu cpu );

it takes one struct perf_cpu and gives you back an int. simple. clean. no cap πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • cpu β€” literally listed as -- undescribed -- in the source docs 😭 so like… the manual itself is being mysterious about it. it's the struct perf_cpu from the synopsis. we know that. the docs just chose not to elaborate and honestly, respect the confidence πŸ’€
ngl, bestie, if you need to know more about cpu you're gonna have to go read the header, because this page is giving absolutely nothing on that front πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, fr fr β€” all from the kernel file ./tools/perf/util/cpumap.h:

like okayyy topology family reunion 🌈 every single one of them is on the list, we don't gatekeep here ✨


and that's the whole page, bestie πŸ’– shoutout to ./tools/perf/util for shipping this from October 2026 β€” the source, the version, the date, all of it, mwah πŸ“ go read your topology ids. slay. periodt πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from