Page MenuHomeFreeBSD

hwpmc: add regression tests for detaching a live process-mode PMC
ClosedPublic

Authored by netchild on Sun, Jul 19, 12:26 PM.
Tags
Referenced Files
F166128758: D58343.id182212.diff
Tue, Aug 11, 10:52 PM
F166128222: D58343.id182287.diff
Tue, Aug 11, 10:51 PM
Unknown Object (File)
Sun, Aug 9, 6:40 AM
Unknown Object (File)
Sun, Aug 9, 4:01 AM
Unknown Object (File)
Sun, Aug 9, 2:19 AM
Unknown Object (File)
Sat, Aug 8, 11:41 PM
Unknown Object (File)
Sat, Aug 8, 11:06 PM
Unknown Object (File)
Sat, Aug 8, 11:05 PM
Subscribers

Details

Summary

Attach a process-mode counting PMC to the current process, start it,
then detach and release it while it is still loaded on the hardware -
the case that previously leaked the PMC's runcount reference and
wedged pmc_wait_for_pmc_idle() at release. A second case does the same
from a multi-threaded process so the sibling threads' references have
to be drained too.

The tests need an allocatable process-mode counting event and skip
where none is available (hwpmc(4) not loaded, or a VM without a vPMU).

MFC after: 2 weeks
Assisted-by: Claude Code (Fable 5)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable