package tracing

  1. Overview
  2. Docs
Tracing library

Install

Dune Dependency

Authors

Maintainers

Sources

tracing-v0.15.0.tar.gz
sha256=41b85b4f6972cc6ec4c98a9d65b32a840005ad212bcf49dfa732250b43392ad1

doc/tracing.tracing_probes/Tracing_probes/index.html

Module Tracing_probesSource

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.

Sourceval set_destination : (module Tracing_zero.Writer.Expert.Destination) -> unit
Sourceval close : unit -> unit

Signals that the program is done writing events and to flush all pending events

Sourceval global_writer : Tracing_zero.Writer.t

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

Sourcemodule Event : sig ... end

Represents a pre-computed event header that can be quickly written along with a hardware timestamp into the global trace.

Sourcemodule For_testing : sig ... end
OCaml

Innovation. Community. Security.