msm_perfcntr_group_idx(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… msm_perfcntr_group_idx(9) β€” like, the whole page, bestie

okay so welcome to msm_perfcntr_group_idx(9), straight out of the Kernel API Manual ✨ this one's short but she matters, so pay attention 🫢


🌸 NAME 🌸

msm_perfcntr_group_idx β€” maps the idx of a perfcntr group to the group_idx πŸŽ€ (yes the two names are lowkey the same thing, no I don't make the rules)


✨ SYNOPSIS ✨

uint32_t msm_perfcntr_group_idx (const struct msm_perfcntr_stream
*stream , uint32_t n );

like, she takes a stream and a number and hands you back a uint32_t, periodt πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • stream β€” the global perfcntr stream πŸ‘‘ the one and only, main character energy
  • n β€” the requested group_idx πŸ“ like, the number you're asking about

πŸ’– DESCRIPTION πŸ’–

so here's the tea β˜• the PERFCNTR_CONFIG ioctl requested N counters/countables per perfcntr group, right? but the order of the groups is not required to match the order they're defined in the perfcntr tables. and bestie, that table order is not stable/UABI β€” only the group names are UABI πŸ”₯ so don't you dare go trusting the positions, iykyk πŸ™ˆ

BUT (and this is the important part, ngl) the order the samples get returned in the stream should match the order they were requested in the PERFCNTR_CONFIG ioctl. so somebody's gotta do the remapping, and that somebody is this helper 🧚✨ she handles the order remapping, no cap.

she returns an index into gpu->perfcntr_groups[] and perfcntrs->groups[] β€” both, together, iconic πŸ’œ


⭐ SEE ALSO ⭐


πŸ’€ reminder bestie: the perfcntr table order is not stable/UABI. only the group names are. don't build anything on the ordering, I'm begging πŸ™

and that's the whole vibe 🌈 this lil page came from ./drivers/gpu/drm/msm β€” Kernel API Manual β€” dated October 2026 πŸŽ€ slay, go remap some groups, you got this πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from