Changeset 220081 in webkit for trunk/Source/JavaScriptCore/jit/JITOperations.cpp
- Timestamp:
- Jul 31, 2017, 4:30:38 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r218794 r220081 1299 1299 1300 1300 CodeBlock* codeBlock = exec->codeBlock(); 1301 if ( codeBlock->jitType() != JITCode::BaselineJIT) {1301 if (UNLIKELY(codeBlock->jitType() != JITCode::BaselineJIT)) { 1302 1302 dataLog("Unexpected code block in Baseline->DFG tier-up: ", *codeBlock, "\n"); 1303 1303 RELEASE_ASSERT_NOT_REACHED(); … … 1310 1310 } 1311 1311 1312 if ( Options::verboseOSR()) {1312 if (UNLIKELY(Options::verboseOSR())) { 1313 1313 dataLog( 1314 1314 *codeBlock, ": Entered optimize with bytecodeIndex = ", bytecodeIndex, … … 1326 1326 CODEBLOCK_LOG_EVENT(codeBlock, "delayOptimizeToDFG", ("counter = ", codeBlock->jitExecuteCounter())); 1327 1327 codeBlock->updateAllPredictions(); 1328 if ( Options::verboseOSR())1328 if (UNLIKELY(Options::verboseOSR())) 1329 1329 dataLog("Choosing not to optimize ", *codeBlock, " yet, because the threshold hasn't been reached.\n"); 1330 1330 return encodeResult(0, 0); … … 1332 1332 1333 1333 Debugger* debugger = codeBlock->globalObject()->debugger(); 1334 if ( debugger && (debugger->isStepping() || codeBlock->baselineAlternative()->hasDebuggerRequests())) {1334 if (UNLIKELY(debugger && (debugger->isStepping() || codeBlock->baselineAlternative()->hasDebuggerRequests()))) { 1335 1335 CODEBLOCK_LOG_EVENT(codeBlock, "delayOptimizeToDFG", ("debugger is stepping or has requests")); 1336 1336 updateAllPredictionsAndOptimizeAfterWarmUp(codeBlock); … … 1341 1341 CODEBLOCK_LOG_EVENT(codeBlock, "delayOptimizeToDFG", ("should always be inlined")); 1342 1342 updateAllPredictionsAndOptimizeAfterWarmUp(codeBlock); 1343 if ( Options::verboseOSR())1343 if (UNLIKELY(Options::verboseOSR())) 1344 1344 dataLog("Choosing not to optimize ", *codeBlock, " yet, because m_shouldAlwaysBeInlined == true.\n"); 1345 1345 return encodeResult(0, 0); … … 1397 1397 CODEBLOCK_LOG_EVENT(codeBlock, "delayOptimizeToDFG", ("compiled and failed")); 1398 1398 codeBlock->updateAllPredictions(); 1399 if ( Options::verboseOSR())1399 if (UNLIKELY(Options::verboseOSR())) 1400 1400 dataLog("Code block ", *codeBlock, " was compiled but it doesn't have an optimized replacement.\n"); 1401 1401 return encodeResult(0, 0); 1402 1402 } 1403 1403 } else if (codeBlock->hasOptimizedReplacement()) { 1404 if ( Options::verboseOSR())1404 if (UNLIKELY(Options::verboseOSR())) 1405 1405 dataLog("Considering OSR ", *codeBlock, " -> ", *codeBlock->replacement(), ".\n"); 1406 1406 // If we have an optimized replacement, then it must be the case that we entered … … 1419 1419 if (codeBlock->replacement()->shouldReoptimizeFromLoopNow()) { 1420 1420 CODEBLOCK_LOG_EVENT(codeBlock, "delayOptimizeToDFG", ("should reoptimize from loop now")); 1421 if ( Options::verboseOSR()) {1421 if (UNLIKELY(Options::verboseOSR())) { 1422 1422 dataLog( 1423 1423 "Triggering reoptimization of ", *codeBlock, … … 1430 1430 if (!codeBlock->shouldOptimizeNow()) { 1431 1431 CODEBLOCK_LOG_EVENT(codeBlock, "delayOptimizeToDFG", ("insufficient profiling")); 1432 if ( Options::verboseOSR()) {1432 if (UNLIKELY(Options::verboseOSR())) { 1433 1433 dataLog( 1434 1434 "Delaying optimization for ", *codeBlock, … … 1438 1438 } 1439 1439 1440 if ( Options::verboseOSR())1440 if (UNLIKELY(Options::verboseOSR())) 1441 1441 dataLog("Triggering optimized compilation of ", *codeBlock, "\n"); 1442 1442 … … 1471 1471 if (void* dataBuffer = DFG::prepareOSREntry(exec, optimizedCodeBlock, bytecodeIndex)) { 1472 1472 CODEBLOCK_LOG_EVENT(optimizedCodeBlock, "osrEntry", ("at bc#", bytecodeIndex)); 1473 if ( Options::verboseOSR()) {1473 if (UNLIKELY(Options::verboseOSR())) { 1474 1474 dataLog( 1475 1475 "Performing OSR ", *codeBlock, " -> ", *optimizedCodeBlock, ".\n"); … … 1481 1481 } 1482 1482 1483 if ( Options::verboseOSR()) {1483 if (UNLIKELY(Options::verboseOSR())) { 1484 1484 dataLog( 1485 1485 "Optimizing ", *codeBlock, " -> ", *codeBlock->replacement(), … … 1502 1502 if (optimizedCodeBlock->shouldReoptimizeNow()) { 1503 1503 CODEBLOCK_LOG_EVENT(codeBlock, "delayOptimizeToDFG", ("should reoptimize now")); 1504 if ( Options::verboseOSR()) {1504 if (UNLIKELY(Options::verboseOSR())) { 1505 1505 dataLog( 1506 1506 "Triggering reoptimization of ", *codeBlock, " -> ",
Note:
See TracChangeset
for help on using the changeset viewer.