Skip to content

Instantly share code, notes, and snippets.

View koonwen's full-sized avatar

Lee Koon Wen koonwen

View GitHub Profile
@koonwen
koonwen / bpftrace_uring_trace.bt
Last active April 9, 2024 12:54
Bpftrace program for strace-like monitoring of io-uring
BEGIN {
time("[%H:%M:%S]");
printf("Tracing IO_uring ...\n");
}
tracepoint:syscalls:sys_exit_io_uring_register {
@reads[probe] = count();
time("[%H:%M:%S]");
printf(" (%s) %s: %d, %ld\n", comm, probe, args->__syscall_nr, args->ret);