Page MenuHomeFreeBSD

pmcstat: set initial counter value to zero
ClosedPublic

Authored by mhorne on Apr 21 2021, 4:43 PM.

Details

Summary

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.

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.