[all-commits] [llvm/llvm-project] 36ca9a: [scudo] Use getMonotonicTimeFast for tryLock.

Christopher Ferris via All-commits all-commits at lists.llvm.org
Thu Jun 29 13:07:29 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 36ca9a29025a2f678096e9545fa2ec44e8432592
      https://github.com/llvm/llvm-project/commit/36ca9a29025a2f678096e9545fa2ec44e8432592
  Author: Christopher Ferris <cferris at google.com>
  Date:   2023-06-29 (Thu, 29 Jun 2023)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/tsd.h

  Log Message:
  -----------
  [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




More information about the All-commits mailing list