From: Jason Baron <jbaron@redhat.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mundt <lethal@linux-sh.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Frederic Weisbecker <fweisbec@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
Lai Jiangshan <laijs@cn.fujitsu.com>,
Steven Rostedt <rostedt@goodmis.org>,
Peter Zijlstra <peterz@infradead.org>,
Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
Jiaying Zhang <jiayingz@google.com>,
Martin Bligh <mbligh@google.com>, Li Zefan <lizf@cn.fujitsu.com>,
Masami Hiramatsu <mhiramat@redhat.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Wu Zhangjin <wuzj@lemote.com>,
linux-next@vger.kernel.org,
Heiko Carstens <heiko.carstens@de.ibm.com>
Subject: Re: [S390] ftrace: update system call tracer support
Date: Tue, 18 Aug 2009 10:56:44 -0400 [thread overview]
Message-ID: <20090818145644.GB2669@redhat.com> (raw)
In-Reply-To: <20090818085110.GA2074@elte.hu>
On Tue, Aug 18, 2009 at 10:51:10AM +0200, Ingo Molnar wrote:
> * Ingo Molnar <mingo@elte.hu> wrote:
>
> > * Paul Mundt <lethal@linux-sh.org> wrote:
> >
> > > [ Adding to Cc everyone that now has a broken tree thanks to this .. ]
> > >
> > > On Wed, Aug 12, 2009 at 11:11:33AM +0200, Ingo Molnar wrote:
> > > > * Frederic Weisbecker <fweisbec@gmail.com> wrote:
> > > > > This pull request integrate one cleanup/fix for ftrace and an
> > > > > update for syscall tracing: the migration from old-style tracer to
> > > > > individual tracepoints/trace_events and the support for perf
> > > > > counter.
> > > > >
> > > > > I've tested it with success either with ftrace (every syscall
> > > > > tracepoints enabled at the same time without problems) and with
> > > > > perfcounter.
> > > > >
> > > > > May be one drawback: it creates so much trace events that the
> > > > > ftrace selftests can take some time :-)
> > > >
> > > > Pulled, thanks a lot!
> > >
> > > And this has now subsequently broken every single SH and S390
> > > configuration, [...]
> >
> > I test SH cross-builds regularly. I just checked the SH defconfig
> > and it builds just fine here:
> >
> > $ make -j32 CROSS_COMPILE=sh3-linux- ARCH=sh vmlinux
>
> The s390 build indeed broke. (This got masked by the s390 toolchain
> i'm using not having been able to build Linus's tree - i fixed
> that.)
>
> Could you try the fix below? It does the trick here.
>
> Martin, Heiko - does the fix look good to you? regs->gprs[2] seems
> to be the register used for both the syscall number (enter
> callback) and for the return code (exit callback).
>
> Regarding SH, the fixup should be similarly trivial. Since SH's
> FTRACE_SYSCALLS code is not upstream yet it can (and should) be
> carried in the tree that integrates the SH tree and the tracing
> tree - linux-next in this case.
>
> Thanks,
>
> Ingo
>
> ------------------------------>
> From a9008fd42b1c3c89f684d90bdfb9c2d05c7af119 Mon Sep 17 00:00:00 2001
> From: Ingo Molnar <mingo@elte.hu>
> Date: Tue, 18 Aug 2009 10:41:57 +0200
> Subject: [PATCH] [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.
>
> Reported-by: Paul Mundt <lethal@linux-sh.org>
> Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
> Cc: Martin Schwidefsky <schwidefsky@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>
> ---
> arch/s390/kernel/ptrace.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
> index 43acd73..05f57cd 100644
> --- a/arch/s390/kernel/ptrace.c
> +++ b/arch/s390/kernel/ptrace.c
> @@ -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);
thanks for fixing this up Ingo! Sorry for all the trouble.
perhaps, we should just reduce the entry/exit routines to just pass
'regs' since we already have the following abstractions for callbacks:
syscall_get_nr(current, regs);
syscall_get_return_value(current, regs);
Thus, we really only need to be passing 'regs'. I was passing more information
here, to make it easier for other users of the tracepoints...
thanks,
-Jason
next prev parent reply other threads:[~2009-08-18 14:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1250016545-6601-1-git-send-email-fweisbec@gmail.com>
[not found] ` <20090812091133.GA21655@elte.hu>
2009-08-18 0:46 ` [GIT PULL] tracing: Syscalls trace events + perf support Paul Mundt
2009-08-18 7:32 ` Ingo Molnar
2009-08-18 8:51 ` [S390] ftrace: update system call tracer support Ingo Molnar
[not found] ` <20090818085110.GA2074@elte.hu>
2009-08-18 8:59 ` Martin Schwidefsky
2009-08-18 10:05 ` Ingo Molnar
2009-08-18 10:22 ` Martin Schwidefsky
2009-08-18 14:56 ` Jason Baron [this message]
2009-08-18 10:25 ` [GIT PULL] tracing: Syscalls trace events + perf support Frederic Weisbecker
2009-08-18 11:06 ` Ingo Molnar
2009-08-18 11:56 ` Paul Mundt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090818145644.GB2669@redhat.com \
--to=jbaron@redhat.com \
--cc=fweisbec@gmail.com \
--cc=heiko.carstens@de.ibm.com \
--cc=jiayingz@google.com \
--cc=laijs@cn.fujitsu.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mbligh@google.com \
--cc=mhiramat@redhat.com \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=schwidefsky@de.ibm.com \
--cc=sfr@canb.auug.org.au \
--cc=wuzj@lemote.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).