summaryrefslogtreecommitdiff
path: root/runtime/quick_exception_handler.cc
diff options
context:
space:
mode:
author Mythri Alle <mythria@google.com> 2022-07-05 12:44:52 +0000
committer Mythri Alle <mythria@google.com> 2022-07-06 09:03:29 +0000
commit5eb7ad2aac1f0e1690c5f8213528a3cb8b820e16 (patch)
treebb4437360bd53b3ae672c86b885af3a4e79b7099 /runtime/quick_exception_handler.cc
parent3c37682612903a0eae8632274cd5c9bf4de37cc3 (diff)
Reland^2 "Don't use instrumentation stubs for native methods in debuggable"
This reverts commit 1d1d25eea72cf22aed802352a82588d97403f7b6. Reason for revert: Relanding after fix to failures: https://android-review.googlesource.com/c/platform/cts/+/2145979 Bug: 206029744 Change-Id: Id3c7508c86f9aeb0ddfc1c4792ed54f003b88e77
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_ &&