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
F176467194: D60565.id189844.diff
Mon, Oct 19, 2:26 AM
F176448108: D60565.diff
Sun, Oct 18, 11:02 PM
F176425352: D60565.diff
Sun, Oct 18, 7:57 PM
F176373034: D60565.id189844.diff
Sun, Oct 18, 8:17 AM
Unknown Object (File)
Sat, Oct 17, 3:55 PM
Unknown Object (File)
Sat, Oct 17, 4:10 AM
Unknown Object (File)
Sat, Oct 17, 1:40 AM
Unknown Object (File)
Fri, Oct 16, 10:16 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 78196
Build 75079: arc lint + arc unit