Elliott Hughes | 2faa5f1 | 2012-01-30 14:42:07 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 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 | */ |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 16 | |
| 17 | #include "oat.h" |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 18 | #include "utils.h" |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 19 | |
| 20 | #include <zlib.h> |
| 21 | |
| 22 | namespace art { |
| 23 | |
| 24 | const uint8_t OatHeader::kOatMagic[] = { 'o', 'a', 't', '\n' }; |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 25 | const uint8_t OatHeader::kOatVersion[] = { '0', '0', '7', '\0' }; |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 26 | |
Elliott Hughes | a72ec82 | 2012-03-05 17:12:22 -0800 | [diff] [blame] | 27 | OatHeader::OatHeader() { |
| 28 | memset(this, 0, sizeof(*this)); |
| 29 | } |
| 30 | |
Brian Carlstrom | 81f3ca1 | 2012-03-17 00:27:35 -0700 | [diff] [blame] | 31 | OatHeader::OatHeader(InstructionSet instruction_set, |
| 32 | const std::vector<const DexFile*>* dex_files, |
Brian Carlstrom | 28db012 | 2012-10-18 16:20:41 -0700 | [diff] [blame] | 33 | uint32_t image_file_location_oat_checksum, |
Brian Carlstrom | 700c8d3 | 2012-11-05 10:42:02 -0800 | [diff] [blame] | 34 | uint32_t image_file_location_oat_data_begin, |
Brian Carlstrom | 81f3ca1 | 2012-03-17 00:27:35 -0700 | [diff] [blame] | 35 | const std::string& image_file_location) { |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 36 | memcpy(magic_, kOatMagic, sizeof(kOatMagic)); |
| 37 | memcpy(version_, kOatVersion, sizeof(kOatVersion)); |
Brian Carlstrom | 81f3ca1 | 2012-03-17 00:27:35 -0700 | [diff] [blame] | 38 | |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 39 | adler32_checksum_ = adler32(0L, Z_NULL, 0); |
Brian Carlstrom | 81f3ca1 | 2012-03-17 00:27:35 -0700 | [diff] [blame] | 40 | |
Brian Carlstrom | f852fb2 | 2012-10-19 11:01:58 -0700 | [diff] [blame] | 41 | CHECK_NE(instruction_set, kNone); |
Elliott Hughes | a72ec82 | 2012-03-05 17:12:22 -0800 | [diff] [blame] | 42 | instruction_set_ = instruction_set; |
| 43 | UpdateChecksum(&instruction_set_, sizeof(instruction_set_)); |
Brian Carlstrom | 81f3ca1 | 2012-03-17 00:27:35 -0700 | [diff] [blame] | 44 | |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 45 | dex_file_count_ = dex_files->size(); |
| 46 | UpdateChecksum(&dex_file_count_, sizeof(dex_file_count_)); |
Brian Carlstrom | 81f3ca1 | 2012-03-17 00:27:35 -0700 | [diff] [blame] | 47 | |
Brian Carlstrom | 28db012 | 2012-10-18 16:20:41 -0700 | [diff] [blame] | 48 | image_file_location_oat_checksum_ = image_file_location_oat_checksum; |
| 49 | UpdateChecksum(&image_file_location_oat_checksum_, sizeof(image_file_location_oat_checksum_)); |
| 50 | |
Brian Carlstrom | 700c8d3 | 2012-11-05 10:42:02 -0800 | [diff] [blame] | 51 | CHECK(IsAligned<kPageSize>(image_file_location_oat_data_begin)); |
| 52 | image_file_location_oat_data_begin_ = image_file_location_oat_data_begin; |
| 53 | UpdateChecksum(&image_file_location_oat_data_begin_, sizeof(image_file_location_oat_data_begin_)); |
Brian Carlstrom | 81f3ca1 | 2012-03-17 00:27:35 -0700 | [diff] [blame] | 54 | |
| 55 | image_file_location_size_ = image_file_location.size(); |
| 56 | UpdateChecksum(&image_file_location_size_, sizeof(image_file_location_size_)); |
| 57 | UpdateChecksum(image_file_location.data(), image_file_location_size_); |
| 58 | |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 59 | executable_offset_ = 0; |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 60 | interpreter_to_interpreter_bridge_offset_ = 0; |
| 61 | interpreter_to_compiled_code_bridge_offset_ = 0; |
| 62 | jni_dlsym_lookup_offset_ = 0; |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 63 | portable_resolution_trampoline_offset_ = 0; |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 64 | portable_to_interpreter_bridge_offset_ = 0; |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 65 | quick_resolution_trampoline_offset_ = 0; |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 66 | quick_to_interpreter_bridge_offset_ = 0; |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 67 | } |
| 68 | |
| 69 | bool OatHeader::IsValid() const { |
Brian Carlstrom | f852fb2 | 2012-10-19 11:01:58 -0700 | [diff] [blame] | 70 | if (memcmp(magic_, kOatMagic, sizeof(kOatMagic)) != 0) { |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 71 | return false; |
| 72 | } |
Brian Carlstrom | f852fb2 | 2012-10-19 11:01:58 -0700 | [diff] [blame] | 73 | if (memcmp(version_, kOatVersion, sizeof(kOatVersion)) != 0) { |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 74 | return false; |
| 75 | } |
| 76 | return true; |
| 77 | } |
| 78 | |
| 79 | const char* OatHeader::GetMagic() const { |
| 80 | CHECK(IsValid()); |
| 81 | return reinterpret_cast<const char*>(magic_); |
| 82 | } |
| 83 | |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 84 | uint32_t OatHeader::GetChecksum() const { |
| 85 | CHECK(IsValid()); |
| 86 | return adler32_checksum_; |
| 87 | } |
| 88 | |
| 89 | void OatHeader::UpdateChecksum(const void* data, size_t length) { |
| 90 | DCHECK(IsValid()); |
| 91 | const uint8_t* bytes = reinterpret_cast<const uint8_t*>(data); |
| 92 | adler32_checksum_ = adler32(adler32_checksum_, bytes, length); |
| 93 | } |
| 94 | |
Elliott Hughes | a72ec82 | 2012-03-05 17:12:22 -0800 | [diff] [blame] | 95 | InstructionSet OatHeader::GetInstructionSet() const { |
| 96 | CHECK(IsValid()); |
| 97 | return instruction_set_; |
| 98 | } |
| 99 | |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 100 | uint32_t OatHeader::GetExecutableOffset() const { |
| 101 | DCHECK(IsValid()); |
Elliott Hughes | 06b37d9 | 2011-10-16 11:51:29 -0700 | [diff] [blame] | 102 | DCHECK_ALIGNED(executable_offset_, kPageSize); |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 103 | CHECK_GT(executable_offset_, sizeof(OatHeader)); |
| 104 | return executable_offset_; |
| 105 | } |
| 106 | |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 107 | void OatHeader::SetExecutableOffset(uint32_t executable_offset) { |
| 108 | DCHECK_ALIGNED(executable_offset, kPageSize); |
| 109 | CHECK_GT(executable_offset, sizeof(OatHeader)); |
| 110 | DCHECK(IsValid()); |
| 111 | DCHECK_EQ(executable_offset_, 0U); |
| 112 | |
| 113 | executable_offset_ = executable_offset; |
| 114 | UpdateChecksum(&executable_offset_, sizeof(executable_offset)); |
| 115 | } |
| 116 | |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 117 | const void* OatHeader::GetInterpreterToInterpreterBridge() const { |
| 118 | return reinterpret_cast<const uint8_t*>(this) + GetInterpreterToInterpreterBridgeOffset(); |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 119 | } |
| 120 | |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 121 | uint32_t OatHeader::GetInterpreterToInterpreterBridgeOffset() const { |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 122 | DCHECK(IsValid()); |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 123 | CHECK_GE(interpreter_to_interpreter_bridge_offset_, executable_offset_); |
| 124 | return interpreter_to_interpreter_bridge_offset_; |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 125 | } |
| 126 | |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 127 | void OatHeader::SetInterpreterToInterpreterBridgeOffset(uint32_t offset) { |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 128 | CHECK(offset == 0 || offset >= executable_offset_); |
| 129 | DCHECK(IsValid()); |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 130 | DCHECK_EQ(interpreter_to_interpreter_bridge_offset_, 0U) << offset; |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 131 | |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 132 | interpreter_to_interpreter_bridge_offset_ = offset; |
| 133 | UpdateChecksum(&interpreter_to_interpreter_bridge_offset_, sizeof(offset)); |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 134 | } |
| 135 | |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 136 | const void* OatHeader::GetInterpreterToCompiledCodeBridge() const { |
| 137 | return reinterpret_cast<const uint8_t*>(this) + GetInterpreterToCompiledCodeBridgeOffset(); |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 138 | } |
| 139 | |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 140 | uint32_t OatHeader::GetInterpreterToCompiledCodeBridgeOffset() const { |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 141 | DCHECK(IsValid()); |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 142 | CHECK_GE(interpreter_to_compiled_code_bridge_offset_, interpreter_to_interpreter_bridge_offset_); |
| 143 | return interpreter_to_compiled_code_bridge_offset_; |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 144 | } |
| 145 | |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 146 | void OatHeader::SetInterpreterToCompiledCodeBridgeOffset(uint32_t offset) { |
| 147 | CHECK(offset == 0 || offset >= interpreter_to_interpreter_bridge_offset_); |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 148 | DCHECK(IsValid()); |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 149 | DCHECK_EQ(interpreter_to_compiled_code_bridge_offset_, 0U) << offset; |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 150 | |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 151 | interpreter_to_compiled_code_bridge_offset_ = offset; |
| 152 | UpdateChecksum(&interpreter_to_compiled_code_bridge_offset_, sizeof(offset)); |
| 153 | } |
| 154 | |
| 155 | const void* OatHeader::GetJniDlsymLookup() const { |
| 156 | return reinterpret_cast<const uint8_t*>(this) + GetJniDlsymLookupOffset(); |
| 157 | } |
| 158 | |
| 159 | uint32_t OatHeader::GetJniDlsymLookupOffset() const { |
| 160 | DCHECK(IsValid()); |
| 161 | CHECK_GE(jni_dlsym_lookup_offset_, interpreter_to_compiled_code_bridge_offset_); |
| 162 | return jni_dlsym_lookup_offset_; |
| 163 | } |
| 164 | |
| 165 | void OatHeader::SetJniDlsymLookupOffset(uint32_t offset) { |
| 166 | CHECK(offset == 0 || offset >= interpreter_to_compiled_code_bridge_offset_); |
| 167 | DCHECK(IsValid()); |
| 168 | DCHECK_EQ(jni_dlsym_lookup_offset_, 0U) << offset; |
| 169 | |
| 170 | jni_dlsym_lookup_offset_ = offset; |
| 171 | UpdateChecksum(&jni_dlsym_lookup_offset_, sizeof(offset)); |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 172 | } |
| 173 | |
| 174 | const void* OatHeader::GetPortableResolutionTrampoline() const { |
| 175 | return reinterpret_cast<const uint8_t*>(this) + GetPortableResolutionTrampolineOffset(); |
| 176 | } |
| 177 | |
| 178 | uint32_t OatHeader::GetPortableResolutionTrampolineOffset() const { |
| 179 | DCHECK(IsValid()); |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 180 | CHECK_GE(portable_resolution_trampoline_offset_, jni_dlsym_lookup_offset_); |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 181 | return portable_resolution_trampoline_offset_; |
| 182 | } |
| 183 | |
| 184 | void OatHeader::SetPortableResolutionTrampolineOffset(uint32_t offset) { |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 185 | CHECK(offset == 0 || offset >= jni_dlsym_lookup_offset_); |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 186 | DCHECK(IsValid()); |
| 187 | DCHECK_EQ(portable_resolution_trampoline_offset_, 0U) << offset; |
| 188 | |
| 189 | portable_resolution_trampoline_offset_ = offset; |
| 190 | UpdateChecksum(&portable_resolution_trampoline_offset_, sizeof(offset)); |
| 191 | } |
| 192 | |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 193 | const void* OatHeader::GetPortableToInterpreterBridge() const { |
| 194 | return reinterpret_cast<const uint8_t*>(this) + GetPortableToInterpreterBridgeOffset(); |
| 195 | } |
| 196 | |
| 197 | uint32_t OatHeader::GetPortableToInterpreterBridgeOffset() const { |
| 198 | DCHECK(IsValid()); |
| 199 | CHECK_GE(portable_to_interpreter_bridge_offset_, portable_resolution_trampoline_offset_); |
| 200 | return portable_to_interpreter_bridge_offset_; |
| 201 | } |
| 202 | |
| 203 | void OatHeader::SetPortableToInterpreterBridgeOffset(uint32_t offset) { |
| 204 | CHECK(offset == 0 || offset >= portable_resolution_trampoline_offset_); |
| 205 | DCHECK(IsValid()); |
| 206 | DCHECK_EQ(portable_to_interpreter_bridge_offset_, 0U) << offset; |
| 207 | |
| 208 | portable_to_interpreter_bridge_offset_ = offset; |
| 209 | UpdateChecksum(&portable_to_interpreter_bridge_offset_, sizeof(offset)); |
| 210 | } |
| 211 | |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 212 | const void* OatHeader::GetQuickResolutionTrampoline() const { |
| 213 | return reinterpret_cast<const uint8_t*>(this) + GetQuickResolutionTrampolineOffset(); |
| 214 | } |
| 215 | |
| 216 | uint32_t OatHeader::GetQuickResolutionTrampolineOffset() const { |
| 217 | DCHECK(IsValid()); |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 218 | CHECK_GE(quick_resolution_trampoline_offset_, portable_to_interpreter_bridge_offset_); |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 219 | return quick_resolution_trampoline_offset_; |
| 220 | } |
| 221 | |
| 222 | void OatHeader::SetQuickResolutionTrampolineOffset(uint32_t offset) { |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 223 | CHECK(offset == 0 || offset >= portable_to_interpreter_bridge_offset_); |
Jeff Hao | 0aba0ba | 2013-06-03 14:49:28 -0700 | [diff] [blame] | 224 | DCHECK(IsValid()); |
| 225 | DCHECK_EQ(quick_resolution_trampoline_offset_, 0U) << offset; |
| 226 | |
| 227 | quick_resolution_trampoline_offset_ = offset; |
| 228 | UpdateChecksum(&quick_resolution_trampoline_offset_, sizeof(offset)); |
| 229 | } |
| 230 | |
Ian Rogers | 468532e | 2013-08-05 10:56:33 -0700 | [diff] [blame] | 231 | const void* OatHeader::GetQuickToInterpreterBridge() const { |
| 232 | return reinterpret_cast<const uint8_t*>(this) + GetQuickToInterpreterBridgeOffset(); |
| 233 | } |
| 234 | |
| 235 | uint32_t OatHeader::GetQuickToInterpreterBridgeOffset() const { |
| 236 | DCHECK(IsValid()); |
| 237 | CHECK_GE(quick_to_interpreter_bridge_offset_, quick_resolution_trampoline_offset_); |
| 238 | return quick_to_interpreter_bridge_offset_; |
| 239 | } |
| 240 | |
| 241 | void OatHeader::SetQuickToInterpreterBridgeOffset(uint32_t offset) { |
| 242 | CHECK(offset == 0 || offset >= quick_resolution_trampoline_offset_); |
| 243 | DCHECK(IsValid()); |
| 244 | DCHECK_EQ(quick_to_interpreter_bridge_offset_, 0U) << offset; |
| 245 | |
| 246 | quick_to_interpreter_bridge_offset_ = offset; |
| 247 | UpdateChecksum(&quick_to_interpreter_bridge_offset_, sizeof(offset)); |
| 248 | } |
| 249 | |
Brian Carlstrom | 28db012 | 2012-10-18 16:20:41 -0700 | [diff] [blame] | 250 | uint32_t OatHeader::GetImageFileLocationOatChecksum() const { |
Brian Carlstrom | 81f3ca1 | 2012-03-17 00:27:35 -0700 | [diff] [blame] | 251 | CHECK(IsValid()); |
Brian Carlstrom | 28db012 | 2012-10-18 16:20:41 -0700 | [diff] [blame] | 252 | return image_file_location_oat_checksum_; |
| 253 | } |
| 254 | |
Brian Carlstrom | 700c8d3 | 2012-11-05 10:42:02 -0800 | [diff] [blame] | 255 | uint32_t OatHeader::GetImageFileLocationOatDataBegin() const { |
Brian Carlstrom | 28db012 | 2012-10-18 16:20:41 -0700 | [diff] [blame] | 256 | CHECK(IsValid()); |
Brian Carlstrom | 700c8d3 | 2012-11-05 10:42:02 -0800 | [diff] [blame] | 257 | return image_file_location_oat_data_begin_; |
Brian Carlstrom | 81f3ca1 | 2012-03-17 00:27:35 -0700 | [diff] [blame] | 258 | } |
| 259 | |
| 260 | uint32_t OatHeader::GetImageFileLocationSize() const { |
| 261 | CHECK(IsValid()); |
| 262 | return image_file_location_size_; |
| 263 | } |
| 264 | |
| 265 | const uint8_t* OatHeader::GetImageFileLocationData() const { |
| 266 | CHECK(IsValid()); |
| 267 | return image_file_location_data_; |
| 268 | } |
| 269 | |
| 270 | std::string OatHeader::GetImageFileLocation() const { |
| 271 | CHECK(IsValid()); |
| 272 | return std::string(reinterpret_cast<const char*>(GetImageFileLocationData()), |
| 273 | GetImageFileLocationSize()); |
| 274 | } |
| 275 | |
Brian Carlstrom | 3320cf4 | 2011-10-04 14:58:28 -0700 | [diff] [blame] | 276 | OatMethodOffsets::OatMethodOffsets() |
Elliott Hughes | 362f9bc | 2011-10-17 18:56:41 -0700 | [diff] [blame] | 277 | : code_offset_(0), |
| 278 | frame_size_in_bytes_(0), |
Elliott Hughes | 362f9bc | 2011-10-17 18:56:41 -0700 | [diff] [blame] | 279 | core_spill_mask_(0), |
| 280 | fp_spill_mask_(0), |
| 281 | mapping_table_offset_(0), |
| 282 | vmap_table_offset_(0), |
Jeff Hao | 74180ca | 2013-03-27 15:29:11 -0700 | [diff] [blame] | 283 | gc_map_offset_(0) |
Logan Chien | ccb7bf1 | 2012-03-28 12:52:32 +0800 | [diff] [blame] | 284 | {} |
Brian Carlstrom | 3320cf4 | 2011-10-04 14:58:28 -0700 | [diff] [blame] | 285 | |
| 286 | OatMethodOffsets::OatMethodOffsets(uint32_t code_offset, |
| 287 | uint32_t frame_size_in_bytes, |
Brian Carlstrom | 3320cf4 | 2011-10-04 14:58:28 -0700 | [diff] [blame] | 288 | uint32_t core_spill_mask, |
| 289 | uint32_t fp_spill_mask, |
| 290 | uint32_t mapping_table_offset, |
| 291 | uint32_t vmap_table_offset, |
Jeff Hao | 74180ca | 2013-03-27 15:29:11 -0700 | [diff] [blame] | 292 | uint32_t gc_map_offset |
Logan Chien | ccb7bf1 | 2012-03-28 12:52:32 +0800 | [diff] [blame] | 293 | ) |
Elliott Hughes | 362f9bc | 2011-10-17 18:56:41 -0700 | [diff] [blame] | 294 | : code_offset_(code_offset), |
| 295 | frame_size_in_bytes_(frame_size_in_bytes), |
Elliott Hughes | 362f9bc | 2011-10-17 18:56:41 -0700 | [diff] [blame] | 296 | core_spill_mask_(core_spill_mask), |
| 297 | fp_spill_mask_(fp_spill_mask), |
| 298 | mapping_table_offset_(mapping_table_offset), |
| 299 | vmap_table_offset_(vmap_table_offset), |
Jeff Hao | 74180ca | 2013-03-27 15:29:11 -0700 | [diff] [blame] | 300 | gc_map_offset_(gc_map_offset) |
Logan Chien | ccb7bf1 | 2012-03-28 12:52:32 +0800 | [diff] [blame] | 301 | {} |
Brian Carlstrom | 3320cf4 | 2011-10-04 14:58:28 -0700 | [diff] [blame] | 302 | |
| 303 | OatMethodOffsets::~OatMethodOffsets() {} |
| 304 | |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 305 | } // namespace art |