Add some metadata to heap dumps.
This allows to see
* whether a process was profiled from startup.
* if a process was rejected because of a concurrent session.
* total number of unwinding errors. This is hard to extract from the
trace, so adding an explicit field so we can do sanity checks.
Bug: 129054982
Change-Id: Ibf8d4e0e105e0d781e3a3adcd4828127a40eb460
diff --git a/protos/perfetto/trace/perfetto_trace.proto b/protos/perfetto/trace/perfetto_trace.proto
index 98f0cd3..c44b7aa 100644
--- a/protos/perfetto/trace/perfetto_trace.proto
+++ b/protos/perfetto/trace/perfetto_trace.proto
@@ -2453,8 +2453,20 @@
}
repeated ProcessHeapSamples process_dumps = 5;
+ message ProcessStats { optional uint64 unwinding_errors = 1; }
+
message ProcessHeapSamples {
optional uint64 pid = 1;
+
+ // This process was profiled from startup.
+ // If false, this process was already running when profiling started.
+ optional bool from_startup = 3;
+
+ // This process was not profiled because a concurrent session was active.
+ // If this is true, samples will be empty.
+ optional bool rejected_concurrent = 4;
+ optional ProcessStats stats = 5;
+
repeated HeapSample samples = 2;
}