commit | 98d03db9f7f7cdfbd3f6791cc2935a127d6538d0 | [log] [tgz] |
---|---|---|
author | Calin Juravle <calin@google.com> | Mon Jun 21 14:44:35 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Jun 21 14:44:35 2021 +0000 |
tree | 0500dc501bc12e54971cfc007d23e379442f31d9 | |
parent | 336e338b5104d8c1a67e7fc7e59ee384f4aca5eb [diff] | |
parent | 6512c315445e81ab8bf937bab1600cbcc42e9d8a [diff] |
Merge "Enable compiling dex files in isolation on low ram devices." am: 6512c31544 Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1740162 Change-Id: Ib70ecdaee30a1f9c6400f4adcb19ddd678aaae3f
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) {