Bug 148090 - WTF::Condition should have a fast path for notifyOne/notifyAll that avoids calling unparkOne/unparkAll
Summary: WTF::Condition should have a fast path for notifyOne/notifyAll that avoids ca...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: Other
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-17 13:28 PDT by Filip Pizlo
Modified: 2015-08-18 15:36 PDT (History)
14 users (show)

See Also:


Attachments
the patch (4.45 KB, patch)
2015-08-18 12:50 PDT, Filip Pizlo
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2015-08-17 13:28:08 PDT
Patch forthcoming.
Comment 1 Filip Pizlo 2015-08-18 12:50:30 PDT
Created attachment 259291 [details]
the patch
Comment 2 WebKit Commit Bot 2015-08-18 12:53:18 PDT
Attachment 259291 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/Condition.h:153:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Geoffrey Garen 2015-08-18 13:39:52 PDT
Comment on attachment 259291 [details]
the patch

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

r=me

> Source/WTF/wtf/Condition.h:72
> +                    // Let everyone know that we will be waiting. Do this why we hold the queue lock,

why => while

> Source/WTF/wtf/Condition.h:167
> +        // guaranteed to then notifyAll() anyway. So, if there is a race with some thread calling

notifyAll => unparkAll.
Comment 4 Filip Pizlo 2015-08-18 14:29:46 PDT
(In reply to comment #3)
> Comment on attachment 259291 [details]
> the patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=259291&action=review
> 
> r=me
> 
> > Source/WTF/wtf/Condition.h:72
> > +                    // Let everyone know that we will be waiting. Do this why we hold the queue lock,
> 
> why => while
> 
> > Source/WTF/wtf/Condition.h:167
> > +        // guaranteed to then notifyAll() anyway. So, if there is a race with some thread calling
> 
> notifyAll => unparkAll.

Fixed, thanks!
Comment 5 Filip Pizlo 2015-08-18 15:36:00 PDT
Landed in http://trac.webkit.org/changeset/188605