commit | 1eebf5ea25cb087e52e3984a42f93ac31078dc03 | [log] [tgz] |
---|---|---|
author | Sami Kyostila <skyostil@google.com> | Thu Oct 24 17:36:15 2019 +0100 |
committer | Sami Kyostila <skyostil@google.com> | Thu Oct 24 17:36:15 2019 +0100 |
tree | 2591a6639da2b8b039f953190432dae004a6cebf | |
parent | e8843ab060ace3825760ba24e55164440e58c93e [diff] |
TrackEvent: Add support for dynamically enabled tracing categories This patch introduces support for annotating track events with named tracing categories. Each category can be individually enabled or disabled using a trace config. The set of categories is defined at compile time using a macro: PERFETTO_DEFINE_CATEGORIES( PERFETTO_CATEGORY(cat1), PERFETTO_CATEGORY(cat2), PERFETTO_CATEGORY(cat3)); We also introduce a set of macros for efficiently emitting track events with category annotation: TRACE_EVENT_BEGIN("cat1", "EventName"); TRACE_EVENT_END(); The trace point implementation replaces the per-data source instance enable bitmap with a per-category bitmap in order to avoid doing any extra work for categories that aren't enabled for tracing. Bug: 132678367 Change-Id: I84cdb13fc2608a23f311f49a3402640c92199909
Perfetto 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.
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.