mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-18 16:46:41 -05:00
10 lines
4.4 KiB
HTML
10 lines
4.4 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Callbacks (ocaml.Runtime_events.Callbacks)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">ocaml</a> » <a href="../index.html">Runtime_events</a> » Callbacks</nav><header class="odoc-preamble"><h1>Module <code><span>Runtime_events.Callbacks</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div><div class="spec-doc"><p>Type of callbacks</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||
<span><span class="optlabel">?runtime_begin</span>:<span>(<span>int <span class="arrow">-></span></span> <span><a href="../Timestamp/index.html#type-t">Timestamp.t</a> <span class="arrow">-></span></span> <span><a href="../index.html#type-runtime_phase">runtime_phase</a> <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span>
|
||
<span><span class="optlabel">?runtime_end</span>:<span>(<span>int <span class="arrow">-></span></span> <span><a href="../Timestamp/index.html#type-t">Timestamp.t</a> <span class="arrow">-></span></span> <span><a href="../index.html#type-runtime_phase">runtime_phase</a> <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span>
|
||
<span><span class="optlabel">?runtime_counter</span>:<span>(<span>int <span class="arrow">-></span></span> <span><a href="../Timestamp/index.html#type-t">Timestamp.t</a> <span class="arrow">-></span></span> <span><a href="../index.html#type-runtime_counter">runtime_counter</a> <span class="arrow">-></span></span> <span>int <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span>
|
||
<span><span class="optlabel">?alloc</span>:<span>(<span>int <span class="arrow">-></span></span> <span><a href="../Timestamp/index.html#type-t">Timestamp.t</a> <span class="arrow">-></span></span> <span><span>int array</span> <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span>
|
||
<span><span class="optlabel">?lifecycle</span>:<span>(<span>int <span class="arrow">-></span></span> <span><a href="../Timestamp/index.html#type-t">Timestamp.t</a> <span class="arrow">-></span></span> <span><a href="../index.html#type-lifecycle">lifecycle</a> <span class="arrow">-></span></span> <span><span>int option</span> <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span>
|
||
<span><span class="optlabel">?lost_events</span>:<span>(<span>int <span class="arrow">-></span></span> <span>int <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span>
|
||
<span>unit <span class="arrow">-></span></span>
|
||
<a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Create a <code>Callback</code> 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 <code>runtime_begin</code> 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 <code>runtime_end</code> callback is called when the runtime leaves a certain phase. The <code>runtime_counter</code> callback is called when a counter is emitted by the runtime. <code>lifecycle</code> callbacks are called when the ring undergoes a change in lifecycle and a consumer may need to respond. <code>alloc</code> callbacks are currently only called on the instrumented runtime. <code>lost_events</code> callbacks are called if the consumer code detects some unconsumed events have been overwritten.</p></div></div></div></body></html>
|