cpu_aggr_map__new(9)
๐ cpu_aggr_map__new(9) โ like, the Kernel API Manual page you actually wanna read ๐
okay so bestie, gather round, because this one is genuinely a little baddie. This is a page from the Kernel API Manual (yes, that's the manual name, we're being fancy today โจ), and it's all about building one specific cute little struct. Let's get into it ๐ฆ
๐ธ NAME ๐ธ
cpu_aggr_map__new โ makes you a cpu_aggr_map with an aggr_cpu_id for every single cpu in cpus. no cap, every one ๐
the aggr_cpu_id gets created using 'get_id', and you can pass a data value to it if you want (or don't, live your truth). and then โ this is the iconic part โ the cpu_aggr_map comes out sorted, with duplicate values removed. like, it literally declutters itself. main character energy fr fr ๐
โจ SYNOPSIS โจ
struct cpu_aggr_map * cpu_aggr_map__new (const struct perf_cpu_map *cpus
, aggr_cpu_id_get_t get_id , void *data , bool needs_sort );
that's the whole signature, copy it exactly, don't freestyle it ๐
๐ซถ ARGUMENTS ๐ซถ
so about the argumentsโฆ the original page is a little shy here. every single one of them is marked -- undescribed --, and ngl i'm not gonna sit here and invent lore for you. that's not the vibe. facts only, periodt ๐
cpusโ-- undescribed --get_idโ-- undescribed --dataโ-- undescribed --needs_sortโ-- undescribed --
lowkey tragic that the docs ghosted us on these ๐ญ but hey, i'm not about to make stuff up. if the page doesn't say it, i don't say it. that's the rule, and we respect the rule ๐ง
๐ SEE ALSO ๐
the kernel file lives at ./tools/perf/util/cpumap.h and it's giving friend group, because here's everyone else you might wanna meet:
cpu_map__is_dummy(9)cpu__get_node(9)cpu__get_socket_id(9)cpu__get_die_id(9)cpu__get_cluster_id(9)cpu__get_core_id(9)cpu_aggr_map__empty_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)
like, the whole topo squad is here โ socket, die, cluster, core, node, global โ and cpu_aggr_map__empty_new(9) for when you want the map but, y'know, empty ๐
โญ the cute sign-off โญ
this lil masterpiece lives in ./tools/perf/util, and the version/date stamp on it says October 2026 ๐ so yeah, when you're reading this in October 2026, know that future-you is thriving and so is this manpage.
stay sorted, stay deduplicated, and go build some maps bestie ๐ฆ๐โจ
๐ฆ 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