Ignore:
Timestamp:
Apr 8, 2012, 1:46:12 PM (13 years ago)
Author:
[email protected]
Message:

Forced OSR exits should lead to recompilation based on count, not rate
https://bugs.webkit.org/show_bug.cgi?id=83247
<rdar://problem/10720925>

Reviewed by Geoff Garen.

Track which OSR exits happen because of inadequate coverage. Count them
separately. If the count reaches a threshold, immediately trigger
reoptimization.

This is in contrast to the recompilation trigger for all other OSR exits.
Normally recomp is triggered when the exit rate exceeds a certain ratio.

Looks like a slight V8 speedup (sub 1%).

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::forcedOSRExitCounter):
(JSC::CodeBlock::addressOfForcedOSRExitCounter):
(JSC::CodeBlock::offsetOfForcedOSRExitCounter):
(JSC::CodeBlock::shouldReoptimizeNow):
(JSC::CodeBlock::shouldReoptimizeFromLoopNow):
(CodeBlock):

  • bytecode/DFGExitProfile.h:

(JSC::DFG::exitKindToString):

  • dfg/DFGOSRExitCompiler.cpp:

(JSC::DFG::OSRExitCompiler::handleExitCounts):
(DFG):

  • dfg/DFGOSRExitCompiler.h:

(OSRExitCompiler):

  • dfg/DFGOSRExitCompiler32_64.cpp:

(JSC::DFG::OSRExitCompiler::compileExit):

  • dfg/DFGOSRExitCompiler64.cpp:

(JSC::DFG::OSRExitCompiler::compileExit):

  • dfg/DFGOperations.cpp:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • runtime/Options.cpp:

(Options):
(JSC::Options::initializeOptions):

  • runtime/Options.h:

(Options):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r113363 r113552  
    11241124    CodeBlock* codeBlock = debugInfo->codeBlock;
    11251125    CodeBlock* alternative = codeBlock->alternative();
    1126     dataLog("Speculation failure in %p at @%u with executeCounter = %d, reoptimizationRetryCounter = %u, optimizationDelayCounter = %u, success/fail %u/%u\n", codeBlock, debugInfo->nodeIndex, alternative ? alternative->jitExecuteCounter() : 0, alternative ? alternative->reoptimizationRetryCounter() : 0, alternative ? alternative->optimizationDelayCounter() : 0, codeBlock->speculativeSuccessCounter(), codeBlock->speculativeFailCounter());
     1126    dataLog("Speculation failure in %p at @%u with executeCounter = %d, "
     1127            "reoptimizationRetryCounter = %u, optimizationDelayCounter = %u, "
     1128            "success/fail %u/(%u+%u)\n",
     1129            codeBlock,
     1130            debugInfo->nodeIndex,
     1131            alternative ? alternative->jitExecuteCounter() : 0,
     1132            alternative ? alternative->reoptimizationRetryCounter() : 0,
     1133            alternative ? alternative->optimizationDelayCounter() : 0,
     1134            codeBlock->speculativeSuccessCounter(),
     1135            codeBlock->speculativeFailCounter(),
     1136            codeBlock->forcedOSRExitCounter());
    11271137}
    11281138#endif
Note: See TracChangeset for help on using the changeset viewer.