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