TrackEvent: Add support for tracks
Track events are recorded on a timeline track, which can be attached to a
process (ProcessTrack) or a thread (ThreadTrack). Custom timelines can be
created using asynchronous tracks (see AsyncTrack), which can also optionally
be scoped to a thread or a process.
A track is represented by a uuid, which must be unique across the entire
recorded trace.
Async event example:
TRACE_EVENT_BEGIN("category", "AsyncEvent", perfetto::AsyncTrack(8086));
...
TRACE_EVENT_END("category", perfetto::AsyncTrack(8086));
Tracks can also be annotated with metadata:
perfetto::TrackEvent::SetAsyncTrackDescriptor(
track, [](perfetto::protos::gen::TrackDescriptor* desc) {
desc->set_name("MyAsyncTrack");
});
Bug: 132678367
Change-Id: I83c5300fe48ae2e9612942b2f73237fd67f948d3Perfetto is an open-source project for performance instrumentation and tracing of Linux/Android/Chrome platforms and user-space apps.
See www.perfetto.dev for docs.
See /docs/contributing.md for instructions.
The source-of-truth repo is Android's Gerrit. The GitHub repo is a read-only mirror.
You can reach us on our Discord channel. If you prefer using IRC we have an experimental Discord <> IRC bridge synced with #perfetto-dev on Freenode.