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