| Nicolas Geoffray | 004c230 | 2015-03-20 10:06:38 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #include "stack_map.h" |
| 18 | |
| Nicolas Geoffray | 896f8f7 | 2015-03-30 15:44:25 +0100 | [diff] [blame] | 19 | #include <stdint.h> |
| 20 | |
| Nicolas Geoffray | 5d37c15 | 2017-01-12 13:25:19 +0000 | [diff] [blame] | 21 | #include "art_method.h" |
| David Sehr | 9c4a015 | 2018-04-05 12:23:54 -0700 | [diff] [blame] | 22 | #include "base/indenter.h" |
| Nicolas Geoffray | 5d37c15 | 2017-01-12 13:25:19 +0000 | [diff] [blame] | 23 | #include "scoped_thread_state_change-inl.h" |
| Roland Levillain | 0396ed7 | 2015-05-27 15:12:19 +0100 | [diff] [blame] | 24 | |
| Nicolas Geoffray | 004c230 | 2015-03-20 10:06:38 +0000 | [diff] [blame] | 25 | namespace art { |
| 26 | |
| Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 27 | constexpr size_t DexRegisterLocationCatalog::kNoLocationEntryIndex; |
| Nicolas Geoffray | 004c230 | 2015-03-20 10:06:38 +0000 | [diff] [blame] | 28 | |
| David Srbecky | 7dc1178 | 2016-02-25 13:23:56 +0000 | [diff] [blame] | 29 | std::ostream& operator<<(std::ostream& stream, const DexRegisterLocation::Kind& kind) { |
| 30 | using Kind = DexRegisterLocation::Kind; |
| 31 | switch (kind) { |
| 32 | case Kind::kNone: |
| 33 | return stream << "none"; |
| 34 | case Kind::kInStack: |
| 35 | return stream << "in stack"; |
| 36 | case Kind::kInRegister: |
| 37 | return stream << "in register"; |
| 38 | case Kind::kInRegisterHigh: |
| 39 | return stream << "in register high"; |
| 40 | case Kind::kInFpuRegister: |
| 41 | return stream << "in fpu register"; |
| 42 | case Kind::kInFpuRegisterHigh: |
| 43 | return stream << "in fpu register high"; |
| 44 | case Kind::kConstant: |
| 45 | return stream << "as constant"; |
| 46 | case Kind::kInStackLargeOffset: |
| 47 | return stream << "in stack (large offset)"; |
| 48 | case Kind::kConstantLargeValue: |
| 49 | return stream << "as constant (large value)"; |
| 50 | } |
| 51 | return stream << "Kind<" << static_cast<uint32_t>(kind) << ">"; |
| 52 | } |
| 53 | |
| Roland Levillain | 1c1da43 | 2015-07-16 11:54:44 +0100 | [diff] [blame] | 54 | DexRegisterLocation::Kind DexRegisterMap::GetLocationInternalKind( |
| David Srbecky | 21d45b4 | 2018-05-30 06:35:05 +0100 | [diff] [blame^] | 55 | uint16_t dex_register_number) const { |
| Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 56 | DexRegisterLocationCatalog dex_register_location_catalog = |
| David Srbecky | 21d45b4 | 2018-05-30 06:35:05 +0100 | [diff] [blame^] | 57 | code_info_.GetDexRegisterLocationCatalog(); |
| Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 58 | size_t location_catalog_entry_index = GetLocationCatalogEntryIndex( |
| 59 | dex_register_number, |
| David Srbecky | 21d45b4 | 2018-05-30 06:35:05 +0100 | [diff] [blame^] | 60 | code_info_.GetNumberOfLocationCatalogEntries()); |
| Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 61 | return dex_register_location_catalog.GetLocationInternalKind(location_catalog_entry_index); |
| 62 | } |
| 63 | |
| David Srbecky | 21d45b4 | 2018-05-30 06:35:05 +0100 | [diff] [blame^] | 64 | DexRegisterLocation DexRegisterMap::GetDexRegisterLocation(uint16_t dex_register_number) const { |
| Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 65 | DexRegisterLocationCatalog dex_register_location_catalog = |
| David Srbecky | 21d45b4 | 2018-05-30 06:35:05 +0100 | [diff] [blame^] | 66 | code_info_.GetDexRegisterLocationCatalog(); |
| Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 67 | size_t location_catalog_entry_index = GetLocationCatalogEntryIndex( |
| 68 | dex_register_number, |
| David Srbecky | 21d45b4 | 2018-05-30 06:35:05 +0100 | [diff] [blame^] | 69 | code_info_.GetNumberOfLocationCatalogEntries()); |
| Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 70 | return dex_register_location_catalog.GetDexRegisterLocation(location_catalog_entry_index); |
| 71 | } |
| 72 | |
| Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 73 | static void DumpRegisterMapping(std::ostream& os, |
| 74 | size_t dex_register_num, |
| 75 | DexRegisterLocation location, |
| 76 | const std::string& prefix = "v", |
| 77 | const std::string& suffix = "") { |
| Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 78 | os << prefix << dex_register_num << ": " |
| David Srbecky | 7dc1178 | 2016-02-25 13:23:56 +0000 | [diff] [blame] | 79 | << location.GetInternalKind() |
| Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 80 | << " (" << location.GetValue() << ")" << suffix << '\n'; |
| Roland Levillain | 0396ed7 | 2015-05-27 15:12:19 +0100 | [diff] [blame] | 81 | } |
| 82 | |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 83 | void StackMap::DumpEncoding(const BitTable<6>& table, |
| 84 | VariableIndentationOutputStream* vios) { |
| David Srbecky | 09ed098 | 2016-02-12 21:58:43 +0000 | [diff] [blame] | 85 | vios->Stream() |
| 86 | << "StackMapEncoding" |
| David Srbecky | d02b23f | 2018-05-29 23:27:22 +0100 | [diff] [blame] | 87 | << " (PackedNativePcBits=" << table.NumColumnBits(kPackedNativePc) |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 88 | << ", DexPcBits=" << table.NumColumnBits(kDexPc) |
| 89 | << ", DexRegisterMapOffsetBits=" << table.NumColumnBits(kDexRegisterMapOffset) |
| 90 | << ", InlineInfoIndexBits=" << table.NumColumnBits(kInlineInfoIndex) |
| 91 | << ", RegisterMaskIndexBits=" << table.NumColumnBits(kRegisterMaskIndex) |
| 92 | << ", StackMaskIndexBits=" << table.NumColumnBits(kStackMaskIndex) |
| David Srbecky | 09ed098 | 2016-02-12 21:58:43 +0000 | [diff] [blame] | 93 | << ")\n"; |
| 94 | } |
| 95 | |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 96 | void InlineInfo::DumpEncoding(const BitTable<5>& table, |
| 97 | VariableIndentationOutputStream* vios) { |
| David Srbecky | 61b28a1 | 2016-02-25 21:55:03 +0000 | [diff] [blame] | 98 | vios->Stream() |
| 99 | << "InlineInfoEncoding" |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 100 | << " (IsLastBits=" << table.NumColumnBits(kIsLast) |
| 101 | << ", MethodIndexIdxBits=" << table.NumColumnBits(kMethodIndexIdx) |
| 102 | << ", DexPcBits=" << table.NumColumnBits(kDexPc) |
| 103 | << ", ExtraDataBits=" << table.NumColumnBits(kExtraData) |
| 104 | << ", DexRegisterMapOffsetBits=" << table.NumColumnBits(kDexRegisterMapOffset) |
| David Srbecky | 61b28a1 | 2016-02-25 21:55:03 +0000 | [diff] [blame] | 105 | << ")\n"; |
| 106 | } |
| 107 | |
| Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 108 | void CodeInfo::Dump(VariableIndentationOutputStream* vios, |
| Roland Levillain | f2650d1 | 2015-05-28 14:53:28 +0100 | [diff] [blame] | 109 | uint32_t code_offset, |
| Roland Levillain | 0396ed7 | 2015-05-27 15:12:19 +0100 | [diff] [blame] | 110 | uint16_t number_of_dex_registers, |
| Mathieu Chartier | a2f526f | 2017-01-19 14:48:48 -0800 | [diff] [blame] | 111 | bool dump_stack_maps, |
| Mathieu Chartier | cbcedbf | 2017-03-12 22:24:50 -0700 | [diff] [blame] | 112 | InstructionSet instruction_set, |
| 113 | const MethodInfo& method_info) const { |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 114 | size_t number_of_stack_maps = GetNumberOfStackMaps(); |
| Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 115 | vios->Stream() |
| David Srbecky | 09ed098 | 2016-02-12 21:58:43 +0000 | [diff] [blame] | 116 | << "Optimized CodeInfo (number_of_dex_registers=" << number_of_dex_registers |
| Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 117 | << ", number_of_stack_maps=" << number_of_stack_maps |
| Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 118 | << ")\n"; |
| 119 | ScopedIndentation indent1(vios); |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 120 | StackMap::DumpEncoding(stack_maps_, vios); |
| 121 | if (HasInlineInfo()) { |
| 122 | InlineInfo::DumpEncoding(inline_infos_, vios); |
| David Srbecky | 61b28a1 | 2016-02-25 21:55:03 +0000 | [diff] [blame] | 123 | } |
| Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 124 | // Display the Dex register location catalog. |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 125 | GetDexRegisterLocationCatalog().Dump(vios, *this); |
| Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 126 | // Display stack maps along with (live) Dex register maps. |
| Roland Levillain | 0396ed7 | 2015-05-27 15:12:19 +0100 | [diff] [blame] | 127 | if (dump_stack_maps) { |
| 128 | for (size_t i = 0; i < number_of_stack_maps; ++i) { |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 129 | StackMap stack_map = GetStackMapAt(i); |
| Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 130 | stack_map.Dump(vios, |
| David Brazdil | f677ebf | 2015-05-29 16:29:43 +0100 | [diff] [blame] | 131 | *this, |
| Mathieu Chartier | cbcedbf | 2017-03-12 22:24:50 -0700 | [diff] [blame] | 132 | method_info, |
| David Brazdil | f677ebf | 2015-05-29 16:29:43 +0100 | [diff] [blame] | 133 | code_offset, |
| 134 | number_of_dex_registers, |
| Mathieu Chartier | a2f526f | 2017-01-19 14:48:48 -0800 | [diff] [blame] | 135 | instruction_set, |
| David Brazdil | f677ebf | 2015-05-29 16:29:43 +0100 | [diff] [blame] | 136 | " " + std::to_string(i)); |
| Nicolas Geoffray | 004c230 | 2015-03-20 10:06:38 +0000 | [diff] [blame] | 137 | } |
| 138 | } |
| Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 139 | // TODO: Dump the stack map's inline information? We need to know more from the caller: |
| 140 | // we need to know the number of dex registers for each inlined method. |
| 141 | } |
| 142 | |
| Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 143 | void DexRegisterLocationCatalog::Dump(VariableIndentationOutputStream* vios, |
| 144 | const CodeInfo& code_info) { |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 145 | size_t number_of_location_catalog_entries = code_info.GetNumberOfLocationCatalogEntries(); |
| 146 | size_t location_catalog_size_in_bytes = code_info.GetDexRegisterLocationCatalogSize(); |
| Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 147 | vios->Stream() |
| Roland Levillain | 0396ed7 | 2015-05-27 15:12:19 +0100 | [diff] [blame] | 148 | << "DexRegisterLocationCatalog (number_of_entries=" << number_of_location_catalog_entries |
| 149 | << ", size_in_bytes=" << location_catalog_size_in_bytes << ")\n"; |
| 150 | for (size_t i = 0; i < number_of_location_catalog_entries; ++i) { |
| 151 | DexRegisterLocation location = GetDexRegisterLocation(i); |
| Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 152 | ScopedIndentation indent1(vios); |
| 153 | DumpRegisterMapping(vios->Stream(), i, location, "entry "); |
| Roland Levillain | 0396ed7 | 2015-05-27 15:12:19 +0100 | [diff] [blame] | 154 | } |
| 155 | } |
| 156 | |
| David Srbecky | 21d45b4 | 2018-05-30 06:35:05 +0100 | [diff] [blame^] | 157 | void DexRegisterMap::Dump(VariableIndentationOutputStream* vios) const { |
| 158 | size_t number_of_location_catalog_entries = code_info_.GetNumberOfLocationCatalogEntries(); |
| Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 159 | // TODO: Display the bit mask of live Dex registers. |
| David Srbecky | 21d45b4 | 2018-05-30 06:35:05 +0100 | [diff] [blame^] | 160 | for (size_t j = 0; j < number_of_dex_registers_; ++j) { |
| Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 161 | if (IsDexRegisterLive(j)) { |
| 162 | size_t location_catalog_entry_index = GetLocationCatalogEntryIndex( |
| David Srbecky | 21d45b4 | 2018-05-30 06:35:05 +0100 | [diff] [blame^] | 163 | j, |
| 164 | number_of_location_catalog_entries); |
| 165 | DexRegisterLocation location = GetDexRegisterLocation(j); |
| Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 166 | ScopedIndentation indent1(vios); |
| Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 167 | DumpRegisterMapping( |
| Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 168 | vios->Stream(), j, location, "v", |
| Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 169 | "\t[entry " + std::to_string(static_cast<int>(location_catalog_entry_index)) + "]"); |
| 170 | } |
| 171 | } |
| 172 | } |
| 173 | |
| Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 174 | void StackMap::Dump(VariableIndentationOutputStream* vios, |
| Roland Levillain | f2650d1 | 2015-05-28 14:53:28 +0100 | [diff] [blame] | 175 | const CodeInfo& code_info, |
| Mathieu Chartier | cbcedbf | 2017-03-12 22:24:50 -0700 | [diff] [blame] | 176 | const MethodInfo& method_info, |
| Roland Levillain | f2650d1 | 2015-05-28 14:53:28 +0100 | [diff] [blame] | 177 | uint32_t code_offset, |
| 178 | uint16_t number_of_dex_registers, |
| Mathieu Chartier | a2f526f | 2017-01-19 14:48:48 -0800 | [diff] [blame] | 179 | InstructionSet instruction_set, |
| Roland Levillain | f2650d1 | 2015-05-28 14:53:28 +0100 | [diff] [blame] | 180 | const std::string& header_suffix) const { |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 181 | const uint32_t pc_offset = GetNativePcOffset(instruction_set); |
| Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 182 | vios->Stream() |
| 183 | << "StackMap" << header_suffix |
| 184 | << std::hex |
| Mathieu Chartier | a2f526f | 2017-01-19 14:48:48 -0800 | [diff] [blame] | 185 | << " [native_pc=0x" << code_offset + pc_offset << "]" |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 186 | << " (dex_pc=0x" << GetDexPc() |
| Mathieu Chartier | a2f526f | 2017-01-19 14:48:48 -0800 | [diff] [blame] | 187 | << ", native_pc_offset=0x" << pc_offset |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 188 | << ", dex_register_map_offset=0x" << GetDexRegisterMapOffset() |
| 189 | << ", inline_info_offset=0x" << GetInlineInfoIndex() |
| 190 | << ", register_mask=0x" << code_info.GetRegisterMaskOf(*this) |
| Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 191 | << std::dec |
| 192 | << ", stack_mask=0b"; |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 193 | BitMemoryRegion stack_mask = code_info.GetStackMaskOf(*this); |
| David Srbecky | 4b59d10 | 2018-05-29 21:46:10 +0000 | [diff] [blame] | 194 | for (size_t i = 0, e = stack_mask.size_in_bits(); i < e; ++i) { |
| David Srbecky | 45aa598 | 2016-03-18 02:15:09 +0000 | [diff] [blame] | 195 | vios->Stream() << stack_mask.LoadBit(e - i - 1); |
| Roland Levillain | f2650d1 | 2015-05-28 14:53:28 +0100 | [diff] [blame] | 196 | } |
| Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 197 | vios->Stream() << ")\n"; |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 198 | if (HasDexRegisterMap()) { |
| David Brazdil | f677ebf | 2015-05-29 16:29:43 +0100 | [diff] [blame] | 199 | DexRegisterMap dex_register_map = code_info.GetDexRegisterMapOf( |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 200 | *this, number_of_dex_registers); |
| David Srbecky | 21d45b4 | 2018-05-30 06:35:05 +0100 | [diff] [blame^] | 201 | dex_register_map.Dump(vios); |
| Roland Levillain | f2650d1 | 2015-05-28 14:53:28 +0100 | [diff] [blame] | 202 | } |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 203 | if (HasInlineInfo()) { |
| 204 | InlineInfo inline_info = code_info.GetInlineInfoOf(*this); |
| Nicolas Geoffray | 12bdb72 | 2015-06-17 09:44:43 +0100 | [diff] [blame] | 205 | // We do not know the length of the dex register maps of inlined frames |
| 206 | // at this level, so we just pass null to `InlineInfo::Dump` to tell |
| 207 | // it not to look at these maps. |
| Mathieu Chartier | cbcedbf | 2017-03-12 22:24:50 -0700 | [diff] [blame] | 208 | inline_info.Dump(vios, code_info, method_info, nullptr); |
| Nicolas Geoffray | 12bdb72 | 2015-06-17 09:44:43 +0100 | [diff] [blame] | 209 | } |
| Roland Levillain | f2650d1 | 2015-05-28 14:53:28 +0100 | [diff] [blame] | 210 | } |
| 211 | |
| Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 212 | void InlineInfo::Dump(VariableIndentationOutputStream* vios, |
| Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 213 | const CodeInfo& code_info, |
| Mathieu Chartier | cbcedbf | 2017-03-12 22:24:50 -0700 | [diff] [blame] | 214 | const MethodInfo& method_info, |
| Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 215 | uint16_t number_of_dex_registers[]) const { |
| David Srbecky | 61b28a1 | 2016-02-25 21:55:03 +0000 | [diff] [blame] | 216 | vios->Stream() << "InlineInfo with depth " |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 217 | << static_cast<uint32_t>(GetDepth()) |
| David Srbecky | 61b28a1 | 2016-02-25 21:55:03 +0000 | [diff] [blame] | 218 | << "\n"; |
| Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 219 | |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 220 | for (size_t i = 0; i < GetDepth(); ++i) { |
| Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 221 | vios->Stream() |
| 222 | << " At depth " << i |
| 223 | << std::hex |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 224 | << " (dex_pc=0x" << GetDexPcAtDepth(i); |
| 225 | if (EncodesArtMethodAtDepth(i)) { |
| Nicolas Geoffray | 5d37c15 | 2017-01-12 13:25:19 +0000 | [diff] [blame] | 226 | ScopedObjectAccess soa(Thread::Current()); |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 227 | vios->Stream() << ", method=" << GetArtMethodAtDepth(i)->PrettyMethod(); |
| Nicolas Geoffray | 5d37c15 | 2017-01-12 13:25:19 +0000 | [diff] [blame] | 228 | } else { |
| 229 | vios->Stream() |
| 230 | << std::dec |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 231 | << ", method_index=" << GetMethodIndexAtDepth(method_info, i); |
| Nicolas Geoffray | 5d37c15 | 2017-01-12 13:25:19 +0000 | [diff] [blame] | 232 | } |
| 233 | vios->Stream() << ")\n"; |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 234 | if (HasDexRegisterMapAtDepth(i) && (number_of_dex_registers != nullptr)) { |
| Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 235 | DexRegisterMap dex_register_map = |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 236 | code_info.GetDexRegisterMapAtDepth(i, *this, number_of_dex_registers[i]); |
| Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 237 | ScopedIndentation indent1(vios); |
| David Srbecky | 21d45b4 | 2018-05-30 06:35:05 +0100 | [diff] [blame^] | 238 | dex_register_map.Dump(vios); |
| Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 239 | } |
| 240 | } |
| Nicolas Geoffray | 004c230 | 2015-03-20 10:06:38 +0000 | [diff] [blame] | 241 | } |
| 242 | |
| 243 | } // namespace art |