summarylogtreecommitdiffstats
path: root/0018-Bug-1516081-Disable-watchdog-during-FDO-train.patch
blob: c989e9bfbb377b49e2664972287540c3f647af94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jan Hubicka <hubicka@ucw.cz>
Date: Sat, 22 Dec 2018 09:32:00 +0200
Subject: [PATCH] Bug 1516081 - Disable watchdog during FDO train

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1516081
---
 toolkit/components/terminator/nsTerminator.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/toolkit/components/terminator/nsTerminator.cpp b/toolkit/components/terminator/nsTerminator.cpp
index 6339962022cbb71a3dd990b0ddb4bf8ddb1f2c24..d68b7c15dcac3441d4720e6b34f481c6f02fdc00 100644
--- a/toolkit/components/terminator/nsTerminator.cpp
+++ b/toolkit/components/terminator/nsTerminator.cpp
@@ -332,6 +332,13 @@ void nsTerminator::StartWatchdog() {
   }
 #endif
 
+  // Disable watchdog for PGO train builds - writting profile information at
+  // exit may take time and it is better to make build hang rather than
+  // silently produce poorly performing binary.
+#ifdef MOZ_PROFILE_INSTRUMENTATION
+  crashAfterMS = INT32_MAX;
+#endif
+
   UniquePtr<Options> options(new Options());
   // crashAfterTicks is guaranteed to be > 0 as
   // crashAfterMS >= ADDITIONAL_WAIT_BEFORE_CRASH_MS >> HEARTBEAT_INTERVAL_MS