There are three categories of improvements:
(1) using size_t* rather than unsigned long* (and "%zX" rather than
"%lX"), to better support platforms where sizeof(long) !=
sizeof(void*), such as Win64 (untested, though). This is a
non-issue for 64-bit Linux (where I tested) and Mac.
(2) Using the correct amount of 0-padding when printing addresses to
show how much memory space is being printed. In other words, using
"%016zX" on 64-bit platforms instead of "%08zX". This change is
cosmetic-only, though it makes the logs much more understandable.
(3) [in leaksoup.cpp only] Fixing an occurrence of assuming that
sizeof(int) == sizeof(void*). This occurrence led to printing only
the lower half of each word in the output, after doing a correct
analysis of the memory graph.
This patch is patching three files:
(A) nsTraceMalloc.cpp, which is the in-process Gecko trace-malloc code
that generates the memory dumps.
(B) adreader.cpp, which is shared utility code for reading such a
memory dump (currently used only by leaksoup.cpp)
(C) leaksoup.cpp, which reads in such a memory dump, performs a
strongly connected components analysis of the memory graph, and
writes it back out, HTML-ized, with the roots listed at the top.
A fourth file appears to need no modification since it only looks at the
stack part of the dump and not the contents of the memory:
(D) diffbloatdump.pl, which diffs two bloat dumps and produces a stack
tree showing the change in allocations between them
Now that bug 975295 removed the obsolete wrapper class, we can rename
nsTraceRefcntImpl back to its correct pre-XPCOM-glue name,
nsTraceRefcnt.
The best part is that the one place where indentation should have needed
fixing, nsTraceRefcnt::DemangleSymbol, never had its indentation fixed
for the previous renaming.
--HG--
rename : xpcom/base/nsTraceRefcntImpl.cpp => xpcom/base/nsTraceRefcnt.cpp
rename : xpcom/base/nsTraceRefcntImpl.h => xpcom/base/nsTraceRefcnt.h
qimportbz is now pulled from its new canonical home. The old location can
be cleaned if the user agrees to it. The new location is updated in the
hgrc.
DONTBUILD (NPOTB)
bzexport is now pulled from its new canonical home. The old location can
be cleaned if the user agrees to it. The new location is updated in the
hgrc.
DONTBUILD (NPOTB)
--HG--
extra : rebase_source : f7737bcf7b528df9b8130ecb3cf73f4d74280d3b
extra : amend_source : b9a1a0b656b1e350cf161db386cf7986cac6a430