Disable the use of inline caches in AOT mode
Until we figure out why we see the crashes in b/36371709.
Test: m test-art-host
Bug: 36371709
Change-Id: If47f917373d26825f0b8121bb8b5e0b77ff83c01
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 8a813bd..62f5114 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -55,6 +55,9 @@
// Avoid inlining within a huge method due to memory pressure.
static constexpr size_t kMaximumCodeUnitSize = 4096;
+// Controls the use of inline caches in AOT mode.
+static constexpr bool kUseAOTInlineCaches = false;
+
void HInliner::Run() {
const CompilerOptions& compiler_options = compiler_driver_->GetCompilerOptions();
if ((compiler_options.GetInlineDepthLimit() == 0)
@@ -376,6 +379,10 @@
HInvoke* invoke_instruction,
ArtMethod* resolved_method)
REQUIRES_SHARED(Locks::mutator_lock_) {
+ if (Runtime::Current()->IsAotCompiler() && !kUseAOTInlineCaches) {
+ return false;
+ }
+
StackHandleScope<1> hs(Thread::Current());
Handle<mirror::ObjectArray<mirror::Class>> inline_cache;
InlineCacheType inline_cache_type = Runtime::Current()->IsAotCompiler()
diff --git a/test/Android.run-test.mk b/test/Android.run-test.mk
index 0301621..9a3bd88 100644
--- a/test/Android.run-test.mk
+++ b/test/Android.run-test.mk
@@ -229,12 +229,14 @@
# they are rewritten. These tests use a broken class loader that tries to
# register a dex file that's already registered with a different loader.
# b/34193123
+# Disable 638-checker-inline-caches until b/36371709 is fixed.
ART_TEST_RUN_TEST_SKIP += \
115-native-bridge \
153-reference-stress \
080-oom-fragmentation \
497-inlining-and-class-loader \
- 542-unresolved-access-check
+ 542-unresolved-access-check \
+ 638-checker-inline-caches
ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
$(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
diff --git a/test/knownfailures.json b/test/knownfailures.json
index f37029b..6f796da 100644
--- a/test/knownfailures.json
+++ b/test/knownfailures.json
@@ -351,4 +351,10 @@
"bug": "http://b/36377828",
"variant": "interp-ac"
}
+ {
+ "tests": "638-checker-inline-caches",
+ "description": ["Disable 638-checker-inline-caches temporarily until a fix",
+ "arrives."],
+ "bug": "http://b/36371709"
+ },
]