mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC][PATCH v1 14/15] perf: export tracepoint events via sysfs: scsi
@ 2010-07-22 11:18 Lin Ming
  0 siblings, 0 replies; only message in thread
From: Lin Ming @ 2010-07-22 11:18 UTC (permalink / raw)
  To: Ingo Molnar, James E.J. Bottomley
  Cc: Robert Richter, Corey Ashford, Johannes Berg, Peter Zijlstra,
	Greg KH, Frederic Weisbecker, Paul Mundt, eranian,
	Gary.Mohr@Bull.com, arjan, Zhang, Yanmin, Paul Mackerras,
	David S. Miller, Russell King, Arnaldo Carvalho de Melo,
	Will Deacon, Maynard Johnson, Carl Love, Kay Sievers, lkml,
	Thomas Gleixner, Steven Rostedt

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) {




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-07-22 11:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-22 11:18 [RFC][PATCH v1 14/15] perf: export tracepoint events via sysfs: scsi Lin Ming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome