diff options
| -rw-r--r-- | README.md | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -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 |
