[compiler-rt] [scudo] Mark page status in getStats in secondary (PR #67588)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 2 10:13:20 PDT 2023
https://github.com/ChiaHungDuan updated https://github.com/llvm/llvm-project/pull/67588
>From 998cd8acc0a9bd37d33603ba74cc9acd73a66133 Mon Sep 17 00:00:00 2001
From: Chia-hung Duan <chiahungduan at google.com>
Date: Wed, 27 Sep 2023 18:51:32 +0000
Subject: [PATCH 1/2] [scudo] Mark page status in getStats in secondary
Cache entry marked with [R] indicates that the pages have been released
by releaseToOS().
---
compiler-rt/lib/scudo/standalone/secondary.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler-rt/lib/scudo/standalone/secondary.h b/compiler-rt/lib/scudo/standalone/secondary.h
index d0890d1c5e2d3d5..9302c226cba0a26 100644
--- a/compiler-rt/lib/scudo/standalone/secondary.h
+++ b/compiler-rt/lib/scudo/standalone/secondary.h
@@ -174,9 +174,9 @@ template <typename Config> class MapAllocatorCache {
if (!Entry.isValid())
continue;
Str->append("StartBlockAddress: 0x%zx, EndBlockAddress: 0x%zx, "
- "BlockSize: %zu\n",
+ "BlockSize: %zu %s\n",
Entry.CommitBase, Entry.CommitBase + Entry.CommitSize,
- Entry.CommitSize);
+ Entry.CommitSize, Entry.Time == 0 ? "[R]" : " ");
}
}
>From c4467505594a4e5d4b4ca6ad15ad3483b4fa7503 Mon Sep 17 00:00:00 2001
From: Chia-hung Duan <chiahungduan at google.com>
Date: Mon, 2 Oct 2023 17:12:51 +0000
Subject: [PATCH 2/2] fixup! [scudo] Mark page status in getStats in secondary
---
compiler-rt/lib/scudo/standalone/secondary.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler-rt/lib/scudo/standalone/secondary.h b/compiler-rt/lib/scudo/standalone/secondary.h
index 9302c226cba0a26..c89e6a95f5a68a4 100644
--- a/compiler-rt/lib/scudo/standalone/secondary.h
+++ b/compiler-rt/lib/scudo/standalone/secondary.h
@@ -176,7 +176,7 @@ template <typename Config> class MapAllocatorCache {
Str->append("StartBlockAddress: 0x%zx, EndBlockAddress: 0x%zx, "
"BlockSize: %zu %s\n",
Entry.CommitBase, Entry.CommitBase + Entry.CommitSize,
- Entry.CommitSize, Entry.Time == 0 ? "[R]" : " ");
+ Entry.CommitSize, Entry.Time == 0 ? "[R]" : "");
}
}
More information about the llvm-commits
mailing list