Lines Matching refs:oat_dex_file

673   for (const OatDexFile& oat_dex_file : oat_dex_files_) {  in GetSourceLocations()  local
674 locations.push_back(oat_dex_file.GetLocation()); in GetSourceLocations()
969 for (const OatDexFile& oat_dex_file : writer_->oat_dex_files_) { in InitOatClassesMethodVisitor() local
970 num_classes += oat_dex_file.class_offsets_.size(); in InitOatClassesMethodVisitor()
2086 for (OatDexFile& oat_dex_file : oat_dex_files_) { in InitClassOffsets()
2087 DCHECK_EQ(oat_dex_file.class_offsets_offset_, 0u); in InitClassOffsets()
2088 if (!oat_dex_file.class_offsets_.empty()) { in InitClassOffsets()
2091 oat_dex_file.class_offsets_offset_ = offset; in InitClassOffsets()
2092 offset += oat_dex_file.GetClassOffsetsRawSize(); in InitClassOffsets()
2108 for (OatDexFile& oat_dex_file : oat_dex_files_) { in InitOatClasses()
2109 for (uint32_t& class_offset : oat_dex_file.class_offsets_) { in InitOatClasses()
2261 for (OatDexFile& oat_dex_file : oat_dex_files_) { in InitOatDexFiles()
2262 oat_dex_file.offset_ = offset; in InitOatDexFiles()
2263 offset += oat_dex_file.SizeOf(); in InitOatDexFiles()
2750 for (OatDexFile& oat_dex_file : oat_dex_files_) { in WriteClassOffsets()
2751 if (oat_dex_file.class_offsets_offset_ != 0u) { in WriteClassOffsets()
2761 if (!oat_dex_file.WriteClassOffsets(this, out)) { in WriteClassOffsets()
2764 relative_offset += oat_dex_file.GetClassOffsetsRawSize(); in WriteClassOffsets()
2880 OatDexFile* oat_dex_file = &oat_dex_files_[i]; in WriteIndexBssMappings() local
2884 DCHECK_EQ(relative_offset, oat_dex_file->method_bss_mapping_offset_); in WriteIndexBssMappings()
2900 DCHECK_EQ(0u, oat_dex_file->method_bss_mapping_offset_); in WriteIndexBssMappings()
2906 DCHECK_EQ(relative_offset, oat_dex_file->type_bss_mapping_offset_); in WriteIndexBssMappings()
2916 DCHECK_EQ(0u, oat_dex_file->type_bss_mapping_offset_); in WriteIndexBssMappings()
2922 DCHECK_EQ(relative_offset, oat_dex_file->public_type_bss_mapping_offset_); in WriteIndexBssMappings()
2932 DCHECK_EQ(0u, oat_dex_file->public_type_bss_mapping_offset_); in WriteIndexBssMappings()
2938 DCHECK_EQ(relative_offset, oat_dex_file->package_type_bss_mapping_offset_); in WriteIndexBssMappings()
2948 DCHECK_EQ(0u, oat_dex_file->package_type_bss_mapping_offset_); in WriteIndexBssMappings()
2954 DCHECK_EQ(relative_offset, oat_dex_file->string_bss_mapping_offset_); in WriteIndexBssMappings()
2970 DCHECK_EQ(0u, oat_dex_file->string_bss_mapping_offset_); in WriteIndexBssMappings()
2980 OatDexFile* oat_dex_file = &oat_dex_files_[i]; in WriteOatDexFiles() local
2981 DCHECK_EQ(relative_offset, oat_dex_file->offset_); in WriteOatDexFiles()
2985 if (!oat_dex_file->Write(this, out)) { in WriteOatDexFiles()
2988 relative_offset += oat_dex_file->SizeOf(); in WriteOatDexFiles()
3110 for (OatDexFile& oat_dex_file : oat_dex_files_) { in WriteDexFiles()
3111 if (!oat_dex_file.source_.IsZipEntry()) { in WriteDexFiles()
3115 ZipEntry* entry = oat_dex_file.source_.GetZipEntry(); in WriteDexFiles()
3134 for (OatDexFile& oat_dex_file : oat_dex_files_) { in WriteDexFiles()
3138 if (!LayoutDexFile(&oat_dex_file)) { in WriteDexFiles()
3146 for (OatDexFile& oat_dex_file : oat_dex_files_) { in WriteDexFiles()
3150 oat_dex_file.dex_file_offset_ = vdex_size_with_dex_files; in WriteDexFiles()
3152 if (oat_dex_file.dex_file_size_ < sizeof(DexFile::Header)) { in WriteDexFiles()
3153 LOG(ERROR) << "Dex file " << oat_dex_file.GetLocation() << " is too short: " in WriteDexFiles()
3154 << oat_dex_file.dex_file_size_ << " < " << sizeof(DexFile::Header); in WriteDexFiles()
3157 vdex_size_with_dex_files += oat_dex_file.dex_file_size_; in WriteDexFiles()
3167 for (const OatDexFile& oat_dex_file : oat_dex_files_) { in WriteDexFiles() local
3168 if (!oat_dex_file.source_.IsRawData()) { in WriteDexFiles()
3171 const uint8_t* raw_data = oat_dex_file.source_.GetRawData(); in WriteDexFiles()
3226 for (OatDexFile& oat_dex_file : oat_dex_files_) { in WriteDexFiles()
3232 if (!WriteDexFile(file, &oat_dex_file, update_input_vdex)) { in WriteDexFiles()
3262 for (OatDexFile& oat_dex_file : oat_dex_files_) { in WriteDexFiles()
3264 reinterpret_cast<DexFile::Header*>(vdex_begin_ + oat_dex_file.dex_file_offset_); in WriteDexFiles()
3269 CHECK_GT(vdex_dex_shared_data_offset_, oat_dex_file.dex_file_offset_); in WriteDexFiles()
3271 header->data_off_ = vdex_dex_shared_data_offset_ - oat_dex_file.dex_file_offset_; in WriteDexFiles()
3286 for (OatDexFile& oat_dex_file : oat_dex_files_) { in CloseSources()
3287 oat_dex_file.source_.Clear(); // Get rid of the reference, it's about to be invalidated. in CloseSources()
3295 OatDexFile* oat_dex_file, in WriteDexFile() argument
3297 DCHECK_EQ(vdex_size_, oat_dex_file->dex_file_offset_); in WriteDexFile()
3298 if (oat_dex_file->source_.IsZipEntry()) { in WriteDexFile()
3300 if (!WriteDexFile(file, oat_dex_file, oat_dex_file->source_.GetZipEntry())) { in WriteDexFile()
3303 } else if (oat_dex_file->source_.IsRawFile()) { in WriteDexFile()
3305 if (!WriteDexFile(file, oat_dex_file, oat_dex_file->source_.GetRawFile())) { in WriteDexFile()
3309 DCHECK(oat_dex_file->source_.IsRawData()); in WriteDexFile()
3310 const uint8_t* raw_data = oat_dex_file->source_.GetRawData(); in WriteDexFile()
3311 if (!WriteDexFile(oat_dex_file, raw_data, update_input_vdex)) { in WriteDexFile()
3317 vdex_size_ += oat_dex_file->dex_file_size_; in WriteDexFile()
3318 size_dex_file_ += oat_dex_file->dex_file_size_; in WriteDexFile()
3322 bool OatWriter::LayoutDexFile(OatDexFile* oat_dex_file) { in LayoutDexFile() argument
3325 std::string location(oat_dex_file->GetLocation()); in LayoutDexFile()
3328 if (oat_dex_file->source_.IsZipEntry()) { in LayoutDexFile()
3329 ZipEntry* zip_entry = oat_dex_file->source_.GetZipEntry(); in LayoutDexFile()
3346 } else if (oat_dex_file->source_.IsRawFile()) { in LayoutDexFile()
3347 File* raw_file = oat_dex_file->source_.GetRawFile(); in LayoutDexFile()
3361 CHECK(oat_dex_file->source_.IsRawData()) in LayoutDexFile()
3362 << static_cast<size_t>(oat_dex_file->source_.GetType()); in LayoutDexFile()
3363 const uint8_t* raw_dex_file = oat_dex_file->source_.GetRawData(); in LayoutDexFile()
3367 DCHECK(ValidateDexFileHeader(raw_dex_file, oat_dex_file->GetLocation())); in LayoutDexFile()
3373 oat_dex_file->dex_file_location_checksum_, in LayoutDexFile()
3394 oat_dex_file->dex_sections_layout_ = dex_layout.GetSections(); in LayoutDexFile()
3395 oat_dex_file->source_.SetDexLayoutData(dex_container_->GetMainSection()->ReleaseData()); in LayoutDexFile()
3399 AsUnalignedDexFileHeader(oat_dex_file->source_.GetRawData()); in LayoutDexFile()
3400 oat_dex_file->dex_file_size_ = header->file_size_; in LayoutDexFile()
3410 CHECK_EQ(oat_dex_file->dex_file_location_checksum_, dex_file->GetLocationChecksum()); in LayoutDexFile()
3415 OatDexFile* oat_dex_file, in WriteDexFile() argument
3417 uint8_t* raw_output = vdex_begin_ + oat_dex_file->dex_file_offset_; in WriteDexFile()
3423 << " File: " << oat_dex_file->GetLocation() << " Output: " << file->GetPath(); in WriteDexFile()
3431 OatDexFile* oat_dex_file, in WriteDexFile() argument
3433 uint8_t* raw_output = vdex_begin_ + oat_dex_file->dex_file_offset_; in WriteDexFile()
3435 if (!dex_file->PreadFully(raw_output, oat_dex_file->dex_file_size_, /*offset=*/ 0u)) { in WriteDexFile()
3437 << " File: " << oat_dex_file->GetLocation() << " Output: " << file->GetPath(); in WriteDexFile()
3444 bool OatWriter::WriteDexFile(OatDexFile* oat_dex_file, in WriteDexFile() argument
3450 DCHECK(ValidateDexFileHeader(dex_file, oat_dex_file->GetLocation())); in WriteDexFile()
3451 DCHECK_EQ(oat_dex_file->dex_file_size_, AsUnalignedDexFileHeader(dex_file)->file_size_); in WriteDexFile()
3456 uint8_t* raw_output = vdex_begin_ + oat_dex_file->dex_file_offset_; in WriteDexFile()
3457 memcpy(raw_output, dex_file, oat_dex_file->dex_file_size_); in WriteDexFile()
3478 for (OatDexFile& oat_dex_file : oat_dex_files_) { in OpenDexFiles()
3480 maps.emplace_back(oat_dex_file.source_.GetZipEntry()->MapDirectlyOrExtract( in OpenDexFiles()
3481 oat_dex_file.dex_file_location_data_, "zipped dex", &error_msg, alignof(DexFile))); in OpenDexFiles()
3491 oat_dex_file.GetLocation(), in OpenDexFiles()
3492 oat_dex_file.dex_file_location_checksum_, in OpenDexFiles()
3498 LOG(ERROR) << "Failed to open dex file from oat file. File: " << oat_dex_file.GetLocation() in OpenDexFiles()
3502 oat_dex_file.class_offsets_.resize(dex_files.back()->GetHeader().class_defs_size_); in OpenDexFiles()
3517 for (OatDexFile& oat_dex_file : oat_dex_files_) { in OpenDexFiles()
3518 const uint8_t* raw_dex_file = vdex_begin_ + oat_dex_file.dex_file_offset_; in OpenDexFiles()
3523 CHECK(ValidateDexFileHeader(raw_dex_file, oat_dex_file.GetLocation())) in OpenDexFiles()
3529 CHECK_EQ(header->file_size_, oat_dex_file.dex_file_size_) in OpenDexFiles()
3531 << oat_dex_file.dex_file_size_ << " Actual: " << header->file_size_ in OpenDexFiles()
3538 oat_dex_file.dex_file_size_, in OpenDexFiles()
3539 oat_dex_file.GetLocation(), in OpenDexFiles()
3540 oat_dex_file.dex_file_location_checksum_, in OpenDexFiles()
3546 LOG(ERROR) << "Failed to open dex file from oat file. File: " << oat_dex_file.GetLocation() in OpenDexFiles()
3553 oat_dex_file.class_offsets_.resize(dex_files.back()->GetHeader().class_defs_size_); in OpenDexFiles()
3565 OatDexFile* oat_dex_file = &oat_dex_files_[i]; in InitializeTypeLookupTables() local
3566 DCHECK_EQ(oat_dex_file->lookup_table_offset_, 0u); in InitializeTypeLookupTables()
3568 size_t table_size = TypeLookupTable::RawDataLength(oat_dex_file->class_offsets_.size()); in InitializeTypeLookupTables()
3604 OatDexFile* oat_dex_file = &oat_dex_files_[i]; in WriteDexLayoutSections() local
3605 DCHECK_EQ(oat_dex_file->dex_sections_layout_offset_, 0u); in WriteDexLayoutSections()
3614 << " File: " << oat_dex_file->GetLocation() in WriteDexLayoutSections()
3625 DCHECK(oat_dex_file != nullptr); in WriteDexLayoutSections()
3626 if (!oat_rodata->WriteFully(&oat_dex_file->dex_sections_layout_, in WriteDexLayoutSections()
3627 sizeof(oat_dex_file->dex_sections_layout_))) { in WriteDexLayoutSections()
3629 << " File: " << oat_dex_file->GetLocation() in WriteDexLayoutSections()
3633 oat_dex_file->dex_sections_layout_offset_ = rodata_offset; in WriteDexLayoutSections()
3634 size_oat_dex_file_dex_layout_sections_ += sizeof(oat_dex_file->dex_sections_layout_); in WriteDexLayoutSections()
3635 rodata_offset += sizeof(oat_dex_file->dex_sections_layout_); in WriteDexLayoutSections()
3670 OatDexFile* oat_dex_file = &oat_dex_files_[i]; in WriteTypeLookupTables() local
3675 oat_dex_file->lookup_table_offset_ = 0u; in WriteTypeLookupTables()
3677 oat_dex_file->lookup_table_offset_ = vdex_size_ + sizeof(uint32_t); in WriteTypeLookupTables()
3760 OatDexFile* oat_dex_file = &oat_dex_files_[i]; in FinishVdexFile() local
3761 checksums_data[i] = oat_dex_file->dex_file_location_checksum_; in FinishVdexFile()
4081 const OatDexFile& oat_dex_file = oat_dex_files_[i]; in GetDebugInfo() local
4082 uint32_t dex_file_offset = oat_dex_file.dex_file_offset_; in GetDebugInfo()