Modified: trunk/Source/_javascript_Core/ChangeLog (216550 => 216551)
--- trunk/Source/_javascript_Core/ChangeLog 2017-05-09 22:35:58 UTC (rev 216550)
+++ trunk/Source/_javascript_Core/ChangeLog 2017-05-09 22:38:41 UTC (rev 216551)
@@ -1,3 +1,14 @@
+2017-05-09 Michael Saboff <msab...@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 <fpi...@apple.com>
Heap::heap() should behave gracefully for null pointers
Modified: trunk/Source/_javascript_Core/runtime/Options.h (216550 => 216551)
--- trunk/Source/_javascript_Core/runtime/Options.h 2017-05-09 22:35:58 UTC (rev 216550)
+++ trunk/Source/_javascript_Core/runtime/Options.h 2017-05-09 22:38:41 UTC (rev 216551)
@@ -100,6 +100,12 @@
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 @@
\
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) \