diff options
Diffstat (limited to 'oatdump/oatdump.cc')
| -rw-r--r-- | oatdump/oatdump.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc index dbf536575a..ea61b43627 100644 --- a/oatdump/oatdump.cc +++ b/oatdump/oatdump.cc @@ -26,7 +26,6 @@ #include <vector> #include "arch/instruction_set_features.h" -#include "art_code.h" #include "art_field-inl.h" #include "art_method-inl.h" #include "base/unix_file/fd_file.h" @@ -1967,10 +1966,13 @@ class ImageDumper { InstructionSetPointerSize(state->oat_dumper_->GetOatInstructionSet()); const void* quick_oat_code_begin = state->GetQuickOatCodeBegin(method); const void* quick_oat_code_end = state->GetQuickOatCodeEnd(method); - ArtCode art_code(method); + OatQuickMethodHeader* method_header = reinterpret_cast<OatQuickMethodHeader*>( + reinterpret_cast<uintptr_t>(quick_oat_code_begin) - sizeof(OatQuickMethodHeader)); if (method->IsNative()) { - DCHECK(art_code.GetNativeGcMap(image_pointer_size) == nullptr) << PrettyMethod(method); - DCHECK(art_code.GetMappingTable(image_pointer_size) == nullptr) << PrettyMethod(method); + if (!Runtime::Current()->GetClassLinker()->IsQuickGenericJniStub(quick_oat_code_begin)) { + DCHECK(method_header->GetNativeGcMap() == nullptr) << PrettyMethod(method); + DCHECK(method_header->GetMappingTable() == nullptr) << PrettyMethod(method); + } bool first_occurrence; uint32_t quick_oat_code_size = state->GetQuickOatCodeSize(method); state->ComputeOatSize(quick_oat_code_begin, &first_occurrence); @@ -1984,8 +1986,6 @@ class ImageDumper { } else if (method->IsAbstract() || method->IsCalleeSaveMethod() || method->IsResolutionMethod() || method->IsImtConflictMethod() || method->IsImtUnimplementedMethod() || method->IsClassInitializer()) { - DCHECK(art_code.GetNativeGcMap(image_pointer_size) == nullptr) << PrettyMethod(method); - DCHECK(art_code.GetMappingTable(image_pointer_size) == nullptr) << PrettyMethod(method); } else { const DexFile::CodeItem* code_item = method->GetCodeItem(); size_t dex_instruction_bytes = code_item->insns_size_in_code_units_ * 2; @@ -1993,22 +1993,22 @@ class ImageDumper { bool first_occurrence; size_t gc_map_bytes = state->ComputeOatSize( - art_code.GetNativeGcMap(image_pointer_size), &first_occurrence); + method_header->GetNativeGcMap(), &first_occurrence); if (first_occurrence) { state->stats_.gc_map_bytes += gc_map_bytes; } size_t pc_mapping_table_bytes = state->ComputeOatSize( - art_code.GetMappingTable(image_pointer_size), &first_occurrence); + method_header->GetMappingTable(), &first_occurrence); if (first_occurrence) { state->stats_.pc_mapping_table_bytes += pc_mapping_table_bytes; } size_t vmap_table_bytes = 0u; - if (!art_code.IsOptimized(image_pointer_size)) { + if (!method_header->IsOptimized()) { // Method compiled with the optimizing compiler have no vmap table. vmap_table_bytes = state->ComputeOatSize( - art_code.GetVmapTable(image_pointer_size), &first_occurrence); + method_header->GetVmapTable(), &first_occurrence); if (first_occurrence) { state->stats_.vmap_table_bytes += vmap_table_bytes; } |