From 49233e234e5c787396cadb2cea33b31ae0cd65c1 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 20 Jun 2012 13:01:08 +0200 Subject: Imported WebKit commit 3a8c29f35d00659d2ce7a0ccdfa8304f14e82327 (http://svn.webkit.org/repository/webkit/trunk@120813) New snapshot with Windows build fixes --- Source/JavaScriptCore/runtime/Options.cpp | 42 ++++++++++++++++--------------- 1 file changed, 22 insertions(+), 20 deletions(-) (limited to 'Source/JavaScriptCore/runtime/Options.cpp') 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); -- cgit v1.2.1