blob: ecf9e5383db3e53093dc34254c6ff9ed7b0a5f3f [file] [log] [blame]
Richard Uhlerb730b782015-07-15 16:01:58 -07001AHAT - Android Heap Analysis Tool
2
3Usage:
4 java -jar ahat.jar [-p port] 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
11TODO:
Richard Uhler8f533642016-08-15 11:01:01 -070012 * Show GC Root paths.
13 * Have a way to diff two heap dumps.
14
Richard Uhlerb730b782015-07-15 16:01:58 -070015 * Add more tips to the help page.
Richard Uhlerb730b782015-07-15 16:01:58 -070016 - Recommend how to start looking at a heap dump.
17 - Say how to enable allocation sites.
18 - Where to submit feedback, questions, and bug reports.
Richard Uhlerb730b782015-07-15 16:01:58 -070019 * Dim 'image' and 'zygote' heap sizes slightly? Why do we even show these?
Richard Uhlerb730b782015-07-15 16:01:58 -070020 * Let user re-sort sites objects info by clicking column headers.
21 * Let user re-sort "Objects" list.
22 * Show site context and heap and class filter in "Objects" view?
23 * Have a menu at the top of an object view with links to the sections?
24 * Include ahat version and hprof file in the menu at the top of the page?
25 * Heaped Table
26 - Make sortable by clicking on headers.
Richard Uhlerb730b782015-07-15 16:01:58 -070027 * For HeapTable with single heap shown, the heap name isn't centered?
28 * Consistently document functions.
Richard Uhlerb730b782015-07-15 16:01:58 -070029 * Show version number with --version.
30 * Show somewhere where to send bugs.
Richard Uhlerb730b782015-07-15 16:01:58 -070031 * Include a link to /objects in the overview and menu?
32 * Turn on LOCAL_JAVACFLAGS := -Xlint:unchecked -Werror
33 * Use hex for object ids in URLs?
Richard Uhlerb730b782015-07-15 16:01:58 -070034
35 * [low priority] by site allocations won't line up if the stack has been
36 truncated. Is there any way to manually line them up in that case?
37
38 * [low priority] Have a switch to choose whether unreachable objects are
39 ignored or not? Is there any interest in what's unreachable, or is it only
40 reachable objects that people care about?
41
Richard Uhlerb730b782015-07-15 16:01:58 -070042Things to Test:
43 * That we can open a hprof without an 'app' heap and show a tabulation of
44 objects normally sorted by 'app' heap by default.
45 * Visit /objects without parameters and verify it doesn't throw an exception.
46 * Visit /objects with an invalid site, verify it doesn't throw an exception.
Richard Uhlerb730b782015-07-15 16:01:58 -070047 * That we can view the list of all objects in a reasonably short amount of
48 time.
49 * That we don't show the 'extra' column in the DominatedList if we are
50 showing all the instances.
Richard Uhler788b21e2015-08-31 10:33:56 -070051 * That InstanceUtils.asString properly takes into account "offset" and
52 "count" fields, if they are present.
Richard Uhler77ff54b2015-08-31 10:22:56 -070053 * InstanceUtils.getDexCacheLocation
Richard Uhlerb730b782015-07-15 16:01:58 -070054
55Reported Issues:
56 * Request to be able to sort tables by size.
Richard Uhlerb730b782015-07-15 16:01:58 -070057
58Perflib Requests:
59 * Class objects should have java.lang.Class as their class object, not null.
60 * ArrayInstance should have asString() to get the string, without requiring a
61 length function.
62 * Document that getHeapIndex returns -1 for no such heap.
63 * Look up totalRetainedSize for a heap by Heap object, not by a separate heap
64 index.
65 * What's the difference between getId and getUniqueId?
66 * I see objects with duplicate references.
Richard Uhlerb730b782015-07-15 16:01:58 -070067 * A way to get overall retained size by heap.
68 * A method Instance.isReachable()
69
70Things to move to perflib:
71 * Extracting the string from a String Instance.
72 * Extracting bitmap data from bitmap instances.
73 * Adding up allocations by stack frame.
74 * Computing, for each instance, the other instances it dominates.
Richard Uhler38f9eba2015-11-11 08:31:52 -080075 * Instance.isRoot and Instance.getRootTypes.
Richard Uhlerb730b782015-07-15 16:01:58 -070076
77Release History:
Richard Uhler8f533642016-08-15 11:01:01 -070078 0.8 Pending
79
80 0.7 Aug 16, 2016
81 Launch ahat server before processing the heap dump.
82 Target Java 1.7.
83
84 0.6 Jun 21, 2016
85 Add support for proguard deobfuscation (pending AOSP push of perflib)
Richard Uhler6919a012015-12-15 09:15:00 -080086
87 0.5 Apr 19, 2016
88 Update perflib to perflib-25.0.0 to improve processing performance.
89
90 0.4 Feb 23, 2016
Richard Uhlerc7f77122016-02-11 08:48:24 -080091 Annotate char[] objects with their string values.
Richard Uhler1a5baaa2015-12-21 12:47:26 -080092 Show registered native allocations for heap dumps that support it.
93
Richard Uhlera7f46cb2015-12-21 14:34:59 -080094 0.3 Dec 15, 2015
95 Fix page loading performance by showing a limited number of entries by default.
96 Fix mismatch between overview and "roots" totals.
97 Annotate root objects and show their types.
98 Annotate references with their referents.
99
Richard Uhlerc237b392015-10-20 10:03:38 -0700100 0.2 Oct 20, 2015
101 Take into account 'count' and 'offset' when displaying strings.
102
Richard Uhlerb730b782015-07-15 16:01:58 -0700103 0.1ss Aug 04, 2015
104 Enable stack allocations code (using custom modified perflib).
105 Sort objects in 'objects/' with default sort.
106
107 0.1-stacks Aug 03, 2015
108 Enable stack allocations code (using custom modified perflib).
109
110 0.1 July 30, 2015
111 Initial Release
112