package ocaml-solo5-cross-aarch64
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=00e5f51d0ce72f7517f3b2a7f910c572
sha512=91f349384a8864076c3d1b0ce3f4e94aa54900cf51e2471d21427bb25cbffac606bcd754fa545f4b2c4516ea2b0731cb580ab30bdf1911c9e47ee24d7c88c863
doc/runtime_events/Runtime_events/Callbacks/index.html
Module Runtime_events.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 ->
tCreate 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.
val add_user_event :
'a Type.t ->
(int -> Timestamp.t -> 'a User.t -> 'a -> unit) ->
t ->
tadd_user_event ty callback t extends t to additionally subscribe to user events of type ty. When such an event happens, callback is called with the corresponding event and payload.