From cd44dc59cdfc39534aef4d417e9f3c412e3be139 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 3 Feb 2012 09:55:33 +0100 Subject: Imported WebKit commit fce473cb4d55aa9fe9d0b0322a2fffecb731b961 (http://svn.webkit.org/repository/webkit/trunk@106560) --- Source/JavaScriptCore/runtime/Options.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'Source/JavaScriptCore/runtime/Options.cpp') 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 +#include #include #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) -- cgit v1.2.1