Page MenuHomeFreeBSD

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

Authored by afscoelho_gmail.com on Jun 18 2026, 7:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Sep 8, 10:07 PM
Unknown Object (File)
Mon, Sep 7, 2:48 PM
Unknown Object (File)
Sun, Sep 6, 12:27 PM
Unknown Object (File)
Wed, Sep 2, 6:14 PM
Unknown Object (File)
Wed, Sep 2, 9:47 AM
Unknown Object (File)
Tue, Sep 1, 1:33 PM
Unknown Object (File)
Fri, Aug 28, 11:55 AM
Unknown Object (File)
Thu, Aug 27, 5:29 PM
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