[Chromium] Lots of timeouts causing Mac10.6 to exit early.
authordpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Apr 2012 01:40:39 +0000 (01:40 +0000)
committerdpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Apr 2012 01:40:39 +0000 (01:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=83076

Unreviewed, build fix (slightly reviewed by Simon Fraser and Eric Seidel, but not approved).

Add logic to the apple mac and chromium mac code to not use
too many workers; it looks like the xserves (and possibly mac
pros) count hyperthreaded cores when they really shouldn't and
we end up using too many workers at a time; this leads to tests
thrashing and timing out.

This change is a temporary fix to make the bots happy while I
look into more profiling and other fixes.

* Scripts/webkitpy/layout_tests/port/mac.py:
(ChromiumMacPort.default_child_processes):

* Scripts/webkitpy/layout_tests/port/chromium_mac.py:
(ChromiumMacPort.default_child_processes):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113122 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
Tools/Scripts/webkitpy/layout_tests/port/mac.py

index 0b54426..ef0231b 100644 (file)
@@ -1,3 +1,25 @@
+2012-04-03  Dirk Pranke  <dpranke@chromium.org>
+
+        [Chromium] Lots of timeouts causing Mac10.6 to exit early.
+        https://bugs.webkit.org/show_bug.cgi?id=83076
+
+        Unreviewed, build fix (slightly reviewed by Simon Fraser and Eric Seidel, but not approved).
+
+        Add logic to the apple mac and chromium mac code to not use
+        too many workers; it looks like the xserves (and possibly mac
+        pros) count hyperthreaded cores when they really shouldn't and
+        we end up using too many workers at a time; this leads to tests
+        thrashing and timing out.
+
+        This change is a temporary fix to make the bots happy while I
+        look into more profiling and other fixes.
+
+        * Scripts/webkitpy/layout_tests/port/mac.py:
+        (ChromiumMacPort.default_child_processes):
+
+        * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
+        (ChromiumMacPort.default_child_processes):
+
 2012-04-03  Simon Fraser  <simon.fraser@apple.com>
 
         WebKitTestRunner's EventSender is leaky
index 30f4aa9..3a7c4a0 100644 (file)
@@ -105,6 +105,16 @@ class ChromiumMacPort(chromium.ChromiumPort):
     def operating_system(self):
         return 'mac'
 
+    def default_child_processes(self):
+        # FIXME: As a temporary workaround while we figure out what's going
+        # on with https://bugs.webkit.org/show_bug.cgi?id=83076, reduce by
+        # half the # of workers we run by default on bigger machines.
+        default_count = super(ChromiumMacPort, self).default_child_processes()
+        if default_count >= 8:
+            cpu_count = self._executive.cpu_count()
+            return max(1, min(default_count, int(cpu_count / 2)))
+        return default_count
+
     #
     # PROTECTED METHODS
     #
index 6c55712..94f7017 100644 (file)
@@ -107,7 +107,15 @@ class MacPort(ApplePort):
         if self.is_snowleopard():
             _log.warn("Cannot run tests in parallel on Snow Leopard due to rdar://problem/10621525.")
             return 1
-        return super(MacPort, self).default_child_processes()
+
+        # FIXME: As a temporary workaround while we figure out what's going
+        # on with https://bugs.webkit.org/show_bug.cgi?id=83076, reduce by
+        # half the # of workers we run by default on bigger machines.
+        default_count = super(MacPort, self).default_child_processes()
+        if default_count >= 8:
+            cpu_count = self._executive.cpu_count()
+            return max(1, min(default_count, int(cpu_count / 2)))
+        return default_count
 
     def _build_java_test_support(self):
         java_tests_path = self._filesystem.join(self.layout_tests_dir(), "java")