Lines Matching refs:oat_index

663 size_t ImageWriter::GetImageOffset(mirror::Object* object, size_t oat_index) const {  in GetImageOffset()
664 BinSlot bin_slot = GetImageBinSlot(object, oat_index); in GetImageOffset()
665 const ImageInfo& image_info = GetImageInfo(oat_index); in GetImageOffset()
799 void ImageWriter::AssignImageBinSlot(mirror::Object* object, size_t oat_index, Bin bin) { in AssignImageBinSlot() argument
806 oat_index_map_.insert(std::make_pair(object, oat_index)); in AssignImageBinSlot()
811 ImageInfo& image_info = GetImageInfo(oat_index); in AssignImageBinSlot()
849 size_t oat_index = GetOatIndex(object); in IsImageBinSlotAssigned() local
850 const ImageInfo& image_info = GetImageInfo(oat_index); in IsImageBinSlotAssigned()
857 ImageWriter::BinSlot ImageWriter::GetImageBinSlot(mirror::Object* object, size_t oat_index) const { in GetImageBinSlot()
866 DCHECK_LT(bin_slot.GetOffset(), GetImageInfo(oat_index).GetBinSlotSize(bin_slot.GetBin())); in GetImageBinSlot()
872 size_t oat_index, in UpdateImageBinSlotOffset() argument
874 BinSlot old_bin_slot = GetImageBinSlot(object, oat_index); in UpdateImageBinSlotOffset()
875 DCHECK_LT(new_offset, GetImageInfo(oat_index).GetBinSlotSize(old_bin_slot.GetBin())); in UpdateImageBinSlotOffset()
1316 size_t oat_index; in CreateImageRoots() member
1335 size_t oat_index = it->second; in CreateImageRoots() local
1337 ++dex_cache_counts[oat_index]; in CreateImageRoots()
1339 dex_cache_records.push_back({data.registration_index, h_dex_cache, oat_index}); in CreateImageRoots()
1347 for (size_t oat_index = 0; oat_index != num_oat_files; ++oat_index) { in CreateImageRoots() local
1349 self, GetClassRoot<ObjectArray<Object>>(class_linker), dex_cache_counts[oat_index]); in CreateImageRoots()
1353 dex_cache_counts[oat_index] = 0u; // Reset count for filling in dex caches below. in CreateImageRoots()
1366 ObjPtr<ObjectArray<Object>> dex_caches = dex_cache_arrays[record.oat_index].Get(); in CreateImageRoots()
1368 dex_cache_counts[record.oat_index], record.dex_cache.Get()); in CreateImageRoots()
1369 ++dex_cache_counts[record.oat_index]; in CreateImageRoots()
1375 for (size_t oat_index = 0; oat_index != num_oat_files; ++oat_index) { in CreateImageRoots() local
1383 ObjPtr<ObjectArray<Object>> dex_caches = dex_cache_arrays[oat_index].Get(); in CreateImageRoots()
1384 CHECK_EQ(dex_cache_counts[oat_index], in CreateImageRoots()
1409 void ImageWriter::RecordNativeRelocations(ObjPtr<mirror::Class> klass, size_t oat_index) { in RecordNativeRelocations() argument
1411 DCHECK_EQ(oat_index, GetOatIndexForClass(klass)); in RecordNativeRelocations()
1420 ImageInfo& image_info = GetImageInfo(oat_index); in RecordNativeRelocations()
1431 oat_index, offset, NativeObjectRelocationType::kArtFieldArray in RecordNativeRelocations()
1467 oat_index, in RecordNativeRelocations()
1475 AssignMethodOffset(&m, type, oat_index); in RecordNativeRelocations()
1484 AssignJniStubMethodOffset(&m, oat_index); in RecordNativeRelocations()
1494 if (TryAssignImTableOffset(imt, oat_index)) { in RecordNativeRelocations()
1503 AssignMethodOffset(imt_method, NativeObjectRelocationType::kRuntimeMethod, oat_index); in RecordNativeRelocations()
1514 bool ImageWriter::TryAssignImTableOffset(ImTable* imt, size_t oat_index) { in TryAssignImTableOffset() argument
1520 ImageInfo& image_info = GetImageInfo(oat_index); in TryAssignImTableOffset()
1525 oat_index, in TryAssignImTableOffset()
1533 void ImageWriter::TryAssignConflictTableOffset(ImtConflictTable* table, size_t oat_index) { in TryAssignConflictTableOffset() argument
1540 ImageInfo& image_info = GetImageInfo(oat_index); in TryAssignConflictTableOffset()
1545 oat_index, in TryAssignConflictTableOffset()
1554 size_t oat_index) { in AssignMethodOffset() argument
1559 TryAssignConflictTableOffset(method->GetImtConflictTable(target_ptr_size_), oat_index); in AssignMethodOffset()
1561 ImageInfo& image_info = GetImageInfo(oat_index); in AssignMethodOffset()
1565 std::make_pair(method, NativeObjectRelocation{oat_index, offset, type})); in AssignMethodOffset()
1569 void ImageWriter::AssignJniStubMethodOffset(ArtMethod* method, size_t oat_index) { in AssignJniStubMethodOffset() argument
1573 ImageInfo& image_info = GetImageInfo(oat_index); in AssignJniStubMethodOffset()
1578 std::make_pair(method, JniStubMethodRelocation{oat_index, offset}))); in AssignJniStubMethodOffset()
1597 void SortDirtyObjects(const HashMap<mirror::Object*, uint32_t>& dirty_objects, size_t oat_index)
1625 void VisitReferences(ObjPtr<mirror::Object> obj, size_t oat_index)
1627 bool TryAssignBinSlot(ObjPtr<mirror::Object> obj, size_t oat_index)
1629 ImageWriter::Bin AssignImageBinSlot(ObjPtr<mirror::Object> object, size_t oat_index)
1631 void AssignImageBinSlot(ObjPtr<mirror::Object> object, size_t oat_index, Bin bin)
1747 size_t oat_index = pair.second; in ProcessCollectedClasses() local
1748 DCHECK(image_writer->image_infos_[oat_index].class_table_.has_value()); in ProcessCollectedClasses()
1749 ClassTable::ClassSet& class_table = *image_writer->image_infos_[oat_index].class_table_; in ProcessCollectedClasses()
1812 size_t oat_index, in CollectStringReferenceVisitor() argument
1816 oat_index_(oat_index), in CollectStringReferenceVisitor()
1863 VisitReferencesVisitor(LayoutHelper* helper, size_t oat_index) in VisitReferencesVisitor() argument
1864 : helper_(helper), oat_index_(oat_index) {} in VisitReferencesVisitor()
1985 size_t oat_index = entry.second; in ProcessDexFileObjects() local
1986 image_writer_->RecordNativeRelocations(klass, oat_index); in ProcessDexFileObjects()
1987 AssignImageBinSlot(klass.Ptr(), oat_index); in ProcessDexFileObjects()
1992 AssignImageBinSlot(pointer_array.Ptr(), oat_index, bin); in ProcessDexFileObjects()
2005 const size_t oat_index = it->second; in ProcessDexFileObjects() local
2012 bool assigned = TryAssignBinSlot(dex_cache, oat_index); in ProcessDexFileObjects()
2014 work_queue_.emplace_back(dex_cache, oat_index); in ProcessDexFileObjects()
2039 for (size_t oat_index = 0; oat_index != num_oat_files; ++oat_index) { in ProcessRoots() local
2042 vm, image_writer_->image_roots_[oat_index]); in ProcessRoots()
2043 AssignImageBinSlot(image_roots, oat_index, clean_bin); in ProcessRoots()
2044 work_queue_.emplace_back(image_roots, oat_index); in ProcessRoots()
2048 AssignImageBinSlot(dex_caches, oat_index, clean_bin); in ProcessRoots()
2049 work_queue_.emplace_back(dex_caches, oat_index); in ProcessRoots()
2087 const size_t oat_index = it->second; in ProcessInterns() local
2101 Bin bin = AssignImageBinSlot(string, oat_index); in ProcessInterns()
2114 for (size_t oat_index = 0, size = bin_objects_.size(); oat_index != size; ++oat_index) { in ProcessInterns() local
2115 size_t num_dex_file_interns = bin_objects_[oat_index][enum_cast<size_t>(Bin::kString)].size(); in ProcessInterns()
2116 ImageInfo& image_info = image_writer_->GetImageInfo(oat_index); in ProcessInterns()
2163 for (size_t oat_index = 0, size = bin_objects_.size(); oat_index != size; ++oat_index) { in FinalizeInternTables() local
2167 image_writer->GetOatIndex(non_dex_file_interns[ndfi_end]) == oat_index) { in FinalizeInternTables()
2172 ImageInfo& image_info = image_writer->GetImageInfo(oat_index); in FinalizeInternTables()
2190 const auto& oat_file_strings = bin_objects_[oat_index][enum_cast<size_t>(Bin::kString)]; in FinalizeInternTables()
2222 const HashMap<mirror::Object*, uint32_t>& dirty_objects, size_t oat_index) { in SortDirtyObjects() argument
2224 ImageInfo& image_info = image_writer_->GetImageInfo(oat_index); in SortDirtyObjects()
2226 dchecked_vector<mirror::Object*>& known_dirty = bin_objects_[oat_index][enum_cast<size_t>(bin)]; in SortDirtyObjects()
2238 const BinSlot bin_slot = image_writer_->GetImageBinSlot(obj, oat_index); in SortDirtyObjects()
2256 image_writer_->UpdateImageBinSlotOffset(obj, oat_index, offset); in SortDirtyObjects()
2354 for (size_t oat_index = 0; oat_index != num_image_infos; ++oat_index) { in FinalizeBinSlotOffsets() local
2355 ImageInfo& image_info = image_writer_->image_infos_[oat_index]; in FinalizeBinSlotOffsets()
2387 for (mirror::Object* object : bin_objects_[oat_index][i]) { in FinalizeBinSlotOffsets()
2388 BinSlot bin_slot = image_writer_->GetImageBinSlot(object, oat_index); in FinalizeBinSlotOffsets()
2424 image_writer_->UpdateImageBinSlotOffset(object, oat_index, object_offset); in FinalizeBinSlotOffsets()
2451 for (size_t oat_index = 0; oat_index != num_image_infos; ++oat_index) { in CollectStringReferenceInfo() local
2452 ImageInfo& image_info = image_writer_->image_infos_[oat_index]; in CollectStringReferenceInfo()
2457 for (mirror::Object* obj : bin_objects_[oat_index][i]) { in CollectStringReferenceInfo()
2459 oat_index, in CollectStringReferenceInfo()
2486 void ImageWriter::LayoutHelper::VisitReferences(ObjPtr<mirror::Object> obj, size_t oat_index) { in VisitReferences() argument
2488 VisitReferencesVisitor visitor(this, oat_index); in VisitReferences()
2500 bool ImageWriter::LayoutHelper::TryAssignBinSlot(ObjPtr<mirror::Object> obj, size_t oat_index) { in TryAssignBinSlot() argument
2507 AssignImageBinSlot(obj.Ptr(), oat_index); in TryAssignBinSlot()
2514 size_t oat_index) { in AssignImageBinSlot() argument
2517 AssignImageBinSlot(object.Ptr(), oat_index, bin); in AssignImageBinSlot()
2522 ObjPtr<mirror::Object> object, size_t oat_index, Bin bin) { in AssignImageBinSlot() argument
2526 image_writer_->AssignImageBinSlot(object.Ptr(), oat_index, bin); in AssignImageBinSlot()
2527 bin_objects_[oat_index][enum_cast<size_t>(bin)].push_back(object.Ptr()); in AssignImageBinSlot()
2614 for (size_t oat_index = 0; oat_index < image_infos_.size(); ++oat_index) { in CalculateNewObjectOffsets() local
2615 layout_helper.SortDirtyObjects(dirty_objects_, oat_index); in CalculateNewObjectOffsets()
2640 size_t oat_index = 0; in CalculateNewObjectOffsets() local
2643 vm, image_roots_[oat_index]); in CalculateNewObjectOffsets()
2645 ++oat_index; in CalculateNewObjectOffsets()
2652 ImageInfo& image_info = GetImageInfo(relocation.oat_index); in CalculateNewObjectOffsets()
2660 ImageInfo& image_info = GetImageInfo(relocation.oat_index); in CalculateNewObjectOffsets()
2778 void ImageWriter::CreateHeader(size_t oat_index, size_t component_count) { in CreateHeader() argument
2779 ImageInfo& image_info = GetImageInfo(oat_index); in CreateHeader()
2788 DCHECK_EQ(oat_index, 0u); in CreateHeader()
2793 if (oat_index == 0u) { in CreateHeader()
2809 if (oat_index == 0u) { in CreateHeader()
2836 LOG(INFO) << "Creating header for " << oat_filenames_[oat_index]; in CreateHeader()
2875 const ImageInfo& image_info = GetImageInfo(relocation.oat_index); in GetImageMethodAddress()
2956 void ImageWriter::CopyAndFixupNativeData(size_t oat_index) { in CopyAndFixupNativeData() argument
2957 const ImageInfo& image_info = GetImageInfo(oat_index); in CopyAndFixupNativeData()
2962 if (relocation.oat_index != oat_index) { in CopyAndFixupNativeData()
2974 oat_index); in CopyAndFixupNativeData()
3092 void ImageWriter::CopyAndFixupJniStubMethods(size_t oat_index) { in CopyAndFixupJniStubMethods() argument
3093 const ImageInfo& image_info = GetImageInfo(oat_index); in CopyAndFixupJniStubMethods()
3098 if (relocation.oat_index != oat_index) { in CopyAndFixupJniStubMethods()
3148 size_t oat_index = GetOatIndex(obj); in CopyObject() local
3149 size_t offset = GetImageOffset(obj, oat_index); in CopyObject()
3150 ImageInfo& image_info = GetImageInfo(oat_index); in CopyObject()
3326 const ImageInfo& image_info = GetImageInfo(relocation.oat_index); in NativeLocationInImage()
3538 size_t oat_index) { in CopyAndFixupMethod() argument
3603 const ImageInfo& image_info = image_infos_[oat_index]; in CopyAndFixupMethod()
3720 void ImageWriter::UpdateOatFileLayout(size_t oat_index, in UpdateOatFileLayout() argument
3733 ImageInfo& cur_image_info = GetImageInfo(oat_index); in UpdateOatFileLayout()
3745 if (oat_index + 1u != oat_filenames_.size()) { in UpdateOatFileLayout()
3747 ImageInfo& next_image_info = GetImageInfo(oat_index + 1u); in UpdateOatFileLayout()
3752 void ImageWriter::UpdateOatFileHeader(size_t oat_index, const OatHeader& oat_header) { in UpdateOatFileHeader() argument
3753 ImageInfo& cur_image_info = GetImageInfo(oat_index); in UpdateOatFileHeader()
3756 if (oat_index == GetDefaultOatIndex()) { in UpdateOatFileHeader()