summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-10 12:42:11 -0300
committerGabriel Schneider <[email protected]>2026-11-10 13:05:43 -0300
commitd57e015249f48a746097138c1a0cfa9922ce8446 (patch)
tree7dda955e1e7dde9a1be9244566bdf6c3e87a206c /README.md
parent950d4c0373d19d905eb89a521ff3d4c1e9910dea (diff)
downloadcomputeranim-d57e015249f48a746097138c1a0cfa9922ce8446.tar.gz
computeranim-d57e015249f48a746097138c1a0cfa9922ce8446.zip
README: what V8 was run with and what it found
Diffstat (limited to 'README.md')
-rw-r--r--README.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/README.md b/README.md
index ecbe634..7ffdf28 100644
--- a/README.md
+++ b/README.md
@@ -120,6 +120,27 @@ memory and mappings share its parent's maps (its events are told apart by
thread); and pardes allocates through its own heaps, so `--alloc` sees only
what its C libraries ask of libc.
+And V8, as the test of scale: a release `d8` (74 MB, 46 threads, a JIT),
+on a script it runs in about 50 ms.
+
+| backend | what it did | time |
+| --- | --- | --- |
+| `ztrace record --syscalls` (ptrace) | 2 951 moments | 0.13 s |
+| `ztrace record --by insn --steps 2000000` | 2 million instructions, 96 MB (47 bytes a moment) | 9.4 s |
+| `ztrace record --by break -b malloc` | 1 753 stops | 0.12 s |
+| `ztrace dbg`, a breakpoint in `Heap::CollectGarbage` | an 18-frame backtrace through JIT code to `Shell::Main` | |
+| `ztrace perf --faults --sample 4000 --threads` | 784 million instructions, 10 669 faults, 474 samples | 0.07 s |
+| `ztrace run --preload ... --syscalls` | 2 900 syscalls, in the process | 0.06 s |
+| `ztrace run --preload ... --hook malloc` | 1 990 calls and returns | 0.07 s |
+
+V8 found what the small programs could not. Its JIT guards code with
+memory protection keys, and a signal handler starts with none of them: a
+compiler thread cloned from inside the agent's syscall handler could not
+read its own code space, and d8 died. The handlers now act with the
+thread's keys and float modes (`src/agent/signal.zig`). `--alloc` sees
+nothing in d8, which binds its own `malloc`: hook it instead. C++ names
+are shown and matched as the linker has them, mangled.
+
## Together
The backends are not modes to choose between: they feed one sink. A