Page MenuHomeFreeBSD

hwpmc_amd: improve assertions in amd_pcpu_fini()
Needs ReviewPublic

Authored by mhorne on Aug 1 2023, 4:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 19, 8:33 AM
Unknown Object (File)
Wed, Dec 18, 10:37 AM
Unknown Object (File)
Tue, Dec 17, 10:27 PM
Unknown Object (File)
Oct 12 2024, 5:11 PM
Unknown Object (File)
Oct 12 2024, 4:51 PM
Unknown Object (File)
Sep 23 2024, 4:26 PM
Unknown Object (File)
Sep 5 2024, 9:30 PM
Unknown Object (File)
Jul 30 2024, 12:17 AM
Subscribers

Details

Reviewers
jkoshy
gnn
Group Reviewers
pmc
Summary

We don't need to stop the counters here, as the comment already implies.
We can rely on the stop method being called for every active PMC before
finalization and assert this.

Test Plan

Unload hwpmc module with a mixed set of system and process-mode counters running.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 52936
Build 49827: arc lint + arc unit

Event Timeline

mhorne requested review of this revision.Aug 1 2023, 4:24 PM
sys/dev/hwpmc/hwpmc_amd.c
774

We might want to check the actual number of PMCs on the CPU too?

E.g. this loop assumes that AMD CPUs always have PMCs implemented at indices 0..5, but older CPUs only have 4 (per memory).

778

Add symbolic constants here for the '6', '12', and '16'?