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
Built amd64 GENERIC + hwpmc.ko, GENERIC without HWPMC_HOOKS, and arm64. Ran tests/sys/pmc on AMD Zen 6 (LBR v2).
Rebase only. No code change.
Rebase-only update to add the Differential Revision trailer; no code change.
@kib, could you please re-accept?