Title: [221597] trunk/Source/_javascript_Core
Revision
221597
Author
[email protected]
Date
2017-09-04 17:11:49 -0700 (Mon, 04 Sep 2017)

Log Message

[DFG] Consider increasing the number of DFG worklist threads
https://bugs.webkit.org/show_bug.cgi?id=176222

Reviewed by Saam Barati.

Attempt to add one more thread to DFG worklist. DFG compiler sometimes takes
very long time if the target function is very large. However, DFG worklist
has only one thread before this patch. Therefore, one function that takes
too much time to be compiled can prevent the other functions from being
compiled in DFG or upper tiers.

One example is Octane/zlib. In zlib, compiling "a1" function in DFG takes
super long time (447 ms) because of its super large size of the function.
While this function never gets compiled in FTL due to its large size,
it can be compiled in DFG and takes super long time. Subsequent "a8" function
compilation in DFG is blocked by this "a1". As a consequence, the benchmark
takes very long time in a1/Baseline code, which is slower than DFG of course.

While FTL has a bit more threads, DFG worklist has only one thread. This patch
adds one more thread to DFG worklist to alleviate the above situation. This
change significantly improves Octane/zlib performance.

                            baseline                  patched

zlib           x2     482.32825+-6.07640    ^   408.66072+-14.03856      ^ definitely 1.1803x faster

* runtime/Options.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (221596 => 221597)


--- trunk/Source/_javascript_Core/ChangeLog	2017-09-04 23:50:04 UTC (rev 221596)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-09-05 00:11:49 UTC (rev 221597)
@@ -1,3 +1,33 @@
+2017-09-04  Yusuke Suzuki  <[email protected]>
+
+        [DFG] Consider increasing the number of DFG worklist threads
+        https://bugs.webkit.org/show_bug.cgi?id=176222
+
+        Reviewed by Saam Barati.
+
+        Attempt to add one more thread to DFG worklist. DFG compiler sometimes takes
+        very long time if the target function is very large. However, DFG worklist
+        has only one thread before this patch. Therefore, one function that takes
+        too much time to be compiled can prevent the other functions from being
+        compiled in DFG or upper tiers.
+
+        One example is Octane/zlib. In zlib, compiling "a1" function in DFG takes
+        super long time (447 ms) because of its super large size of the function.
+        While this function never gets compiled in FTL due to its large size,
+        it can be compiled in DFG and takes super long time. Subsequent "a8" function
+        compilation in DFG is blocked by this "a1". As a consequence, the benchmark
+        takes very long time in a1/Baseline code, which is slower than DFG of course.
+
+        While FTL has a bit more threads, DFG worklist has only one thread. This patch
+        adds one more thread to DFG worklist to alleviate the above situation. This
+        change significantly improves Octane/zlib performance.
+
+                                    baseline                  patched
+
+        zlib           x2     482.32825+-6.07640    ^   408.66072+-14.03856      ^ definitely 1.1803x faster
+
+        * runtime/Options.h:
+
 2017-09-04  Sam Weinig  <[email protected]>
 
         [WebIDL] Unify and simplify EnableBySettings with the rest of the runtime settings

Modified: trunk/Source/_javascript_Core/runtime/Options.h (221596 => 221597)


--- trunk/Source/_javascript_Core/runtime/Options.h	2017-09-04 23:50:04 UTC (rev 221596)
+++ trunk/Source/_javascript_Core/runtime/Options.h	2017-09-05 00:11:49 UTC (rev 221597)
@@ -260,7 +260,7 @@
     v(bool, logExecutableAllocation, false, Normal, nullptr) \
     \
     v(bool, useConcurrentJIT, true, Normal, "allows the DFG / FTL compilation in threads other than the executing JS thread") \
-    v(unsigned, numberOfDFGCompilerThreads, computeNumberOfWorkerThreads(2, 2) - 1, Normal, nullptr) \
+    v(unsigned, numberOfDFGCompilerThreads, computeNumberOfWorkerThreads(3, 2) - 1, Normal, nullptr) \
     v(unsigned, numberOfFTLCompilerThreads, computeNumberOfWorkerThreads(MAXIMUM_NUMBER_OF_FTL_COMPILER_THREADS, 2) - 1, Normal, nullptr) \
     v(int32, priorityDeltaOfDFGCompilerThreads, computePriorityDeltaOfWorkerThreads(-1, 0), Normal, nullptr) \
     v(int32, priorityDeltaOfFTLCompilerThreads, computePriorityDeltaOfWorkerThreads(-2, 0), Normal, nullptr) \
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to