Merge "Add heap_graph table test."
diff --git a/test/trace_processor/heap_graph.textproto b/test/trace_processor/heap_graph.textproto
new file mode 100644
index 0000000..64cca48
--- /dev/null
+++ b/test/trace_processor/heap_graph.textproto
@@ -0,0 +1,50 @@
+packet {
+ process_tree {
+ processes {
+ pid: 1
+ ppid: 0
+ cmdline: "init"
+ }
+ processes {
+ pid: 2
+ ppid: 1
+ cmdline: "system_server"
+ }
+ }
+}
+packet {
+ trusted_packet_sequence_id: 999
+ timestamp: 10
+ heap_graph {
+ objects {
+ id: 0x01
+ type_id: 1
+ self_size: 64
+ reference_field_id: 1
+ reference_object_id: 2
+ }
+ objects {
+ id: 0x02
+ type_id: 2
+ self_size: 32
+ }
+ continued: true
+ index: 1
+ }
+ heap_graph {
+ type_names {
+ iid: 1
+ str: "FactoryProducerDelegateImplActor"
+ }
+ type_names {
+ iid: 2
+ str: "Foo"
+ }
+ field_names {
+ iid: 1
+ str: "FactoryProducerDelegateImplActor.foo"
+ }
+ continued: false
+ index: 2
+ }
+}
diff --git a/test/trace_processor/heap_graph_object.out b/test/trace_processor/heap_graph_object.out
new file mode 100644
index 0000000..fc3b7a4
--- /dev/null
+++ b/test/trace_processor/heap_graph_object.out
@@ -0,0 +1,3 @@
+"id","type","upid","graph_sample_ts","object_id","self_size","reference_set_id","type_name"
+0,"heap_graph_object",0,10,1,64,0,"FactoryProducerDelegateImplActor"
+1,"heap_graph_object",0,10,2,32,1,"Foo"
diff --git a/test/trace_processor/heap_graph_object.sql b/test/trace_processor/heap_graph_object.sql
new file mode 100644
index 0000000..2c4866f
--- /dev/null
+++ b/test/trace_processor/heap_graph_object.sql
@@ -0,0 +1 @@
+select * from heap_graph_object
diff --git a/test/trace_processor/heap_graph_reference.out b/test/trace_processor/heap_graph_reference.out
new file mode 100644
index 0000000..3be9676
--- /dev/null
+++ b/test/trace_processor/heap_graph_reference.out
@@ -0,0 +1,2 @@
+"id","type","reference_set_id","owner_id","owned_id","field_name"
+0,"heap_graph_reference",0,0,1,"FactoryProducerDelegateImplActor.foo"
diff --git a/test/trace_processor/heap_graph_reference.sql b/test/trace_processor/heap_graph_reference.sql
new file mode 100644
index 0000000..e0fe907
--- /dev/null
+++ b/test/trace_processor/heap_graph_reference.sql
@@ -0,0 +1 @@
+select * from heap_graph_reference
diff --git a/test/trace_processor/index b/test/trace_processor/index
index 3380c4f..7b9ef11 100644
--- a/test/trace_processor/index
+++ b/test/trace_processor/index
@@ -132,3 +132,6 @@
# sched_switch event doesn't start a slice). Six slices in this case.
../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_graph.textproto heap_graph_object.sql heap_graph_object.out
+heap_graph.textproto heap_graph_reference.sql heap_graph_reference.out