Changeset 121511 in webkit for trunk/Source/JavaScriptCore/jit/JITStubs.cpp
- Timestamp:
- Jun 28, 2012, 7:40:14 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JITStubs.cpp
r121215 r121511 1929 1929 1930 1930 #if ENABLE(JIT_VERBOSE_OSR) 1931 dataLog("%p: Entered optimize with bytecodeIndex = %u, executeCounter = %s, reoptimizationRetryCounter = %u, optimizationDelayCounter = %u\n", codeBlock, bytecodeIndex, codeBlock->jitExecuteCounter().status(), codeBlock->reoptimizationRetryCounter(), codeBlock->optimizationDelayCounter()); 1931 dataLog("%p: Entered optimize with bytecodeIndex = %u, executeCounter = %s, reoptimizationRetryCounter = %u, optimizationDelayCounter = %u, exitCounter = ", codeBlock, bytecodeIndex, codeBlock->jitExecuteCounter().status(), codeBlock->reoptimizationRetryCounter(), codeBlock->optimizationDelayCounter()); 1932 if (codeBlock->hasOptimizedReplacement()) 1933 dataLog("%u", codeBlock->replacement()->osrExitCounter()); 1934 else 1935 dataLog("N/A"); 1936 dataLog("\n"); 1932 1937 #endif 1933 1938 … … 1939 1944 if (codeBlock->hasOptimizedReplacement()) { 1940 1945 #if ENABLE(JIT_VERBOSE_OSR) 1941 dataLog("Considering OSR into %p(%p) with success/fail %u/%u.\n", codeBlock, codeBlock->replacement(), codeBlock->replacement()->speculativeSuccessCounter(), codeBlock->replacement()->speculativeFailCounter());1946 dataLog("Considering OSR into %p(%p).\n", codeBlock, codeBlock->replacement()); 1942 1947 #endif 1948 // If we have an optimized replacement, then it must be the case that we entered 1949 // cti_optimize from a loop. That's because is there's an optimized replacement, 1950 // then all calls to this function will be relinked to the replacement and so 1951 // the prologue OSR will never fire. 1952 1953 // This is an interesting threshold check. Consider that a function OSR exits 1954 // in the middle of a loop, while having a relatively low exit count. The exit 1955 // will reset the execution counter to some target threshold, meaning that this 1956 // code won't be reached until that loop heats up for >=1000 executions. But then 1957 // we do a second check here, to see if we should either reoptimize, or just 1958 // attempt OSR entry. Hence it might even be correct for 1959 // shouldReoptimizeFromLoopNow() to always return true. But we make it do some 1960 // additional checking anyway, to reduce the amount of recompilation thrashing. 1943 1961 if (codeBlock->replacement()->shouldReoptimizeFromLoopNow()) { 1944 1962 #if ENABLE(JIT_VERBOSE_OSR) … … 1986 2004 1987 2005 codeBlock->optimizeSoon(); 1988 optimizedCodeBlock->countSpeculationSuccess();1989 2006 STUB_SET_RETURN_ADDRESS(address); 1990 2007 return; … … 1997 2014 // Count the OSR failure as a speculation failure. If this happens a lot, then 1998 2015 // reoptimize. 1999 optimizedCodeBlock->count SpeculationFailure();2016 optimizedCodeBlock->countOSRExit(); 2000 2017 2001 2018 #if ENABLE(JIT_VERBOSE_OSR) 2002 dataLog("Encountered OSR failure into %p(%p) with success/fail %u/%u.\n", codeBlock, codeBlock->replacement(), codeBlock->replacement()->speculativeSuccessCounter(), codeBlock->replacement()->speculativeFailCounter());2019 dataLog("Encountered OSR failure into %p(%p).\n", codeBlock, codeBlock->replacement()); 2003 2020 #endif 2004 2021
Note:
See TracChangeset
for help on using the changeset viewer.