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/trace/root.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/trace/root.zig')
| -rw-r--r-- | src/trace/root.zig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/trace/root.zig b/src/trace/root.zig index 80745cb..62a7a90 100644 --- a/src/trace/root.zig +++ b/src/trace/root.zig @@ -20,6 +20,8 @@ pub const host = @import("host.zig"); pub const perf = @import("perf.zig"); /// Static probes (the ELF notes of <sys/sdt.h>) and their arguments. pub const usdt = @import("usdt.zig"); +/// The kernel's view, privileged: BPF on tracepoints, kprobes, uprobes, USDT. +pub const bpf = @import("bpf.zig"); test { _ = event; @@ -33,4 +35,5 @@ test { _ = host; _ = perf; _ = usdt; + _ = bpf; } |
