Ignore:
Timestamp:
Dec 19, 2011, 5:11:36 PM (13 years ago)
Author:
[email protected]
Message:

It should be possible to change the value of an Options variable without recompiling the world
https://bugs.webkit.org/show_bug.cgi?id=74807

Reviewed by Gavin Barraclough.

  • runtime/Options.cpp:

(JSC::Options::initializeOptions):

  • runtime/Options.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/Options.h

    r102978 r103286  
    3131namespace JSC { namespace Options {
    3232
    33 // maximumInliningDepth is the maximum depth of inline stack, so 1 = no
    34 // inlining, 2 = one level, etc
     33extern unsigned maximumOptimizationCandidateInstructionCount;
    3534
    36 // couldTakeSlowCaseThreshold shouldn't be zero because some ops will spuriously
    37 // take slow case, for example for linking or caching.
     35extern unsigned maximumFunctionForCallInlineCandidateInstructionCount;
     36extern unsigned maximumFunctionForConstructInlineCandidateInstructionCount;
    3837
    39 #define FOR_EACH_HEURISTIC(m) \
    40     m(unsigned, maximumOptimizationCandidateInstructionCount, 1000) \
    41     \
    42     m(unsigned, maximumFunctionForCallInlineCandidateInstructionCount, 150) \
    43     m(unsigned, maximumFunctionForConstructInlineCandidateInstructionCount, 80) \
    44     \
    45     m(unsigned, maximumInliningDepth, 5)                              \
    46     \
    47     m(int32_t, executionCounterValueForOptimizeAfterWarmUp,      -1000) \
    48     m(int32_t, executionCounterValueForOptimizeAfterLongWarmUp,  -5000) \
    49     m(int32_t, executionCounterValueForDontOptimizeAnytimeSoon,  std::numeric_limits<int32_t>::min()) \
    50     m(int32_t, executionCounterValueForOptimizeSoon,             -1000) \
    51     m(int32_t, executionCounterValueForOptimizeNextInvocation,   0) \
    52     \
    53     m(int32_t, executionCounterIncrementForLoop,       1) \
    54     m(int32_t, executionCounterIncrementForReturn,     15) \
    55     \
    56     m(unsigned, desiredSpeculativeSuccessFailRatio,    6) \
    57     \
    58     m(double,   likelyToTakeSlowCaseThreshold,         0.15) \
    59     m(double,   couldTakeSlowCaseThreshold,            0.05) \
    60     m(unsigned, likelyToTakeSlowCaseMinimumCount,      100) \
    61     m(unsigned, couldTakeSlowCaseMinimumCount,         10) \
    62     \
    63     m(double,   osrExitProminenceForFrequentExitSite,  0.3) \
    64     \
    65     m(unsigned, largeFailCountThresholdBase,           20) \
    66     m(unsigned, largeFailCountThresholdBaseForLoop,    1) \
    67     \
    68     m(unsigned, reoptimizationRetryCounterMax,         0) \
    69     m(unsigned, reoptimizationRetryCounterStep,        1) \
    70     \
    71     m(unsigned, minimumOptimizationDelay,              1) \
    72     m(unsigned, maximumOptimizationDelay,              5) \
    73     m(double, desiredProfileLivenessRate,              0.75) \
    74     m(double, desiredProfileFullnessRate,              0.35) \
    75     \
    76     m(double,   doubleVoteRatioForDoubleFormat,        2) \
    77     \
    78     m(unsigned, minimumNumberOfScansBetweenRebalance,  10000) \
    79     m(unsigned, gcMarkStackSegmentSize,                0) \
    80     m(unsigned, minimumNumberOfCellsToKeep,            10) \
    81     m(unsigned, maximumNumberOfSharedSegments,         3) \
    82     m(unsigned, sharedStackWakeupThreshold,            1) \
    83     m(unsigned, numberOfGCMarkers,                     0) \
    84     m(unsigned, opaqueRootMergeThreshold,              1000)
     38extern unsigned maximumInliningDepth; // Depth of inline stack, so 1 = no inlining, 2 = one level, etc.
    8539
    86 #define FOR_EACH_OPTION(m) \
    87     FOR_EACH_HEURISTIC(m)
     40extern int32_t executionCounterValueForOptimizeAfterWarmUp;
     41extern int32_t executionCounterValueForOptimizeAfterLongWarmUp;
     42extern int32_t executionCounterValueForDontOptimizeAnytimeSoon;
     43extern int32_t executionCounterValueForOptimizeSoon;
     44extern int32_t executionCounterValueForOptimizeNextInvocation;
    8845
    89 #define DECLARE(type, cname, default_val) extern type cname;
    90 FOR_EACH_OPTION(DECLARE)
    91 #undef DECLARE
     46extern int32_t executionCounterIncrementForLoop;
     47extern int32_t executionCounterIncrementForReturn;
     48
     49extern unsigned desiredSpeculativeSuccessFailRatio;
     50
     51extern double likelyToTakeSlowCaseThreshold;
     52extern double couldTakeSlowCaseThreshold;
     53extern unsigned likelyToTakeSlowCaseMinimumCount;
     54extern unsigned couldTakeSlowCaseMinimumCount;
     55
     56extern double osrExitProminenceForFrequentExitSite;
     57
     58extern unsigned largeFailCountThresholdBase;
     59extern unsigned largeFailCountThresholdBaseForLoop;
     60
     61extern unsigned reoptimizationRetryCounterMax;
     62extern unsigned reoptimizationRetryCounterStep;
     63
     64extern unsigned minimumOptimizationDelay;
     65extern unsigned maximumOptimizationDelay;
     66extern double desiredProfileLivenessRate;
     67extern double desiredProfileFullnessRate;
     68
     69extern double doubleVoteRatioForDoubleFormat;
     70
     71extern unsigned minimumNumberOfScansBetweenRebalance;
     72extern unsigned gcMarkStackSegmentSize;
     73extern unsigned minimumNumberOfCellsToKeep;
     74extern unsigned maximumNumberOfSharedSegments;
     75extern unsigned sharedStackWakeupThreshold;
     76extern unsigned numberOfGCMarkers;
     77extern unsigned opaqueRootMergeThreshold;
    9278
    9379void initializeOptions();
Note: See TracChangeset for help on using the changeset viewer.