diff --git a/mozilla/xpcom/doc/MemoryTools.html b/mozilla/xpcom/doc/MemoryTools.html index 463a60971ff..31911940b8f 100644 --- a/mozilla/xpcom/doc/MemoryTools.html +++ b/mozilla/xpcom/doc/MemoryTools.html @@ -10,7 +10,7 @@

How to debug memory leaks/refcnt leaks

-
Last update: October 21st, 1999
+
Last update: July 11, 2000

What tools do we have?

@@ -91,7 +91,12 @@ or leaky, see below). What this does is to enable logging (to stdout) of each and every call to addref/release without discrimination to the types involved. The output includes mapping the call-stacks at the time of the call to symbolic forms (on platforms that support this) and thus will be -*very* *VERY* *VERY* slow. Did I say slow? +*very* *VERY* *VERY* slow. Did I say slow? It is not as slow when using +XPCOM_MEM_LOG_CLASSES and XPCOM_MEM_LOG_OBJECTS +XPCOM_MEM_COMPTR_LOG +
This environment variable enables logging of additions and +releases of objects into nsCOMPtrs. This is currently only enabled on +Linux.
XPCOM_MEM_ALLOC_LOG
For losing architectures (those that don't have stack-crawl software written for them), xpcom supports logging at the *call site* to @@ -135,7 +140,8 @@ further restrict the reference count tracing:
Set this variable to a comma-separated list of object -serial number. When this is set, along with +serial number or ranges of serial number, e.g., +1,37-42,73,165. When this is set, along with XPCOM_MEM_LOG_CLASSES and XPCOM_MEM_REFCNT_LOG, a stack track will be generated for only the specific objects that you list. For example, @@ -384,7 +390,7 @@ connect xpcom's tracing to leakys tracing.
Sample output Here is what you see when you enable some logging with XPCOM_MEM_LOG_CLASSES set to something: -

nsWebShell      0x81189f8       +

nsWebShell      0x81189f8      
 Release 5       nsWebShell::Release(void)+0x59 
 nsCOMPtr<nsIContentViewerContainer>::~nsCOMPtr(void)+0x34      
 nsChannelListener::OnStartRequest(nsIChannel *, nsISupports *)+0x550       
@@ -397,7 +403,7 @@ g_io_add_watch+0xaa     g_get_current_time+0x136  
 g_get_current_time+0x6f1        g_main_run+0x81
 gtk_main+0xb9   nsAppShell::Run(void)+0x245    
 nsAppShell::Run(void)+0xc7a92ede   nsAppShell::Run(void)+0xc7a9317c
-__libc_start_main+0xeb
+__libc_start_main+0xeb

Here is what you see when you use the leaky tool to dump out addref/release leaks:

addref     082cccc8     0 00000001