From 9dd9e680b9711e9bfd9c9503bb9df4c8b4e29a97 Mon Sep 17 00:00:00 2001 From: Shibin George Date: Mon, 2 Jul 2018 16:21:49 +0530 Subject: [PATCH] Allow multiple profiles to be added as part of boot.prof Extend PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION such that multiple text-based profiles can be fed to profman to be included in boot.prof BUG: 70292748 Test: profman with --dump-only option shows that additional text-based profiles are also being read if they have been added to PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION Change-Id: I8a6437a323e43b61612c67038abdde200607c513 --- core/dex_preopt_libart.mk | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk index b64155cfb7..ce060f28db 100644 --- a/core/dex_preopt_libart.mk +++ b/core/dex_preopt_libart.mk @@ -106,13 +106,21 @@ endif ifeq (true,$(my_use_profile_for_boot_image)) -# Location of text based profile for the boot image. -my_boot_image_profile_location := $(PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION) -ifeq (,$(my_boot_image_profile_location)) +boot_image_profiles := $(PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION) + +ifeq (,$(boot_image_profiles)) # If not set, use the default. -my_boot_image_profile_location := frameworks/base/config/boot-image-profile.txt +boot_image_profiles := frameworks/base/config/boot-image-profile.txt endif +# Location of text based profile for the boot image. +my_boot_image_profile_location := $(PRODUCT_OUT)/dex_bootjars/boot-image-profile.txt + +$(my_boot_image_profile_location): $(boot_image_profiles) + @echo 'Generating $@ for profman' + @rm -rf $@ + $(hide) cat $^ > $@ + # Code to create the boot image profile, not in dex_preopt_libart_boot.mk since the profile is the same for all archs. my_out_boot_image_profile_location := $(DEXPREOPT_BOOT_JAR_DIR_FULL_PATH)/boot.prof $(my_out_boot_image_profile_location): PRIVATE_PROFILE_INPUT_LOCATION := $(my_boot_image_profile_location)