lkml.org 
[lkml]   [2011]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] compile time initialization for event flags value
compile time initialization is better than runtime initialization.

impact: remove many early_initcall()s and many trace_init_flags_##name()s.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 18cd068..ff074c8 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -135,8 +135,8 @@ 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,\
- }; \
- __TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY)
+ .flags = TRACE_EVENT_FL_CAP_ANY, \
+ };

#define SYSCALL_TRACE_EXIT_EVENT(sname) \
static struct syscall_metadata \
@@ -149,8 +149,8 @@ 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,\
- }; \
- __TRACE_EVENT_FLAGS(exit_##sname, TRACE_EVENT_FL_CAP_ANY)
+ .flags = TRACE_EVENT_FL_CAP_ANY, \
+ };

#define SYSCALL_METADATA(sname, nb) \
SYSCALL_TRACE_ENTER_EVENT(sname); \

\
 
 \ /
  Last update: 2011-01-26 09:51    [W:0.116 / U:1.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site