summaryrefslogtreecommitdiff
path: root/src/trace/perf.zig
Commit message (Collapse)AuthorAge
* kernel: on today's mainGabriel Schneider7 days
| | | | | | | | | | | Symbols come from Symbols (perf.lookup is gone), string ids from event.stringId, and ptrace.Process is used as it is now. A USDT semaphore of the program itself is raised by the tracer: the kernel's counter landed on the wrong word of a small lld-linked target, whose page of the file is mapped writable twice. test-kernel also runs the library tests of perf, usdt and bpf. Co-Authored-By: Claude Fable 5.2 <[email protected]>
* kernel: smaller BPF records, syscall tracepoints sorted out in place, the READMEGabriel Schneider7 days
| | | | | | | | | | | Syscall entries and kprobes send the event alone (a kernel function's registers are not the thread's; a syscall's are its arguments), a probe's event is not inherited (it failed the target's clone). The per-syscall tracepoints are told entry from exit on the events themselves, not on a second set. The VM has two CPUs and a time limit. README: the kernel's view, with what each mode costs. Co-Authored-By: Claude Fable 5.2 <[email protected]>
* ztrace probe: BPF on syscalls, scheduling, kprobes, uprobes and USDTGabriel Schneider7 days
| | | | | | | | | | | | | | | | 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]>
* ztrace perf: the kernel's view of a program, unprivilegedGabriel Schneider7 days
perf_event_open on a held child: counters, a sampling profile, every page fault with its registers, maps, threads, context switches, every syscall (the per-syscall tracepoints, the only ones open to a user), and the debug registers as watchpoints and breakpoints that do not stop the target. One time-ordered stream of Events into a Sink; --threads follows with a ring per CPU. usdt.zig: the notes of <sys/sdt.h> and their arguments from a Regs and a memory reader, independent of BPF. test-kernel runs all of it on targets/kernel_*. Co-Authored-By: Claude Fable 5.2 <[email protected]>