Cap the number of FTL compilation threads on iOS to 2
authormsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 May 2017 22:38:41 +0000 (22:38 +0000)
committermsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 May 2017 22:38:41 +0000 (22:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=171887

Reviewed by Filip Pizlo.

Set an iOS specific max of 2 threads.

* runtime/Options.h:

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

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/Options.h

index 2a3c990..a4781cf 100644 (file)
@@ -1,3 +1,14 @@
+2017-05-09  Michael Saboff  <msaboff@apple.com>
+
+        Cap the number of FTL compilation threads on iOS to 2
+        https://bugs.webkit.org/show_bug.cgi?id=171887
+
+        Reviewed by Filip Pizlo.
+
+        Set an iOS specific max of 2 threads.
+
+        * runtime/Options.h:
+
 2017-05-09  Filip Pizlo  <fpizlo@apple.com>
 
         Heap::heap() should behave gracefully for null pointers
index 3d397e0..cf9dc2b 100644 (file)
@@ -100,6 +100,12 @@ private:
 typedef OptionRange optionRange;
 typedef const char* optionString;
 
+#if PLATFORM(IOS)
+#define MAXIMUM_NUMBER_OF_FTL_COMPILER_THREADS 2
+#else
+#define MAXIMUM_NUMBER_OF_FTL_COMPILER_THREADS 8
+#endif
+
 #define JSC_OPTIONS(v) \
     v(bool, validateOptions, false, Normal, "crashes if mis-typed JSC options were passed to the VM") \
     v(unsigned, dumpOptions, 0, Normal, "dumps JSC options (0 = None, 1 = Overridden only, 2 = All, 3 = Verbose)") \
@@ -250,7 +256,7 @@ typedef const char* optionString;
     \
     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, numberOfFTLCompilerThreads, computeNumberOfWorkerThreads(8, 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) \
     v(int32, priorityDeltaOfWasmCompilerThreads, computePriorityDeltaOfWorkerThreads(-1, 0), Normal, nullptr) \