diff options
author | Calin Juravle | 2018-04-25 17:25:46 -0500 |
---|---|---|
committer | Calin Juravle | 2018-04-30 14:09:27 -0500 |
commit | 62c28938496de080ba3c3f4f4ce41ef1f44c9a10 (patch) | |
tree | 82d0efafd91f9a4adfea26e572e7f2342941a52d /core/dex_preopt_odex_install.mk | |
parent | 8faa2ec0d85af5617a0e42408981eeb3635a26cf (diff) | |
download | platform-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.mk | 10 |
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 | |||
99 | endif | 99 | endif |
100 | 100 | ||
101 | ifndef LOCAL_DEX_PREOPT_GENERATE_PROFILE | 101 | ifndef 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. |
104 | my_classes_directory := $(PRODUCT_DEX_PREOPT_PROFILE_DIR) | 106 | my_classes_directory := $(PRODUCT_DEX_PREOPT_PROFILE_DIR) |
105 | LOCAL_DEX_PREOPT_PROFILE := $(my_classes_directory)/$(LOCAL_MODULE).prof | 107 | LOCAL_DEX_PREOPT_PROFILE := $(my_classes_directory)/$(LOCAL_MODULE).prof |
108 | |||
106 | ifneq (,$(wildcard $(LOCAL_DEX_PREOPT_PROFILE))) | 109 | ifneq (,$(wildcard $(LOCAL_DEX_PREOPT_PROFILE))) |
107 | my_process_profile := true | 110 | my_process_profile := true |
108 | my_profile_is_text_listing := false | 111 | my_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)" |
163 | endif | 166 | endif |
164 | 167 | ||
165 | my_process_profile := | ||
166 | my_profile_is_text_listing := | 168 | my_profile_is_text_listing := |
167 | dex_preopt_profile_src_file := | 169 | dex_preopt_profile_src_file := |
168 | 170 | ||
@@ -233,7 +235,7 @@ installed_vdex := $(strip $(installed_vdex)) | |||
233 | installed_art := $(strip $(installed_art)) | 235 | installed_art := $(strip $(installed_art)) |
234 | 236 | ||
235 | ifdef built_odex | 237 | ifdef built_odex |
236 | ifeq (true,$(LOCAL_DEX_PREOPT_GENERATE_PROFILE)) | 238 | ifeq (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) |
239 | else | 241 | else |
@@ -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 | |||
388 | ALL_MODULES.$(my_register_name).INSTALLED += $(my_installed_profile) | 390 | ALL_MODULES.$(my_register_name).INSTALLED += $(my_installed_profile) |
389 | ALL_MODULES.$(my_register_name).BUILT_INSTALLED += $(build_installed_profile) | 391 | ALL_MODULES.$(my_register_name).BUILT_INSTALLED += $(build_installed_profile) |
390 | 392 | ||
393 | my_process_profile := | ||
394 | |||
391 | $(my_all_targets): $(my_installed_profile) | 395 | $(my_all_targets): $(my_installed_profile) |