diff options
author | Esteban de la Canal <estebandlc@google.com> | 2014-08-05 18:32:36 -0700 |
---|---|---|
committer | Esteban de la Canal <estebandlc@google.com> | 2014-08-05 18:32:36 -0700 |
commit | 952ee21e41180379812e4dac32d4c4ea1343ff7e (patch) | |
tree | 6d7a23f8767d24893e5c11420a131722620bdaf3 /ddms | |
parent | ba7442b65d4e2759b1063ef15b0c30ff63e9899c (diff) | |
download | swt-952ee21e41180379812e4dac32d4c4ea1343ff7e.tar.gz |
Updates ddms to use the new HeapInfo object.
Change-Id: I54d84ba8617901a9944e784ad922537d9b731517
Diffstat (limited to 'ddms')
-rw-r--r-- | ddms/ddmuilib/src/main/java/com/android/ddmuilib/HeapPanel.java | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/ddms/ddmuilib/src/main/java/com/android/ddmuilib/HeapPanel.java b/ddms/ddmuilib/src/main/java/com/android/ddmuilib/HeapPanel.java index d0af8b0..62103b4 100644 --- a/ddms/ddmuilib/src/main/java/com/android/ddmuilib/HeapPanel.java +++ b/ddms/ddmuilib/src/main/java/com/android/ddmuilib/HeapPanel.java @@ -729,22 +729,19 @@ public final class HeapPanel extends BaseHeapPanel { while (iter.hasNext()) { numRows++; Integer id = iter.next(); - Map<String, Long> heapInfo = cd.getVmHeapInfo(id); - if (heapInfo == null) { + ClientData.HeapInfo info = cd.getVmHeapInfo(id); + if (info == null) { continue; } - long sizeInBytes = heapInfo.get(ClientData.HEAP_SIZE_BYTES); - long bytesAllocated = heapInfo.get(ClientData.HEAP_BYTES_ALLOCATED); - long objectsAllocated = heapInfo.get(ClientData.HEAP_OBJECTS_ALLOCATED); TableItem item = new TableItem(mHeapSummary, SWT.NONE); item.setText(0, id.toString()); - item.setText(1, prettyByteCount(sizeInBytes)); - item.setText(2, prettyByteCount(bytesAllocated)); - item.setText(3, prettyByteCount(sizeInBytes - bytesAllocated)); - item.setText(4, fractionalPercent(bytesAllocated, sizeInBytes)); - item.setText(5, addCommasToNumber(objectsAllocated)); + item.setText(1, prettyByteCount(info.sizeInBytes)); + item.setText(2, prettyByteCount(info.bytesAllocated)); + item.setText(3, prettyByteCount(info.sizeInBytes - info.bytesAllocated)); + item.setText(4, fractionalPercent(info.bytesAllocated, info.sizeInBytes)); + item.setText(5, addCommasToNumber(info.objectsAllocated)); } } } |