Performance/MemShrink/DMD: Difference between revisions

Line 273: Line 273:


The sampling threshold can be adjusted with an option (see below).  This will affect the precision of the output and the speed at which Firefox+DMD runs.
The sampling threshold can be adjusted with an option (see below).  This will affect the precision of the output and the speed at which Firefox+DMD runs.
=== Stack frame Records ===
One shortcoming of stack trace records is that sometimes there are multiple stack trace records that have stacks that only vary by a small amount, and this can obscure the fact that a single function is ultimately responsible for all of the blocks covered by these heap allocations.  Stack frame records are an attempt to identify such cases.
Here's an example stack frame record from the "Unreported stack frame records" section:
Unreported: ~4,047 blocks from ~979 strack trace records in stack frame record 39 of 11,482
  ~16,634,045 bytes (~16,624,445 requested / ~9,600 slop)
  0.99% of the heap;  0.00% of unreported
  PC is
    PL_DHashTableInit (/home/njn/moz/mi2/dmdo64/xpcom/build/pldhash.cpp:231) 0x7f8451816018
A stack frame record is a merging of every stack trace record that had an allocation stack trace containing its stack frame.  In this example we can see that the initialization of pldhash structures (via pldhash.cpp:231) accounted for over 16 MiB of heap allocations, and those are spread over 4,047 heap blocks, which covered approximately 979 stack trace records.


== Options ==
== Options ==
Confirmed users
1,345

edits