When I moved the primary to use the faster get time syscall, I missed
the secondary use. Now fix the secondary to use this function too.
Details
Details
- Reviewers
- Chia-hungDuan 
- Commits
- rGbd694683eb2c: [scudo] Use fast get time in secondary.
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Just did a quick glance in the use of getMonotonicTime(). There is one place I think we may want to evaluate switching to getMonotonicTimeFast() too. Which is in tsd.h
inline bool tryLock() NO_THREAD_SAFETY_ANALYSIS {
  if (Mutex.tryLock()) {
    atomic_store_relaxed(&Precedence, 0);
    return true;
  }
  if (atomic_load_relaxed(&Precedence) == 0)
    atomic_store_relaxed(
        &Precedence,
        static_cast<uptr>(getMonotonicTime() >> FIRST_32_SECOND_64(16, 0)));
  return false;
}https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/scudo/standalone/tsd.h#L46
(In timing.h, it may be also a candidate, but it's minor)
It's not necessary to be included in this change anyway, LGTM!