Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: powerpc/perf_events: Fix call-graph recording, add perf_arch_fetch_caller_regs perf top: Add missing initialization to zero perf probe: Use original address instead of CU-based address perf probe: Fix offset to allow signed value perf top: Improve the autosizing of column lenghts perf probe: Fix need_dwarf flag if lazy matching is used perf probe: Fix probe_point buffer overrun
This commit is contained in:
@@ -127,3 +127,31 @@ _GLOBAL(__setup_cpu_power7)
|
||||
_GLOBAL(__restore_cpu_power7)
|
||||
/* place holder */
|
||||
blr
|
||||
|
||||
#ifdef CONFIG_EVENT_TRACING
|
||||
/*
|
||||
* Get a minimal set of registers for our caller's nth caller.
|
||||
* r3 = regs pointer, r5 = n.
|
||||
*
|
||||
* We only get R1 (stack pointer), NIP (next instruction pointer)
|
||||
* and LR (link register). These are all we can get in the
|
||||
* general case without doing complicated stack unwinding, but
|
||||
* fortunately they are enough to do a stack backtrace, which
|
||||
* is all we need them for.
|
||||
*/
|
||||
_GLOBAL(perf_arch_fetch_caller_regs)
|
||||
mr r6,r1
|
||||
cmpwi r5,0
|
||||
mflr r4
|
||||
ble 2f
|
||||
mtctr r5
|
||||
1: PPC_LL r6,0(r6)
|
||||
bdnz 1b
|
||||
PPC_LL r4,PPC_LR_STKOFF(r6)
|
||||
2: PPC_LL r7,0(r6)
|
||||
PPC_LL r7,PPC_LR_STKOFF(r7)
|
||||
PPC_STL r6,GPR1-STACK_FRAME_OVERHEAD(r3)
|
||||
PPC_STL r4,_NIP-STACK_FRAME_OVERHEAD(r3)
|
||||
PPC_STL r7,_LINK-STACK_FRAME_OVERHEAD(r3)
|
||||
blr
|
||||
#endif /* CONFIG_EVENT_TRACING */
|
||||
|
Reference in New Issue
Block a user