Page MenuHomeFreeBSD

hwpmc: multiplex system-mode groups per CPU
Needs ReviewPublic

Authored by afscoelho_gmail.com on Sep 3 2026, 9:32 PM.
Tags
None
Referenced Files
F176379442: D59359.id188093.diff
Sun, Oct 18, 9:32 AM
Unknown Object (File)
Wed, Oct 14, 9:35 AM
Unknown Object (File)
Wed, Oct 14, 5:22 AM
Unknown Object (File)
Wed, Oct 14, 3:13 AM
Unknown Object (File)
Mon, Oct 12, 1:53 PM
Unknown Object (File)
Mon, Oct 12, 8:26 AM
Unknown Object (File)
Fri, Oct 9, 3:04 PM
Unknown Object (File)
Fri, Oct 9, 1:58 PM
Subscribers

Details

Summary

Add grouping and multiplexing for system-mode (PMC_MODE_SC) groups. A
system group counts on one CPU and has no target process, so it needs a
per-CPU rotation list and a per-CPU rotation thread instead of the
per-process ones that a virtual group uses.

pmu_sys_schedule_in checks the owner's allocation permission, assigns
the rows, and starts every member. If a member fails to start, it stops
the members that already started and releases the rows, so a row does
not stay running unpublished. pmu_sys_schedule_out stops the rows,
drains the samples of the group, and releases the rows.

pmu_syscpu_rotate_one runs one rotation tick for a CPU. Group release
now calls pmu_sys_group_pre_release first, so that a system group leaves
the per-CPU list before the rest of the release runs.

Sponsored by: AMD

Signed-off-by: Andre Silva <andasilv@amd.com>

Diff Detail

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

Event Timeline

Rebase on main (D60141 and D60185 are committed). No change.