perf: export tracepoint events via sysfs: module
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
@@ -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);