CCDump @VERSION@ - Cycle Collector Heap Analyzer

Author: Jan Odvarko <odvarko@gmail.com> www.softwareishard.com

Home Page: http://www.softwareishard.com/blog/ccdump/


Tips

See some tips about how to use this extension to successfully hunt down memory leaks.
  1. You mostly want to start by clicking on Run CC Analysis button in the Home tab. After you do it, Firefox cycle collector runs three times to clean up garbage and consequently once, with a listener, to collect entire CC heap graph of objects in the memory. The result object graph is immediately displayed as a table where each entry represents an object.

  2. The preferred way how to explore the graph is to search it. Use a search box located at the top right corner of the Home page. Note that if there is a string in the box the search runs automatically just after analysis.

  3. You will typically look for documents that shouldn't be in the memory since the parent tab has been already closed (so called zombie documents). Just search for nsDocument or pick Find Zombie Documents from the search option menu. You can also search for http to get all zombie elements.

  4. You can search for any other keywords within object's name or use object's address. You can also use regular expressions.

  5. As soon as you have some search results, e.g. zombie documents, you can continue exploring object graph related to the selected document. Click on the small black triangle next to object's name and pick one of the options.

  6. Especially Show Graph allows to dramatically reduce the object graph to see only related objects and search further.

  7. If you want to see the chain of objects between the current Graph root and a node, just open node's context menu and pick Path to Graph Root. The shortest path (chain of objects) will be found (it can take some time in case of huge graphs).
  8. Note that this is a bootstrapped extension and so, you can install it any time when you experience a memory leak in your running browser and immediately start exploring your current CC graph (without browser restart).



Object Fields

You can see following fields when dealing with objects in the graph.

API

The extension is build on top of nsICycleCollectorListener interface introduced in Firefox 13.


Resources

See following links to get more information or make suggestions about how this extension could be improved.


Feedback is welcome!