[S390] ftrace: update system call tracer support

From: Ingo Molnar
Date: Tue Aug 18 2009 - 04:52:18 EST



* Ingo Molnar <mingo@xxxxxxx> wrote:

> * Paul Mundt <lethal@xxxxxxxxxxxx> 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@xxxxxxxxx> 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

------------------------------>