[compiler-rt] [scudo] Add time of last page release to getStats() (PR #164004)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 21 13:53:37 PDT 2025
================
@@ -1146,17 +1148,24 @@ void SizeClassAllocator64<Config>::getStats(ScopedString *Str, uptr ClassId,
BytesInFreeList - Region->ReleaseInfo.BytesInFreeListAtLastCheckpoint;
}
const uptr TotalChunks = Region->MemMapInfo.AllocatedUser / BlockSize;
+ const u64 CurTimeNs = getMonotonicTime();
+ const u64 DiffSinceLastReleaseNs =
+ CurTimeNs - Region->ReleaseInfo.LastReleaseAtNs;
+ const u64 LastReleaseSecAgo = DiffSinceLastReleaseNs / 1000000000;
+ const u64 LastReleaseMsAgo = (DiffSinceLastReleaseNs % 1000000000) / 1000000;
+
----------------
ChiaHungDuan wrote:
Let's chat this offline for more details
https://github.com/llvm/llvm-project/pull/164004
More information about the llvm-commits
mailing list