Closed
Bug 678615
Opened 13 years ago
Closed 12 years ago
remove ExplainLiveExpectedGarbage
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: mccr8, Assigned: mccr8)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
41.20 KB,
patch
|
smaug
:
review+
peterv
:
superreview+
|
Details | Diff | Splinter Review |
4.16 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Outside of nsCycleCollector.cpp, DEBUG_CC is now only used in a few places, for explainLiveExpectedGarbage (eLEG). We can clean up a few of those places, remove outdated references to it in comments, and rename it to something more specific. This will make it clear that to enable eg cycle collector logging, you don't really need to touch nsCycleCollectionParticipant.h, which is a pain because it is included everywhere and causes huge rebuilds. There's probably room for a followup that splits out DEBUG_CC within nsCycleCollector.cpp into multiple compile options. Here is where it appears outside of nsCycleCollector.cpp according to MXR: - nsCycleCollector.h (nsCC.h): defines DEBUG_CC, uses it for eLEG - nsCycleCollectionParticipant (nsCCP.h): defines DEBUG_CC, does not use it - xpcprivate.h: used for eLEG, includes nsCCP.h and nsCC.h - nsXPConnect: used for eLEG, includes xpcprivate.h Here's the steps I am thinking of: - nsCPP.h: remove DEBUG_CC entirely (just in a comment) - nsCC.h, xpcprivate.h, nsXPConnect: rename DEBUG_CC to something like CC_EXPLAIN_LIVE - nsXPConnect: fix outdated comments about DEBUG_CC - nsCC.cpp: if CC_EXPLAIN_LIVE is defined, define DEBUG_CC. alternatively, replace uses of DEBUG_CC with CC_EXPLAIN_LIVE where appropriate, though they may be a bit tangled up.
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → continuation
Assignee | ||
Comment 1•13 years ago
|
||
WIP This renames DEBUG_CC outside of nsCycleCollector.cpp to CC_EXPLAIN_LIVE, which is what it is used for. Within nsCC.cpp, uses of DEBUG_CC are replaced with CC_EXPLAIN_LIVE as appropriate. For simplicity, CC_EXPLAIN_LIVE implies DEBUG_CC. My testing plan is to make sure the browser builds and runs for a few minutes with these combinations: 1. as is (should be identical to current) 2. DEBUG_CC set in nsCycleCollector.cpp 3. EXPLAIN_LIVE_CC set in nsCycleCollector.h
Assignee | ||
Comment 2•13 years ago
|
||
Briefly, the advantage of this patch is that most of the features of DEBUG_CC can be enabled only be recompiling nsCycleCollector.cpp, instead of causing a ton of things to need to be rebuilt. The disadvantage is mainly that explainLiveExpectedGarbage will probably bitrot more because it will be getting built and run less. I tried it in combination 1 and 2 described above. Still need to try EXPLAIN_LIVE_CC.
Assignee | ||
Comment 3•13 years ago
|
||
I also removed mBytes from DEBUG_CC PtrInfo because nothing uses it.
Assignee | ||
Comment 4•13 years ago
|
||
Does this sound like a reasonable thing to do, Peter? Currently my patch hangs almost right away with EXPLAIN_LIVE_CC set (the third condition above). I need to figure out if that is due to my patch, or if DEBUG_CC is just broken on trunk right now...
Assignee | ||
Comment 5•13 years ago
|
||
I'll need to update this Wiki page if I change this: https://wiki.mozilla.org/Performance:Leak_Tools
Assignee | ||
Comment 7•12 years ago
|
||
With the state of CC logging, it probably makes more sense to just remove ExplainLiveExpectedGarbage. It adds a lot of complexity, and nobody seems to be using it.
Summary: clean up DEBUG_CC uses outside of the cycle collector → remove ExplainLiveExpectedGarbage
Assignee | ||
Comment 8•12 years ago
|
||
Attachment #552774 -
Attachment is obsolete: true
Assignee | ||
Comment 9•12 years ago
|
||
The miscellaneous code moving around I did was to eliminate compiler warnings with DEBUG_CC about initialization order and an unused variable. I built and ran this with and without DEBUG_CC.
Assignee | ||
Updated•12 years ago
|
Attachment #612289 -
Flags: superreview?(peterv)
Attachment #612289 -
Flags: review?(bugs)
Assignee | ||
Comment 10•12 years ago
|
||
With the removal of ExplainLiveExpectedGarbage, this doesn't do anything any more.
Comment 11•12 years ago
|
||
Comment on attachment 612289 [details] [diff] [review] remove it r=me
Attachment #612289 -
Flags: review?(bugs) → review+
Assignee | ||
Updated•12 years ago
|
Attachment #613383 -
Flags: review?(bugs)
Updated•12 years ago
|
Attachment #613383 -
Flags: review?(bugs) → review+
Comment 12•12 years ago
|
||
Comment on attachment 612289 [details] [diff] [review] remove it Review of attachment 612289 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/xpconnect/src/nsXPConnect.cpp @@ -675,5 @@ > } > > -#ifdef DEBUG_CC > -void > -nsXPConnect::PrintAllReferencesTo(void *p) I use this sometimes to print traces. Maybe move it to XPCDebug?
Attachment #612289 -
Flags: superreview?(peterv) → superreview+
Assignee | ||
Comment 13•12 years ago
|
||
(In reply to Peter Van der Beken [:peterv] from comment #12) > I use this sometimes to print traces. Maybe move it to XPCDebug? Sure, I'll move it to XPCDebug and rename it to xpc_PrintAllReferencesTo, if that sounds okay to you.
Assignee | ||
Comment 14•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/a454f62db572 https://hg.mozilla.org/integration/mozilla-inbound/rev/d2bececb50a1
Target Milestone: --- → mozilla15
https://hg.mozilla.org/mozilla-central/rev/a454f62db572 https://hg.mozilla.org/mozilla-central/rev/d2bececb50a1
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•