WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
166626
DeferGC::~DeferGC should be super cheap
https://bugs.webkit.org/show_bug.cgi?id=166626
Summary
DeferGC::~DeferGC should be super cheap
Filip Pizlo
Reported
2016-12-30 17:11:06 PST
Right now, it requires running the collector's full collectIfNecessaryOrDefer() hook, which is super big. The right thing for it to do is to check a boolean to see if collectIfNecessaryOrDefer() had ever deferred.
Attachments
the patch
(11.66 KB, patch)
2016-12-30 17:18 PST
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
the patch
(12.41 KB, patch)
2017-01-02 13:29 PST
,
Filip Pizlo
ggaren
: review-
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews112 for mac-elcapitan
(564.90 KB, application/zip)
2017-01-02 14:33 PST
,
Build Bot
no flags
Details
the patch
(13.54 KB, patch)
2017-01-05 16:18 PST
,
Filip Pizlo
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews116 for mac-elcapitan
(757.77 KB, application/zip)
2017-01-05 17:24 PST
,
Build Bot
no flags
Details
the patch
(14.51 KB, patch)
2017-01-05 19:15 PST
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
the patch
(14.82 KB, patch)
2017-01-05 19:57 PST
,
Filip Pizlo
saam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Filip Pizlo
Comment 1
2016-12-30 17:18:57 PST
Created
attachment 297864
[details]
the patch
Filip Pizlo
Comment 2
2017-01-02 13:29:23 PST
Created
attachment 297908
[details]
the patch
Build Bot
Comment 3
2017-01-02 14:32:58 PST
Comment on
attachment 297908
[details]
the patch
Attachment 297908
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/2819823
Number of test failures exceeded the failure limit.
Build Bot
Comment 4
2017-01-02 14:33:01 PST
Created
attachment 297912
[details]
Archive of layout-test-results from ews112 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Geoffrey Garen
Comment 5
2017-01-03 11:01:22 PST
ASSERTION FAILED: m_didDeferGCWork == !!m_deferralDepth /Volumes/Data/EWS/WebKit/Source/JavaScriptCore/heap/HeapInlines.h(332) : void JSC::Heap::decrementDeferralDepthAndGCIfNeeded() 1 0x101de0d70 WTFCrash 2 0x1009e031d JSC::Heap::decrementDeferralDepthAndGCIfNeeded() 3 0x1009e0278 JSC::DeferGC::~DeferGC() 4 0x1009e0205 JSC::DeferGC::~DeferGC() 5 0x1009e01b1 JSC::GCSafeConcurrentJSLocker::~GCSafeConcurrentJSLocker()
Filip Pizlo
Comment 6
2017-01-05 16:18:27 PST
Created
attachment 298150
[details]
the patch
Filip Pizlo
Comment 7
2017-01-05 16:35:52 PST
Comment on
attachment 298150
[details]
the patch Still crashes on my machine.
Build Bot
Comment 8
2017-01-05 17:24:42 PST
Comment on
attachment 298150
[details]
the patch
Attachment 298150
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/2840818
Number of test failures exceeded the failure limit.
Build Bot
Comment 9
2017-01-05 17:24:45 PST
Created
attachment 298157
[details]
Archive of layout-test-results from ews116 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Filip Pizlo
Comment 10
2017-01-05 17:36:07 PST
It turns out that this assertion was just wrong! I've replaced it with a comment explaining how all of the unexpected cases arise and why they are benign.
Filip Pizlo
Comment 11
2017-01-05 19:15:04 PST
Created
attachment 298165
[details]
the patch
Filip Pizlo
Comment 12
2017-01-05 19:57:56 PST
Created
attachment 298167
[details]
the patch
Saam Barati
Comment 13
2017-01-06 11:54:11 PST
Comment on
attachment 298167
[details]
the patch View in context:
https://bugs.webkit.org/attachment.cgi?id=298167&action=review
r=me
> Source/JavaScriptCore/heap/Heap.cpp:2092 > +void Heap::decrementDeferralDepthAndGCIfNeededSlow()
Name nit: This doesn't actually decrement the deferral depth, that's done by the caller. Maybe change the name accordingly?
> Source/JavaScriptCore/heap/HeapInlines.h:345 > + // Only m_didDeferGCWork is true: Impossible. We stopped for GC and the GC did DeferGC.
If this is impossible why can't we assert this?
Filip Pizlo
Comment 14
2017-01-06 11:58:02 PST
(In reply to
comment #13
)
> Comment on
attachment 298167
[details]
> the patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=298167&action=review
> > r=me > > > Source/JavaScriptCore/heap/Heap.cpp:2092 > > +void Heap::decrementDeferralDepthAndGCIfNeededSlow() > > Name nit: This doesn't actually decrement the deferral depth, that's done by > the caller. Maybe change the name accordingly?
It's the slow path of decrementDeferralDepthAndGCIfNeeded(), so I think the name is right.
> > > Source/JavaScriptCore/heap/HeapInlines.h:345 > > + // Only m_didDeferGCWork is true: Impossible. We stopped for GC and the GC did DeferGC. > > If this is impossible why can't we assert this?
The word-sentence "Impossible." should not be there. I removed it.
Filip Pizlo
Comment 15
2017-01-06 12:24:42 PST
Landed in
https://trac.webkit.org/changeset/210451
Radar WebKit Bug Importer
Comment 16
2017-01-06 15:26:31 PST
<
rdar://problem/29909812
>
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