mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: rostedt@goodmis.org, 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: Tue, 19 Jul 2011 11:57:27 +0200	[thread overview]
Message-ID: <20110719095727.GA3008@jolsa.brq.redhat.com> (raw)
In-Reply-To: <20110718151229.GA32167@somewhere>

On Mon, Jul 18, 2011 at 05:12:33PM +0200, Frederic Weisbecker wrote:
> On Mon, Jul 11, 2011 at 03:22:55PM +0200, Jiri Olsa wrote:
> > As the amount of kernel functions obtained by the ftrace:function tracepoint
> > is quite big, it's desirable to be able to set the filter on the ftrace
> > level.
> > 
> > Added PERF_EVENT_IOC_SET_FTRACE ioctl to be able to specify function filter
> > for perf event. The interface is the same as for the set_ftrace_filter file.
> > 
> > Also the same string parser is used as for the set_ftrace_filter file.
> 
> I'm not sure I understand why an ioctl is needed for that.
> Why not using the ftrace filter?
> 
> The first idea was to do something like this:
> 
> 	ip == func1 || ip == func2 || ....

The part where I got stuck is when you start to combine the fields
in the filter like:

	ip == func1 || ip_parent != func2
	ip == func1 || (ip == func2 && ip_parent != func3)

Which is ok when all functions are enabled and ip/parent_ip fields
are treated as values. But I'd need enable proper set of functions
based on above filter parsing.. which might not be that easy :)

So I thought it'd be easier to have the filter as above,
plus you could specify the amount of traced functions with
ioctl command.

> 
> But that makes a too long expression. So I thought we
> could bring support for the "+" operator and have expressions
> like:
> 
> 	ip == func1 + func2 + func3 + ....
> 
> 	ip == !func1

So would you like to have just simple filter for function event?
(embedded into the current event filter..) like:

	ip == func1 + func2 + func3 + 

Support just one 'ip' field and whatever we got in the parameter
we put into the ftrace filter.. ?

thanks,
jirka

  reply	other threads:[~2011-07-19  9:57 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 [this message]
2011-07-26 13:43       ` Frederic Weisbecker
2011-07-27 12:17         ` Jiri Olsa
2011-08-10 20:25           ` Steven Rostedt
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=20110719095727.GA3008@jolsa.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.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®