summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sehr <sehr@google.com>2018-05-24 15:00:09 -0700
committerDavid Sehr <sehr@google.com>2018-05-24 15:54:15 -0700
commit31419e7ac873051e9adbd89fe8c3d085997f28a8 (patch)
treef0fad952abfbfc43a5376328f588ccdfd66ef449
parentc61c0c1193d493f97f3a8657b75c5256a70aea3a (diff)
downloadnative-31419e7ac873051e9adbd89fe8c3d085997f28a8.tar.gz
Disable dex2oatd for release background compiles
Use dex2oat rather than dex2oatd for release versions of userdebug builds to get more soak time. Bug: 73769503 Test: adb shell cmd package bg-dexopt-job Change-Id: Id66777e8e49885cf4579d41364d10808df49b63e
-rw-r--r--cmds/installd/dexopt.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmds/installd/dexopt.cpp b/cmds/installd/dexopt.cpp
index 624d7d6d29..9615a75a07 100644
--- a/cmds/installd/dexopt.cpp
+++ b/cmds/installd/dexopt.cpp
@@ -309,7 +309,9 @@ static void run_dex2oat(int zip_fd, int oat_fd, int input_vdex_fd, int output_vd
// If the runtime was requested to use libartd.so, we'll run dex2oatd, otherwise dex2oat.
const char* dex2oat_bin = "/system/bin/dex2oat";
constexpr const char* kDex2oatDebugPath = "/system/bin/dex2oatd";
- if (is_debug_runtime() || (background_job_compile && is_debuggable_build())) {
+ // Do not use dex2oatd for release candidates (give dex2oat more soak time).
+ bool is_release = android::base::GetProperty("ro.build.version.codename", "") == "REL";
+ if (is_debug_runtime() || (background_job_compile && is_debuggable_build() && !is_release)) {
if (access(kDex2oatDebugPath, X_OK) == 0) {
dex2oat_bin = kDex2oatDebugPath;
}