Changeset 121215 in webkit for trunk/Source/JavaScriptCore/bytecode/ExecutionCounter.cpp
- Timestamp:
- Jun 25, 2012, 7:14:07 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/ExecutionCounter.cpp
r110453 r121215 29 29 #include "CodeBlock.h" 30 30 #include "ExecutableAllocator.h" 31 #include <wtf/StringExtras.h> 31 32 32 33 namespace JSC { … … 126 127 127 128 // Compute the true total count. 128 double trueTotalCount = static_cast<double>(m_totalCount) + m_counter;129 double trueTotalCount = count(); 129 130 130 131 // Correct the threshold for current memory usage. … … 144 145 } 145 146 146 if (threshold > std::numeric_limits<int32_t>::max()) 147 threshold = std::numeric_limits<int32_t>::max(); 148 147 int32_t maxThreshold = 148 codeBlock->globalObject()->weakRandomInteger() % Options::maximumExecutionCountsBetweenCheckpoints; 149 if (threshold > maxThreshold) 150 threshold = maxThreshold; 151 149 152 m_counter = static_cast<int32_t>(-threshold); 150 153 … … 161 164 } 162 165 166 const char* ExecutionCounter::status() const 167 { 168 static char result[80]; 169 snprintf(result, sizeof(result), "%lf/%lf, %d", count(), static_cast<double>(m_activeThreshold), m_counter); 170 return result; 171 } 172 163 173 } // namespace JSC 164 174
Note:
See TracChangeset
for help on using the changeset viewer.