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


Groups > linux.kernel > #1349766

Re: [PATCH v3 7/8] powerpc/ftrace: Add support for -mprofile-kernel ftrace ABI

From Balbir Singh <bsingharora@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 7/8] powerpc/ftrace: Add support for -mprofile-kernel ftrace ABI
Date 2016-03-04 03:00 +0100
Message-ID <r8Nc6-7Fq-11@gated-at.bofh.it> (permalink)
References <r8t3I-1BU-3@gated-at.bofh.it> <r8t3I-1BU-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 03/03/16 15:26, Michael Ellerman wrote:
> From: Torsten Duwe <duwe@suse.de>
>
> The gcc switch -mprofile-kernel defines a new ABI for calling _mcount()
> very early in the function with minimal overhead.
>
> Although mprofile-kernel has been available since GCC 3.4, there were
> bugs which were only fixed recently. Currently it is known to work in
> GCC 4.9, 5 and 6.
>
> Additionally there are two possible code sequences generated by the
> flag, the first uses mflr/std/bl and the second is optimised to omit the
> std. Currently only gcc 6 has the optimised sequence. This patch
> supports both sequences.
>
> Initial work started by Vojtech Pavlik, used with permission.
>
> Key changes:
>  - rework _mcount() to work for both the old and new ABIs.
>  - implement new versions of ftrace_caller() and ftrace_graph_caller()
>    which deal with the new ABI.
>  - updates to __ftrace_make_nop() to recognise the new mcount calling
>    sequence.
>  - updates to __ftrace_make_call() to recognise the nop'ed sequence.
>  - implement ftrace_modify_call().
>  - updates to the module loader to surpress the toc save in the module
>    stub when calling mcount with the new ABI.
>
> Signed-off-by: Torsten Duwe <duwe@suse.de>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
>
Reviewed-by: Balbir Singh <bsingharora@gmail.com>

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


Thread

[PATCH v3 7/8] powerpc/ftrace: Add support for -mprofile-kernel ftrace ABI Michael Ellerman <mpe@ellerman.id.au> - 2016-03-03 05:30 +0100
  Re: [PATCH v3 7/8] powerpc/ftrace: Add support for -mprofile-kernel  ftrace ABI Balbir Singh <bsingharora@gmail.com> - 2016-03-04 03:00 +0100

csiph-web