lkml.org 
[lkml]   [2011]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 7/9] ftrace, perf: Add support to use function tracepoint in perf
From
Date
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?


\
 
 \ /
  Last update: 2011-11-28 21:11    [W:0.120 / U:1.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site