From: David 'Digit' Turner Date: Wed, 15 Jun 2011 23:32:20 +0000 (+0200) Subject: emulator: Enable dex-preoptimization X-Git-Tag: android-x86-4.4-r1~1120^2~145^2~8^2~4^2~1 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4b65598642fce27ab7d2e02bfb24b76baa67580d;p=android-x86%2Fbuild.git emulator: Enable dex-preoptimization Backport from AOSP master. This enables the Dex pre-optimization for emulator-specific builds. The idea is to speed up the initial boot sequence of an SDK AVD by avoiding the costly on-device preopt pass that is performed otherwise the first time the AVD is launched. Benchmarking shows reductions in first boot time from 1m30s to 40s on a 2.4GHz Xeon when emulating the AOSP master ToT. Change-Id: Ibf5ebe68aa4d363c9df05d2ffe7cb828ef99f922 Orig-Change-Id: I67a9ce9791220c202817864c6e83dc8fd9cbc027 --- diff --git a/target/board/generic/BoardConfig.mk b/target/board/generic/BoardConfig.mk index 1e8f9e49e..64b1dbebc 100644 --- a/target/board/generic/BoardConfig.mk +++ b/target/board/generic/BoardConfig.mk @@ -27,3 +27,9 @@ BOARD_USES_GENERIC_AUDIO := true # no hardware camera USE_CAMERA_STUB := true + +# Enable dex-preoptimization to speed up the first boot sequence +# of an SDK AVD. Note that this operation only works on Linux for now +ifeq ($(HOST_OS),linux) +WITH_DEXPREOPT := true +endif diff --git a/target/board/generic_x86/BoardConfig.mk b/target/board/generic_x86/BoardConfig.mk index 1bad20d5b..02064342e 100644 --- a/target/board/generic_x86/BoardConfig.mk +++ b/target/board/generic_x86/BoardConfig.mk @@ -21,3 +21,8 @@ USE_CAMERA_STUB := true # Set /system/bin/sh to mksh, not ash, to test the transition. TARGET_SHELL := mksh +# Enable dex-preoptimization to speed up the first boot sequence +# of an SDK AVD. Note that this operation only works on Linux for now +ifeq ($(HOST_OS),linux) +WITH_DEXPREOPT := true +endif