Don't compile non-prejit a method marked as pre-compiled. am: c46c13c5bb am: 1658c4f6d5
Original change: https://android-review.googlesource.com/c/platform/art/+/2986270
Change-Id: Ide863699a605440290ed6e7fbae788ccb750e046
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc
index 54a56f2..90e9095 100644
--- a/runtime/jit/jit.cc
+++ b/runtime/jit/jit.cc
@@ -163,6 +163,13 @@
compilation_kind = CompilationKind::kBaseline;
}
+ if (method->IsPreCompiled() && !prejit) {
+ VLOG(jit) << "JIT not compiling " << method->PrettyMethod()
+ << " due to method marked pre-compile,"
+ << " and the compilation request isn't for pre-compilation.";
+ return false;
+ }
+
// If we're asked to compile baseline, but we cannot allocate profiling infos,
// change the compilation kind to optimized.
if ((compilation_kind == CompilationKind::kBaseline) &&
@@ -1366,6 +1373,7 @@
if (thread_pool_ == nullptr) {
return;
}
+
// We arrive here after a baseline compiled code has reached its baseline
// hotness threshold. If we're not only using the baseline compiler, enqueue a compilation
// task that will compile optimize the method.