public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] recordmcount.pl: add support for __fentry__
@ 2013-10-31 15:59 Jamie Iles
  2013-10-31 16:09 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Jamie Iles @ 2013-10-31 15:59 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jamie Iles, Steven Rostedt

With gcc 4.6.0 the -mfentry feature places the function profiling call
at the start of the function. When this is used, the call is to
__fentry__ and not mcount.

Based on 48bb5dc6cd9d30fe0d594947563da1f8bd9abada (ftrace: Make
recordmcount.c handle __fentry__).

Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Jamie Iles <jamie.iles@oracle.com>
---
 scripts/recordmcount.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index a674fd5..6460fc68 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -214,7 +214,7 @@ $local_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\S+)";
 $weak_regex = "^[0-9a-fA-F]+\\s+([wW])\\s+(\\S+)";
 $section_regex = "Disassembly of section\\s+(\\S+):";
 $function_regex = "^([0-9a-fA-F]+)\\s+<(.*?)>:";
-$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount\$";
+$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s(mcount|__fentry__)\$";
 $section_type = '@progbits';
 $mcount_adjust = 0;
 $type = ".long";
-- 
1.8.4.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] recordmcount.pl: add support for __fentry__
  2013-10-31 15:59 [PATCH] recordmcount.pl: add support for __fentry__ Jamie Iles
@ 2013-10-31 16:09 ` Steven Rostedt
  2013-10-31 16:18   ` Jamie Iles
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2013-10-31 16:09 UTC (permalink / raw)
  To: Jamie Iles; +Cc: linux-kernel

On Thu, 31 Oct 2013 15:59:58 +0000
Jamie Iles <jamie.iles@oracle.com> wrote:

> With gcc 4.6.0 the -mfentry feature places the function profiling call
> at the start of the function. When this is used, the call is to
> __fentry__ and not mcount.
> 
> Based on 48bb5dc6cd9d30fe0d594947563da1f8bd9abada (ftrace: Make
> recordmcount.c handle __fentry__).

Why? All current users of __fentry__ use the C version of recordmcount.
This just slows down the few archs that still use recordmcount.pl.

-- Steve

> 
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Signed-off-by: Jamie Iles <jamie.iles@oracle.com>
> ---
>  scripts/recordmcount.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
> index a674fd5..6460fc68 100755
> --- a/scripts/recordmcount.pl
> +++ b/scripts/recordmcount.pl
> @@ -214,7 +214,7 @@ $local_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\S+)";
>  $weak_regex = "^[0-9a-fA-F]+\\s+([wW])\\s+(\\S+)";
>  $section_regex = "Disassembly of section\\s+(\\S+):";
>  $function_regex = "^([0-9a-fA-F]+)\\s+<(.*?)>:";
> -$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount\$";
> +$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s(mcount|__fentry__)\$";
>  $section_type = '@progbits';
>  $mcount_adjust = 0;
>  $type = ".long";


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] recordmcount.pl: add support for __fentry__
  2013-10-31 16:09 ` Steven Rostedt
@ 2013-10-31 16:18   ` Jamie Iles
  0 siblings, 0 replies; 3+ messages in thread
From: Jamie Iles @ 2013-10-31 16:18 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Jamie Iles, linux-kernel

On Thu, Oct 31, 2013 at 12:09:26PM -0400, Steven Rostedt wrote:
> On Thu, 31 Oct 2013 15:59:58 +0000
> Jamie Iles <jamie.iles@oracle.com> wrote:
> 
> > With gcc 4.6.0 the -mfentry feature places the function profiling call
> > at the start of the function. When this is used, the call is to
> > __fentry__ and not mcount.
> > 
> > Based on 48bb5dc6cd9d30fe0d594947563da1f8bd9abada (ftrace: Make
> > recordmcount.c handle __fentry__).
> 
> Why? All current users of __fentry__ use the C version of recordmcount.
> This just slows down the few archs that still use recordmcount.pl.

Okay, it's probably fair to drop this one then if it's not useful to the 
other arches.  We have a corner case with Ksplice where the C version of 
mcount not writing the section symbol for __mcount_loc causes a problem 
and we fall back to the perl version, but I'll spend some time working 
on fixing that instead.

Thanks,

Jamie

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-31 16:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-31 15:59 [PATCH] recordmcount.pl: add support for __fentry__ Jamie Iles
2013-10-31 16:09 ` Steven Rostedt
2013-10-31 16:18   ` Jamie Iles

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox