summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-10-05 15:31:25 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-10-05 15:31:25 +0000
commiteb051222d818f22d4b3910953cde6906a0cea9fa (patch)
tree2ed82a5a2607ece196aa00f94e0d46a336af7093
parenta21d821a002dca4d28ef2d86760b9147b9f35de6 (diff)
parent9d96bd65577bb6b7499627ecba8ea027f3299091 (diff)
downloadandroid_art-eb051222d818f22d4b3910953cde6906a0cea9fa.tar.gz
android_art-eb051222d818f22d4b3910953cde6906a0cea9fa.tar.bz2
android_art-eb051222d818f22d4b3910953cde6906a0cea9fa.zip
am 9d96bd65: ART: Decrease dex2oat watchdog timeout
* commit '9d96bd65577bb6b7499627ecba8ea027f3299091': ART: Decrease dex2oat watchdog timeout
-rw-r--r--dex2oat/dex2oat.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index e913c20407..c51c31769e 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -433,8 +433,10 @@ class WatchDog {
// Debug builds are slower so they have larger timeouts.
static constexpr int64_t kSlowdownFactor = kIsDebugBuild ? 5U : 1U;
- // 10 minutes scaled by kSlowdownFactor.
- static constexpr int64_t kWatchDogTimeoutSeconds = kSlowdownFactor * 10 * 60;
+ // 9.5 minutes scaled by kSlowdownFactor. This is slightly smaller than the Package Manager
+ // watchdog (PackageManagerService.WATCHDOG_TIMEOUT, 10 minutes), so that dex2oat will abort
+ // itself before that watchdog would take down the system server.
+ static constexpr int64_t kWatchDogTimeoutSeconds = kSlowdownFactor * (9 * 60 + 30);
bool is_watch_dog_enabled_;
bool shutting_down_;