Re: [RFC PATCH] ftrace/x86: Move the mcount/fentry code out of entry_64.S

From: Steven Rostedt
Date: Thu May 08 2014 - 18:37:58 EST


On Fri, 9 May 2014 00:21:37 +0200 (CEST)
Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:

> On Thu, 8 May 2014, Steven Rostedt wrote:
>

> I'm fine with the code move per se. That's a good thing.

Great, then I'll add this to my 3.16 queue.

Can I get your Acked-by for it?

>
> The live patcher argumentation for it is more than questionable.

Well, that was the final motivator. But I've been wanting to optimize
the function tracing a bit since it's been getting more and more users.
Namely, kprobes and perf. As such, I've been thinking about creating
custom trampolines (like what kprobes does today) where if there's two
or more users of ftrace, but they are using different functions, they
don't need to go through a loop, but instead have their own trampoline
that calls their function directly and is called by the functions they
trace.

Right now I'm working on getting the function graph tracer trampoline
(which is static) called directly if function graph is enabled.
Currently, we save regs for function tracing, restore them, and then
call function graph tracing. This is a big waste when function graph is
running by itself.

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/