From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759282Ab0GVLRv (ORCPT ); Thu, 22 Jul 2010 07:17:51 -0400 Received: from mga03.intel.com ([143.182.124.21]:9931 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759260Ab0GVLRt (ORCPT ); Thu, 22 Jul 2010 07:17:49 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.55,242,1278313200"; d="scan'208";a="303090325" Subject: [RFC][PATCH v1 14/15] perf: export tracepoint events via sysfs: scsi From: Lin Ming To: Ingo Molnar , "James E.J. Bottomley" Cc: Robert Richter , Corey Ashford , Johannes Berg , Peter Zijlstra , Greg KH , Frederic Weisbecker , Paul Mundt , "eranian@gmail.com" , "Gary.Mohr@Bull.com" , "arjan@linux.intel.com" , "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 Content-Type: text/plain; charset="UTF-8" Date: Thu, 22 Jul 2010 19:18:04 +0800 Message-ID: <1279797484.20942.97.camel@minggr.sh.intel.com> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 #include #include +#include #include #include @@ -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) {