Update JIT Zygote image option for installd and otapreopt.
Bug: 203492478
Test: atest run_dex2oat_test
Test: manual -
1. Build a system image and flash it into a device.
2. adb shell setprop dalvik.vm.profilebootclasspath true
3. adb shell pm compile -m speed -f com.android.htmlviewer
4. See dex2oat running with the primary boot image only
(http://gpaste/5031926999023616)
Change-Id: I1e781909bdb063599fe5555d3abc19a65af36b86
diff --git a/cmds/installd/otapreopt.cpp b/cmds/installd/otapreopt.cpp
index 6aa32b8..e978e79 100644
--- a/cmds/installd/otapreopt.cpp
+++ b/cmds/installd/otapreopt.cpp
@@ -140,8 +140,8 @@
PrepareEnvironmentVariables();
- if (!EnsureBootImageAndDalvikCache()) {
- LOG(ERROR) << "Bad boot image.";
+ if (!EnsureDalvikCache()) {
+ LOG(ERROR) << "Bad dalvik cache.";
return 5;
}
@@ -349,8 +349,8 @@
}
}
- // Ensure that we have the right boot image and cache file structures.
- bool EnsureBootImageAndDalvikCache() const {
+ // Ensure that we have the right cache file structures.
+ bool EnsureDalvikCache() const {
if (parameters_.instruction_set == nullptr) {
LOG(ERROR) << "Instruction set missing.";
return false;
@@ -376,15 +376,6 @@
}
}
- // Check whether we have a boot image.
- // TODO: check that the files are correct wrt/ jars.
- std::string preopted_boot_art_path =
- StringPrintf("/apex/com.android.art/javalib/%s/boot.art", isa);
- if (access(preopted_boot_art_path.c_str(), F_OK) != 0) {
- PLOG(ERROR) << "Bad access() to " << preopted_boot_art_path;
- return false;
- }
-
return true;
}