tracing: Compile time initialization for event flags value
authorLai Jiangshan <laijs@cn.fujitsu.com>
Wed, 26 Jan 2011 08:49:00 +0000 (16:49 +0800)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 8 Feb 2011 22:14:54 +0000 (17:14 -0500)
Compile time initialization is better than runtime initialization.

Remove many early_initcall()s and many trace_init_flags_##name()s.

Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <4D3FDFFC.6030304@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
include/linux/syscalls.h

index 8e8968e74544d6864d0ad32c16140f498af101a9..a17fcea2ca58b6831afa6143f1134af51b3695d1 100644 (file)
@@ -132,11 +132,11 @@ extern struct trace_event_functions exit_syscall_print_funcs;
                .class                  = &event_class_syscall_enter,   \
                .event.funcs            = &enter_syscall_print_funcs,   \
                .data                   = (void *)&__syscall_meta_##sname,\
+               .flags                  = TRACE_EVENT_FL_CAP_ANY,       \
        };                                                              \
        static struct ftrace_event_call __used                          \
          __attribute__((section("_ftrace_events")))                    \
-        *__event_enter_##sname = &event_enter_##sname;                 \
-       __TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY)
+        *__event_enter_##sname = &event_enter_##sname;
 
 #define SYSCALL_TRACE_EXIT_EVENT(sname)                                        \
        static struct syscall_metadata __syscall_meta_##sname;          \
@@ -146,11 +146,11 @@ extern struct trace_event_functions exit_syscall_print_funcs;
                .class                  = &event_class_syscall_exit,    \
                .event.funcs            = &exit_syscall_print_funcs,    \
                .data                   = (void *)&__syscall_meta_##sname,\
+               .flags                  = TRACE_EVENT_FL_CAP_ANY,       \
        };                                                              \
        static struct ftrace_event_call __used                          \
          __attribute__((section("_ftrace_events")))                    \
-       *__event_exit_##sname = &event_exit_##sname;                    \
-       __TRACE_EVENT_FLAGS(exit_##sname, TRACE_EVENT_FL_CAP_ANY)
+       *__event_exit_##sname = &event_exit_##sname;
 
 #define SYSCALL_METADATA(sname, nb)                            \
        SYSCALL_TRACE_ENTER_EVENT(sname);                       \
This page took 0.028297 seconds and 5 git commands to generate.