summaryrefslogtreecommitdiff
path: root/stdlib/gc.ml
diff options
context:
space:
mode:
authorEnguerrand Decorne <decorne.en@gmail.com>2019-11-15 13:52:35 +0100
committerEnguerrand Decorne <decorne.en@gmail.com>2020-04-30 10:32:01 +0200
commitb7f0494df52f758f88b723b881a606660f4672cc (patch)
treef8d0872ec8c88dc47d37009e9b4008f4907dae1c /stdlib/gc.ml
parenta9f7d74bcf332ffc18d394b5c6af30a1a74d01ab (diff)
downloadocaml-b7f0494df52f758f88b723b881a606660f4672cc.tar.gz
Rewrite the instrumented runtime to store traces in the CTF format.
The instrumentation code in the instrumented runtime was replaced with new APIs to gather runtime statistics and output them in a new format (Common Trace Format). This commit also exposes new functions in the Gc module to pause or resume instrumentation during a program execution (Gc.eventlog_pause and Gc.eventlog_resume).
Diffstat (limited to 'stdlib/gc.ml')
-rw-r--r--stdlib/gc.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/stdlib/gc.ml b/stdlib/gc.ml
index 52433ca432..9a5c004e64 100644
--- a/stdlib/gc.ml
+++ b/stdlib/gc.ml
@@ -63,6 +63,8 @@ external get_minor_free : unit -> int = "caml_get_minor_free"
external get_bucket : int -> int = "caml_get_major_bucket" [@@noalloc]
external get_credit : unit -> int = "caml_get_major_credit" [@@noalloc]
external huge_fallback_count : unit -> int = "caml_gc_huge_fallback_count"
+external eventlog_pause : unit -> unit = "caml_eventlog_pause"
+external eventlog_resume : unit -> unit = "caml_eventlog_resume"
open Printf