Skip to documentation
SLOP

tiny.trace

Reference tiny.trace

Overview · API · Code relationships · Verification · Audit

Overview

The package records a run as a stream of events and replays that stream back into the program. A caller debugging a run that will not reproduce wants the run itself back, step for step, from a file. The recorder and replayer of events, running in one of three modes, off, record, or replay, is the session. Recording appends each event to the session's sink, and replaying compares each call against the next recorded event and fails when the two differ.

One recorded step of a run, carrying its kind, its timepoint, and the payload of that kind, is an event. The events cover session start and end, function entry and exit, safepoints, allocations and frees, bytes crossing a boundary, checkpoints, and a caller's own payloads. The function and site identifiers naming where in the program an event was taken are a safepoint. The thread, the epoch, and the sequence number that place an event in the recorded order are its timepoint. Every event carries a timepoint, so the recorded order survives the file. Replay follows the recorded stream alone, which leaves an input the program reads from its environment and the interleaving of its threads outside what a replay reproduces. A failed call leaves the sequence, the replay cursor, and the retained checkpoint as they were, so the same call can be retried.

A caller's hook set for copying its state out and staging, committing, or cancelling a restore of it is a checkpoint provider. A checkpoint provider copies a caller's state into a checkpoint event, and stages a restore that the session then commits or cancels. The header of a trace file, recording the build identity, the counts of events, bytes, chunks, and blocks, and the checksum over the events, is the manifest. The file opens with this manifest. The reader works inside buffers sized before the read, and the counts and the checksum are checked once the stream ends, so a truncated or altered file ends in an error.

Definitions

Types and contracts

Public types and contracts.

Namespaces

Public namespaces.

Code relationships

Direct static dependencies extracted from parsed source by semantic graph analysis.

Uses: tiny.bench, tiny.choir, tiny.coz, tiny.hypothesis, tiny.smg, tiny.sql, tiny.sys
Used by: tiny.bench, tiny.choir, tiny.closure, tiny.gif, tiny.gui, tiny.pdf, tiny.png, tiny.smg, tiny.sql, tiny.xkb, tiny.zen

Verification

No verification records are cataloged for this module in this build.

Audit

EvidenceValue
Sourcelib/trace/src/root.zig
Definitions0 of 38 documented
Members0 of 0 documented
Public names38 API, 349 indexed
Version26.7.0
Revisiondaab053ee433