Home
last modified time | relevance | path

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

12

/art/runtime/
Doat_file_manager.cc54 const OatFile* OatFileManager::RegisterOatFile(std::unique_ptr<const OatFile> oat_file) { in RegisterOatFile() argument
56 DCHECK(oat_file != nullptr); in RegisterOatFile()
58 CHECK(oat_files_.find(oat_file) == oat_files_.end()); in RegisterOatFile()
60 CHECK_NE(oat_file.get(), existing.get()) << oat_file->GetLocation(); in RegisterOatFile()
63 CHECK_NE(oat_file->Begin(), existing->Begin()) << "Oat file already mapped at that location"; in RegisterOatFile()
66 have_non_pic_oat_file_ = have_non_pic_oat_file_ || !oat_file->IsPic(); in RegisterOatFile()
67 const OatFile* ret = oat_file.get(); in RegisterOatFile()
68 oat_files_.insert(std::move(oat_file)); in RegisterOatFile()
72 void OatFileManager::UnRegisterAndDeleteOatFile(const OatFile* oat_file) { in UnRegisterAndDeleteOatFile() argument
74 DCHECK(oat_file != nullptr); in UnRegisterAndDeleteOatFile()
[all …]
Doat_file_assistant_test.cc124 std::unique_ptr<OatFile> oat_file = oat_file_assistant.GetBestOatFile(); in TEST_F() local
125 EXPECT_EQ(nullptr, oat_file.get()); in TEST_F()
405 std::unique_ptr<OatFile> oat_file = oat_file_assistant.GetBestOatFile(); in TEST_F() local
406 ASSERT_TRUE(oat_file.get() != nullptr); in TEST_F()
407 EXPECT_TRUE(oat_file->IsExecutable()); in TEST_F()
409 dex_files = oat_file_assistant.LoadDexFiles(*oat_file, dex_location.c_str()); in TEST_F()
495 std::unique_ptr<OatFile> oat_file = oat_file_assistant.GetBestOatFile(); in TEST_F() local
496 ASSERT_TRUE(oat_file.get() != nullptr); in TEST_F()
497 EXPECT_TRUE(oat_file->IsExecutable()); in TEST_F()
499 dex_files = oat_file_assistant.LoadDexFiles(*oat_file, dex_location.c_str()); in TEST_F()
[all …]
Doat_file_manager.h53 const OatFile* RegisterOatFile(std::unique_ptr<const OatFile> oat_file)
56 void UnRegisterAndDeleteOatFile(const OatFile* oat_file)
118 bool HasCollisions(const OatFile* oat_file,
Dclass_table.cc242 const OatFile* oat_file = dex_file->GetOatDexFile()->GetOatFile(); in InsertStrongRoot() local
243 if (oat_file != nullptr && !oat_file->GetBssGcRoots().empty()) { in InsertStrongRoot()
244 InsertOatFileLocked(oat_file); // Ignore return value. in InsertStrongRoot()
251 bool ClassTable::InsertOatFile(const OatFile* oat_file) { in InsertOatFile() argument
253 return InsertOatFileLocked(oat_file); in InsertOatFile()
256 bool ClassTable::InsertOatFileLocked(const OatFile* oat_file) { in InsertOatFileLocked() argument
257 if (ContainsElement(oat_files_, oat_file)) { in InsertOatFileLocked()
260 oat_files_.push_back(oat_file); in InsertOatFileLocked()
Dclass_table-inl.h38 for (const OatFile* oat_file : oat_files_) { in VisitRoots() local
39 for (GcRoot<mirror::Object>& root : oat_file->GetBssGcRoots()) { in VisitRoots()
56 for (const OatFile* oat_file : oat_files_) { in VisitRoots() local
57 for (GcRoot<mirror::Object>& root : oat_file->GetBssGcRoots()) { in VisitRoots()
Doat_file_assistant.h215 static std::unique_ptr<gc::space::ImageSpace> OpenImageSpace(const OatFile* oat_file);
226 const OatFile& oat_file, const char* dex_location);
231 static bool LoadDexFiles(const OatFile& oat_file,
Doat_file_assistant.cc321 const OatFile &oat_file, const char *dex_location) { in LoadDexFiles() argument
323 if (LoadDexFiles(oat_file, dex_location, &dex_files)) { in LoadDexFiles()
331 const OatFile &oat_file, in LoadDexFiles() argument
336 const OatFile::OatDexFile* oat_dex_file = oat_file.GetOatDexFile( in LoadDexFiles()
353 oat_dex_file = oat_file.GetOatDexFile(multidex_dex_location.c_str(), nullptr); in LoadDexFiles()
734 File* oat_file = oat_file_wrapper.GetFile(); in GenerateOatFileNoChecks() local
735 if (oat_file == nullptr) { in GenerateOatFileNoChecks()
741 if (fchmod(oat_file->Fd(), file_mode) != 0) { in GenerateOatFileNoChecks()
750 args.push_back("--oat-fd=" + std::to_string(oat_file->Fd())); in GenerateOatFileNoChecks()
767 if (oat_file->FlushCloseOrErase() != 0) { in GenerateOatFileNoChecks()
[all …]
Doat_file.cc263 inline static bool ReadOatDexFileData(const OatFile& oat_file, in ReadOatDexFileData() argument
268 DCHECK_LE(*oat, oat_file.End()); in ReadOatDexFileData()
269 if (UNLIKELY(static_cast<size_t>(oat_file.End() - *oat) < sizeof(T))) { in ReadOatDexFileData()
1008 std::unique_ptr<ElfOatFile> oat_file(new ElfOatFile(location, executable)); in OpenElfFile() local
1009 bool success = oat_file->ElfFileOpen(file, in OpenElfFile()
1021 if (!oat_file->ComputeFields(requested_base, file->GetPath(), error_msg)) { in OpenElfFile()
1025 if (!oat_file->Setup(abs_dex_location, error_msg)) { in OpenElfFile()
1029 return oat_file.release(); in OpenElfFile()
1128 std::unique_ptr<ElfOatFile> oat_file(new ElfOatFile(location, false /* executable */)); in OpenWithElfFile() local
1129 return oat_file->InitializeFromElfFile(elf_file, vdex_file, abs_dex_location, error_msg) in OpenWithElfFile()
[all …]
Dclass_loader_context.cc64 for (std::unique_ptr<OatFile>& oat_file : info.opened_oat_files) { in ~ClassLoaderContext()
65 oat_file.release(); in ~ClassLoaderContext()
242 std::unique_ptr<OatFile> oat_file(oat_file_assistant.GetBestOatFile()); in OpenDexFiles() local
244 if (oat_file != nullptr && in OpenDexFiles()
245 OatFileAssistant::LoadDexFiles(*oat_file, location, &oat_dex_files)) { in OpenDexFiles()
246 info.opened_oat_files.push_back(std::move(oat_file)); in OpenDexFiles()
Dclass_table.h229 bool InsertOatFile(const OatFile* oat_file)
274 bool InsertOatFileLocked(const OatFile* oat_file)
Doat_file.h219 OatClass(const OatFile* oat_file,
467 OatDexFile(const OatFile* oat_file,
/art/compiler/
Doat_test.cc128 File* oat_file, in WriteElf() argument
146 return DoWriteElf(vdex_file, oat_file, oat_writer, key_value_store, verify); in WriteElf()
150 File* oat_file, in WriteElf() argument
162 return DoWriteElf(vdex_file, oat_file, oat_writer, key_value_store, verify); in WriteElf()
166 File* oat_file, in WriteElf() argument
178 return DoWriteElf(vdex_file, oat_file, oat_writer, key_value_store, verify); in WriteElf()
182 File* oat_file, in DoWriteElf() argument
190 oat_file); in DoWriteElf()
195 if (!oat_writer.WriteAndOpenDexFiles(kIsVdexEnabled ? vdex_file : oat_file, in DoWriteElf()
419 std::unique_ptr<OatFile> oat_file(OatFile::Open(tmp_oat.GetFilename(), in TEST_F() local
[all …]
Dimage_test.h118 for (ScratchFile& oat_file : oat_files) { in ~CompilationHelper()
119 oat_file.Unlink(); in ~CompilationHelper()
241 for (ScratchFile& oat_file : oat_files) { in Compile()
245 oat_file.GetFile())); in Compile()
353 std::unique_ptr<File> oat_file(OS::OpenFileReadWrite(oat_filename)); in Compile()
354 ASSERT_TRUE(oat_file != nullptr); in Compile()
355 bool success_fixup = ElfWriter::Fixup(oat_file.get(), in Compile()
358 ASSERT_EQ(oat_file->FlushCloseOrErase(), 0) << "Could not flush and close oat file " in Compile()
/art/test/117-nopatchoat/
Dnopatchoat.cc57 const OatFile* oat_file = oat_dex_file->GetOatFile(); in needsRelocation() local
58 return !oat_file->IsPic() in needsRelocation()
59 && CompilerFilter::IsAotCompilationEnabled(oat_file->GetCompilerFilter()); in needsRelocation()
/art/runtime/native/
Ddalvik_system_DexFile.cc55 /*out*/ const OatFile*& oat_file) { in ConvertJavaArrayToDexFiles() argument
71 oat_file = reinterpret_cast<const OatFile*>(static_cast<uintptr_t>(long_data[kOatFileIndex])); in ConvertJavaArrayToDexFiles()
82 const OatFile* oat_file, in ConvertDexFilesToJavaArray() argument
96 long_data[kOatFileIndex] = reinterpret_cast<uintptr_t>(oat_file); in ConvertDexFilesToJavaArray()
276 const OatFile* oat_file = nullptr; in DexFile_openDexFileNative() local
281 /*out*/ &oat_file, in DexFile_openDexFileNative()
285 jlongArray array = ConvertDexFilesToJavaArray(env, oat_file, dex_files); in DexFile_openDexFileNative()
312 const OatFile* oat_file; in DexFile_closeDexFile() local
313 if (!ConvertJavaArrayToDexFiles(env, cookie, dex_files, oat_file)) { in DexFile_closeDexFile()
344 if (all_deleted && oat_file != nullptr) { in DexFile_closeDexFile()
[all …]
/art/runtime/openjdkjvmti/
Dfixed_up_dex_file.cc54 const art::OatFile* oat_file = oat_dex->GetOatFile(); in DoDexUnquicken() local
55 if (oat_file == nullptr) { in DoDexUnquicken()
58 const art::VdexFile* vdex = oat_file->GetVdexFile(); in DoDexUnquicken()
/art/runtime/gc/space/
Dimage_space.h52 const OatFile* oat_file,
143 static bool ValidateOatFile(const OatFile& oat_file, std::string* error_msg);
175 const OatFile* oat_file,
Dimage_space.cc519 const OatFile* oat_file, in Init() argument
556 if (oat_file != nullptr) { in Init()
559 const uint32_t oat_checksum = oat_file->GetOatHeader().GetChecksum(); in Init()
669 oat_file, in Init()
686 if (oat_file == nullptr) { in Init()
695 space->oat_file_non_owned_ = oat_file; in Init()
711 CHECK_EQ(oat_file != nullptr, image_header->IsAppImage()); in Init()
1377 std::unique_ptr<OatFile> oat_file(OatFile::Open(oat_filename, in OpenOatFile() local
1385 if (oat_file == nullptr) { in OpenOatFile()
1392 uint32_t oat_checksum = oat_file->GetOatHeader().GetChecksum(); in OpenOatFile()
[all …]
/art/test/137-cfi/
Dcfi.cc114 const OatFile* oat_file = image_spaces[0]->GetOatFile(); in IsPicImage() local
115 CHECK(oat_file != nullptr); // We should have an oat file to go with the image. in IsPicImage()
116 return oat_file->IsPic(); in IsPicImage()
/art/oatdump/
Doatdump.cc118 OatSymbolizer(const OatFile* oat_file, const std::string& output_name, bool no_bits) : in OatSymbolizer() argument
119 oat_file_(oat_file), in OatSymbolizer()
360 OatDumper(const OatFile& oat_file, const OatDumperOptions& options) in OatDumper() argument
361 : oat_file_(oat_file), in OatDumper()
362 oat_dex_files_(oat_file.GetOatDexFiles()), in OatDumper()
369 oat_file.Begin(), in OatDumper()
370 oat_file.End(), in OatDumper()
1881 const OatFile* oat_file = image_space_.GetOatFile(); in Dump() local
1882 if (oat_file == nullptr) { in Dump()
1883 oat_file = runtime->GetOatFileManager().FindOpenedOatFileFromOatLocation(oat_location); in Dump()
[all …]
/art/dex2oat/
Ddex2oat.cc644 for (std::unique_ptr<File>& oat_file : oat_files_) { in ~Dex2Oat()
645 oat_file.release(); in ~Dex2Oat()
1350 std::unique_ptr<File> oat_file(OS::CreateEmptyFile(oat_filename)); in OpenFile() local
1351 if (oat_file == nullptr) { in OpenFile()
1355 if (fchmod(oat_file->Fd(), 0644) != 0) { in OpenFile()
1357 oat_file->Erase(); in OpenFile()
1360 oat_files_.push_back(std::move(oat_file)); in OpenFile()
1394 std::unique_ptr<File> oat_file(new File(oat_fd_, oat_location_, /* check_usage */ true)); in OpenFile() local
1395 if (oat_file == nullptr) { in OpenFile()
1399 oat_file->DisableAutoClose(); in OpenFile()
[all …]
Ddex2oat_image_test.cc122 std::string oat_file = scratch.GetFilename() + ".oat"; in CompileImageAndGetSizes() local
125 ret.oat_size = GetFileSizeBytes(oat_file); in CompileImageAndGetSizes()
128 CHECK_GT(ret.oat_size, 0u) << oat_file; in CompileImageAndGetSizes()
Ddex2oat_test.cc65 std::unique_ptr<File> oat_file; local
72 oat_file.reset(OS::CreateEmptyFile(odex_location.c_str()));
73 CHECK(oat_file != nullptr) << odex_location;
74 args.push_back("--oat-fd=" + std::to_string(oat_file->Fd()));
86 if (oat_file != nullptr) {
87 CHECK_EQ(oat_file->FlushClose(), 0) << "Could not flush and close oat file";
1018 auto check_oat = [expected_classpath_key](const OatFile& oat_file) { in RunTest() argument
1020 const char* classpath = oat_file.GetOatHeader().GetStoreValueByKey(OatHeader::kClassPathKey); in RunTest()
1102 std::unique_ptr<OatFile> oat_file(oat_file_assistant.GetBestOatFile()); in TEST_F() local
1104 OatFileAssistant::LoadDexFiles(*oat_file, stripped_classpath.c_str()); in TEST_F()
/art/test/common/
Druntime_state.cc104 const OatFile* oat_file = oat_dex_file->GetOatFile(); in Java_Main_compiledWithOptimizing() local
105 CHECK(oat_file != nullptr); in Java_Main_compiledWithOptimizing()
107 const char* cmd_line = oat_file->GetOatHeader().GetStoreValueByKey(OatHeader::kDex2OatCmdLineKey); in Java_Main_compiledWithOptimizing()
/art/runtime/gc/collector/
Dimmune_spaces_test.cc45 std::unique_ptr<DummyOatFile>&& oat_file, in DummyImageSpace() argument
53 oat_file_ = std::move(oat_file); in DummyImageSpace()
111 std::unique_ptr<DummyOatFile> oat_file(new DummyOatFile(oat_map->Begin(), oat_map->End())); in CreateImageSpace() local
136 std::move(oat_file), in CreateImageSpace()

12