* [PATCH 0/1] powerpc: make mcount a stub for dynamic ftrace @ 2008-11-20 21:55 Steven Rostedt 2008-11-20 21:55 ` [PATCH 1/1] powerpc: ftrace, do nothing in mcount call for dyn ftrace Steven Rostedt 2008-11-23 12:49 ` [PATCH 0/1] powerpc: make mcount a stub for dynamic ftrace Ingo Molnar 0 siblings, 2 replies; 3+ messages in thread From: Steven Rostedt @ 2008-11-20 21:55 UTC (permalink / raw) To: linux-kernel; +Cc: Ingo Molnar, Paul Mackerras, Andrew Morton, linuxppc-dev Paul, I have one more patch. I added it to the end of the ppc/ftrace branch. The new way of handling the finding of mcounts means we do not need to do anything in the mcount call itself. It should just be a stub and when ftrace is enabled, it will change the caller sites to call something other than mcount. The following patches are in: git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git branch: ppc/ftrace Steven Rostedt (1): powerpc: ftrace, do nothing in mcount call for dyn ftrace ---- arch/powerpc/kernel/entry_32.S | 35 +---------------------------------- arch/powerpc/kernel/entry_64.S | 12 ------------ 2 files changed, 1 insertions(+), 46 deletions(-) ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] powerpc: ftrace, do nothing in mcount call for dyn ftrace 2008-11-20 21:55 [PATCH 0/1] powerpc: make mcount a stub for dynamic ftrace Steven Rostedt @ 2008-11-20 21:55 ` Steven Rostedt 2008-11-23 12:49 ` [PATCH 0/1] powerpc: make mcount a stub for dynamic ftrace Ingo Molnar 1 sibling, 0 replies; 3+ messages in thread From: Steven Rostedt @ 2008-11-20 21:55 UTC (permalink / raw) To: linux-kernel Cc: linuxppc-dev, Steven Rostedt, Paul Mackerras, Ingo Molnar, Andrew Morton From: Steven Rostedt <srostedt@redhat.com> Impact: quicken mcount calls that are not replaced by dyn ftrace Dynamic ftrace no longer does on the fly recording of mcount locations. The mcount locations are now found at compile time. The mcount function no longer needs to store registers and call a stub function. It can now just simply return. Since there are some functions that do not get converted to a nop (.init sections and other code that may disappear), this patch should help speed up that code. Signed-off-by: Steven Rostedt <srostedt@redhat.com> --- arch/powerpc/kernel/entry_32.S | 35 +---------------------------------- arch/powerpc/kernel/entry_64.S | 12 ------------ 2 files changed, 1 insertions(+), 46 deletions(-) diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 7ecc0d1..d2c4035 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S @@ -1162,40 +1162,7 @@ machine_check_in_rtas: #ifdef CONFIG_DYNAMIC_FTRACE _GLOBAL(mcount) _GLOBAL(_mcount) - stwu r1,-48(r1) - stw r3, 12(r1) - stw r4, 16(r1) - stw r5, 20(r1) - stw r6, 24(r1) - mflr r3 - stw r7, 28(r1) - mfcr r5 - stw r8, 32(r1) - stw r9, 36(r1) - stw r10,40(r1) - stw r3, 44(r1) - stw r5, 8(r1) - subi r3, r3, MCOUNT_INSN_SIZE - .globl mcount_call -mcount_call: - bl ftrace_stub - nop - lwz r6, 8(r1) - lwz r0, 44(r1) - lwz r3, 12(r1) - mtctr r0 - lwz r4, 16(r1) - mtcr r6 - lwz r5, 20(r1) - lwz r6, 24(r1) - lwz r0, 52(r1) - lwz r7, 28(r1) - lwz r8, 32(r1) - mtlr r0 - lwz r9, 36(r1) - lwz r10,40(r1) - addi r1, r1, 48 - bctr + blr _GLOBAL(ftrace_caller) /* Based off of objdump optput from glibc */ diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index e6d5284..b00982e 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S @@ -888,18 +888,6 @@ _GLOBAL(enter_prom) #ifdef CONFIG_DYNAMIC_FTRACE _GLOBAL(mcount) _GLOBAL(_mcount) - /* Taken from output of objdump from lib64/glibc */ - mflr r3 - stdu r1, -112(r1) - std r3, 128(r1) - subi r3, r3, MCOUNT_INSN_SIZE - .globl mcount_call -mcount_call: - bl ftrace_stub - nop - ld r0, 128(r1) - mtlr r0 - addi r1, r1, 112 blr _GLOBAL(ftrace_caller) -- 1.5.6.5 -- ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 0/1] powerpc: make mcount a stub for dynamic ftrace 2008-11-20 21:55 [PATCH 0/1] powerpc: make mcount a stub for dynamic ftrace Steven Rostedt 2008-11-20 21:55 ` [PATCH 1/1] powerpc: ftrace, do nothing in mcount call for dyn ftrace Steven Rostedt @ 2008-11-23 12:49 ` Ingo Molnar 1 sibling, 0 replies; 3+ messages in thread From: Ingo Molnar @ 2008-11-23 12:49 UTC (permalink / raw) To: Steven Rostedt; +Cc: Andrew Morton, Paul Mackerras, linux-kernel, linuxppc-dev * Steven Rostedt <rostedt@goodmis.org> wrote: > Paul, > > I have one more patch. I added it to the end of the ppc/ftrace > branch. The new way of handling the finding of mcounts means we do > not need to do anything in the mcount call itself. It should just be > a stub and when ftrace is enabled, it will change the caller sites > to call something other than mcount. > > The following patches are in: > > git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git > > branch: ppc/ftrace i've also pulled the ppc/ftrace branch into tip/tracing/powerpc, and added it to ftrace-next's linux-next integration rules. So if Paul gives the green light that the commits have the right structure, we can freeze down the branch and the SHA1's and integrate it into ftrace-next. (which is integrated in linux-next after the powerpc tree so should be all fine in terms of merge ordering) Ingo ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-11-23 12:50 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-11-20 21:55 [PATCH 0/1] powerpc: make mcount a stub for dynamic ftrace Steven Rostedt 2008-11-20 21:55 ` [PATCH 1/1] powerpc: ftrace, do nothing in mcount call for dyn ftrace Steven Rostedt 2008-11-23 12:49 ` [PATCH 0/1] powerpc: make mcount a stub for dynamic ftrace Ingo Molnar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).