diff options
author | 2022-12-19 09:45:12 +0000 | |
---|---|---|
committer | 2022-12-20 13:35:51 +0000 | |
commit | 6db6033433e3234a878f3903e9d535a6a04b0b66 (patch) | |
tree | c74bc8b8f0e835bd01b85ad1e337fa0ea89240e5 | |
parent | 530524e8cba94d01ef9857ec5ab6d14a13923dfb (diff) |
ARM64: Enable implicit suspend checks after CCCR.
After compiled code check rewrite in
https://android-review.googlesource.com/2318778 .
Test: run-gtests.sh
Test: testrunner.py --target --64 --optimizing --jit
Bug: 38383823
Change-Id: I90222c4e4d1fded1ed75a8d76a1e3301fa102fd5
-rw-r--r-- | dex2oat/dex2oat.cc | 4 | ||||
-rw-r--r-- | runtime/oat.h | 4 | ||||
-rw-r--r-- | runtime/runtime.cc | 4 | ||||
-rw-r--r-- | test/2233-checker-remove-loop-suspend-check/src/Main.java | 5 |
4 files changed, 4 insertions, 13 deletions
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc index 1754a68955..f205565433 100644 --- a/dex2oat/dex2oat.cc +++ b/dex2oat/dex2oat.cc @@ -845,9 +845,7 @@ class Dex2Oat final { // Set the compilation target's implicit checks options. switch (compiler_options_->GetInstructionSet()) { case InstructionSet::kArm64: - // TODO: Implicit suspend checks are currently disabled to facilitate search - // for unrelated memory use regressions. Bug: 213757852. - compiler_options_->implicit_suspend_checks_ = false; + compiler_options_->implicit_suspend_checks_ = true; FALLTHROUGH_INTENDED; case InstructionSet::kArm: case InstructionSet::kThumb2: diff --git a/runtime/oat.h b/runtime/oat.h index 20d32cbbb9..3b32e11daa 100644 --- a/runtime/oat.h +++ b/runtime/oat.h @@ -32,8 +32,8 @@ class InstructionSetFeatures; class PACKED(4) OatHeader { public: static constexpr std::array<uint8_t, 4> kOatMagic { { 'o', 'a', 't', '\n' } }; - // Last oat version changed reason: Add a new QuickEntryPoint for a String constructor. - static constexpr std::array<uint8_t, 4> kOatVersion { { '2', '2', '9', '\0' } }; + // Last oat version changed reason: ARM64: Enable implicit suspend checks; compiled code check. + static constexpr std::array<uint8_t, 4> kOatVersion { { '2', '3', '0', '\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 1fc434e727..b74db7d3d4 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -1749,9 +1749,7 @@ bool Runtime::Init(RuntimeArgumentMap&& runtime_options_in) { // Change the implicit checks flags based on runtime architecture. switch (kRuntimeISA) { case InstructionSet::kArm64: - // TODO: Implicit suspend checks are currently disabled to facilitate search - // for unrelated memory use regressions. Bug: 213757852. - implicit_suspend_checks_ = false; + implicit_suspend_checks_ = true; FALLTHROUGH_INTENDED; case InstructionSet::kArm: case InstructionSet::kThumb2: diff --git a/test/2233-checker-remove-loop-suspend-check/src/Main.java b/test/2233-checker-remove-loop-suspend-check/src/Main.java index bea67e7650..c56bd66b3c 100644 --- a/test/2233-checker-remove-loop-suspend-check/src/Main.java +++ b/test/2233-checker-remove-loop-suspend-check/src/Main.java @@ -26,7 +26,6 @@ public class Main { /// CHECK-NEXT: dex_pc:{{.*}} /// CHECK: Goto loop:<<LoopId>> /// CHECK-NEXT: b - /// CHECK-NOT: SuspendCheckSlowPathARM64 public static void $noinline$testRemoveSuspendCheck(int[] a) { for (int i = 0; i < ITERATIONS; i++) { @@ -41,8 +40,6 @@ public class Main { /// CHECK: SuspendCheck loop:<<LoopId:B\d+>> /// CHECK: Goto loop:<<LoopId>> /// CHECK-NEXT: ldr - /// CHECK: SuspendCheckSlowPathARM64 - /// CHECK: SuspendCheckSlowPathARM64 public static void testRemoveSuspendCheckWithCall(int[] a) { for (int i = 0; i < ITERATIONS; i++) { @@ -58,7 +55,6 @@ public class Main { /// CHECK: SuspendCheck loop:<<LoopId:B\d+>> /// CHECK: Goto loop:<<LoopId>> /// CHECK-NEXT: ldr - /// CHECK: SuspendCheckSlowPathARM64 public static void testRemoveSuspendCheckAboveHeuristic(int[] a) { for (int i = 0; i < ITERATIONS * 6; i++) { @@ -73,7 +69,6 @@ public class Main { /// CHECK: SuspendCheck loop:<<LoopId:B\d+>> /// CHECK: Goto loop:<<LoopId>> /// CHECK-NEXT: ldr - /// CHECK: SuspendCheckSlowPathARM64 public static void testRemoveSuspendCheckUnknownCount(int[] a, int n) { for (int i = 0; i < n; i++) { |