summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalin Juravle <calin@google.com>2021-06-21 15:07:49 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-06-21 15:07:49 +0000
commit94527bcfb342eb0c547bbd312d3a01af5f51808a (patch)
treec3a58c4250572d3c837f2318ea8d13971fa57246
parent33ac264b78e823ed0d9e7c97036b9b8d6fb8b13d (diff)
parentdd3a5b7e5501f9f0edc84abe1b5f9b9c611baff3 (diff)
downloadnative-94527bcfb342eb0c547bbd312d3a01af5f51808a.tar.gz
Merge "Enable compiling dex files in isolation on low ram devices." into sc-dev am: dd3a5b7e55
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15025721 Change-Id: Id346bcb9f892cb765a78c898b0ae25e8a5606c84
-rw-r--r--cmds/installd/run_dex2oat.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmds/installd/run_dex2oat.cpp b/cmds/installd/run_dex2oat.cpp
index a27fd103a4..e847626a14 100644
--- a/cmds/installd/run_dex2oat.cpp
+++ b/cmds/installd/run_dex2oat.cpp
@@ -324,6 +324,12 @@ void RunDex2Oat::PrepareCompilerRuntimeAndPerfConfigFlags(bool post_bootcomplete
AddRuntimeArg(MapPropertyToArg("dalvik.vm.dex2oat-Xms", "-Xms%s"));
AddRuntimeArg(MapPropertyToArg("dalvik.vm.dex2oat-Xmx", "-Xmx%s"));
+
+ // Enable compiling dex files in isolation on low ram devices.
+ // It takes longer but reduces the memory footprint.
+ if (GetBoolProperty("ro.config.low_ram", false)) {
+ AddArg("--compile-individually");
+ }
}
void RunDex2Oat::Exec(int exit_code) {