]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
scsi: ufs: add trace event for ufs commands
authorLee Susman <lsusman@codeaurora.org>
Fri, 23 Dec 2016 02:42:03 +0000 (18:42 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 5 Jan 2017 23:10:04 +0000 (18:10 -0500)
commit1a07f2d96eb9085396cbfb2d6d42d4003aa2934a
tree8fd5227aa9e3bded8b153cbbfcfc67e0cf5a92f2
parent911a0771b6fa7bac5eae753c17c87ecb77c77283
scsi: ufs: add trace event for ufs commands

Use the ftrace infrastructure to conditionally trace ufs command events.
New trace event is created, which samples the following ufs command data:
- device name
- optional identification string
- task tag
- doorbell register
- number of transfer bytes
- interrupt status register
- request start LBA
- command opcode

Currently we only fully trace read(10) and write(10) commands.
All other commands which pass through ufshcd_send_command() will be
printed with "-1" in the lba and transfer_len fields.

Usage:
echo 1 > /sys/kernel/debug/tracing/events/ufs/enable
cat /sys/kernel/debug/tracing/trace_pipe

Signed-off-by: Lee Susman <lsusman@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd.c
include/trace/events/ufs.h