diff mbox series

[RFC,4/8] io_uring: only make use generic struct io_uring_sqe elements for tracing

Message ID 0910d8ca0ab2894101e088bee685df87eaf351cb.1660291547.git.metze@samba.org (mailing list archive)
State New
Headers show
Series cleanup struct io_uring_sqe layout | expand

Commit Message

Stefan Metzmacher Aug. 12, 2022, 8:34 a.m. UTC
In the long run we might change the output, but for now just
prepare that defining IO_URING_SQE_HIDE_LEGACY would be possible.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
---
 include/trace/events/io_uring.h | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)
diff mbox series

Patch

diff --git a/include/trace/events/io_uring.h b/include/trace/events/io_uring.h
index c5b21ff0ac85..12ffbe4e69cc 100644
--- a/include/trace/events/io_uring.h
+++ b/include/trace/events/io_uring.h
@@ -520,28 +520,28 @@  TRACE_EVENT(io_uring_req_failed,
 		__field( u64,			addr3		)
 		__field( int,			error		)
 
-		__string( op_str, io_uring_get_opcode(sqe->opcode) )
+		__string( op_str, io_uring_get_opcode(sqe->hdr.opcode) )
 	),
 
 	TP_fast_assign(
 		__entry->ctx		= req->ctx;
 		__entry->req		= req;
-		__entry->user_data	= sqe->user_data;
-		__entry->opcode		= sqe->opcode;
-		__entry->flags		= sqe->flags;
-		__entry->ioprio		= sqe->ioprio;
-		__entry->off		= sqe->off;
-		__entry->addr		= sqe->addr;
-		__entry->len		= sqe->len;
-		__entry->op_flags	= sqe->poll32_events;
-		__entry->buf_index	= sqe->buf_index;
-		__entry->personality	= sqe->personality;
-		__entry->file_index	= sqe->file_index;
-		__entry->pad1		= sqe->__pad2[0];
-		__entry->addr3		= sqe->addr3;
+		__entry->user_data	= sqe->common.user_data;
+		__entry->opcode		= sqe->hdr.opcode;
+		__entry->flags		= sqe->hdr.flags;
+		__entry->ioprio		= sqe->hdr.ioprio;
+		__entry->off		= sqe->u64_ofs08;
+		__entry->addr		= sqe->u64_ofs16;
+		__entry->len		= sqe->u32_ofs24;
+		__entry->op_flags	= sqe->u32_ofs28;
+		__entry->buf_index	= sqe->common.buf_info;
+		__entry->personality	= sqe->common.personality;
+		__entry->file_index	= sqe->u32_ofs44;
+		__entry->pad1		= sqe->u64_ofs56;
+		__entry->addr3		= sqe->u64_ofs48;
 		__entry->error		= error;
 
-		__assign_str(op_str, io_uring_get_opcode(sqe->opcode));
+		__assign_str(op_str, io_uring_get_opcode(sqe->hdr.opcode));
 	),
 
 	TP_printk("ring %p, req %p, user_data 0x%llx, "