Ignore comment lines in proguard mapping.

Comment lines are now being generated by R8 in the proguard mapping.
Update the proguard mapping parser to handle those. Fixes the ahat test
failure:

1) diffMatchedHeap(com.android.ahat.DiffTest)
java.io.IOException: Unable to load proguard map
  at com.android.ahat.TestDump.load(TestDump.java:116)
  at com.android.ahat.TestDump.getTestDump(TestDump.java:269)
  at com.android.ahat.TestDump.getTestDump(TestDump.java:241)
  at com.android.ahat.DiffTest.diffMatchedHeap(DiffTest.java:32)
  ...
Caused by: java.text.ParseException: Error parsing class line: '# compiler: R8'
  at com.android.ahat.proguard.ProguardMap.parseException(ProguardMap.java:142)
  at com.android.ahat.proguard.ProguardMap.readFromReader(ProguardMap.java:191)
  at com.android.ahat.TestDump.load(TestDump.java:114)
  ... 33 more

Change-Id: I70c9deb414086f454a1f3fefd3bace5b78953b44
Test: m ahat-test
diff --git a/tools/ahat/src/main/com/android/ahat/proguard/ProguardMap.java b/tools/ahat/src/main/com/android/ahat/proguard/ProguardMap.java
index 79a737c..5c21a9e 100644
--- a/tools/ahat/src/main/com/android/ahat/proguard/ProguardMap.java
+++ b/tools/ahat/src/main/com/android/ahat/proguard/ProguardMap.java
@@ -184,6 +184,12 @@
     BufferedReader reader = new BufferedReader(mapReader);
     String line = reader.readLine();
     while (line != null) {
+      // Comment lines start with '#'. Skip over them.
+      if (line.startsWith("#")) {
+        line = reader.readLine();
+        continue;
+      }
+
       // Class lines are of the form:
       //   'clear.class.name -> obfuscated_class_name:'
       int sep = line.indexOf(" -> ");
diff --git a/tools/ahat/src/test/com/android/ahat/ProguardMapTest.java b/tools/ahat/src/test/com/android/ahat/ProguardMapTest.java
index 02976b5..a9952ee 100644
--- a/tools/ahat/src/test/com/android/ahat/ProguardMapTest.java
+++ b/tools/ahat/src/test/com/android/ahat/ProguardMapTest.java
@@ -25,7 +25,11 @@
 
 public class ProguardMapTest {
   private static final String TEST_MAP =
-    "class.that.is.Empty -> a:\n"
+      "# compiler: richard\n"
+    + "# compiler_version: 3.0-dev\n"
+    + "# min_api: 10000\n"
+    + "# compiler_hash: b7e25308967a577aa1f05a4b5a745c26\n"
+    + "class.that.is.Empty -> a:\n"
     + "class.that.is.Empty$subclass -> b:\n"
     + "class.with.only.Fields -> c:\n"
     + "    int prim_type_field -> a\n"