setup_metric_events(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ setup_metric_events(9) ✨

okay bestie, this page comes from the Kernel API Manual and it's about one function with serious β€œmatchmaker for metric events” energy. No cap, it finds a group of events in metric_evlist that correspond to the IDs from a parsed metric expression. πŸ’…


πŸ’– NAME πŸ’–

setup_metric_events β€” finds a group of events in metric_evlist that correspond to the IDs from a parsed metric expression. That's the whole vibe. 🎯


πŸ› οΈ SYNOPSIS πŸ› οΈ

int setup_metric_events (const char *pmu , struct hashmap *ids , struct
evlist *metric_evlist , struct evsel ***out_metric_events );

πŸŽ€ ARGUMENTS πŸŽ€

  • pmu β€” the PMU for the IDs. That's it, that's the assignment. ✨
  • ids β€” the metric IDs to match. These are the ones we're looking for, bestie. πŸ”
  • metric_evlist β€” the list of perf events. This is the pile we're checking through. πŸ“š
  • out_metric_events β€” holds the created metric events array. It's the output spot, so the new array has somewhere cute to live. 🫢

πŸ‘€ SEE ALSO πŸ‘€

Kernel file ./tools/perf/util/metricgroup.c and its little friend group:


okay that's the page, bestie πŸ’– it comes from the source/version path ./tools/perf/util, dated October 2026, and the function at the center of it all is setup_metric_events(9) 🫢✨

πŸ“¦ where this page comes from