Bug 313432

Summary: Introduced UnbarrieredMonotonicTime.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: New BugsAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Mark Lam
Reported 2026-04-27 07:46:46 PDT
UnbarrieredMonotonicTime has the timer resolution of MonotonicTime, but is optimized for speed, and does not do use any instruction barriers. As a result, a read of UnbarrieredMonotonicTime may be re-ordered by the CPU around adjacent instructions. This may reduce fidelity in accuracy for use cases like some profiling uses. However, for clients like the Opportunistic Task Scheduler, where we may want to sample the time more frequently, and are only concerned about expired time, such slight loss of fidelity in accuracy is inconsequential. At present, UnbarrieredMonotonicTime only implemented with these new semantics for ARM64 + OS(DARWIN) only, and will fall back to MonotonicTime for all other ports. Since UnbarrieredMonotonicTime is faster than ApproximateTime (whose sole purpose is speed), and has higher fidelity than ApproximateTime, we'll have ApproximateTime build on UnbarrieredMonotonicTime for the ARM64 + OS(DARWIN) port.
Attachments
Radar WebKit Bug Importer
Comment 1 2026-04-27 07:47:10 PDT
Mark Lam
Comment 2 2026-04-27 10:53:42 PDT
EWS
Comment 3 2026-04-27 15:35:52 PDT
Committed 312153@main (0d7053c9c316): <https://commits.webkit.org/312153@main> Reviewed commits have been landed. Closing PR #63719 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.