All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Tom Zanussi <tzanussi@gmail.com>, Jason Baron <jbaron@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/6] perf trace: Add filter support
Date: Tue, 8 Sep 2009 02:02:21 +0200	[thread overview]
Message-ID: <20090908000219.GB6312@nowhere> (raw)
In-Reply-To: <4AA4C04D.1050201@cn.fujitsu.com>

On Mon, Sep 07, 2009 at 04:11:57PM +0800, Li Zefan wrote:
> This patchset adds filter support for perf counter, so not all
> profile events are recorded but only those match the filters
> we set.


Thanks a lot for this work!



> An example:
> 
>  #./perf record -f -e irq:irq_handler_entry:irq==18:record
>  or
>  #./perf record -f -e irq:irq_handler_entry:irq==18 -R
>  ^C



We may want to write complex filters. While looking at this patchset,
that seems possible this way, but the raw line may become unreadable:

perf record -f -e irq:irq_handler_entry:"irq==18 && (name == 'foo' || bar == 'blah')":record

May be we should add an option to let one also set the filters seperately then
we could do:

perf record -f -e -R irq:irq_handler_entry --filter "irq==18 && (name == 'foo' || bar == 'blah')"

Hmm.


>  # ./perf trace
>  version = 0.5
>             perf-4303  ... irq_handler_entry: irq=18 handler=eth0
>             init-0     ... irq_handler_entry: irq=18 handler=eth0
>             init-0     ... irq_handler_entry: irq=18 handler=eth0
>             init-0     ... irq_handler_entry: irq=18 handler=eth0
>             init-0     ... irq_handler_entry: irq=18 handler=eth0
> 
> ---
>  include/linux/ftrace_event.h       |   19 +++-
>  include/linux/perf_counter.h       |    1 +
>  include/linux/syscalls.h           |   14 ++-
>  include/trace/ftrace.h             |   10 +-
>  kernel/perf_counter.c              |   40 ++++++-
>  kernel/trace/trace.h               |    9 +-
>  kernel/trace/trace_event_profile.c |   18 +++
>  kernel/trace/trace_events_filter.c |  247 +++++++++++++++++++++---------------
>  kernel/trace/trace_syscalls.c      |    9 +-
>  tools/perf/builtin-record.c        |   12 ++
>  tools/perf/util/parse-events.c     |   48 ++++++-
>  tools/perf/util/parse-events.h     |    1 +
>  12 files changed, 303 insertions(+), 125 deletions(-)
> 


  parent reply	other threads:[~2009-09-08  0:02 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-07  8:11 [PATCH 0/6] perf trace: Add filter support Li Zefan
2009-09-07  8:12 ` [PATCH 1/6] tracing/filters: refactor subsystem filter code Li Zefan
2009-09-07  8:12 ` [PATCH 2/6] tracing/profile: Add filter support Li Zefan
2009-09-08  2:01   ` Frederic Weisbecker
2009-09-08  2:24     ` Frederic Weisbecker
2009-09-08  8:35     ` Peter Zijlstra
2009-09-08 12:33       ` Frederic Weisbecker
2009-09-07  8:13 ` [PATCH 3/6] tracing/syscalls: Add profile " Li Zefan
2009-09-07  8:13 ` [PATCH 4/6] perf_counter: Add PERF_COUNTER_IOC_SET_FILTER ioctl Li Zefan
2009-09-07 16:44   ` Peter Zijlstra
2009-09-07 16:48     ` Ingo Molnar
2009-09-07 16:55       ` Peter Zijlstra
2009-09-08  0:49         ` Li Zefan
2009-09-08  6:52           ` Ingo Molnar
2009-09-08  8:37           ` Peter Zijlstra
2009-09-08  7:01         ` Tom Zanussi
2009-09-09  2:18           ` Li Zefan
2009-09-10  4:45             ` Tom Zanussi
2009-09-10 23:01           ` Randy Dunlap
2009-09-11  4:08             ` Tom Zanussi
2009-09-07  8:13 ` [PATCH 5/6] perf trace: increase MAX_EVENT_LENGTH Li Zefan
2009-09-07  8:14 ` [PATCH 6/6] perf trace: Add filter support Li Zefan
2009-09-08  0:02 ` Frederic Weisbecker [this message]
2009-09-08  1:06   ` [PATCH 0/6] " Li Zefan
2009-09-08  2:12     ` Frederic Weisbecker
2009-09-08  6:53       ` Ingo Molnar

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=20090908000219.GB6312@nowhere \
    --to=fweisbec@gmail.com \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tzanussi@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.