HomeFreeBSD

Modify lockstat_nsecs() to just return unless lockstat probes are actually

Description

Modify lockstat_nsecs() to just return unless lockstat probes are actually
enabled. The cost of a timecounter read can be quite significant, and the
problem became more apparent after r284297, since that change resulted in
a call to lockstat_nsecs() for each acquisition of an rwlock read lock.

PR: 201642
Reviewed by: avg
Tested by: Jason Unovitch
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D3073

Details

Provenance
markjAuthored on
Reviewer
avg
Differential Revision
D3073: lockstat: only fetch the uptime if probes are enabled
Parents
rS285662: Merge driver for PMC Sierra's range of SAS/SATA HBAs.
Branches
Unknown
Tags
Unknown