Re: [PATCH 1/3] riscv: Add perf callchain support

2019-04-29 Thread Mao Han
On Thu, Apr 25, 2019 at 02:11:00PM -0700, Palmer Dabbelt wrote: > On Thu, 11 Apr 2019 00:53:48 PDT (-0700), han_...@c-sky.com wrote: > >+if (!kstack_end((void *)frame->fp) && > >+!((unsigned long)frame->fp & 0x3) && > >+((unsigned long)frame->fp >= TASK_SIZE)) { > >+

Re: [PATCH 1/3] riscv: Add perf callchain support

2019-04-25 Thread Palmer Dabbelt
On Thu, 11 Apr 2019 00:53:48 PDT (-0700), han_...@c-sky.com wrote: 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: Palmer Dabbelt --- arch/r

Re: [PATCH 1/3] riscv: Add perf callchain support

2019-04-11 Thread Christoph Hellwig
> --- /dev/null > +++ b/arch/riscv/kernel/perf_callchain.c > @@ -0,0 +1,122 @@ > +// SPDX-License-Identifier: GPL-2.0 > +// Copyright (C) 2019 Hangzhou C-SKY Microsystems co.,ltd. Please use normal /* */ Style comment for everything but the SPDX tags. > +static int unwind_frame_kernel(struct stac

[PATCH 1/3] riscv: Add perf callchain support

2019-04-11 Thread Mao Han
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: Palmer Dabbelt --- arch/riscv/kernel/Makefile | 3 +- arch/riscv/kernel/perf_callcha