Performance:Leak Tools: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 21: Line 21:
| colspan="4" style="background: #eee" | Leak tools for large object graphs
| colspan="4" style="background: #eee" | Leak tools for large object graphs
|-
|-
| [[#leak-gauge|Leak Gauge]]
| [https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Leak_Gauge Leak Gauge]
| Windows, documents, and docshells only
| Windows, documents, and docshells only
| All platforms
| All platforms
| Any build
| Any build
|-
|-
| [[#leak-monitor|Leak Monitor]]
| [https://developer.mozilla.org/en-US/docs/Mozilla/Performance/GC_and_CC_logs GC and CC logs]
| Common chrome JavaScript leaks
| All platforms
| Any build
|-
| [[#Cycle collector and JavaScript heap dump|Cycle collector and JavaScript heap dump]]
| JS objects, DOM objects, many other kinds of objects
| JS objects, DOM objects, many other kinds of objects
| All platforms
| All platforms
Line 38: Line 33:
| colspan="4" style="background: #eee" | Leak tools for medium-size object graphs
| colspan="4" style="background: #eee" | Leak tools for medium-size object graphs
|-
|-
| [[#trace-refcnt and the refcount balancer|Trace-refcnt]]
| [https://developer.mozilla.org/en-US/docs/Mozilla/Performance/BloatView BloatView], [https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Refcount_tracing_and_balancing refcount tracing and balancing]
| Objects that implement nsISupports or use MOZ_COUNT_CTOR
| Objects that implement nsISupports or use MOZ_COUNT_{CTOR,DTOR}
| All tier 1 platforms
| All tier 1 platforms
| Debug build (or build opt with --enable-logrefcnt)
| Debug build (or build opt with --enable-logrefcnt)
|-
|-
| [[#Leaksoup|Leaksoup]]
| [https://developer.mozilla.org/en-US/docs/Mozilla/Performance/TraceMalloc#Leaksoup Leaksoup] (part of TraceMalloc)
| All objects? (or allocations?)
| All objects? (or allocations?)
| All tier 1 platforms
| All tier 1 platforms
Line 50: Line 45:
| colspan="4" style="background: #eee" | Leak tools for simple objects and summary statistics
| colspan="4" style="background: #eee" | Leak tools for simple objects and summary statistics
|-
|-
| [[#Trace-malloc|Trace-malloc]]
| [https://developer.mozilla.org/en-US/docs/Mozilla/Performance/TraceMalloc TraceMalloc]
| All allocations
| All allocations
| All tier 1 platforms
| All tier 1 platforms
| Build with --enable-trace-malloc
| Build with --enable-trace-malloc
|-
|-
| [[#Valgrind|Valgrind]]
| [https://developer.mozilla.org/en-US/docs/Mozilla/Testing/Valgrind Valgrind]
| All allocations
| All allocations
| Mac, Linux
| Mac, Linux
| Build with --enable-valgrind and some other options
| Build with --enable-valgrind and some other options
|-
|-
| [[#LSAN|LSAN]]
| [https://code.google.com/p/address-sanitizer/wiki/LeakSanitizer LSAN]
| All allocations
| All allocations
| Mac, Linux
| Mac, Linux
| Any build
| Any build
|-
|-
| [[#Apple tools|Apple tools]]
| [http://developer.apple.com/documentation/Performance/Conceptual/ManagingMemory/Articles/FindingLeaks.html Apple tools]
| ?
| ?
| Mac
| Mac
Line 72: Line 67:
| colspan="4" style="background: #eee" | Leak tools for debugging memory growth that is cleaned up on shutdown
| colspan="4" style="background: #eee" | Leak tools for debugging memory growth that is cleaned up on shutdown
|-
|-
| [[#trace-malloc with diffbloatdump|diffbloatdump]]
| [https://developer.mozilla.org/en-US/docs/Mozilla/Performance/TraceMalloc#Detecting_memory_usage_growth_in_a_running_process diffbloatdump] (part of TraceMalloc)
| All allocations
| All allocations
| Linux only?
| Linux only?
| Build with --enable-trace-malloc
| 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 ==
== Common leak patterns ==
Confirmed users
1,345

edits

Navigation menu