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
321 * @user_data: user data associated with the request321 * @user_data: user data associated with the request
322 * @res: result of the request322 * @res: result of the request
323 * @cflags: completion flags323 * @cflags: completion flags
324 * @extra1: extra 64-bit data for CQE32
325 * @extra2: extra 64-bit data for CQE32
324 *326 *
325 */327 */
326TRACE_EVENT(io_uring_complete,328TRACE_EVENT(io_uring_complete,
327 329
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),
329 332
330 TP_ARGS(ctx, req, user_data, res, cflags),333 TP_ARGS(ctx, req, user_data, res, cflags, extra1, extra2),
331 334
332 TP_STRUCT__entry (335 TP_STRUCT__entry (
333 __field( void *, ctx )336 __field( void *, ctx )
@@ -335,6 +338,8 @@ TRACE_EVENT(io_uring_complete, · 1 unmodified line
335 __field( u64, user_data )338 __field( u64, user_data )
336 __field( int, res )339 __field( int, res )
337 __field( unsigned, cflags )340 __field( unsigned, cflags )
341 __field( u64, extra1 )
342 __field( u64, extra2 )
338 ),343 ),
339 344
340 TP_fast_assign(345 TP_fast_assign(
@@ -343,12 +348,17 @@ TRACE_EVENT(io_uring_complete, · 2 unmodified lines
343 __entry->user_data = user_data;348 __entry->user_data = user_data;
344 __entry->res = res;349 __entry->res = res;
345 __entry->cflags = cflags;350 __entry->cflags = cflags;
351 __entry->extra1 = extra1;
352 __entry->extra2 = extra2;
346 ),353 ),
347 354
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 ",
349 __entry->ctx, __entry->req,357 __entry->ctx, __entry->req,
350 __entry->user_data,358 __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)
352);362);
353 363
354/**364/**