protos: Add support for counters in TrackEvent
Adds a generic way to describe counter tracks and supply counter values
in TrackEvents.
We support two types of counters: built-in (e.g. thread time,
instruction count) and custom user-specified. Counter values can be
provided in separate TrackEvents of TYPE_COUNTER, or attached to other
slice-type TrackEvents (i.e. at beginning/end of a slice).
Delta-encoding of counter values is also supported.
This will enable us to support TRACE_COUNTER macros in the client
library as well as experiment with more per-event counters in Chrome
(see crrev.com/c/1940179 for related discussion about the latter).
Design doc:
https://docs.google.com/document/d/1yL-OIm6k7IyjZ9xWkwcyA1F_4i6_uJj63qmEVTWCg_U/edit?usp=sharing
Bug: 123864183
Change-Id: Icec416b8efbdd46b4bef04491c7a9bcfa74142f9
diff --git a/BUILD b/BUILD
index 1ea9b74..8a129c8 100644
--- a/BUILD
+++ b/BUILD
@@ -2491,6 +2491,7 @@
"protos/perfetto/trace/track_event/chrome_process_descriptor.proto",
"protos/perfetto/trace/track_event/chrome_thread_descriptor.proto",
"protos/perfetto/trace/track_event/chrome_user_event.proto",
+ "protos/perfetto/trace/track_event/counter_descriptor.proto",
"protos/perfetto/trace/track_event/debug_annotation.proto",
"protos/perfetto/trace/track_event/log_message.proto",
"protos/perfetto/trace/track_event/process_descriptor.proto",