ftrace performance impact with different configuration

Rabin Vincent rabin at
Thu Dec 29 10:42:28 EST 2011

On Thu, Dec 29, 2011 at 14:08, Lei Wen <adrian.wenl at> wrote:
> 2. Seem dynamic ftrace also could involve some penalty for the running
> system, although it patching the running kernel with nop stub...
> For the second item, is there anyone done some research before that
> could zero the cost for the running system when the tracing is not
> enabled yet?

One thing that needs to be fixed (for ARM) is that for the new-style
mcounts, the nop that's currently being done is not really a nop -- it
removes the function call, but there is still an unnecessary push/pop
sequence.  This should be modified to have the push {lr} removed too.
(Two instructions replaced instead of one.)

More information about the linux-arm-kernel mailing list