Re: [patches] [PATCH v2 2/6] riscv/ftrace: Add dynamic function tracer support

2018-01-14 Thread Alan Kao
On Sun, Jan 14, 2018 at 11:24:53PM -0800, Stefan O'Rear wrote: > On Sun, Jan 14, 2018 at 10:47 PM, Alan Kao wrote: > > + /* > > +* For the dynamic ftrace to work, here we should reserve at least > > +* 8 bytes for a functional auipc-jalr pair. Pseudo inst nop may be > > +

Re: [patches] [PATCH v2 2/6] riscv/ftrace: Add dynamic function tracer support

2018-01-14 Thread Stefan O'Rear
On Sun, Jan 14, 2018 at 10:47 PM, Alan Kao wrote: > + /* > +* For the dynamic ftrace to work, here we should reserve at least > +* 8 bytes for a functional auipc-jalr pair. Pseudo inst nop may be > +* interpreted as different length in different models, so we manually

[PATCH v2 2/6] riscv/ftrace: Add dynamic function tracer support

2018-01-14 Thread Alan Kao
We now have dynamic ftrace with the following added items: * ftrace_make_call, ftrace_make_nop (in kernel/ftrace.c) The two functions turns any recorded call site of filtered functions into a call to ftrace_caller or nops * ftracce_update_ftrace_func (in kernel/ftrace.c) turns the nops at f