Messages in this thread | | | Subject | Re: [PATCH 7/9] ftrace, perf: Add support to use function tracepoint in perf | From | Peter Zijlstra <> | Date | Mon, 28 Nov 2011 21:08:51 +0100 |
| |
On Mon, 2011-11-28 at 14:58 -0500, Steven Rostedt wrote: > > +static int perf_ftrace_function_register(struct perf_event *event) > > +{ > > + struct ftrace_ops *ops = &event->ftrace_ops; > > + > > + ops->flags |= FTRACE_OPS_FL_CONTROL; > > + atomic_set(&ops->disabled, 1); > > + ops->func = perf_ftrace_function_call; > > + return register_ftrace_function(ops); > > When is ADD called? Because as soon as you register this function, even > though you have it "disabled" the system takes about a 13% impact on > performance just by calling this.
Typically at context switch time.
> > +static void perf_ftrace_function_enable(struct perf_event *event) > > +{ > > + struct ftrace_ops *ops = &event->ftrace_ops; > > + enable_ftrace_function(ops); > > Is it really an issue that we shouldn't call the full blown register > instead? I'm not really understanding why this is a problem. Note, one > of the improvements to ftrace in the near future is to enable ftrace > without stop_machine.
Yeah, but still not something you want to do during context switches, right?
| |