summaryrefslogtreecommitdiff
path: root/mozilla-1516081.patch
diff options
context:
space:
mode:
authorMartin Stransky <stransky@redhat.com>2019-01-03 15:35:59 +0100
committerMartin Stransky <stransky@redhat.com>2019-01-03 15:35:59 +0100
commit8fe69a3fb34945f94999bfe6c2d06385cbf0ab19 (patch)
treea839bdd5557a73d2bed66f0524d199898f184f50 /mozilla-1516081.patch
parentPGO build test (diff)
downloadlibrewolf-fedora-ff-8fe69a3fb34945f94999bfe6c2d06385cbf0ab19.tar.gz
librewolf-fedora-ff-8fe69a3fb34945f94999bfe6c2d06385cbf0ab19.tar.bz2
librewolf-fedora-ff-8fe69a3fb34945f94999bfe6c2d06385cbf0ab19.zip
Updated PGO/LTO setup
Diffstat (limited to 'mozilla-1516081.patch')
-rw-r--r--mozilla-1516081.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/mozilla-1516081.patch b/mozilla-1516081.patch
new file mode 100644
index 0000000..174bbfb
--- /dev/null
+++ b/mozilla-1516081.patch
@@ -0,0 +1,38 @@
+diff -up firefox-64.0/build/moz.configure/toolchain.configure.1516081 firefox-64.0/build/moz.configure/toolchain.configure
+--- firefox-64.0/build/moz.configure/toolchain.configure.1516081 2018-12-07 03:56:20.000000000 +0100
++++ firefox-64.0/build/moz.configure/toolchain.configure 2019-01-03 15:30:08.207368056 +0100
+@@ -1304,7 +1304,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'],
+@@ -1325,7 +1325,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-64.0/toolkit/components/terminator/nsTerminator.cpp.1516081 firefox-64.0/toolkit/components/terminator/nsTerminator.cpp
+--- firefox-64.0/toolkit/components/terminator/nsTerminator.cpp.1516081 2019-01-03 15:30:08.207368056 +0100
++++ firefox-64.0/toolkit/components/terminator/nsTerminator.cpp 2019-01-03 15:31:33.445034029 +0100
+@@ -441,6 +441,12 @@ 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