[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1279797496.20942.98.camel@minggr.sh.intel.com>
Date: Thu, 22 Jul 2010 19:18:16 +0800
From: Lin Ming <ming.m.lin@...el.com>
To: Ingo Molnar <mingo@...e.hu>,
Johannes Berg <johannes@...solutions.net>
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 15/15] perf: export tracepoint events via sysfs:
mac80211
mac80211 tracepoint events are exported like below,
/sys/class/ieee80211/events/
|-- api_beacon_loss
| |-- config
| |-- type
....
....
|-- drv_add_interface
| |-- config
| |-- type
....
....
|-- stop_queue
| |-- config
| |-- type
|-- wake_queue
| |-- config
| |-- type
---
drivers/base/class.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/drivers/base/class.c b/drivers/base/class.c
index 8e231d0..57ada53 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -19,6 +19,7 @@
#include <linux/slab.h>
#include <linux/genhd.h>
#include <linux/mutex.h>
+#include <linux/perf_event.h>
#include "base.h"
#define to_class_attr(_attr) container_of(_attr, struct class_attribute, attr)
@@ -160,6 +161,14 @@ static void klist_class_dev_put(struct klist_node *n)
put_device(dev);
}
+extern struct class ieee80211_class;
+
+static void class_sys_add_tp(struct kobject *class_kobj, struct class *cls)
+{
+ if (cls == &ieee80211_class)
+ perf_sys_add_tp(class_kobj, "mac80211");
+}
+
int __class_register(struct class *cls, struct lock_class_key *key)
{
struct class_private *cp;
@@ -202,6 +211,9 @@ int __class_register(struct class *cls, struct lock_class_key *key)
}
error = add_class_attrs(class_get(cls));
class_put(cls);
+
+ class_sys_add_tp(&cp->class_subsys.kobj, cls);
+
return error;
}
EXPORT_SYMBOL_GPL(__class_register);
--
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