Ignore:
Timestamp:
Apr 24, 2013, 7:59:51 PM (12 years ago)
Author:
[email protected]
Message:

Add watchdog timer polling for the DFG.
https://bugs.webkit.org/show_bug.cgi?id=115134.

Reviewed by Geoffrey Garen.

The strategy is to add a speculation check to the DFG generated code to
test if the watchdog timer has fired or not. If the watchdog timer has
fired, the generated code will do an OSR exit to the baseline JIT, and
let it handle servicing the watchdog timer.

If the watchdog is not enabled, this speculation check will not be
emitted.

  • API/tests/testapi.c:

(currentCPUTime_callAsFunction):
(extendTerminateCallback):
(main):

  • removed try/catch statements so that we can test the watchdog on the DFG.
  • added JS bindings to a native currentCPUTime() function so that the timeout tests can be more accurate.
  • also shortened the time values so that the tests can complete sooner.
  • bytecode/ExitKind.h:
  • dfg/DFGAbstractState.cpp:

(JSC::DFG::AbstractState::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNodeType.h:
  • dfg/DFGPredictionPropagationPhase.cpp:

(JSC::DFG::PredictionPropagationPhase::propagate):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • runtime/Watchdog.cpp:

(JSC::Watchdog::setTimeLimit):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/ExitKind.h

    r146089 r149089  
    4747    NotStringObject, // We exited because we shouldn't have attempted to optimize string object access.
    4848    Uncountable, // We exited for none of the above reasons, and we should not count it. Most uses of this should be viewed as a FIXME.
    49     UncountableWatchpoint // We exited because of a watchpoint, which isn't counted because watchpoints do tracking themselves.
     49    UncountableWatchpoint, // We exited because of a watchpoint, which isn't counted because watchpoints do tracking themselves.
     50    WatchdogTimerFired // We exited because we need to service the watchdog timer.
    5051};
    5152
Note: See TracChangeset for help on using the changeset viewer.