Merge "Use new image location for JIT Zygote." am: ada87ea525 am: ad1b60d2bf
Change-Id: I8f722aa4490892ee27bcb951c09723c04f7dce1a
This commit is contained in:
@@ -250,9 +250,11 @@ static const char* kNoGenerationalCCRuntimeOption = "-Xgc:nogenerational_cc";
|
|||||||
static const char* PROFILE_BOOT_CLASS_PATH = "profilebootclasspath";
|
static const char* PROFILE_BOOT_CLASS_PATH = "profilebootclasspath";
|
||||||
|
|
||||||
// Feature flag name for running the JIT in Zygote experiment, b/119800099.
|
// Feature flag name for running the JIT in Zygote experiment, b/119800099.
|
||||||
static const char* ENABLE_APEX_IMAGE = "enable_apex_image";
|
// TODO: Rename the server-level flag or remove.
|
||||||
// Flag to pass to the runtime when using the apex image.
|
static const char* ENABLE_JITZYGOTE_IMAGE = "enable_apex_image";
|
||||||
static const char* kApexImageOption = "-Ximage:/system/framework/apex.art";
|
// Flag to pass to the runtime when using the JIT Zygote image.
|
||||||
|
static const char* kJitZygoteImageOption =
|
||||||
|
"-Ximage:boot.art:/nonx/boot-framework.art!/system/etc/boot-image.prof";
|
||||||
|
|
||||||
// Feature flag name for disabling lock profiling.
|
// Feature flag name for disabling lock profiling.
|
||||||
static const char* DISABLE_LOCK_PROFILING = "disable_lock_profiling";
|
static const char* DISABLE_LOCK_PROFILING = "disable_lock_profiling";
|
||||||
@@ -730,16 +732,16 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote, bool p
|
|||||||
addOption("-Xjitsaveprofilinginfo");
|
addOption("-Xjitsaveprofilinginfo");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string use_apex_image_flag =
|
std::string use_jitzygote_image_flag =
|
||||||
server_configurable_flags::GetServerConfigurableFlag(RUNTIME_NATIVE_BOOT_NAMESPACE,
|
server_configurable_flags::GetServerConfigurableFlag(RUNTIME_NATIVE_BOOT_NAMESPACE,
|
||||||
ENABLE_APEX_IMAGE,
|
ENABLE_JITZYGOTE_IMAGE,
|
||||||
/*default_value=*/"");
|
/*default_value=*/"");
|
||||||
// Use the APEX boot image for boot class path profiling to get JIT samples on BCP methods.
|
// Use the APEX boot image for boot class path profiling to get JIT samples on BCP methods.
|
||||||
// Also use the APEX boot image if it's explicitly enabled via configuration flag.
|
// Also use the APEX boot image if it's explicitly enabled via configuration flag.
|
||||||
const bool use_apex_image = profile_boot_class_path || (use_apex_image_flag == "true");
|
const bool use_apex_image = profile_boot_class_path || (use_jitzygote_image_flag == "true");
|
||||||
if (use_apex_image) {
|
if (use_apex_image) {
|
||||||
addOption(kApexImageOption);
|
ALOGI("Using JIT Zygote image: '%s'\n", kJitZygoteImageOption);
|
||||||
ALOGI("Using Apex boot image: '%s'\n", kApexImageOption);
|
addOption(kJitZygoteImageOption);
|
||||||
} else if (parseRuntimeOption("dalvik.vm.boot-image", bootImageBuf, "-Ximage:")) {
|
} else if (parseRuntimeOption("dalvik.vm.boot-image", bootImageBuf, "-Ximage:")) {
|
||||||
ALOGI("Using dalvik.vm.boot-image: '%s'\n", bootImageBuf);
|
ALOGI("Using dalvik.vm.boot-image: '%s'\n", bootImageBuf);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -3533,8 +3533,8 @@
|
|||||||
<!-- True if home app should be pinned via Pinner Service -->
|
<!-- True if home app should be pinned via Pinner Service -->
|
||||||
<bool name="config_pinnerHomeApp">false</bool>
|
<bool name="config_pinnerHomeApp">false</bool>
|
||||||
|
|
||||||
<!-- List of files pinned by the Pinner Service with the apex boot image b/119800099 -->
|
<!-- List of files pinned by the Pinner Service with the JIT Zygote boot image b/119800099 -->
|
||||||
<string-array translatable="false" name="config_apexBootImagePinnerServiceFiles">
|
<string-array translatable="false" name="config_jitzygoteBootImagePinnerServiceFiles">
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- Number of days preloaded file cache should be preserved on a device before it can be
|
<!-- Number of days preloaded file cache should be preserved on a device before it can be
|
||||||
|
|||||||
@@ -3126,7 +3126,7 @@
|
|||||||
<java-symbol type="array" name="config_defaultPinnerServiceFiles" />
|
<java-symbol type="array" name="config_defaultPinnerServiceFiles" />
|
||||||
<java-symbol type="bool" name="config_pinnerCameraApp" />
|
<java-symbol type="bool" name="config_pinnerCameraApp" />
|
||||||
<java-symbol type="bool" name="config_pinnerHomeApp" />
|
<java-symbol type="bool" name="config_pinnerHomeApp" />
|
||||||
<java-symbol type="array" name="config_apexBootImagePinnerServiceFiles" />
|
<java-symbol type="array" name="config_jitzygoteBootImagePinnerServiceFiles" />
|
||||||
|
|
||||||
<java-symbol type="string" name="config_doubleTouchGestureEnableFile" />
|
<java-symbol type="string" name="config_doubleTouchGestureEnableFile" />
|
||||||
|
|
||||||
|
|||||||
@@ -238,10 +238,11 @@ public final class PinnerService extends SystemService {
|
|||||||
private void handlePinOnStart() {
|
private void handlePinOnStart() {
|
||||||
final String bootImage = SystemProperties.get("dalvik.vm.boot-image", "");
|
final String bootImage = SystemProperties.get("dalvik.vm.boot-image", "");
|
||||||
String[] filesToPin = null;
|
String[] filesToPin = null;
|
||||||
if (bootImage.endsWith("apex.art")) {
|
if (bootImage.endsWith("boot-image.prof")) {
|
||||||
// Use the files listed for that specific boot image
|
// Use the files listed for that specific boot image.
|
||||||
|
// TODO: find a better way to know we're using the JIT zygote configuration.
|
||||||
filesToPin = mContext.getResources().getStringArray(
|
filesToPin = mContext.getResources().getStringArray(
|
||||||
com.android.internal.R.array.config_apexBootImagePinnerServiceFiles);
|
com.android.internal.R.array.config_jitzygoteBootImagePinnerServiceFiles);
|
||||||
} else {
|
} else {
|
||||||
// Files to pin come from the overlay and can be specified per-device config
|
// Files to pin come from the overlay and can be specified per-device config
|
||||||
filesToPin = mContext.getResources().getStringArray(
|
filesToPin = mContext.getResources().getStringArray(
|
||||||
|
|||||||
Reference in New Issue
Block a user