Re: [PATCH 3/4] x86/ftrace: make ftrace_int3_handler() not to skip fops invocation

From: Steven Rostedt
Date: Mon Apr 29 2019 - 15:07:31 EST

On Mon, 29 Apr 2019 11:59:04 -0700
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> I really don't care. Just do what I suggested, and if you have numbers to
> show problems, then maybe I'll care.

Are you suggesting that I rewrite the code to do it one function at a
time? This has always been batch mode. This is not something new. The
function tracer has been around longer than the text poke code.

> Right now you're just making excuses for this. I described the solution
> months ago, now I've written a patch, if that's not good enough then we can
> just skip this all entirely.
> Honestly, if you need to rewrite tens of thousands of calls, maybe you're
> doing something wrong?

# cd /sys/kernel/debug/tracing
# cat available_filter_functions | wc -l
# cat enabled_functions | wc -l
# echo function > current_tracer
# cat enabled_functions | wc -l

There, I just enabled 45,856 function call sites in one shot!

How else do you want to update them? Every function in the kernel has a
nop, that turns into a call to the ftrace_handler, if I add another
user of that code, it will change each one as well.

-- Steve