Re: [PATCH v3 6/7] riscv: Add KPROBES_ON_FTRACE supported

2020-07-23 Thread Masami Hiramatsu
On Wed, 22 Jul 2020 21:31:20 +0800 Guo Ren wrote: > Hi Masami, > > Current riscv ftrace_caller utilize fp(s0) - 8 in stack to get ra of > function, eg: > foo: >2bb0: 7119addisp,sp,-128 > 2bb2: f8a2sd s0,112(sp) > 2bb4:

Re: [PATCH v3 6/7] riscv: Add KPROBES_ON_FTRACE supported

2020-07-23 Thread Masami Hiramatsu
On Wed, 22 Jul 2020 16:39:53 +0800 Guo Ren wrote: > Hi Masami, > > On Tue, Jul 21, 2020 at 9:27 PM Masami Hiramatsu wrote: > > > > On Wed, 15 Jul 2020 00:24:54 +0800 > > Guo Ren wrote: > > > > > Thx Masami, > > > > > > On Tue, Jul 14, 2020 at 7:38 PM Masami Hiramatsu > > > wrote: > > > > > >

Re: [PATCH v3 6/7] riscv: Add KPROBES_ON_FTRACE supported

2020-07-22 Thread Guo Ren
Hi Masami, Current riscv ftrace_caller utilize fp(s0) - 8 in stack to get ra of function, eg: foo: 2bb0: 7119addisp,sp,-128 2bb2: f8a2sd s0,112(sp) 2bb4: fc86sd ra,120(sp) ... 2bc4: 010

Re: [PATCH v3 6/7] riscv: Add KPROBES_ON_FTRACE supported

2020-07-22 Thread Guo Ren
Hi Masami, On Tue, Jul 21, 2020 at 9:27 PM Masami Hiramatsu wrote: > > On Wed, 15 Jul 2020 00:24:54 +0800 > Guo Ren wrote: > > > Thx Masami, > > > > On Tue, Jul 14, 2020 at 7:38 PM Masami Hiramatsu > > wrote: > > > > > > On Mon, 13 Jul 2020 23:39:21 + > > > guo...@kernel.org wrote: > > > >

Re: [PATCH v3 6/7] riscv: Add KPROBES_ON_FTRACE supported

2020-07-21 Thread Masami Hiramatsu
On Wed, 15 Jul 2020 00:24:54 +0800 Guo Ren wrote: > Thx Masami, > > On Tue, Jul 14, 2020 at 7:38 PM Masami Hiramatsu wrote: > > > > On Mon, 13 Jul 2020 23:39:21 + > > guo...@kernel.org wrote: > > > > > From: Guo Ren > > > > > > This patch adds support for kprobes on ftrace call sites to av

Re: [PATCH v3 6/7] riscv: Add KPROBES_ON_FTRACE supported

2020-07-14 Thread Guo Ren
Thx Masami, On Tue, Jul 14, 2020 at 7:38 PM Masami Hiramatsu wrote: > > On Mon, 13 Jul 2020 23:39:21 + > guo...@kernel.org wrote: > > > From: Guo Ren > > > > This patch adds support for kprobes on ftrace call sites to avoids > > much of the overhead with regular kprobes. Try it with simple >

Re: [PATCH v3 6/7] riscv: Add KPROBES_ON_FTRACE supported

2020-07-14 Thread Masami Hiramatsu
On Mon, 13 Jul 2020 23:39:21 + guo...@kernel.org wrote: > From: Guo Ren > > This patch adds support for kprobes on ftrace call sites to avoids > much of the overhead with regular kprobes. Try it with simple > steps: > > 1. Get _do_fork ftrace call site. > Dump of assembler code for function

[PATCH v3 6/7] riscv: Add KPROBES_ON_FTRACE supported

2020-07-13 Thread guoren
From: Guo Ren This patch adds support for kprobes on ftrace call sites to avoids much of the overhead with regular kprobes. Try it with simple steps: 1. Get _do_fork ftrace call site. Dump of assembler code for function _do_fork: 0xffe00020af64 <+0>: addisp,sp,-128 0xffe000