Skip to content

Commit f4d5c02

Browse files
Lai Jiangshanrostedt
authored andcommitted
tracing: Compile time initialization for event flags value
Compile time initialization is better than runtime initialization. Remove many early_initcall()s and many trace_init_flags_##name()s. Acked-by: Frederic Weisbecker <[email protected]> Signed-off-by: Lai Jiangshan <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
1 parent cce1dac commit f4d5c02

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/linux/syscalls.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,11 @@ extern struct trace_event_functions exit_syscall_print_funcs;
132132
.class = &event_class_syscall_enter, \
133133
.event.funcs = &enter_syscall_print_funcs, \
134134
.data = (void *)&__syscall_meta_##sname,\
135+
.flags = TRACE_EVENT_FL_CAP_ANY, \
135136
}; \
136137
static struct ftrace_event_call __used \
137138
__attribute__((section("_ftrace_events"))) \
138-
*__event_enter_##sname = &event_enter_##sname; \
139-
__TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY)
139+
*__event_enter_##sname = &event_enter_##sname;
140140

141141
#define SYSCALL_TRACE_EXIT_EVENT(sname) \
142142
static struct syscall_metadata __syscall_meta_##sname; \
@@ -146,11 +146,11 @@ extern struct trace_event_functions exit_syscall_print_funcs;
146146
.class = &event_class_syscall_exit, \
147147
.event.funcs = &exit_syscall_print_funcs, \
148148
.data = (void *)&__syscall_meta_##sname,\
149+
.flags = TRACE_EVENT_FL_CAP_ANY, \
149150
}; \
150151
static struct ftrace_event_call __used \
151152
__attribute__((section("_ftrace_events"))) \
152-
*__event_exit_##sname = &event_exit_##sname; \
153-
__TRACE_EVENT_FLAGS(exit_##sname, TRACE_EVENT_FL_CAP_ANY)
153+
*__event_exit_##sname = &event_exit_##sname;
154154

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

0 commit comments

Comments
 (0)