[RFC patch 12/28] trace event module remove semicolons

Mathieu Desnoyers
2011-01-09T22:08:49Z

[-- Attachment #1: trace-event-module-remove-semicolons.patch --]
[-- Type: text/plain, Size: 2194 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Li Zefan <lizf@cn.fujitsu.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
---
include/trace/events/module.h | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)

Index: linux-2.6-lttng/include/trace/events/module.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/module.h
+++ linux-2.6-lttng/include/trace/events/module.h
@@ -8,6 +8,9 @@

#ifdef CONFIG_MODULES

+#ifndef _TRACE_MODULE_DEF_
+#define _TRACE_MODULE_DEF_
+
struct module;

#define show_module_flags(flags) __print_flags(flags, "", \
@@ -15,6 +18,8 @@ struct module;
{ (1UL << TAINT_FORCED_MODULE), "F" }, \
{ (1UL << TAINT_CRAP), "C" })

+#endif /* _TRACE_MODULE_DEF_ */
+
TRACE_EVENT(module_load,

TP_PROTO(struct module *mod),
@@ -32,7 +37,7 @@ TRACE_EVENT(module_load,
),

TP_printk("%s %s", __get_str(name), show_module_flags(__entry->taints))
-);
+)

TRACE_EVENT(module_free,

@@ -49,7 +54,7 @@ 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 */
@@ -74,21 +79,21 @@ DECLARE_EVENT_CLASS(module_refcnt,

TP_printk("%s call_site=%pf refcnt=%d",
__get_str(name), (void *)__entry->ip, __entry->refcnt)
-);
+)

DEFINE_EVENT(module_refcnt, module_get,

TP_PROTO(struct module *mod, unsigned long ip),

TP_ARGS(mod, ip)
-);
+)

DEFINE_EVENT(module_refcnt, module_put,

TP_PROTO(struct module *mod, unsigned long ip),

TP_ARGS(mod, ip)
-);
+)
#endif /* CONFIG_MODULE_UNLOAD */

TRACE_EVENT(module_request,
@@ -111,7 +116,7 @@ TRACE_EVENT(module_request,

TP_printk("%s wait=%d call_site=%pf",
__get_str(name), (int)__entry->wait, (void *)__entry->ip)
-);
+)

#endif /* CONFIG_MODULES */