RFC ftrace/x86: Clean up of mcount.S code
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 RFC Latest9 patches 4 repliesIn review
- v1 RFC7 patches 4 repliesSuperseded
Patches in v2 No applies recorded yet
Reviews trailers per patch
None of the 9 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Thomas Gleixner |
|---|---|
| Series | R-b |
| 1/9 | |
| 2/9 | |
| 3/9 | |
| 4/9 | |
| 5/9 | |
| 6/9 | |
| 7/9 | |
| 8/9 | |
| 9/9 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC][PATCH 0/9 v2] ftrace/x86: Clean up of mcount.S code
Linus,
I ran these through my test suite and they passed. Are these changes fine for you? If so, I'll include them in my 3.19 queue.
I still think the "band-aid patch" should go into 3.18 now, as it does fix a real bug, and is small and less likely to cause any regressions that this patch series might do. Which also makes it a candidate for stable.
The rolled up patch is below as well, and you can get the full code from my git tree.
Thanks,
-- Steve
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
rfc/mcount-update
Head SHA1: dcdf7dedfa5d4efd22306b0463469ef35fac8d27
Steven Rostedt (Red Hat) (9):
ftrace/x86: Have static tracing also use ftrace_caller_setup ftrace/x86: Move MCOUNT_SAVE_FRAME out of header file
ftrace/x86: Rename MCOUNT_SAVE_FRAME and add more detailed comments ftrace/x86: Have save_mcount_regs store RIP in %rdi for first parameter ftrace/x86: Simplify save_mcount_regs on getting RIP
ftrace/x86: Add macro MCOUNT_REG_SIZE for amount of stack used to save mcount regs ftrace/x86: Have save_mcount_regs macro also save stack frames if needed ftrace/x86: Get rid of ftrace_caller_setup
ftrace/fgraph/x86: Have prepare_ftrace_return() take ip as first parameter
----
arch/x86/include/asm/ftrace.h | 33 ------ arch/x86/kernel/ftrace.c | 4 +- arch/x86/kernel/mcount_64.S | 233 ++++++++++++++++++++++++++---------------- 3 files changed, 149 insertions(+), 121 deletions(-)
---------------------------
arch/x86/include/asm/ftrace.h +0 -33
@@ -1,39 +1,6 @@#ifndef _ASM_X86_FTRACE_H#define _ASM_X86_FTRACE_H -#ifdef __ASSEMBLY__ - -/* skip is set if the stack was already partially adjusted */ - .macro MCOUNT_SAVE_FRAME skip=0 -/* -* We add enough stack to save all regs. - */ - subq $(SS+8-\skip), %rsp - movq %rax, RAX(%rsp) - movq %rcx, RCX(%rsp) - movq %rdx, RDX(%rsp) - movq %rsi, RSI(%rsp) - movq %rdi, RDI(%rsp) - movq %r8, R8(%rsp) - movq %r9, R9(%rsp) - /* Move RIP to its proper location */ - movq SS+8(%rsp), %rdx - movq %rdx, RIP(%rsp) - .endm - - .macro MCOUNT_RESTORE_FRAME skip=0 - movq R9(%rsp), %r9 - movq R8(%rsp), %r8 - movq RDI(%rsp), %rdi - movq RSI(%rsp), %rsi - movq RDX(%rsp), %rdx - movq RCX(%rsp), %rcx - movq RAX(%rsp), %rax - addq $(SS+8-\skip), %rsp - .endm - -#endif -#ifdef CONFIG_FUNCTION_TRACER #ifdef CC_USING_FENTRY # define MCOUNT_ADDR ((long)(__fentry__))
arch/x86/kernel/ftrace.c +2 -2
@@ -871,7 +871,7 @@ static void *addr_from_call(void *ptr)return ptr +MCOUNT_INSN_SIZE + calc.offset; } -void prepare_ftrace_return (unsigned long *parent,unsigned long self_addr, +void prepare_ftrace_return (unsigned long self_addr,unsigned long *parent,unsigned long frame_pointer);/*
@@ -964,7 +964,7 @@ int ftrace_disable_ftrace_graph_caller(void)* Hook the return address and push it in the stack of return addrs * in current thread info. */ -void prepare_ftrace_return (unsigned long *parent,unsigned long self_addr, +void prepare_ftrace_return (unsigned long self_addr,unsigned long *parent,unsigned long frame_pointer) {unsigned long old;
arch/x86/kernel/mcount_64.S +147 -86
333 lines not on this page · raw message