summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrion Hodson <oth@google.com>2019-11-19 15:19:40 -0800
committerandroid-build-merger <android-build-merger@google.com>2019-11-19 15:19:40 -0800
commitc66d78fa872ad3f5306f38618a20b1f02d311527 (patch)
tree66184d8345a197a5503a5ec76aec725499df4135
parent25843313c8ad16f98df60ac839ad3055044e6c87 (diff)
parentb05c6a56fa9f290e1fdcb0d1d2f6cc776bd9b2d8 (diff)
downloadnative-c66d78fa872ad3f5306f38618a20b1f02d311527.tar.gz
Merge "installd: add dex2oat cpu-set system properties"
am: b05c6a56fa Change-Id: Id2bd69d3110d1dfdd537bdd8e7c4eb99e3ea2efd
-rw-r--r--cmds/installd/dexopt.cpp5
-rw-r--r--cmds/installd/otapreopt.cpp4
2 files changed, 9 insertions, 0 deletions
diff --git a/cmds/installd/dexopt.cpp b/cmds/installd/dexopt.cpp
index 616c3b2687..f95e445ade 100644
--- a/cmds/installd/dexopt.cpp
+++ b/cmds/installd/dexopt.cpp
@@ -339,6 +339,10 @@ class RunDex2Oat : public ExecVHelper {
? "dalvik.vm.dex2oat-threads"
: "dalvik.vm.boot-dex2oat-threads";
std::string dex2oat_threads_arg = MapPropertyToArg(threads_property, "-j%s");
+ const char* cpu_set_property = post_bootcomplete
+ ? "dalvik.vm.dex2oat-cpu-set"
+ : "dalvik.vm.boot-dex2oat-cpu-set";
+ std::string dex2oat_cpu_set_arg = MapPropertyToArg(cpu_set_property, "--cpu-set=%s");
std::string bootclasspath;
char* dex2oat_bootclasspath = getenv("DEX2OATBOOTCLASSPATH");
@@ -518,6 +522,7 @@ class RunDex2Oat : public ExecVHelper {
AddArg(image_block_size_arg);
AddArg(dex2oat_compiler_filter_arg);
AddArg(dex2oat_threads_arg);
+ AddArg(dex2oat_cpu_set_arg);
AddArg(dex2oat_swap_fd);
AddArg(dex2oat_image_fd);
diff --git a/cmds/installd/otapreopt.cpp b/cmds/installd/otapreopt.cpp
index db36ce3c9e..eefbe4ffe2 100644
--- a/cmds/installd/otapreopt.cpp
+++ b/cmds/installd/otapreopt.cpp
@@ -480,6 +480,10 @@ private:
"-j",
false,
cmd);
+ AddCompilerOptionFromSystemProperty("dalvik.vm.image-dex2oat-cpu-set",
+ "--cpu-set=",
+ false,
+ cmd);
AddCompilerOptionFromSystemProperty(
StringPrintf("dalvik.vm.isa.%s.variant", isa).c_str(),
"--instruction-set-variant=",