diff options
author | Andreas Gampe <agampe@google.com> | 2015-09-14 15:34:38 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-10-08 20:46:33 -0700 |
commit | 2602aa86d8e0e98f00311ea05395548b4d327f82 (patch) | |
tree | 8a360fd8ca85f2809f9a018c26ee575302afbdcc /dex2oat | |
parent | 22e0ce3a73760757e509032a324bbbb9a1a93f5e (diff) | |
download | art-2602aa86d8e0e98f00311ea05395548b4d327f82.zip art-2602aa86d8e0e98f00311ea05395548b4d327f82.tar.gz art-2602aa86d8e0e98f00311ea05395548b4d327f82.tar.bz2 |
ART: Decrease dex2oat watchdog timeout
Keep the dex2oat watchdog timeout lower than the package manager
timeout, so that dex2oat kills itself before the system server
watchdog kills the system because of the long installation.
Bug: 23629410
(cherry picked from commit 540138ae55ac1909606a436d7f52e20146c56657)
Change-Id: I425b19ab305cfaa43f6bddc3a892be892acaf513
Diffstat (limited to 'dex2oat')
-rw-r--r-- | dex2oat/dex2oat.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc index 466f5e6..9d7e68a 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_; |