ahat: Switch to a custom dominators implementation.
Rather than relying on perflib's dominators computation, use our own.
Benefits:
* Over 25% improvement in heap dump processing performance, improving
ahat startup time by around 1 to 3 seconds on typical Android heap
dumps.
* Provides more flexibility if we want to tweak the dominators
computation in the future, for example by treating different
soft/weak/finalizer differently or additional performance tuning.
* Opens the door to future performance optimizations based around
eliminating the impedance mismatch between perflib and ahat's
internal representations of the heap dump.
* Opens the door to possible future features that involve computing
dominators of non-heap objects, such as dex code items.
* Avoids a bug in perflib's dominators computation when there are
duplicate class or instance dumps.
Also included in this change:
* Include "class" in toString for class objects.
* Compute Site ObjectsInfos bottom-up in a separate pass.
Bug: 34884751
Bug: 33957507
Test: m ahat-test, with new tests for incoming references and dominators.
Test: Confirm dominator parity with perflib's dominators computation on
a number of real heap dumps.
Test: Visually compare information reported for overview, rooted, sites,
object, and objects pages on a real heap dump against ahat-1.2.
Change-Id: I4cf8fb177a0aaaee07ad6fddbc574682f91cc0f7
18 files changed