From: Lin Ming on
scsi tracepoint events are exported like below,

/sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/host4/scsi_host/host4/events
|-- scsi_dispatch_cmd_done
| |-- config
| `-- type
|-- scsi_dispatch_cmd_error
| |-- config
| `-- type
|-- scsi_dispatch_cmd_start
| |-- config
| `-- type
|-- scsi_dispatch_cmd_timeout
| |-- config
| `-- type
`-- scsi_eh_wakeup
|-- config
`-- type
/sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/host5/scsi_host/host5/events
/sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/host6/scsi_host/host6/events
/sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/host7/scsi_host/host7/events
/sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/host8/scsi_host/host8/events
/sys/devices/pci0000:00/0000:00:1f.1/host9/scsi_host/host9/events
/sys/devices/pci0000:00/0000:00:1f.1/host10/scsi_host/host10/events
/sys/devices/pci0000:00/0000:00:1f.2/host0/scsi_host/host0/events
/sys/devices/pci0000:00/0000:00:1f.2/host1/scsi_host/host1/events
/sys/devices/pci0000:00/0000:00:1f.2/host2/scsi_host/host2/events
/sys/devices/pci0000:00/0000:00:1f.2/host3/scsi_host/host3/events
---
drivers/scsi/hosts.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index 6660fa9..7e256a6 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -30,6 +30,7 @@
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/completion.h>
+#include <linux/perf_event.h>
#include <linux/transport_class.h>
#include <linux/platform_device.h>

@@ -231,6 +232,8 @@ int scsi_add_host_with_dma(struct Scsi_Host *shost, struct device *dev,
if (error)
goto out_del_gendev;

+ perf_sys_add_tp(&shost->shost_dev.kobj, "scsi");
+
get_device(&shost->shost_gendev);

if (shost->transportt->host_size) {



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/