[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141202021912.GA29096@thunk.org>
Date: Mon, 1 Dec 2014 21:19:12 -0500
From: Theodore Ts'o <tytso@....edu>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Checking to see if a bit is _not_ set in a ftrace event filter
I was trying to do something like this:
filter="events/writeback/writeback_mark_inode_dirty/filter"
echo "(flags & 2048) && ((state & 2048) == 0)" > $filter
... but that doesn't work.
This works:
echo "flags & 2048" > $filter
But the problem is this:
echo "(state & 2048) == 0" > $filter
The simplest patch to add this would be add a new filter_ops so we
could do this:
echo "(state !& 2048)" > $filter
... but that's pretty ugly. But adding more general expression
parsing in the ftrace event filter code would be non-trivial, and if
we start trying to make things like "!(state & 2048)" or "(state &
2048) == 0", then at some point some crazy person might request
supporting something like this: "(state ^ flags) == 2048". :-)
So I guess the main question I want to ask is your opinion about
whether a patch that adds support for the operator "!&" is too ugly to
live?
Thanks,
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists