• mark.lam@apple.com's avatar
    Add watchdog timer polling for the DFG. · 10d23a1b
    mark.lam@apple.com authored
    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
    * API/tests/testapi.c:
    - 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:
    * dfg/DFGByteCodeParser.cpp:
    * dfg/DFGFixupPhase.cpp:
    * dfg/DFGNodeType.h:
    * dfg/DFGPredictionPropagationPhase.cpp:
    * dfg/DFGSpeculativeJIT32_64.cpp:
    * dfg/DFGSpeculativeJIT64.cpp:
    * runtime/Watchdog.cpp:
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149089 268f45cc-cd09-0410-ab3c-d52691b4dbfc