summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2023-06-09 11:07:46 +0100
committerNicolas Geoffray <ngeoffray@google.com>2023-06-09 13:56:19 +0000
commit894a8d2d40d3c6bdafe91445a78c6e75475aa569 (patch)
tree950d0e80e3b2615e49729bd671d13fec7d55c18a
parent14992992a44cc2262ba9cf9d2d9011c0cd5c7d8c (diff)
downloadart-894a8d2d40d3c6bdafe91445a78c6e75475aa569.tar.gz
Disable startup dex cache arrays.
They seem to still have issues. Bug: 283632504 Bug: 261719949 (cherry picked from https://android-review.googlesource.com/q/commit:71afbaa0ebced5578ceea1255bbda790f81a8abb) Merged-In: Ia1dc5668e1837a0a1037f6d0cc08eb6c18cc6e01 Change-Id: Ia1dc5668e1837a0a1037f6d0cc08eb6c18cc6e01
-rw-r--r--runtime/mirror/dex_cache.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/mirror/dex_cache.cc b/runtime/mirror/dex_cache.cc
index d724315a19..d3f474e588 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 @@ ObjPtr<ClassLoader> DexCache::GetClassLoader() {
}
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.