Commit 7f85803a26f304e698c673838aab06cc6d4d6e59
Committed by
Steven Rostedt
1 parent
c94fbe1d9e
Exists in
master
and in
39 other branches
tracing: Remove syscall_exit_fields
There is no need for syscall_exit_fields as the syscall exit event class can already host the fields in its structure, like most other trace events do by default. Use that default behavior instead. Following this scheme, we don't need anymore to override the get_fields() callback of the syscall exit event class either. Hence both syscall_exit_fields and syscall_get_exit_fields() can be removed. Also changed some indentation to keep the following under 80 characters: ".fields = LIST_HEAD_INIT(event_class_syscall_exit.fields)," Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> LKML-Reference: <4D301C0E.8090408@cn.fujitsu.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Showing 1 changed file with 12 additions and 21 deletions Side-by-side Diff
kernel/trace/trace_syscalls.c
... | ... | @@ -23,9 +23,6 @@ |
23 | 23 | static int syscall_enter_define_fields(struct ftrace_event_call *call); |
24 | 24 | static int syscall_exit_define_fields(struct ftrace_event_call *call); |
25 | 25 | |
26 | -/* All syscall exit events have the same fields */ | |
27 | -static LIST_HEAD(syscall_exit_fields); | |
28 | - | |
29 | 26 | static struct list_head * |
30 | 27 | syscall_get_enter_fields(struct ftrace_event_call *call) |
31 | 28 | { |
32 | 29 | |
33 | 30 | |
34 | 31 | |
35 | 32 | |
... | ... | @@ -34,34 +31,28 @@ |
34 | 31 | return &entry->enter_fields; |
35 | 32 | } |
36 | 33 | |
37 | -static struct list_head * | |
38 | -syscall_get_exit_fields(struct ftrace_event_call *call) | |
39 | -{ | |
40 | - return &syscall_exit_fields; | |
41 | -} | |
42 | - | |
43 | 34 | struct trace_event_functions enter_syscall_print_funcs = { |
44 | - .trace = print_syscall_enter, | |
35 | + .trace = print_syscall_enter, | |
45 | 36 | }; |
46 | 37 | |
47 | 38 | struct trace_event_functions exit_syscall_print_funcs = { |
48 | - .trace = print_syscall_exit, | |
39 | + .trace = print_syscall_exit, | |
49 | 40 | }; |
50 | 41 | |
51 | 42 | struct ftrace_event_class event_class_syscall_enter = { |
52 | - .system = "syscalls", | |
53 | - .reg = syscall_enter_register, | |
54 | - .define_fields = syscall_enter_define_fields, | |
55 | - .get_fields = syscall_get_enter_fields, | |
56 | - .raw_init = init_syscall_trace, | |
43 | + .system = "syscalls", | |
44 | + .reg = syscall_enter_register, | |
45 | + .define_fields = syscall_enter_define_fields, | |
46 | + .get_fields = syscall_get_enter_fields, | |
47 | + .raw_init = init_syscall_trace, | |
57 | 48 | }; |
58 | 49 | |
59 | 50 | struct ftrace_event_class event_class_syscall_exit = { |
60 | - .system = "syscalls", | |
61 | - .reg = syscall_exit_register, | |
62 | - .define_fields = syscall_exit_define_fields, | |
63 | - .get_fields = syscall_get_exit_fields, | |
64 | - .raw_init = init_syscall_trace, | |
51 | + .system = "syscalls", | |
52 | + .reg = syscall_exit_register, | |
53 | + .define_fields = syscall_exit_define_fields, | |
54 | + .fields = LIST_HEAD_INIT(event_class_syscall_exit.fields), | |
55 | + .raw_init = init_syscall_trace, | |
65 | 56 | }; |
66 | 57 | |
67 | 58 | extern unsigned long __start_syscalls_metadata[]; |