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, May 2, 9:05 AM
Unknown Object (File)
Thu, May 2, 9:05 AM
Unknown Object (File)
Thu, May 2, 2:44 AM
Unknown Object (File)
Mon, Apr 22, 5:39 PM
Unknown Object (File)
Feb 2 2024, 3:39 AM
Unknown Object (File)
Dec 20 2023, 4:35 AM
Unknown Object (File)
Dec 11 2023, 6:28 AM
Unknown Object (File)
Nov 15 2023, 8:40 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'?