summaryrefslogtreecommitdiff
path: root/mozilla-1516081.patch
blob: 8eec605207ad316a70a78d0bda5797256cd16c2c (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
29
30
31
32
33
34
35
36
37
38
diff -up firefox-65.0/build/moz.configure/toolchain.configure.1516081 firefox-65.0/build/moz.configure/toolchain.configure
--- firefox-65.0/build/moz.configure/toolchain.configure.1516081	2019-01-24 19:48:38.000000000 +0100
+++ firefox-65.0/build/moz.configure/toolchain.configure	2019-01-28 14:09:00.813320242 +0100
@@ -1364,7 +1364,7 @@ def pgo_flags(compiler, build_env, targe
 
     if compiler.type == 'gcc':
         return namespace(
-            gen_cflags=['-fprofile-generate'],
+            gen_cflags=['-fprofile-generate', '-DMOZ_PROFILE_INSTRUMENTATION'],
             gen_ldflags=['-fprofile-generate'],
             use_cflags=['-fprofile-use', '-fprofile-correction',
                         '-Wcoverage-mismatch'],
@@ -1385,7 +1385,8 @@ def pgo_flags(compiler, build_env, targe
 
         if gen_ldflags:
             return namespace(
-                gen_cflags=['-fprofile-instr-generate'],
+                gen_cflags=['-fprofile-instr-generate',
+			    '-DMOZ_PROFILE_INSTRUMENTATION'],
                 gen_ldflags=gen_ldflags,
                 use_cflags=['-fprofile-instr-use=%s' % profdata,
                             '-Wno-error=profile-instr-out-of-date',
diff -up firefox-65.0/toolkit/components/terminator/nsTerminator.cpp.1516081 firefox-65.0/toolkit/components/terminator/nsTerminator.cpp
--- firefox-65.0/toolkit/components/terminator/nsTerminator.cpp.1516081	2019-01-28 14:09:00.813320242 +0100
+++ firefox-65.0/toolkit/components/terminator/nsTerminator.cpp	2019-01-28 14:11:56.745577302 +0100
@@ -419,6 +419,12 @@ 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());
   const PRIntervalTime ticksDuration = PR_MillisecondsToInterval(1000);
bgstack15