[compiler-rt] bd69468 - [scudo] Use fast get time in secondary.

Christopher Ferris via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 28 17:30:04 PDT 2023


Author: Christopher Ferris
Date: 2023-06-28T17:29:47-07:00
New Revision: bd694683eb2c04c36636424325a93bcad1a9c734

URL: https://github.com/llvm/llvm-project/commit/bd694683eb2c04c36636424325a93bcad1a9c734
DIFF: https://github.com/llvm/llvm-project/commit/bd694683eb2c04c36636424325a93bcad1a9c734.diff

LOG: [scudo] Use fast get time in secondary.

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.

Reviewed By: Chia-hungDuan

Differential Revision: https://reviews.llvm.org/D154012

Added: 
    

Modified: 
    compiler-rt/lib/scudo/standalone/secondary.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/scudo/standalone/secondary.h b/compiler-rt/lib/scudo/standalone/secondary.h
index 226616cbda312..5217b7112e92f 100644
--- a/compiler-rt/lib/scudo/standalone/secondary.h
+++ b/compiler-rt/lib/scudo/standalone/secondary.h
@@ -171,7 +171,7 @@ template <typename Config> class MapAllocatorCache {
     bool EntryCached = false;
     bool EmptyCache = false;
     const s32 Interval = atomic_load_relaxed(&ReleaseToOsIntervalMs);
-    const u64 Time = getMonotonicTime();
+    const u64 Time = getMonotonicTimeFast();
     const u32 MaxCount = atomic_load_relaxed(&MaxEntriesCount);
     CachedBlock Entry;
     Entry.CommitBase = H->CommitBase;


        


More information about the llvm-commits mailing list