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
F175464585: D60565.diff
Sun, Oct 11, 1:36 AM
F175437045: D60565.id.diff
Sat, Oct 10, 8:43 PM
F175410220: D60565.id189320.diff
Sat, Oct 10, 4:16 PM
F175409578: D60565.diff
Sat, Oct 10, 4:09 PM
F175399981: D60565.diff
Sat, Oct 10, 2:20 PM
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
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