public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Steven Rostedt <srostedt@redhat.com>
Subject: Re: [PATCH 1/6] ftrace: move function tracer functions out of trace.c
Date: Fri, 16 Jan 2009 12:12:43 +0100	[thread overview]
Message-ID: <20090116111243.GA20082@elte.hu> (raw)
In-Reply-To: <20090115224925.6b0e6c24.akpm@linux-foundation.org>


* Andrew Morton <akpm@linux-foundation.org> wrote:

> On Thu, 15 Jan 2009 23:53:43 -0500 Steven Rostedt <rostedt@goodmis.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?

There's two levels here: first the patched in callsites. Those are NOPs in 
the usual case - there's no overhead for the default 'function tracing is 
built in but not enabled' case.

There's a second level: a /debug/tracing/tracing_enabled lightweight 
dynamic flag to flip tracing on/off while the tracer is enabled. _That_ 
one, if it ever matters to a codepath, is default-enabled.

I.e. the above code sequence is correct.

Thanks,

	Ingo

  reply	other threads:[~2009-01-16 11:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-16  4:53 [PATCH 0/6] ftrace: more updates to tip Steven Rostedt
2009-01-16  4:53 ` [PATCH 1/6] ftrace: move function tracer functions out of trace.c Steven Rostedt
2009-01-16  6:49   ` Andrew Morton
2009-01-16 11:12     ` Ingo Molnar [this message]
2009-01-16 13:13     ` Steven Rostedt
2009-01-16  4:53 ` [PATCH 2/6] trace: add gcc printf check to trace_seq_printf Steven Rostedt
2009-01-16  4:53 ` [PATCH 3/6] trace: clean up format errors in calls " Steven Rostedt
2009-01-16  4:53 ` [PATCH 4/6] ftrace: combine stack trace in function call Steven Rostedt
2009-01-16  4:53 ` [PATCH 5/6] ftrace: remove static from function tracer functions Steven Rostedt
2009-01-16  4:53 ` [PATCH 6/6] trace: set max latency variable to zero on default Steven Rostedt
2009-01-16 11:25 ` [PATCH 0/6] ftrace: more updates to tip Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090116111243.GA20082@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=srostedt@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox