Page MenuHomeFreeBSD

hwpmc: switch in process PMCs on a thread's first run
AcceptedPublic

Authored by afscoelho_gmail.com on Sat, Oct 10, 1:22 AM.
Tags
None
Referenced Files
F175372546: D60565.id189320.diff
Sat, Oct 10, 9:12 AM
F175371595: D60565.diff
Sat, Oct 10, 9:02 AM
F175357022: D60565.id189320.diff
Sat, Oct 10, 6:26 AM
F175345222: D60565.id189320.diff
Sat, Oct 10, 4:14 AM
F175343049: D60565.diff
Sat, Oct 10, 3:43 AM
Subscribers

Details

Reviewers
mhorne
gnn
ali_mashtizadeh.com
kib
markj
Group Reviewers
pmc
Summary

A new thread starts in fork_exit(), not mi_switch(), so its PMCs are
not loaded until its next context switch. Call the switch-in hook
there.

Depends on D60564

Test Plan

Built amd64 GENERIC + hwpmc.ko, GENERIC without HWPMC_HOOKS, and arm64.
Ran tests/sys/pmc on AMD Zen 6 (LBR v2).

Diff Detail

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