diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-10 23:36:18 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-10 23:55:42 -0300 |
| commit | 81d97a9e38c740a96af13a8a981878947a508bc0 (patch) | |
| tree | bbe53f2f4c195f378a5a8cb67dfac1277ac68c82 /anim/build.zig | |
| parent | 2a46b60e1d115ff5149a112bc0f800467c0efaee (diff) | |
| download | computeranim-81d97a9e38c740a96af13a8a981878947a508bc0.tar.gz computeranim-81d97a9e38c740a96af13a8a981878947a508bc0.zip | |
canim: quieter marks, the stack's roles, the loupe, arcs, the minimap, the map and the dive
From the user's notes on the second videos. The current row is a white
wash, a strike a softened vermilion, held a turned corner. A stack row
has its offset from rsp and its role from the tracer (a saved register,
a local by name, argc and argv). The loupe is the telescope as a floating
panel: the memory round what a pointer leads to, a pointer inside it
opening the next. A pointer to a row of its own panel is an arc in a
lane, in dumps, loupes and the stack. Every scene has the minimap; the
map is the same moment with every panel at full length on 3840 by 2160,
and the list opens on it and dives to the working frame, each panel
travelling to its place. Recordings hold more round each stop.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
Diffstat (limited to 'anim/build.zig')
| -rw-r--r-- | anim/build.zig | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/anim/build.zig b/anim/build.zig index 29a4b05..21abbce 100644 --- a/anim/build.zig +++ b/anim/build.zig @@ -74,6 +74,12 @@ pub fn build(b: *std.Build) void { alloc: bool = false, /// A file of tools/ it reads, by its bare name. reads: ?[]const u8 = null, + /// Bytes of stack above rsp each stop records. An instrumented + /// program's runtime reads the clock through the vDSO, whose retry + /// loop is stepped: with 512 or more the loop seldom gets through + /// (`list` took 27 000 to 42 000 moments at 512, and 0.3 to 1.6 + /// million at 1024, against 3 900 at 256), so those take 256. + stack: []const u8 = "1024", }; for ([_]Recording{ .{ .name = "steps", .source = "fib.c", .by = "insn" }, @@ -83,8 +89,8 @@ pub fn build(b: *std.Build) void { // are told by the instrumentation (each a call into its runtime, // stepped like any other); `list` starts at `reverse`, its pushes // (the agent's and the runtime's first calls) run through. - .{ .name = "sort", .source = "sort.c", .by = "insn", .instr = "vars", .only = "sort,a", .from = "main" }, - .{ .name = "list", .source = "list.c", .by = "insn", .instr = "vars", .only = "push,reverse,head", .from = "reverse", .alloc = true }, + .{ .name = "sort", .source = "sort.c", .by = "insn", .instr = "vars", .only = "sort,a", .from = "main", .stack = "256" }, + .{ .name = "list", .source = "list.c", .by = "insn", .instr = "vars", .only = "push,reverse,head", .from = "reverse", .alloc = true, .stack = "256" }, }) |r| { const source = b.path(b.fmt("tools/{s}", .{r.source})); var program: std.Build.LazyPath = undefined; @@ -115,7 +121,11 @@ pub fn build(b: *std.Build) void { if (r.reads) |name| _ = where.addCopyFile(b.path(b.fmt("tools/{s}", .{name})), name); const run = b.addSystemCommand(&.{ "env", "-i", "setarch", "-R" }); run.addArtifactArg(ztrace); - run.addArgs(&.{ "record", "--by", r.by, "--stack", "256", "-s", "64" }); + // More round each stop than the working frame shows: the map of + // the whole context wants the words of the stack, 256 bytes round + // what a pointer leads to and what a step touches, and 69 + // instructions round the pc. + run.addArgs(&.{ "record", "--by", r.by, "--stack", r.stack, "--around", "256", "--disasm", "69", "-s", "64" }); if (r.from) |place| run.addArgs(&.{ "--from", place }); // What an instrumented program tells of itself comes through a ring. if (r.instr != null) run.addArg("--ring"); @@ -167,7 +177,7 @@ pub fn build(b: *std.Build) void { \\trap 'rm -rf "$d"' EXIT \\cp "$program" "$d/sqlite" \\cd "$d" - \\env -i setarch -R "$ztrace" record --by break -b sqlite3_step -b sqlite3BtreeInsert -b unixWrite -b "*$back" --stack 512 -s 4096 -o "$out" -- ./sqlite + \\env -i setarch -R "$ztrace" record --by break -b sqlite3_step -b sqlite3BtreeInsert -b unixWrite -b "*$back" --stack 1024 --around 256 --disasm 69 -s 4096 -o "$out" -- ./sqlite }); run.addArtifactArg(ztrace); run.addFileArg(program); |
