Re: [RFC][PATCH][REGRESSION FIX] x86/ftrace: Add ORC annotation to 64 bit ftrace assembly

From: Steven Rostedt
Date: Fri Dec 22 2017 - 13:38:10 EST

On Fri, 22 Dec 2017 12:30:24 -0600
Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:

> I'm officially on vacation but I got a chance to look at this myself a
> few minutes ago. This looks mostly right. In theory, you should able
> to mark those as functions by changing END to ENDPROC. Then you won't
> need all the UNWIND_HINT_FUNCs.

Yep, that was my first solution, but as you found, objtool complained
about it.

> I tried making that change, but objtool thinks the stack frame is still
> modified when the functions return. I didn't see anything obvious in
> save_mcount_regs or restore_mcount_regs that should cause it to think
> that. I'll need to look into it a little more.


Worse comes to worse, we can keep this change, and you can enjoy your
holidays. I just need this fixed before 4.15 is released.

I'll be jumping into objtool shortly, to see if I can merge the code
from recordmcount.c with it too. I'm going to need to learn ORC and
DWARF to start on extending the function tracer to act more like
tracepoints (like I discussed with Linus in Prague).

-- Steve