HomeFreeBSD

hwpmc: Skip GLOBAL_CTRL updates on stop_pmc().

Description

hwpmc: Skip GLOBAL_CTRL updates on stop_pmc().

After we wipe PMC configuration, including its local enable bit(s),
we don't really care about its global enable bit. Global enable bits
now may only be cleared by interrupt handler in case of error (sample
buffer overflow). Being set is actually a reset default for them.

This saves one WRMSR per process-scope PMC per context switch, that
is clearly visible in profiles.

MFC after: 1 month

Details

Provenance
mavAuthored on Jun 2 2022, 10:20 PM
Parents
rG04e86ae357b2: busdma_iommu: simplify split logic
Branches
Unknown
Tags
Unknown