Fix deoptimization check in method exit hook
In method exit hooks called from JITed code we check if the frame
needs to be deoptimized. When getting this information from stack walk
we should ignore any runtime calls otherwise we may get incorrect
information and not deoptimize even when necessary
Test: art/test.py / testrunner.py -t 2001-virtual-structural-multithread
Change-Id: I1f50055058d4f31684f429b76422c89d1940a152
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
index 67522c1..027bda5 100644
--- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
@@ -2639,7 +2639,7 @@
// Deoptimize if the caller needs to continue execution in the interpreter. Do nothing if we get
// back to an upcall.
- NthCallerVisitor visitor(self, 1, true);
+ NthCallerVisitor visitor(self, 1, /*include_runtime_and_upcalls=*/false);
visitor.WalkStack(true);
deoptimize = instr->ShouldDeoptimizeMethod(self, visitor);