From 57547452cf8139aa788f45b585420e2e9e99e2ee Mon Sep 17 00:00:00 2001 From: Ulya Trafimovich Date: Mon, 9 Dec 2019 15:40:17 +0000 Subject: Use boot image extension in the JIT-zygote experiment. Test: temporarily enable JIT-zygote configuration, build, boot the device and ensure that the JIT-zygote specific boot image apex-framework.art is mapped in the zygote address space: 1. enable Jit zygote in the product device config (in my 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. lunch aosp_walleye-userdebug \ && m \ && adb reboot bootloader \ && fastboot flashall -w 3. adb shell cat /proc/`adb shell ps | grep zygote64 | awk {'print $2'}`/maps | grep apex-framework.art 6fe44000-7025c000 rw-p 00000000 fc:02 1179718 /data/dalvik-cache/arm64/apex@com.android.art@javalib@apex-framework.art 70571000-70696000 rw-p 0072d000 fc:02 1179718 /data/dalvik-cache/arm64/apex@com.android.art@javalib@apex-framework.art 75a339f000-75a33ac000 r--p 00852000 fc:02 1179718 /data/dalvik-cache/arm64/apex@com.android.art@javalib@apex-framework.art Change-Id: I5493e575ebf90bad1d5ad2850004d54590bbc079 --- java/dexpreopt.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'java/dexpreopt.go') diff --git a/java/dexpreopt.go b/java/dexpreopt.go index 479dec60b..1631ab8e1 100644 --- a/java/dexpreopt.go +++ b/java/dexpreopt.go @@ -101,9 +101,8 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo global := dexpreoptGlobalConfig(ctx) bootImage := defaultBootImageConfig(ctx) - defaultBootImage := bootImage if global.UseApexImage { - bootImage = apexBootImageConfig(ctx) + bootImage = frameworkJZBootImageConfig(ctx) } var archs []android.ArchType @@ -174,11 +173,8 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo DexPreoptImagesDeps: imagesDeps, DexPreoptImageLocations: bootImage.imageLocations, - // We use the dex paths and dex locations of the default boot image, as it - // contains the full dexpreopt boot classpath. Other images may just contain a subset of - // the dexpreopt boot classpath. - PreoptBootClassPathDexFiles: defaultBootImage.dexPathsDeps.Paths(), - PreoptBootClassPathDexLocations: defaultBootImage.dexLocationsDeps, + PreoptBootClassPathDexFiles: bootImage.dexPathsDeps.Paths(), + PreoptBootClassPathDexLocations: bootImage.dexLocationsDeps, PreoptExtractedApk: false, -- cgit v1.2.3-59-g8ed1b