Changes

Jump to: navigation, search

Performance:Leak Tools

982 bytes removed, 03:36, 28 October 2014
trace-malloc with diffbloatdump
==== trace-malloc with diffbloatdump ====
The best way I know to do this is with [[#Trace-malloc|trace-malloc]]. In a build with trace-malloc enabled you can dump the existing allocations to a file by calling See the function TraceMallocDumpAllocations from JavaScript (which is equivalent to calling NS_TraceMallocDumpAllocations from C. The following web page will allow dumping of allocations:  documentation on <script type="text/javascript"tt> var filename = windowdiffbloatdump.prompt("Filename to log: "); if (filename) TraceMallocDumpAllocations(filename); pl</scriptttOne can then use the script mozillaon [https:/tools/trace-malloc/diffbloatdumpdeveloper.pl to compare trace-malloc dumps before and after doing an action that might leakmozilla. If there are significant differences, it might be worth examining the call stacks for the destructors of the objects in question to see what is extending their lifetime. (This can be done by examining the unprocessed output of an XPCOM_MEM_REFCNT_LOG, one of the nsTraceRefcnt logs.) You should use the org/en--use-address argument to diffbloatdump.pl, and then the diff tree can be run through fix_linux_stack.py US/docs/Mozilla/Performance/ fix_macosx_stack.py as appropriateTraceMalloc MDN].
== Common leak patterns ==
Confirm
1,345
edits

Navigation menu