summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hans Boehm <hboehm@google.com> 2022-02-09 18:49:18 -0800
committer Hans Boehm <hboehm@google.com> 2022-02-11 00:38:32 +0000
commit11226b171fb3017d3e7c6b1b0a35e7abe013cf2b (patch)
tree32b2ea828fa0795a09c4ee3ab02ef839a6f3041e
parenta5795548ebbe9e9142e569b5acd69232deddabca (diff)
Quadruple monitor table size in debug build
The monitor table in Android debug builds was intentionally very small, so that we could test expansion to more than a single level. This has become problematic since debug builds are increasingly used to run frameworks tests. As a compromise, increase the size by a factor of 4. This is still a factor of 64 smaller than production builds. Bug: 217607468 Test: Build boot AOSP, Treehugger Change-Id: I54116bac2b9e6743bac0feccdde19648351ae04d
-rw-r--r--runtime/monitor_pool.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/monitor_pool.h b/runtime/monitor_pool.h
index 76ce59f39f..24390f34f7 100644
--- a/runtime/monitor_pool.h
+++ b/runtime/monitor_pool.h
@@ -200,7 +200,7 @@ class MonitorPool {
// should be large enough that we don't run out. We run out of address bits if it's > 512.
// Currently we set it a bit smaller, to save half a page per process. We make it tiny in
// debug builds to catch growth errors. The only value we really expect to tune.
- static constexpr size_t kInitialChunkStorage = kIsDebugBuild ? 1U : 256U;
+ static constexpr size_t kInitialChunkStorage = kIsDebugBuild ? 4U : 256U;
static_assert(IsPowerOfTwo(kInitialChunkStorage), "kInitialChunkStorage must be power of 2");
// The number of lists, each containing pointers to storage chunks.
static constexpr size_t kMaxChunkLists = 8; // Dictated by 3 bit index. Don't increase above 8.