Page MenuHomeFreeBSD

hwpmc/amd: add LBR v2 detection and filter reservation
Needs ReviewPublic

Authored by afscoelho_gmail.com on Sat, Oct 10, 1:22 AM.

Details

Reviewers
mhorne
gnn
ali_mashtizadeh.com
Group Reviewers
pmc
Summary

Detect LBR v2 on PerfMonV2 CPUs. Reserve the per-CPU branch filter
at allocation, and turn branch recording on and off with the PMCs
that use it. PMC_CAP_LBR is not advertised yet.

Depends on D60568

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 77942
Build 74825: arc lint + arc unit