Changes

Jump to: navigation, search

Performance:Leak Tools

46 bytes removed, 05:33, 9 October 2014
Trace-malloc
==== Trace-malloc ====
The trace-malloc code consists of the nsTraceMalloc code in [http://mxr.mozilla.org/mozilla-central/source/tools/trace-malloc/lib/ mozilla/tools/trace-malloc/lib/] 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 built used by checking out mozilla/tools/trace-malloc/ and 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]].
Confirm
1,345
edits

Navigation menu