Bug 126313 - Stop using ThreadCondition in BlockAllocator
Summary: Stop using ThreadCondition in BlockAllocator
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-30 16:40 PST by Anders Carlsson
Modified: 2014-01-20 11:27 PST (History)
0 users

See Also:


Attachments
Patch (5.37 KB, patch)
2013-12-30 16:41 PST, Anders Carlsson
no flags Details | Formatted Diff | Diff
Patch (5.37 KB, patch)
2013-12-30 17:14 PST, Anders Carlsson
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2013-12-30 16:40:13 PST
Stop using ThreadCondition in BlockAllocator
Comment 1 Anders Carlsson 2013-12-30 16:41:36 PST
Created attachment 220136 [details]
Patch
Comment 2 Anders Carlsson 2013-12-30 17:14:57 PST
Created attachment 220138 [details]
Patch
Comment 3 Anders Carlsson 2013-12-30 17:18:38 PST
Committed r161161: <http://trac.webkit.org/changeset/161161>
Comment 4 Alexey Proskuryakov 2013-12-30 22:53:40 PST
Rolled out with the rest of today's threading fixes, which broke WebKit2 on Mountain Lion.

I don't know if this particular change caused any trouble - there was so much churn today that I could't tell which patch caused which badness. Perhaps we should simply re-land if we can get EWS green.

I think that r161163 was a follow-up fix to this.
Comment 5 Filip Pizlo 2014-01-01 09:52:07 PST
Comment on attachment 220138 [details]
Patch

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

> Source/JavaScriptCore/heap/BlockAllocator.cpp:106
> +    std::unique_lock<std::mutex> lock(m_emptyRegionConditionMutex);

Why is this a unique_lock instead of lock_guard?
Comment 6 Anders Carlsson 2014-01-06 11:12:55 PST
(In reply to comment #5)
> (From update of attachment 220138 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=220138&action=review
> 
> > Source/JavaScriptCore/heap/BlockAllocator.cpp:106
> > +    std::unique_lock<std::mutex> lock(m_emptyRegionConditionMutex);
> 
> Why is this a unique_lock instead of lock_guard?

Unique locks are used together with std::condition_variable.
Comment 7 Anders Carlsson 2014-01-20 11:27:19 PST
Committed r162362: <http://trac.webkit.org/changeset/162362>