Last Comment Bug 713778 - nsICycleCollectorListener should not enable trace_all by default
: nsICycleCollectorListener should not enable trace_all by default
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: 10 Branch
: x86_64 Linux
: -- normal (vote)
: ---
Assigned To: Olli Pettay [:smaug]
:
: Nathan Froyd [:froydnj]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-27 16:55 PST by Olli Pettay [:smaug]
Modified: 2012-01-01 14:20 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (4.00 KB, patch)
2011-12-30 16:56 PST, Olli Pettay [:smaug]
continuation: review+
Details | Diff | Splinter Review

Description Olli Pettay [:smaug] 2011-12-27 16:55:13 PST
We optimize many edges out, but nsICycleCollectorListener doesn't know about it
Comment 1 Olli Pettay [:smaug] 2011-12-30 16:56:20 PST
Created attachment 585081 [details] [diff] [review]
patch

This changes the default to be more useful, IMO, but the old
WANT_ALL_TRACES is still possible if one
uses
window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
  getInterface(Components.interfaces.nsIDOMWindowUtils).
  garbageCollect(Components.classes["@mozilla.org/cycle-collector-logger;1"]
    .createInstance(Components.interfaces.nsICycleCollectorListener).allTraces())

So, it is enough to just call allTraces(), and since the method returns the listener itself, 
no need to store the listener in any temporary variable.
Comment 2 Andrew McCreight [:mccr8] 2011-12-30 20:02:35 PST
Comment on attachment 585081 [details] [diff] [review]
patch

Review of attachment 585081 [details] [diff] [review]:
-----------------------------------------------------------------

Nice.  I think this will be a more useful default.  WANT_ALL_TRACES is good for leak hunting, but not for CC performance analysis.

I assume the existing JS incantation will continue to work?  If not, you should update the wiki entry at https://wiki.mozilla.org/Performance:Leak_Tools#Cycle_collector_heap_dump .  Either way, you should probably add this new way to invoke it there.
Comment 3 Olli Pettay [:smaug] 2012-01-01 14:20:20 PST
https://hg.mozilla.org/mozilla-central/rev/d98fbf3cbd71

I updated also the wiki page.

Note You need to log in before you can comment on or make changes to this bug.