Profile(3)

πŸŽ€ NAME πŸŽ€

Profile(3) β€” compiler performance recording, straight from the OCaml library. This is the Profile manual page, and we're gonna make it make sense πŸ’–.

🧚 Module 🧚

Module Profile

✨ Documentation ✨

The module signature is:

Module Profile
 : sig end

Compiler performance recording. That's the whole vibe of this module ✨.

Warning: this module is unstable and part of Compiler_libs. Like, be aware, bestie.
  • type file = string β€” the type is literally just string. No cap.
  • val reset : unit -> unit β€” erases all recorded profile information. Poof, gone πŸ’….
  • val record_call : ?accumulate:bool -> string -> (unit -> 'a) -> 'a β€” takes an optional ?accumulate:bool, a string pass name, and a (unit -> 'a) thunk. It calls f and records its profile information. Slay.
  • val record : ?accumulate:bool -> string -> ('a -> 'b) -> 'a -> 'b β€” takes an optional ?accumulate:bool, a string pass name, a function ('a -> 'b), and an arg. It records the profile information of f arg. Iconic.
  • type column β€” the exact type is type column = [ `Abs_top_heap | `Alloc | `Time | `Top_heap ] β€” those four tags are the possible columns 🫢.
  • val print : Format.formatter -> column list -> unit β€” prints the selected recorded profiling information to the formatter. Main character energy for your output ✨.
  • val options_doc : string β€” it's a string; that's all the manual gives us here, bestie.
  • val all_columns : column list β€” it's a column list; again, the type is the whole story πŸ”₯.

🌈 Command line flags 🌈

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

  • val generate : string β€” a string pass name.
  • val transl : string β€” a string pass name.
  • val typing : string β€” a string pass name.

Later, bestie 🫢 This page is from OCamldoc, dated 2026-06-22 β€” and yep, it's the Profile(3) page. πŸ’–

πŸ“¦ where this page comes from