Last active
September 12, 2025 16:48
-
-
Save raphaelsc/00bc08843a7cbe7cee9a59b6255257b2 to your computer and use it in GitHub Desktop.
io_uring_slowpath.bt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bpftrace | |
| BEGIN | |
| { | |
| printf("tracing io_uring fast vs slow path...\n"); | |
| } | |
| tracepoint:io_uring:io_uring_submit_req | |
| { | |
| @submitted[comm] = count(); | |
| } | |
| tracepoint:io_uring:io_uring_queue_async_work | |
| { | |
| @slow_path[comm] = count(); | |
| } | |
| interval:s:5 | |
| { | |
| printf("\n-- io_uring stats (last 5s) --\n"); | |
| for ($kv : @submitted) { | |
| $submitted_sqe = @submitted[$kv.0]; | |
| $slow = @slow_path[$kv.0]; | |
| $fast = $submitted_sqe - $slow; | |
| printf("%s: total=%d, fast=%d, slow=%d\n", $kv.0, $submitted_sqe, $fast, $slow); | |
| } | |
| clear(@submitted); | |
| clear(@slow_path); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment