Fix interaction between JIT and instrumentation.
- The JIT needs to go through the instrumentation to update
entry points.
- The instrumention needs to know if a method got JITted
to know if needs to deoptimize.
bug:25438583
Change-Id: I4b186a1da9f4a3fb329efd052a774d5502a902a1
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc
index 5f4f472..2125c9a 100644
--- a/compiler/jit/jit_compiler.cc
+++ b/compiler/jit/jit_compiler.cc
@@ -177,7 +177,8 @@
}
// Don't compile the method if we are supposed to be deoptimized.
- if (runtime->GetInstrumentation()->AreAllMethodsDeoptimized()) {
+ instrumentation::Instrumentation* instrumentation = runtime->GetInstrumentation();
+ if (instrumentation->AreAllMethodsDeoptimized() || instrumentation->IsDeoptimized(method)) {
return false;
}