Disable startup dex cache arrays.
They seem to still have issues.
Bug: 283632504
Bug: 261719949
Change-Id: Ia1dc5668e1837a0a1037f6d0cc08eb6c18cc6e01
diff --git a/runtime/mirror/dex_cache.cc b/runtime/mirror/dex_cache.cc
index d724315..d3f474e 100644
--- a/runtime/mirror/dex_cache.cc
+++ b/runtime/mirror/dex_cache.cc
@@ -36,6 +36,10 @@
namespace art {
namespace mirror {
+// Whether to allocate full dex cache arrays during startup. Currently disabled
+// while debugging b/283632504.
+static constexpr bool kEnableFullArraysAtStartup = false;
+
void DexCache::Initialize(const DexFile* dex_file, ObjPtr<ClassLoader> class_loader) {
DCHECK(GetDexFile() == nullptr);
DCHECK(GetStrings() == nullptr);
@@ -161,6 +165,9 @@
}
bool DexCache::ShouldAllocateFullArrayAtStartup() {
+ if (!kEnableFullArraysAtStartup) {
+ return false;
+ }
Runtime* runtime = Runtime::Current();
if (runtime->IsAotCompiler()) {
// To save on memory in dex2oat, we don't allocate full arrays by default.