1AHAT - Android Heap Analysis Tool
2
3Usage:
4  java -jar ahat.jar [OPTIONS] FILE
5    Launch an http server for viewing the given Android heap dump FILE.
6
7  OPTIONS:
8    -p <port>
9       Serve pages on the given port. Defaults to 7100.
10    --proguard-map FILE
11       Use the proguard map FILE to deobfuscate the heap dump.
12    --baseline FILE
13       Diff the heap dump against the given baseline heap dump FILE.
14    --baseline-proguard-map FILE
15       Use the proguard map FILE to deobfuscate the baseline heap dump.
16    --retained [strong | soft | finalizer | weak | phantom | unreachable]
17       The weakest reachability of instances to treat as retained.
18       Defaults to soft
19
20TODO:
21 * Add a user guide.
22 * Dim 'image' and 'zygote' heap sizes slightly? Why do we even show these?
23 * Let user re-sort sites objects info by clicking column headers.
24 * Let user re-sort "Objects" list.
25 * Show site context and heap and class filter in "Objects" view?
26 * Have a menu at the top of an object view with links to the sections?
27 * Include ahat version and hprof file in the menu at the top of the page?
28 * Heaped Table
29   - Make sortable by clicking on headers.
30 * For HeapTable with single heap shown, the heap name isn't centered?
31 * Consistently document functions.
32 * Show version number with --version.
33 * Show somewhere where to send bugs.
34 * Include a link to /objects in the overview and menu?
35 * Turn on LOCAL_JAVACFLAGS := -Xlint:unchecked -Werror
36
37 * [low priority] by site allocations won't line up if the stack has been
38   truncated. Is there any way to manually line them up in that case?
39
40Things to Test:
41 * That we can open a hprof without an 'app' heap and show a tabulation of
42   objects normally sorted by 'app' heap by default.
43 * Visit /objects without parameters and verify it doesn't throw an exception.
44 * Visit /objects with an invalid site, verify it doesn't throw an exception.
45 * That we can view the list of all objects in a reasonably short amount of
46   time.
47 * That we don't show the 'extra' column in the DominatedList if we are
48   showing all the instances.
49 * Instance.getDexCacheLocation
50
51Reported Issues:
52 * Request to be able to sort tables by size.
53
54Release History:
55 1.7 August 8, 2019
56   Annotate binder services, tokens, and proxies.
57   Add option for viewing subclass instances of a class.
58   Recognize java.lang.ref.Finalizer as a finalizer reference.
59   Minor bug fixes and API improvements.
60
61 1.6 July 24, 2018
62   Distinguish between soft/weak/phantom/etc references.
63   Annotate $classOverhead byte[] arrays with their class.
64   Show progress of heap dump processing.
65   Add --retained command line option to ahat.
66   Support heap dumps generated with HotSpotDiagnosticMXBean.
67   Updated public APIs for dominators computation, reachability and parser.
68   AhatInstance no longer implements DominatorsComputation.Node
69   Bug fixes.
70
71 1.5 December 05, 2017
72   Distinguish between weakly reachable and unreachable instances.
73   Allow hex ids to be used for objects in query parameters.
74   Restore old presentation of sample paths from gc roots.
75   Fix bug in selection of sample paths from gc root.
76   Fix bug in proguard deobfuscation of stack frames.
77   Tighten up and document ahat public API.
78
79 1.4 October 03, 2017
80   Give better error messages on failure to launch ahat.
81   Properly mark thread and non-default root objects as roots.
82   Improve startup performance, in some cases significantly.
83   Other miscellaneous bug fixes.
84
85 1.3.1 August 22, 2017
86   Don't include weak references in sample paths.
87
88 1.3 July 25, 2017
89   Improve diffing of static and instance fields.
90   Improve startup performance by roughly 25%.
91
92 1.2 May 26, 2017
93   Show registered native sizes of objects.
94   Simplify presentation of sample path from gc root.
95
96 1.1 Feb 21, 2017
97   Show java.lang.ref.Reference referents as "unreachable" instead of null.
98
99 1.0 Dec 20, 2016
100   Add support for diffing two heap dumps.
101   Remove native allocations view.
102   Remove outdated help page.
103   Significant refactoring of ahat internals.
104
105 0.8 Oct 18, 2016
106   Show sample path from GC root with field names in place of dominator path.
107
108 0.7 Aug 16, 2016
109   Launch ahat server before processing the heap dump.
110   Target Java 1.7.
111
112 0.6 Jun 21, 2016
113   Add support for proguard deobfuscation.
114
115 0.5 Apr 19, 2016
116   Update perflib to perflib-25.0.0 to improve processing performance.
117
118 0.4 Feb 23, 2016
119   Annotate char[] objects with their string values.
120   Show registered native allocations for heap dumps that support it.
121
122 0.3 Dec 15, 2015
123   Fix page loading performance by showing a limited number of entries by default.
124   Fix mismatch between overview and "roots" totals.
125   Annotate root objects and show their types.
126   Annotate references with their referents.
127
128 0.2 Oct 20, 2015
129   Take into account 'count' and 'offset' when displaying strings.
130
131 0.1ss Aug 04, 2015
132   Enable stack allocations code (using custom modified perflib).
133   Sort objects in 'objects/' with default sort.
134
135 0.1-stacks Aug 03, 2015
136   Enable stack allocations code (using custom modified perflib).
137
138 0.1 July 30, 2015
139   Initial Release
140
141