Bug 313432
| Summary: | Introduced UnbarrieredMonotonicTime. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Mark Lam <mark.lam> |
| Component: | New Bugs | Assignee: | 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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/175676940>
Mark Lam
Pull request: https://github.com/WebKit/WebKit/pull/63719
EWS
Committed 312153@main (0d7053c9c316): <https://commits.webkit.org/312153@main>
Reviewed commits have been landed. Closing PR #63719 and removing active labels.