Re: [PATCH 1/3] ftrace: introdue ftrace_call_init

2019-08-26 Thread Jisheng Zhang
Hi all, On Tue, 20 Aug 2019 11:27:38 +0200 (CEST) Miroslav Benes wrote: > > Hi, > > On Mon, 19 Aug 2019, Jisheng Zhang wrote: > > > On some arch, the FTRACE_WITH_REGS is implemented with gcc's > > -fpatchable-function-entry (=2), gcc adds 2 NOPs at the beginning > > of each function, so this

Re: [PATCH 1/3] ftrace: introdue ftrace_call_init

2019-08-20 Thread Jisheng Zhang
Hi, On Tue, 20 Aug 2019 11:27:38 +0200 (CEST) Miroslav Benes wrote: > > > Hi, > > On Mon, 19 Aug 2019, Jisheng Zhang wrote: > > > On some arch, the FTRACE_WITH_REGS is implemented with gcc's > > -fpatchable-function-entry (=2), gcc adds 2 NOPs at the beginning > > of each function, so this

Re: [PATCH 1/3] ftrace: introdue ftrace_call_init

2019-08-20 Thread Miroslav Benes
Hi, On Mon, 19 Aug 2019, Jisheng Zhang wrote: > On some arch, the FTRACE_WITH_REGS is implemented with gcc's > -fpatchable-function-entry (=2), gcc adds 2 NOPs at the beginning > of each function, so this makes the MCOUNT_ADDR useless. In ftrace > common framework, MCOUNT_ADDR is mostly used to

Re: [PATCH 1/3] ftrace: introdue ftrace_call_init

2019-08-19 Thread Jisheng Zhang
On Mon, 19 Aug 2019 19:16:22 +0800 Jisheng Zhang wrote: > On some arch, the FTRACE_WITH_REGS is implemented with gcc's > -fpatchable-function-entry (=2), gcc adds 2 NOPs at the beginning > of each function, so this makes the MCOUNT_ADDR useless. In ftrace > common framework, MCOUNT_ADDR is

[PATCH 1/3] ftrace: introdue ftrace_call_init

2019-08-19 Thread Jisheng Zhang
On some arch, the FTRACE_WITH_REGS is implemented with gcc's -fpatchable-function-entry (=2), gcc adds 2 NOPs at the beginning of each function, so this makes the MCOUNT_ADDR useless. In ftrace common framework, MCOUNT_ADDR is mostly used to "init" the nop, so let's introcude ftrace_call_init().