History log of /art/tools/ahat/src/heapdump/AhatSnapshot.java
Revision Date Author Comments
d640e29f9dad93f51e74026327dd53bb5a30eb33 28-Dec-2016 Richard Uhler <ruhler@google.com> Show unreachable objects in ahat.

But don't count them against heap size or instance counts.

Bug: 33828707
Test: ahat tests, including new InstanceTest.unreachableReferent.
Change-Id: Ic39b6d5569159497dcc76c342e22ed99d2a71307
f629cfdbf6da3409aff177352e9ff41209b4570c 12-Dec-2016 Richard Uhler <ruhler@google.com> ahat: add support for diffing two heap dumps.

ahat now has the option to specify a --baseline hprof file to use as
the basis for comparing two heap dumps. When a baseline hprof file is
provided, ahat will highlight how the heap dump has changed relative
to the hprof file.

Differences that are highlighted include:
* overall heap sizes
* total bytes and number of allocations by type
* new and deleted instances of a given type
* retained sizes of objects
* instance fields, static fields, and array elements of modified objects

Also:
* Remove support for showing NativeAllocations, because I haven't ever
found it to be useful, it is not obvious what a "native" allocation
is, and I don't feel like adding diff support for them.
* Remove help page. Because it is outdated, not well maintained, and
not very helpful in the first place.

Test: m ahat-test
Test: Run in diff mode for tests and added new tests for diff.
Test: Manually run with and without diff mode on heap dumps from system server.
Bug: 33770653
Change-Id: Id9a392ac75588200e716bbc3edbae6e9cd97c26b
cda4f2e72f569e0a0d6119c1c75284fd44df79ab 09-Sep-2016 Richard Uhler <ruhler@google.com> Refactor ahat's perflib api.

This change substantially refactors how ahat accesses heap dump data.
Rather than use the perflib API directly with some additional
information accessed on the side via AhatSnapshot, we introduce an
entirely new API for accessing all the information we need from a heap
dump. Perflib is used when processing the heap dump to populate the
information initially, but afterwards all views and handlers go
through the new com.android.ahat.heapdump API.

The primary motivation for this change is to facilitate adding support
for diffing two heap dumps to ahat. The new API provides flexibility
that will make it easier to form links between objects in different
snapshots and introduce place holder objects to show when there is an
object in another snapshot that has no corresponding object in this
snapshot.

A large number of test cases were added to cover missing cases
discovered in the process of refactoring ahat's perflib API.

The external user-facing UI may have minor cosmetic changes, but
otherwise is unchanged.

Test: m ahat-test, with many new tests added.
Bug: 33770653

Change-Id: I1a6b05ea469ebbbac67d99129dd9faa457b4d17e