[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1279797253.20942.88.camel@minggr.sh.intel.com>
Date: Thu, 22 Jul 2010 19:14:13 +0800
From: Lin Ming <ming.m.lin@...el.com>
To: Ingo Molnar <mingo@...e.hu>, Jens Axboe <jaxboe@...ionio.com>
Cc: Robert Richter <robert.richter@....com>,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
Johannes Berg <johannes@...solutions.net>,
Peter Zijlstra <peterz@...radead.org>,
Greg KH <greg@...ah.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Paul Mundt <lethal@...ux-sh.org>,
"eranian@...il.com" <eranian@...il.com>,
"Gary.Mohr@...l.com" <Gary.Mohr@...l.com>,
"arjan@...ux.intel.com" <arjan@...ux.intel.com>,
"Zhang, Yanmin" <yanmin_zhang@...ux.intel.com>,
Paul Mackerras <paulus@...ba.org>,
"David S. Miller" <davem@...emloft.net>,
Russell King <rmk+kernel@....linux.org.uk>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Will Deacon <will.deacon@....com>,
Maynard Johnson <mpjohn@...ibm.com>,
Carl Love <carll@...ibm.com>,
Kay Sievers <kay.sievers@...y.org>,
lkml <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Steven Rostedt <rostedt@...dmis.org>
Subject: [RFC][PATCH v1 07/15] perf: export tracepoint events via sysfs:
block
Block tracepoint events are exported like below,
/sys/devices/pci0000:00/0000:00:1f.1/host0/target0:0:0/0:0:0:0/block/sda/events
|-- block_bio_backmerge
| |-- config
| `-- type
|-- block_bio_bounce
| |-- config
| `-- type
|-- block_bio_complete
| |-- config
| `-- type
|-- block_bio_frontmerge
.....
/sys/devices/pci0000:00/0000:00:1f.1/host0/target0:0:0/0:0:0:0/block/sda/sda1/events
|-- block_bio_backmerge
| |-- config
| `-- type
|-- block_bio_bounce
| |-- config
| `-- type
|-- block_bio_complete
| |-- config
| `-- type
|-- block_bio_frontmerge
.....
/sys/devices/pci0000:00/0000:00:1f.2/host2/target2:0:0/2:0:0:0/block/sr0/events
/sys/devices/virtual/block/ram0/events
....
/sys/devices/virtual/block/ram15/events
/sys/devices/virtual/block/loop0/events
....
/sys/devices/virtual/block/loop7/events
/sys/devices/virtual/block/md0/events
---
fs/partitions/check.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/fs/partitions/check.c b/fs/partitions/check.c
index 72c5265..e18ac81 100644
--- a/fs/partitions/check.c
+++ b/fs/partitions/check.c
@@ -21,6 +21,7 @@
#include <linux/ctype.h>
#include <linux/genhd.h>
#include <linux/blktrace_api.h>
+#include <linux/perf_event.h>
#include "check.h"
@@ -446,6 +447,9 @@ struct hd_struct *add_partition(struct gendisk *disk, int partno,
if (err)
goto out_put;
+ /* For example, /sys/block/sda1/events/ */
+ perf_sys_add_tp(&pdev->kobj, "block");
+
err = -ENOMEM;
p->holder_dir = kobject_create_and_add("holders", &pdev->kobj);
if (!p->holder_dir)
@@ -506,6 +510,9 @@ void register_disk(struct gendisk *disk)
device_del(ddev);
return;
}
+
+ /* For example, /sys/block/sda/events/ */
+ perf_sys_add_tp(&ddev->kobj, "block");
#endif
disk->part0.holder_dir = kobject_create_and_add("holders", &ddev->kobj);
disk->slave_dir = kobject_create_and_add("slaves", &ddev->kobj);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists