summaryrefslogtreecommitdiff
path: root/tools/ahat/src/OverviewHandler.java
diff options
context:
space:
mode:
author Richard Uhler <ruhler@google.com> 2016-01-27 17:57:10 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2016-01-27 17:57:10 +0000
commit1be9e27239dc63bb4d8134df50be60f65a9d5da3 (patch)
treefaaa367c54fe686d5e27ddc218d105525b8c47aa /tools/ahat/src/OverviewHandler.java
parenta80465a56d404676eafd127f459f5f565c882445 (diff)
parent1a5baaabcdd79997508c91f1d8b1cf8547c9d1cf (diff)
Merge "Show registered native allocations in ahat."
Diffstat (limited to 'tools/ahat/src/OverviewHandler.java')
-rw-r--r--tools/ahat/src/OverviewHandler.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/ahat/src/OverviewHandler.java b/tools/ahat/src/OverviewHandler.java
index 720fcb42ff..0dbad7e00c 100644
--- a/tools/ahat/src/OverviewHandler.java
+++ b/tools/ahat/src/OverviewHandler.java
@@ -48,6 +48,22 @@ class OverviewHandler implements AhatHandler {
doc.section("Heap Sizes");
printHeapSizes(doc, query);
+
+ List<InstanceUtils.NativeAllocation> allocs = mSnapshot.getNativeAllocations();
+ if (!allocs.isEmpty()) {
+ doc.section("Registered Native Allocations");
+ long totalSize = 0;
+ for (InstanceUtils.NativeAllocation alloc : allocs) {
+ totalSize += alloc.size;
+ }
+ doc.descriptions();
+ doc.description(DocString.text("Number of Registered Native Allocations"),
+ DocString.format("%,14d", allocs.size()));
+ doc.description(DocString.text("Total Size of Registered Native Allocations"),
+ DocString.format("%,14d", totalSize));
+ doc.end();
+ }
+
doc.big(Menu.getMenu());
}