Revert "Fix instrumentation frame check with inlining"
Times out on some run-tests.
Bug: 22519499
This reverts commit 3079e28b00accd19aa1153929fb00497d00956d9.
Change-Id: I4c612a5af20e4481eb9865f90abd429f4a40ce57
diff --git a/runtime/stack.cc b/runtime/stack.cc
index 840c0cb..1d21a64 100644
--- a/runtime/stack.cc
+++ b/runtime/stack.cc
@@ -891,7 +891,6 @@
CHECK_EQ(cur_depth_, 0U);
bool exit_stubs_installed = Runtime::Current()->GetInstrumentation()->AreExitStubsInstalled();
uint32_t instrumentation_stack_depth = 0;
- size_t inlined_frames_count = 0;
for (const ManagedStack* current_fragment = thread_->GetManagedStack();
current_fragment != nullptr; current_fragment = current_fragment->GetLink()) {
@@ -923,7 +922,6 @@
return;
}
cur_depth_++;
- inlined_frames_count++;
}
}
}
@@ -954,19 +952,16 @@
ArtMethod* callee = Runtime::Current()->GetCalleeSaveMethod(Runtime::kRefsAndArgs);
CHECK_EQ(GetMethod(), callee) << "Expected: " << PrettyMethod(callee) << " Found: "
<< PrettyMethod(GetMethod());
- } else {
- CHECK_EQ(instrumentation_frame.method_, GetMethod())
- << "Expected: " << PrettyMethod(instrumentation_frame.method_)
- << " Found: " << PrettyMethod(GetMethod());
+ } else if (instrumentation_frame.method_ != GetMethod()) {
+ LOG(FATAL) << "Expected: " << PrettyMethod(instrumentation_frame.method_)
+ << " Found: " << PrettyMethod(GetMethod());
}
if (num_frames_ != 0) {
// Check agreement of frame Ids only if num_frames_ is computed to avoid infinite
// recursion.
- size_t frame_id = instrumentation::Instrumentation::ComputeFrameId(
- thread_,
- cur_depth_,
- inlined_frames_count);
- CHECK_EQ(instrumentation_frame.frame_id_, frame_id);
+ CHECK(instrumentation_frame.frame_id_ == GetFrameId())
+ << "Expected: " << instrumentation_frame.frame_id_
+ << " Found: " << GetFrameId();
}
return_pc = instrumentation_frame.return_pc_;
}