From: Christoph Hellwig <hch@lst.de>
To: Sean Anderson <sean.anderson@linux.dev>
Cc: Christoph Hellwig <hch@lst.de>,
iommu@lists.linux.dev, linux-trace-kernel@vger.kernel.org,
Masami Hiramatsu <mhiramat@kernel.org>,
linux-kernel@vger.kernel.org, Robin Murphy <robin.murphy@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Steven Rostedt <rostedt@goodmis.org>,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH 2/3] dma-mapping: Use trace_dma_alloc for dma_alloc* instead of using trace_dma_map
Date: Fri, 18 Oct 2024 07:27:38 +0200 [thread overview]
Message-ID: <20241018052738.GA20045@lst.de> (raw)
In-Reply-To: <20241017181354.2834674-3-sean.anderson@linux.dev>
On Thu, Oct 17, 2024 at 02:13:53PM -0400, Sean Anderson wrote:
> +DECLARE_EVENT_CLASS(_dma_alloc,
> TP_PROTO(struct device *dev, void *virt_addr, dma_addr_t dma_addr,
> size_t size, enum dma_data_direction dir, gfp_t flags,
> unsigned long attrs),
> @@ -149,7 +149,60 @@ TRACE_EVENT(dma_alloc,
> decode_dma_attrs(__entry->attrs))
> );
>
> -TRACE_EVENT(dma_free,
> +DEFINE_EVENT(_dma_alloc, dma_alloc,
> + TP_PROTO(struct device *dev, void *virt_addr, dma_addr_t dma_addr,
> + size_t size, enum dma_data_direction dir, gfp_t flags,
> + unsigned long attrs),
> + TP_ARGS(dev, virt_addr, dma_addr, size, dir, flags, attrs));
> +
> +DEFINE_EVENT(_dma_alloc, dma_alloc_pages,
The scheme we used in XFS (fs/xfs/xfs_trace.h) for the event classes is
to give the class a _class postdix, and use macros to avoid the repeated
DEFINE_EVENT boilerplate. Any chance you could rewrite this to use
a similar scheme?
next prev parent reply other threads:[~2024-10-18 5:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-17 18:13 [PATCH 0/3] dma-mapping: Trace more error paths Sean Anderson
2024-10-17 18:13 ` [PATCH 1/3] dma-mapping: Trace dma_alloc/free direction Sean Anderson
2024-10-17 18:13 ` [PATCH 2/3] dma-mapping: Use trace_dma_alloc for dma_alloc* instead of using trace_dma_map Sean Anderson
2024-10-18 5:27 ` Christoph Hellwig [this message]
2024-10-17 18:13 ` [PATCH 3/3] dma-mapping: Trace more error paths Sean Anderson
2024-10-21 10:38 ` Robin Murphy
2024-10-21 14:37 ` Sean Anderson
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=20241018052738.GA20045@lst.de \
--to=hch@lst.de \
--cc=iommu@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=robin.murphy@arm.com \
--cc=rostedt@goodmis.org \
--cc=sean.anderson@linux.dev \
/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;
as well as URLs for NNTP newsgroup(s).