Home | History | Annotate | Download | only in runtime

Lines Matching refs:oat_file

45 #include "oat_file.h"
647 void ClassLinker::RegisterOatFile(const OatFile& oat_file) {
649 RegisterOatFileLocked(oat_file);
652 void ClassLinker::RegisterOatFileLocked(const OatFile& oat_file) {
656 CHECK_NE(&oat_file, oat_files_[i]) << oat_file.GetLocation();
659 VLOG(class_linker) << "Registering " << oat_file.GetLocation();
660 oat_files_.push_back(&oat_file);
665 OatFile& oat_file = space->ReleaseOatFile();
667 RegisterOatFileLocked(oat_file);
669 return oat_file;
680 const OatFile* oat_file = oat_files_[i];
681 DCHECK(oat_file != NULL);
682 const OatFile::OatDexFile* oat_dex_file = oat_file->GetOatDexFile(dex_location,
686 return oat_file;
695 UniquePtr<OatFile> oat_file(OatFile::Open(oat_location, oat_location, NULL,
697 if (oat_file.get() == NULL) {
704 uint32_t actual_image_oat_checksum = oat_file->GetOatHeader().GetImageFileLocationOatChecksum();
713 uint32_t actual_image_oat_offset = oat_file->GetOatHeader().GetImageFileLocationOatDataBegin();
720 const OatFile::OatDexFile* oat_dex_file = oat_file->GetOatDexFile(dex_location, &dex_location_checksum);
733 RegisterOatFileLocked(*oat_file.release());
826 const OatFile* oat_file = OatFile::Open(oat_location, oat_location, NULL,
828 if (oat_file == NULL) {
832 RegisterOatFileLocked(*oat_file);
833 const OatFile::OatDexFile* oat_dex_file = oat_file->GetOatDexFile(dex_location, &dex_location_checksum);
848 bool ClassLinker::VerifyOatFileChecksums(const OatFile* oat_file,
855 bool image_check = ((oat_file->GetOatHeader().GetImageFileLocationOatChecksum() == image_oat_checksum)
856 && (oat_file->GetOatHeader().GetImageFileLocationOatDataBegin() == image_oat_data_begin));
858 const OatFile::OatDexFile* oat_dex_file = oat_file->GetOatDexFile(dex_location, &dex_location_checksum);
860 LOG(ERROR) << "oat file " << oat_file->GetLocation()
863 std::vector<const OatFile::OatDexFile*> oat_dex_files = oat_file->GetOatDexFiles();
866 LOG(ERROR) << "oat file " << oat_file->GetLocation()
880 LOG(WARNING) << "oat file " << oat_file->GetLocation()
881 << " mismatch (" << std::hex << oat_file->GetOatHeader().GetImageFileLocationOatChecksum()
882 << ", " << oat_file->GetOatHeader().GetImageFileLocationOatDataBegin()
887 LOG(WARNING) << "oat file " << oat_file->GetLocation()
895 const DexFile* ClassLinker::VerifyAndOpenDexFileFromOatFile(const OatFile* oat_file,
898 bool verified = VerifyOatFileChecksums(oat_file, dex_location, dex_location_checksum);
900 delete oat_file;
903 RegisterOatFileLocked(*oat_file);
904 return oat_file->GetOatDexFile(dex_location, &dex_location_checksum)->OpenDexFile();
920 UniquePtr<const OatFile> oat_file(FindOatFileFromOatLocationLocked(odex_filename));
921 if (oat_file.get() != NULL) {
926 const OatFile::OatDexFile* oat_dex_file = oat_file->GetOatDexFile(dex_location, NULL);
928 RegisterOatFileLocked(*oat_file);
931 const DexFile* dex_file = VerifyAndOpenDexFileFromOatFile(oat_file.release(),
941 oat_file.reset(FindOatFileFromOatLocationLocked(cache_location));
942 if (oat_file.get() != NULL) {
948 const DexFile* dex_file = VerifyAndOpenDexFileFromOatFile(oat_file.release(),
967 const OatFile* oat_file = oat_files_[i];
968 DCHECK(oat_file != NULL);
969 if (oat_file->GetLocation() == oat_location) {
970 return oat_file;
982 const OatFile* oat_file = FindOpenedOatFileFromOatLocation(oat_location);
983 if (oat_file != NULL) {
984 return oat_file;
987 oat_file = OatFile::Open(oat_location, oat_location, NULL, !Runtime::Current()->IsCompiler());
988 if (oat_file == NULL) {
991 return oat_file;
1020 OatFile& oat_file = GetImageOatFile(space);
1021 CHECK_EQ(oat_file.GetOatHeader().GetImageFileLocationOatChecksum(), 0U);
1022 CHECK_EQ(oat_file.GetOatHeader().GetImageFileLocationOatDataBegin(), 0U);
1023 CHECK(oat_file.GetOatHeader().GetImageFileLocation().empty());
1024 portable_resolution_trampoline_ = oat_file.GetOatHeader().GetPortableResolutionTrampoline();
1025 quick_resolution_trampoline_ = oat_file.GetOatHeader().GetQuickResolutionTrampoline();
1038 CHECK_EQ(oat_file.GetOatHeader().GetDexFileCount(),
1044 const OatFile::OatDexFile* oat_dex_file = oat_file.GetOatDexFile(dex_file_location, NULL);
1045 CHECK(oat_dex_file != NULL) << oat_file.GetLocation() << " " << dex_file_location;
1049 << " from within oat file " << oat_file.GetLocation();
1507 const OatFile* oat_file = FindOpenedOatFileForDexFile(dex_file);
1508 CHECK(oat_file != NULL) << dex_file.GetLocation();
1510 const OatFile::OatDexFile* oat_dex_file = oat_file->GetOatDexFile(dex_file.GetLocation(),
2541 const OatFile* oat_file = FindOpenedOatFileForDexFile(dex_file);
2544 if (Runtime::Current()->IsCompiler() && (oat_file == NULL)) {
2548 CHECK(oat_file != NULL) << dex_file.GetLocation() << " " << PrettyClass(klass);
2550 const OatFile::OatDexFile* oat_dex_file = oat_file->GetOatDexFile(dex_file.GetLocation(),