Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Li Zefan <lizf <at> cn.fujitsu.com>
Subject: [PATCH 0/4] perf trace: Add filter Suppport, V2
Newsgroups: gmane.linux.kernel
Date: Tuesday 13th October 2009 02:17:48 UTC (over 7 years ago)
This patchset adds filter support for perf counter, so not all
profile events are recorded but only those match the filters
we set.

An example:

 #./perf record -R -f -e irq:irq_handler_entry --filter irq==18
 ^C
 # ./perf trace
            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

The syntax of filter expressions can be found in
Documentation/trace/events.txt.

Major changes from v1:

- Make filters per perf event, instead of per tracepoint.

- Use "--filter" to set a filter for a trace event, instead of
  mixing it into "-e" option.

---
 include/linux/ftrace_event.h       |   11 +-
 include/linux/perf_counter.h       |    1 +
 include/linux/perf_event.h         |    7 +
 kernel/perf_event.c                |   81 +++++++++-
 kernel/trace/trace.h               |    6 +-
 kernel/trace/trace_events_filter.c |  320
+++++++++++++++++++++---------------
 tools/perf/builtin-record.c        |   15 ++-
 tools/perf/util/parse-events.c     |   26 +++-
 tools/perf/util/parse-events.h     |    2 +
 9 files changed, 322 insertions(+), 147 deletions(-)
 
CD: 3ms