summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_options.h
diff options
context:
space:
mode:
authorUlya Trafimovich <skvadrik@google.com>2020-01-27 14:50:38 +0000
committerUlyana Trafimovich <skvadrik@google.com>2020-01-28 17:04:36 +0000
commitc124d1dd977a2ddcd6e4928cfe6c0698f44d6523 (patch)
treeb3cbe2ead73a9ca14845f0b37d1254f8d81e79da /compiler/driver/compiler_options.h
parentcaafd621eb33863630380818db918a2c93c9054e (diff)
Fix name-based detection of JIT-zygote boot image extension.
ART detects JIT-zygote boot image by the image name. This has been broken since boot image extension has been enabled for JIT-zygote config in CL I5493e575ebf90bad1d5ad2850004d54590bbc079. This CL replaces 'kApexBootImage' with 'kApexBootImageExtension', since the JIT-zygote image is always used with extension. Test: compare boot-framework.art and apex-framework.art, they were identical before this CL, and differ after this CL. Test: JIT-zygote config boots, steps 1-2: 1. Temporarily enable Jit zygote in the product device config (in this case device/google/muskie/aosp_walleye.mk): +# System server should not contain compiled code. +PRODUCT_SYSTEM_SERVER_COMPILER_FILTER := verify + +# Use the apex image for preopting. +DEXPREOPT_USE_APEX_IMAGE := true + +# Have the runtime pick up the apex image. +PRODUCT_PROPERTY_OVERRIDES += \ + dalvik.vm.boot-image=/apex/com.android.art/javalib/apex.art:/system/framework/apex-framework.art 2. Build and flash: $ lunch aosp_walleye-userdebug && m \ && adb reboot bootloader && fastboot flashall -w Change-Id: Ifd3d3c13107c2e4514eed7c4e2b1bbc5a5a12245
Diffstat (limited to 'compiler/driver/compiler_options.h')
-rw-r--r--compiler/driver/compiler_options.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h
index e24da593a7..a43390af72 100644
--- a/compiler/driver/compiler_options.h
+++ b/compiler/driver/compiler_options.h
@@ -70,11 +70,11 @@ class CompilerOptions final {
static constexpr size_t kUnsetInlineMaxCodeUnits = -1;
enum class ImageType : uint8_t {
- kNone, // JIT or AOT app compilation producing only an oat file but no image.
- kBootImage, // Creating boot image.
- kBootImageExtension, // Creating boot image extension.
- kAppImage, // Creating app image.
- kApexBootImage, // Creating the apex image for jit/zygote experiment b/119800099.
+ kNone, // JIT or AOT app compilation producing only an oat file but no image.
+ kBootImage, // Creating boot image.
+ kBootImageExtension, // Creating boot image extension.
+ kAppImage, // Creating app image.
+ kApexBootImageExtension, // Creating JIT-zygote boot image extension (b/119800099).
};
CompilerOptions();
@@ -194,16 +194,17 @@ class CompilerOptions final {
// Are we compiling a boot image?
bool IsBootImage() const {
- return image_type_ == ImageType::kBootImage || image_type_ == ImageType::kApexBootImage;
+ return image_type_ == ImageType::kBootImage;
}
- bool IsApexBootImage() const {
- return image_type_ == ImageType::kApexBootImage;
+ bool IsApexBootImageExtension() const {
+ return image_type_ == ImageType::kApexBootImageExtension;
}
// Are we compiling a boot image extension?
bool IsBootImageExtension() const {
- return image_type_ == ImageType::kBootImageExtension;
+ return image_type_ == ImageType::kBootImageExtension
+ || image_type_ == ImageType::kApexBootImageExtension;
}
bool IsBaseline() const {