diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-11-03 06:52:50 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-11-04 07:07:52 -0700 |
commit | 51c3ff62cac635ae9d75f875ce5b7bdafc97abd5 (patch) | |
tree | 3e123b88c1a17500eabdf647cb40e863eda9c069 /fs/io_uring.c | |
parent | 364b05fd06e87e53dc03396f73afeac48d8e0998 (diff) | |
download | lwn-51c3ff62cac635ae9d75f875ce5b7bdafc97abd5.tar.gz lwn-51c3ff62cac635ae9d75f875ce5b7bdafc97abd5.zip |
io_uring: add completion trace event
We currently don't have a completion event trace, add one of those. And
to better be able to match up submissions and completions, add user_data
to the submission trace as well.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index a520c4262d85..7813bc7d5b61 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -592,6 +592,8 @@ static void io_cqring_fill_event(struct io_ring_ctx *ctx, u64 ki_user_data, { struct io_uring_cqe *cqe; + trace_io_uring_complete(ctx, ki_user_data, res); + /* * If we can't get a cq entry, userspace overflowed the * submission (by quite a lot). Increment the overflow count in @@ -2733,7 +2735,7 @@ out: s.has_user = *mm != NULL; s.in_async = true; s.needs_fixed_file = true; - trace_io_uring_submit_sqe(ctx, true, true); + trace_io_uring_submit_sqe(ctx, s.sqe->user_data, true, true); io_submit_sqe(ctx, &s, statep, &link); submitted++; } @@ -2913,7 +2915,7 @@ out: s.needs_fixed_file = false; s.ring_fd = ring_fd; submit++; - trace_io_uring_submit_sqe(ctx, true, false); + trace_io_uring_submit_sqe(ctx, s.sqe->user_data, true, false); io_submit_sqe(ctx, &s, statep, &link); } |