HomeFreeBSD

pmcstat: set initial counter value to zero

Description

pmcstat: set initial counter value to zero

For an infrequent event, pmcstat may report (u_long)-1 for CPUs where
the counter was never incremented. Just set this to zero, instead.

ev->ev_count is passed as the 'count' argument to pmc_allocate(3), but
this wasn't always the case.

Reviewed by: gnn
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29887

Details

Provenance
mhorneAuthored on Apr 21 2021, 8:28 PM
Reviewer
gnn
Differential Revision
D29887: pmcstat: set initial counter value to zero
Parents
rG50f6c1399700: pmc_allocate(3): document the count argument
Branches
Unknown
Tags
Unknown