summaryrefslogtreecommitdiff
path: root/runtime/stack.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/stack.cc')
-rw-r--r--runtime/stack.cc41
1 files changed, 4 insertions, 37 deletions
diff --git a/runtime/stack.cc b/runtime/stack.cc
index 7b70d4165f..d7d5851130 100644
--- a/runtime/stack.cc
+++ b/runtime/stack.cc
@@ -840,17 +840,15 @@ void StackVisitor::WalkStack(bool include_transitions) {
cur_oat_quick_method_header_ = OatQuickMethodHeader::FromCodePointer(code);
} else {
// We are sure we are not running GenericJni here. Though the entry point could still be
- // GenericJnistub. The entry point is usually JITed, AOT or instrumentation stub when
- // instrumentation is enabled. It could be lso a resolution stub if the class isn't
- // visibly initialized yet.
+ // GenericJnistub. The entry point is usually JITed or AOT code. It could be lso a
+ // resolution stub if the class isn't visibly initialized yet.
const void* existing_entry_point = method->GetEntryPointFromQuickCompiledCode();
CHECK(existing_entry_point != nullptr);
Runtime* runtime = Runtime::Current();
ClassLinker* class_linker = runtime->GetClassLinker();
// Check whether we can quickly get the header from the current entrypoint.
if (!class_linker->IsQuickGenericJniStub(existing_entry_point) &&
- !class_linker->IsQuickResolutionStub(existing_entry_point) &&
- existing_entry_point != GetQuickInstrumentationEntryPoint()) {
+ !class_linker->IsQuickResolutionStub(existing_entry_point)) {
cur_oat_quick_method_header_ =
OatQuickMethodHeader::FromEntryPoint(existing_entry_point);
} else {
@@ -917,39 +915,8 @@ void StackVisitor::WalkStack(bool include_transitions) {
// Compute PC for next stack frame from return PC.
size_t frame_size = frame_info.FrameSizeInBytes();
uintptr_t return_pc_addr = GetReturnPcAddr();
- uintptr_t return_pc = *reinterpret_cast<uintptr_t*>(return_pc_addr);
-
- if (UNLIKELY(reinterpret_cast<uintptr_t>(GetQuickInstrumentationExitPc()) == return_pc)) {
- // While profiling, the return pc is restored from the side stack, except when walking
- // the stack for an exception where the side stack will be unwound in VisitFrame.
- const std::map<uintptr_t, instrumentation::InstrumentationStackFrame>&
- instrumentation_stack = *thread_->GetInstrumentationStack();
- auto it = instrumentation_stack.find(return_pc_addr);
- CHECK(it != instrumentation_stack.end());
- const instrumentation::InstrumentationStackFrame& instrumentation_frame = it->second;
- if (GetMethod() ==
- Runtime::Current()->GetCalleeSaveMethod(CalleeSaveType::kSaveAllCalleeSaves)) {
- // Skip runtime save all callee frames which are used to deliver exceptions.
- } else if (instrumentation_frame.interpreter_entry_) {
- ArtMethod* callee =
- Runtime::Current()->GetCalleeSaveMethod(CalleeSaveType::kSaveRefsAndArgs);
- CHECK_EQ(GetMethod(), callee) << "Expected: " << ArtMethod::PrettyMethod(callee)
- << " Found: " << ArtMethod::PrettyMethod(GetMethod());
- } else if (!instrumentation_frame.method_->IsRuntimeMethod()) {
- // Trampolines get replaced with their actual method in the stack,
- // so don't do the check below for runtime methods.
- // Instrumentation generally doesn't distinguish between a method's obsolete and
- // non-obsolete version.
- CHECK_EQ(instrumentation_frame.method_->GetNonObsoleteMethod(),
- GetMethod()->GetNonObsoleteMethod())
- << "Expected: "
- << ArtMethod::PrettyMethod(instrumentation_frame.method_->GetNonObsoleteMethod())
- << " Found: " << ArtMethod::PrettyMethod(GetMethod()->GetNonObsoleteMethod());
- }
- return_pc = instrumentation_frame.return_pc_;
- }
- cur_quick_frame_pc_ = return_pc;
+ cur_quick_frame_pc_ = *reinterpret_cast<uintptr_t*>(return_pc_addr);
uint8_t* next_frame = reinterpret_cast<uint8_t*>(cur_quick_frame_) + frame_size;
cur_quick_frame_ = reinterpret_cast<ArtMethod**>(next_frame);