summaryrefslogtreecommitdiffstats
path: root/include/trace/events/ufs.h
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@google.com>2020-11-17 17:58:37 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2020-11-20 04:00:51 +0100
commit69a314d6a155c5bfa9720b25d6456656f0b38bd1 (patch)
tree336c124b02ffbfa75ede0c4e1b7b80042189e3b6 /include/trace/events/ufs.h
parentscsi: ufs: Use WQ_HIGHPRI for gating work (diff)
downloadlinux-69a314d6a155c5bfa9720b25d6456656f0b38bd1.tar.xz
linux-69a314d6a155c5bfa9720b25d6456656f0b38bd1.zip
scsi: ufs: Add more contexts in the ufs tracepoints
This adds user-friendly tracepoints with group id. Link: https://lore.kernel.org/r/20201117165839.1643377-6-jaegeuk@kernel.org Reviewed-by: Can Guo <cang@codeaurora.org> Signed-off-by: Jaegeuk Kim <jaegeuk@google.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/trace/events/ufs.h')
-rw-r--r--include/trace/events/ufs.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/include/trace/events/ufs.h b/include/trace/events/ufs.h
index 2362244c2a9e..0bd54a184391 100644
--- a/include/trace/events/ufs.h
+++ b/include/trace/events/ufs.h
@@ -11,6 +11,15 @@
#include <linux/tracepoint.h>
+#define str_opcode(opcode) \
+ __print_symbolic(opcode, \
+ { WRITE_16, "WRITE_16" }, \
+ { WRITE_10, "WRITE_10" }, \
+ { READ_16, "READ_16" }, \
+ { READ_10, "READ_10" }, \
+ { SYNCHRONIZE_CACHE, "SYNC" }, \
+ { UNMAP, "UNMAP" })
+
#define UFS_LINK_STATES \
EM(UIC_LINK_OFF_STATE) \
EM(UIC_LINK_ACTIVE_STATE) \
@@ -216,9 +225,10 @@ DEFINE_EVENT(ufshcd_template, ufshcd_init,
TRACE_EVENT(ufshcd_command,
TP_PROTO(const char *dev_name, const char *str, unsigned int tag,
u32 doorbell, int transfer_len, u32 intr, u64 lba,
- u8 opcode),
+ u8 opcode, u8 group_id),
- TP_ARGS(dev_name, str, tag, doorbell, transfer_len, intr, lba, opcode),
+ TP_ARGS(dev_name, str, tag, doorbell, transfer_len,
+ intr, lba, opcode, group_id),
TP_STRUCT__entry(
__string(dev_name, dev_name)
@@ -229,6 +239,7 @@ TRACE_EVENT(ufshcd_command,
__field(u32, intr)
__field(u64, lba)
__field(u8, opcode)
+ __field(u8, group_id)
),
TP_fast_assign(
@@ -240,13 +251,15 @@ TRACE_EVENT(ufshcd_command,
__entry->intr = intr;
__entry->lba = lba;
__entry->opcode = opcode;
+ __entry->group_id = group_id;
),
TP_printk(
- "%s: %s: tag: %u, DB: 0x%x, size: %d, IS: %u, LBA: %llu, opcode: 0x%x",
+ "%s: %s: tag: %u, DB: 0x%x, size: %d, IS: %u, LBA: %llu, opcode: 0x%x (%s), group_id: 0x%x",
__get_str(str), __get_str(dev_name), __entry->tag,
__entry->doorbell, __entry->transfer_len,
- __entry->intr, __entry->lba, (u32)__entry->opcode
+ __entry->intr, __entry->lba, (u32)__entry->opcode,
+ str_opcode(__entry->opcode), (u32)__entry->group_id
)
);