Changes

Jump to: navigation, search

Performance:Leak Tools

1 byte removed, 04:06, 30 January 2014
Cycle collector heap dump
To analyze a cycle collector dump, you need the scripts from [https://github.com/amccreight/heapgraph/tree/master/cc Github]. The relevant scripts are find_roots.py and parse_cc_graph.py (which is called by find_roots). Calling find_roots on a CC file with a specific object or kind of object will produce paths from rooting objects to the specified objects. Most big leaks include an nsGlobalWindow, so that's a good class to try if you don't have any better idea.
To fix a leak, the next step is to figure out why the rooting object is alive. For a C++ object, you need to figure out where the missing references are from. For a JS object, you need to figure out why the JS object is reachable from a JS root. For the latter, you can use the corresponding [https://github.com/amccreight/heapgraph/tree/master/gc g find_roots for JS] on the gc-edges file generated by the CC dump.
===== Addons for creating and analyzing cycle collector graphs =====
Confirm
1,345
edits

Navigation menu