Re: Ftrace vs perf user page fault statistics differences

From: Steven Rostedt
Date: Wed Jun 14 2017 - 13:44:06 EST


On Wed, 14 Jun 2017 13:30:59 -0400
Will Hawkins <whh8b@xxxxxxxxxxxx> wrote:

> > When perf profiles a program started by the same command line, it
> > disables the events by default and enables them during exec. Please
> > see linux/tools/perf/util/evsel.c:perf_evsel__config().
> >
> > Thanks,
> > Namhyung
>
> Namhyung,
>
> I think that this answers a very important question! Thanks for chiming in!

Yes. One difference between the design of ftrace and the design of
perf, is that, I avoided inserting call backs throughout the kernel.
Perf has a few function calls in the exec code. Just grep "perf" in
fs/exec.c. There's a few scattered around there. Causing a slight
overhead for when perf is not in use.

Hmm, I really should remove all perf injections and make them either a
tracepoint or generic jumplabels that anything may attach to. Then
ftrace could have the same features. And lttng for that matter.

-- Steve