Performance:Leak Tools: Difference between revisions

(→‎Trace-malloc: more portable)
Line 7: Line 7:
Because it is based on instrumentation, it is not reliable for gathering aggregate statistics. (In spite of this, it is currently used for the leak stats on tinderbox, although a trace-malloc based replacement is in development.) However, it is by far the best tool we have for debugging leaks of reference counted objects, which are the leaks in Mozilla that can entrain the largest object graphs.
Because it is based on instrumentation, it is not reliable for gathering aggregate statistics. (In spite of this, it is currently used for the leak stats on tinderbox, although a trace-malloc based replacement is in development.) However, it is by far the best tool we have for debugging leaks of reference counted objects, which are the leaks in Mozilla that can entrain the largest object graphs.


These tools work best on Linux, although they work reasonably well on Mac (except that nsCOMPtr logging doesn't work). Some people claim to have seen them work on Windows, but I haven't been able to get them to work. They are built by default in debug builds. In Linux optimized builds they can be built with --enable-logrefcnt. In Windows optimized builds they can be built by setting FORCE_BUILD_REFCNT_LOGGING=1 (?).
These tools 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 below). In optimized builds they can be built with --enable-logrefcnt.


See below for a detailed description of how to use the refcount balancer effectively.
See below for a detailed description of how to use the refcount balancer effectively.
canmove, Confirmed users, Bureaucrats and Sysops emeriti
1,334

edits