Skip to content

Tracing Pony Programs

The Pony runtime can be built to be able to either write a trace to file in the background or work in a “flight recorder” mode where events are stored into in memory circular buffers and written to stderr when the program crashes — a fatal signal such as SIGSEGV or SIGILL on Linux and macOS, or a fault such as an access violation on Windows.

Runtime tracing is helpful in understanding how the runtime works and for debugging issues with the runtime.

Traces are written in chromium json format and trace files can be viewed with the perfetto trace viewer.

Usage

A number of Pony runtime options are enabled when tracing is enabled. The details can be found by running <pony program> --ponyhelp (e.g.: ./helloworld --ponyhelp) and looking at the options that begin with --ponytracing* for how to enable and configure tracing.

Once a trace has been captured, it can be viewed with the perfetto trace viewer.

See also

  • Profiling Pony Programs — CPU profiling with perf, Instruments, and Callgrind. Different from runtime tracing: profiling shows where CPU time went, while tracing records runtime events like actor scheduling and GC.