STRUCT EVENT_GROUP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct event_group(9) ✨

okay so you've stumbled into the kernel API manual, bestie β€” this is where we keep the struct event_group, and honestly it's kind of a whole vibe. Let's get into it πŸ’…


🌸 NAME 🌸

struct event_group β€” it's literally a group of events that all share the same feature type ("energy" or "perf") and the same GUID. that's the whole thing. that's the girl πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct event_group {
    const char                      *pfname;
    struct pmt_feature_group        *pfg;
    bool force_off, force_on;
    u32 guid;
    u32 num_rmid;
    size_t mmio_size;
    unsigned int                    num_events;
    struct pmt_event                evts[];
};

no cap, that's the whole layout. every field is a little icon in her own right ⭐


πŸ’– Members πŸ’–

πŸ“ pfname

The PMT feature name of this event group β€” and yes, it's one of exactly two moods: "energy" or "perf". It's used by the boot rdt= option. iykyk πŸ”₯

🧚 pfg

Points at the aggregated telemetry space information that comes back from the intel_pmt_get_regions_by_feature call to the INTEL_PMT_TELEMETRY driver β€” that bundle holds data for all the telemetry regions of type pfname. It's valid if the system actually supports the event group, and NULL otherwise. so like… vibe check it before you dereference it, fr fr πŸ’€

🌈 force_off

True when the "rdt" command line or architecture code disables this event group because there just aren't enough RMIDs to go around. it's not her fault, she's being benched 😭

🌸 force_on

True when the "rdt" command line overrides the disable of this event group. main character energy: she said no, I'm coming back on πŸ‘‘βœ¨

⭐ guid

A unique number per XML description file. one per file, always unique, that's the rule πŸŽ€

πŸ’œ num_rmid

The number of RMIDs supported by this group. Heads up though β€” it can get adjusted downwards if the enumeration from intel_pmt_get_regions_by_feature says fewer RMIDs can be tracked simultaneously. so it's not always the number you first met πŸ™ˆ

🩡 mmio_size

Number of bytes of MMIO registers for this group. that's it, that's the field πŸ’…

πŸŽ€ num_events

The number of events in this group. count 'em πŸ“

πŸ”₯ evts

Array of event descriptors. the actual lineup, the whole squad, right at the end of the struct 🌟


🫢 SEE ALSO 🫢

  • the kernel file ./arch/x86/kernel/cpu/resctrl/intel_aet.c (go read her, she's iconic)
  • struct pmt_event(9) β€” her bestie, linked for a reason πŸ’–

lowkey important reminder: pfg can be NULL when the system doesn't support the event group, and num_rmid may be lowered from what you'd expect. don't be out here assuming things, ngl πŸ’€

and that's the page, bestie πŸŽ‰ this little love letter to struct event_group(9) lives over in ./arch/x86/kernel/cpu/resctrl, dated October 2026 β€” mwah, go read struct pmt_event(9) next, she's waiting πŸŽ€βœ¨πŸ’œ

πŸ“¦ where this page comes from