io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Metzmacher <metze@samba.org>
To: io-uring@vger.kernel.org, axboe@kernel.dk
Cc: Stefan Metzmacher <metze@samba.org>
Subject: [RFC PATCH 4/8] io_uring: only make use generic struct io_uring_sqe elements for tracing
Date: Fri, 12 Aug 2022 10:34:28 +0200	[thread overview]
Message-ID: <0910d8ca0ab2894101e088bee685df87eaf351cb.1660291547.git.metze@samba.org> (raw)
In-Reply-To: <cover.1660291547.git.metze@samba.org>

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 --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, "
-- 
2.34.1


  parent reply	other threads:[~2022-08-12  8:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12  8:34 [RFC PATCH 0/8] cleanup struct io_uring_sqe layout Stefan Metzmacher
2022-08-12  8:34 ` [RFC PATCH 1/8] io_uring: move the current struct io_uring_sqe members to legacy sub struct Stefan Metzmacher
2022-08-12  8:34 ` [RFC PATCH 2/8] io_uring: add a generic structure for struct io_uring_sqe Stefan Metzmacher
2022-08-12  8:34 ` [RFC PATCH 3/8] io_uring: check legacy layout of struct io_uring_sqe with BUILD_BUG_SQE_LEGACY* Stefan Metzmacher
2022-08-12  8:34 ` Stefan Metzmacher [this message]
2022-08-12  8:34 ` [RFC PATCH 5/8] io_uring: only access generic struct io_uring_sqe elements in io_uring.c Stefan Metzmacher
2022-08-12  8:34 ` [RFC PATCH 6/8] io_uring: add BUILD_BUG_SQE_HDR_COMMON() macro Stefan Metzmacher
2022-08-12  8:34 ` [RFC PATCH 7/8] io_uring: introduce struct io_uring_sqe_rw for all io_prep_rw() using opcodes Stefan Metzmacher
2022-08-12  8:34 ` [RFC PATCH 8/8] io_uring: introduce struct io_uring_sqe_{fsync,sfr,fallocate} Stefan Metzmacher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0910d8ca0ab2894101e088bee685df87eaf351cb.1660291547.git.metze@samba.org \
    --to=metze@samba.org \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).