Use separate mark stacks for black and gray marking
Categories
(Core :: JavaScript: GC, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox115 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
I know we've flip-flopped on this a few times before but using separate stacks simplifies the code and should make some parallel marking optimisaitons easier. However we need to do this without regressing memory usage.
| Assignee | ||
Comment 1•3 years ago
|
||
This adds a separate auxililary mark stack and switches to it when necessary.
Switching is done by std::swap so that |stack| is always the stack for the
current mark color. We avoid swapping if both stacks are empty so that we don't
always use the auxiliary stack.
This removes a bunch of state from MarkStack and assertions around ensuring
that state is valid.
| Assignee | ||
Comment 2•3 years ago
|
||
We can now make a few simplifications now |stack| is always the current stack.
Depends on D178040
| Assignee | ||
Comment 3•3 years ago
|
||
I'm never sure how to interpret these results, but all the Windows ones are same or negative on size, so I don't think this will cause a regression:
Comment 5•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/8b4f4da78faa
https://hg.mozilla.org/mozilla-central/rev/0d1f0b668a79
Comment 6•3 years ago
|
||
(In reply to Jon Coppeard (:jonco) from comment #3)
I'm never sure how to interpret these results, but all the Windows ones are same or negative on size, so I don't think this will cause a regression:
Ok, I'm not sure why my version was so problematic, but I definitely prefer the simplicity of separate stacks and so I'm happy to rely on these results.
Description
•