[compiler-rt] [scudo] Add unmap and eviction stats to Secondary (PR #210465)

Sadaf Ebrahimi via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 12:53:33 PDT 2026


================
@@ -957,6 +961,8 @@ void MapAllocator<Config>::deallocate(const Options &Options, void *Ptr)
     // Note that the `H->MemMap` is stored on the pages managed by itself. Take
     // over the ownership before unmap() so that any operation along with
     // unmap() won't touch inaccessible pages.
+    ScopedLock L(Mutex);
+    EvictedBySizeCount++;
----------------
sadafebrahimi wrote:

The counter for total unmaps was removed. First because unmap() is not a member function of MapAllocator or MapAllocatorCache so adding a counter to it requires a global atomic variable which you said I shouldn't use and second because it's the total of the two stats I added. 

https://github.com/llvm/llvm-project/pull/210465


More information about the llvm-commits mailing list