default_metricgroup_cmp(9)
π default_metricgroup_cmp(9) β like, the Kernel API Manual edition π
okay so bestie, gather round, because this one is a tiny function with a very specific job and honestly? it ate. β¨
πΈ NAME πΈ
default_metricgroup_cmp β the icon that implements the complex key for the Default metricgroup, and the way it works is that it first sorts by default_metricgroup_name, then by metric_name. two-pass sorting, main character energy only. π
π¦ SYNOPSIS π¦
int default_metricgroup_cmp (void *priv , const struct list_head *l ,
const struct list_head *r );
yes she takes three args and yes she returns an int. no notes. π
π ARGUMENTS π
privβ ngl bestie, this one is undescribed. the manpage literally says "-- undescribed --" and we are not out here making things up. πlβ also undescribed. mysterious. lowkey giving "we'll never know." πrβ undescribed too, fr fr. three for three, an absolute vibe check fail but we love her anyway. π
no cap, all three arguments are listed as undescribed in the original β so don't come for me, I'm just the messenger π«Ά
β SEE ALSO β
the whole friend group, in the order they were introduced, periodt:
- the kernel file
./tools/perf/util/metricgroup.c setup_metric_events(9)resolve_metric(9)__add_metric(9)metric_list_cmp(9)metricgroup__add_metric(9)metricgroup__add_metric_list(9)find_tool_events(9)build_combined_expr_ctx(9)parse_ids(9)
and that's the whole page, babes π§ this little cutie lives in ./tools/perf/util and the version stamp is dated October 2026 β so yeah, she's from the future and still sorting metricgroups correctly. iconic behavior, honestly. ππ
stay slay, read your manpages, and remember: sort by default_metricgroup_name first. always. πβ¨
π¦ 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