Make classes visibly initialized faster.
Reduce the batch size from 32 to 16 and the trigger count
from 1024 to 128.
This may help system health micro-benchmarks (b/138601570)
but I'm unable to run the forrest tests locally to verify.
Bug: 138601570
Bug: 36692143
Test: m
Change-Id: I4d938ddbd284ebe624d146eca9ad59ceefeba4d4
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index a79b87d..33016a2 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -312,7 +312,7 @@
}
}
- static constexpr size_t kMaxClasses = 32;
+ static constexpr size_t kMaxClasses = 16;
ClassLinker* const class_linker_;
size_t num_classes_;
diff --git a/runtime/thread.h b/runtime/thread.h
index dbb811b..5db089f 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -1482,7 +1482,7 @@
// Stores the jit sensitive thread (which for now is the UI thread).
static Thread* jit_sensitive_thread_;
- static constexpr uint32_t kMakeVisiblyInitializedCounterTriggerCount = 1024;
+ static constexpr uint32_t kMakeVisiblyInitializedCounterTriggerCount = 128;
/***********************************************************************************************/
// Thread local storage. Fields are grouped by size to enable 32 <-> 64 searching to account for