From: Steven Rostedt <rostedt@goodmis.org>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3]trace-cmd: remove dead code
Date: Mon, 14 Mar 2011 09:28:18 -0400 [thread overview]
Message-ID: <1300109298.9910.66.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <4D7D7DCD.7010200@cn.fujitsu.com>
On Mon, 2011-03-14 at 10:30 +0800, Lai Jiangshan wrote:
> On 03/10/2011 10:53 PM, Steven Rostedt wrote:
> > On Thu, 2011-03-10 at 17:57 +0800, Lai Jiangshan wrote:
> >> filter_cpu related code is totally dead.
> >
> > I'll rephrase this, as it is not dead. "dead" code is code that can not
> > be reached. This code most certainly can be reached. You may think it is
> > silly code, which it may be. The reason for the separation of one CPU
> > and multiple CPUs, is I do one CPU more often than I filter multiple,
> > and I wanted the 1 cpu to still be efficient.
> >
>
> I'm confused, filter_cpu is always -1, how the code can be reached?
Ah, you're right. Because of a bug:
- if (filter_cpu)
+ if (filter_cpu >= 0)
add_cpu(optarg);
else
filter_cpu = atoi(optarg);
Was what it was suppose to be.
-- Steve
next prev parent reply other threads:[~2011-03-14 13:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-10 9:57 Lai Jiangshan
2011-03-10 14:53 ` Steven Rostedt
2011-03-14 2:30 ` Lai Jiangshan
2011-03-14 13:28 ` Steven Rostedt [this message]
2011-03-14 2:39 ` [PATCH 1/3 V2]trace-cmd: " 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=1300109298.9910.66.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®