Check for pop frames independent of method entry listeners
Earlier we were checking for pop frame requests only when there are
method entry listeners. These are two independent features and there is
no reason to expect method entry listener for pop frame requests. This
CL fixes by checking for pop frame requests independent of having method
entry listeners.
Test: art/test.py
Change-Id: Ia91446c9306730b50235051bad05010e58771049
diff --git a/runtime/interpreter/interpreter.cc b/runtime/interpreter/interpreter.cc
index ad674a7..ffe1dc0 100644
--- a/runtime/interpreter/interpreter.cc
+++ b/runtime/interpreter/interpreter.cc
@@ -273,7 +273,7 @@
ArtMethod *method = shadow_frame.GetMethod();
// If we can continue in JIT and have JITed code available execute JITed code.
- if (!stay_in_interpreter && !self->IsForceInterpreter()) {
+ if (!stay_in_interpreter && !self->IsForceInterpreter() && !shadow_frame.GetForcePopFrame()) {
jit::Jit* jit = Runtime::Current()->GetJit();
if (jit != nullptr) {
jit->MethodEntered(self, shadow_frame.GetMethod());
@@ -296,7 +296,7 @@
}
instrumentation::Instrumentation* instrumentation = Runtime::Current()->GetInstrumentation();
- if (UNLIKELY(instrumentation->HasMethodEntryListeners())) {
+ if (UNLIKELY(instrumentation->HasMethodEntryListeners() || shadow_frame.GetForcePopFrame())) {
instrumentation->MethodEnterEvent(self, method);
if (UNLIKELY(shadow_frame.GetForcePopFrame())) {
// The caller will retry this invoke or ignore the result. Just return immediately without