1Runtime_events.Callbacks(3) OCaml library Runtime_events.Callbacks(3)
2
3
4
6 Runtime_events.Callbacks - no description
7
9 Module Runtime_events.Callbacks
10
12 Module Callbacks
13 : sig end
14
15
16
17
18
19
20
21 type t
22
23
24 Type of callbacks
25
26
27
28 val create : ?runtime_begin:(int -> Runtime_events.Timestamp.t -> Run‐
29 time_events.runtime_phase -> unit) -> ?runtime_end:(int -> Run‐
30 time_events.Timestamp.t -> Runtime_events.runtime_phase -> unit) ->
31 ?runtime_counter:(int -> Runtime_events.Timestamp.t -> Run‐
32 time_events.runtime_counter -> int -> unit) -> ?alloc:(int -> Run‐
33 time_events.Timestamp.t -> int array -> unit) -> ?lifecycle:(int ->
34 Runtime_events.Timestamp.t -> Runtime_events.lifecycle -> int option ->
35 unit) -> ?lost_events:(int -> int -> unit) -> unit -> t
36
37 Create a Callback that optionally subscribes to one or more runtime
38 events. The first int supplied to callbacks is the ring buffer index.
39 Each domain owns a single ring buffer for the duration of the domain's
40 existence. After a domain terminates, a newly spawned domain may take
41 ownership of the ring buffer. A runtime_begin callback is called when
42 the runtime enters a new phase (e.g a runtime_begin with EV_MINOR is
43 called at the start of a minor GC). A runtime_end callback is called
44 when the runtime leaves a certain phase. The runtime_counter callback
45 is called when a counter is emitted by the runtime. lifecycle call‐
46 backs are called when the ring undergoes a change in lifecycle and a
47 consumer may need to respond. alloc callbacks are currently only
48 called on the instrumented runtime. lost_events callbacks are called
49 if the consumer code detects some unconsumed events have been overwrit‐
50 ten.
51
52
53
54
55
56OCamldoc 2023-07-20 Runtime_events.Callbacks(3)