diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/module.h | 2 | ||||
-rw-r--r-- | include/linux/syscalls.h | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index e7c6385c6683..7695a303bb55 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -389,7 +389,7 @@ struct module | |||
389 | unsigned int num_trace_bprintk_fmt; | 389 | unsigned int num_trace_bprintk_fmt; |
390 | #endif | 390 | #endif |
391 | #ifdef CONFIG_EVENT_TRACING | 391 | #ifdef CONFIG_EVENT_TRACING |
392 | struct ftrace_event_call *trace_events; | 392 | struct ftrace_event_call **trace_events; |
393 | unsigned int num_trace_events; | 393 | unsigned int num_trace_events; |
394 | #endif | 394 | #endif |
395 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD | 395 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 18cd0684fc4e..45508fec366d 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -128,28 +128,30 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
128 | static struct syscall_metadata \ | 128 | static struct syscall_metadata \ |
129 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ | 129 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ |
130 | static struct ftrace_event_call __used \ | 130 | static struct ftrace_event_call __used \ |
131 | __attribute__((__aligned__(4))) \ | ||
132 | __attribute__((section("_ftrace_events"))) \ | ||
133 | event_enter_##sname = { \ | 131 | event_enter_##sname = { \ |
134 | .name = "sys_enter"#sname, \ | 132 | .name = "sys_enter"#sname, \ |
135 | .class = &event_class_syscall_enter, \ | 133 | .class = &event_class_syscall_enter, \ |
136 | .event.funcs = &enter_syscall_print_funcs, \ | 134 | .event.funcs = &enter_syscall_print_funcs, \ |
137 | .data = (void *)&__syscall_meta_##sname,\ | 135 | .data = (void *)&__syscall_meta_##sname,\ |
138 | }; \ | 136 | }; \ |
137 | static struct ftrace_event_call __used \ | ||
138 | __attribute__((section("_ftrace_events"))) \ | ||
139 | *__event_enter_##sname = &event_enter_##sname; \ | ||
139 | __TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY) | 140 | __TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY) |
140 | 141 | ||
141 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ | 142 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ |
142 | static struct syscall_metadata \ | 143 | static struct syscall_metadata \ |
143 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ | 144 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ |
144 | static struct ftrace_event_call __used \ | 145 | static struct ftrace_event_call __used \ |
145 | __attribute__((__aligned__(4))) \ | ||
146 | __attribute__((section("_ftrace_events"))) \ | ||
147 | event_exit_##sname = { \ | 146 | event_exit_##sname = { \ |
148 | .name = "sys_exit"#sname, \ | 147 | .name = "sys_exit"#sname, \ |
149 | .class = &event_class_syscall_exit, \ | 148 | .class = &event_class_syscall_exit, \ |
150 | .event.funcs = &exit_syscall_print_funcs, \ | 149 | .event.funcs = &exit_syscall_print_funcs, \ |
151 | .data = (void *)&__syscall_meta_##sname,\ | 150 | .data = (void *)&__syscall_meta_##sname,\ |
152 | }; \ | 151 | }; \ |
152 | static struct ftrace_event_call __used \ | ||
153 | __attribute__((section("_ftrace_events"))) \ | ||
154 | *__event_exit_##sname = &event_exit_##sname; \ | ||
153 | __TRACE_EVENT_FLAGS(exit_##sname, TRACE_EVENT_FL_CAP_ANY) | 155 | __TRACE_EVENT_FLAGS(exit_##sname, TRACE_EVENT_FL_CAP_ANY) |
154 | 156 | ||
155 | #define SYSCALL_METADATA(sname, nb) \ | 157 | #define SYSCALL_METADATA(sname, nb) \ |