We need know the values of *regs, eg: regs->sepc, regs->ra, regs->fp,
regs->sp, regs->tp
void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry,
struct pt_regs *regs)
{
...
walk_stackframe(, entry);
// May be we could detect error here and print the regs' value
}
On Mon, Aug 26,
Hi Guo,
Guo Ren 於 2019年8月24日 週六 上午8:54寫道:
>
> Please check CONFIG_FRAME_POINTER
>
> 1 *frame = *((struct stackframe *)frame->fp - 1);
> This code is origionally from riscv/kernel/stacktrace.c: walk_stackframe
>
> In linux/Makefile it'll involve the options for gcc to definitely
> store ra &
Please check CONFIG_FRAME_POINTER
1 *frame = *((struct stackframe *)frame->fp - 1);
This code is origionally from riscv/kernel/stacktrace.c: walk_stackframe
In linux/Makefile it'll involve the options for gcc to definitely
store ra & prev_fp in fp pointer.
ifdef CONFIG_FRAME_POINTER
Hi Mao,
Mao Han 於 2019年8月23日 週五 下午2:16寫道:
>
> This patch add support for perf callchain sampling on riscv platform.
> The return address of leaf function is retrieved from pt_regs as
> it is not saved in the outmost frame.
>
> Signed-off-by: Mao Han
> Cc: Paul Walmsley
> Cc: Greentime Hu
>
This patch add support for perf callchain sampling on riscv platform.
The return address of leaf function is retrieved from pt_regs as
it is not saved in the outmost frame.
Signed-off-by: Mao Han
Cc: Paul Walmsley
Cc: Greentime Hu
Cc: Palmer Dabbelt
Cc: linux-riscv
Cc: Christoph Hellwig
Cc:
5 matches
Mail list logo