[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1358436945.23211.10.camel@gandalf.local.home>
Date: Thu, 17 Jan 2013 10:35:45 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Alan Cooper <alcooperx@...il.com>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>, ddaney.cavm@...il.com,
ralf@...ux-mips.org, linux-mips@...ux-mips.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] mips: function tracer: Fix broken function tracing
On Thu, 2013-01-17 at 09:58 -0500, Alan Cooper wrote:
> When the kernel first boots we have to be able to handle the gcc
> generated jalr, addui sequence until ftrace_init gets a chance to run
> and change the sequence. At this point mcount just adjusts the stack
> and returns. When ftrace_init runs, we convert the jalr/addui to nops.
> Then whenever tracing is enabled we convert the first nop to a "jalr
> mcount+8". The mcount+8 entry point skips the stack adjust.
>
I was confused by that too.
>
> On Thu, Jan 17, 2013 at 1:27 AM, Geert Uytterhoeven
> >
> >> @@ -69,7 +68,7 @@ NESTED(ftrace_caller, PT_SIZE, ra)
> >> .globl _mcount
> >> _mcount:
> >> b ftrace_stub
> >> - nop
> >> + addiu sp,sp,8
Can you add a comment here:
/* When tracing is activated, it calls ftrace_caller+8 (aka here) */
> >> lw t1, function_trace_stop
> >> bnez t1, ftrace_stub
> >> nop
> >
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists