diff options
| -rw-r--r-- | include/trace/events/module.h | 4 | ||||
| -rw-r--r-- | kernel/module.c | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/include/trace/events/module.h b/include/trace/events/module.h index a585f8135bd9..f07b44a2b240 100644 --- a/include/trace/events/module.h +++ b/include/trace/events/module.h | |||
| @@ -51,6 +51,9 @@ TRACE_EVENT(module_free, | |||
| 51 | TP_printk("%s", __get_str(name)) | 51 | TP_printk("%s", __get_str(name)) |
| 52 | ); | 52 | ); |
| 53 | 53 | ||
| 54 | #ifdef CONFIG_MODULE_UNLOAD | ||
| 55 | /* trace_module_get/put are only used if CONFIG_MODULE_UNLOAD is defined */ | ||
| 56 | |||
| 54 | DECLARE_EVENT_CLASS(module_refcnt, | 57 | DECLARE_EVENT_CLASS(module_refcnt, |
| 55 | 58 | ||
| 56 | TP_PROTO(struct module *mod, unsigned long ip), | 59 | TP_PROTO(struct module *mod, unsigned long ip), |
| @@ -86,6 +89,7 @@ DEFINE_EVENT(module_refcnt, module_put, | |||
| 86 | 89 | ||
| 87 | TP_ARGS(mod, ip) | 90 | TP_ARGS(mod, ip) |
| 88 | ); | 91 | ); |
| 92 | #endif /* CONFIG_MODULE_UNLOAD */ | ||
| 89 | 93 | ||
| 90 | TRACE_EVENT(module_request, | 94 | TRACE_EVENT(module_request, |
| 91 | 95 | ||
diff --git a/kernel/module.c b/kernel/module.c index 21591ad921f3..d9e237926b69 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
| @@ -59,8 +59,6 @@ | |||
| 59 | #define CREATE_TRACE_POINTS | 59 | #define CREATE_TRACE_POINTS |
| 60 | #include <trace/events/module.h> | 60 | #include <trace/events/module.h> |
| 61 | 61 | ||
| 62 | EXPORT_TRACEPOINT_SYMBOL(module_get); | ||
| 63 | |||
| 64 | #if 0 | 62 | #if 0 |
| 65 | #define DEBUGP printk | 63 | #define DEBUGP printk |
| 66 | #else | 64 | #else |
| @@ -467,6 +465,9 @@ MODINFO_ATTR(srcversion); | |||
| 467 | static char last_unloaded_module[MODULE_NAME_LEN+1]; | 465 | static char last_unloaded_module[MODULE_NAME_LEN+1]; |
| 468 | 466 | ||
| 469 | #ifdef CONFIG_MODULE_UNLOAD | 467 | #ifdef CONFIG_MODULE_UNLOAD |
| 468 | |||
| 469 | EXPORT_TRACEPOINT_SYMBOL(module_get); | ||
| 470 | |||
| 470 | /* Init the unload section of the module. */ | 471 | /* Init the unload section of the module. */ |
| 471 | static void module_unload_init(struct module *mod) | 472 | static void module_unload_init(struct module *mod) |
| 472 | { | 473 | { |
