Richard Uhler | b730b78 | 2015-07-15 16:01:58 -0700 | [diff] [blame] | 1 | AHAT - Android Heap Analysis Tool |
| 2 | |
| 3 | Usage: |
| 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 | |
| 11 | TODO: |
| 12 | * Add more tips to the help page. |
Richard Uhler | b730b78 | 2015-07-15 16:01:58 -0700 | [diff] [blame] | 13 | - Recommend how to start looking at a heap dump. |
| 14 | - Say how to enable allocation sites. |
| 15 | - Where to submit feedback, questions, and bug reports. |
Richard Uhler | b730b78 | 2015-07-15 16:01:58 -0700 | [diff] [blame] | 16 | * 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] | 17 | * Let user re-sort sites objects info by clicking column headers. |
| 18 | * Let user re-sort "Objects" list. |
| 19 | * Show site context and heap and class filter in "Objects" view? |
| 20 | * Have a menu at the top of an object view with links to the sections? |
| 21 | * Include ahat version and hprof file in the menu at the top of the page? |
| 22 | * Heaped Table |
| 23 | - Make sortable by clicking on headers. |
Richard Uhler | b730b78 | 2015-07-15 16:01:58 -0700 | [diff] [blame] | 24 | * For HeapTable with single heap shown, the heap name isn't centered? |
| 25 | * Consistently document functions. |
| 26 | * Should help be part of an AhatHandler, that automatically gets the menu and |
| 27 | stylesheet link rather than duplicating that? |
| 28 | * Show version number with --version. |
| 29 | * Show somewhere where to send bugs. |
Richard Uhler | b730b78 | 2015-07-15 16:01:58 -0700 | [diff] [blame] | 30 | * 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 Uhler | b730b78 | 2015-07-15 16:01:58 -0700 | [diff] [blame] | 33 | |
| 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 | |
| 41 | * [low priority] Have a way to diff two heap dumps by site. |
| 42 | This should be pretty easy to do, actually. The interface is the real |
| 43 | question. Maybe: augment each byte count field on every page with the diff |
| 44 | if a baseline has been provided, and allow the user to sort by the diff. |
| 45 | |
| 46 | Things to Test: |
| 47 | * That we can open a hprof without an 'app' heap and show a tabulation of |
| 48 | objects normally sorted by 'app' heap by default. |
| 49 | * Visit /objects without parameters and verify it doesn't throw an exception. |
| 50 | * 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] | 51 | * That we can view the list of all objects in a reasonably short amount of |
| 52 | time. |
| 53 | * That we don't show the 'extra' column in the DominatedList if we are |
| 54 | showing all the instances. |
Richard Uhler | 788b21e | 2015-08-31 10:33:56 -0700 | [diff] [blame] | 55 | * That InstanceUtils.asString properly takes into account "offset" and |
| 56 | "count" fields, if they are present. |
Richard Uhler | 77ff54b | 2015-08-31 10:22:56 -0700 | [diff] [blame] | 57 | * InstanceUtils.getDexCacheLocation |
Richard Uhler | b730b78 | 2015-07-15 16:01:58 -0700 | [diff] [blame] | 58 | |
| 59 | Reported Issues: |
| 60 | * Request to be able to sort tables by size. |
Richard Uhler | b730b78 | 2015-07-15 16:01:58 -0700 | [diff] [blame] | 61 | |
| 62 | Perflib Requests: |
| 63 | * Class objects should have java.lang.Class as their class object, not null. |
| 64 | * ArrayInstance should have asString() to get the string, without requiring a |
| 65 | length function. |
| 66 | * Document that getHeapIndex returns -1 for no such heap. |
| 67 | * Look up totalRetainedSize for a heap by Heap object, not by a separate heap |
| 68 | index. |
| 69 | * What's the difference between getId and getUniqueId? |
| 70 | * I see objects with duplicate references. |
Richard Uhler | b730b78 | 2015-07-15 16:01:58 -0700 | [diff] [blame] | 71 | * A way to get overall retained size by heap. |
| 72 | * A method Instance.isReachable() |
| 73 | |
| 74 | Things to move to perflib: |
| 75 | * Extracting the string from a String Instance. |
| 76 | * Extracting bitmap data from bitmap instances. |
| 77 | * Adding up allocations by stack frame. |
| 78 | * Computing, for each instance, the other instances it dominates. |
Richard Uhler | 38f9eba | 2015-11-11 08:31:52 -0800 | [diff] [blame] | 79 | * Instance.isRoot and Instance.getRootTypes. |
Richard Uhler | b730b78 | 2015-07-15 16:01:58 -0700 | [diff] [blame] | 80 | |
| 81 | Release History: |
Richard Uhler | c237b39 | 2015-10-20 10:03:38 -0700 | [diff] [blame] | 82 | 0.2 Oct 20, 2015 |
| 83 | Take into account 'count' and 'offset' when displaying strings. |
| 84 | |
Richard Uhler | b730b78 | 2015-07-15 16:01:58 -0700 | [diff] [blame] | 85 | 0.1ss Aug 04, 2015 |
| 86 | Enable stack allocations code (using custom modified perflib). |
| 87 | Sort objects in 'objects/' with default sort. |
| 88 | |
| 89 | 0.1-stacks Aug 03, 2015 |
| 90 | Enable stack allocations code (using custom modified perflib). |
| 91 | |
| 92 | 0.1 July 30, 2015 |
| 93 | Initial Release |
| 94 | |