Bug 147968 - Add support for CheckWatchdogTimer as slow path in DFG and FTL.
Summary: Add support for CheckWatchdogTimer as slow path in DFG and FTL.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on: 148125
Blocks: 131082
  Show dependency treegraph
 
Reported: 2015-08-12 22:19 PDT by Mark Lam
Modified: 2015-08-19 14:19 PDT (History)
7 users (show)

See Also:


Attachments
the fix. (10.06 KB, patch)
2015-08-18 15:03 PDT, Mark Lam
msaboff: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2015-08-12 22:19:08 PDT
Since we don't currently enable the JSC watchdog by default, Web Worker's terminate() function doesn't actually do anything.  We should fix this.
Comment 1 Mark Lam 2015-08-14 14:03:37 PDT
Per discussion with Geoff, we can fix this by always enabling the watchdog without a time limit for Web Workers.

But before we do that, we should teach the FTL to check the watchdog when present.  Since the FTL watchdog support is mostly motivated by the need in Web Workers, I'll tackle the FTL in this bug as well.
Comment 2 Mark Lam 2015-08-18 01:32:44 PDT
Will just implement the FTL support (and improve the DFG support) in this bug.  Will add the Worker threads watchdog in 131082 instead where we re-work how Watchdog's m_didFire works.
Comment 3 Mark Lam 2015-08-18 15:03:46 PDT
Created attachment 259302 [details]
the fix.
Comment 4 Michael Saboff 2015-08-19 14:03:55 PDT
Comment on attachment 259302 [details]
the fix.

View in context: https://bugs.webkit.org/attachment.cgi?id=259302&action=review

r=me

> Source/JavaScriptCore/jit/JITOperations.cpp:991
> -void JIT_OPERATION operationHandleWatchdogTimer(ExecState* exec)
> +UnusedPtr JIT_OPERATION operationHandleWatchdogTimer(ExecState* exec)

Why does this return UnusedPtr?
Comment 5 Michael Saboff 2015-08-19 14:04:14 PDT
Comment on attachment 259302 [details]
the fix.

r=me
Comment 6 Mark Lam 2015-08-19 14:09:44 PDT
Comment on attachment 259302 [details]
the fix.

View in context: https://bugs.webkit.org/attachment.cgi?id=259302&action=review

>> Source/JavaScriptCore/jit/JITOperations.cpp:991
>> +UnusedPtr JIT_OPERATION operationHandleWatchdogTimer(ExecState* exec)
> 
> Why does this return UnusedPtr?

As explained in the ChangeLog, "This allows me to reuse the existing DFG slow path generator mechanism.  I didn't think that operationHandleWatchdogTimer() was worth introducing a whole new set of machinery just so we can have a slow path that returns void."  I'll add a comment here as well to document this.
Comment 7 Mark Lam 2015-08-19 14:19:19 PDT
Thanks for the review.  Landed in r188649: <http://trac.webkit.org/r188649>.