package tracing
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=41b85b4f6972cc6ec4c98a9d65b32a840005ad212bcf49dfa732250b43392ad1
doc/tracing.tracing_probes/Tracing_probes/index.html
Module Tracing_probes
Source
High-speed global trace writing with timestamps for programs to record information for debugging and optimization as they run. Does some of the work up-front so that the writing path is as efficient as possible. The goal is for each event written (start and stop of a duration is two events) to take less than 10ns.
There are only fast paths for a limited set of events that are composed of only a header word, which can be easily pre-computed, and a timestamp word. Everything else can be written using the exposed global_writer
.
This is a separate library rather than part of Tracing_zero
so that it's possible to have tools which write trace data without creating a global trace writer. For example so a trace collector process wouldn't need to handle weird cases where it tries to connect to itself.
Signals that the program is done writing events and to flush all pending events
Many things don't have a special fast path, and can be written directly to the trace using this writer. Event arguments for probes must be written using Writer.Expert.Write_arg_unchecked
.
The thread ID that events are recorded to representing execution on the main thread
Represents a pre-computed event header that can be quickly written along with a hardware timestamp into the global trace.