diff options
author | 2024-08-29 01:59:02 +0100 | |
---|---|---|
committer | 2024-08-29 01:59:02 +0100 | |
commit | 3394ab00a058f4bb5ec227b8aacbb6cc98c36dae (patch) | |
tree | 67bfe524cca1b1e216fcdc59a7f068829e32d3be | |
parent | d888982146eca205a23bc872ede947e057538edd (diff) |
Add some debugging code for b/361916648.
Bug: 361916648
Test: test.py
Change-Id: I451d186a13fb3754d2e16948183c22c765f544b0
-rw-r--r-- | runtime/stack.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/runtime/stack.cc b/runtime/stack.cc index bcc1da7d60..5670b12415 100644 --- a/runtime/stack.cc +++ b/runtime/stack.cc @@ -23,6 +23,7 @@ #include "art_method-inl.h" #include "base/callee_save_type.h" #include "base/hex_dump.h" +#include "base/indenter.h" #include "base/pointer_size.h" #include "base/utils.h" #include "dex/dex_file_types.h" @@ -130,7 +131,19 @@ uint32_t StackVisitor::GetDexPc(bool abort_on_failure) const { GetCurrentQuickFrame(), cur_quick_frame_pc_, abort_on_failure); } else if (cur_oat_quick_method_header_->IsOptimized()) { StackMap* stack_map = GetCurrentStackMap(); - CHECK(stack_map->IsValid()) << "StackMap not found for " << std::hex << cur_quick_frame_pc_; + if (!stack_map->IsValid()) { + // Debugging code for b/361916648. + CodeInfo code_info(cur_oat_quick_method_header_); + std::stringstream os; + VariableIndentationOutputStream vios(&os); + code_info.Dump(&vios, /* code_offset= */ 0u, /* verbose= */ true, kRuntimeISA); + LOG(FATAL) << os.str() << '\n' + << "StackMap not found for " + << std::hex << cur_quick_frame_pc_ << " in " + << GetMethod()->PrettyMethod() + << " @" << std::hex + << reinterpret_cast<uintptr_t>(cur_oat_quick_method_header_->GetCode()); + } return stack_map->GetDexPc(); } else { DCHECK(cur_oat_quick_method_header_->IsNterpMethodHeader()); |