Don't compile non-prejit a method marked as pre-compiled. am: c46c13c5bb
Original change: https://android-review.googlesource.com/c/platform/art/+/2986270
Change-Id: Icd1091ef9f1c8f727af91c802987fc1b64b8c2c7
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.