Home
last modified time | relevance | path

Searched refs:oat_file (Results 1 – 17 of 17) sorted by relevance

/art/runtime/
Doat_file.cc48 std::unique_ptr<OatFile> oat_file(new OatFile(location, false)); in OpenWithElfFile() local
49 oat_file->elf_file_.reset(elf_file); in OpenWithElfFile()
51 oat_file->begin_ = elf_file->Begin() + hdr->sh_offset; in OpenWithElfFile()
52 oat_file->end_ = elf_file->Begin() + hdr->sh_size + hdr->sh_offset; in OpenWithElfFile()
53 return oat_file->Setup(error_msg) ? oat_file.release() : nullptr; in OpenWithElfFile()
61 std::unique_ptr<OatFile> oat_file(new OatFile(location, false)); in OpenMemory() local
62 oat_file->begin_ = &oat_contents[0]; in OpenMemory()
63 oat_file->end_ = &oat_contents[oat_contents.size()]; in OpenMemory()
64 return oat_file->Setup(error_msg) ? oat_file.release() : nullptr; in OpenMemory()
117 std::unique_ptr<OatFile> oat_file(new OatFile(location, true)); in OpenDlopen() local
[all …]
Dclass_linker.cc660 const OatFile* ClassLinker::RegisterOatFile(const OatFile* oat_file) { in RegisterOatFile() argument
664 CHECK_NE(oat_file, oat_files_[i]) << oat_file->GetLocation(); in RegisterOatFile()
667 VLOG(class_linker) << "Registering " << oat_file->GetLocation(); in RegisterOatFile()
668 oat_files_.push_back(oat_file); in RegisterOatFile()
669 return oat_file; in RegisterOatFile()
674 OatFile* oat_file = space->ReleaseOatFile(); in GetImageOatFile() local
675 CHECK_EQ(RegisterOatFile(oat_file), oat_file); in GetImageOatFile()
677 return *oat_file; in GetImageOatFile()
690 for (const OatFile* oat_file : oat_files_) { in FindOpenedOatDexFile() local
691 DCHECK(oat_file != nullptr); in FindOpenedOatDexFile()
[all …]
Dclass_linker.h236 const OatFile* RegisterOatFile(const OatFile* oat_file)
285 static bool VerifyOatImageChecksum(const OatFile* oat_file, const InstructionSet instruction_set);
288 static bool VerifyOatChecksums(const OatFile* oat_file, const InstructionSet instruction_set,
291 static bool VerifyOatAndDexFileChecksums(const OatFile* oat_file,
589 bool CheckOatFile(const OatFile* oat_file, InstructionSet isa,
591 int32_t GetRequiredDelta(const OatFile* oat_file, InstructionSet isa);
629 bool VerifyOatWithDexFile(const OatFile* oat_file, const char* dex_location,
Doat_file.h205 OatClass(const OatFile* oat_file,
261 OatDexFile(const OatFile* oat_file,
Druntime.cc605 std::unique_ptr<OatFile> oat_file(OatFile::OpenWithElfFile(elf_file.release(), oat_location, in OpenDexFilesFromImage() local
607 if (oat_file.get() == nullptr) { in OpenDexFilesFromImage()
612 for (const OatFile::OatDexFile* oat_dex_file : oat_file->GetOatDexFiles()) { in OpenDexFilesFromImage()
624 Runtime::Current()->GetClassLinker()->RegisterOatFile(oat_file.release()); in OpenDexFilesFromImage()
DAndroid.mk133 oat_file.cc \
/art/compiler/
Delf_patcher.h43 const OatFile* oat_file, uintptr_t oat_data_begin,
57 const OatFile* oat_file, uintptr_t oat_data_begin, in Patch() argument
60 return ElfPatcher::Patch(driver, elf_file, oat_file, oat_data_begin, in Patch()
65 ElfPatcher(const CompilerDriver* driver, ElfFile* elf_file, const OatFile* oat_file, in ElfPatcher() argument
68 : compiler_driver_(driver), elf_file_(elf_file), oat_file_(oat_file), in ElfPatcher()
Delf_patcher.cc44 const OatFile* oat_file = class_linker->FindOpenedOatFileFromOatLocation(oat_location); in Patch() local
45 if (oat_file == nullptr) { in Patch()
47 oat_file = OatFile::Open(oat_location, oat_location, NULL, false, error_msg); in Patch()
48 if (oat_file == nullptr) { in Patch()
53 CHECK_EQ(class_linker->RegisterOatFile(oat_file), oat_file); in Patch()
55 return ElfPatcher::Patch(driver, elf_file, oat_file, in Patch()
56 reinterpret_cast<uintptr_t>(oat_file->Begin()), cb, cb_data, error_msg); in Patch()
59 bool ElfPatcher::Patch(const CompilerDriver* driver, ElfFile* elf, const OatFile* oat_file, in Patch() argument
73 ElfPatcher p(driver, elf, oat_file, oat_header, oat_data_start, cb, cb_data, error_msg); in Patch()
Delf_writer_mclinker.cc162 …std::unique_ptr<OatFile> oat_file(OatFile::OpenMemory(oat_contents, elf_file_->GetPath(), &error_m… in AddOatInput() local
163 CHECK(oat_file.get() != NULL) << elf_file_->GetPath() << ": " << error_msg; in AddOatInput()
165 const char* oat_data_start = reinterpret_cast<const char*>(&oat_file->GetOatHeader()); in AddOatInput()
166 const size_t oat_data_length = oat_file->GetOatHeader().GetExecutableOffset(); in AddOatInput()
168 const size_t oat_code_length = oat_file->Size() - oat_data_length; in AddOatInput()
208 oat_file->Size()); in AddOatInput()
Dimage_test.cc62 ScratchFile oat_file(OS::CreateEmptyFile(oat_filename.c_str())); in TEST_F() local
89 oat_file.GetFile()); in TEST_F()
94 std::unique_ptr<File> dup_oat(OS::OpenFileReadWrite(oat_file.GetFilename().c_str())); in TEST_F()
188 oat_file.Unlink(); in TEST_F()
Doat_test.cc138 std::unique_ptr<OatFile> oat_file(OatFile::Open(tmp.GetFilename(), tmp.GetFilename(), NULL, false, in TEST_F() local
140 ASSERT_TRUE(oat_file.get() != nullptr) << error_msg; in TEST_F()
141 const OatHeader& oat_header = oat_file->GetOatHeader(); in TEST_F()
150 const OatFile::OatDexFile* oat_dex_file = oat_file->GetOatDexFile(dex_file->GetLocation().c_str(), in TEST_F()
Dimage_writer.cc82 std::unique_ptr<File> oat_file(OS::OpenFileReadWrite(oat_filename.c_str())); in Write() local
83 if (oat_file.get() == NULL) { in Write()
88 oat_file_ = OatFile::OpenReadable(oat_file.get(), oat_location, &error_msg); in Write()
140 ElfWriter::GetOatElfInformation(oat_file.get(), oat_loaded_size, oat_data_offset); in Write()
144 PatchOatCodeAndMethods(oat_file.get()); in Write()
/art/patchoat/
Dpatchoat.h54 PatchOat(ElfFile* oat_file, off_t delta, TimingLogger* timings) in PatchOat() argument
55 : oat_file_(oat_file), delta_(delta), timings_(timings) {} in PatchOat()
60 PatchOat(ElfFile* oat_file, MemMap* image, gc::accounting::ContinuousSpaceBitmap* bitmap, in PatchOat() argument
62 : oat_file_(oat_file), image_(image), bitmap_(bitmap), heap_(heap), in PatchOat()
/art/dex2oat/
Ddex2oat.cc328 bool PatchOatCode(const CompilerDriver* compiler_driver, File* oat_file, in PatchOatCode() argument
332 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(oat_file, PROT_READ|PROT_WRITE, in PatchOatCode()
348 File* oat_file, in CreateOatFile() argument
424 if (!driver->WriteElf(android_root, is_host, dex_files, &oat_writer, oat_file)) { in CreateOatFile()
425 LOG(ERROR) << "Failed to write ELF file " << oat_file->GetPath(); in CreateOatFile()
432 oat_file->Flush(); in CreateOatFile()
437 if (!PatchOatCode(driver.get(), oat_file, oat_location, &error_msg)) { in CreateOatFile()
438 LOG(ERROR) << "Failed to fixup ELF file " << oat_file->GetPath() << ": " << error_msg; in CreateOatFile()
463 std::unique_ptr<File> oat_file(OS::OpenFileReadWrite(oat_filename.c_str())); in CreateImageFile() local
464 if (oat_file.get() == nullptr) { in CreateImageFile()
[all …]
/art/runtime/native/
Ddalvik_system_DexFile.cc292 std::unique_ptr<const OatFile> oat_file(OatFile::Open(oat_filename, oat_filename, nullptr, in CopyProfileFile() local
294 if (oat_file.get() == nullptr) { in CopyProfileFile()
304 const art::OatFile::OatDexFile* oat_dex_file = oat_file->GetOatDexFile(filename, nullptr, in CopyProfileFile()
314 if (ClassLinker::VerifyOatChecksums(oat_file.get(), target_instruction_set, &error_msg)) { in CopyProfileFile()
321 ClassLinker::VerifyOatImageChecksum(oat_file.get(), target_instruction_set)) { in CopyProfileFile()
336 if (ClassLinker::VerifyOatAndDexFileChecksums(oat_file.get(), filename, location_checksum, in CopyProfileFile()
345 && ClassLinker::VerifyOatImageChecksum(oat_file.get(), target_instruction_set)) { in CopyProfileFile()
/art/oatdump/
Doatdump.cc141 explicit OatDumper(const OatFile& oat_file, OatDumperOptions* options) in OatDumper() argument
142 : oat_file_(oat_file), in OatDumper()
143 oat_dex_files_(oat_file.GetOatDexFiles()), in OatDumper()
147 oat_file.Begin()))) { in OatDumper()
1034 const OatFile* oat_file = class_linker->FindOpenedOatFileFromOatLocation(oat_location); in Dump() local
1035 if (oat_file == nullptr) { in Dump()
1036 oat_file = OatFile::Open(oat_location, oat_location, nullptr, false, &error_msg); in Dump()
1037 if (oat_file == nullptr) { in Dump()
1044 stats_.oat_file_bytes = oat_file->Size(); in Dump()
1046 oat_dumper_.reset(new OatDumper(*oat_file, oat_dumper_options_.release())); in Dump()
[all …]
/art/runtime/gc/space/
Dimage_space.cc668 OatFile* oat_file = OatFile::Open(oat_filename, oat_filename, image_header.GetOatDataBegin(), in OpenOatFile() local
670 if (oat_file == NULL) { in OpenOatFile()
675 uint32_t oat_checksum = oat_file->GetOatHeader().GetChecksum(); in OpenOatFile()
683 int32_t oat_patch_delta = oat_file->GetOatHeader().GetImagePatchDelta(); in OpenOatFile()
691 return oat_file; in OpenOatFile()