Commit 2602aa86 authored by Andreas Gampe's avatar Andreas Gampe
Browse files

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 540138ae)

Change-Id: I425b19ab305cfaa43f6bddc3a892be892acaf513
parent 22e0ce3a
......@@ -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_;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment