add easy way to do shutdown WANT_ALL_TRACES CC logging

RESOLVED FIXED in mozilla20

Status

()

Core
XPCOM
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: mccr8, Assigned: mccr8)

Tracking

(Blocks: 1 bug)

Trunk
mozilla20
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [MemShrink:P3])

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
The most common kind of leak hunting is looking at shutdown leaks.  It would be handy if there was an easy way to
a) log only shutdown CCs, as that's often all you care about for shutdown leaks
b) make them WANT_ALL_TRACES, as this is needed if the leak is in JS (as it often is...)

For this bug, at first I'll just try out a compile flag in nsCycleCollector.cpp.  If we want to get fancy later we can add an environment flag in debug builds or something.
Whiteboard: [MemShrink] → [MemShrink:P3]
(Assignee)

Updated

5 years ago
Blocks: 794974
(Assignee)

Comment 1

5 years ago
Created attachment 665959 [details] [diff] [review]
add two globals to control shutdown logging

I haven't tested this, but it does compile. I add two boolean flags at the top of nsCycleCollector.cpp. One will log all shutdown CCs, the other will make all shutdown CCs AllTraces(). Shutdown CCs always do a GC beforehand, so we don't need to do any further trickery to disable CC optimization.
(Assignee)

Updated

5 years ago
Attachment #665959 - Flags: review?(bugs)

Comment 2

5 years ago
Comment on attachment 665959 [details] [diff] [review]
add two globals to control shutdown logging

It would be nice to be able to control this all using some
prefs or env variables.
Attachment #665959 - Flags: review?(bugs) → review+
(Assignee)

Comment 3

5 years ago
That's a good point. I was thinking that myself. I'll figure out how to work that in there.
(Assignee)

Comment 4

4 years ago
Hrmph, I guess I never landed this. I'll land it soon and file a followup for a way to trigger this without recompiling.
Flags: needinfo?(continuation)
(Assignee)

Comment 5

4 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/4fcba9b6e0f8

Filed bug 823226 for controlling logging via environment variables.
Flags: needinfo?(continuation)
https://hg.mozilla.org/mozilla-central/rev/4fcba9b6e0f8
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.