public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Keith Busch <kbusch@kernel.org>
Cc: "Vineeth Pillai (Google)" <vineeth@bitbyteword.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Jens Axboe <axboe@kernel.dk>,
	io-uring@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH 03/15] io_uring: Use trace_invoke_##name() at guarded tracepoint call sites
Date: Thu, 12 Mar 2026 11:38:16 -0400	[thread overview]
Message-ID: <20260312113816.01de2b53@gandalf.local.home> (raw)
In-Reply-To: <abLapcC7YGYDyJ3L@kbusch-mbp>

On Thu, 12 Mar 2026 09:24:21 -0600
Keith Busch <kbusch@kernel.org> wrote:

> On Thu, Mar 12, 2026 at 11:04:58AM -0400, Vineeth Pillai (Google) wrote:
> >  	if (trace_io_uring_complete_enabled())
> > -		trace_io_uring_complete(req->ctx, req, cqe);
> > +		trace_invoke_io_uring_complete(req->ctx, req, cqe);  
> 
> Curious, this one doesn't follow that pattern of "if (enabed && cond)"
> that this cover letter said it was addressing, so why doesn't this call
> just drop the 'if' check and go straight to trace_io_uring_complete()? I
> followed this usage to commit a0730c738309a06, which says that the

You mean 'a0727c738309a06'? As I could not find the above 'a0730c738309a06'

> compiler was generating code to move args before checking if the trace
> was enabled. That commit was a while ago though, and suggests to remove

It was only 2023.

> the check if that problem is solved. Is it still a problem?

We should check. But also, tracepoints should never be in a header file.
That really should be:

#include <linux/tracepoint-defs.h>

DECLARE_TRACEPOINT(io_uring_complete);

[..]

	if (tracepoint_enabled(io_uring_complete))
		do_trace_io_uring_complete(...);

And in a C file, that should be:

void do_io_uring_complete(...)
{
	trace_inovke_io_uring_complete(...);
}


Which reminds me. There's other places that have that tracepoint_enabled()
in header files that do the above. The C wrapper functions should also
convert the callback to the trace_invoke_<event>() call.

-- Steve

  reply	other threads:[~2026-03-12 15:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12 15:04 [PATCH 00/15] tracepoint: Avoid double static_branch evaluation at guarded call sites Vineeth Pillai (Google)
2026-03-12 15:04 ` [PATCH 01/15] tracepoint: Add trace_invoke_##name() API Vineeth Pillai (Google)
2026-03-12 15:12   ` Steven Rostedt
2026-03-12 15:39     ` Vineeth Remanan Pillai
2026-03-12 15:53       ` Peter Zijlstra
2026-03-12 16:05         ` Vineeth Remanan Pillai
2026-03-14  0:24           ` Keith Busch
2026-03-12 15:04 ` [PATCH 03/15] io_uring: Use trace_invoke_##name() at guarded tracepoint call sites Vineeth Pillai (Google)
2026-03-12 15:24   ` Keith Busch
2026-03-12 15:38     ` Steven Rostedt [this message]
2026-03-12 15:12 ` [PATCH 00/15] tracepoint: Avoid double static_branch evaluation at guarded " Mathieu Desnoyers
2026-03-12 15:23   ` Steven Rostedt
2026-03-12 15:28     ` Mathieu Desnoyers
2026-03-12 15:40       ` Steven Rostedt
2026-03-12 15:49         ` Mathieu Desnoyers
2026-03-12 15:54           ` Peter Zijlstra
2026-03-12 15:57             ` Mathieu Desnoyers
2026-03-12 16:08           ` Vineeth Remanan Pillai
2026-03-12 16:54             ` Andrii Nakryiko
2026-03-12 17:02               ` Steven Rostedt
2026-03-13 14:02                 ` Vineeth Remanan Pillai

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=20260312113816.01de2b53@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=vineeth@bitbyteword.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