| commit | 4e9e0ef38aa2477ddbe656e197ed210b070f6ad1 | [log] [tgz] |
|---|---|---|
| author | Daniele Castagna <dcastagna@google.com> | Mon Mar 30 09:45:10 2020 -0400 |
| committer | Daniele Castagna <dcastagna@google.com> | Mon Mar 30 09:45:10 2020 -0400 |
| tree | 7f2e1740cf562127aaa8b3d8fdfef0cd9081f53e | |
| parent | 658779b63e6bb8170e7e9e064e86485124fa63c5 [diff] |
TrackEvent: Add entry point for track+timestamp+lambda
This patch introduces a new entry point for TRACE_EVENT and
TRACE_INSTANT that can be used to specify a new event with a
custom track, a custom timestamp and a lambda function.
This could be used to record events on different track
that are not happening on the CPU.
An example could be a vsync from a display:
TRACE_EVENT_INSTANT("display", "vsync",
perfetto::Track(890), timestamp,
[](perfetto::EventContext ctx){});
Bug: None
Test: PerfettoApiTest.TrackEventCustomTrackAndTimestamp
Change-Id: I6020f69f4ad6a6f09238fafc0573a5d9203d5df0Perfetto 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.