Closed Bug 500233 Opened 13 years ago Closed 13 years ago

make some DEBUG_CC information accessible to memory tools

Categories

(Core :: XPCOM, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: dbaron, Assigned: dbaron)

Details

Attachments

(2 files, 2 obsolete files)

I'd like to be able to use the cycle collection API for memory tools that run in normal Firefox builds (tools that are for advanced web developers to use).  This requires changing some of our DEBUG_CC ifdefs to be conditionally-executed code rather than conditionally-compiled code.

This patch changes two chunks of code away from DEBUG_CC ifdefs:
 * code that gives the object size, object name, and edge names
 * code that prevents us from tracing the entire graph when we know we don't need to
and makes them governed by flags on the nsCycleCollectionTraversalCallback instead.
Attached patch patch (obsolete) — Splinter Review
Attached patch patch (diff -w) (obsolete) — Splinter Review
Attachment #384907 - Flags: superreview?(peterv)
Attachment #384907 - Flags: review?(peterv)
Attachment #384907 - Flags: superreview?(peterv)
Attachment #384907 - Flags: review?(peterv)
Comment on attachment 384907 [details] [diff] [review]
patch (diff -w)

I think there's something in this patch causing leaks, so never mind for now.
Attached patch patchSplinter Review
Attachment #384906 - Attachment is obsolete: true
Attached patch patch (diff -w)Splinter Review
Attachment #384907 - Attachment is obsolete: true
Attachment #385154 - Flags: superreview?(peterv)
Attachment #385154 - Flags: review?(peterv)
Attachment #385154 - Flags: superreview?(peterv)
Attachment #385154 - Flags: superreview+
Attachment #385154 - Flags: review?(peterv)
Attachment #385154 - Flags: review+
Comment on attachment 385154 [details] [diff] [review]
patch (diff -w)

>+    return !(cb.Flags() &
>+             nsCycleCollectionTraversalCallback::WANT_ALL_TRACES) &&

Would it make sense to have an inline helper function so that this could just be cb.WantAllTraces()?
(Same thing for WANT_DEBUG_INFO)

>+    // If the callback cares about objsz or objname, it should
>+    // WANT_DEBUG_INFO in the flags.

should "return"?
http://hg.mozilla.org/mozilla-central/rev/e277a7a7ad4f
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Priority: -- → P3
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
You need to log in before you can comment on or make changes to this bug.