WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
57903
Introduced the concept of opaque roots, in preparation for marking the DOM with them
https://bugs.webkit.org/show_bug.cgi?id=57903
Summary
Introduced the concept of opaque roots, in preparation for marking the DOM wi...
Geoffrey Garen
Reported
2011-04-05 16:22:58 PDT
Introduced the concept of opaque roots, in preparation for marking the DOM with them
Attachments
Patch
(11.16 KB, patch)
2011-04-05 16:27 PDT
,
Geoffrey Garen
oliver
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Geoffrey Garen
Comment 1
2011-04-05 16:27:57 PDT
Created
attachment 88333
[details]
Patch
Oliver Hunt
Comment 2
2011-04-05 16:58:54 PDT
Comment on
attachment 88333
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=88333&action=review
> Source/JavaScriptCore/collector/handles/HandleHeap.cpp:110 > + ASSERT(isValidWeakHandle(node->slot())); > + JSCell* cell = node->slot()->asCell(); > + if (Heap::isMarked(cell)) > + continue; > + > + WeakHandleOwner* weakOwner = node->weakOwner(); > + if (!weakOwner) > + continue; > + > + if (!weakOwner->isReachableFromOpaqueRoots(Handle<Unknown>::wrapSlot(node->slot()), node->weakOwnerContext(), markStack)) > + continue; > + > + heapRootMarker.mark(node->slot());
I wish we could do something to separate out handles that will remain alive as we enumerate them, otherwise we end up visiting nodes repeatedly (even if just for an isMarked check)
Geoffrey Garen
Comment 3
2011-04-05 18:25:55 PDT
> I wish we could do something to separate out handles that will remain alive as we enumerate them, otherwise we end up visiting nodes repeatedly (even if just for an isMarked check)
This loop almost always executes exactly once, so the tradeoff probably doesn't favor this approach, but: I think we could optimize by doing an initial pass to separate off the unmarked handles into a temporary linked list. Thereafter, we could iterate only that linked list.
Build Bot
Comment 4
2011-04-05 18:58:23 PDT
Attachment 88333
[details]
did not build on win: Build output:
http://queues.webkit.org/results/8346011
Build Bot
Comment 5
2011-04-05 19:14:13 PDT
Attachment 88333
[details]
did not build on win: Build output:
http://queues.webkit.org/results/8343016
Geoffrey Garen
Comment 6
2011-04-05 20:44:54 PDT
Committed
r83011
: <
http://trac.webkit.org/changeset/83011
>
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