Closed Bug 488603 Opened 11 years ago Closed 11 years ago

improve DEBUG_CC output for detecting traversal deficiencies that lead to multiple cycles of collection

Categories

(Core :: XPCOM, defect, P4)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: dbaron, Assigned: dbaron)

Details

Attachments

(3 files)

I have two patches that somewhat improve the DEBUG_CC output that is useful for finding traversal deficiencies that are causing us to need more than one pass of cycle collection to collect objects.

Such traversal deficiencies are a problem in two ways:

 (1) they make it harder to write real-time leak monitoring tools, like leak-monitor and DEBUG_CC

 (2) the same problem that causes them could cause an uncollectable cycle if additional edges can be added in appropriate ways
These patches were helpful in debugging bug 488394.
This makes us issue a different warning for objects that are in the purple buffer, since those are the ones that are more likely to be at the ends of the edges that we're not traversing.
Attachment #373012 - Flags: superreview?(peterv)
Attachment #373012 - Flags: review?(peterv)
This reverses the meaning of suspectCurrentCount and thus fixes the bug described in the comment that it removes.
Attachment #373013 - Flags: superreview?(peterv)
Attachment #373013 - Flags: review?(peterv)
This also uses the contents of the purple buffer when we build the graph that we use in ExplainLiveExpectedGarbage, which means we're going to actually have the object that was the end of the set of edges in the traversal deficiency (although it's the first in the set that we definitely failed to traverse) in the graph, so that we can warn about it using patch 1.
Attachment #373014 - Flags: superreview?(peterv)
Attachment #373014 - Flags: review?(peterv)
Attachment #373012 - Flags: superreview?(peterv)
Attachment #373012 - Flags: superreview+
Attachment #373012 - Flags: review?(peterv)
Attachment #373012 - Flags: review+
Attachment #373013 - Flags: superreview?(peterv)
Attachment #373013 - Flags: superreview+
Attachment #373013 - Flags: review?(peterv)
Attachment #373013 - Flags: review+
Attachment #373014 - Flags: superreview?(peterv)
Attachment #373014 - Flags: superreview+
Attachment #373014 - Flags: review?(peterv)
Attachment #373014 - Flags: review+
Comment on attachment 373014 [details] [diff] [review]
patch 2: use the contents of the purple buffer when building the graph for ExplainLiveExpectedGarbage

>+    void NoteAllPointersWithoutUnmark(GCGraphBuilder &builder);

Hmm, this is really just NoteAll, no? I'd name it like that, unless I'm misunderstanding something.
You need to log in before you can comment on or make changes to this bug.