summaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorDylan Yudaken <dylany@fb.com>2022-06-22 16:40:27 +0300
committerJens Axboe <axboe@kernel.dk>2022-07-25 03:39:15 +0300
commiteccd8801858f03a19a4d1f8fef27e3d6e17b21fd (patch)
tree05e3dcccae3a635e8e38b62ac55ffdfb24d39ae5 /include/trace
parent3a0c037b0e16e38cf5d36d2ebc259e0ae644aaf4 (diff)
downloadlinux-eccd8801858f03a19a4d1f8fef27e3d6e17b21fd.tar.xz
io_uring: add trace event for running task work
This is useful for investigating if task_work is batching Signed-off-by: Dylan Yudaken <dylany@fb.com> Link: https://lore.kernel.org/r/20220622134028.2013417-8-dylany@fb.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/io_uring.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/trace/events/io_uring.h b/include/trace/events/io_uring.h
index 3bc8dec9acaa..918e3a43e4b2 100644
--- a/include/trace/events/io_uring.h
+++ b/include/trace/events/io_uring.h
@@ -600,6 +600,36 @@ TRACE_EVENT(io_uring_cqe_overflow,
__entry->cflags, __entry->ocqe)
);
+/*
+ * io_uring_task_work_run - ran task work
+ *
+ * @tctx: pointer to a io_uring_task
+ * @count: how many functions it ran
+ * @loops: how many loops it ran
+ *
+ */
+TRACE_EVENT(io_uring_task_work_run,
+
+ TP_PROTO(void *tctx, unsigned int count, unsigned int loops),
+
+ TP_ARGS(tctx, count, loops),
+
+ TP_STRUCT__entry (
+ __field( void *, tctx )
+ __field( unsigned int, count )
+ __field( unsigned int, loops )
+ ),
+
+ TP_fast_assign(
+ __entry->tctx = tctx;
+ __entry->count = count;
+ __entry->loops = loops;
+ ),
+
+ TP_printk("tctx %p, count %u, loops %u",
+ __entry->tctx, __entry->count, __entry->loops)
+);
+
#endif /* _TRACE_IO_URING_H */
/* This part must be outside protection */