Skip to content

Commit

Permalink
[S390] ftrace: update system call tracer support
Browse files Browse the repository at this point in the history
Commit fb34a08 ("tracing: Add trace events for each syscall
entry/exit") changed the lowlevel API to ftrace syscall tracing
but did not update s390 which started making use of it recently.

This broke the s390 build, as reported by Paul Mundt.

Update the callbacks with the syscall number and the syscall
return code values. This allows per syscall tracepoints,
syscall argument enumeration /debug/tracing/events/syscalls/
and perfcounters support and integration on s390 too.

Reported-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <tip-fb34a08c3469b2be9eae626ccb96476b4687b810@git.kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed Aug 19, 2009
1 parent 3be04b4 commit 5e9ad7d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arch/s390/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
#include "compat_ptrace.h"
#endif

DEFINE_TRACE(syscall_enter);
DEFINE_TRACE(syscall_exit);

enum s390_regset {
REGSET_GENERAL,
REGSET_FP,
Expand Down Expand Up @@ -662,7 +665,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
}

if (unlikely(test_thread_flag(TIF_SYSCALL_FTRACE)))
ftrace_syscall_enter(regs);
trace_syscall_enter(regs, regs->gprs[2]);

if (unlikely(current->audit_context))
audit_syscall_entry(is_compat_task() ?
Expand All @@ -680,7 +683,7 @@ asmlinkage void do_syscall_trace_exit(struct pt_regs *regs)
regs->gprs[2]);

if (unlikely(test_thread_flag(TIF_SYSCALL_FTRACE)))
ftrace_syscall_exit(regs);
trace_syscall_exit(regs, regs->gprs[2]);

if (test_thread_flag(TIF_SYSCALL_TRACE))
tracehook_report_syscall_exit(regs, 0);
Expand Down

0 comments on commit 5e9ad7d

Please sign in to comment.