Lines Matching defs:file
5 * you may not use this file except in compliance with the License.
98 // Clean up the lock file.
126 *error_msg = "Failed to determine lock file";
179 VLOG(oat) << "Oat File Assistant: No relocated oat file found,"
180 << " attempting to fall back to interpreting oat file instead.";
208 // Load the primary dex file.
213 LOG(WARNING) << "Attempt to load out-of-date oat file "
220 LOG(WARNING) << "Failed to open dex file from oat dex file: " << error_msg;
236 LOG(WARNING) << "Failed to open dex file from oat dex file: " << error_msg;
261 // If we can't figure out the odex file, we treat it as if the odex
262 // file was inaccessible.
263 LOG(WARNING) << "Failed to determine odex file name: " << error_msg;
317 // Compute the oat file name from the dex location.
320 // TODO: The oat file assistant should be the definitive place for
321 // determining the oat file name from the dex location, not
329 // If we can't determine the oat file name, we treat the oat file as
331 LOG(WARNING) << "Failed to determine oat file name for dex location "
382 OatFileAssistant::OatStatus OatFileAssistant::GivenOatFileStatus(const OatFile& file) {
386 if (GivenOatFileIsOutOfDate(file)) {
389 if (GivenOatFileIsUpToDate(file)) {
395 bool OatFileAssistant::GivenOatFileIsOutOfDate(const OatFile& file) {
400 const OatFile::OatDexFile* oat_dex_file = file.GetOatDexFile(
411 = file.GetOatDexFile(secondary_dex_location.c_str(), nullptr, false);
445 if (file.GetOatHeader().GetImageFileLocationOatChecksum() != image_info->oat_checksum) {
450 // The checksums are all good; the dex file is not out of date.
454 bool OatFileAssistant::GivenOatFileNeedsRelocation(const OatFile& file) {
455 return GivenOatFileStatus(file) == kOatNeedsRelocation;
458 bool OatFileAssistant::GivenOatFileIsUpToDate(const OatFile& file) {
459 if (GivenOatFileIsOutOfDate(file)) {
463 if (file.IsPic()) {
473 // Verify the oat_data_begin recorded for the image in the oat file matches
475 const OatHeader& oat_header = file.GetOatHeader();
478 VLOG(oat) << file.GetLocation() <<
479 ": Oat file image oat_data_begin (" << oat_data_begin << ")"
485 // Verify the oat_patch_delta recorded for the image in the oat file matches
489 VLOG(oat) << file.GetLocation() <<
490 ": Oat file image patch delta (" << oat_patch_delta << ")"
520 // the rest of the profiler code, not the oat file assistant code.
543 VLOG(oat) << "Oat File Assistant: Profile for " << dex_location_
564 PLOG(WARNING) << "Failed to open profile file " << old_profile_name
571 PLOG(WARNING) << "Failed to get stats for profile file " << old_profile_name
579 PLOG(WARNING) << "Failed to create/write prev profile file " << profile_name
590 PLOG(WARNING) << "Failed to copy profile file " << old_profile_name
601 *error_msg = "Patching of oat file for dex location "
603 + " not attempted because the input file name could not be determined.";
609 *error_msg = "Patching of oat file for dex location "
611 + " not attempted because the oat file name could not be determined.";
619 *error_msg = "Patching of oat file " + oat_file_name
625 *error_msg = "Patching of oat file " + oat_file_name
633 argv.push_back("--input-oat-file=" + input_file_name);
634 argv.push_back("--output-oat-file=" + oat_file_name);
639 // Manually delete the file. This ensures there is no garbage left over if
645 // Mark that the oat file has changed and we should try to reload.
654 *error_msg = "Generation of oat file for dex location "
656 + " not attempted because the oat file name could not be determined.";
663 *error_msg = "Generation of oat file " + oat_file_name
669 args.push_back("--dex-file=" + std::string(dex_location_));
670 args.push_back("--oat-file=" + oat_file_name);
681 // Manually delete the file. This ensures there is no garbage left over if
687 // Mark that the oat file has changed and we should try to reload.
749 // The odex file name is formed by replacing the dex_location extension with
764 // Find the file portion of the dex location.
765 std::string file;
767 file = location;
769 file = location.substr(pos+1);
772 // Get the base part of the file without the extension.
773 pos = file.rfind('.');
778 std::string base = file.substr(0, pos);
837 // This can happen if the original dex file has been stripped from the
858 CHECK(!oat_file_released_) << "OdexFile called after oat file released.";
868 VLOG(oat) << "OatFileAssistant test for existing pre-compiled oat file "
884 CHECK(!oat_file_released_) << "OatFile called after oat file released.";
894 VLOG(oat) << "OatFileAssistant test for existing oat file "