]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Reimplemen FreeBSD/arm64 dtrace_gethrtime() to use the system timer.
authorRobert Watson <rwatson@FreeBSD.org>
Tue, 16 Feb 2021 15:19:05 +0000 (15:19 +0000)
committerRobert Watson <rwatson@FreeBSD.org>
Thu, 25 Feb 2021 21:38:30 +0000 (21:38 +0000)
commitbbcdd9faca55758b228b949f1c1bb41b85e90a8e
treea1adcd07fbafe9ce762710ab7161a6184df12288
parentcf9829d98dc771f9ca0696e493dc3bb635999536
Reimplemen FreeBSD/arm64 dtrace_gethrtime() to use the system timer.
dtrace_gethrtime() is the high-resolution nanosecond timestemp used
for the DTrace 'timestamp' built-in variable.  The new implementation
uses the EL0 cycle counter and frequency registers in ARMv8-A.  This
replaces a previous implementation that relied on an
instrumentation-safe implementation of getnanotime(), which provided
only timer resolution.

Approved by: re (gjb)
Reviewed by: andrew, bsdimp (older version)
Useful comments appreciated: jrtc27, emaste
Differential Revision: https://reviews.freebsd.org/D28723
sys/cddl/dev/dtrace/aarch64/dtrace_subr.c