summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/Options.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-02-03 09:55:33 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2012-02-03 09:55:33 +0100
commitcd44dc59cdfc39534aef4d417e9f3c412e3be139 (patch)
tree8d89889ba95ed6ec9322e733846cc9cce9d7dff1 /Source/JavaScriptCore/runtime/Options.cpp
parentd11f84f5b5cdc0d92a08af01b13472fdd5f9acb9 (diff)
downloadqtwebkit-cd44dc59cdfc39534aef4d417e9f3c412e3be139.tar.gz
Imported WebKit commit fce473cb4d55aa9fe9d0b0322a2fffecb731b961 (http://svn.webkit.org/repository/webkit/trunk@106560)
Diffstat (limited to 'Source/JavaScriptCore/runtime/Options.cpp')
-rw-r--r--Source/JavaScriptCore/runtime/Options.cpp15
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)