aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace_syscalls.c')
-rw-r--r--kernel/trace/trace_syscalls.c66
1 files changed, 0 insertions, 66 deletions
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index a78e86349ecb..49cea70fbf6d 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -143,54 +143,6 @@ extern char *__bad_type_size(void);
143 #type, #name, offsetof(typeof(trace), name), \ 143 #type, #name, offsetof(typeof(trace), name), \
144 sizeof(trace.name), is_signed_type(type) 144 sizeof(trace.name), is_signed_type(type)
145 145
146int syscall_enter_format(struct ftrace_event_call *call, struct trace_seq *s)
147{
148 int i;
149 int ret;
150 struct syscall_metadata *entry = call->data;
151 struct syscall_trace_enter trace;
152 int offset = offsetof(struct syscall_trace_enter, args);
153
154 ret = trace_seq_printf(s, "\tfield:%s %s;\toffset:%zu;\tsize:%zu;"
155 "\tsigned:%u;\n",
156 SYSCALL_FIELD(int, nr));
157 if (!ret)
158 return 0;
159
160 for (i = 0; i < entry->nb_args; i++) {
161 ret = trace_seq_printf(s, "\tfield:%s %s;", entry->types[i],
162 entry->args[i]);
163 if (!ret)
164 return 0;
165 ret = trace_seq_printf(s, "\toffset:%d;\tsize:%zu;"
166 "\tsigned:%u;\n", offset,
167 sizeof(unsigned long),
168 is_signed_type(unsigned long));
169 if (!ret)
170 return 0;
171 offset += sizeof(unsigned long);
172 }
173
174 trace_seq_puts(s, "\nprint fmt: \"");
175 for (i = 0; i < entry->nb_args; i++) {
176 ret = trace_seq_printf(s, "%s: 0x%%0%zulx%s", entry->args[i],
177 sizeof(unsigned long),
178 i == entry->nb_args - 1 ? "" : ", ");
179 if (!ret)
180 return 0;
181 }
182 trace_seq_putc(s, '"');
183
184 for (i = 0; i < entry->nb_args; i++) {
185 ret = trace_seq_printf(s, ", ((unsigned long)(REC->%s))",
186 entry->args[i]);
187 if (!ret)
188 return 0;
189 }
190
191 return trace_seq_putc(s, '\n');
192}
193
194static 146static
195int __set_enter_print_fmt(struct syscall_metadata *entry, char *buf, int len) 147int __set_enter_print_fmt(struct syscall_metadata *entry, char *buf, int len)
196{ 148{
@@ -252,24 +204,6 @@ static void free_syscall_print_fmt(struct ftrace_event_call *call)
252 kfree(call->print_fmt); 204 kfree(call->print_fmt);
253} 205}
254 206
255int syscall_exit_format(struct ftrace_event_call *call, struct trace_seq *s)
256{
257 int ret;
258 struct syscall_trace_exit trace;
259
260 ret = trace_seq_printf(s,
261 "\tfield:%s %s;\toffset:%zu;\tsize:%zu;"
262 "\tsigned:%u;\n"
263 "\tfield:%s %s;\toffset:%zu;\tsize:%zu;"
264 "\tsigned:%u;\n",
265 SYSCALL_FIELD(int, nr),
266 SYSCALL_FIELD(long, ret));
267 if (!ret)
268 return 0;
269
270 return trace_seq_printf(s, "\nprint fmt: \"0x%%lx\", REC->ret\n");
271}
272
273int syscall_enter_define_fields(struct ftrace_event_call *call) 207int syscall_enter_define_fields(struct ftrace_event_call *call)
274{ 208{
275 struct syscall_trace_enter trace; 209 struct syscall_trace_enter trace;