All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>, Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing, function_graph: simplify test for tracing
Date: Wed, 13 Jan 2010 15:54:56 +0100	[thread overview]
Message-ID: <20100113145454.GE5036@nowhere> (raw)
In-Reply-To: <4B4DB0B6.7040607@cn.fujitsu.com>

On Wed, Jan 13, 2010 at 07:38:30PM +0800, Lai Jiangshan wrote:
> 
> For function_graph, a calling function is to be traced only when
> it is enabled or it is nested in a enabled function.
> 
> Current code uses TSK_TRACE_FL_GRAPH to test whether it is nested or not.
> read the code, we can get this:
> (trace->depth > 0) <==> (TSK_TRACE_FL_GRAPH is set)
> 
> trace->depth is more explicit to tell that it is nested.
> So we use trace->depth directly and simplify the code.
> 
> No functionality is changed.
> TSK_TRACE_FL_GRAPH is not removed now, it is left for future usage.
> 
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> ---


Looks prety good to me. Nice simplification, the less checks we
have in this hot path, the better.

Acked-by: Frederic Weisbecker <fweisbec@gmail.com>


  reply	other threads:[~2010-01-13 14:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13 11:38 [PATCH] tracing, function_graph: simplify test for tracing Lai Jiangshan
2010-01-13 14:54 ` Frederic Weisbecker [this message]
2010-01-21 13:22 ` Frederic Weisbecker
2010-01-29  9:25 ` [tip:tracing/core] tracing: Simplify test for function_graph tracing start point tip-bot for Lai Jiangshan

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=20100113145454.GE5036@nowhere \
    --to=fweisbec@gmail.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.