summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-03-31 03:20:15 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-03-31 03:20:16 +0000
commit5881c8dd3b5b290cddca0e0f01e2c2f1641826b0 (patch)
tree3b469201dcfef4846e604daba93c188cfefb2d39 /cmds
parent0faebfb2f5a07939e7264a94fdcebecc4df39873 (diff)
parent8d7af8b2418cc5e7e59746f0cb359a75ed0bdfd1 (diff)
downloadframeworks_native-5881c8dd3b5b290cddca0e0f01e2c2f1641826b0.zip
frameworks_native-5881c8dd3b5b290cddca0e0f01e2c2f1641826b0.tar.gz
frameworks_native-5881c8dd3b5b290cddca0e0f01e2c2f1641826b0.tar.bz2
Merge "Installd: Support dex2oat threads system property"
Diffstat (limited to 'cmds')
-rw-r--r--cmds/installd/commands.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index 9fc3f40..a68d94d 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -722,6 +722,14 @@ static void run_dex2oat(int zip_fd, int oat_fd, const char* input_file_name,
bool have_dex2oat_compiler_filter_flag = property_get("dalvik.vm.dex2oat-filter",
dex2oat_compiler_filter_flag, NULL) > 0;
+ char dex2oat_threads_buf[PROPERTY_VALUE_MAX];
+ bool have_dex2oat_threads_flag = property_get("dalvik.vm.dex2oat-threads", dex2oat_threads_buf,
+ NULL) > 0;
+ char dex2oat_threads_arg[PROPERTY_VALUE_MAX + 2];
+ if (have_dex2oat_threads_flag) {
+ sprintf(dex2oat_threads_arg, "-j%s", dex2oat_threads_buf);
+ }
+
char dex2oat_isa_features_key[PROPERTY_KEY_MAX];
sprintf(dex2oat_isa_features_key, "dalvik.vm.isa.%s.features", instruction_set);
char dex2oat_isa_features[PROPERTY_VALUE_MAX];
@@ -841,6 +849,7 @@ static void run_dex2oat(int zip_fd, int oat_fd, const char* input_file_name,
+ (have_dex2oat_Xms_flag ? 2 : 0)
+ (have_dex2oat_Xmx_flag ? 2 : 0)
+ (have_dex2oat_compiler_filter_flag ? 1 : 0)
+ + (have_dex2oat_threads_flag ? 1 : 0)
+ (have_dex2oat_swap_fd ? 1 : 0)
+ (have_dex2oat_relocation_skip_flag ? 2 : 0)
+ (debuggable ? 1 : 0)
@@ -875,6 +884,9 @@ static void run_dex2oat(int zip_fd, int oat_fd, const char* input_file_name,
if (have_dex2oat_compiler_filter_flag) {
argv[i++] = dex2oat_compiler_filter_arg;
}
+ if (have_dex2oat_threads_flag) {
+ argv[i++] = dex2oat_threads_arg;
+ }
if (have_dex2oat_swap_fd) {
argv[i++] = dex2oat_swap_fd;
}