Re: [PATCH 2/2] scripts: ftrace - move the nop-processing in ftrace_init to compile time

From: Peter Zijlstra
Date: Sat Sep 11 2021 - 10:34:13 EST


On Sat, Sep 11, 2021 at 09:50:43PM +0800, Yinan Liu wrote:
> When ftrace is enabled, ftrace_init will consume a period of
> time, usually around 15~20ms. Approximately 60% of the time is
> consumed by nop-processing. Moving the nop-processing to the
> compile time can speed up the kernel boot process.
>
> performance test:
> env: Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz

If you use objtool's -M argument instead of recordmcount, you already
get this and you can avoid running recordmcount entirely.