From: Steven Rostedt <rostedt@goodmis.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: peter.wang@mediatek.com, linux-scsi@vger.kernel.org,
martin.petersen@oracle.com, avri.altman@wdc.com,
alim.akhtar@samsung.com, jejb@linux.ibm.com,
sutoshd@codeaurora.org, wsd_upstream@mediatek.com,
linux-mediatek@lists.infradead.org, chun-hung.wu@mediatek.com,
alice.chao@mediatek.com, cc.chou@mediatek.com,
chaotian.jing@mediatek.com, jiajie.hao@mediatek.com,
yi-fan.peng@mediatek.com, qilin.tan@mediatek.com,
lin.gui@mediatek.com, tun-yu.yu@mediatek.com,
eddie.huang@mediatek.com, naomi.chu@mediatek.com,
ed.tsai@mediatek.com,
Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] ufs: core: add hba parameter to trace events
Date: Tue, 30 Jun 2026 18:58:57 -0400 [thread overview]
Message-ID: <20260630185857.54c55d97@gandalf.local.home> (raw)
In-Reply-To: <16f26ea9-69d6-4f2f-9adc-c576c288a2f5@acm.org>
On Thu, 13 Feb 2025 09:19:42 -0800
Bart Van Assche <bvanassche@acm.org> wrote:
> On 2/13/25 3:35 AM, peter.wang@mediatek.com wrote:
> > diff --git a/drivers/ufs/core/ufs_trace.h b/drivers/ufs/core/ufs_trace.h
> > index 84deca2b841d..2f79982846b6 100644
> > --- a/drivers/ufs/core/ufs_trace.h
> > +++ b/drivers/ufs/core/ufs_trace.h
> > @@ -83,16 +83,18 @@ UFS_CMD_TRACE_TSF_TYPES
> >
> > TRACE_EVENT(ufshcd_clk_gating,
> >
> > - TP_PROTO(const char *dev_name, int state),
> > + TP_PROTO(struct ufs_hba *hba, int state),
> >
> > - TP_ARGS(dev_name, state),
> > + TP_ARGS(hba, state),
> >
> > TP_STRUCT__entry(
> > - __string(dev_name, dev_name)
> > + __field(struct ufs_hba *, hba)
> > + __string(dev_name, dev_name(hba->dev))
> > __field(int, state)
> > ),
>
> Please reduce the size of the tracing entries by removing dev_name from
> TP_STRUCT__entry() and by replacing 'dev_name' with 'dev_name(hba->dev)'
> in the TP_printk() calls.
For future references, please do not recommend moving dereferences into the
TP_printk() callers. Those happen when the event is read by the user and
the hba pointer may no longer exist.
-- Steve
parent reply other threads:[~2026-06-30 22:59 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <16f26ea9-69d6-4f2f-9adc-c576c288a2f5@acm.org>]
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=20260630185857.54c55d97@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=alice.chao@mediatek.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=cc.chou@mediatek.com \
--cc=chaotian.jing@mediatek.com \
--cc=chun-hung.wu@mediatek.com \
--cc=ed.tsai@mediatek.com \
--cc=eddie.huang@mediatek.com \
--cc=jejb@linux.ibm.com \
--cc=jiajie.hao@mediatek.com \
--cc=lin.gui@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=naomi.chu@mediatek.com \
--cc=peter.wang@mediatek.com \
--cc=qilin.tan@mediatek.com \
--cc=sutoshd@codeaurora.org \
--cc=tun-yu.yu@mediatek.com \
--cc=wsd_upstream@mediatek.com \
--cc=yi-fan.peng@mediatek.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