diff options
author | 2017-01-12 13:25:19 +0000 | |
---|---|---|
committer | 2017-01-16 22:56:56 +0000 | |
commit | 5d37c152f21a0807459c6f53bc25e2d84f56d259 (patch) | |
tree | 7d8cbce0a55f258150a047def70244f79afc866d /runtime/stack_map.cc | |
parent | aa89a4c6fca095904521842c018399f1e3501a45 (diff) |
Put inlined ArtMethod pointer in stack maps.
Currently done for JIT. Can be extended for AOT and inlined boot
image methods.
Also refactor the lookup of a inlined method at runtime to not
rely on the dex cache, but look at the class loader tables.
bug: 30933338
test: test-art-host, test-art-target
Change-Id: I58bd4d763b82ab8ca3023742835ac388671d1794
Diffstat (limited to 'runtime/stack_map.cc')
-rw-r--r-- | runtime/stack_map.cc | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/runtime/stack_map.cc b/runtime/stack_map.cc index a7e7c21a42..9ebf9a7bdd 100644 --- a/runtime/stack_map.cc +++ b/runtime/stack_map.cc @@ -18,8 +18,9 @@ #include <stdint.h> +#include "art_method.h" #include "indenter.h" -#include "invoke_type.h" +#include "scoped_thread_state_change-inl.h" namespace art { @@ -106,7 +107,7 @@ void InlineInfoEncoding::Dump(VariableIndentationOutputStream* vios) const { << "InlineInfoEncoding" << " (method_index_bit_offset=" << static_cast<uint32_t>(kMethodIndexBitOffset) << ", dex_pc_bit_offset=" << static_cast<uint32_t>(dex_pc_bit_offset_) - << ", invoke_type_bit_offset=" << static_cast<uint32_t>(invoke_type_bit_offset_) + << ", extra_data_bit_offset=" << static_cast<uint32_t>(extra_data_bit_offset_) << ", dex_register_map_bit_offset=" << static_cast<uint32_t>(dex_register_map_bit_offset_) << ", total_bit_size=" << static_cast<uint32_t>(total_bit_size_) << ")\n"; @@ -230,12 +231,16 @@ void InlineInfo::Dump(VariableIndentationOutputStream* vios, vios->Stream() << " At depth " << i << std::hex - << " (dex_pc=0x" << GetDexPcAtDepth(inline_info_encoding, i) - << std::dec - << ", method_index=" << GetMethodIndexAtDepth(inline_info_encoding, i) - << ", invoke_type=" << static_cast<InvokeType>(GetInvokeTypeAtDepth(inline_info_encoding, - i)) - << ")\n"; + << " (dex_pc=0x" << GetDexPcAtDepth(inline_info_encoding, i); + if (EncodesArtMethodAtDepth(inline_info_encoding, i)) { + ScopedObjectAccess soa(Thread::Current()); + vios->Stream() << ", method=" << GetArtMethodAtDepth(inline_info_encoding, i)->PrettyMethod(); + } else { + vios->Stream() + << std::dec + << ", method_index=" << GetMethodIndexAtDepth(inline_info_encoding, i); + } + vios->Stream() << ")\n"; if (HasDexRegisterMapAtDepth(inline_info_encoding, i) && (number_of_dex_registers != nullptr)) { CodeInfoEncoding encoding = code_info.ExtractEncoding(); DexRegisterMap dex_register_map = |