Performance:Leak Tools: Difference between revisions

Jump to navigation Jump to search
Line 113: Line 113:
These tools work on Windows, Mac (PPC and Intel), and Linux (x86), although nsCOMPtr logging doesn't work on Windows (?) and Mac and Linux stack traces require some post-processing (see [[#Post-processing of stack traces|below]]). It can be used on any standard --enable-debug build, or on a --disable-debug build with --enable-logrefcnt.
These tools work on Windows, Mac (PPC and Intel), and Linux (x86), although nsCOMPtr logging doesn't work on Windows (?) and Mac and Linux stack traces require some post-processing (see [[#Post-processing of stack traces|below]]). It can be used on any standard --enable-debug build, or on a --disable-debug build with --enable-logrefcnt.


'''Using the refcount balancer'''.  To enable summary statistics, simply set XPCOM_MEM_LEAK_LOG to 1 (stdout), 2 (stderr), or a filename.  In this mode, trace-refcnt will tell you what types of objects leaked, but won't tell you why they leaked.  See the [http://www.mozilla.org/performance/leak-tutorial.html tutorial on finding leaks of XPCOM objects] for information on debugging leaks using the refcount balancer. (Be aware that the later sections on leak graphs that include JS objects have been out of date since the XPCDOM landing.)
'''Getting leak statistics'''.  To enable summary statistics, simply set XPCOM_MEM_LEAK_LOG to 1 (stdout), 2 (stderr), or a filename.  In this mode, trace-refcnt will tell you what types of objects leaked, but won't tell you why they leaked.
 
'''Using the refcount balancer'''.  See the [http://www.mozilla.org/performance/leak-tutorial.html tutorial on finding leaks of XPCOM objects] for information on debugging leaks using the refcount balancer.


==== leaksoup ====
==== leaksoup ====
Confirmed users
729

edits

Navigation menu