Home
last modified time | relevance | path

Searched refs:oat_file (Results 1 – 20 of 20) 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()
119 std::unique_ptr<OatFile> oat_file(new OatFile(location, true)); in OpenDlopen() local
[all …]
Dclass_linker.cc676 const OatFile* ClassLinker::RegisterOatFile(const OatFile* oat_file) { in RegisterOatFile() argument
680 CHECK_NE(oat_file, oat_files_[i]) << oat_file->GetLocation(); in RegisterOatFile()
683 VLOG(class_linker) << "Registering " << oat_file->GetLocation(); in RegisterOatFile()
684 oat_files_.push_back(oat_file); in RegisterOatFile()
685 return oat_file; in RegisterOatFile()
690 OatFile* oat_file = space->ReleaseOatFile(); in GetImageOatFile() local
691 CHECK_EQ(RegisterOatFile(oat_file), oat_file); in GetImageOatFile()
693 return *oat_file; in GetImageOatFile()
706 for (const OatFile* oat_file : oat_files_) { in FindOpenedOatDexFile() local
707 DCHECK(oat_file != nullptr); in FindOpenedOatDexFile()
[all …]
Doat_file.h202 OatClass(const OatFile* oat_file,
258 OatDexFile(const OatFile* oat_file,
Dclass_linker.h240 const OatFile* RegisterOatFile(const OatFile* oat_file)
289 static bool VerifyOatImageChecksum(const OatFile* oat_file, const InstructionSet instruction_set);
292 static bool VerifyOatChecksums(const OatFile* oat_file, const InstructionSet instruction_set,
295 static bool VerifyOatAndDexFileChecksums(const OatFile* oat_file,
616 bool CheckOatFile(const Runtime* runtime, const OatFile* oat_file, InstructionSet isa,
655 bool VerifyOatWithDexFile(const OatFile* oat_file, const char* dex_location,
Ddex_file.h394 const OatFile* oat_file, in Open() argument
396 return OpenMemory(base, size, location, location_checksum, NULL, oat_file, error_msg); in Open()
933 const OatFile* oat_file,
940 const OatFile* oat_file);
Druntime.cc621 std::unique_ptr<OatFile> oat_file(OatFile::OpenWithElfFile(elf_file.release(), oat_location, in OpenDexFilesFromImage() local
623 if (oat_file.get() == nullptr) { in OpenDexFilesFromImage()
628 for (const OatFile::OatDexFile* oat_dex_file : oat_file->GetOatDexFiles()) { in OpenDexFilesFromImage()
640 Runtime::Current()->GetClassLinker()->RegisterOatFile(oat_file.release()); in OpenDexFilesFromImage()
Ddex_file.cc331 const OatFile* oat_file, in OpenMemory() argument
335 new DexFile(base, size, location, location_checksum, mem_map, oat_file)); in OpenMemory()
347 const OatFile* oat_file) in DexFile() argument
363 oat_file_(oat_file) { in DexFile()
DAndroid.mk133 oat_file.cc \
/art/dex2oat/
Ddex2oat.cc337 bool PatchOatCode(const CompilerDriver* compiler_driver, File* oat_file, in PatchOatCode() argument
341 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(oat_file, PROT_READ|PROT_WRITE, in PatchOatCode()
357 File* oat_file, in CreateOatFile() argument
437 if (!driver->WriteElf(android_root, is_host, dex_files, &oat_writer, oat_file)) { in CreateOatFile()
438 LOG(ERROR) << "Failed to write ELF file " << oat_file->GetPath(); in CreateOatFile()
439 oat_file->Erase(); in CreateOatFile()
446 if (oat_file->Flush() != 0) { in CreateOatFile()
447 PLOG(ERROR) << "Failed flushing oat file " << oat_file->GetPath(); in CreateOatFile()
448 oat_file->Erase(); in CreateOatFile()
455 if (!PatchOatCode(driver.get(), oat_file, oat_location, &error_msg)) { in CreateOatFile()
[all …]
/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, nullptr, nullptr, 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()
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()
107 << oat_file.GetFilename(); in TEST_F()
191 oat_file.Unlink(); in TEST_F()
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()
Doat_test.cc138 std::unique_ptr<OatFile> oat_file(OatFile::Open(tmp.GetFilename(), tmp.GetFilename(), nullptr, 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.cc89 std::unique_ptr<File> oat_file(OS::OpenFileReadWrite(oat_filename.c_str())); in Write() local
90 if (oat_file.get() == NULL) { in Write()
95 oat_file_ = OatFile::OpenReadable(oat_file.get(), oat_location, &error_msg); in Write()
147 ElfWriter::GetOatElfInformation(oat_file.get(), oat_loaded_size, oat_data_offset); in Write()
151 PatchOatCodeAndMethods(oat_file.get()); in Write()
156 if (oat_file->FlushCloseOrErase() != 0) { in Write()
/art/patchoat/
Dpatchoat.h62 PatchOat(ElfFile* oat_file, off_t delta, TimingLogger* timings) in PatchOat() argument
63 : oat_file_(oat_file), delta_(delta), isa_(kNone), timings_(timings) {} in PatchOat()
68 PatchOat(InstructionSet isa, ElfFile* oat_file, MemMap* image, in PatchOat() argument
71 : oat_file_(oat_file), image_(image), bitmap_(bitmap), heap_(heap), in PatchOat()
/art/test/117-nopatchoat/
Dnopatchoat.cc51 const OatFile* oat_file = oat_dex_file->GetOatFile(); in isPic() local
52 return oat_file->IsPic(); in isPic()
/art/runtime/native/
Ddalvik_system_DexFile.cc293 std::unique_ptr<const OatFile> oat_file(OatFile::Open(oat_filename, oat_filename, nullptr, in CopyProfileFile() local
296 if (oat_file.get() == nullptr) { in CopyProfileFile()
310 *oat_is_pic = oat_file->IsPic(); in CopyProfileFile()
314 const art::OatFile::OatDexFile* oat_dex_file = oat_file->GetOatDexFile(filename, nullptr, in CopyProfileFile()
324 if (ClassLinker::VerifyOatChecksums(oat_file.get(), target_instruction_set, &error_msg)) { in CopyProfileFile()
331 ClassLinker::VerifyOatImageChecksum(oat_file.get(), target_instruction_set)) { in CopyProfileFile()
346 if (ClassLinker::VerifyOatAndDexFileChecksums(oat_file.get(), filename, location_checksum, in CopyProfileFile()
355 && ClassLinker::VerifyOatImageChecksum(oat_file.get(), target_instruction_set)) { in CopyProfileFile()
/art/oatdump/
Doatdump.cc142 explicit OatDumper(const OatFile& oat_file, OatDumperOptions* options) in OatDumper() argument
143 : oat_file_(oat_file), in OatDumper()
144 oat_dex_files_(oat_file.GetOatDexFiles()), in OatDumper()
149 oat_file.Begin()))) { in OatDumper()
1044 const OatFile* oat_file = class_linker->FindOpenedOatFileFromOatLocation(oat_location); in Dump() local
1045 if (oat_file == nullptr) { in Dump()
1046 oat_file = OatFile::Open(oat_location, oat_location, nullptr, nullptr, false, &error_msg); in Dump()
1047 if (oat_file == nullptr) { in Dump()
1054 stats_.oat_file_bytes = oat_file->Size(); in Dump()
1056 oat_dumper_.reset(new OatDumper(*oat_file, oat_dumper_options_.release())); in Dump()
[all …]
/art/runtime/gc/space/
Dimage_space.cc744 OatFile* oat_file = OatFile::Open(oat_filename, oat_filename, image_header.GetOatDataBegin(), in OpenOatFile() local
747 if (oat_file == NULL) { in OpenOatFile()
752 uint32_t oat_checksum = oat_file->GetOatHeader().GetChecksum(); in OpenOatFile()
760 int32_t oat_patch_delta = oat_file->GetOatHeader().GetImagePatchDelta(); in OpenOatFile()
768 return oat_file; in OpenOatFile()