From: "Vineeth Pillai (Google)" <vineeth@bitbyteword.org>
To: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org>,
linux-trace-kernel@vger.kernel.org,
Vineeth Pillai <vineeth@bitbyteword.org>,
Peter Zijlstra <peterz@infradead.org>
Subject: [PATCH v3 08/11] scsi: ufs: Use trace_call__##name() at guarded tracepoint call sites
Date: Fri, 15 May 2026 09:59:46 -0400 [thread overview]
Message-ID: <20260515135946.2238888-1-vineeth@bitbyteword.org> (raw)
From: Vineeth Pillai <vineeth@bitbyteword.org>
Replace trace_foo() with the new trace_call__foo() at sites already
guarded by trace_foo_enabled(), avoiding a redundant
static_branch_unlikely() re-evaluation inside the tracepoint.
trace_call__foo() calls the tracepoint callbacks directly without
utilizing the static branch again.
Original v2 series:
https://lore.kernel.org/linux-trace-kernel/20260323160052.17528-1-vineeth@bitbyteword.org/
Parts of the original v2 series have already been merged in mainline.
This patch is being reposted as a follow-up cleanup for the remaining
unmerged pieces.
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Vineeth Pillai (Google) <vineeth@bitbyteword.org>
Assisted-by: Claude:claude-sonnet-4-6
---
drivers/ufs/core/ufshcd.c | 37 +++++++++++++++++++------------------
1 file changed, 19 insertions(+), 18 deletions(-)
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index c3f08957d179..07f3126d2a94 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -421,8 +421,8 @@ static void ufshcd_add_cmd_upiu_trace(struct ufs_hba *hba,
else
header = &lrb->ucd_rsp_ptr->header;
- trace_ufshcd_upiu(hba, str_t, header, &rq->sc.cdb,
- UFS_TSF_CDB);
+ trace_call__ufshcd_upiu(hba, str_t, header, &rq->sc.cdb,
+ UFS_TSF_CDB);
}
static void ufshcd_add_query_upiu_trace(struct ufs_hba *hba,
@@ -432,8 +432,8 @@ static void ufshcd_add_query_upiu_trace(struct ufs_hba *hba,
if (!trace_ufshcd_upiu_enabled())
return;
- trace_ufshcd_upiu(hba, str_t, &rq_rsp->header,
- &rq_rsp->qr, UFS_TSF_OSF);
+ trace_call__ufshcd_upiu(hba, str_t, &rq_rsp->header,
+ &rq_rsp->qr, UFS_TSF_OSF);
}
static void ufshcd_add_tm_upiu_trace(struct ufs_hba *hba, unsigned int tag,
@@ -445,15 +445,15 @@ static void ufshcd_add_tm_upiu_trace(struct ufs_hba *hba, unsigned int tag,
return;
if (str_t == UFS_TM_SEND)
- trace_ufshcd_upiu(hba, str_t,
- &descp->upiu_req.req_header,
- &descp->upiu_req.input_param1,
- UFS_TSF_TM_INPUT);
+ trace_call__ufshcd_upiu(hba, str_t,
+ &descp->upiu_req.req_header,
+ &descp->upiu_req.input_param1,
+ UFS_TSF_TM_INPUT);
else
- trace_ufshcd_upiu(hba, str_t,
- &descp->upiu_rsp.rsp_header,
- &descp->upiu_rsp.output_param1,
- UFS_TSF_TM_OUTPUT);
+ trace_call__ufshcd_upiu(hba, str_t,
+ &descp->upiu_rsp.rsp_header,
+ &descp->upiu_rsp.output_param1,
+ UFS_TSF_TM_OUTPUT);
}
static void ufshcd_add_uic_command_trace(struct ufs_hba *hba,
@@ -470,10 +470,10 @@ static void ufshcd_add_uic_command_trace(struct ufs_hba *hba,
else
cmd = ufshcd_readl(hba, REG_UIC_COMMAND);
- trace_ufshcd_uic_command(hba, str_t, cmd,
- ufshcd_readl(hba, REG_UIC_COMMAND_ARG_1),
- ufshcd_readl(hba, REG_UIC_COMMAND_ARG_2),
- ufshcd_readl(hba, REG_UIC_COMMAND_ARG_3));
+ trace_call__ufshcd_uic_command(hba, str_t, cmd,
+ ufshcd_readl(hba, REG_UIC_COMMAND_ARG_1),
+ ufshcd_readl(hba, REG_UIC_COMMAND_ARG_2),
+ ufshcd_readl(hba, REG_UIC_COMMAND_ARG_3));
}
static void ufshcd_add_command_trace(struct ufs_hba *hba, struct scsi_cmnd *cmd,
@@ -522,8 +522,9 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, struct scsi_cmnd *cmd,
} else {
doorbell = ufshcd_readl(hba, REG_UTP_TRANSFER_REQ_DOOR_BELL);
}
- trace_ufshcd_command(cmd->device, hba, str_t, tag, doorbell, hwq_id,
- transfer_len, intr, lba, opcode, group_id);
+ trace_call__ufshcd_command(cmd->device, hba, str_t, tag, doorbell,
+ hwq_id, transfer_len, intr, lba, opcode,
+ group_id);
}
static void ufshcd_print_clk_freqs(struct ufs_hba *hba)
--
2.54.0
next reply other threads:[~2026-05-15 13:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 13:59 Vineeth Pillai (Google) [this message]
2026-05-15 15:27 ` [PATCH v3 08/11] scsi: ufs: Use trace_call__##name() at guarded tracepoint call sites Bart Van Assche
2026-05-15 18:50 ` Steven Rostedt
2026-05-15 19:21 ` Bart Van Assche
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=20260515135946.2238888-1-vineeth@bitbyteword.org \
--to=vineeth@bitbyteword.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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