Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-16 Thread Torsten Duwe
On Tue, Feb 16, 2016 at 09:09:16PM +1100, Michael Ellerman wrote: > On Mon, 2016-02-15 at 15:04 +0100, Torsten Duwe wrote: > > If you use "-pg -mprofile-kernel", gcc seems to forget that, and omits the > > TOC > > load, for a similar assembler calling sequence. > > That's by design. Ah, ok. >

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-16 Thread Torsten Duwe
On Tue, Feb 16, 2016 at 09:09:16PM +1100, Michael Ellerman wrote: > On Mon, 2016-02-15 at 15:04 +0100, Torsten Duwe wrote: > > If you use "-pg -mprofile-kernel", gcc seems to forget that, and omits the > > TOC > > load, for a similar assembler calling sequence. > > That's by design. Ah, ok. >

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-16 Thread Michael Ellerman
On Mon, 2016-02-15 at 15:04 +0100, Torsten Duwe wrote: > On Mon, Feb 15, 2016 at 09:27:15PM +1100, Michael Ellerman wrote: > > > > There is explicit code in gcc to check whether the TOC setup is needed and > > only > > That's undestood. The claim here is: that check is incomplete, at least. OK

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-16 Thread Michael Ellerman
On Mon, 2016-02-15 at 15:04 +0100, Torsten Duwe wrote: > On Mon, Feb 15, 2016 at 09:27:15PM +1100, Michael Ellerman wrote: > > > > There is explicit code in gcc to check whether the TOC setup is needed and > > only > > That's undestood. The claim here is: that check is incomplete, at least. OK

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-15 Thread Balbir Singh
On Mon, 2016-02-15 at 23:21 +0100, Torsten Duwe wrote: > On Mon, Feb 15, 2016 at 03:04:08PM +0100, Torsten Duwe wrote: > > If you use "-pg -mprofile-kernel", gcc seems to forget that, and omits the > > TOC > > load, for a similar assembler calling sequence. > > > > Looking at the code I can

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-15 Thread Balbir Singh
On Mon, 2016-02-15 at 23:21 +0100, Torsten Duwe wrote: > On Mon, Feb 15, 2016 at 03:04:08PM +0100, Torsten Duwe wrote: > > If you use "-pg -mprofile-kernel", gcc seems to forget that, and omits the > > TOC > > load, for a similar assembler calling sequence. > > > > Looking at the code I can

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-15 Thread Torsten Duwe
On Mon, Feb 15, 2016 at 03:04:08PM +0100, Torsten Duwe wrote: > If you use "-pg -mprofile-kernel", gcc seems to forget that, and omits the TOC > load, for a similar assembler calling sequence. > > Looking at the code I can _understand_ why this is so, but my GCC knowledge > is not that deep that

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-15 Thread Torsten Duwe
On Mon, Feb 15, 2016 at 03:04:08PM +0100, Torsten Duwe wrote: > If you use "-pg -mprofile-kernel", gcc seems to forget that, and omits the TOC > load, for a similar assembler calling sequence. > > Looking at the code I can _understand_ why this is so, but my GCC knowledge > is not that deep that

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-15 Thread Torsten Duwe
On Mon, Feb 15, 2016 at 09:27:15PM +1100, Michael Ellerman wrote: > > There is explicit code in gcc to check whether the TOC setup is needed and > only That's undestood. The claim here is: that check is incomplete, at least. > emit it when it's required. One case where it's *not* required is

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-15 Thread Torsten Duwe
On Mon, Feb 15, 2016 at 09:27:15PM +1100, Michael Ellerman wrote: > > There is explicit code in gcc to check whether the TOC setup is needed and > only That's undestood. The claim here is: that check is incomplete, at least. > emit it when it's required. One case where it's *not* required is

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-15 Thread Jiri Kosina
On Mon, 15 Feb 2016, Michael Ellerman wrote: > > > > +echo "int func() { return 0; }" | \ > > > > +$* -S -x c -O2 -p -mprofile-kernel - -o - 2> /dev/null | \ > > > > +sed -n -e '/func:/,/bl _mcount/p' | grep -q TOC > > > > + > > > > +leaf_toc_result=$? > > > > > > leaf_toc_result failed

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-15 Thread Jiri Kosina
On Mon, 15 Feb 2016, Michael Ellerman wrote: > > > > +echo "int func() { return 0; }" | \ > > > > +$* -S -x c -O2 -p -mprofile-kernel - -o - 2> /dev/null | \ > > > > +sed -n -e '/func:/,/bl _mcount/p' | grep -q TOC > > > > + > > > > +leaf_toc_result=$? > > > > > > leaf_toc_result failed

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-15 Thread Michael Ellerman
Hi guys, Sorry I haven't been keeping up to date with this thread I've been away. On Thu, 2016-02-11 at 09:42 +0100, Torsten Duwe wrote: > On Thu, Feb 11, 2016 at 06:48:17PM +1100, Balbir Singh wrote: > > On Wed, 2016-02-10 at 17:25 +0100, Torsten Duwe wrote: > > > + > > > +echo "int func() {

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-15 Thread Michael Ellerman
Hi guys, Sorry I haven't been keeping up to date with this thread I've been away. On Thu, 2016-02-11 at 09:42 +0100, Torsten Duwe wrote: > On Thu, Feb 11, 2016 at 06:48:17PM +1100, Balbir Singh wrote: > > On Wed, 2016-02-10 at 17:25 +0100, Torsten Duwe wrote: > > > + > > > +echo "int func() {

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-11 Thread Murali Sampath
: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables On Thu, 2016-02-11 at 14:09 +0530, Kamalesh Babulal wrote: > * Balbir Singh [2016-02-11 18:48:17]: > > > On Wed, 2016-02-10 at 17:25 +0100, Torsten Duwe wrote: > > > > snip > > > > > diff -

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-11 Thread Murali Sampath
: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables On Thu, 2016-02-11 at 14:09 +0530, Kamalesh Babulal wrote: > * Balbir Singh [2016-02-11 18:48:17]: > > > On Wed, 2016-02-10 at 17:25 +0100, Torsten Duwe wrote: > > > > snip > > > > > diff -

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-11 Thread Balbir Singh
On Thu, 2016-02-11 at 14:09 +0530, Kamalesh Babulal wrote: > * Balbir Singh [2016-02-11 18:48:17]: > > > On Wed, 2016-02-10 at 17:25 +0100, Torsten Duwe wrote: > > > > snip > > > > > diff --git a/arch/powerpc/gcc-mprofile-kernel-notrace.sh > > > b/arch/powerpc/gcc-mprofile-kernel-notrace.sh >

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-11 Thread Balbir Singh
On Thu, 2016-02-11 at 09:42 +0100, Torsten Duwe wrote: > On Thu, Feb 11, 2016 at 06:48:17PM +1100, Balbir Singh wrote: > > On Wed, 2016-02-10 at 17:25 +0100, Torsten Duwe wrote: > > > + > > > +echo "int func() { return 0; }" | \ > > > +$* -S -x c -O2 -p -mprofile-kernel - -o - 2> /dev/null | \

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-11 Thread Torsten Duwe
On Thu, Feb 11, 2016 at 06:48:17PM +1100, Balbir Singh wrote: > On Wed, 2016-02-10 at 17:25 +0100, Torsten Duwe wrote: > > + > > +echo "int func() { return 0; }" | \ > > +$* -S -x c -O2 -p -mprofile-kernel - -o - 2> /dev/null | \ > > +sed -n -e '/func:/,/bl _mcount/p' | grep -q TOC > > + >

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-11 Thread Kamalesh Babulal
* Balbir Singh [2016-02-11 18:48:17]: > On Wed, 2016-02-10 at 17:25 +0100, Torsten Duwe wrote: > > snip > > > diff --git a/arch/powerpc/gcc-mprofile-kernel-notrace.sh > > b/arch/powerpc/gcc-mprofile-kernel-notrace.sh > > new file mode 100755 > > index 000..68d6482 > > --- /dev/null > >

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-11 Thread Torsten Duwe
On Thu, Feb 11, 2016 at 06:48:17PM +1100, Balbir Singh wrote: > On Wed, 2016-02-10 at 17:25 +0100, Torsten Duwe wrote: > > + > > +echo "int func() { return 0; }" | \ > > +$* -S -x c -O2 -p -mprofile-kernel - -o - 2> /dev/null | \ > > +sed -n -e '/func:/,/bl _mcount/p' | grep -q TOC > > + >

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-11 Thread Kamalesh Babulal
* Balbir Singh [2016-02-11 18:48:17]: > On Wed, 2016-02-10 at 17:25 +0100, Torsten Duwe wrote: > > snip > > > diff --git a/arch/powerpc/gcc-mprofile-kernel-notrace.sh > > b/arch/powerpc/gcc-mprofile-kernel-notrace.sh > > new file mode 100755 > > index 000..68d6482 >

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-11 Thread Balbir Singh
On Thu, 2016-02-11 at 14:09 +0530, Kamalesh Babulal wrote: > * Balbir Singh [2016-02-11 18:48:17]: > > > On Wed, 2016-02-10 at 17:25 +0100, Torsten Duwe wrote: > > > > snip > > > > > diff --git a/arch/powerpc/gcc-mprofile-kernel-notrace.sh > > >

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-11 Thread Balbir Singh
On Thu, 2016-02-11 at 09:42 +0100, Torsten Duwe wrote: > On Thu, Feb 11, 2016 at 06:48:17PM +1100, Balbir Singh wrote: > > On Wed, 2016-02-10 at 17:25 +0100, Torsten Duwe wrote: > > > + > > > +echo "int func() { return 0; }" | \ > > > +$* -S -x c -O2 -p -mprofile-kernel - -o - 2> /dev/null | \

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-11 Thread Murali Sampath
: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables On Thu, 2016-02-11 at 14:09 +0530, Kamalesh Babulal wrote: > * Balbir Singh <bsinghar...@gmail.com> [2016-02-11 18:48:17]: > > > On Wed, 2016-02-10 at 17:25 +0100, Torsten Duwe wrote: > > > > snip > >

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-11 Thread Murali Sampath
: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables On Thu, 2016-02-11 at 14:09 +0530, Kamalesh Babulal wrote: > * Balbir Singh <bsinghar...@gmail.com> [2016-02-11 18:48:17]: > > > On Wed, 2016-02-10 at 17:25 +0100, Torsten Duwe wrote: > > > > snip >

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-10 Thread Balbir Singh
On Wed, 2016-02-10 at 17:25 +0100, Torsten Duwe wrote: snip > diff --git a/arch/powerpc/gcc-mprofile-kernel-notrace.sh > b/arch/powerpc/gcc-mprofile-kernel-notrace.sh > new file mode 100755 > index 000..68d6482 > --- /dev/null > +++ b/arch/powerpc/gcc-mprofile-kernel-notrace.sh > @@ -0,0

[PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-10 Thread Torsten Duwe
* arch/powerpc/Makefile: - globally use -mprofile-kernel in case it's configured, available and bug-free. * arch/powerpc/gcc-mprofile-kernel-notrace.sh: - make sure -mprofile-kernel works and has none of the known bugs. * arch/powerpc/kernel/ftrace.c: - error out on

[PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-10 Thread Torsten Duwe
* arch/powerpc/Makefile: - globally use -mprofile-kernel in case it's configured, available and bug-free. * arch/powerpc/gcc-mprofile-kernel-notrace.sh: - make sure -mprofile-kernel works and has none of the known bugs. * arch/powerpc/kernel/ftrace.c: - error out on

Re: [PATCH v8 4/8] ppc64 ftrace_with_regs configuration variables

2016-02-10 Thread Balbir Singh
On Wed, 2016-02-10 at 17:25 +0100, Torsten Duwe wrote: snip > diff --git a/arch/powerpc/gcc-mprofile-kernel-notrace.sh > b/arch/powerpc/gcc-mprofile-kernel-notrace.sh > new file mode 100755 > index 000..68d6482 > --- /dev/null > +++ b/arch/powerpc/gcc-mprofile-kernel-notrace.sh > @@ -0,0