Lines Matching refs:oat_dex_file

669   for (const OatDexFile& oat_dex_file : oat_dex_files_) {  in GetSourceLocations()  local
670 locations.push_back(oat_dex_file.GetLocation()); in GetSourceLocations()
960 for (const OatDexFile& oat_dex_file : writer_->oat_dex_files_) { in InitOatClassesMethodVisitor() local
961 num_classes += oat_dex_file.class_offsets_.size(); in InitOatClassesMethodVisitor()
2047 for (OatDexFile& oat_dex_file : oat_dex_files_) { in InitClassOffsets()
2048 DCHECK_EQ(oat_dex_file.class_offsets_offset_, 0u); in InitClassOffsets()
2049 if (!oat_dex_file.class_offsets_.empty()) { in InitClassOffsets()
2052 oat_dex_file.class_offsets_offset_ = offset; in InitClassOffsets()
2053 offset += oat_dex_file.GetClassOffsetsRawSize(); in InitClassOffsets()
2069 for (OatDexFile& oat_dex_file : oat_dex_files_) { in InitOatClasses()
2070 for (uint32_t& class_offset : oat_dex_file.class_offsets_) { in InitOatClasses()
2195 for (OatDexFile& oat_dex_file : oat_dex_files_) { in InitOatDexFiles()
2196 oat_dex_file.offset_ = offset; in InitOatDexFiles()
2197 offset += oat_dex_file.SizeOf(); in InitOatDexFiles()
2573 for (const OatDexFile& oat_dex_file : oat_dex_files_) { in WriteQuickeningInfo() local
2575 vdex_begin_ + oat_dex_file.dex_file_offset_ - sizeof(VdexFile::QuickeningTableOffsetType)); in WriteQuickeningInfo()
2819 for (OatDexFile& oat_dex_file : oat_dex_files_) { in WriteClassOffsets()
2820 if (oat_dex_file.class_offsets_offset_ != 0u) { in WriteClassOffsets()
2830 if (!oat_dex_file.WriteClassOffsets(this, out)) { in WriteClassOffsets()
2833 relative_offset += oat_dex_file.GetClassOffsetsRawSize(); in WriteClassOffsets()
2934 OatDexFile* oat_dex_file = &oat_dex_files_[i]; in WriteIndexBssMappings() local
2938 DCHECK_EQ(relative_offset, oat_dex_file->method_bss_mapping_offset_); in WriteIndexBssMappings()
2954 DCHECK_EQ(0u, oat_dex_file->method_bss_mapping_offset_); in WriteIndexBssMappings()
2960 DCHECK_EQ(relative_offset, oat_dex_file->type_bss_mapping_offset_); in WriteIndexBssMappings()
2976 DCHECK_EQ(0u, oat_dex_file->type_bss_mapping_offset_); in WriteIndexBssMappings()
2982 DCHECK_EQ(relative_offset, oat_dex_file->string_bss_mapping_offset_); in WriteIndexBssMappings()
2998 DCHECK_EQ(0u, oat_dex_file->string_bss_mapping_offset_); in WriteIndexBssMappings()
3008 OatDexFile* oat_dex_file = &oat_dex_files_[i]; in WriteOatDexFiles() local
3009 DCHECK_EQ(relative_offset, oat_dex_file->offset_); in WriteOatDexFiles()
3013 if (!oat_dex_file->Write(this, out)) { in WriteOatDexFiles()
3016 relative_offset += oat_dex_file->SizeOf(); in WriteOatDexFiles()
3137 for (OatDexFile& oat_dex_file : oat_dex_files_) { in WriteDexFiles()
3138 if (!oat_dex_file.source_.IsZipEntry()) { in WriteDexFiles()
3142 ZipEntry* entry = oat_dex_file.source_.GetZipEntry(); in WriteDexFiles()
3163 for (OatDexFile& oat_dex_file : oat_dex_files_) { in WriteDexFiles()
3167 if (!LayoutDexFile(&oat_dex_file)) { in WriteDexFiles()
3175 for (OatDexFile& oat_dex_file : oat_dex_files_) { in WriteDexFiles()
3181 oat_dex_file.dex_file_offset_ = vdex_size_with_dex_files; in WriteDexFiles()
3183 if (oat_dex_file.dex_file_size_ < sizeof(DexFile::Header)) { in WriteDexFiles()
3184 LOG(ERROR) << "Dex file " << oat_dex_file.GetLocation() << " is too short: " in WriteDexFiles()
3185 << oat_dex_file.dex_file_size_ << " < " << sizeof(DexFile::Header); in WriteDexFiles()
3188 vdex_size_with_dex_files += oat_dex_file.dex_file_size_; in WriteDexFiles()
3198 for (const OatDexFile& oat_dex_file : oat_dex_files_) { in WriteDexFiles() local
3199 if (!oat_dex_file.source_.IsRawData()) { in WriteDexFiles()
3202 const uint8_t* raw_data = oat_dex_file.source_.GetRawData(); in WriteDexFiles()
3257 for (OatDexFile& oat_dex_file : oat_dex_files_) { in WriteDexFiles()
3272 if (!WriteDexFile(file, &oat_dex_file, update_input_vdex)) { in WriteDexFiles()
3302 for (OatDexFile& oat_dex_file : oat_dex_files_) { in WriteDexFiles()
3304 reinterpret_cast<DexFile::Header*>(vdex_begin_ + oat_dex_file.dex_file_offset_); in WriteDexFiles()
3309 CHECK_GT(vdex_dex_shared_data_offset_, oat_dex_file.dex_file_offset_); in WriteDexFiles()
3311 header->data_off_ = vdex_dex_shared_data_offset_ - oat_dex_file.dex_file_offset_; in WriteDexFiles()
3326 for (OatDexFile& oat_dex_file : oat_dex_files_) { in CloseSources()
3327 oat_dex_file.source_.Clear(); // Get rid of the reference, it's about to be invalidated. in CloseSources()
3335 OatDexFile* oat_dex_file, in WriteDexFile() argument
3337 DCHECK_EQ(vdex_size_, oat_dex_file->dex_file_offset_); in WriteDexFile()
3338 if (oat_dex_file->source_.IsZipEntry()) { in WriteDexFile()
3340 if (!WriteDexFile(file, oat_dex_file, oat_dex_file->source_.GetZipEntry())) { in WriteDexFile()
3343 } else if (oat_dex_file->source_.IsRawFile()) { in WriteDexFile()
3345 if (!WriteDexFile(file, oat_dex_file, oat_dex_file->source_.GetRawFile())) { in WriteDexFile()
3349 DCHECK(oat_dex_file->source_.IsRawData()); in WriteDexFile()
3350 const uint8_t* raw_data = oat_dex_file->source_.GetRawData(); in WriteDexFile()
3351 if (!WriteDexFile(oat_dex_file, raw_data, update_input_vdex)) { in WriteDexFile()
3357 vdex_size_ += oat_dex_file->dex_file_size_; in WriteDexFile()
3358 size_dex_file_ += oat_dex_file->dex_file_size_; in WriteDexFile()
3362 bool OatWriter::LayoutDexFile(OatDexFile* oat_dex_file) { in LayoutDexFile() argument
3365 std::string location(oat_dex_file->GetLocation()); in LayoutDexFile()
3368 if (oat_dex_file->source_.IsZipEntry()) { in LayoutDexFile()
3369 ZipEntry* zip_entry = oat_dex_file->source_.GetZipEntry(); in LayoutDexFile()
3386 } else if (oat_dex_file->source_.IsRawFile()) { in LayoutDexFile()
3387 File* raw_file = oat_dex_file->source_.GetRawFile(); in LayoutDexFile()
3401 CHECK(oat_dex_file->source_.IsRawData()) in LayoutDexFile()
3402 << static_cast<size_t>(oat_dex_file->source_.GetType()); in LayoutDexFile()
3403 const uint8_t* raw_dex_file = oat_dex_file->source_.GetRawData(); in LayoutDexFile()
3407 DCHECK(ValidateDexFileHeader(raw_dex_file, oat_dex_file->GetLocation())); in LayoutDexFile()
3413 oat_dex_file->dex_file_location_checksum_, in LayoutDexFile()
3434 oat_dex_file->dex_sections_layout_ = dex_layout.GetSections(); in LayoutDexFile()
3435 oat_dex_file->source_.SetDexLayoutData(dex_container_->GetMainSection()->ReleaseData()); in LayoutDexFile()
3439 AsUnalignedDexFileHeader(oat_dex_file->source_.GetRawData()); in LayoutDexFile()
3440 oat_dex_file->dex_file_size_ = header->file_size_; in LayoutDexFile()
3450 CHECK_EQ(oat_dex_file->dex_file_location_checksum_, dex_file->GetLocationChecksum()); in LayoutDexFile()
3455 OatDexFile* oat_dex_file, in WriteDexFile() argument
3457 uint8_t* raw_output = vdex_begin_ + oat_dex_file->dex_file_offset_; in WriteDexFile()
3463 << " File: " << oat_dex_file->GetLocation() << " Output: " << file->GetPath(); in WriteDexFile()
3471 OatDexFile* oat_dex_file, in WriteDexFile() argument
3473 uint8_t* raw_output = vdex_begin_ + oat_dex_file->dex_file_offset_; in WriteDexFile()
3475 if (!dex_file->PreadFully(raw_output, oat_dex_file->dex_file_size_, /*offset=*/ 0u)) { in WriteDexFile()
3477 << " File: " << oat_dex_file->GetLocation() << " Output: " << file->GetPath(); in WriteDexFile()
3484 bool OatWriter::WriteDexFile(OatDexFile* oat_dex_file, in WriteDexFile() argument
3490 DCHECK(ValidateDexFileHeader(dex_file, oat_dex_file->GetLocation())); in WriteDexFile()
3491 DCHECK_EQ(oat_dex_file->dex_file_size_, AsUnalignedDexFileHeader(dex_file)->file_size_); in WriteDexFile()
3496 uint8_t* raw_output = vdex_begin_ + oat_dex_file->dex_file_offset_; in WriteDexFile()
3497 memcpy(raw_output, dex_file, oat_dex_file->dex_file_size_); in WriteDexFile()
3518 for (OatDexFile& oat_dex_file : oat_dex_files_) { in OpenDexFiles()
3520 maps.emplace_back(oat_dex_file.source_.GetZipEntry()->MapDirectlyOrExtract( in OpenDexFiles()
3521 oat_dex_file.dex_file_location_data_, "zipped dex", &error_msg, alignof(DexFile))); in OpenDexFiles()
3531 oat_dex_file.GetLocation(), in OpenDexFiles()
3532 oat_dex_file.dex_file_location_checksum_, in OpenDexFiles()
3538 LOG(ERROR) << "Failed to open dex file from oat file. File: " << oat_dex_file.GetLocation() in OpenDexFiles()
3542 oat_dex_file.class_offsets_.resize(dex_files.back()->GetHeader().class_defs_size_); in OpenDexFiles()
3557 for (OatDexFile& oat_dex_file : oat_dex_files_) { in OpenDexFiles()
3558 const uint8_t* raw_dex_file = vdex_begin_ + oat_dex_file.dex_file_offset_; in OpenDexFiles()
3563 CHECK(ValidateDexFileHeader(raw_dex_file, oat_dex_file.GetLocation())) in OpenDexFiles()
3569 CHECK_EQ(header->file_size_, oat_dex_file.dex_file_size_) in OpenDexFiles()
3571 << oat_dex_file.dex_file_size_ << " Actual: " << header->file_size_ in OpenDexFiles()
3578 oat_dex_file.dex_file_size_, in OpenDexFiles()
3579 oat_dex_file.GetLocation(), in OpenDexFiles()
3580 oat_dex_file.dex_file_location_checksum_, in OpenDexFiles()
3586 LOG(ERROR) << "Failed to open dex file from oat file. File: " << oat_dex_file.GetLocation() in OpenDexFiles()
3593 oat_dex_file.class_offsets_.resize(dex_files.back()->GetHeader().class_defs_size_); in OpenDexFiles()
3614 OatDexFile* oat_dex_file = &oat_dex_files_[i]; in WriteTypeLookupTables() local
3615 DCHECK_EQ(oat_dex_file->lookup_table_offset_, 0u); in WriteTypeLookupTables()
3617 if (oat_dex_file->create_type_lookup_table_ != CreateTypeLookupTable::kCreate || in WriteTypeLookupTables()
3618 oat_dex_file->class_offsets_.empty()) { in WriteTypeLookupTables()
3622 size_t table_size = TypeLookupTable::RawDataLength(oat_dex_file->class_offsets_.size()); in WriteTypeLookupTables()
3650 << " File: " << oat_dex_file->GetLocation() in WriteTypeLookupTables()
3662 << " File: " << oat_dex_file->GetLocation() in WriteTypeLookupTables()
3667 oat_dex_file->lookup_table_offset_ = rodata_offset; in WriteTypeLookupTables()
3702 OatDexFile* oat_dex_file = &oat_dex_files_[i]; in WriteDexLayoutSections() local
3703 DCHECK_EQ(oat_dex_file->dex_sections_layout_offset_, 0u); in WriteDexLayoutSections()
3712 << " File: " << oat_dex_file->GetLocation() in WriteDexLayoutSections()
3723 DCHECK(oat_dex_file != nullptr); in WriteDexLayoutSections()
3724 if (!oat_rodata->WriteFully(&oat_dex_file->dex_sections_layout_, in WriteDexLayoutSections()
3725 sizeof(oat_dex_file->dex_sections_layout_))) { in WriteDexLayoutSections()
3727 << " File: " << oat_dex_file->GetLocation() in WriteDexLayoutSections()
3731 oat_dex_file->dex_sections_layout_offset_ = rodata_offset; in WriteDexLayoutSections()
3732 size_oat_dex_file_dex_layout_sections_ += sizeof(oat_dex_file->dex_sections_layout_); in WriteDexLayoutSections()
3733 rodata_offset += sizeof(oat_dex_file->dex_sections_layout_); in WriteDexLayoutSections()
3815 OatDexFile* oat_dex_file = &oat_dex_files_[i]; in FinishVdexFile() local
3816 checksums_data[i] = oat_dex_file->dex_file_location_checksum_; in FinishVdexFile()
4107 const OatDexFile& oat_dex_file = oat_dex_files_[i]; in GetDebugInfo() local
4108 uint32_t dex_file_offset = oat_dex_file.dex_file_offset_; in GetDebugInfo()