TrackEvent: Add support for arguments
This patch adds a way for client library users to inject custom arguments
into track events. The library still takes care of writing common track
event properties such as categories and titles; this new hook gives a way
to add add more arguments on top.
Example usage:
TRACE_EVENT_BEGIN("category", "Title", [](perfetto::TrackEventContext ctx) {
auto log = ctx->track_event()->set_log_message();
log->set_body_iid(...);
});
An upcoming patch will add a way to use interning with custom arguments like
these.
Bug: 132678367
Change-Id: Idb62d160647d037c3a2329c98d418fb53303ec65
diff --git a/Android.bp b/Android.bp
index e42c857..64f1ac3 100644
--- a/Android.bp
+++ b/Android.bp
@@ -4980,6 +4980,7 @@
"src/tracing/platform.cc",
"src/tracing/tracing.cc",
"src/tracing/track_event_category_registry.cc",
+ "src/tracing/track_event_context.cc",
"src/tracing/virtual_destructors.cc",
],
}