parse_ids(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 the struct expr_parse_ctx * main character.
  • modifier β€” any modifiers added to the events. just a const 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 set true if the tool event of index could be present in the overall list of metrics. its type is const bool tool_events[TOOL_PMU__EVENT_MAX], and yes that array bound is TOOL_PMU__EVENT_MAX, exactly like that, don't touch it.
  • out_evlist β€” the created list of events. it's a struct 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 just const 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:

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