Lines Matching refs:oat_dex_file
649 for (const OatDexFile& oat_dex_file : oat_dex_files_) { in GetSourceLocations() local
650 locations.push_back(oat_dex_file.GetLocation()); in GetSourceLocations()
933 for (const OatDexFile& oat_dex_file : writer_->oat_dex_files_) { in InitOatClassesMethodVisitor() local
934 num_classes += oat_dex_file.class_offsets_.size(); in InitOatClassesMethodVisitor()
2029 for (OatDexFile& oat_dex_file : oat_dex_files_) { in InitClassOffsets()
2030 DCHECK_EQ(oat_dex_file.class_offsets_offset_, 0u); in InitClassOffsets()
2031 if (!oat_dex_file.class_offsets_.empty()) { in InitClassOffsets()
2034 oat_dex_file.class_offsets_offset_ = offset; in InitClassOffsets()
2035 offset += oat_dex_file.GetClassOffsetsRawSize(); in InitClassOffsets()
2051 for (OatDexFile& oat_dex_file : oat_dex_files_) { in InitOatClasses()
2052 for (uint32_t& class_offset : oat_dex_file.class_offsets_) { in InitOatClasses()
2177 for (OatDexFile& oat_dex_file : oat_dex_files_) { in InitOatDexFiles()
2178 oat_dex_file.offset_ = offset; in InitOatDexFiles()
2179 offset += oat_dex_file.SizeOf(); in InitOatDexFiles()
2582 for (const OatDexFile& oat_dex_file : oat_dex_files_) { in WriteQuickeningInfo() local
2583 const off_t desired_offset = oat_dex_file.dex_file_offset_ - in WriteQuickeningInfo()
2864 for (OatDexFile& oat_dex_file : oat_dex_files_) { in WriteClassOffsets()
2865 if (oat_dex_file.class_offsets_offset_ != 0u) { in WriteClassOffsets()
2875 if (!oat_dex_file.WriteClassOffsets(this, out)) { in WriteClassOffsets()
2878 relative_offset += oat_dex_file.GetClassOffsetsRawSize(); in WriteClassOffsets()
2979 OatDexFile* oat_dex_file = &oat_dex_files_[i]; in WriteIndexBssMappings() local
2983 DCHECK_EQ(relative_offset, oat_dex_file->method_bss_mapping_offset_); in WriteIndexBssMappings()
2999 DCHECK_EQ(0u, oat_dex_file->method_bss_mapping_offset_); in WriteIndexBssMappings()
3005 DCHECK_EQ(relative_offset, oat_dex_file->type_bss_mapping_offset_); in WriteIndexBssMappings()
3021 DCHECK_EQ(0u, oat_dex_file->type_bss_mapping_offset_); in WriteIndexBssMappings()
3027 DCHECK_EQ(relative_offset, oat_dex_file->string_bss_mapping_offset_); in WriteIndexBssMappings()
3043 DCHECK_EQ(0u, oat_dex_file->string_bss_mapping_offset_); in WriteIndexBssMappings()
3053 OatDexFile* oat_dex_file = &oat_dex_files_[i]; in WriteOatDexFiles() local
3054 DCHECK_EQ(relative_offset, oat_dex_file->offset_); in WriteOatDexFiles()
3058 if (!oat_dex_file->Write(this, out)) { in WriteOatDexFiles()
3061 relative_offset += oat_dex_file->SizeOf(); in WriteOatDexFiles()
3177 for (OatDexFile& oat_dex_file : oat_dex_files_) { in WriteDexFiles()
3178 if (!oat_dex_file.source_.IsZipEntry()) { in WriteDexFiles()
3182 ZipEntry* entry = oat_dex_file.source_.GetZipEntry(); in WriteDexFiles()
3200 for (OatDexFile& oat_dex_file : oat_dex_files_) { in WriteDexFiles()
3201 if (!WriteDexFile(out, file, &oat_dex_file, update_input_vdex)) { in WriteDexFiles()
3231 for (OatDexFile& oat_dex_file : oat_dex_files_) { in WriteDexFiles()
3234 if (!file->PreadFully(&header, sizeof(header), oat_dex_file.dex_file_offset_)) { in WriteDexFiles()
3242 CHECK_GT(vdex_dex_shared_data_offset_, oat_dex_file.dex_file_offset_); in WriteDexFiles()
3244 header.data_off_ = vdex_dex_shared_data_offset_ - oat_dex_file.dex_file_offset_; in WriteDexFiles()
3247 if (!file->PwriteFully(&header, sizeof(header), oat_dex_file.dex_file_offset_)) { in WriteDexFiles()
3257 for (OatDexFile& oat_dex_file : oat_dex_files_) { in WriteDexFiles()
3259 if (!file->PreadFully(&header, sizeof(header), oat_dex_file.dex_file_offset_)) { in WriteDexFiles()
3268 oat_dex_file.dex_file_offset_; in WriteDexFiles()
3274 if (oat_dex_file.source_.IsRawData()) { in WriteDexFiles()
3276 const uint8_t* cur_data_begin = oat_dex_file.source_.GetRawData() + header.data_off_; in WriteDexFiles()
3314 for (OatDexFile& oat_dex_file : oat_dex_files_) { in CloseSources()
3315 oat_dex_file.source_.Clear(); // Get rid of the reference, it's about to be invalidated. in CloseSources()
3324 OatDexFile* oat_dex_file, in WriteDexFile() argument
3326 if (!SeekToDexFile(out, file, oat_dex_file)) { in WriteDexFile()
3334 if (!LayoutAndWriteDexFile(out, oat_dex_file)) { in WriteDexFile()
3337 } else if (oat_dex_file->source_.IsZipEntry()) { in WriteDexFile()
3339 if (!WriteDexFile(out, file, oat_dex_file, oat_dex_file->source_.GetZipEntry())) { in WriteDexFile()
3342 } else if (oat_dex_file->source_.IsRawFile()) { in WriteDexFile()
3344 if (!WriteDexFile(out, file, oat_dex_file, oat_dex_file->source_.GetRawFile())) { in WriteDexFile()
3348 DCHECK(oat_dex_file->source_.IsRawData()); in WriteDexFile()
3349 if (!WriteDexFile(out, oat_dex_file, oat_dex_file->source_.GetRawData(), update_input_vdex)) { in WriteDexFile()
3355 DCHECK_EQ(vdex_size_, oat_dex_file->dex_file_offset_); in WriteDexFile()
3356 vdex_size_ += oat_dex_file->dex_file_size_; in WriteDexFile()
3357 size_dex_file_ += oat_dex_file->dex_file_size_; in WriteDexFile()
3361 bool OatWriter::SeekToDexFile(OutputStream* out, File* file, OatDexFile* oat_dex_file) { in SeekToDexFile() argument
3380 << " File: " << oat_dex_file->GetLocation() << " Output: " << file->GetPath(); in SeekToDexFile()
3385 << " File: " << oat_dex_file->GetLocation() << " Output: " << file->GetPath(); in SeekToDexFile()
3392 << " File: " << oat_dex_file->GetLocation() << " Output: " << file->GetPath(); in SeekToDexFile()
3397 oat_dex_file->dex_file_offset_ = start_offset; in SeekToDexFile()
3401 bool OatWriter::LayoutAndWriteDexFile(OutputStream* out, OatDexFile* oat_dex_file) { in LayoutAndWriteDexFile() argument
3404 std::string location(oat_dex_file->GetLocation()); in LayoutAndWriteDexFile()
3407 if (oat_dex_file->source_.IsZipEntry()) { in LayoutAndWriteDexFile()
3408 ZipEntry* zip_entry = oat_dex_file->source_.GetZipEntry(); in LayoutAndWriteDexFile()
3425 } else if (oat_dex_file->source_.IsRawFile()) { in LayoutAndWriteDexFile()
3426 File* raw_file = oat_dex_file->source_.GetRawFile(); in LayoutAndWriteDexFile()
3440 CHECK(oat_dex_file->source_.IsRawData()) in LayoutAndWriteDexFile()
3441 << static_cast<size_t>(oat_dex_file->source_.GetType()); in LayoutAndWriteDexFile()
3442 const uint8_t* raw_dex_file = oat_dex_file->source_.GetRawData(); in LayoutAndWriteDexFile()
3446 DCHECK(ValidateDexFileHeader(raw_dex_file, oat_dex_file->GetLocation())); in LayoutAndWriteDexFile()
3452 oat_dex_file->dex_file_location_checksum_, in LayoutAndWriteDexFile()
3474 oat_dex_file->dex_sections_layout_ = dex_layout.GetSections(); in LayoutAndWriteDexFile()
3479 oat_dex_file->dex_file_size_ = header->file_size_; in LayoutAndWriteDexFile()
3489 if (!WriteDexFile(out, oat_dex_file, dex_src, /* update_input_vdex */ false)) { in LayoutAndWriteDexFile()
3497 CHECK_EQ(oat_dex_file->dex_file_location_checksum_, dex_file->GetLocationChecksum()); in LayoutAndWriteDexFile()
3503 OatDexFile* oat_dex_file, in WriteDexFile() argument
3512 << " File: " << oat_dex_file->GetLocation() << " Output: " << file->GetPath(); in WriteDexFile()
3517 << " File: " << oat_dex_file->GetLocation() << " Output: " << file->GetPath(); in WriteDexFile()
3523 << " File: " << oat_dex_file->GetLocation() << " Output: " << file->GetPath(); in WriteDexFile()
3529 << " File: " << oat_dex_file->GetLocation() << " Output: " << file->GetPath(); in WriteDexFile()
3535 << extracted_size << " File: " << oat_dex_file->GetLocation(); in WriteDexFile()
3544 << " File: " << oat_dex_file->GetLocation() << " Output: " << file->GetPath(); in WriteDexFile()
3547 if (extracted_size < oat_dex_file->dex_file_size_) { in WriteDexFile()
3549 << " file size from header: " << oat_dex_file->dex_file_size_ in WriteDexFile()
3550 << " File: " << oat_dex_file->GetLocation(); in WriteDexFile()
3555 size_t end_offset = start_offset + oat_dex_file->dex_file_size_; in WriteDexFile()
3560 << " File: " << oat_dex_file->GetLocation() << " Output: " << file->GetPath(); in WriteDexFile()
3566 << " Expected: " << end_offset << " File: " << oat_dex_file->GetLocation(); in WriteDexFile()
3571 << " File: " << oat_dex_file->GetLocation() << " Output: " << file->GetPath(); in WriteDexFile()
3576 if (extracted_size > oat_dex_file->dex_file_size_) { in WriteDexFile()
3579 << " File: " << oat_dex_file->GetLocation() in WriteDexFile()
3590 OatDexFile* oat_dex_file, in WriteDexFile() argument
3599 << " File: " << oat_dex_file->GetLocation() << " Output: " << file->GetPath(); in WriteDexFile()
3604 if (!file->Copy(dex_file, 0, oat_dex_file->dex_file_size_)) { in WriteDexFile()
3606 << " File: " << oat_dex_file->GetLocation() << " Output: " << file->GetPath(); in WriteDexFile()
3611 << " File: " << oat_dex_file->GetLocation() << " Output: " << file->GetPath(); in WriteDexFile()
3616 size_t end_offset = start_offset + oat_dex_file->dex_file_size_; in WriteDexFile()
3621 << " File: " << oat_dex_file->GetLocation() << " Output: " << file->GetPath(); in WriteDexFile()
3627 << " Expected: " << end_offset << " File: " << oat_dex_file->GetLocation(); in WriteDexFile()
3632 << " File: " << oat_dex_file->GetLocation() << " Output: " << file->GetPath(); in WriteDexFile()
3640 OatDexFile* oat_dex_file, in WriteDexFile() argument
3646 DCHECK(ValidateDexFileHeader(dex_file, oat_dex_file->GetLocation())); in WriteDexFile()
3653 PLOG(ERROR) << "Failed to write dex file " << oat_dex_file->GetLocation() in WriteDexFile()
3659 << " File: " << oat_dex_file->GetLocation(); in WriteDexFile()
3681 for (OatDexFile& oat_dex_file : oat_dex_files_) { in OpenDexFiles()
3683 maps.emplace_back(oat_dex_file.source_.GetZipEntry()->MapDirectlyOrExtract( in OpenDexFiles()
3684 oat_dex_file.dex_file_location_data_, "zipped dex", &error_msg, alignof(DexFile))); in OpenDexFiles()
3694 oat_dex_file.GetLocation(), in OpenDexFiles()
3695 oat_dex_file.dex_file_location_checksum_, in OpenDexFiles()
3701 LOG(ERROR) << "Failed to open dex file from oat file. File: " << oat_dex_file.GetLocation() in OpenDexFiles()
3705 oat_dex_file.class_offsets_.resize(dex_files.back()->GetHeader().class_defs_size_); in OpenDexFiles()
3736 for (OatDexFile& oat_dex_file : oat_dex_files_) { in OpenDexFiles()
3738 dex_files_map.Begin() + oat_dex_file.dex_file_offset_ - map_offset; in OpenDexFiles()
3743 CHECK(ValidateDexFileHeader(raw_dex_file, oat_dex_file.GetLocation())) in OpenDexFiles()
3749 CHECK_EQ(header->file_size_, oat_dex_file.dex_file_size_) in OpenDexFiles()
3751 << oat_dex_file.dex_file_size_ << " Actual: " << header->file_size_ in OpenDexFiles()
3757 oat_dex_file.dex_file_size_, in OpenDexFiles()
3758 oat_dex_file.GetLocation(), in OpenDexFiles()
3759 oat_dex_file.dex_file_location_checksum_, in OpenDexFiles()
3765 LOG(ERROR) << "Failed to open dex file from oat file. File: " << oat_dex_file.GetLocation() in OpenDexFiles()
3772 oat_dex_file.class_offsets_.resize(dex_files.back()->GetHeader().class_defs_size_); in OpenDexFiles()
3795 OatDexFile* oat_dex_file = &oat_dex_files_[i]; in WriteTypeLookupTables() local
3796 DCHECK_EQ(oat_dex_file->lookup_table_offset_, 0u); in WriteTypeLookupTables()
3798 if (oat_dex_file->create_type_lookup_table_ != CreateTypeLookupTable::kCreate || in WriteTypeLookupTables()
3799 oat_dex_file->class_offsets_.empty()) { in WriteTypeLookupTables()
3803 size_t table_size = TypeLookupTable::RawDataLength(oat_dex_file->class_offsets_.size()); in WriteTypeLookupTables()
3829 << " File: " << oat_dex_file->GetLocation() in WriteTypeLookupTables()
3841 << " File: " << oat_dex_file->GetLocation() in WriteTypeLookupTables()
3846 oat_dex_file->lookup_table_offset_ = rodata_offset; in WriteTypeLookupTables()
3882 OatDexFile* oat_dex_file = &oat_dex_files_[i]; in WriteDexLayoutSections() local
3883 DCHECK_EQ(oat_dex_file->dex_sections_layout_offset_, 0u); in WriteDexLayoutSections()
3892 << " File: " << oat_dex_file->GetLocation() in WriteDexLayoutSections()
3903 DCHECK(oat_dex_file != nullptr); in WriteDexLayoutSections()
3904 if (!oat_rodata->WriteFully(&oat_dex_file->dex_sections_layout_, in WriteDexLayoutSections()
3905 sizeof(oat_dex_file->dex_sections_layout_))) { in WriteDexLayoutSections()
3907 << " File: " << oat_dex_file->GetLocation() in WriteDexLayoutSections()
3911 oat_dex_file->dex_sections_layout_offset_ = rodata_offset; in WriteDexLayoutSections()
3912 size_oat_dex_file_dex_layout_sections_ += sizeof(oat_dex_file->dex_sections_layout_); in WriteDexLayoutSections()
3913 rodata_offset += sizeof(oat_dex_file->dex_sections_layout_); in WriteDexLayoutSections()
3937 OatDexFile* oat_dex_file = &oat_dex_files_[i]; in WriteChecksumsAndVdexHeader() local
3939 &oat_dex_file->dex_file_location_checksum_, sizeof(VdexFile::VdexChecksum))) { in WriteChecksumsAndVdexHeader()
4227 const OatDexFile& oat_dex_file = oat_dex_files_[i]; in GetDebugInfo() local
4228 uint32_t dex_file_offset = oat_dex_file.dex_file_offset_; in GetDebugInfo()