Skip to content

Commit

Permalink
trace_syscalls: Add syscall nr field
Browse files Browse the repository at this point in the history
Field syscall number is missed in syscall_enter_define_fields()/
syscall_exit_define_fields().

Syscall number is also needed for event filter or other users.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <4B0E330D.1070206@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Lai Jiangshan authored and Ingo Molnar committed Nov 27, 2009
1 parent dd1853c commit 0f1ef51
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions kernel/trace/trace_syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ int syscall_enter_define_fields(struct ftrace_event_call *call)
if (ret)
return ret;

ret = trace_define_field(call, SYSCALL_FIELD(int, nr), FILTER_OTHER);
if (ret)
return ret;

for (i = 0; i < meta->nb_args; i++) {
ret = trace_define_field(call, meta->types[i],
meta->args[i], offset,
Expand All @@ -281,6 +285,10 @@ int syscall_exit_define_fields(struct ftrace_event_call *call)
if (ret)
return ret;

ret = trace_define_field(call, SYSCALL_FIELD(int, nr), FILTER_OTHER);
if (ret)
return ret;

ret = trace_define_field(call, SYSCALL_FIELD(long, ret),
FILTER_OTHER);

Expand Down

0 comments on commit 0f1ef51

Please sign in to comment.