mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Alexei Starovoitov <ast@plumgrid.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Theodore Ts'o" <tytso@mit.edu>, Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH] tracing: Add NOT to filtering logic
Date: Tue, 2 Dec 2014 14:54:20 -0500	[thread overview]
Message-ID: <20141202145420.279e4de6@gandalf.local.home> (raw)
In-Reply-To: <CAMEtUuwejSGZSMyncPo9GRvy7vnC8Wam-dOdHU+iO0cJkRDeTg@mail.gmail.com>

On Tue, 2 Dec 2014 11:49:58 -0800
Alexei Starovoitov <ast@plumgrid.com> wrote:

> On Tue, Dec 2, 2014 at 9:04 AM, Steven Rostedt <rostedt@goodmis.org> wrote:
> >                                                                         \
> > -       return match;                                                   \
> > +       return match == !pred->not;                                     \
> 
> are you sure this one works for !(var & 2) ?
> 'not' is either 0 or 1, so it works for other macro:
> (val == *addr) ^ pred->not
> 
> whereas here 'match' is 'int' and
> match = (*addr & val)
> will not be 0 or 1...
> 
> the patch is small, but delicate...

Yeah, there's some more I'm fixing up on it. I only did some basic
tests. I should have tested '& 2' instead of '& 1' ;-)

I'll make that check: return !!match == !pred->not.


> In such cases I trust tests more than code review ;)
> Could you add few tests for this to
> CONFIG_FTRACE_STARTUP_TEST
> part of the file ?

No, but I will be adding tests to the ftracetests in
tools/testing/selftests to test the filters.

Thanks,

-- Steve

  reply	other threads:[~2014-12-02 19:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-02 17:04 Steven Rostedt
2014-12-02 19:49 ` Alexei Starovoitov
2014-12-02 19:54   ` Steven Rostedt [this message]
2014-12-02 20:35   ` [PATCH v2] " Steven Rostedt
2014-12-02 20:44     ` Alexei Starovoitov

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=20141202145420.279e4de6@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=ast@plumgrid.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tytso@mit.edu \
    /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®