Lines Matching refs:image

32 #include "image-inl.h"
87 *error_msg = "Failed to generate image because no boot class path specified";
90 // We should clean up so we are more likely to have room for the image.
92 LOG(INFO) << "Pruning dalvik-cache since we are generating an image and will need to recompile";
101 std::string image_option_string("--image=");
113 // Note: we do not generate a fully debuggable boot image so we do not pass the
118 << "We should always be generating an image for the current isa.";
166 // so that the caller knows where to create the image.
192 // Relocate the image at image_location to dest_filename and relocate it by a random amount.
195 // We should clean up so we are more likely to have room for the image.
197 LOG(INFO) << "Pruning dalvik-cache since we are relocating an image and will need to recompile";
203 std::string input_image_location_arg("--input-image-location=");
206 std::string output_image_filename_arg("--output-image-file=");
233 *error_msg = StringPrintf("Unable to read image header for %s", filename);
265 *error_msg = StringPrintf("Unable to read image header for %s at %s",
270 *error_msg = StringPrintf("Unable to read image header for %s at %s",
275 *error_msg = StringPrintf("Unable to find a relocated version of image file %s",
281 *error_msg = StringPrintf("Unable to find a relocated version of image file %s",
310 *error_msg = StringPrintf("Unable to find image file for %s", image_location);
327 // Only the zygote is allowed to create the global boot image.
332 *error_msg = "Only the zygote can create the global boot image.";
340 // image. This is to try to mitigate situations where the system might run out of space later.
347 // Could not stat. Conservatively tell the system to delete the image.
357 // environment. We do not want to fail quickening the boot image there, as it is beneficial
361 *error_msg = StringPrintf("Low-memory situation: only %4.2f megabytes available after image"
400 *error_msg = StringPrintf("Requiring relocation for image '%s' at '%s' but we do not have "
425 // Secondary image is out of date. Clear cache and exit to let it retry from scratch.
426 LOG(ERROR) << "Cannot patch secondary image '" << image_location
431 reason = "Should not have to patch secondary image.";
443 *error_msg = StringPrintf("Unable to relocate image '%s' from '%s' to '%s': %s",
479 // ScopedFlock::GetFile to Init the image file. We want the file
484 // this point the image should exist.
493 VLOG(startup) << "Using image file " << image_filename->c_str() << " for image location "
495 // If we are in /system we can assume the image is good. We can also
496 // assume this if we are using a relocated image (i.e. image checksum
499 // Since we are the boot image, pass null since we load the oat file from the boot image oat
509 // the image, we need to be conservative, as some parts of the platform are not very tolerant
512 // helper (which relies on GetDalvikCache). So for now, if we load an image out of /system,
515 // No. Delete the generated image and try to run out of the dex files.
527 "but image failed to load: %s",
534 *error_msg = StringPrintf("Failed to load /system image '%s': %s",
544 *error_msg = "Not attempting to compile image because -Xnoimage-dex2oat";
547 *error_msg = StringPrintf("No place to put generated image.");
552 *error_msg = "Cannot compile a secondary image.";
555 *error_msg = StringPrintf("Failed to generate image '%s': %s",
564 // Check whether there is enough space left over after we have generated the image.
566 // No. Delete the generated image and try to run out of the dex files.
572 // ScopedFlock::GetFile to Init the image file. We want the file
579 *error_msg = StringPrintf("Failed to load generated image '%s': %s",
675 // Since we are fixing up the app image, there should only be pointers to the app image and
676 // boot image.
769 // image.
775 // boot image. Uses the bitmap to ensure the same array is not visited multiple times.
814 DCHECK(klass != nullptr) << "Null class in image";
830 // We want to use our own class loader and not the one in the image.
942 // Relocate an image space mapped at target_base which possibly used to be at a different base
943 // address. Only needs a single image space, not one for both source and destination.
956 *error_msg = StringPrintf("Cannot relocate non-pic image for oat file %s",
969 *error_msg = "Can not relocate app image without boot image space";
973 *error_msg = "Can not relocate app image without boot oat file";
981 *error_msg = StringPrintf("Boot image size %" PRIu64 " does not match expected size %"
1009 VLOG(image) << "App image " << app_image;
1010 VLOG(image) << "App oat " << app_oat;
1011 VLOG(image) << "Boot image " << boot_image;
1012 VLOG(image) << "Boot oat " << boot_oat;
1021 // Need to update the image to be at the target base.
1040 // Fixup objects may read fields in the boot image, use the mutator lock here for sanity. Though
1045 // Fixup image roots.
1103 // Only touches objects in the app image, no need for mutator lock.
1115 // Only touches objects in the app image, no need for mutator lock.
1128 // In the app image case, the image methods are actually in the boot image.
1134 // the roots to be the image addresses.
1143 if (VLOG_IS_ON(image)) {
1157 TimingLogger logger(__PRETTY_FUNCTION__, true, VLOG_IS_ON(image));
1158 VLOG(image) << "ImageSpace::Init entering image_filename=" << image_filename;
1175 *error_msg = StringPrintf("Invalid image header in '%s'", image_filename);
1190 // app image case. Otherwise, we open the oat file after the image and check the checksum there.
1194 *error_msg = StringPrintf("Oat checksum 0x%x does not match the image one 0x%x in image %s",
1203 LOG(INFO) << "Dumping image sections";
1226 // The preferred address to map the image, null specifies any address. If we manage to map the
1227 // image at the image begin, the amount of fixup work required is minimized.
1234 // Note: The image header is part of the image due to mmap page alignment required of offset.
1257 *error_msg = StringPrintf("Invalid storage mode in image header %d",
1287 TimingLogger::ScopedTiming timing2("LZ4 decompress image", &logger);
1293 VLOG(image) << "Decompressing image took " << PrettyDuration(NanoTime() - start);
1296 "Decompressed size does not match expected image size %zu vs %zu",
1325 *error_msg = StringPrintf("Failed to map image bitmap: %s", error_msg->c_str());
1328 // Loaded the map, use the image header from the file now in case we patch it with
1397 // If oat_file is null, then it is the boot image space. Use oat_file_non_owned_ from the space
1427 VLOG(image) << "ImageSpace::Init exiting " << *space.get();
1428 if (VLOG_IS_ON(image)) {
1449 *error_msg = StringPrintf("Failed to open oat file '%s' referenced from image %s: %s",
1457 " in image %s", oat_checksum, image_oat_checksum, GetName());
1465 "in image %s", oat_patch_delta, image_patch_delta, GetName());
1478 *error_msg = StringPrintf("Failed to get checksum of dex file '%s' referenced by image %s: "
1516 // If the image filename was adapted (e.g., for our tests), we need to change this here,
1578 // We want to replace the prefix of the input image with the prefix of the boot class path.
1579 // This handles the case where the image file contains @ separators.
1582 // means that the image name prefix will be oats/system@framework@
1591 const std::string& image = images[i];
1592 CHECK_GT(image.length(), old_prefix_length);
1593 std::string suffix = image.substr(old_prefix_length);
1598 ImageSpace* ImageSpace::CreateFromAppImage(const char* image,
1601 return gc::space::ImageSpace::Init(image,
1602 image,