aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/syscalls.h6
-rw-r--r--include/trace/syscall.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 2f7c539ab96d..d3c9fd01a110 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -153,6 +153,7 @@ static void prof_sysexit_disable_##sname(struct ftrace_event_call *unused) \
153#define __SC_STR_TDECL6(t, a, ...) #t, __SC_STR_TDECL5(__VA_ARGS__) 153#define __SC_STR_TDECL6(t, a, ...) #t, __SC_STR_TDECL5(__VA_ARGS__)
154 154
155#define SYSCALL_TRACE_ENTER_EVENT(sname) \ 155#define SYSCALL_TRACE_ENTER_EVENT(sname) \
156 static const struct syscall_metadata __syscall_meta_##sname; \
156 static struct ftrace_event_call event_enter_##sname; \ 157 static struct ftrace_event_call event_enter_##sname; \
157 struct trace_event enter_syscall_print_##sname = { \ 158 struct trace_event enter_syscall_print_##sname = { \
158 .trace = print_syscall_enter, \ 159 .trace = print_syscall_enter, \
@@ -184,11 +185,12 @@ static void prof_sysexit_disable_##sname(struct ftrace_event_call *unused) \
184 .define_fields = syscall_enter_define_fields, \ 185 .define_fields = syscall_enter_define_fields, \
185 .regfunc = reg_event_syscall_enter, \ 186 .regfunc = reg_event_syscall_enter, \
186 .unregfunc = unreg_event_syscall_enter, \ 187 .unregfunc = unreg_event_syscall_enter, \
187 .data = "sys"#sname, \ 188 .data = (void *)&__syscall_meta_##sname,\
188 TRACE_SYS_ENTER_PROFILE_INIT(sname) \ 189 TRACE_SYS_ENTER_PROFILE_INIT(sname) \
189 } 190 }
190 191
191#define SYSCALL_TRACE_EXIT_EVENT(sname) \ 192#define SYSCALL_TRACE_EXIT_EVENT(sname) \
193 static const struct syscall_metadata __syscall_meta_##sname; \
192 static struct ftrace_event_call event_exit_##sname; \ 194 static struct ftrace_event_call event_exit_##sname; \
193 struct trace_event exit_syscall_print_##sname = { \ 195 struct trace_event exit_syscall_print_##sname = { \
194 .trace = print_syscall_exit, \ 196 .trace = print_syscall_exit, \
@@ -220,7 +222,7 @@ static void prof_sysexit_disable_##sname(struct ftrace_event_call *unused) \
220 .define_fields = syscall_exit_define_fields, \ 222 .define_fields = syscall_exit_define_fields, \
221 .regfunc = reg_event_syscall_exit, \ 223 .regfunc = reg_event_syscall_exit, \
222 .unregfunc = unreg_event_syscall_exit, \ 224 .unregfunc = unreg_event_syscall_exit, \
223 .data = "sys"#sname, \ 225 .data = (void *)&__syscall_meta_##sname,\
224 TRACE_SYS_EXIT_PROFILE_INIT(sname) \ 226 TRACE_SYS_EXIT_PROFILE_INIT(sname) \
225 } 227 }
226 228
diff --git a/include/trace/syscall.h b/include/trace/syscall.h
index 5f8827c92db7..c5265c81c4e7 100644
--- a/include/trace/syscall.h
+++ b/include/trace/syscall.h
@@ -34,7 +34,7 @@ struct syscall_metadata {
34 34
35#ifdef CONFIG_FTRACE_SYSCALLS 35#ifdef CONFIG_FTRACE_SYSCALLS
36extern unsigned long arch_syscall_addr(int nr); 36extern unsigned long arch_syscall_addr(int nr);
37extern int syscall_name_to_nr(char *name); 37extern int syscall_name_to_nr(const char *name);
38void set_syscall_enter_id(int num, int id); 38void set_syscall_enter_id(int num, int id);
39void set_syscall_exit_id(int num, int id); 39void set_syscall_exit_id(int num, int id);
40 40