Title: [198670] trunk
Revision
198670
Author
[email protected]
Date
2016-03-25 09:25:28 -0700 (Fri, 25 Mar 2016)

Log Message

Detect correct number of processors on windows
https://bugs.webkit.org/show_bug.cgi?id=155884

Patch by Bill Ming <[email protected]> on 2016-03-25
Reviewed by Alex Christensen.

* Tools/Scripts/run-jsc-stress-tests:

Modified Paths

Diff

Modified: trunk/ChangeLog (198669 => 198670)


--- trunk/ChangeLog	2016-03-25 16:14:20 UTC (rev 198669)
+++ trunk/ChangeLog	2016-03-25 16:25:28 UTC (rev 198670)
@@ -1,3 +1,12 @@
+2016-03-25  Bill Ming  <[email protected]>
+
+        Detect correct number of processors on windows
+        https://bugs.webkit.org/show_bug.cgi?id=155884
+
+        Reviewed by Alex Christensen.
+
+        * Tools/Scripts/run-jsc-stress-tests:
+
 2016-03-25  Brent Fulgham  <[email protected]>
 
         [Win] Improve CMake build performance 

Modified: trunk/Tools/Scripts/run-jsc-stress-tests (198669 => 198670)


--- trunk/Tools/Scripts/run-jsc-stress-tests	2016-03-25 16:14:20 UTC (rev 198669)
+++ trunk/Tools/Scripts/run-jsc-stress-tests	2016-03-25 16:25:28 UTC (rev 198670)
@@ -1694,18 +1694,22 @@
 end
 
 def numberOfProcessors
-    begin
-        numProcessors = runCommandOnTester("sysctl -n hw.activecpu 2>/dev/null").to_i
-    rescue
-        numProcessors = 0
-    end
-
-    if numProcessors == 0
+    if $hostOS == "windows"
+        numProcessors = runCommandOnTester("cmd /c echo %NUMBER_OF_PROCESSORS%").to_i
+    else
         begin
-            numProcessors = runCommandOnTester("nproc --all 2>/dev/null").to_i
+            numProcessors = runCommandOnTester("sysctl -n hw.activecpu 2>/dev/null").to_i
         rescue
-            numProcessors == 0
+            numProcessors = 0
         end
+
+        if numProcessors == 0
+            begin
+                numProcessors = runCommandOnTester("nproc --all 2>/dev/null").to_i
+            rescue
+                numProcessors == 0
+            end
+        end
     end
 
     if numProcessors == 0
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to