Improve weak edge tracing APIs in preparation for replacing uses of IsAboutToBeFinalized
Categories
(Core :: JavaScript: GC, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox95 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(6 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
To allow most uses of IsAboutToBeFinalized to be replaced with tracing we need to improve the infrastructure a little.
One issue is that when tracing a weak edge you may need to initial referent of the edge after it has been traced and potentially cleared (e.g. to perform some cleanup on it). But you may also need the updated edge if it has been updated. This is currently possible but makes the code more complex than it needs to be.
Another thing we'll need is a sweeping tracer for nursery collections.
Assignee | ||
Comment 1•3 years ago
|
||
Finally it would be good to remove as many sweeping functions as possible from the public API since some of these are unused or only used internally.
Assignee | ||
Comment 2•3 years ago
|
||
With the following patches, this lets us remove public GCPolicy APIs for
sweeping raw pointers.
Assignee | ||
Comment 3•3 years ago
|
||
This is also required to remove some public GCPolicy methods for bare pointer
types.
Depends on D128257
Assignee | ||
Comment 4•3 years ago
|
||
This was a minor optimisation to remove unnecessary barriers but it probably
makes negligable difference.
Depends on D128258
Assignee | ||
Comment 5•3 years ago
|
||
This should make it hader for users of the public API to put unbarriered
pointers in hash tables.
Depends on D128259
Assignee | ||
Comment 6•3 years ago
|
||
This is intended to be a simple as possible so that compilers can optimise away
the bits that aren't used after inlining. The result value includes the edge
state before and after update and there are runtime checks that you only use
the right one, depending on whether the edge was removed or not.
The signature of TraceWeakEdge changes to allow any barriered type because in
practice we have weak edges that are no WeakHeapPtr in cases where we don't
want the read barrier (e.g. WeakMap keys).
Depends on D128260
Assignee | ||
Comment 7•3 years ago
|
||
Analagous to the sweeping tracer, this checks whether nursery things have been
moved and updates the edge as necessary.
Depends on D128261
Comment 9•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/428faca846f2
https://hg.mozilla.org/mozilla-central/rev/08feb5a97da0
https://hg.mozilla.org/mozilla-central/rev/d38fc222540e
https://hg.mozilla.org/mozilla-central/rev/7288d6f9db62
https://hg.mozilla.org/mozilla-central/rev/088062e599d5
https://hg.mozilla.org/mozilla-central/rev/ea691ffad825
Description
•