diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-10 11:49:22 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-10 12:19:06 -0300 |
| commit | 297943b01e18bb3d1dd41a8d3e220811de25228b (patch) | |
| tree | 4938e643abada811d3ab28b14c0e31dc94ebda62 /src/cli/main.zig | |
| parent | db923fa823354270217362db06356f2b1a41315e (diff) | |
| download | computeranim-297943b01e18bb3d1dd41a8d3e220811de25228b.tar.gz computeranim-297943b01e18bb3d1dd41a8d3e220811de25228b.zip | |
ztrace probe: BPF on syscalls, scheduling, kprobes, uprobes and USDT
Programs built as instruction arrays for one process (no compiler, no
libbpf), writing Events into a BPF ring buffer; a drop counter in a map;
task_struct offsets from the kernel's BTF; a USDT probe's arguments read
in the kernel at the probe. Without CAP_BPF and CAP_PERFMON it says so;
--dry-run builds and lists everything. Tested offline by running the
programs in a small BPF machine, and for real by test-kernel-vm, which
boots this kernel in QEMU where we are root.
ztrace perf: moments are no longer cut per event unless --cut;
--max-size, and a full recording stops the target and says so.
perf.Sorted merges two backends' events by time.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Diffstat (limited to 'src/cli/main.zig')
| -rw-r--r-- | src/cli/main.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cli/main.zig b/src/cli/main.zig index 9e6b0e5..554efde 100644 --- a/src/cli/main.zig +++ b/src/cli/main.zig @@ -8,6 +8,7 @@ const commands = .{ .dbg = @import("dbg.zig"), .run = @import("run.zig"), .perf = @import("perf.zig"), + .probe = @import("probe.zig"), .dump = @import("dump.zig"), .show = @import("show.zig"), .cc = @import("cc.zig"), @@ -20,6 +21,7 @@ const usage = \\ dbg debug a program, recording it: step, break, look, go back \\ run record a program that carries a ring producer (agent, instrumentation) \\ perf record what the kernel sees of a program at full speed (perf events) + \\ probe ... with BPF programs on syscalls, scheduling, kprobes, uprobes, USDT (root) \\ dump print a recording's events \\ show print a recording's summary, or the program's state at a moment \\ cc compile a program with instrumentation that records it |
