parse_ids(9)
π parse_ids(9)
okay so bestie, real talk β this is a Kernel API Manual page for parse_ids, and it's honestly giving "the group chat needs to know how metric IDs turn into events." The man page name is parse_ids and it lives in section 9, iykyk. π
β¨ NAME β¨
parse_ids β Build the event string for the ids and parse them creating an evlist. The encoded metric_ids are decoded.
Like, that's the whole personality: you hand it some encoded IDs, it builds the event string, parses them, and hands you back an evlist with everything decoded. Slay. π
πΈ SYNOPSIS πΈ
int parse_ids (bool metric_no_merge , bool fake_pmu , struct
expr_parse_ctx *ids , const char *modifier , bool group_events , const
bool tool_events[TOOL_PMU__EVENT_MAX] , struct evlist **out_evlist ,
const char *filter_pmu , bool cputype_filter );
Notice the return type: <cyan>int</cyan>. Not void, not vibes β an actual int. β¨
π¦ ARGUMENTS π¦
okay so literally every single one of these matters, no skipping, periodt:
metric_no_mergeβ is metric sharing explicitly disabled. fr fr, it's a yes/no situation.fake_pmuβ use a fake PMU when testing metrics not supported by the current CPU. the "pretend the hardware is cooler than it is" flag πidsβ the event identifiers parsed from a metric. this is thestruct expr_parse_ctx *main character.modifierβ any modifiers added to the events. just aconst char *, doing its little thing.group_eventsβ should events be placed in a weak group. note the word weak β that's the original's word, not me being shady π«Άtool_eventsβ entries settrueif the tool event of index could be present in the overall list of metrics. its type isconst bool tool_events[TOOL_PMU__EVENT_MAX], and yes that array bound isTOOL_PMU__EVENT_MAX, exactly like that, don't touch it.out_evlistβ the created list of events. it's astruct evlist **, so it's the pointer-to-pointer moment. iconic double-star energy βfilter_pmuβ-- undescribed --π the original man page literally left this one blank, so I'm not gonna invent lore for it. that's the whole description. bestie, it's justconst char *filter_pmu.cputype_filterβ-- undescribed --π same situation. the source page gives us nothing but the type,bool cputype_filter, and honestly? we respect the mystery.
not me being honest about the undescribed ones instead of making stuff up. no cap, that's the rule π
π SEE ALSO π
you will be reading these next, bestie, they're all in Kernel file ./tools/perf/util/metricgroup.c:
setup_metric_events(9)resolve_metric(9)__add_metric(9)metric_list_cmp(9)default_metricgroup_cmp(9)metricgroup__add_metric(9)metricgroup__add_metric_list(9)find_tool_events(9)build_combined_expr_ctx(9)
that's the whole friend group, go say hi π
and that's the page!! π this little gem comes from ./tools/perf/util and it's dated October 2026, in the Kernel API Manual β catch you in the next man page, bestie, mwah π§β¨π
π¦ 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