Changes

Jump to: navigation, search

Performance:Leak Tools

1,074 bytes removed, 03:37, 28 October 2014
Trace-malloc
=== Leak tools for simple objects and summary statistics ===
==== Trace-malloc TraceMalloc ====
The trace-malloc code consists of See the nsTraceMalloc code in documentation on TraceMalloc on [httphttps://mxrdeveloper.mozilla.org/mozilla-central/source/tools/traceen-mallocUS/libdocs/ mozillaMozilla/tools/trace-malloc/libPerformance/TraceMalloc MDN] and the perl scripts and trace-malloc readers in [http://mxr.mozilla.org/mozilla-central/source/tools/trace-malloc/ mozilla/tools/trace-malloc/]. It works by overriding / hooking into malloc and free (and related functions) and logging all calls, with stacks. It is probably the best tool we currently have for gathering aggregate memory usage statistics. It is generally more useful for bloat measurement than leak measurement, but it can be used to find leaks, including leaks of objects not instrumented for trace-refcnt. It works on Windows, Linux (x86), and Mac (PPC and Intel). It can be used by building with --enable-trace-malloc. Trace malloc slows down the browser a bit (maybe 3x?) at runtime on Linux and Mac, but by a lot more on Windows. However, the stacks on Linux and Mac require [[#Post-processing_of_stack_traces|post-processing]]. Generate a trace-malloc dump by building with <code>ac_add_options --enable-trace-malloc</code> and then passing <code>--trace-malloc FILENAME</code> when you start Firefox.
==== Valgrind, LSAN and Apple tools ====
Confirm
1,345
edits

Navigation menu