Fixes to instrumentation and quick to interpreter entry.
- Interpreter entry was missing check that a static method is
initialized.
- Fixed instrumentation stack unwinding to not pop off the handler
frame only if it actually exists on the instrumentation stack.
Change-Id: I05a96ea7c0aea4dc6552da0edf485856cd004d85
diff --git a/runtime/stack.cc b/runtime/stack.cc
index 35cd895..9ce65da 100644
--- a/runtime/stack.cc
+++ b/runtime/stack.cc
@@ -309,9 +309,12 @@
instrumentation::InstrumentationStackFrame instrumentation_frame =
GetInstrumentationStackFrame(instrumentation_stack_depth);
instrumentation_stack_depth++;
- if (instrumentation_frame.interpreter_entry_) {
+ if (GetMethod() == Runtime::Current()->GetCalleeSaveMethod(Runtime::kSaveAll)) {
+ // Skip runtime save all callee frames which are used to deliver exceptions.
+ } else if (instrumentation_frame.interpreter_entry_) {
mirror::AbstractMethod* callee = Runtime::Current()->GetCalleeSaveMethod(Runtime::kRefsAndArgs);
- CHECK_EQ(GetMethod(), callee);
+ CHECK_EQ(GetMethod(), callee) << "Expected: " << PrettyMethod(callee) << " Found: "
+ << PrettyMethod(GetMethod());
} else if (instrumentation_frame.method_ != GetMethod()) {
LOG(FATAL) << "Expected: " << PrettyMethod(instrumentation_frame.method_)
<< " Found: " << PrettyMethod(GetMethod());