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>
This commit is contained in:
Jens Axboe
2019-11-03 06:52:50 -07:00
parent 364b05fd06
commit 51c3ff62ca
2 changed files with 49 additions and 11 deletions

View File

@@ -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);
}