Changeset 121215 in webkit for trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
- Timestamp:
- Jun 25, 2012, 7:14:07 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r121073 r121215 2105 2105 #endif 2106 2106 2107 #if ENABLE(DFG_JIT) 2108 if (hasCodeOrigins()) { 2109 // Make sure that executables that we have inlined don't die. 2110 // FIXME: If they would have otherwise died, we should probably trigger recompilation. 2111 for (size_t i = 0; i < inlineCallFrames().size(); ++i) { 2112 InlineCallFrame& inlineCallFrame = inlineCallFrames()[i]; 2113 visitor.append(&inlineCallFrame.executable); 2114 visitor.append(&inlineCallFrame.callee); 2115 } 2116 } 2117 2118 m_lazyOperandValueProfiles.computeUpdatedPredictions(Collection); 2119 #endif 2120 2121 #if ENABLE(VALUE_PROFILER) 2122 for (unsigned profileIndex = 0; profileIndex < numberOfArgumentValueProfiles(); ++profileIndex) 2123 valueProfileForArgument(profileIndex)->computeUpdatedPrediction(Collection); 2124 for (unsigned profileIndex = 0; profileIndex < numberOfValueProfiles(); ++profileIndex) 2125 valueProfile(profileIndex)->computeUpdatedPrediction(Collection); 2126 #endif 2107 updateAllPredictions(Collection); 2127 2108 } 2128 2109 … … 2575 2556 2576 2557 #if ENABLE(VALUE_PROFILER) 2577 bool CodeBlock::shouldOptimizeNow() 2578 { 2579 #if ENABLE(JIT_VERBOSE_OSR) 2580 dataLog("Considering optimizing %p...\n", this); 2581 #endif 2582 2583 #if ENABLE(VERBOSE_VALUE_PROFILE) 2584 dumpValueProfiles(); 2585 #endif 2586 2587 if (m_optimizationDelayCounter >= Options::maximumOptimizationDelay) 2588 return true; 2589 2590 unsigned numberOfLiveNonArgumentValueProfiles = 0; 2591 unsigned numberOfSamplesInProfiles = 0; // If this divided by ValueProfile::numberOfBuckets equals numberOfValueProfiles() then value profiles are full. 2558 void CodeBlock::updateAllPredictionsAndCountLiveness( 2559 OperationInProgress operation, unsigned& numberOfLiveNonArgumentValueProfiles, unsigned& numberOfSamplesInProfiles) 2560 { 2561 numberOfLiveNonArgumentValueProfiles = 0; 2562 numberOfSamplesInProfiles = 0; // If this divided by ValueProfile::numberOfBuckets equals numberOfValueProfiles() then value profiles are full. 2592 2563 for (unsigned i = 0; i < totalNumberOfValueProfiles(); ++i) { 2593 2564 ValueProfile* profile = getFromAllValueProfiles(i); … … 2597 2568 numberOfSamplesInProfiles += numSamples; 2598 2569 if (profile->m_bytecodeOffset < 0) { 2599 profile->computeUpdatedPrediction( );2570 profile->computeUpdatedPrediction(operation); 2600 2571 continue; 2601 2572 } 2602 2573 if (profile->numberOfSamples() || profile->m_prediction != SpecNone) 2603 2574 numberOfLiveNonArgumentValueProfiles++; 2604 profile->computeUpdatedPrediction(); 2605 } 2575 profile->computeUpdatedPrediction(operation); 2576 } 2577 2578 #if ENABLE(DFG_JIT) 2579 m_lazyOperandValueProfiles.computeUpdatedPredictions(operation); 2580 #endif 2581 } 2582 2583 void CodeBlock::updateAllPredictions(OperationInProgress operation) 2584 { 2585 unsigned ignoredValue1, ignoredValue2; 2586 updateAllPredictionsAndCountLiveness(operation, ignoredValue1, ignoredValue2); 2587 } 2588 2589 bool CodeBlock::shouldOptimizeNow() 2590 { 2591 #if ENABLE(JIT_VERBOSE_OSR) 2592 dataLog("Considering optimizing %p...\n", this); 2593 #endif 2594 2595 #if ENABLE(VERBOSE_VALUE_PROFILE) 2596 dumpValueProfiles(); 2597 #endif 2598 2599 if (m_optimizationDelayCounter >= Options::maximumOptimizationDelay) 2600 return true; 2601 2602 unsigned numberOfLiveNonArgumentValueProfiles; 2603 unsigned numberOfSamplesInProfiles; 2604 updateAllPredictionsAndCountLiveness(NoOperation, numberOfLiveNonArgumentValueProfiles, numberOfSamplesInProfiles); 2606 2605 2607 2606 #if ENABLE(JIT_VERBOSE_OSR)
Note:
See TracChangeset
for help on using the changeset viewer.