commit | 927cd761b36a1a5f930b9715982585676a658c4b | [log] [tgz] |
---|---|---|
author | Sami Kyostila <skyostil@chromium.org> | Tue Dec 01 17:09:14 2020 +0000 |
committer | Sami Kyostila <skyostil@chromium.org> | Tue Dec 01 17:09:14 2020 +0000 |
tree | 07646d944472d498536b07a18dc8e4f7f74fb03b | |
parent | 80cf70e2731050675fd83dee7e807559b370fdc0 [diff] |
tracing: Add interceptor support This patch introduces the concept of interceptors to the tracing SDK. Interceptors make it possible to divert tracing data (i.e., serialized trace packets) generated by a data source into a custom sink instead of the central tracing service. Potential use cases include: * Logging trace events to the console in real time. * Exporting trace events to Android ATrace. * Exporting trace events to Windows ETW. Intercepting works by creating special heap-backed trace writers for each data source that is being intercepted. The serialized data is passed in real time to the interceptor at the end of each trace point. Interceptors are enabled through a new field in the trace config: data_sources: { config { name: "track_event" interceptor_config: { name: "console" } } } Design doc: https://docs.google.com/document/d/1zIBGz7LvaucSb9B7UUWF24gDi6i3XFTGiuTi5Nf1czo Bug: 170628040 Change-Id: I776f9bb5e99a37155619ea20c56df339131db813
Perfetto is a production-grade open-source stack for performance instrumentation and trace analysis. It offers services and libraries and for recording system-level and app-level traces, native + java heap profiling, a library for analyzing traces using SQL and a web-based UI to visualize and explore multi-GB traces.
See https://perfetto.dev/docs or the /docs/ directory for documentation.