Linux Trace Kernel
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Zhang Yuwei <zhangyuwei20@huawei.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	<linux-kernel@vger.kernel.org>,
	<linux-trace-kernel@vger.kernel.org>, <linux-doc@vger.kernel.org>,
	<iommu@lists.linux.dev>, <chenjun102@huawei.com>
Subject: Re: [PATCH] iommu: Trace I/O page fault response latency
Date: Tue, 24 Nov 2026 21:00:10 -0500	[thread overview]
Message-ID: <20261124210010.33da74d0@robin> (raw)
In-Reply-To: <20261125013430.2144822-1-zhangyuwei20@huawei.com>

On Wed, 25 Nov 2026 09:34:30 +0800
Zhang Yuwei <zhangyuwei20@huawei.com> wrote:

> @@ -155,6 +159,14 @@ static struct iommu_attach_handle *find_fault_handler(struct device *dev,
>  	return attach_handle;
>  }
>  
> +static void iopf_trace_response(struct device *dev, const struct iopf_fault *evt,
> +				const struct iommu_page_response *resp)
> +{
> +	if (trace_iopf_latency_enabled() && evt->report_time_ns)
> +		trace_iopf_latency(dev, evt, resp,
> +				   ktime_get_ns() - evt->report_time_ns);

Please use:

		trace_call__iopf_latency(dev, evt, resp,
					 ktime_get_ns() - evt->report_time_ns);

As the trace_iopf_latency_enabled() already does check if the event is
enabled. Using the trace_call__ variant will always call the hooks
without adding another static branch.

-- Steve


> +}
> +

      parent reply	other threads:[~2026-11-25  2:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  1:34 [PATCH] iommu: Trace I/O page fault response latency Zhang Yuwei
2026-11-25  1:53 ` sashiko-bot
2026-11-25  2:00 ` Steven Rostedt [this message]

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=20261124210010.33da74d0@robin \
    --to=rostedt@goodmis.org \
    --cc=chenjun102@huawei.com \
    --cc=corbet@lwn.net \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=robin.murphy@arm.com \
    --cc=skhan@linuxfoundation.org \
    --cc=will@kernel.org \
    --cc=zhangyuwei20@huawei.com \
    /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