mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	a.p.zijlstra@chello.nl, linux-kernel@vger.kernel.org,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [RFC 3/4] perf, ftrace: Add new perf ioctl for function trace filter
Date: Wed, 10 Aug 2011 16:25:35 -0400	[thread overview]
Message-ID: <1313007935.18583.267.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20110727121734.GB2605@jolsa.brq.redhat.com>

Again, sorry for the late reply.

On Wed, 2011-07-27 at 14:17 +0200, Jiri Olsa wrote:
> On Tue, Jul 26, 2011 at 03:43:44PM +0200, Frederic Weisbecker wrote:
> 
> SNIP
> 
> > Ideally, the filter engine should split expressions into a tree
> > of ops:
> > 
> > 	ip == func1 + func2 + func3 || ip == func4
> > 
> > should be parsed into:
> > 
> >             ||
> >             /\
> >            /  \
> >           /    \
> >          /      \
> >         ==       ==
> >        /  \     /  \
> >       /    \   ip   \
> >      /      \       func4
> >     ip       +       
> >             / \
> >            /   \
> >           +     \
> >          /  \   func3
> >         /    \
> >     func1   func2
> > 
> > And then pass that to ftrace that interprets that tree
> > by building set of functions on top of each node joined to
> > the other.
> > 
> > But that can be complicated to do, and perhaps a bit of
> > an overkill even for daily use of it.
> > 
> > Having a simple "ip == func + func2 + func3" expression support
> 
> so the '+' is just shortcut for '||' ... like:

Please, lets use something other than '+', as it can also be construed
as addition, and will probably confuse things. Or we change the '==' to
'|=' or something, and then comma separate it?

ip |= func1, func2, func3

Where we can say the '|=' ',' pair is a short cut of multiple a == b
|| ..

-- Steve

> 
> "ip == x1 || ip == x1" AND "ip == x1 + x2" mean the same thing
> 
> if we omit the '+' and keep just the whitespace we could use the function
> name parser as used in set_ftrace_filter interface with no change ;)
> but adding new separator should not be that hard..
> 
> > should be enough I think. And we can reject expressions that don't
> > fit that pattern. Then if it becomes necessary one day to support
> > real expressions there, we can still switch to a real tree.
> > 
> > Does that look sane? 
> 
> I'l make the change and send new version
> 
> thanks,
> jirka



  reply	other threads:[~2011-08-10 20:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-11 13:22 [RFC 0/4] trace,perf: Enabling ftrace:function tracepoint for perf Jiri Olsa
2011-07-11 13:22 ` [RFC 1/4] perf, ftrace: Add perf support to use function tracepoint Jiri Olsa
2011-07-11 13:22 ` [RFC 2/4] perf, ftrace: Add filter support for ftrace:function tracepoint Jiri Olsa
2011-08-10 19:34   ` Steven Rostedt
2011-07-11 13:22 ` [RFC 3/4] perf, ftrace: Add new perf ioctl for function trace filter Jiri Olsa
2011-07-18 15:12   ` Frederic Weisbecker
2011-07-19  9:57     ` Jiri Olsa
2011-07-26 13:43       ` Frederic Weisbecker
2011-07-27 12:17         ` Jiri Olsa
2011-08-10 20:25           ` Steven Rostedt [this message]
2011-07-11 13:22 ` [RFC 4/4] perf, ftrace: Add ftrace option for perf stat command Jiri Olsa

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=1313007935.18583.267.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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®