lkml.org 
[lkml]   [2011]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/3]trace-cmd: remove dead code
From
Date
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




\
 
 \ /
  Last update: 2011-03-14 14:31    [W:0.056 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site