perf_stat__..._metricgroup(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

perf_stat__print_shadow_stats_metricgroup β€” the little function that prints out the metrics associated with the evsel πŸ’–

okay so bestie, here's the vibe check on how the printing actually goes down:

  • In the non-default case, all the metrics associated with the evsel get printed. All of them. The whole buffet. πŸ“
  • In the default mode, only the metrics from the same metricgroup get printed β€” plus the name of the metricgroup itself. That's it, that's the whole output. modest. lowkey humble. πŸŽ€
  • Wanna print the metrics from the next metricgroup (if there even is one)? πŸ‘€ Then invoke the function with the corresponding metric_expr. that's the move, no cap.

✨ SYNOPSIS ✨

void * perf_stat__print_shadow_stats_metricgroup (struct
       perf_stat_config *config , struct evsel *evsel , int aggr_idx , int *num
       , void *from , struct perf_stat_output_ctx *out );

literally just vibes and six arguments, slay πŸ’…


πŸ’… ARGUMENTS πŸ’…

okay so the manpage is being super mysterious about these, and honestly? iconic of it. every single one is marked -- undescribed -- in the source, so I'm not gonna sit here and invent lore that isn't there πŸ™ˆ

  • config β€” -- undescribed -- 😭
  • evsel β€” -- undescribed -- 😭
  • aggr_idx β€” -- undescribed -- 😭
  • num β€” -- undescribed -- 😭
  • from β€” -- undescribed -- 😭
  • out β€” -- undescribed -- 😭
bestie I'm as curious as you are, but the docs said "no thoughts, head empty" and I respect the boundary 🫢. the names of the parameters are right there though β€” go read the code for the real tea, iykyk πŸ’€

🌈 SEE ALSO 🌈

  • Kernel file ./tools/perf/util/stat-shadow.c β€” the actual source file this whole thing lives in, main character energy ⭐
  • perf_stat__skip_metric_event(9) β€” its sibling, also worth a peek πŸ‘‘

that's the whole page, bestie, you ate that πŸ’–βœ¨πŸ¦‹

this gem comes to you straight out of <bold>./tools/perf/util</bold>, and the little timestamp on it says October 2026 β€” yes, the future, we're ahead of schedule, periodt πŸ‘‘

πŸ“¦ where this page comes from