History

io_uring: add tracing for additional CQE32 fields

This adds tracing for the extra1 and extra2 fields.

Stefan Roesch committed 4 years ago

Commit c4bb9641 parent e45a3e02 files · +20 −9Browse files

Showing the changes to include (1 of 2 files). Show all

Unified · Split

include/trace/events/io_uring.h+14−4
@@ -321,13 +321,16 @@ TRACE_EVENT(io_uring_fail_link, · 320 unmodified lines
321321 * @user_data: user data associated with the request
322322 * @res: result of the request
323323 * @cflags: completion flags
324+ * @extra1: extra 64-bit data for CQE32
325+ * @extra2: extra 64-bit data for CQE32
324326 *
325327 */
326328 TRACE_EVENT(io_uring_complete,
327329
328− TP_PROTO(void *ctx, void *req, u64 user_data, int res, unsigned cflags),
330+ TP_PROTO(void *ctx, void *req, u64 user_data, int res, unsigned cflags,
331+ u64 extra1, u64 extra2),
329332
330− TP_ARGS(ctx, req, user_data, res, cflags),
333+ TP_ARGS(ctx, req, user_data, res, cflags, extra1, extra2),
331334
332335 TP_STRUCT__entry (
333336 __field( void *, ctx )
@@ -335,6 +338,8 @@ TRACE_EVENT(io_uring_complete, · 1 unmodified line
335338 __field( u64, user_data )
336339 __field( int, res )
337340 __field( unsigned, cflags )
341+ __field( u64, extra1 )
342+ __field( u64, extra2 )
338343 ),
339344
340345 TP_fast_assign(
@@ -343,12 +348,17 @@ TRACE_EVENT(io_uring_complete, · 2 unmodified lines
343348 __entry->user_data = user_data;
344349 __entry->res = res;
345350 __entry->cflags = cflags;
351+ __entry->extra1 = extra1;
352+ __entry->extra2 = extra2;
346353 ),
347354
348− TP_printk("ring %p, req %p, user_data 0x%llx, result %d, cflags 0x%x",
355+ TP_printk("ring %p, req %p, user_data 0x%llx, result %d, cflags 0x%x "
356+ "extra1 %llu extra2 %llu ",
349357 __entry->ctx, __entry->req,
350358 __entry->user_data,
351− __entry->res, __entry->cflags)
359+ __entry->res, __entry->cflags,
360+ (unsigned long long) __entry->extra1,
361+ (unsigned long long) __entry->extra2)
352362 );
353363
354364 /**