summaryrefslogtreecommitdiff
path: root/runtime/quick_exception_handler.cc
diff options
context:
space:
mode:
author Mythri Alle <mythria@google.com> 2022-06-27 11:09:49 +0000
committer Mythri Alle <mythria@google.com> 2022-07-04 07:36:40 +0000
commit6fb0acc14459a856c35b642e3368aff853259260 (patch)
tree0483c30969b98e5bfc75c7eed8ab4cef4f44a993 /runtime/quick_exception_handler.cc
parent74e0b53a425ca3643db7dd43a39b57075853b21d (diff)
Reland "Don't use instrumentation stubs for native methods in debuggable"
This reverts commit 5c9b55aa95295a287abd86f1e7fbe98c3f35ffd6. Reason for revert: Relanding with fixes for failure Fixes: 1. Arm64 needs to use 64-bit registers 2. We cannot deoptimize directly from GenericJniEndTrampoline since we only have a refs and args frame. So call the method exit hooks from art_quick_generic_jni_trampoline. Change-Id: If1f08eca69626f60f42f10205b482a3764610846
Diffstat (limited to 'runtime/quick_exception_handler.cc')
-rw-r--r--runtime/quick_exception_handler.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc
index 8adc3b3e49..40a1c16905 100644
--- a/runtime/quick_exception_handler.cc
+++ b/runtime/quick_exception_handler.cc
@@ -399,9 +399,10 @@ class DeoptimizeStackVisitor final : public StackVisitor {
return true;
} else if (method->IsNative()) {
// If we return from JNI with a pending exception and want to deoptimize, we need to skip
- // the native method.
- // The top method is a runtime method, the native method comes next.
- CHECK_EQ(GetFrameDepth(), 1U);
+ // the native method. The top method is a runtime method, the native method comes next.
+ // We also deoptimize due to method instrumentation reasons from method entry / exit
+ // callbacks. In these cases native method is at the top of stack.
+ CHECK((GetFrameDepth() == 1U) || (GetFrameDepth() == 0U));
callee_method_ = method;
return true;
} else if (!single_frame_deopt_ &&