Skip to contentSkip to conversation

ftrace: update system call tracer support

tip:tracing/core tip-bot for Ingo Molnar 1 participant 3 messages Aug 18, 2009 – Aug 19, 2009 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Commit-ID:  a9008fd42b1c3c89f684d90bdfb9c2d05c7af119
Gitweb:     http://git.kernel.org/tip/a9008fd42b1c3c89f684d90bdfb9c2d05c7af119
Author:     Ingo Molnar <[email protected]>
AuthorDate: Tue, 18 Aug 2009 10:41:57 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue, 18 Aug 2009 10:41:49 +0200

[S390] ftrace: update system call tracer support

Commit fb34a08c3 ("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.

Cc Heiko Carstens <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Jason Baron <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Frederic Weisbecker <[email protected]>

LKML-Reference: <[email protected]>

---
 arch/s390/kernel/ptrace.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/s390/kernel/ptrace.c +2 -2
index 43acd73..05f57cd 100644
@@ -662,7 +662,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() ?
@@ -680,7 +680,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);
#2 lore raw
In reply to a message not in the archive
Commit-ID:  130cd840892285eaf1eadf71217b34af3395107f
Gitweb:     http://git.kernel.org/tip/130cd840892285eaf1eadf71217b34af3395107f
Author:     Ingo Molnar <[email protected]>
AuthorDate: Tue, 18 Aug 2009 10:41:57 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue, 18 Aug 2009 12:03:19 +0200

[S390] ftrace: update system call tracer support

Commit fb34a08c3 ("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.

Cc Heiko Carstens <[email protected]>
Cc Jason Baron <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Frederic Weisbecker <[email protected]>

LKML-Reference: <[email protected]>

---
 arch/s390/kernel/ptrace.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/s390/kernel/ptrace.c +2 -2
index 43acd73..05f57cd 100644
@@ -662,7 +662,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() ?
@@ -680,7 +680,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);
#3 lore raw
In reply to a message not in the archive
Commit-ID:  5e9ad7df9fd056f1071af8aa91034a1c3170257d
Gitweb:     http://git.kernel.org/tip/5e9ad7df9fd056f1071af8aa91034a1c3170257d
Author:     Ingo Molnar <[email protected]>
AuthorDate: Tue, 18 Aug 2009 10:41:57 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Wed, 19 Aug 2009 14:16:15 +0200

[S390] ftrace: update system call tracer support

Commit fb34a08c3 ("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.

Cc Heiko Carstens <[email protected]>
Cc Jason Baron <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Frederic Weisbecker <[email protected]>

LKML-Reference: <[email protected]>

---
 arch/s390/kernel/ptrace.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
arch/s390/kernel/ptrace.c +5 -2
index 43acd73..c5e87d8 100644
@@ -51,6 +51,9 @@
 #include "compat_ptrace.h"
 #endif
 
+DEFINE_TRACE(syscall_enter);
+DEFINE_TRACE(syscall_exit);
+
 enum s390_regset {
 	REGSET_GENERAL,
 	REGSET_FP,
@@ -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() ?
@@ -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);