diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-06-20 13:01:08 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-06-20 13:01:08 +0200 |
commit | 49233e234e5c787396cadb2cea33b31ae0cd65c1 (patch) | |
tree | 5410cb9a8fd53168bb60d62c54b654d86f03c38d /Source/JavaScriptCore/runtime/Options.cpp | |
parent | b211c645d8ab690f713515dfdc84d80b11c27d2c (diff) | |
download | qtwebkit-49233e234e5c787396cadb2cea33b31ae0cd65c1.tar.gz |
Imported WebKit commit 3a8c29f35d00659d2ce7a0ccdfa8304f14e82327 (http://svn.webkit.org/repository/webkit/trunk@120813)
New snapshot with Windows build fixes
Diffstat (limited to 'Source/JavaScriptCore/runtime/Options.cpp')
-rw-r--r-- | Source/JavaScriptCore/runtime/Options.cpp | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/Source/JavaScriptCore/runtime/Options.cpp b/Source/JavaScriptCore/runtime/Options.cpp index 8f5a05067..ec228f82a 100644 --- a/Source/JavaScriptCore/runtime/Options.cpp +++ b/Source/JavaScriptCore/runtime/Options.cpp @@ -47,6 +47,8 @@ namespace JSC { namespace Options { bool useJIT; +bool showDisassembly; + unsigned maximumOptimizationCandidateInstructionCount; unsigned maximumFunctionForCallInlineCandidateInstructionCount; @@ -89,9 +91,6 @@ double doubleVoteRatioForDoubleFormat; unsigned minimumNumberOfScansBetweenRebalance; unsigned gcMarkStackSegmentSize; -unsigned minimumNumberOfCellsToKeep; -unsigned maximumNumberOfSharedSegments; -unsigned sharedStackWakeupThreshold; unsigned numberOfGCMarkers; unsigned opaqueRootMergeThreshold; @@ -145,10 +144,28 @@ void setHeuristic(T& variable, const char* name, U value) #define SET(variable, value) variable = value #endif +static unsigned computeNumberOfGCMarkers(int maxNumberOfGCMarkers) +{ + int cpusToUse = 1; + +#if ENABLE(PARALLEL_GC) + cpusToUse = std::min(WTF::numberOfProcessorCores(), maxNumberOfGCMarkers); + + // Be paranoid, it is the OS we're dealing with, after all. + ASSERT(cpusToUse >= 1); + if (cpusToUse < 1) + cpusToUse = 1; +#endif + + return cpusToUse; +} + void initializeOptions() { SET(useJIT, true); + SET(showDisassembly, false); + SET(maximumOptimizationCandidateInstructionCount, 10000); SET(maximumFunctionForCallInlineCandidateInstructionCount, 180); @@ -188,25 +205,10 @@ void initializeOptions() SET(doubleVoteRatioForDoubleFormat, 2); - SET(minimumNumberOfScansBetweenRebalance, 10000); + SET(minimumNumberOfScansBetweenRebalance, 100); SET(gcMarkStackSegmentSize, pageSize()); - SET(minimumNumberOfCellsToKeep, 10); - SET(maximumNumberOfSharedSegments, 3); - SET(sharedStackWakeupThreshold, 1); SET(opaqueRootMergeThreshold, 1000); - - int cpusToUse = 1; -#if ENABLE(PARALLEL_GC) - cpusToUse = WTF::numberOfProcessorCores(); -#endif - // We don't scale so well beyond 4. - if (cpusToUse > 4) - cpusToUse = 4; - // Be paranoid, it is the OS we're dealing with, after all. - if (cpusToUse < 1) - cpusToUse = 1; - - SET(numberOfGCMarkers, cpusToUse); + SET(numberOfGCMarkers, computeNumberOfGCMarkers(7)); // We don't scale so well beyond 7. ASSERT(thresholdForOptimizeAfterLongWarmUp >= thresholdForOptimizeAfterWarmUp); ASSERT(thresholdForOptimizeAfterWarmUp >= thresholdForOptimizeSoon); |