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/runtime/debugger.cc b/runtime/debugger.cc
index e523fbb..a25d003 100644
--- a/runtime/debugger.cc
+++ b/runtime/debugger.cc
@@ -3284,9 +3284,9 @@
return DeoptimizationRequest::kFullDeoptimization;
} else {
// We don't need to deoptimize if the method has not been compiled.
- ClassLinker* const class_linker = Runtime::Current()->GetClassLinker();
- const bool is_compiled = class_linker->GetOatMethodQuickCodeFor(m) != nullptr;
+ const bool is_compiled = m->HasAnyCompiledCode();
if (is_compiled) {
+ ClassLinker* const class_linker = Runtime::Current()->GetClassLinker();
// If the method may be called through its direct code pointer (without loading
// its updated entrypoint), we need full deoptimization to not miss the breakpoint.
if (class_linker->MayBeCalledWithDirectCodePointer(m)) {