summaryrefslogtreecommitdiff
path: root/src/trace/Ring.zig
Commit message (Collapse)AuthorAge
* ring: a stale head is not a full ringGabriel Schneider6 days
| | | | | | | | | | | emit compared a head loaded earlier with a tail read later: when other producers reserved and the consumer consumed in between, the tail was past it and the subtraction underflowed. A panic in safe builds (the ring's own thread test aborted twice in 200 runs; a debug agent in a threaded target would die the same way), a spurious wait otherwise. Saturating: not full, and the exchange that follows fails and reloads. Co-Authored-By: Claude Fable 5.2 <[email protected]>
* ring: a producer waiting for room is woken at half empty, not at every recordGabriel Schneider6 days
| | | | | | | | A full ring made consumer and producer trade a futex wake for every record: 2.8 M events/s through ztrace run where the recorder alone does 12 M. One comparison in advance. Co-Authored-By: Claude Fable 5.2 <[email protected]>
* ring: each side reads the other's counter only when its own view is used upGabriel Schneider6 days
| | | | | | The consumer cached nothing and re-read head for every record, the producers tail: the two cache lines bounced on each event. From the LLVM runtime's profile: an event through the ring 65 ns to 29 ns.
* ring: a record larger than the ring is dropped and counted, not asserted onGabriel Schneider6 days
|
* ztrace: the event, the ring, the recording, a ptrace loopGabriel Schneider6 days
One 64-byte Event for every backend; a shared-memory ring from target to tracer with stop/resume; a Recorder that folds events into xitdb moments (registers, memory in 64-byte chunks with known-byte masks, strings) and a Trace that reads any moment back; a minimal ptrace Process; ztrace record, run and dump. Per-area build files so the areas grow apart.