From cda4f2e72f569e0a0d6119c1c75284fd44df79ab Mon Sep 17 00:00:00 2001 From: Richard Uhler Date: Fri, 9 Sep 2016 09:56:20 +0100 Subject: Refactor ahat's perflib api. This change substantially refactors how ahat accesses heap dump data. Rather than use the perflib API directly with some additional information accessed on the side via AhatSnapshot, we introduce an entirely new API for accessing all the information we need from a heap dump. Perflib is used when processing the heap dump to populate the information initially, but afterwards all views and handlers go through the new com.android.ahat.heapdump API. The primary motivation for this change is to facilitate adding support for diffing two heap dumps to ahat. The new API provides flexibility that will make it easier to form links between objects in different snapshots and introduce place holder objects to show when there is an object in another snapshot that has no corresponding object in this snapshot. A large number of test cases were added to cover missing cases discovered in the process of refactoring ahat's perflib API. The external user-facing UI may have minor cosmetic changes, but otherwise is unchanged. Test: m ahat-test, with many new tests added. Bug: 33770653 Change-Id: I1a6b05ea469ebbbac67d99129dd9faa457b4d17e --- tools/ahat/test/QueryTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/ahat/test/QueryTest.java') diff --git a/tools/ahat/test/QueryTest.java b/tools/ahat/test/QueryTest.java index 40e3322472..5bcf8eafc3 100644 --- a/tools/ahat/test/QueryTest.java +++ b/tools/ahat/test/QueryTest.java @@ -18,9 +18,10 @@ package com.android.ahat; import java.net.URI; import java.net.URISyntaxException; -import static org.junit.Assert.assertEquals; import org.junit.Test; +import static org.junit.Assert.assertEquals; + public class QueryTest { @Test public void simple() throws URISyntaxException { -- cgit v1.2.3-59-g8ed1b