Add the user and kernel ABI for PMC event groups. A group is a set of
PMCs that the hardware must count together. Each member counts over the
same interval.
User ABI:
- PMCGROUPCREATE, PMCGROUPADD, and PMCGROUPCOMMIT create a group and freeze its configuration.
- PMCGROUPREAD returns member counts and group time data in one call. Userland scales counts from this data.
- PMC_F_GROUP_MUX allows multiplexing when a group does not fit the available hardware counters.
- PMC_F_GROUP_DEFER delays hardware row assignment until group commit.
- Each group supports up to PMC_GROUP_MAX_MEMBERS members.
Bump PMC_VERSION_MINOR to 0x04 for the new operations and flags.
Kernel ABI:
- struct pmc_process gains lists for group anchors, group-target links, and per-thread sampling residuals. A lock protects these lists.
- struct pmc_owner gains a group list and deferred handle pools.
- A deferred handle gives each member a stable user-visible ID before hardware row assignment.
- PMC_HANDLE_DEFERRED_* encodes a slot index and a generation counter. The generation counter separates consecutive uses of a slot.
- struct pmc_classdep gains optional pcd_can_assign_pmc and pcd_get_sched_constraint callbacks. These let each class describe its row constraints.
Co-authored-by: Raghavendra K T <raghavendra.kt@amd.com>
Sponsored by: AMD