Home
last modified time | relevance | path

Searched refs:image_file (Results 1 – 9 of 9) sorted by relevance

/art/runtime/oat/
Dimage.cc335 bool ImageHeader::WriteData(const ImageFileGuard& image_file, in WriteData() argument
377 image_file->GetPath() + ": " + std::string(strerror(errno)); in WriteData()
395 if (!image_file->PwriteFully(image_data.data(), image_data.size(), out_offset)) { in WriteData()
397 image_file->GetPath() + ": " + std::string(strerror(errno)); in WriteData()
411 if (!image_file->PwriteFully(&blocks[0], blocks_bytes, out_offset)) { in WriteData()
413 image_file->GetPath() + ": " + std::string(strerror(errno)); in WriteData()
431 if (!image_file->PwriteFully(bitmap_data, in WriteData()
435 image_file->GetPath() + ": " + std::string(strerror(errno)); in WriteData()
439 int err = image_file->Flush(); in WriteData()
441 *error_msg = "Failed to flush image file " + image_file->GetPath() + ": " + std::to_string(err); in WriteData()
[all …]
Dimage.h432 EXPORT bool WriteData(const ImageFileGuard& image_file,
545 void reset(File* image_file) { in reset() argument
546 image_file_.reset(image_file); in reset()
573 std::unique_ptr<File> image_file = std::move(image_file_); in WriteHeaderAndClose() local
574 if (image_file->FlushCloseOrErase() != 0) { in WriteHeaderAndClose()
/art/dex2oat/linker/
Dimage_test.cc246 ImageFileGuard image_file; in TEST_F() local
248 image_file.reset(OS::CreateEmptyFile(location.GetFilename().c_str())); in TEST_F()
254 image_file, in TEST_F()
270 image_file, in TEST_F()
Dimage_write_read_test.cc32 for (ScratchFile& image_file : helper.image_files) { in TestWriteRead()
33 std::unique_ptr<File> file(OS::OpenFileForReading(image_file.GetFilename().c_str())); in TestWriteRead()
Dimage_test.h137 for (ScratchFile& image_file : image_files) { in ~CompilationHelper()
138 image_file.Unlink(); in ~CompilationHelper()
152 for (ScratchFile& image_file : image_files) { in GetImageObjectSectionSizes()
153 std::unique_ptr<File> file(OS::OpenFileForReading(image_file.GetFilename().c_str())); in GetImageObjectSectionSizes()
Dimage_writer.cc600 ImageFileGuard image_file; in Write() local
603 image_file.reset(new File(image_fd, unix_file::kCheckSafeUsage)); in Write()
605 if (image_file != nullptr) { in Write()
606 TEMP_FAILURE_RETRY(image_file->SetLength(0)); in Write()
607 TEMP_FAILURE_RETRY(image_file->Flush()); in Write()
610 image_file.reset(OS::CreateEmptyFile(image_filename.c_str())); in Write()
613 if (image_file == nullptr) { in Write()
619 if (image_fd == -1 && !compiler_options_.IsAppImage() && fchmod(image_file->Fd(), 0644) != 0) { in Write()
627 if (!image_header->WriteData(image_file, in Write()
642 primary_image_file = std::move(image_file); in Write()
[all …]
/art/runtime/gc/space/
Dimage_space.cc155 static bool ReadSpecificImageHeader(File* image_file, in ReadSpecificImageHeader() argument
159 if (!image_file->PreadFully(image_header, sizeof(ImageHeader), /*offset=*/ 0)) { in ReadSpecificImageHeader()
173 std::unique_ptr<File> image_file(OS::OpenFileForReading(filename)); in ReadSpecificImageHeader() local
174 if (image_file.get() == nullptr) { in ReadSpecificImageHeader()
178 return ReadSpecificImageHeader(image_file.get(), filename, image_header, error_msg); in ReadSpecificImageHeader()
1828 auto image_file = bcp_image_fd >= 0 in ReadHeader() local
1831 if (!image_file || !image_file->IsOpened()) { in ReadHeader()
1836 if (!ReadSpecificImageHeader(image_file.get(), actual_filename.c_str(), &header, error_msg)) { in ReadHeader()
2039 File image_file(art_fd.release(), /*check_usage=*/ false); in CompileBootclasspathElements() local
2040 if (!ReadSpecificImageHeader(&image_file, "compiled image file", &header, error_msg)) { in CompileBootclasspathElements()
[all …]
/art/runtime/
Druntime_image.cc1897 ImageFileGuard image_file; in WriteImageToDisk() local
1898 image_file.reset(OS::CreateEmptyFileWriteOnly(temp_path.c_str())); in WriteImageToDisk()
1900 if (image_file == nullptr) { in WriteImageToDisk()
1916 image_file, in WriteImageToDisk()
1926 if (!image_file.WriteHeaderAndClose(temp_path, image->GetHeader(), error_msg)) { in WriteImageToDisk()
/art/odrefresh/
Dodrefresh.cc559 std::unique_ptr<File> image_file(OS::OpenFileForReading(image_path.c_str())); in AddCompiledBootClasspathFdsIfAny() local
560 if (image_file != nullptr) { in AddCompiledBootClasspathFdsIfAny()
561 bcp_image_fds.push_back(std::to_string(image_file->Fd())); in AddCompiledBootClasspathFdsIfAny()
562 opened_files.push_back(std::move(image_file)); in AddCompiledBootClasspathFdsIfAny()