Page MenuHomeFreeBSD

pmcstat(8): add -b batch-grouping flag
Needs ReviewPublic

Authored by afscoelho_gmail.com on Jun 18 2026, 7:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Sep 15, 2:01 PM
Unknown Object (File)
Sun, Sep 13, 2:05 AM
Unknown Object (File)
Mon, Sep 7, 7:27 PM
Unknown Object (File)
Sat, Sep 5, 10:35 AM
Unknown Object (File)
Sat, Sep 5, 3:57 AM
Unknown Object (File)
Thu, Sep 3, 10:51 PM
Unknown Object (File)
Thu, Sep 3, 4:09 AM
Unknown Object (File)
Wed, Sep 2, 3:06 PM
Subscribers

Details

Summary

Add the -b / --batch-grouping flag and the {a,b,c} brace syntax to
pmcstat(8). For brace expressions in -p / -P / -s / -S the tool now:

  1. creates a kernel group via pmc_group_create();
  2. for each event token allocates a deferred pmcid with pmc_allocate_group() and registers it via pmc_group_add(), marking the first one as the leader;
  3. commits the group with pmc_group_commit() before any pmc_attach.

A brace containing a single event falls back to the legacy
pmc_allocate path so that "{a}" stays equivalent to "a".

The man page documents the syntax, the multiplex semantics enabled by
PMC_F_GROUP_MUX, and the all-or-none commit guarantee.

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 76448
Build 73331: arc lint + arc unit

Event Timeline

afscoelho_gmail.com updated this revision to Diff 185751.

Update to the rebuilt PerfMonV2 grouping and multiplexing stack.

Can you please update the docs in this commit?

usr.sbin/pmcstat/pmcstat.8
45 ↗(On Diff #179982)

Can you use it like this or does the -b have to come first?