commit | 13296af7be470e4b58baab91c4fe67438236971a | [log] [tgz] |
---|---|---|
author | Calin Juravle <calin@google.com> | Mon Jun 21 15:08:40 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Jun 21 15:08:40 2021 +0000 |
tree | 18b89aaf826504d648965e9814356c80ed5a7c54 | |
parent | 85822c9eef68ef700e985be54c78b2a85cad265c [diff] | |
parent | dd3a5b7e5501f9f0edc84abe1b5f9b9c611baff3 [diff] |
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: Iba59fe7ad1b94aa01ccab4744d1f28e835636dc8
diff --git a/cmds/installd/run_dex2oat.cpp b/cmds/installd/run_dex2oat.cpp index a27fd10..e847626 100644 --- a/cmds/installd/run_dex2oat.cpp +++ b/cmds/installd/run_dex2oat.cpp
@@ -324,6 +324,12 @@ 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) {