[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1322510931.2921.170.camel@twins>
Date: Mon, 28 Nov 2011 21:08:51 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Jiri Olsa <jolsa@...hat.com>, fweisbec@...il.com, mingo@...hat.com,
paulus@...ba.org, acme@...stprotocols.net,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/9] ftrace, perf: Add support to use function
tracepoint in perf
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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists