Open
Bug 791127
Opened 13 years ago
Updated 3 years ago
Mark things held live by documents black during GC, instead of unmarking them later
Categories
(Core :: DOM: Core & HTML, defect, P5)
Core
DOM: Core & HTML
Tracking
()
NEW
People
(Reporter: mccr8, Unassigned)
References
Details
Attachments
(3 files)
|
9.55 KB,
patch
|
Details | Diff | Splinter Review | |
|
8.70 KB,
patch
|
Details | Diff | Splinter Review | |
|
6.50 KB,
patch
|
Details | Diff | Splinter Review |
Right now, we UnmarkGray a bunch of JS things during the first CC cleanup phase after a GC. We could change these to be held as black roots during the GC, which should reduce the time of that initial long CC cleanup phase.
| Reporter | ||
Comment 1•13 years ago
|
||
This parameterizes the MarkContentViewer/MarkDocShell/MarkSHEntry/etc. functions over a new class, DocumentVisitor, that has a single callback method that takes a document. It then implements the current cleanupJS etc stuff using it. This patch should not change the behavior.
| Reporter | ||
Comment 2•13 years ago
|
||
Once that is in place, you can drop in a chunk of code like this into TraceBlackJS:
+ if (!++nsCCUncollectableMarker::sGeneration) {
+ ++nsCCUncollectableMarker::sGeneration;
+ }
+ GCDocumentVisitor docVisitor(aTrc);
+ MarkLiveWindows(&docVisitor);
...where GCDocumentVisitor is a subclass of DocumentVisitor that uses the JS tracer on things hanging off of the document.
In my measurements in an optimized debug build, this MarkLiveWindows can take a millisecond or two, which will add to the GC time. So that's not super great. It seems to be mostly just iterating over all of the stuff.
| Reporter | ||
Comment 3•13 years ago
|
||
| Reporter | ||
Comment 4•13 years ago
|
||
Comment 5•7 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
| Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•