diff options
Diffstat (limited to 'Source/JavaScriptCore/runtime/Options.cpp')
-rw-r--r-- | Source/JavaScriptCore/runtime/Options.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/JavaScriptCore/runtime/Options.cpp b/Source/JavaScriptCore/runtime/Options.cpp index 68d10b7bd..ddfba6e7c 100644 --- a/Source/JavaScriptCore/runtime/Options.cpp +++ b/Source/JavaScriptCore/runtime/Options.cpp @@ -27,6 +27,7 @@ #include "Options.h" #include <limits> +#include <wtf/NumberOfCores.h> #include <wtf/PageBlock.h> #if OS(DARWIN) && ENABLE(PARALLEL_GC) @@ -129,10 +130,10 @@ void setHeuristic(T& variable, const char* name, U value) void initializeOptions() { - SET(maximumOptimizationCandidateInstructionCount, 1000); + SET(maximumOptimizationCandidateInstructionCount, 1100); - SET(maximumFunctionForCallInlineCandidateInstructionCount, 150); - SET(maximumFunctionForConstructInlineCandidateInstructionCount, 80); + SET(maximumFunctionForCallInlineCandidateInstructionCount, 180); + SET(maximumFunctionForConstructInlineCandidateInstructionCount, 100); SET(maximumInliningDepth, 5); @@ -174,12 +175,8 @@ void initializeOptions() SET(opaqueRootMergeThreshold, 1000); int cpusToUse = 1; -#if OS(DARWIN) && ENABLE(PARALLEL_GC) - int name[2]; - size_t valueSize = sizeof(cpusToUse); - name[0] = CTL_HW; - name[1] = HW_AVAILCPU; - sysctl(name, 2, &cpusToUse, &valueSize, 0, 0); +#if ENABLE(PARALLEL_GC) + cpusToUse = WTF::numberOfProcessorCores(); #endif // We don't scale so well beyond 4. if (cpusToUse > 4) |