Page MenuHomeFreeBSD

libpmcstat: parse {a,b,c} brace-list event group syntax
Needs ReviewPublic

Authored by raghavendra.kt_amd.com on Jun 18 2026, 7:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Aug 28, 11:55 AM
Unknown Object (File)
Thu, Aug 27, 5:29 PM
Unknown Object (File)
Sat, Aug 15, 1:55 AM
Unknown Object (File)
Thu, Aug 13, 12:59 AM
Unknown Object (File)
Tue, Aug 11, 5:44 PM
Unknown Object (File)
Mon, Aug 10, 9:39 AM
Unknown Object (File)
Mon, Aug 10, 8:28 AM
Unknown Object (File)
Mon, Aug 10, 7:03 AM
Subscribers
None

Details

Summary

Parse the brace-list event syntax "{a,b,c[,...]}" used by pmcstat -b.
The parser splits on commas at the top level of the brace and leaves
every other delimiter (including event qualifier ":" and pmu-event
sub-options) untouched.

For each comma-separated token a pmcstat_ev is built via the new
helper pmcstat_add_one_event(); the leader is marked with
ev_is_leader=1 and all events in the brace share an ev_groupid.
Single events outside any brace fall through unchanged.

Sponsored by: AMD
Signed-off-by: Raghavendra K T <raghavendra.kt@amd.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 73964
Build 70847: arc lint + arc unit