public inbox for linux-trace-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: 高翔 <gaoxiang17@xiaomi.com>
Cc: "Christian König" <christian.koenig@amd.com>,
	"Xiang Gao" <gxxa03070307@gmail.com>,
	"sumit.semwal@linaro.org" <sumit.semwal@linaro.org>,
	"mhiramat@kernel.org" <mhiramat@kernel.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mathieu.desnoyers@efficios.com" <mathieu.desnoyers@efficios.com>,
	"dhowells@redhat.com" <dhowells@redhat.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"brauner@kernel.org" <brauner@kernel.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linux-trace-kernel@vger.kernel.org"
	<linux-trace-kernel@vger.kernel.org>
Subject: Re: [External Mail]Re: [PATCH v8] dma-buf: add some tracepoints to debug.
Date: Mon, 22 Dec 2025 12:04:59 -0500	[thread overview]
Message-ID: <20251222120459.644e50ee@gandalf.local.home> (raw)
In-Reply-To: <e9046d36a74d4eefbe85936fd2ff7cba@xiaomi.com>

On Mon, 22 Dec 2025 01:41:28 +0000
高翔 <gaoxiang17@xiaomi.com> wrote:

> > there was some whitespace issues with the macro.  
> 
> I check the patch with checkpatch.pl, couldn't find whitespace issues.
> 


> > +DECLARE_EVENT_CLASS(dma_buf,
> > +
> > +     TP_PROTO(struct dma_buf *dmabuf),
> > +
> > +     TP_ARGS(dmabuf),
> > +
> > +     TP_STRUCT__entry(
> > +             __string(exp_name, dmabuf->exp_name)
> > +             __field(size_t, size)
> > +             __field(ino_t, ino)
> > +     ),

These don't follow checkpatch recommendations for whitespace, because they
are "special". Please update these to look more like a structure:

     TP_STRUCT__entry(
             __string(	exp_name,		dmabuf->exp_name)
             __field(	size_t,			size)
             __field(	ino_t,			ino)
     ),


> > +
> > +     TP_fast_assign(
> > +             __assign_str(exp_name);
> > +             __entry->size = dmabuf->size;
> > +             __entry->ino = dmabuf->file->f_inode->i_ino;
> > +     ),
> > +
> > +     TP_printk("exp_name=%s size=%zu ino=%lu",
> > +               __get_str(exp_name),
> > +               __entry->size,
> > +               __entry->ino)
> > +);
> > +
> > +DECLARE_EVENT_CLASS(dma_buf_attach_dev,
> > +
> > +     TP_PROTO(struct dma_buf *dmabuf, struct dma_buf_attachment *attach,
> > +             bool is_dynamic, struct device *dev),
> > +
> > +     TP_ARGS(dmabuf, attach, is_dynamic, dev),
> > +
> > +     TP_STRUCT__entry(
> > +             __string(dev_name, dev_name(dev))
> > +             __string(exp_name, dmabuf->exp_name)
> > +             __field(size_t, size)
> > +             __field(ino_t, ino)
> > +             __field(struct dma_buf_attachment *, attach)
> > +             __field(bool, is_dynamic)
> > +     ),

Same here too:

     TP_STRUCT__entry(
             __string(	dev_name,			dev_name(dev))
             __string(	exp_name,			dmabuf->exp_name)
             __field(	size_t,				size)
             __field(	ino_t,				ino)
             __field(	struct dma_buf_attachment *,	attach)
             __field(	bool,				is_dynamic)
     ),


> > +
> > +     TP_fast_assign(
> > +             __assign_str(dev_name);
> > +             __assign_str(exp_name);
> > +             __entry->size = dmabuf->size;
> > +             __entry->ino = dmabuf->file->f_inode->i_ino;
> > +             __entry->is_dynamic = is_dynamic;
> > +             __entry->attach = attach;
> > +     ),
> > +
> > +     TP_printk("exp_name=%s size=%zu ino=%lu attachment:%p is_dynamic=%d dev_name=%s",
> > +               __get_str(exp_name),
> > +               __entry->size,
> > +               __entry->ino,
> > +               __entry->attach,
> > +               __entry->is_dynamic,
> > +               __get_str(dev_name))
> > +);
> > +
> > +DECLARE_EVENT_CLASS(dma_buf_fd,
> > +
> > +     TP_PROTO(struct dma_buf *dmabuf, int fd),
> > +
> > +     TP_ARGS(dmabuf, fd),
> > +
> > +     TP_STRUCT__entry(
> > +             __string(exp_name, dmabuf->exp_name)
> > +             __field(size_t, size)
> > +             __field(ino_t, ino)
> > +             __field(int, fd)
> > +     ),

And the above.

-- Steve

> > +
> > +     TP_fast_assign(
> > +             __assign_str(exp_name);
> > +             __entry->size = dmabuf->size;
> > +             __entry->ino = dmabuf->file->f_inode->i_ino;
> > +             __entry->fd = fd;
> > +     ),
> > +
> > +     TP_printk("exp_name=%s size=%zu ino=%lu fd=%d",
> > +               __get_str(exp_name),
> > +               __entry->size,
> > +               __entry->ino,
> > +               __entry->fd)
> > +);
> > +

      parent reply	other threads:[~2025-12-22 17:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-18  6:28 [PATCH v8] dma-buf: add some tracepoints to debug Xiang Gao
2025-12-18 10:25 ` Christian König
     [not found]   ` <c8dab5d09fa24bc58309062910347e7a@xiaomi.com>
     [not found]     ` <e9046d36a74d4eefbe85936fd2ff7cba@xiaomi.com>
2025-12-22 17:04       ` 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=20251222120459.644e50ee@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=christian.koenig@amd.com \
    --cc=dhowells@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gaoxiang17@xiaomi.com \
    --cc=gxxa03070307@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=sumit.semwal@linaro.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