diff options
author | Brian Carlstrom <bdc@google.com> | 2014-07-28 19:13:28 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2014-08-06 21:59:32 -0700 |
commit | 9a87db6e1f48fb58398ac186968b08d000342098 (patch) | |
tree | ca8284d00ed459ce49e890a1946cf47fc53d19c9 /cmds | |
parent | 43c5d30795faf08ab639b8d88c2eceaf2b648c93 (diff) | |
download | frameworks_native-9a87db6e1f48fb58398ac186968b08d000342098.zip frameworks_native-9a87db6e1f48fb58398ac186968b08d000342098.tar.gz frameworks_native-9a87db6e1f48fb58398ac186968b08d000342098.tar.bz2 |
Move from dalvik.vm.image-dex2oat-flags to dalvik.vm.dex2oat-filter [frameworks/native]
This will allow us to conditionally change the compiler-filter based on other properties.
Bug: 15165413
(cherry picked from commit cf51ba1360ee13459830a0502b0d454d0145544f)
Change-Id: I6613c9710878d56ed8c121e0caded76a64430f76
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/installd/commands.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c index d54c545..4faac81 100644 --- a/cmds/installd/commands.c +++ b/cmds/installd/commands.c @@ -684,6 +684,10 @@ static void run_dex2oat(int zip_fd, int oat_fd, const char* input_file_name, char dex2oat_Xmx_flag[PROPERTY_VALUE_MAX]; bool have_dex2oat_Xmx_flag = property_get("dalvik.vm.dex2oat-Xmx", dex2oat_Xmx_flag, NULL) > 0; + char dex2oat_compiler_filter_flag[PROPERTY_VALUE_MAX]; + bool have_dex2oat_compiler_filter_flag = property_get("dalvik.vm.dex2oat-filter", + dex2oat_compiler_filter_flag, NULL) > 0; + char dex2oat_flags[PROPERTY_VALUE_MAX]; bool have_dex2oat_flags = property_get("dalvik.vm.dex2oat-flags", dex2oat_flags, NULL) > 0; ALOGV("dalvik.vm.dex2oat-flags=%s\n", dex2oat_flags); @@ -710,6 +714,7 @@ static void run_dex2oat(int zip_fd, int oat_fd, const char* input_file_name, char top_k_profile_threshold_arg[strlen("--top-k-profile-threshold=") + PROPERTY_VALUE_MAX]; char dex2oat_Xms_arg[strlen("-Xms") + PROPERTY_VALUE_MAX]; char dex2oat_Xmx_arg[strlen("-Xmx") + PROPERTY_VALUE_MAX]; + char dex2oat_compiler_filter_arg[strlen("--compiler-filter=") + PROPERTY_VALUE_MAX]; sprintf(zip_fd_arg, "--zip-fd=%d", zip_fd); sprintf(zip_location_arg, "--zip-location=%s", input_file_name); @@ -741,6 +746,9 @@ static void run_dex2oat(int zip_fd, int oat_fd, const char* input_file_name, if (have_dex2oat_Xmx_flag) { sprintf(dex2oat_Xmx_arg, "-Xmx%s", dex2oat_Xmx_flag); } + if (have_dex2oat_compiler_filter_flag) { + sprintf(dex2oat_compiler_filter_arg, "--compiler-filter=%s", dex2oat_compiler_filter_flag); + } ALOGV("Running %s in=%s out=%s\n", DEX2OAT_BIN, input_file_name, output_file_name); @@ -749,6 +757,7 @@ static void run_dex2oat(int zip_fd, int oat_fd, const char* input_file_name, + (have_top_k_profile_threshold ? 1 : 0) + (have_dex2oat_Xms_flag ? 2 : 0) + (have_dex2oat_Xmx_flag ? 2 : 0) + + (have_dex2oat_compiler_filter_flag ? 1 : 0) + (have_dex2oat_flags ? 1 : 0)]; int i = 0; argv[i++] = (char*)DEX2OAT_BIN; @@ -771,6 +780,9 @@ static void run_dex2oat(int zip_fd, int oat_fd, const char* input_file_name, argv[i++] = (char*)RUNTIME_ARG; argv[i++] = dex2oat_Xmx_arg; } + if (have_dex2oat_compiler_filter_flag) { + argv[i++] = dex2oat_compiler_filter_arg; + } if (have_dex2oat_flags) { argv[i++] = dex2oat_flags; } |