WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
199786
Concurrent GC should not rely on current phase to determine if it's safe to steal conn
https://bugs.webkit.org/show_bug.cgi?id=199786
Summary
Concurrent GC should not rely on current phase to determine if it's safe to s...
Tadeu Zagallo
Reported
2019-07-14 14:25:11 PDT
<
rdar://problem/52505197
>
Attachments
Patch
(3.93 KB, patch)
2019-07-14 14:29 PDT
,
Tadeu Zagallo
no flags
Details
Formatted Diff
Diff
Patch
(4.18 KB, patch)
2019-07-15 00:24 PDT
,
Tadeu Zagallo
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Tadeu Zagallo
Comment 1
2019-07-14 14:29:15 PDT
Created
attachment 374094
[details]
Patch
Saam Barati
Comment 2
2019-07-14 23:39:04 PDT
Comment on
attachment 374094
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=374094&action=review
> Source/JavaScriptCore/heap/Heap.cpp:2124 > + if ((m_lastServedTicket == m_lastGrantedTicket) && !m_collectorThreadIsRunning) {
don’t you still need to check m_currentPhase? Can’t that also be driven by the mutator and we me in the middle of a collection?
Saam Barati
Comment 3
2019-07-14 23:42:03 PDT
Comment on
attachment 374094
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=374094&action=review
setting back to r? based on my questions
> Source/JavaScriptCore/heap/Heap.cpp:261 > + m_heap.m_collectorThreadIsRunning = false;
Is this the correct place to set this to false? Why are we guaranteed to run poll() again?
Tadeu Zagallo
Comment 4
2019-07-15 00:18:08 PDT
Comment on
attachment 374094
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=374094&action=review
>> Source/JavaScriptCore/heap/Heap.cpp:261 >> + m_heap.m_collectorThreadIsRunning = false; > > Is this the correct place to set this to false? Why are we guaranteed to run poll() again?
Yes, unless the thread stops. I missed that. I'll update the patch to implement threadIsStopping and set it to false there.
>> Source/JavaScriptCore/heap/Heap.cpp:2124 >> + if ((m_lastServedTicket == m_lastGrantedTicket) && !m_collectorThreadIsRunning) { > > don’t you still need to check m_currentPhase? Can’t that also be driven by the mutator and we me in the middle of a collection?
This is called from the mutator thread, right? I think it's correct, but hypothetically, even if the mutator was collecting, all this would do is set the conn bit, which should already be set when the mutator is collecting.
Tadeu Zagallo
Comment 5
2019-07-15 00:24:25 PDT
Created
attachment 374106
[details]
Patch
WebKit Commit Bot
Comment 6
2019-07-15 01:47:28 PDT
Comment on
attachment 374106
[details]
Patch Clearing flags on attachment: 374106 Committed
r247426
: <
https://trac.webkit.org/changeset/247426
>
WebKit Commit Bot
Comment 7
2019-07-15 01:47:29 PDT
All reviewed patches have been landed. Closing bug.
Yusuke Suzuki
Comment 8
2019-07-15 17:13:24 PDT
Nice!!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug