Performance:Leak Tools: Difference between revisions

Updated leak stats documentation to new TBPL layout
(Updated leak stats documentation to new TBPL layout)
Line 288: Line 288:
=== Reading the new-style leak stats ===
=== Reading the new-style leak stats ===


The new-style (nsTraceMalloc-based) leak stats look like this:
The new-style (nsTraceMalloc-based) leak stats are displayed in the bottom-right panel after clicking on a debug build's "B" and look like this:


<table style="margin: 1em auto" border="1" width="120"><tr><td style="background: #1d1; text-align: center; font: medium monospace; padding: 2em 1em"><span style="text-decoration:underline; color: #00e; cursor:pointer">L</span> <span style="text-decoration:underline; color: #00e; cursor:pointer">C</span><br>Lk:382KB<br>MH:7.75MB<br>A:391K</td></tr></table>
<ul>
<li>s: linux-ix-slave35</li>
<li> [http://graphs.mozilla.org/graph.html#tests=&#91;&#91;28,1,6&#93;&#93; Lk: 702KB]</li>
<li> [http://graphs.mozilla.org/graph.html#tests=&#91;&#91;29,1,6&#93;&#93; MH: 32.0MB]</li>
<li> [http://graphs.mozilla.org/graph.html#tests=&#91;&#91;30,1,6&#93;&#93; A: 498010]</li>
<li> check: 31015/0</li>
</ul>


These statistics are generated using trace-malloc. They therefore give accurate aggregate statistics for all heap allocations during the test. Like the old-style leak statistics, the action tested is loading of a browser window and a run through the bloat URLs (bloaturls.txt). The Lk (leak) number is the total number of bytes (not counting any overhead in the allocator) allocated on the heap and not freed over the entire run. This number (as does the number in the old-style leak statistics) includes shutdown leaks, leaks that happen only once for a run of the browser, but there are more here since most shutdown leaks are not of objects logged by nsTraceRefcnt. The MH (max heap, or a meaningful bloat number that I gave a name other than "bloat") is the number of bytes allocated on the heap at the point during the run when the heap was at its maximum size (again, excluding overhead). The A (allocations) number is the total number of allocations over the run, and is an indicator of a subset of performance rather than an indicator of memory use, although high allocation churn could contribute to fragmentation.
These statistics are generated using trace-malloc. They therefore give accurate aggregate statistics for all heap allocations during the test. Like the old-style leak statistics, the action tested is loading of a browser window and a run through the bloat URLs (bloaturls.txt). The Lk (leak) number is the total number of bytes (not counting any overhead in the allocator) allocated on the heap and not freed over the entire run. This number (as does the number in the old-style leak statistics) includes shutdown leaks, leaks that happen only once for a run of the browser, but there are more here since most shutdown leaks are not of objects logged by nsTraceRefcnt. The MH (max heap) is the number of bytes allocated on the heap at the point during the run when the heap was at its maximum size (again, excluding overhead). The A (allocations) number is the total number of allocations over the run, and is an indicator of a subset of performance rather than an indicator of memory use, although high allocation churn could contribute to fragmentation.


=== Running the new-style leak tests ===
=== Running the new-style leak tests ===
Confirmed users
33

edits