Changeset 121511 in webkit for trunk/Source/JavaScriptCore/bytecode/ExecutionCounter.h
- Timestamp:
- Jun 28, 2012, 7:40:14 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/ExecutionCounter.h
r121215 r121511 27 27 #define ExecutionCounter_h 28 28 29 #include "JSGlobalObject.h" 30 #include "Options.h" 29 31 #include <wtf/SimpleStats.h> 30 32 … … 43 45 static double applyMemoryUsageHeuristics(int32_t value, CodeBlock*); 44 46 static int32_t applyMemoryUsageHeuristicsAndConvertToInt(int32_t value, CodeBlock*); 47 template<typename T> 48 static T clippedThreshold(JSGlobalObject* globalObject, T threshold) 49 { 50 int32_t maxThreshold; 51 if (Options::randomizeExecutionCountsBetweenCheckpoints) 52 maxThreshold = globalObject->weakRandomInteger() % Options::maximumExecutionCountsBetweenCheckpoints; 53 else 54 maxThreshold = Options::maximumExecutionCountsBetweenCheckpoints; 55 if (threshold > maxThreshold) 56 threshold = maxThreshold; 57 return threshold; 58 } 45 59 46 60 static int32_t formattedTotalCount(float value)
Note:
See TracChangeset
for help on using the changeset viewer.