diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-10 12:28:33 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-10 12:30:52 -0300 |
| commit | 8ac0639bfc0186acedb11759432a2cfa277193f2 (patch) | |
| tree | 5a20795dae8c3f33d0c61ff6401887165da8ba2f /README.md | |
| parent | 952af9711cc6a4de987a9d9d45e1e36721c5b470 (diff) | |
| download | computeranim-8ac0639bfc0186acedb11759432a2cfa277193f2.tar.gz computeranim-8ac0639bfc0186acedb11759432a2cfa277193f2.zip | |
static probes from the debugger: -b usdt:PROVIDER:NAME, no root
Debugger.usdt arms the USDT probes of every mapped module as breakpoints
whose hook records a probe event with its arguments and lets the program
run on, raising a probe's semaphore first; record and dbg take
usdt:PROVIDER:NAME (* for any), running the loader through when the probe
is a library's. glibc's own 78 probes are there for the asking:
memory_sbrk_more shows malloc growing the heap.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -109,6 +109,12 @@ ztrace perf --faults --syscalls --alloc --preload zig-out/lib/libztrace-agent.so zig build test-together ``` +Static probes (USDT, DTrace's) need neither BPF nor root this way: `ztrace +record --by break -b 'usdt:libc:*' -- ./prog` arms each probe as a +breakpoint that records a `probe` event with its arguments and runs on. +glibc ships 78 of them (`memory_sbrk_more`, `setjmp`, `lll_lock_wait`...); +`<sys/sdt.h>` puts your own into a program. + `--ring` (implied by `--preload` and `--alloc`) gives a target under ptrace the ring `ztrace run` gives it; the debugger drains it while the target runs and before it reports a stop. The agent's hooks and syscall |
