Changes

Jump to: navigation, search

Performance:Leak Tools

1,567 bytes removed, 22:45, 28 October 2014
no edit summary
| colspan="4" style="background: #eee" | Leak tools for large object graphs
|-
| [[#leakhttps://developer.mozilla.org/en-gauge|US/docs/Mozilla/Performance/Leak_Gauge Leak Gauge]]
| Windows, documents, and docshells only
| All platforms
| Any build
|-
| [[#leakhttps://developer.mozilla.org/en-monitor|Leak Monitor]]| Common chrome JavaScript leaks| All platforms| Any build|-| [[#Cycle collector and JavaScript heap dump|Cycle collector US/docs/Mozilla/Performance/GC_and_CC_logs GC and JavaScript heap dump]CC logs]
| JS objects, DOM objects, many other kinds of objects
| All platforms
| colspan="4" style="background: #eee" | Leak tools for medium-size object graphs
|-
| [https://developer.mozilla.org/en-US/docs/Mozilla/Performance/BloatView BloatView], [#tracehttps://developer.mozilla.org/en-refcnt US/docs/Mozilla/Performance/Refcount_tracing_and_balancing refcount tracing and the refcount balancer|Trace-refcnt]balancing]| Objects that implement nsISupports or use MOZ_COUNT_CTORMOZ_COUNT_{CTOR,DTOR}
| All tier 1 platforms
| Debug build (or build opt with --enable-logrefcnt)
|-
| [[https://developer.mozilla.org/en-US/docs/Mozilla/Performance/TraceMalloc#Leaksoup|Leaksoup]](part of TraceMalloc)
| All objects? (or allocations?)
| All tier 1 platforms
| colspan="4" style="background: #eee" | Leak tools for simple objects and summary statistics
|-
| [[#Tracehttps://developer.mozilla.org/en-malloc|Trace-malloc]US/docs/Mozilla/Performance/TraceMalloc TraceMalloc]
| All allocations
| All tier 1 platforms
| Build with --enable-trace-malloc
|-
| [[#https://developer.mozilla.org/en-US/docs/Mozilla/Testing/Valgrind|Valgrind]]
| All allocations
| Mac, Linux
| Build with --enable-valgrind and some other options
|-
| [[#https://code.google.com/p/address-sanitizer/wiki/LeakSanitizer LSAN|LSAN]]
| All allocations
| Mac, Linux
| Any build
|-
| [[#http://developer.apple.com/documentation/Performance/Conceptual/ManagingMemory/Articles/FindingLeaks.html Apple tools|Apple tools]]
| ?
| Mac
| colspan="4" style="background: #eee" | Leak tools for debugging memory growth that is cleaned up on shutdown
|-
| [[https://developer.mozilla.org/en-US/docs/Mozilla/Performance/TraceMalloc#trace-malloc with diffbloatdump|Detecting_memory_usage_growth_in_a_running_process diffbloatdump]](part of TraceMalloc)
| All allocations
| Linux only?
| Build with --enable-trace-malloc
|}
 
=== Leak tools for large object graphs ===
 
==== leak-gauge ====
 
Leak Gauge is documented on [https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Leak_Gauge MDN].
 
==== leak-monitor ====
 
[http://dbaron.org/mozilla/leak-monitor/ Leak Monitor] is an extension that is no longer maintained and would take significant work to get working again.
 
==== Cycle collector and JavaScript heap dump ====
 
These are documented on [https://developer.mozilla.org/en-US/docs/Mozilla/Performance/GC_and_CC_logs MDN].
 
=== Leak tools for medium-size object graphs ===
 
==== BloatView, and refcount tracing and balancing ====
 
BloatView is documented on [https://developer.mozilla.org/en-US/docs/Mozilla/Performance/BloatView MDN].
 
Refcount tracing and balancing is also documented on [https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Refcount_tracing_and_balancing MDN].
 
==== Leaksoup ====
 
Leaksoup is documented on [https://developer.mozilla.org/en-US/docs/Mozilla/Performance/TraceMalloc#Leaksoup MDN].
 
=== Leak tools for simple objects and summary statistics ===
 
==== TraceMalloc ====
 
See the documentation on TraceMalloc on [https://developer.mozilla.org/en-US/docs/Mozilla/Performance/TraceMalloc MDN].
 
==== Valgrind, LSAN and Apple tools ====
 
These are documented on [https://developer.mozilla.org/en-US/docs/Mozilla/Performance MDN].
 
=== Leak tools for debugging memory growth that is cleaned up on shutdown ===
 
It is also possible to have a leak that is visible to the user (but not to many of our leak detection tools) by holding objects longer than one should. (For example, one could store an owning reference to every document ever loaded in an nsISupportsArray owned by a service that is destroyed at shutdown, causing every document to stay around until shutdown.) It is sometimes worth testing for this type of leak, especially if there are known leak problems that are visible to the user.
 
==== trace-malloc with diffbloatdump ====
 
See the documentation on <tt>diffbloatdump.pl</tt> on [https://developer.mozilla.org/en-US/docs/Mozilla/Performance/TraceMalloc#Detecting_memory_usage_growth_in_a_running_process MDN].
== Common leak patterns ==
Confirm
1,345
edits

Navigation menu