<feed xmlns='http://www.w3.org/2005/Atom'>
<title>computeranim.git/src/trace/store.zig, branch main</title>
<subtitle>Tracing debugger and animations of running programs (ztrace, canim)</subtitle>
<id>https://git.0x4200.cafe/computeranim.git/atom?h=main</id>
<link rel='self' href='https://git.0x4200.cafe/computeranim.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/computeranim.git/'/>
<updated>2026-11-13T03:41:47Z</updated>
<entry>
<title>debugger: add a native GUI with live V8 JIT debugging</title>
<updated>2026-11-13T03:41:47Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-12T16:19:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/computeranim.git/commit/?id=4b4113a0217ee27c78e7efddb66ff5a455d49083'/>
<id>urn:sha1:4b4113a0217ee27c78e7efddb66ff5a455d49083</id>
<content type='text'>
</content>
</entry>
<entry>
<title>trace: the call chain by the unwind tables; what each word of the stack is</title>
<updated>2026-11-11T02:04:17Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-11T01:51:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/computeranim.git/commit/?id=b4ab1d770edb06d3eeebfd290bbf97725e55b7fa'/>
<id>urn:sha1:b4ab1d770edb06d3eeebfd290bbf97725e55b7fa</id>
<content type='text'>
backtrace and frames follow .debug_frame or .eh_frame where there is
one (PLT entries expanded into exact rows) and the frame pointer where
there is none: the caller is no longer lost in a prologue, in a function
that keeps no frame, in a PLT entry or inside libc's syscall wrappers.
Against gdb: the same chains on fib and on SQLite, where the old walk
lost __sbrk and unixSync.

A recording holds, once a function, its unwind rows and its locals on
the stack (DW_OP_fbreg, with the block each lives in), and the process's
first stack pointer. telescope.slots says of each word what it is: a
saved register and which, a return address, a local by name, argc, argv,
envp, auxv. Four bytes a moment on the list by instruction, and no
slower.

Co-Authored-By: Claude Fable 5.2 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
</content>
</entry>
<entry>
<title>context: disassembly, telescopes and names in every stop; strings as one table</title>
<updated>2026-11-10T17:12:08Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-10T16:36:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/computeranim.git/commit/?id=02aa51a6f54235cf18e627dbbfe21f21e502eb0b'/>
<id>urn:sha1:02aa51a6f54235cf18e627dbbfe21f21e502eb0b</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>recorder: a keyframe every 4096 moments, measured on Lua</title>
<updated>2026-11-10T15:37:33Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-10T15:30:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/computeranim.git/commit/?id=c0f5bd34d0f5339626d2c28c4012db7be46b55f3'/>
<id>urn:sha1:c0f5bd34d0f5339626d2c28c4012db7be46b55f3</id>
<content type='text'>
Lua 5.4 through ztrace cc with everything instrumented, on a ten-line
script: 3.2 million moments, and at a keyframe every 256 the keyframes
were half of its 304 MB. At 4096 it is 156 MB and records in 1.7 s
instead of 3.9; a seek to any moment is a millisecond on average, three at
worst, and reading in order 6 µs a moment. The README has the table.
</content>
</entry>
<entry>
<title>recorder: a moment is its events, state is at keyframes</title>
<updated>2026-11-10T14:47:26Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-10T14:46:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/computeranim.git/commit/?id=5f1f95098611b077bd7e0ca27283fa0e02d1adbc'/>
<id>urn:sha1:5f1f95098611b077bd7e0ca27283fa0e02d1adbc</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>recorder: moments in batches, and the heap, the stack, variables, lines and mappings in each</title>
<updated>2026-11-10T14:19:14Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-10T14:19:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/computeranim.git/commit/?id=8d91ecf978b99a79e3ff237cda14daa3d666509f'/>
<id>urn:sha1:8d91ecf978b99a79e3ff237cda14daa3d666509f</id>
<content type='text'>
A transaction a moment cost 10 µs and 1 KB before the moment's own data:
the list's path copied each time. Moments now gather 256 to a transaction,
each frozen by its own cursor so the list grows in place, and a thread's
fields sit in the moment's map instead of two maps down: a small moment is
284 bytes and 1 µs, an instruction step with registers 780 bytes.

A moment also folds alloc/free into the live heap, call/ret into each
thread's stack, variable into the live variables (a local leaves with its
call), line, and map/unmap, so a viewer reads any of them at any moment
without replaying.
</content>
</entry>
<entry>
<title>ztrace: the event, the ring, the recording, a ptrace loop</title>
<updated>2026-11-10T14:08:49Z</updated>
<author>
<name>Gabriel Schneider</name>
<email>gbrls@0x4200.cafe</email>
</author>
<published>2026-11-10T14:08:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0x4200.cafe/computeranim.git/commit/?id=0b29354e1ddf6cf75ac4c426a00dd3435ace5069'/>
<id>urn:sha1:0b29354e1ddf6cf75ac4c426a00dd3435ace5069</id>
<content type='text'>
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.
</content>
</entry>
</feed>
