Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1343205

Re: [PATCH 10/12] powerpc/ftrace: FTRACE_WITH_REGS configuration variables

From Torsten Duwe <duwe@lst.de>
Newsgroups linux.kernel
Subject Re: [PATCH 10/12] powerpc/ftrace: FTRACE_WITH_REGS configuration variables
Date 2016-02-25 15:40 +0100
Message-ID <r65fc-59a-7@gated-at.bofh.it> (permalink)
References <r5IBX-5Pl-7@gated-at.bofh.it> <r5ILE-5T6-27@gated-at.bofh.it> <r5SKZ-4FT-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Feb 25, 2016 at 12:11:33PM +1100, Balbir Singh wrote:
> On 25/02/16 01:28, Michael Ellerman wrote:
> >
> > diff --git a/arch/powerpc/gcc-mprofile-kernel-notrace.sh b/arch/powerpc/gcc-mprofile-kernel-notrace.sh
> > new file mode 100755
> > index 000000000000..68d6482d56ab
> > --- /dev/null
> > +++ b/arch/powerpc/gcc-mprofile-kernel-notrace.sh
> > @@ -0,0 +1,33 @@
> > +#!/bin/sh
> > +# Test whether the compile option -mprofile-kernel
> > +# generates profiling code ( = a call to mcount), and
> > +# whether a function without any global references sets
> > +# the TOC pointer properly at the beginning, and

Remove the above two lines, for completeness,

> > +# whether the "notrace" function attribute successfully
> > +# suppresses the _mcount call.
> > +
> > +echo "int func() { return 0; }" | \
> > +    $* -S -x c -O2 -p -mprofile-kernel - -o - 2> /dev/null | \
> > +    grep -q "mcount"
> > +
> > +trace_result=$?
> > +
> > +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=$?
> > +
> We should remove this bit, we don't need a TOC for leaf procedures anymore

Exactly. I thought it was a bug when I wrote this test, Michael insisted
it was a feature :-)

> > +/bin/echo -e "#include <linux/compiler.h>\nnotrace int func() { return 0; }" | \
> > +    $* -S -x c -O2 -p -mprofile-kernel - -o - 2> /dev/null | \
> > +    grep -q "mcount"
> > +
> > +notrace_result=$?
> > +
> > +if [ "$trace_result" -eq "0" -a \
> > +	"$leaf_toc_result" -eq "0" -a \

In particular, remove this ^ line.

> > +	"$notrace_result" -eq "1" ]; then
> > +	echo y
> > +else
> > +	echo n
> > +fi

That version would have made it into my v9.

Signed-off-by: Torsten Duwe <duwe@suse.de>

	Torsten

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 01/12] powerpc/module: Only try to generate the ftrace_caller() stub once Michael Ellerman <mpe@ellerman.id.au> - 2016-02-24 15:30 +0100
  [PATCH 02/12] powerpc/module: Mark module stubs with a magic value Michael Ellerman <mpe@ellerman.id.au> - 2016-02-24 15:40 +0100
    Re: [PATCH 02/12] powerpc/module: Mark module stubs with a magic  value Balbir Singh <bsingharora@gmail.com> - 2016-02-25 01:10 +0100
      Re: [PATCH 02/12] powerpc/module: Mark module stubs with a magic  value Michael Ellerman <mpe@ellerman.id.au> - 2016-02-25 07:50 +0100
    Re: [PATCH 02/12] powerpc/module: Mark module stubs with a magic  value Torsten Duwe <duwe@lst.de> - 2016-02-25 14:20 +0100
      Re: [PATCH 02/12] powerpc/module: Mark module stubs with a magic  value Michael Ellerman <mpe@ellerman.id.au> - 2016-02-26 11:40 +0100
  [PATCH 06/12] powerpc/module: Rework is_early_mcount_callsite() Michael Ellerman <mpe@ellerman.id.au> - 2016-02-24 15:40 +0100
    Re: [PATCH 06/12] powerpc/module: Rework is_early_mcount_callsite() Balbir Singh <bsingharora@gmail.com> - 2016-02-25 00:40 +0100
      Re: [PATCH 06/12] powerpc/module: Rework is_early_mcount_callsite() Michael Ellerman <mpe@ellerman.id.au> - 2016-02-25 11:30 +0100
        Re: [PATCH 06/12] powerpc/module: Rework is_early_mcount_callsite() Torsten Duwe <duwe@lst.de> - 2016-02-25 15:10 +0100
  [PATCH 05/12] powerpc/ftrace: ftrace_graph_caller() needs to save/restore toc Michael Ellerman <mpe@ellerman.id.au> - 2016-02-24 15:40 +0100
    Re: [PATCH 05/12] powerpc/ftrace: ftrace_graph_caller() needs to  save/restore toc Balbir Singh <bsingharora@gmail.com> - 2016-02-25 01:40 +0100
      Re: [PATCH 05/12] powerpc/ftrace: ftrace_graph_caller() needs to  save/restore toc Michael Ellerman <mpe@ellerman.id.au> - 2016-02-25 11:50 +0100
      Re: [PATCH 05/12] powerpc/ftrace: ftrace_graph_caller() needs to  save/restore toc Torsten Duwe <duwe@lst.de> - 2016-02-25 15:10 +0100
  [PATCH 10/12] powerpc/ftrace: FTRACE_WITH_REGS configuration variables Michael Ellerman <mpe@ellerman.id.au> - 2016-02-24 15:40 +0100
    Re: [PATCH 10/12] powerpc/ftrace: FTRACE_WITH_REGS configuration  variables Balbir Singh <bsingharora@gmail.com> - 2016-02-25 02:20 +0100
      Re: [PATCH 10/12] powerpc/ftrace: FTRACE_WITH_REGS configuration  variables Torsten Duwe <duwe@lst.de> - 2016-02-25 15:40 +0100
  [PATCH 07/12] powerpc/ftrace: FTRACE_WITH_REGS implementation for ppc64le Michael Ellerman <mpe@ellerman.id.au> - 2016-02-24 15:40 +0100
    Re: [PATCH 07/12] powerpc/ftrace: FTRACE_WITH_REGS implementation for  ppc64le Balbir Singh <bsingharora@gmail.com> - 2016-02-25 01:50 +0100
      Re: [PATCH 07/12] powerpc/ftrace: FTRACE_WITH_REGS implementation  for ppc64le Torsten Duwe <duwe@lst.de> - 2016-02-25 16:20 +0100
        Re: [PATCH 07/12] powerpc/ftrace: FTRACE_WITH_REGS implementation  for ppc64le Michael Ellerman <mpe@ellerman.id.au> - 2016-02-26 11:20 +0100
  [PATCH 09/12] powerpc/ftrace: Use generic ftrace_modify_all_code() Michael Ellerman <mpe@ellerman.id.au> - 2016-02-24 15:40 +0100
    Re: [PATCH 09/12] powerpc/ftrace: Use generic  ftrace_modify_all_code() Balbir Singh <bsingharora@gmail.com> - 2016-02-25 02:20 +0100
  [PATCH 03/12] powerpc/module: Create a special stub for ftrace_caller() Michael Ellerman <mpe@ellerman.id.au> - 2016-02-24 15:40 +0100
    Re: [PATCH 03/12] powerpc/module: Create a special stub for  ftrace_caller() Balbir Singh <bsingharora@gmail.com> - 2016-02-25 01:10 +0100
      Re: [PATCH 03/12] powerpc/module: Create a special stub for  ftrace_caller() Michael Ellerman <mpe@ellerman.id.au> - 2016-02-25 11:50 +0100
      Re: [PATCH 03/12] powerpc/module: Create a special stub for  ftrace_caller() Torsten Duwe <duwe@lst.de> - 2016-02-25 14:40 +0100
        Re: [PATCH 03/12] powerpc/module: Create a special stub for  ftrace_caller() Michael Ellerman <mpe@ellerman.id.au> - 2016-02-26 11:40 +0100
  Re: [PATCH 01/12] powerpc/module: Only try to generate the  ftrace_caller() stub once Balbir Singh <bsingharora@gmail.com> - 2016-02-25 01:00 +0100
    Re: [PATCH 01/12] powerpc/module: Only try to generate the  ftrace_caller() stub once Balbir Singh <bsingharora@gmail.com> - 2016-02-25 05:40 +0100
  Re: [PATCH 01/12] powerpc/module: Only try to generate the  ftrace_caller() stub once Torsten Duwe <duwe@lst.de> - 2016-02-25 14:10 +0100
  Re: [PATCH 01/12] powerpc/module: Only try to generate the  ftrace_caller() stub once Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> - 2016-02-25 15:40 +0100

csiph-web