Investigating making permanent GC things always black
Categories
(Core :: JavaScript: GC, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox95 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(4 files)
It would be great if we could arrange for permanent GC things (that may be shared between runtimes) to always be black and never have their mark bits cleared. That way, we could remove the checks for permanent GC things that often occur next to a check for whether the thing is marked, since we have to do the mark check anyway.
We already did this for permanent atoms in bug 1669669. We'd need to do the same for well-known symbols. I'm not sure whether other permanent things in the atoms zone (e.g. JIT stubs) can be shared.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
In the same way as we freeze permanent atoms on startup we can freeze
well-known sybols too. This has the following advantages
- we don't have to mark them
- we don't have to sweep them
- we can now assume that permanent and potentially shared things are always marked
Depends on D129287
Assignee | ||
Comment 2•3 years ago
|
||
Anything owned by another runtime will always be marked black so we can fold
this check into the existing check for whether a thing is marked.
Depends on D129288
Assignee | ||
Comment 3•3 years ago
|
||
Some places check a thing's zone's GC state before checking its mark bits. To
make this safe the GC state needs to be atomic. The outcome of these checks is
independent of the zone GC state observed.
Depends on D129289
Assignee | ||
Comment 4•3 years ago
|
||
These checks are replaced by assertions that the thing is black if it's owned
by another runtime, and hence we will return the right result.
Depends on D129290
Comment 8•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4df5a0d025f9
https://hg.mozilla.org/mozilla-central/rev/85f439d1507d
https://hg.mozilla.org/mozilla-central/rev/5ccc1dafb61e
https://hg.mozilla.org/mozilla-central/rev/cd76a8234de6
Assignee | ||
Updated•3 years ago
|
Description
•