Profile(3) OCaml library Profile(3)

# [NAME](#NAME)

Profile - Compiler performance recording

# [Module](#Module)

Module Profile

# [Documentation](#Documentation)

Module **Profile**  
: **sig end**

Compiler performance recording

Warning: this module is unstable and part of **Compiler\_libs** .

*type file* = **string**

*val reset* : **unit -&gt; unit**

erase all recorded profile information

*val record\_call* : **?accumulate:bool -&gt; string -&gt; (unit -&gt; 'a) -&gt; 'a**

**record\_call pass f** calls **f** and records its profile information.

*val record* : **?accumulate:bool -&gt; string -&gt; ('a -&gt; 'b) -&gt; 'a -&gt; 'b**

**record pass f arg** records the profile information of **f arg**

*type column* = **\[ \`Abs\_top\_heap | \`Alloc | \`Time | \`Top\_heap ]**

*val print* : **Format.formatter -&gt; column list -&gt; unit**

Prints the selected recorded profiling information to the formatter.

Command line flags

*val options\_doc* : **string**

*val all\_columns* : **column list**

A few pass names that are needed in several places, and shared to avoid typos.

*val generate* : **string**

*val transl* : **string**

*val typing* : **string**

2026-09-15 OCamldoc

---

Document: Profile(3o) from ocaml-4 4.14.4-r3 (Chainguard OS)
Source: https://github.com/ocaml/ocaml
