summaryrefslogtreecommitdiff
path: root/runtime/quick_exception_handler.cc
diff options
context:
space:
mode:
author Mythri Alle <mythria@google.com> 2022-05-24 14:49:25 +0000
committer Mythri Alle <mythria@google.com> 2022-06-24 08:49:01 +0000
commit90f12677f80169dc3ef919c2067349f94b943e7f (patch)
treec9acb9042b82c2021f15048d847237c016da1c4b /runtime/quick_exception_handler.cc
parenta2c4150bd4487e28348bb9b26b680f8f058d5ce7 (diff)
Don't use instrumentation stubs for native methods in debuggable
Don't install instrumentation stubs for native methods in debuggable runtimes. The GenericJniTrampoline is updated to call method entry / exit hooks. When JITing JNI stubs in debuggable runtimes we also include calls to method entry / exit hooks when required. Bug: 206029744 Test: art/test.py Change-Id: I1d92ddb1d03daed74d88f5c70d38427dc6055446
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_ &&