[scudo] Use getMonotonicTimeFast for tryLock.
authorChristopher Ferris <cferris@google.com>
Thu, 29 Jun 2023 02:36:29 +0000 (19:36 -0700)
committerChristopher Ferris <cferris@google.com>
Thu, 29 Jun 2023 20:07:08 +0000 (13:07 -0700)
commit36ca9a29025a2f678096e9545fa2ec44e8432592
treefe553c545dab7dc3c4bb9e475f77e2ea3efa5cc2
parentb4ff893877ffe6f80fefd705a9e16a6dcd624851
[scudo] Use getMonotonicTimeFast for tryLock.

In tryLock, the Precedence value is set using the fast time function
now. This should speed up tryLock calls slightly.

This should be okay even though the value is used as a kind of random
value in getTSDAndLockSlow. The fast time call still sets enough bits
to avoid getting the same TSD on every call.

Reviewed By: Chia-hungDuan

Differential Revision: https://reviews.llvm.org/D154039
compiler-rt/lib/scudo/standalone/tsd.h