[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0901160811180.22303@gandalf.stny.rr.com>
Date: Fri, 16 Jan 2009 08:13:38 -0500 (EST)
From: Steven Rostedt <rostedt@...dmis.org>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
Frederic Weisbecker <fweisbec@...il.com>,
Steven Rostedt <srostedt@...hat.com>
Subject: Re: [PATCH 1/6] ftrace: move function tracer functions out of
trace.c
On Thu, 15 Jan 2009, Andrew Morton wrote:
> On Thu, 15 Jan 2009 23:53:43 -0500 Steven Rostedt <rostedt@...dmis.org> wrote:
>
> > static void
> > +function_trace_call_preempt_only(unsigned long ip, unsigned long parent_ip)
> > +{
> > + struct trace_array *tr = func_trace;
> > + struct trace_array_cpu *data;
> > + unsigned long flags;
> > + long disabled;
> > + int cpu, resched;
> > + int pc;
> > +
> > + if (unlikely(!ftrace_function_enabled))
> > + return;
>
> We're optimizing for the tracing-is-enabled case. What's the thinking
> here?
This is called only when tracing _is_ enabled :-) Either it was enabled by
the dynamic ftrace system, or there's another variable tested before
jumping to the functions. This function must be register, and when it is,
tracing is expected to run.
The reason for the "ftrace_function_enabled" variable is to prevent
tracing to start before the stop_machine finishes. It is local to this one
tracer. Without it, you get a lot of garbage on the start up of the
tracer.
-- Steve
--
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