aboutsummaryrefslogtreecommitdiff
path: root/repos/clang/firefox/pgo-notimeout.patch
diff options
context:
space:
mode:
authoremmett1 <emmett1.2iligrams@protonmail.com>2025-03-12 04:01:18 +0100
committeremmett1 <emmett1.2iligrams@protonmail.com>2025-03-12 04:01:18 +0100
commitddd8e1a8fab2ac39396282a7c09ddf6eca219613 (patch)
tree12796519575126d60e06d02e9eab68856229cf58 /repos/clang/firefox/pgo-notimeout.patch
parentb5a8a6c29e40f786ceb808c0b95f01c4251111d1 (diff)
downloadalicelinux-ddd8e1a8fab2ac39396282a7c09ddf6eca219613.tar.gz
alicelinux-ddd8e1a8fab2ac39396282a7c09ddf6eca219613.zip
clang repos updated
Diffstat (limited to 'repos/clang/firefox/pgo-notimeout.patch')
-rw-r--r--repos/clang/firefox/pgo-notimeout.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/repos/clang/firefox/pgo-notimeout.patch b/repos/clang/firefox/pgo-notimeout.patch
new file mode 100644
index 00000000..f6d83ed4
--- /dev/null
+++ b/repos/clang/firefox/pgo-notimeout.patch
@@ -0,0 +1,26 @@
+Patch-Source: https://gist.github.com/classilla/1202f8d467749c029325278a87a068c8
+--
+--- a/toolkit/components/terminator/nsTerminator.cpp
++++ b/toolkit/components/terminator/nsTerminator.cpp
+@@ -455,16 +455,21 @@
+ // Defend against overflow
+ crashAfterMS = INT32_MAX;
+ } else {
+ crashAfterMS *= scaleUp;
+ }
+ }
+ #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.
++ crashAfterMS = INT32_MAX;
++
+ UniquePtr<Options> options(new Options());
+ // crashAfterTicks is guaranteed to be > 0 as
+ // crashAfterMS >= ADDITIONAL_WAIT_BEFORE_CRASH_MS >> HEARTBEAT_INTERVAL_MS
+ options->crashAfterTicks = crashAfterMS / HEARTBEAT_INTERVAL_MS;
+
+ DebugOnly<PRThread*> watchdogThread =
+ CreateSystemThread(RunWatchdog, options.release());
+ MOZ_ASSERT(watchdogThread);