package eio
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=3792e912bd8d494bb2e38f73081825e4d212b1970cf2c1f1b2966caa9fd6bc40
sha512=4a80dbcf8cf2663bdad0f2970871844f37bd293c56bd1ce602910e0a613754945f1f942719f9630906453be7c73c1732dc97526c6c90b0b36100d04fd5e871e4
doc/eio/Eio/Private/Trace/index.html
Module Private.Trace
Source
Trace Eio events using OCaml's runtime events system.
Each thread/fiber/promise is identified by a unique ID.
Recording events
Libraries and applications can use these functions to make the traces more useful.
log msg
attaches text msg
to the current fiber.
with_span op fn
runs fn ()
, labelling the timespan during which it runs with op
.
suspend_fiber op
records that the current fiber is now suspended waiting for op
.
Recording system events
These are normally only called by the scheduler.
create_fiber ~cc id
records the creation of fiber id
in context cc
.
create_cc id ty
records the creation of cancellation context id
.
create_obj id ty
records the creation of id
.
get src
records reading a promise, taking from a stream, taking a lock, etc.
try_get src
records that the current fiber wants to get from src
(which is not currently ready).
put dst
records resolving a promise, adding to a stream, releasing a lock, etc.
suspend_domain
records when the event loop is stopped waiting for events from the OS.
domain_spawn ~parent
records that the current domain was spawned by fiber parent
.
exit_cc ()
records that the current CC has finished.