diff --git a/[refs] b/[refs] index 9a3f17a42aab..119d33b572aa 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ae832d1e03ac9bf09fb8a07fb37908ab40c7cd0e +refs/heads/master: eb0c53771fb2f5f66b0edb3ebce33be4bbf1c285 diff --git a/trunk/include/trace/events/module.h b/trunk/include/trace/events/module.h index a585f8135bd9..f07b44a2b240 100644 --- a/trunk/include/trace/events/module.h +++ b/trunk/include/trace/events/module.h @@ -51,6 +51,9 @@ TRACE_EVENT(module_free, TP_printk("%s", __get_str(name)) ); +#ifdef CONFIG_MODULE_UNLOAD +/* trace_module_get/put are only used if CONFIG_MODULE_UNLOAD is defined */ + DECLARE_EVENT_CLASS(module_refcnt, TP_PROTO(struct module *mod, unsigned long ip), @@ -86,6 +89,7 @@ DEFINE_EVENT(module_refcnt, module_put, TP_ARGS(mod, ip) ); +#endif /* CONFIG_MODULE_UNLOAD */ TRACE_EVENT(module_request, diff --git a/trunk/kernel/module.c b/trunk/kernel/module.c index 21591ad921f3..d9e237926b69 100644 --- a/trunk/kernel/module.c +++ b/trunk/kernel/module.c @@ -59,8 +59,6 @@ #define CREATE_TRACE_POINTS #include -EXPORT_TRACEPOINT_SYMBOL(module_get); - #if 0 #define DEBUGP printk #else @@ -467,6 +465,9 @@ MODINFO_ATTR(srcversion); static char last_unloaded_module[MODULE_NAME_LEN+1]; #ifdef CONFIG_MODULE_UNLOAD + +EXPORT_TRACEPOINT_SYMBOL(module_get); + /* Init the unload section of the module. */ static void module_unload_init(struct module *mod) {