Tracing OCaml Programs
summary
A framework instruments OCaml with a two-stage PPX pipeline that marshals values into binary traces during the first build and uses type info in a second compiled pass to rebuild readable, typed values; tooling includes a command-line query like grab and a visualization similar to Magic Trace but with full argument/return values. The system records function call/return spans, lets users navigate back-and-forth through execution and step into higher-order calls, and limits overhead via fine-grained instrumentation configuration and separation of content from schema.
AI-written summary · about
chapters (7)
- 0:00Intro
- 0:20Debugging in OCaml today
- 2:41Type-aware record-and-replay debugging
- 6:24Instrumentation
- 7:51Typical ppx
- 11:23Tradeoffs
- 13:49Other debugging methods
related talks
27mCode execution as data with omni-trace
24mProbe: Program Traces as First Class State
35mbpftrace: Evolution from a command line tool to a complex observability framework
36mOpenTracing Project Deep Dive
16mPragmatic execution tracing
26mProfiling Mastery: Decode Your Data and Elevate Observability
44mObservability Tools C++: Beyond GDB and printf - Tools to Understand the Behavior of Your Program
46mPGTracer: A Tracing Tool for Postgres Backends
