ARM64: Disable implicit suspend checks.
Implicit suspend checks caused some unexpected regressions
that we need to investigate. In the meantime, disable this
feature.
Test: Rely on Presubmit tests.
Bug: 209235730
Bug: 213121241
Bug: 38383823
Change-Id: Ic313875cf6c9c65b5882ec8f75caf8c8e3e54b4c
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index 0a7cd8b..81db30d 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -833,7 +833,8 @@
// Set the compilation target's implicit checks options.
switch (compiler_options_->GetInstructionSet()) {
case InstructionSet::kArm64:
- compiler_options_->implicit_suspend_checks_ = true;
+ // TODO: Investigate implicit suspend check regressions. Bug: 209235730, 213121241.
+ compiler_options_->implicit_suspend_checks_ = false;
FALLTHROUGH_INTENDED;
case InstructionSet::kArm:
case InstructionSet::kThumb2:
diff --git a/runtime/oat.h b/runtime/oat.h
index c2ad8c0..e44187e 100644
--- a/runtime/oat.h
+++ b/runtime/oat.h
@@ -32,8 +32,8 @@
class PACKED(4) OatHeader {
public:
static constexpr std::array<uint8_t, 4> kOatMagic { { 'o', 'a', 't', '\n' } };
- // Last oat version changed reason: JNI: Inline fast-path for `JniMethodEnd()`.
- static constexpr std::array<uint8_t, 4> kOatVersion { { '2', '1', '7', '\0' } };
+ // Last oat version changed reason: ARM64: Disable implicit suspend checks.
+ static constexpr std::array<uint8_t, 4> kOatVersion { { '2', '1', '8', '\0' } };
static constexpr const char* kDex2OatCmdLineKey = "dex2oat-cmdline";
static constexpr const char* kDebuggableKey = "debuggable";
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 4b154db..64970e1 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1669,7 +1669,8 @@
// Change the implicit checks flags based on runtime architecture.
switch (kRuntimeISA) {
case InstructionSet::kArm64:
- implicit_suspend_checks_ = true;
+ // TODO: Investigate implicit suspend check regressions. Bug: 209235730, 213121241.
+ implicit_suspend_checks_ = false;
FALLTHROUGH_INTENDED;
case InstructionSet::kArm:
case InstructionSet::kThumb2: