summaryrefslogtreecommitdiff
path: root/build.zig
Commit message (Collapse)AuthorAge
* trace: what the context draws is in the recording; SQLite on the ladderGabriel Schneider6 days
| | | | | | | | | | | | | | | | An instruction's string carries its source line and, for a direct call, how many parameters the callee takes (DWARF); telescope.frames gives each frame's extent on the stack; with --alloc the debugger watches each live allocation and the allocator's header before it, changes only, 256 KiB a stop at most. C++ names are shown and found as the source has them (the command links the C++ runtime for its demangler). SQLite 3.50.4 through every backend, measured (README, bench/sqlite.sh). It found two faults: a file compiled by its full path was recorded under a path joined onto the compile directory, and ztrace run noticed a target's exit up to 10 ms late. Co-Authored-By: Claude Fable 5.2 <[email protected]>
* context: disassembly, telescopes and names in every stop; strings as one tableGabriel Schneider6 days
| | | | | | | | | | | | | | | For a viewer to show what pwndbg's context shows, the debugger records it while the memory is there: each register and the top of the stack followed as pointers three deep (--telescope), every code address met named, eight instructions from the pc disassembled by capstone (built from source for x86, into the command only; pinned as in 03-codenomicom). zt.telescope reads a chain back with the kind of memory each link points into, and ztrace show prints the context, coloured on a terminal as pwndbg colours. The thirty thousand strings of a small run showed that a string map in each keyframe costs 700 bytes of tree a string: strings are now one table for the recording, appended a batch and read whole at open. fib(12) by instruction with everything on: 9 MB, 71 000 moments/s.
* ztrace perf takes the target's own ring: allocations among the page faultsGabriel Schneider6 days
| | | | | | --preload and --alloc on ztrace perf: what the agent says and what the kernel sees are merged by time into one recording (perf.Sorted, as probe merges BPF and perf). test-together runs a list under both.
* the backends together: a ring under the debugger, strings that do not collideGabriel Schneider6 days
| | | | | | | | | | | | ztrace record and dbg take --ring, --preload and --alloc: the target gets the ring ztrace run gives it, and the debugger drains it while the target runs (polling for the stop, so a full ring cannot hold both) and before it reports a stop. A program compiled by ztrace cc, with the agent preloaded, stopped at breakpoints, is one recording in order; test-together checks it. Recording such a program showed the debugger's file names and the pass's strings both counted from 1: event.stringId (a hash, top bit set) is now what every producer without a table of its own uses.
* build: C targets without UBSan, whose checks would be traced tooGabriel Schneider6 days
|
* canim is a package of its own, anim/: ztrace builds without sketchbook and ↵Gabriel Schneider6 days
| | | | pardes
* recorder: a moment is its events, state is at keyframesGabriel Schneider6 days
| | | | | | | | | | | | | | | | | | Folding every event into persistent state at every moment cost 750 bytes a step and 2 KB a scattered 8-byte write: the tree's path copied each time. Now a moment stores its events alone, in a compact code (a flags byte, varints, time as a difference, registers as the ones that changed), and the state (threads, memory, heap, variables, mappings, strings) is written at a keyframe a batch, sharing with the one before. A reader replays at most a batch over a keyframe, and keeps four positions replayed, so playing forward reads one moment a step. Of a memory write the recorder keeps the spans that differ from what it holds, so a region read again costs what changed in it. It stops at max_bytes (1 GiB). A step with registers: 749 bytes to 57. fib(12) by instruction, 142 000 moments: 111 MB to 8 MB, 197 000 moments/s. bench-store measures the rest.
* 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.