#
76e6ccd5 |
|
29-Aug-2017 |
Jeff Brown <jeffbrown@google.com> |
[trace] Port Fuchsia tracing system to Magenta. The Fuchsia tracing system supports instrumentation of userspace programs to collect trace records. This implementation consists of... - libtrace: a static library providing C and C++ instrumentation macros and functions designed to be linked into client programs - libtrace-engine: a shared library with a C ABI which manages global tracing state in the process and provides functions to write trace records - libtrace-provider: a static library which implements the TraceProvider FIDL interface and registers an instrumented program with the trace manager - libtrace-reader: a static library which provides a C++ API for reading binary trace data - unit tests - benchmarks - documentation This is almost a complete rewrite of the code formerly in //apps/tracing but it remains compatible with the trace format and preserves most of the structure of the trace event API. The main differences are... - The <trace/event.h> API uses identical syntax for C and C++ with a few extra goodies for C++ type inference. - The trace engine is factored out as a shared library with a C ABI instead of being written as a C++ static library, this makes it more suitable for instrumentation of libraries and device drivers. - The API is extensively documented. - We actually have benchmarks to measure instrumentation overhead. There are still a few pieces left in //apps/tracing, such as the trace manager and command-line tools, which will be moved over later. Change-Id: I2d2986be0e63e5aa21fe56dd03024490b0334214
|