diff options
author | Steven Rostedt <srostedt@redhat.com> | 2010-03-29 14:25:18 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-03-31 22:56:59 -0400 |
commit | eb0c53771fb2f5f66b0edb3ebce33be4bbf1c285 (patch) | |
tree | 1b5d4fd86e4c72482fa07aa6d57ba9f6cab72423 /include/trace | |
parent | ae832d1e03ac9bf09fb8a07fb37908ab40c7cd0e (diff) |
tracing: Fix compile error in module tracepoints when MODULE_UNLOAD not set
If modules are configured in the build but unloading of modules is not,
then the refcnt is not defined. Place the get/put module tracepoints
under CONFIG_MODULE_UNLOAD since it references this field in the module
structure.
As a side-effect, this patch also reduces the code when MODULE_UNLOAD
is not set, because these unused tracepoints are not created.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/module.h | 4 |
1 files changed, 4 insertions, 0 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 | ||