package ocaml-base-compiler

  1. Overview
  2. Docs
Official release 5.0.0

Install

Dune Dependency

Authors

Maintainers

Sources

5.0.0.tar.gz
sha256=72fa3d0ba19b82fcb9e6c62e0090b9d22e5905c4be0f94faf56904a9377a9e5b

doc/runtime_events/Runtime_events/Callbacks/index.html

Module Runtime_events.Callbacks

type t

Type of callbacks

val create : ?runtime_begin:(int -> Timestamp.t -> runtime_phase -> unit) -> ?runtime_end:(int -> Timestamp.t -> runtime_phase -> unit) -> ?runtime_counter:(int -> Timestamp.t -> runtime_counter -> int -> unit) -> ?alloc:(int -> Timestamp.t -> int array -> unit) -> ?lifecycle:(int -> Timestamp.t -> lifecycle -> int option -> unit) -> ?lost_events:(int -> int -> unit) -> unit -> t

Create a Callback that optionally subscribes to one or more runtime events. The first int supplied to callbacks is the ring buffer index. Each domain owns a single ring buffer for the duration of the domain's existence. After a domain terminates, a newly spawned domain may take ownership of the ring buffer. A runtime_begin callback is called when the runtime enters a new phase (e.g a runtime_begin with EV_MINOR is called at the start of a minor GC). A runtime_end callback is called when the runtime leaves a certain phase. The runtime_counter callback is called when a counter is emitted by the runtime. lifecycle callbacks are called when the ring undergoes a change in lifecycle and a consumer may need to respond. alloc callbacks are currently only called on the instrumented runtime. lost_events callbacks are called if the consumer code detects some unconsumed events have been overwritten.

OCaml

Innovation. Community. Security.