aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalin Juravle2018-04-25 17:25:46 -0500
committerCalin Juravle2018-04-30 14:09:27 -0500
commit62c28938496de080ba3c3f4f4ce41ef1f44c9a10 (patch)
tree82d0efafd91f9a4adfea26e572e7f2342941a52d /core/dex_preopt_odex_install.mk
parent8faa2ec0d85af5617a0e42408981eeb3635a26cf (diff)
downloadplatform-build-62c28938496de080ba3c3f4f4ce41ef1f44c9a10.tar.gz
platform-build-62c28938496de080ba3c3f4f4ce41ef1f44c9a10.tar.xz
platform-build-62c28938496de080ba3c3f4f4ce41ef1f44c9a10.zip
Fix speed-profile compilation for prebuilds
We were testing the wrong variable when setting the dex2oat flags Test: m; flash, dumpsys dexopt and check for speed-profile Bug: 78515726 (cherry picked from commit 7d701355e9b517b5c2486594dccab6568c9df1c6) Merged-In: I57c0e11aab2e4879c3ba3b2851f356b5864f5da9 Change-Id: I2e2f9da1dc9ed71977ec1d698433674c731f78bc
Diffstat (limited to 'core/dex_preopt_odex_install.mk')
-rw-r--r--core/dex_preopt_odex_install.mk10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk
index 4550fc8fc..517de8659 100644
--- a/core/dex_preopt_odex_install.mk
+++ b/core/dex_preopt_odex_install.mk
@@ -99,10 +99,13 @@ LOCAL_DEX_PREOPT_GENERATE_PROFILE := false
99endif 99endif
100 100
101ifndef LOCAL_DEX_PREOPT_GENERATE_PROFILE 101ifndef LOCAL_DEX_PREOPT_GENERATE_PROFILE
102
103
102# If LOCAL_DEX_PREOPT_GENERATE_PROFILE is not defined, default it based on the existence of the 104# If LOCAL_DEX_PREOPT_GENERATE_PROFILE is not defined, default it based on the existence of the
103# profile class listing. TODO: Use product specific directory here. 105# profile class listing. TODO: Use product specific directory here.
104my_classes_directory := $(PRODUCT_DEX_PREOPT_PROFILE_DIR) 106my_classes_directory := $(PRODUCT_DEX_PREOPT_PROFILE_DIR)
105LOCAL_DEX_PREOPT_PROFILE := $(my_classes_directory)/$(LOCAL_MODULE).prof 107LOCAL_DEX_PREOPT_PROFILE := $(my_classes_directory)/$(LOCAL_MODULE).prof
108
106ifneq (,$(wildcard $(LOCAL_DEX_PREOPT_PROFILE))) 109ifneq (,$(wildcard $(LOCAL_DEX_PREOPT_PROFILE)))
107my_process_profile := true 110my_process_profile := true
108my_profile_is_text_listing := false 111my_profile_is_text_listing := false
@@ -162,7 +165,6 @@ $(my_built_profile):
162 || echo "Profile out of date for $(PRIVATE_BUILT_MODULE)" 165 || echo "Profile out of date for $(PRIVATE_BUILT_MODULE)"
163endif 166endif
164 167
165my_process_profile :=
166my_profile_is_text_listing := 168my_profile_is_text_listing :=
167dex_preopt_profile_src_file := 169dex_preopt_profile_src_file :=
168 170
@@ -233,7 +235,7 @@ installed_vdex := $(strip $(installed_vdex))
233installed_art := $(strip $(installed_art)) 235installed_art := $(strip $(installed_art))
234 236
235ifdef built_odex 237ifdef built_odex
236ifeq (true,$(LOCAL_DEX_PREOPT_GENERATE_PROFILE)) 238ifeq (true,$(my_process_profile))
237$(built_odex): $(my_built_profile) 239$(built_odex): $(my_built_profile)
238$(built_odex): PRIVATE_PROFILE_PREOPT_FLAGS := --profile-file=$(my_built_profile) 240$(built_odex): PRIVATE_PROFILE_PREOPT_FLAGS := --profile-file=$(my_built_profile)
239else 241else
@@ -268,7 +270,7 @@ ifeq (,$(filter --compiler-filter=%, $(LOCAL_DEX_PREOPT_FLAGS)))
268 # 'speed' compiler filter. 270 # 'speed' compiler filter.
269 LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=speed 271 LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=speed
270 else 272 else
271 ifeq (true,$(LOCAL_DEX_PREOPT_GENERATE_PROFILE)) 273 ifeq (true,$(my_process_profile))
272 # For non system server jars, use speed-profile when we have a profile. 274 # For non system server jars, use speed-profile when we have a profile.
273 LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=speed-profile 275 LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=speed-profile
274 else 276 else
@@ -388,4 +390,6 @@ endif # LOCAL_DEX_PREOPT
388ALL_MODULES.$(my_register_name).INSTALLED += $(my_installed_profile) 390ALL_MODULES.$(my_register_name).INSTALLED += $(my_installed_profile)
389ALL_MODULES.$(my_register_name).BUILT_INSTALLED += $(build_installed_profile) 391ALL_MODULES.$(my_register_name).BUILT_INSTALLED += $(build_installed_profile)
390 392
393my_process_profile :=
394
391$(my_all_targets): $(my_installed_profile) 395$(my_all_targets): $(my_installed_profile)