Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 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 | #ifndef ART_RUNTIME_STACK_MAP_H_ |
| 18 | #define ART_RUNTIME_STACK_MAP_H_ |
| 19 | |
Andreas Gampe | 69489fa | 2017-06-08 18:03:25 -0700 | [diff] [blame] | 20 | #include <limits> |
| 21 | |
David Sehr | 1ce2b3b | 2018-04-05 11:02:03 -0700 | [diff] [blame] | 22 | #include "base/bit_memory_region.h" |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 23 | #include "base/bit_table.h" |
Vladimir Marko | 80afd02 | 2015-05-19 18:08:00 +0100 | [diff] [blame] | 24 | #include "base/bit_utils.h" |
Andreas Gampe | 8cf9cb3 | 2017-07-19 09:28:38 -0700 | [diff] [blame] | 25 | #include "base/bit_vector.h" |
David Sehr | 67bf42e | 2018-02-26 16:43:04 -0800 | [diff] [blame] | 26 | #include "base/leb128.h" |
David Sehr | 1ce2b3b | 2018-04-05 11:02:03 -0700 | [diff] [blame] | 27 | #include "base/memory_region.h" |
David Sehr | 9e734c7 | 2018-01-04 17:56:19 -0800 | [diff] [blame] | 28 | #include "dex/dex_file_types.h" |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 29 | #include "dex_register_location.h" |
Mathieu Chartier | cbcedbf | 2017-03-12 22:24:50 -0700 | [diff] [blame] | 30 | #include "method_info.h" |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 31 | #include "oat_quick_method_header.h" |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 32 | |
| 33 | namespace art { |
| 34 | |
Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 35 | class VariableIndentationOutputStream; |
| 36 | |
Roland Levillain | a2d8ec6 | 2015-03-12 15:25:29 +0000 | [diff] [blame] | 37 | // Size of a frame slot, in bytes. This constant is a signed value, |
| 38 | // to please the compiler in arithmetic operations involving int32_t |
| 39 | // (signed) values. |
Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 40 | static constexpr ssize_t kFrameSlotSize = 4; |
Roland Levillain | a2d8ec6 | 2015-03-12 15:25:29 +0000 | [diff] [blame] | 41 | |
David Srbecky | 6de8833 | 2018-06-03 12:00:11 +0100 | [diff] [blame] | 42 | // The delta compression of dex register maps means we need to scan the stackmaps backwards. |
| 43 | // We compress the data in such a way so that there is an upper bound on the search distance. |
| 44 | // Max distance 0 means each stack map must be fully defined and no scanning back is allowed. |
| 45 | // If this value is changed, the oat file version should be incremented (for DCHECK to pass). |
| 46 | static constexpr size_t kMaxDexRegisterMapSearchDistance = 32; |
| 47 | |
Nicolas Geoffray | 5d37c15 | 2017-01-12 13:25:19 +0000 | [diff] [blame] | 48 | class ArtMethod; |
Nicolas Geoffray | 004c230 | 2015-03-20 10:06:38 +0000 | [diff] [blame] | 49 | class CodeInfo; |
David Srbecky | 86decb6 | 2018-06-05 06:41:10 +0100 | [diff] [blame] | 50 | class Stats; |
Nicolas Geoffray | 004c230 | 2015-03-20 10:06:38 +0000 | [diff] [blame] | 51 | |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 52 | std::ostream& operator<<(std::ostream& stream, const DexRegisterLocation& reg); |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 53 | |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 54 | // Information on Dex register locations for a specific PC. |
| 55 | // Effectively just a convenience wrapper for DexRegisterLocation vector. |
| 56 | // If the size is small enough, it keeps the data on the stack. |
David Srbecky | e140212 | 2018-06-13 18:20:45 +0100 | [diff] [blame] | 57 | // TODO: Replace this with generic purpose "small-vector" implementation. |
Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 58 | class DexRegisterMap { |
| 59 | public: |
David Srbecky | 6de8833 | 2018-06-03 12:00:11 +0100 | [diff] [blame] | 60 | using iterator = DexRegisterLocation*; |
David Srbecky | e140212 | 2018-06-13 18:20:45 +0100 | [diff] [blame] | 61 | using const_iterator = const DexRegisterLocation*; |
David Srbecky | 6de8833 | 2018-06-03 12:00:11 +0100 | [diff] [blame] | 62 | |
| 63 | // Create map for given number of registers and initialize them to the given value. |
| 64 | DexRegisterMap(size_t count, DexRegisterLocation value) : count_(count), regs_small_{} { |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 65 | if (count_ <= kSmallCount) { |
David Srbecky | 6de8833 | 2018-06-03 12:00:11 +0100 | [diff] [blame] | 66 | std::fill_n(regs_small_.begin(), count, value); |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 67 | } else { |
David Srbecky | 6de8833 | 2018-06-03 12:00:11 +0100 | [diff] [blame] | 68 | regs_large_.resize(count, value); |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 69 | } |
Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 70 | } |
| 71 | |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 72 | DexRegisterLocation* data() { |
| 73 | return count_ <= kSmallCount ? regs_small_.data() : regs_large_.data(); |
| 74 | } |
David Srbecky | e140212 | 2018-06-13 18:20:45 +0100 | [diff] [blame] | 75 | const DexRegisterLocation* data() const { |
| 76 | return count_ <= kSmallCount ? regs_small_.data() : regs_large_.data(); |
| 77 | } |
Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 78 | |
David Srbecky | 6de8833 | 2018-06-03 12:00:11 +0100 | [diff] [blame] | 79 | iterator begin() { return data(); } |
| 80 | iterator end() { return data() + count_; } |
David Srbecky | e140212 | 2018-06-13 18:20:45 +0100 | [diff] [blame] | 81 | const_iterator begin() const { return data(); } |
| 82 | const_iterator end() const { return data() + count_; } |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 83 | size_t size() const { return count_; } |
David Srbecky | fd89b07 | 2018-06-03 12:00:22 +0100 | [diff] [blame] | 84 | bool empty() const { return count_ == 0; } |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 85 | |
David Srbecky | e140212 | 2018-06-13 18:20:45 +0100 | [diff] [blame] | 86 | DexRegisterLocation& operator[](size_t index) { |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 87 | DCHECK_LT(index, count_); |
David Srbecky | e140212 | 2018-06-13 18:20:45 +0100 | [diff] [blame] | 88 | return data()[index]; |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 89 | } |
David Srbecky | e140212 | 2018-06-13 18:20:45 +0100 | [diff] [blame] | 90 | const DexRegisterLocation& operator[](size_t index) const { |
| 91 | DCHECK_LT(index, count_); |
| 92 | return data()[index]; |
Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 93 | } |
| 94 | |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 95 | size_t GetNumberOfLiveDexRegisters() const { |
David Srbecky | e140212 | 2018-06-13 18:20:45 +0100 | [diff] [blame] | 96 | return std::count_if(begin(), end(), [](auto& loc) { return loc.IsLive(); }); |
Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 97 | } |
| 98 | |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 99 | bool HasAnyLiveDexRegisters() const { |
David Srbecky | e140212 | 2018-06-13 18:20:45 +0100 | [diff] [blame] | 100 | return std::any_of(begin(), end(), [](auto& loc) { return loc.IsLive(); }); |
David Srbecky | 21d45b4 | 2018-05-30 06:35:05 +0100 | [diff] [blame] | 101 | } |
| 102 | |
David Srbecky | e140212 | 2018-06-13 18:20:45 +0100 | [diff] [blame] | 103 | void Dump(VariableIndentationOutputStream* vios) const; |
| 104 | |
Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 105 | private: |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 106 | // Store the data inline if the number of registers is small to avoid memory allocations. |
| 107 | // If count_ <= kSmallCount, we use the regs_small_ array, and regs_large_ otherwise. |
| 108 | static constexpr size_t kSmallCount = 16; |
| 109 | size_t count_; |
| 110 | std::array<DexRegisterLocation, kSmallCount> regs_small_; |
| 111 | dchecked_vector<DexRegisterLocation> regs_large_; |
Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 112 | }; |
| 113 | |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 114 | /** |
| 115 | * A Stack Map holds compilation information for a specific PC necessary for: |
| 116 | * - Mapping it to a dex PC, |
| 117 | * - Knowing which stack entries are objects, |
| 118 | * - Knowing which registers hold objects, |
| 119 | * - Knowing the inlining information, |
| 120 | * - Knowing the values of dex registers. |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 121 | */ |
David Srbecky | cf7833e | 2018-06-14 16:45:22 +0100 | [diff] [blame^] | 122 | class StackMap : public BitTableAccessor<8> { |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 123 | public: |
David Srbecky | 50fac06 | 2018-06-13 18:55:35 +0100 | [diff] [blame] | 124 | enum Kind { |
| 125 | Default = -1, |
| 126 | Catch = 0, |
| 127 | OSR = 1, |
| 128 | Debug = 2, |
| 129 | }; |
David Srbecky | d97e082 | 2018-06-03 12:00:24 +0100 | [diff] [blame] | 130 | BIT_TABLE_HEADER() |
David Srbecky | 50fac06 | 2018-06-13 18:55:35 +0100 | [diff] [blame] | 131 | BIT_TABLE_COLUMN(0, Kind) |
| 132 | BIT_TABLE_COLUMN(1, PackedNativePc) |
| 133 | BIT_TABLE_COLUMN(2, DexPc) |
| 134 | BIT_TABLE_COLUMN(3, RegisterMaskIndex) |
| 135 | BIT_TABLE_COLUMN(4, StackMaskIndex) |
| 136 | BIT_TABLE_COLUMN(5, InlineInfoIndex) |
| 137 | BIT_TABLE_COLUMN(6, DexRegisterMaskIndex) |
| 138 | BIT_TABLE_COLUMN(7, DexRegisterMapIndex) |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 139 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 140 | ALWAYS_INLINE uint32_t GetNativePcOffset(InstructionSet instruction_set) const { |
David Srbecky | cf7833e | 2018-06-14 16:45:22 +0100 | [diff] [blame^] | 141 | return UnpackNativePc(GetPackedNativePc(), instruction_set); |
David Brazdil | f677ebf | 2015-05-29 16:29:43 +0100 | [diff] [blame] | 142 | } |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 143 | |
David Srbecky | d97e082 | 2018-06-03 12:00:24 +0100 | [diff] [blame] | 144 | ALWAYS_INLINE bool HasInlineInfo() const { |
| 145 | return HasInlineInfoIndex(); |
| 146 | } |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 147 | |
David Srbecky | d97e082 | 2018-06-03 12:00:24 +0100 | [diff] [blame] | 148 | ALWAYS_INLINE bool HasDexRegisterMap() const { |
| 149 | return HasDexRegisterMapIndex(); |
| 150 | } |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 151 | |
David Srbecky | d02b23f | 2018-05-29 23:27:22 +0100 | [diff] [blame] | 152 | static uint32_t PackNativePc(uint32_t native_pc, InstructionSet isa) { |
David Srbecky | d775f96 | 2018-05-30 18:12:52 +0100 | [diff] [blame] | 153 | DCHECK_ALIGNED_PARAM(native_pc, GetInstructionSetInstructionAlignment(isa)); |
David Srbecky | d02b23f | 2018-05-29 23:27:22 +0100 | [diff] [blame] | 154 | return native_pc / GetInstructionSetInstructionAlignment(isa); |
| 155 | } |
| 156 | |
| 157 | static uint32_t UnpackNativePc(uint32_t packed_native_pc, InstructionSet isa) { |
| 158 | uint32_t native_pc = packed_native_pc * GetInstructionSetInstructionAlignment(isa); |
| 159 | DCHECK_EQ(native_pc / GetInstructionSetInstructionAlignment(isa), packed_native_pc); |
| 160 | return native_pc; |
| 161 | } |
| 162 | |
Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 163 | void Dump(VariableIndentationOutputStream* vios, |
Roland Levillain | f2650d1 | 2015-05-28 14:53:28 +0100 | [diff] [blame] | 164 | const CodeInfo& code_info, |
Mathieu Chartier | cbcedbf | 2017-03-12 22:24:50 -0700 | [diff] [blame] | 165 | const MethodInfo& method_info, |
Roland Levillain | f2650d1 | 2015-05-28 14:53:28 +0100 | [diff] [blame] | 166 | uint32_t code_offset, |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 167 | InstructionSet instruction_set) const; |
David Srbecky | 61b28a1 | 2016-02-25 21:55:03 +0000 | [diff] [blame] | 168 | }; |
| 169 | |
Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 170 | /** |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 171 | * Inline information for a specific PC. |
| 172 | * The row referenced from the StackMap holds information at depth 0. |
| 173 | * Following rows hold information for further depths. |
Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 174 | */ |
David Srbecky | cf7833e | 2018-06-14 16:45:22 +0100 | [diff] [blame^] | 175 | class InlineInfo : public BitTableAccessor<6> { |
Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 176 | public: |
David Srbecky | d97e082 | 2018-06-03 12:00:24 +0100 | [diff] [blame] | 177 | BIT_TABLE_HEADER() |
| 178 | BIT_TABLE_COLUMN(0, IsLast) // Determines if there are further rows for further depths. |
| 179 | BIT_TABLE_COLUMN(1, DexPc) |
| 180 | BIT_TABLE_COLUMN(2, MethodInfoIndex) |
| 181 | BIT_TABLE_COLUMN(3, ArtMethodHi) // High bits of ArtMethod*. |
| 182 | BIT_TABLE_COLUMN(4, ArtMethodLo) // Low bits of ArtMethod*. |
David Srbecky | 6de8833 | 2018-06-03 12:00:11 +0100 | [diff] [blame] | 183 | BIT_TABLE_COLUMN(5, NumberOfDexRegisters) // Includes outer levels and the main method. |
David Srbecky | d97e082 | 2018-06-03 12:00:24 +0100 | [diff] [blame] | 184 | BIT_TABLE_COLUMN(6, DexRegisterMapIndex) |
| 185 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 186 | static constexpr uint32_t kLast = -1; |
| 187 | static constexpr uint32_t kMore = 0; |
Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 188 | |
David Srbecky | 6e69e52 | 2018-06-03 12:00:14 +0100 | [diff] [blame] | 189 | uint32_t GetMethodIndex(const MethodInfo& method_info) const { |
David Srbecky | d97e082 | 2018-06-03 12:00:24 +0100 | [diff] [blame] | 190 | return method_info.GetMethodIndex(GetMethodInfoIndex()); |
Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 191 | } |
| 192 | |
David Srbecky | 6e69e52 | 2018-06-03 12:00:14 +0100 | [diff] [blame] | 193 | bool EncodesArtMethod() const { |
David Srbecky | d97e082 | 2018-06-03 12:00:24 +0100 | [diff] [blame] | 194 | return HasArtMethodLo(); |
Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 195 | } |
| 196 | |
David Srbecky | 6e69e52 | 2018-06-03 12:00:14 +0100 | [diff] [blame] | 197 | ArtMethod* GetArtMethod() const { |
David Srbecky | d97e082 | 2018-06-03 12:00:24 +0100 | [diff] [blame] | 198 | uint64_t lo = GetArtMethodLo(); |
| 199 | uint64_t hi = GetArtMethodHi(); |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 200 | return reinterpret_cast<ArtMethod*>((hi << 32) | lo); |
Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 201 | } |
| 202 | |
Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 203 | void Dump(VariableIndentationOutputStream* vios, |
David Srbecky | 61b28a1 | 2016-02-25 21:55:03 +0000 | [diff] [blame] | 204 | const CodeInfo& info, |
David Srbecky | 6e69e52 | 2018-06-03 12:00:14 +0100 | [diff] [blame] | 205 | const StackMap& stack_map, |
David Srbecky | fd89b07 | 2018-06-03 12:00:22 +0100 | [diff] [blame] | 206 | const MethodInfo& method_info) const; |
Mathieu Chartier | 575d3e6 | 2017-02-06 11:00:40 -0800 | [diff] [blame] | 207 | }; |
| 208 | |
David Srbecky | cf7833e | 2018-06-14 16:45:22 +0100 | [diff] [blame^] | 209 | class InvokeInfo : public BitTableAccessor<3> { |
Mathieu Chartier | 575d3e6 | 2017-02-06 11:00:40 -0800 | [diff] [blame] | 210 | public: |
David Srbecky | d97e082 | 2018-06-03 12:00:24 +0100 | [diff] [blame] | 211 | BIT_TABLE_HEADER() |
| 212 | BIT_TABLE_COLUMN(0, PackedNativePc) |
| 213 | BIT_TABLE_COLUMN(1, InvokeType) |
| 214 | BIT_TABLE_COLUMN(2, MethodInfoIndex) |
Mathieu Chartier | 575d3e6 | 2017-02-06 11:00:40 -0800 | [diff] [blame] | 215 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 216 | ALWAYS_INLINE uint32_t GetNativePcOffset(InstructionSet instruction_set) const { |
David Srbecky | cf7833e | 2018-06-14 16:45:22 +0100 | [diff] [blame^] | 217 | return StackMap::UnpackNativePc(GetPackedNativePc(), instruction_set); |
Mathieu Chartier | d776ff0 | 2017-01-17 09:32:18 -0800 | [diff] [blame] | 218 | } |
| 219 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 220 | uint32_t GetMethodIndex(MethodInfo method_info) const { |
David Srbecky | d97e082 | 2018-06-03 12:00:24 +0100 | [diff] [blame] | 221 | return method_info.GetMethodIndex(GetMethodInfoIndex()); |
Mathieu Chartier | d776ff0 | 2017-01-17 09:32:18 -0800 | [diff] [blame] | 222 | } |
David Srbecky | 09ed098 | 2016-02-12 21:58:43 +0000 | [diff] [blame] | 223 | }; |
| 224 | |
David Srbecky | cf7833e | 2018-06-14 16:45:22 +0100 | [diff] [blame^] | 225 | class MaskInfo : public BitTableAccessor<1> { |
David Srbecky | 86decb6 | 2018-06-05 06:41:10 +0100 | [diff] [blame] | 226 | public: |
| 227 | BIT_TABLE_HEADER() |
| 228 | BIT_TABLE_COLUMN(0, Mask) |
| 229 | }; |
| 230 | |
David Srbecky | cf7833e | 2018-06-14 16:45:22 +0100 | [diff] [blame^] | 231 | class DexRegisterMapInfo : public BitTableAccessor<1> { |
David Srbecky | 86decb6 | 2018-06-05 06:41:10 +0100 | [diff] [blame] | 232 | public: |
| 233 | BIT_TABLE_HEADER() |
| 234 | BIT_TABLE_COLUMN(0, CatalogueIndex) |
| 235 | }; |
| 236 | |
David Srbecky | cf7833e | 2018-06-14 16:45:22 +0100 | [diff] [blame^] | 237 | class DexRegisterInfo : public BitTableAccessor<2> { |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 238 | public: |
David Srbecky | d97e082 | 2018-06-03 12:00:24 +0100 | [diff] [blame] | 239 | BIT_TABLE_HEADER() |
| 240 | BIT_TABLE_COLUMN(0, Kind) |
| 241 | BIT_TABLE_COLUMN(1, PackedValue) |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 242 | |
| 243 | ALWAYS_INLINE DexRegisterLocation GetLocation() const { |
David Srbecky | d97e082 | 2018-06-03 12:00:24 +0100 | [diff] [blame] | 244 | DexRegisterLocation::Kind kind = static_cast<DexRegisterLocation::Kind>(GetKind()); |
| 245 | return DexRegisterLocation(kind, UnpackValue(kind, GetPackedValue())); |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 246 | } |
| 247 | |
| 248 | static uint32_t PackValue(DexRegisterLocation::Kind kind, uint32_t value) { |
| 249 | uint32_t packed_value = value; |
| 250 | if (kind == DexRegisterLocation::Kind::kInStack) { |
| 251 | DCHECK(IsAligned<kFrameSlotSize>(packed_value)); |
| 252 | packed_value /= kFrameSlotSize; |
| 253 | } |
| 254 | return packed_value; |
| 255 | } |
| 256 | |
| 257 | static uint32_t UnpackValue(DexRegisterLocation::Kind kind, uint32_t packed_value) { |
| 258 | uint32_t value = packed_value; |
| 259 | if (kind == DexRegisterLocation::Kind::kInStack) { |
| 260 | value *= kFrameSlotSize; |
| 261 | } |
| 262 | return value; |
| 263 | } |
| 264 | }; |
| 265 | |
David Srbecky | 4b59d10 | 2018-05-29 21:46:10 +0000 | [diff] [blame] | 266 | // Register masks tend to have many trailing zero bits (caller-saves are usually not encoded), |
| 267 | // therefore it is worth encoding the mask as value+shift. |
David Srbecky | cf7833e | 2018-06-14 16:45:22 +0100 | [diff] [blame^] | 268 | class RegisterMask : public BitTableAccessor<2> { |
David Srbecky | 4b59d10 | 2018-05-29 21:46:10 +0000 | [diff] [blame] | 269 | public: |
David Srbecky | d97e082 | 2018-06-03 12:00:24 +0100 | [diff] [blame] | 270 | BIT_TABLE_HEADER() |
| 271 | BIT_TABLE_COLUMN(0, Value) |
| 272 | BIT_TABLE_COLUMN(1, Shift) |
David Srbecky | 4b59d10 | 2018-05-29 21:46:10 +0000 | [diff] [blame] | 273 | |
| 274 | ALWAYS_INLINE uint32_t GetMask() const { |
David Srbecky | d97e082 | 2018-06-03 12:00:24 +0100 | [diff] [blame] | 275 | return GetValue() << GetShift(); |
David Srbecky | 4b59d10 | 2018-05-29 21:46:10 +0000 | [diff] [blame] | 276 | } |
| 277 | }; |
| 278 | |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 279 | /** |
| 280 | * Wrapper around all compiler information collected for a method. |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 281 | * See the Decode method at the end for the precise binary format. |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 282 | */ |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 283 | class CodeInfo { |
| 284 | public: |
Nicolas Geoffray | 3946844 | 2014-09-02 15:17:15 +0100 | [diff] [blame] | 285 | explicit CodeInfo(const void* data) { |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 286 | Decode(reinterpret_cast<const uint8_t*>(data)); |
Nicolas Geoffray | 3946844 | 2014-09-02 15:17:15 +0100 | [diff] [blame] | 287 | } |
| 288 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 289 | explicit CodeInfo(MemoryRegion region) : CodeInfo(region.begin()) { |
| 290 | DCHECK_EQ(size_, region.size()); |
Nicolas Geoffray | 896f8f7 | 2015-03-30 15:44:25 +0100 | [diff] [blame] | 291 | } |
| 292 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 293 | explicit CodeInfo(const OatQuickMethodHeader* header) |
| 294 | : CodeInfo(header->GetOptimizedCodeInfoPtr()) { |
Nicolas Geoffray | 896f8f7 | 2015-03-30 15:44:25 +0100 | [diff] [blame] | 295 | } |
| 296 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 297 | size_t Size() const { |
| 298 | return size_; |
Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 299 | } |
| 300 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 301 | bool HasInlineInfo() const { |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 302 | return inline_infos_.NumRows() > 0; |
Nicolas Geoffray | 3946844 | 2014-09-02 15:17:15 +0100 | [diff] [blame] | 303 | } |
| 304 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 305 | ALWAYS_INLINE StackMap GetStackMapAt(size_t index) const { |
David Srbecky | cf7833e | 2018-06-14 16:45:22 +0100 | [diff] [blame^] | 306 | return stack_maps_.GetRow(index); |
David Srbecky | 45aa598 | 2016-03-18 02:15:09 +0000 | [diff] [blame] | 307 | } |
| 308 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 309 | BitMemoryRegion GetStackMask(size_t index) const { |
David Srbecky | 4b59d10 | 2018-05-29 21:46:10 +0000 | [diff] [blame] | 310 | return stack_masks_.GetBitMemoryRegion(index); |
Mathieu Chartier | 1a20b68 | 2017-01-31 14:25:16 -0800 | [diff] [blame] | 311 | } |
| 312 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 313 | BitMemoryRegion GetStackMaskOf(const StackMap& stack_map) const { |
David Srbecky | 4b59d10 | 2018-05-29 21:46:10 +0000 | [diff] [blame] | 314 | uint32_t index = stack_map.GetStackMaskIndex(); |
| 315 | return (index == StackMap::kNoValue) ? BitMemoryRegion() : GetStackMask(index); |
Mathieu Chartier | 1a20b68 | 2017-01-31 14:25:16 -0800 | [diff] [blame] | 316 | } |
| 317 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 318 | uint32_t GetRegisterMaskOf(const StackMap& stack_map) const { |
David Srbecky | 4b59d10 | 2018-05-29 21:46:10 +0000 | [diff] [blame] | 319 | uint32_t index = stack_map.GetRegisterMaskIndex(); |
David Srbecky | cf7833e | 2018-06-14 16:45:22 +0100 | [diff] [blame^] | 320 | return (index == StackMap::kNoValue) ? 0 : register_masks_.GetRow(index).GetMask(); |
Nicolas Geoffray | 3946844 | 2014-09-02 15:17:15 +0100 | [diff] [blame] | 321 | } |
| 322 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 323 | uint32_t GetNumberOfLocationCatalogEntries() const { |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 324 | return dex_register_catalog_.NumRows(); |
Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 325 | } |
| 326 | |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 327 | ALWAYS_INLINE DexRegisterLocation GetDexRegisterCatalogEntry(size_t index) const { |
David Srbecky | 6de8833 | 2018-06-03 12:00:11 +0100 | [diff] [blame] | 328 | return (index == StackMap::kNoValue) |
| 329 | ? DexRegisterLocation::None() |
David Srbecky | cf7833e | 2018-06-14 16:45:22 +0100 | [diff] [blame^] | 330 | : dex_register_catalog_.GetRow(index).GetLocation(); |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 331 | } |
| 332 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 333 | uint32_t GetNumberOfStackMaps() const { |
| 334 | return stack_maps_.NumRows(); |
Nicolas Geoffray | 6530baf | 2015-05-26 15:22:58 +0100 | [diff] [blame] | 335 | } |
| 336 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 337 | InvokeInfo GetInvokeInfo(size_t index) const { |
David Srbecky | cf7833e | 2018-06-14 16:45:22 +0100 | [diff] [blame^] | 338 | return invoke_infos_.GetRow(index); |
Mathieu Chartier | d776ff0 | 2017-01-17 09:32:18 -0800 | [diff] [blame] | 339 | } |
| 340 | |
David Srbecky | fd89b07 | 2018-06-03 12:00:22 +0100 | [diff] [blame] | 341 | ALWAYS_INLINE DexRegisterMap GetDexRegisterMapOf(StackMap stack_map) const { |
David Srbecky | 6de8833 | 2018-06-03 12:00:11 +0100 | [diff] [blame] | 342 | if (stack_map.HasDexRegisterMap()) { |
| 343 | DexRegisterMap map(number_of_dex_registers_, DexRegisterLocation::Invalid()); |
| 344 | DecodeDexRegisterMap(stack_map.Row(), /* first_dex_register */ 0, &map); |
| 345 | return map; |
| 346 | } |
| 347 | return DexRegisterMap(0, DexRegisterLocation::None()); |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 348 | } |
| 349 | |
David Srbecky | fd89b07 | 2018-06-03 12:00:22 +0100 | [diff] [blame] | 350 | ALWAYS_INLINE DexRegisterMap GetDexRegisterMapAtDepth(uint8_t depth, StackMap stack_map) const { |
David Srbecky | 6de8833 | 2018-06-03 12:00:11 +0100 | [diff] [blame] | 351 | if (stack_map.HasDexRegisterMap()) { |
| 352 | // The register counts are commutative and include all outer levels. |
| 353 | // This allows us to determine the range [first, last) in just two lookups. |
| 354 | // If we are at depth 0 (the first inlinee), the count from the main method is used. |
| 355 | uint32_t first = (depth == 0) ? number_of_dex_registers_ |
| 356 | : GetInlineInfoAtDepth(stack_map, depth - 1).GetNumberOfDexRegisters(); |
| 357 | uint32_t last = GetInlineInfoAtDepth(stack_map, depth).GetNumberOfDexRegisters(); |
| 358 | DexRegisterMap map(last - first, DexRegisterLocation::Invalid()); |
| 359 | DecodeDexRegisterMap(stack_map.Row(), first, &map); |
| 360 | return map; |
| 361 | } |
| 362 | return DexRegisterMap(0, DexRegisterLocation::None()); |
Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 363 | } |
| 364 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 365 | InlineInfo GetInlineInfo(size_t index) const { |
David Srbecky | cf7833e | 2018-06-14 16:45:22 +0100 | [diff] [blame^] | 366 | return inline_infos_.GetRow(index); |
Mathieu Chartier | 575d3e6 | 2017-02-06 11:00:40 -0800 | [diff] [blame] | 367 | } |
| 368 | |
David Srbecky | 6e69e52 | 2018-06-03 12:00:14 +0100 | [diff] [blame] | 369 | uint32_t GetInlineDepthOf(StackMap stack_map) const { |
| 370 | uint32_t depth = 0; |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 371 | uint32_t index = stack_map.GetInlineInfoIndex(); |
David Srbecky | 6e69e52 | 2018-06-03 12:00:14 +0100 | [diff] [blame] | 372 | if (index != StackMap::kNoValue) { |
| 373 | while (GetInlineInfo(index + depth++).GetIsLast() == InlineInfo::kMore) { } |
| 374 | } |
| 375 | return depth; |
| 376 | } |
| 377 | |
| 378 | InlineInfo GetInlineInfoAtDepth(StackMap stack_map, uint32_t depth) const { |
| 379 | DCHECK(stack_map.HasInlineInfo()); |
| 380 | DCHECK_LT(depth, GetInlineDepthOf(stack_map)); |
| 381 | return GetInlineInfo(stack_map.GetInlineInfoIndex() + depth); |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 382 | } |
| 383 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 384 | StackMap GetStackMapForDexPc(uint32_t dex_pc) const { |
| 385 | for (size_t i = 0, e = GetNumberOfStackMaps(); i < e; ++i) { |
| 386 | StackMap stack_map = GetStackMapAt(i); |
David Srbecky | 50fac06 | 2018-06-13 18:55:35 +0100 | [diff] [blame] | 387 | if (stack_map.GetDexPc() == dex_pc && stack_map.GetKind() != StackMap::Kind::Debug) { |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 388 | return stack_map; |
| 389 | } |
| 390 | } |
Nicolas Geoffray | e12997f | 2015-05-22 14:01:33 +0100 | [diff] [blame] | 391 | return StackMap(); |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 392 | } |
| 393 | |
David Srbecky | 50fac06 | 2018-06-13 18:55:35 +0100 | [diff] [blame] | 394 | // Searches the stack map list backwards because catch stack maps are stored at the end. |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 395 | StackMap GetCatchStackMapForDexPc(uint32_t dex_pc) const { |
| 396 | for (size_t i = GetNumberOfStackMaps(); i > 0; --i) { |
| 397 | StackMap stack_map = GetStackMapAt(i - 1); |
David Srbecky | 50fac06 | 2018-06-13 18:55:35 +0100 | [diff] [blame] | 398 | if (stack_map.GetDexPc() == dex_pc && stack_map.GetKind() == StackMap::Kind::Catch) { |
David Brazdil | 77a48ae | 2015-09-15 12:34:04 +0000 | [diff] [blame] | 399 | return stack_map; |
| 400 | } |
| 401 | } |
| 402 | return StackMap(); |
| 403 | } |
| 404 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 405 | StackMap GetOsrStackMapForDexPc(uint32_t dex_pc) const { |
David Srbecky | 50fac06 | 2018-06-13 18:55:35 +0100 | [diff] [blame] | 406 | for (size_t i = 0, e = GetNumberOfStackMaps(); i < e; ++i) { |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 407 | StackMap stack_map = GetStackMapAt(i); |
David Srbecky | 50fac06 | 2018-06-13 18:55:35 +0100 | [diff] [blame] | 408 | if (stack_map.GetDexPc() == dex_pc && stack_map.GetKind() == StackMap::Kind::OSR) { |
| 409 | return stack_map; |
Nicolas Geoffray | b331feb | 2016-02-05 16:51:53 +0000 | [diff] [blame] | 410 | } |
| 411 | } |
| 412 | return StackMap(); |
| 413 | } |
| 414 | |
David Srbecky | 50fac06 | 2018-06-13 18:55:35 +0100 | [diff] [blame] | 415 | StackMap GetStackMapForNativePcOffset(uint32_t pc, InstructionSet isa = kRuntimeISA) const { |
David Brazdil | 77a48ae | 2015-09-15 12:34:04 +0000 | [diff] [blame] | 416 | // TODO: Safepoint stack maps are sorted by native_pc_offset but catch stack |
| 417 | // maps are not. If we knew that the method does not have try/catch, |
| 418 | // we could do binary search. |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 419 | for (size_t i = 0, e = GetNumberOfStackMaps(); i < e; ++i) { |
| 420 | StackMap stack_map = GetStackMapAt(i); |
David Srbecky | 50fac06 | 2018-06-13 18:55:35 +0100 | [diff] [blame] | 421 | if (stack_map.GetNativePcOffset(isa) == pc) { |
| 422 | StackMap::Kind kind = static_cast<StackMap::Kind>(stack_map.GetKind()); |
| 423 | if (kind == StackMap::Kind::Default || kind == StackMap::Kind::OSR) { |
| 424 | return stack_map; |
| 425 | } |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 426 | } |
| 427 | } |
Nicolas Geoffray | e12997f | 2015-05-22 14:01:33 +0100 | [diff] [blame] | 428 | return StackMap(); |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 429 | } |
| 430 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 431 | InvokeInfo GetInvokeInfoForNativePcOffset(uint32_t native_pc_offset) { |
| 432 | for (size_t index = 0; index < invoke_infos_.NumRows(); index++) { |
| 433 | InvokeInfo item = GetInvokeInfo(index); |
| 434 | if (item.GetNativePcOffset(kRuntimeISA) == native_pc_offset) { |
Mathieu Chartier | d776ff0 | 2017-01-17 09:32:18 -0800 | [diff] [blame] | 435 | return item; |
| 436 | } |
| 437 | } |
David Srbecky | d97e082 | 2018-06-03 12:00:24 +0100 | [diff] [blame] | 438 | return InvokeInfo(); |
Mathieu Chartier | d776ff0 | 2017-01-17 09:32:18 -0800 | [diff] [blame] | 439 | } |
| 440 | |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 441 | // Dump this CodeInfo object on `vios`. |
| 442 | // `code_offset` is the (absolute) native PC of the compiled method. |
Vladimir Marko | 8f1e08a | 2015-06-26 12:06:30 +0100 | [diff] [blame] | 443 | void Dump(VariableIndentationOutputStream* vios, |
Roland Levillain | f2650d1 | 2015-05-28 14:53:28 +0100 | [diff] [blame] | 444 | uint32_t code_offset, |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 445 | bool verbose, |
Mathieu Chartier | cbcedbf | 2017-03-12 22:24:50 -0700 | [diff] [blame] | 446 | InstructionSet instruction_set, |
| 447 | const MethodInfo& method_info) const; |
Nicolas Geoffray | 004c230 | 2015-03-20 10:06:38 +0000 | [diff] [blame] | 448 | |
David Srbecky | 86decb6 | 2018-06-05 06:41:10 +0100 | [diff] [blame] | 449 | // Accumulate code info size statistics into the given Stats tree. |
| 450 | void AddSizeStats(/*out*/ Stats* parent) const; |
| 451 | |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 452 | private: |
David Srbecky | 6de8833 | 2018-06-03 12:00:11 +0100 | [diff] [blame] | 453 | // Scan backward to determine dex register locations at given stack map. |
| 454 | void DecodeDexRegisterMap(uint32_t stack_map_index, |
| 455 | uint32_t first_dex_register, |
| 456 | /*out*/ DexRegisterMap* map) const; |
Roland Levillain | a2d8ec6 | 2015-03-12 15:25:29 +0000 | [diff] [blame] | 457 | |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 458 | void Decode(const uint8_t* data) { |
| 459 | size_t non_header_size = DecodeUnsignedLeb128(&data); |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 460 | BitMemoryRegion region(MemoryRegion(const_cast<uint8_t*>(data), non_header_size)); |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 461 | size_t bit_offset = 0; |
| 462 | size_ = UnsignedLeb128Size(non_header_size) + non_header_size; |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 463 | stack_maps_.Decode(region, &bit_offset); |
| 464 | register_masks_.Decode(region, &bit_offset); |
| 465 | stack_masks_.Decode(region, &bit_offset); |
| 466 | invoke_infos_.Decode(region, &bit_offset); |
| 467 | inline_infos_.Decode(region, &bit_offset); |
| 468 | dex_register_masks_.Decode(region, &bit_offset); |
| 469 | dex_register_maps_.Decode(region, &bit_offset); |
| 470 | dex_register_catalog_.Decode(region, &bit_offset); |
David Srbecky | 6de8833 | 2018-06-03 12:00:11 +0100 | [diff] [blame] | 471 | number_of_dex_registers_ = DecodeVarintBits(region, &bit_offset); |
David Srbecky | 71ec1cc | 2018-05-18 15:57:25 +0100 | [diff] [blame] | 472 | CHECK_EQ(non_header_size, BitsToBytesRoundUp(bit_offset)) << "Invalid CodeInfo"; |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 473 | } |
| 474 | |
| 475 | size_t size_; |
David Srbecky | cf7833e | 2018-06-14 16:45:22 +0100 | [diff] [blame^] | 476 | BitTable<StackMap> stack_maps_; |
| 477 | BitTable<RegisterMask> register_masks_; |
| 478 | BitTable<MaskInfo> stack_masks_; |
| 479 | BitTable<InvokeInfo> invoke_infos_; |
| 480 | BitTable<InlineInfo> inline_infos_; |
| 481 | BitTable<MaskInfo> dex_register_masks_; |
| 482 | BitTable<DexRegisterMapInfo> dex_register_maps_; |
| 483 | BitTable<DexRegisterInfo> dex_register_catalog_; |
David Srbecky | 6de8833 | 2018-06-03 12:00:11 +0100 | [diff] [blame] | 484 | uint32_t number_of_dex_registers_; // Excludes any inlined methods. |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 485 | }; |
| 486 | |
Roland Levillain | 1c1da43 | 2015-07-16 11:54:44 +0100 | [diff] [blame] | 487 | #undef ELEMENT_BYTE_OFFSET_AFTER |
| 488 | #undef ELEMENT_BIT_OFFSET_AFTER |
| 489 | |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 490 | } // namespace art |
| 491 | |
| 492 | #endif // ART_RUNTIME_STACK_MAP_H_ |