diff options
Diffstat (limited to 'runtime/stack_map.h')
-rw-r--r-- | runtime/stack_map.h | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/runtime/stack_map.h b/runtime/stack_map.h index 909aaa5576..8bfae7c39f 100644 --- a/runtime/stack_map.h +++ b/runtime/stack_map.h @@ -28,7 +28,6 @@ #include "base/memory_region.h" #include "dex/dex_file_types.h" #include "dex_register_location.h" -#include "method_info.h" #include "quick/quick_method_frame_info.h" namespace art { @@ -164,7 +163,6 @@ class StackMap : public BitTableAccessor<8> { void Dump(VariableIndentationOutputStream* vios, const CodeInfo& code_info, - const MethodInfo& method_info, uint32_t code_offset, InstructionSet instruction_set) const; }; @@ -188,10 +186,6 @@ class InlineInfo : public BitTableAccessor<6> { static constexpr uint32_t kLast = -1; static constexpr uint32_t kMore = 0; - uint32_t GetMethodIndex(const MethodInfo& method_info) const { - return method_info.GetMethodIndex(GetMethodInfoIndex()); - } - bool EncodesArtMethod() const { return HasArtMethodLo(); } @@ -204,8 +198,7 @@ class InlineInfo : public BitTableAccessor<6> { void Dump(VariableIndentationOutputStream* vios, const CodeInfo& info, - const StackMap& stack_map, - const MethodInfo& method_info) const; + const StackMap& stack_map) const; }; class MaskInfo : public BitTableAccessor<1> { @@ -262,6 +255,14 @@ class RegisterMask : public BitTableAccessor<2> { } }; +// Method indices are not very dedup friendly. +// Separating them greatly improves dedup efficiency of the other tables. +class MethodInfo : public BitTableAccessor<1> { + public: + BIT_TABLE_HEADER() + BIT_TABLE_COLUMN(0, MethodIndex) +}; + /** * Wrapper around all compiler information collected for a method. * See the Decode method at the end for the precise binary format. @@ -329,6 +330,10 @@ class CodeInfo { return stack_maps_.NumRows(); } + uint32_t GetMethodIndexOf(InlineInfo inline_info) const { + return method_infos_.GetRow(inline_info.GetMethodInfoIndex()).GetMethodIndex(); + } + ALWAYS_INLINE DexRegisterMap GetDexRegisterMapOf(StackMap stack_map) const { if (stack_map.HasDexRegisterMap()) { DexRegisterMap map(number_of_dex_registers_, DexRegisterLocation::Invalid()); @@ -405,8 +410,7 @@ class CodeInfo { void Dump(VariableIndentationOutputStream* vios, uint32_t code_offset, bool verbose, - InstructionSet instruction_set, - const MethodInfo& method_info) const; + InstructionSet instruction_set) const; // Accumulate code info size statistics into the given Stats tree. void AddSizeStats(/*out*/ Stats* parent) const; @@ -446,6 +450,7 @@ class CodeInfo { uint32_t number_of_dex_registers_; BitTable<StackMap> stack_maps_; BitTable<InlineInfo> inline_infos_; + BitTable<MethodInfo> method_infos_; BitTable<RegisterMask> register_masks_; BitTable<MaskInfo> stack_masks_; BitTable<MaskInfo> dex_register_masks_; |