Skip to contentSkip to conversation

perf: export tracepoint events via sysfs: module

RFC PATCH In review Lin Ming 1 participant 1 message Jul 22, 2010

lore
Share & tools
lore

Lin Ming

author
#0 lore raw

RFC PATCH 10/15 perf: export tracepoint events via sysfs: module

module tracepoint events are exported like below,

/sys/module/events/

|-- module_free
|   |-- config
|   `-- type
|-- module_get
|   |-- config
|   `-- type
|-- module_load
|   |-- config
|   `-- type
|-- module_put
|   |-- config
|   `-- type
`-- module_request
    |-- config
    `-- type
---
 kernel/params.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
kernel/params.c +3 -0
index 0b30ecd..be3326c 100644
@@ -24,6 +24,7 @@
 #include <linux/err.h>
 #include <linux/slab.h>
 #include <linux/ctype.h>
+#include <linux/perf_event.h>
 
 #if 0
 #define DEBUGP printk
@@ -763,6 +764,8 @@ static int __init param_sysfs_init(void)
 
 	param_sysfs_builtin();
 
+	perf_sys_add_tp(&module_kset->kobj, "module");
+
 	return 0;
 }
 subsys_initcall(param_sysfs_init);