Add heap profiler test for jit frames

Bug: 144005499
Change-Id: I0a85a7c06d97b018803c0b57f6d8518baa3e6207
diff --git a/test/trace_processor/heap_profile_frames.sql b/test/trace_processor/heap_profile_frames.sql
new file mode 100644
index 0000000..9aa5b81
--- /dev/null
+++ b/test/trace_processor/heap_profile_frames.sql
@@ -0,0 +1 @@
+SELECT name, mapping, rel_pc FROM stack_profile_frame ORDER BY name;
diff --git a/test/trace_processor/heap_profile_jit.out b/test/trace_processor/heap_profile_jit.out
new file mode 100644
index 0000000..1235280
--- /dev/null
+++ b/test/trace_processor/heap_profile_jit.out
@@ -0,0 +1,3 @@
+"name","mapping","rel_pc"
+"java_frame_1",0,4096
+"java_frame_2",0,4096
diff --git a/test/trace_processor/heap_profile_jit.textproto b/test/trace_processor/heap_profile_jit.textproto
new file mode 100644
index 0000000..338fbbf
--- /dev/null
+++ b/test/trace_processor/heap_profile_jit.textproto
@@ -0,0 +1,81 @@
+packet {
+  process_tree {
+    processes {
+      pid: 1
+      ppid: 0
+      cmdline: "init"
+    }
+    processes {
+      pid: 2
+      ppid: 1
+      cmdline: "system_server"
+    }
+  }
+}
+packet {
+  trusted_packet_sequence_id: 999
+  previous_packet_dropped: true
+  incremental_state_cleared: true
+  timestamp: 10
+  profile_packet {
+    strings {
+      iid: 1
+      str: "java_frame_1"
+    }
+    strings {
+      iid: 2
+      str: "java_frame_2"
+    }
+    strings {
+      iid: 3
+      str: "jit-mapping"
+    }
+    strings {
+      iid: 4
+      str: "buildid"
+    }
+    frames {
+      iid: 1
+      function_name_id: 1
+      mapping_id: 1
+      rel_pc: 0x1000
+    }
+    frames {
+      iid: 2
+      function_name_id: 2
+      mapping_id: 1
+      rel_pc: 0x1000
+    }
+    callstacks {
+      iid: 1
+      frame_ids: 1
+    }
+    callstacks {
+      iid: 2
+      frame_ids: 2
+    }
+    mappings {
+      iid: 1
+      path_string_ids: 3
+      build_id: 4
+    }
+    process_dumps {
+      pid: 2
+      samples {
+        callstack_id: 1
+        self_allocated: 2000
+        self_freed: 1000
+        alloc_count: 2
+        free_count: 1
+      }
+      samples {
+        callstack_id: 2
+        self_allocated: 100
+        self_freed: 10
+        alloc_count: 10
+        free_count: 1
+      }
+    }
+  }
+}
+
diff --git a/test/trace_processor/index b/test/trace_processor/index
index a4b08dc..bf3c781 100644
--- a/test/trace_processor/index
+++ b/test/trace_processor/index
@@ -135,6 +135,8 @@
 ../data/sched_switch_original.pb sched_slices.sql sched_slices_sched_switch_original.out
 ../data/sched_switch_compact.pb sched_slices.sql sched_slices_sched_switch_compact.out
 
+heap_profile_jit.textproto heap_profile_frames.sql heap_profile_jit.out
+
 heap_graph.textproto heap_graph_object.sql heap_graph_object.out
 heap_graph.textproto heap_graph_reference.sql heap_graph_reference.out