This adds tracing for the extra1 and extra2 fields.
Unified · Split
| @@ -2348,7 +2348,7 @@ static inline bool __io_fill_cqe_req_filled(struct io_ring_ctx *ctx, · 2347 unmodified lines | ||
| 2348 | 2348 | struct io_uring_cqe *cqe; |
| 2349 | 2349 | |
| 2350 | 2350 | trace_io_uring_complete(req->ctx, req, req->cqe.user_data, |
| 2351 | − req->cqe.res, req->cqe.flags); | |
| 2351 | + req->cqe.res, req->cqe.flags, 0, 0); | |
| 2352 | 2352 | |
| 2353 | 2353 | /* |
| 2354 | 2354 | * If we can't get a cq entry, userspace overflowed the |
| @@ -2372,7 +2372,7 @@ static inline bool __io_fill_cqe32_req_filled(struct io_ring_ctx *ctx, · 17 unmodified lines | ||
| 2372 | 2372 | u64 extra2 = req->extra2; |
| 2373 | 2373 | |
| 2374 | 2374 | trace_io_uring_complete(req->ctx, req, req->cqe.user_data, |
| 2375 | − req->cqe.res, req->cqe.flags); | |
| 2375 | + req->cqe.res, req->cqe.flags, extra1, extra2); | |
| 2376 | 2376 | |
| 2377 | 2377 | /* |
| 2378 | 2378 | * If we can't get a cq entry, userspace overflowed the |
| @@ -2393,7 +2393,7 @@ static inline bool __io_fill_cqe32_req_filled(struct io_ring_ctx *ctx, · 14 unmodified lines | ||
| 2393 | 2393 | |
| 2394 | 2394 | static inline bool __io_fill_cqe_req(struct io_kiocb *req, s32 res, u32 cflags) |
| 2395 | 2395 | { |
| 2396 | − trace_io_uring_complete(req->ctx, req, req->cqe.user_data, res, cflags); | |
| 2396 | + trace_io_uring_complete(req->ctx, req, req->cqe.user_data, res, cflags, 0, 0); | |
| 2397 | 2397 | return __io_fill_cqe(req->ctx, req->cqe.user_data, res, cflags); |
| 2398 | 2398 | } |
| 2399 | 2399 | |
| @@ -2408,7 +2408,8 @@ static inline void __io_fill_cqe32_req(struct io_kiocb *req, s32 res, u32 cflags · 8 unmodified lines | ||
| 2408 | 2408 | if (req->flags & REQ_F_CQE_SKIP) |
| 2409 | 2409 | return; |
| 2410 | 2410 | |
| 2411 | − trace_io_uring_complete(ctx, req, req->cqe.user_data, res, cflags); | |
| 2411 | + trace_io_uring_complete(ctx, req, req->cqe.user_data, res, cflags, | |
| 2412 | + extra1, extra2); | |
| 2412 | 2413 | |
| 2413 | 2414 | /* |
| 2414 | 2415 | * If we can't get a cq entry, userspace overflowed the |
| @@ -2432,7 +2433,7 @@ static noinline bool io_fill_cqe_aux(struct io_ring_ctx *ctx, u64 user_data, · 17 unmodified lines | ||
| 2432 | 2433 | s32 res, u32 cflags) |
| 2433 | 2434 | { |
| 2434 | 2435 | ctx->cq_extra++; |
| 2435 | − trace_io_uring_complete(ctx, NULL, user_data, res, cflags); | |
| 2436 | + trace_io_uring_complete(ctx, NULL, user_data, res, cflags, 0, 0); | |
| 2436 | 2437 | return __io_fill_cqe(ctx, user_data, res, cflags); |
| 2437 | 2438 | } |
| 2438 | 2439 | |
| @@ -321,13 +321,16 @@ TRACE_EVENT(io_uring_fail_link, · 320 unmodified lines | ||
| 321 | 321 | * @user_data: user data associated with the request |
| 322 | 322 | * @res: result of the request |
| 323 | 323 | * @cflags: completion flags |
| 324 | + * @extra1: extra 64-bit data for CQE32 | |
| 325 | + * @extra2: extra 64-bit data for CQE32 | |
| 324 | 326 | * |
| 325 | 327 | */ |
| 326 | 328 | TRACE_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 | 335 | TP_STRUCT__entry ( |
| 333 | 336 | __field( void *, ctx ) |
| @@ -335,6 +338,8 @@ TRACE_EVENT(io_uring_complete, · 1 unmodified line | ||
| 335 | 338 | __field( u64, user_data ) |
| 336 | 339 | __field( int, res ) |
| 337 | 340 | __field( unsigned, cflags ) |
| 341 | + __field( u64, extra1 ) | |
| 342 | + __field( u64, extra2 ) | |
| 338 | 343 | ), |
| 339 | 344 | |
| 340 | 345 | TP_fast_assign( |
| @@ -343,12 +348,17 @@ TRACE_EVENT(io_uring_complete, · 2 unmodified lines | ||
| 343 | 348 | __entry->user_data = user_data; |
| 344 | 349 | __entry->res = res; |
| 345 | 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 | 357 | __entry->ctx, __entry->req, |
| 350 | 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 | /** |