summaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorStefan Roesch <shr@fb.com>2022-06-17 00:22:19 +0300
committerJens Axboe <axboe@kernel.dk>2022-07-25 03:39:32 +0300
commit1c849b481b3e4f8c36f297cd3aa88ef52a19cee9 (patch)
tree9a9e425148c5837aa780ac99d4f10d4cb72caba4 /include/trace
parente053aaf4da56cbf0afb33a0fda4a62188e2c0637 (diff)
downloadlinux-1c849b481b3e4f8c36f297cd3aa88ef52a19cee9.tar.xz
io_uring: Add tracepoint for short writes
This adds the io_uring_short_write tracepoint to io_uring. A short write is issued if not all pages that are required for a write are in the page cache and the async buffered writes have to return EAGAIN. Signed-off-by: Stefan Roesch <shr@fb.com> Link: https://lore.kernel.org/r/20220616212221.2024518-13-shr@fb.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/io_uring.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/trace/events/io_uring.h b/include/trace/events/io_uring.h
index 95a8cfaad15a..c5b21ff0ac85 100644
--- a/include/trace/events/io_uring.h
+++ b/include/trace/events/io_uring.h
@@ -630,6 +630,31 @@ TRACE_EVENT(io_uring_task_work_run,
__entry->tctx, __entry->count, __entry->loops)
);
+TRACE_EVENT(io_uring_short_write,
+
+ TP_PROTO(void *ctx, u64 fpos, u64 wanted, u64 got),
+
+ TP_ARGS(ctx, fpos, wanted, got),
+
+ TP_STRUCT__entry(
+ __field(void *, ctx)
+ __field(u64, fpos)
+ __field(u64, wanted)
+ __field(u64, got)
+ ),
+
+ TP_fast_assign(
+ __entry->ctx = ctx;
+ __entry->fpos = fpos;
+ __entry->wanted = wanted;
+ __entry->got = got;
+ ),
+
+ TP_printk("ring %p, fpos %lld, wanted %lld, got %lld",
+ __entry->ctx, __entry->fpos,
+ __entry->wanted, __entry->got)
+);
+
#endif /* _TRACE_IO_URING_H */
/* This part must be outside protection */