Bug 228003 - JITWorklist::waitUntilAllPlansForVMAreReady() should also be notified when plans are cancelled.
Summary: JITWorklist::waitUntilAllPlansForVMAreReady() should also be notified when pl...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-07-15 13:16 PDT by Mark Lam
Modified: 2021-07-15 13:43 PDT (History)
7 users (show)

See Also:


Attachments
proposed patch. (4.63 KB, patch)
2021-07-15 13:24 PDT, Mark Lam
ysuzuki: 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 2021-07-15 13:16:47 PDT
Previously, it only gets notified when plans are done compiling.  As a result, if JITWorklist::waitUntilAllPlansForVMAreReady() found non-ready plans and started waiting, and those plans were canceled, then JITWorklist::waitUntilAllPlansForVMAreReady() can hang indefinitely.

rdar://78314543
Comment 1 Mark Lam 2021-07-15 13:24:15 PDT
Created attachment 433619 [details]
proposed patch.
Comment 2 Yusuke Suzuki 2021-07-15 13:32:05 PDT
Comment on attachment 433619 [details]
proposed patch.

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

r=me

> Source/JavaScriptCore/jit/JITWorklist.cpp:336
> +    bool didCancelPlans = deadPlanKeys.size();

Using !isEmpty() would be better.
Comment 3 Mark Lam 2021-07-15 13:33:30 PDT
Thanks for the review.

(In reply to Yusuke Suzuki from comment #2)
> > Source/JavaScriptCore/jit/JITWorklist.cpp:336
> > +    bool didCancelPlans = deadPlanKeys.size();
> 
> Using !isEmpty() would be better.

Agreed. Will fix.
Comment 4 Mark Lam 2021-07-15 13:43:34 PDT
Landed in r279961: <http://trac.webkit.org/r279961>.