Compute retained sizes ("biggest objects") on the dominator tree.
This finally enables the computation of biggest objects in each heap. On the
sample dialer.android-hprof, we identify the same top candidates as MAT,
YourKit, Netbeans, etc, with the added bonus of differentiating between the app
and zygote heap. There are still minor differences with respect to the actual
class sizes, a detail which is recomputed by most profilers based on certain
assumptions of the memory layout (sadly, the HPROF format doesn't contain this
bit of information). The layout in Dalvik/ART is obviously different, so we
only compute a safe lower bound.
The CL also rectifies a minor bug with class sizes, disambiguating between the
size of the class object itself and the size of an instance. Many of the large
instances in the zygote heap are actually class objects with lots of static
fields.
Change-Id: I5d69793bbf1efe5a74a04b0c590d9ef3b8286a3e
10 files changed