perf trace: Add filter Suppport
authorLi Zefan <lizf@cn.fujitsu.com>
Thu, 15 Oct 2009 03:22:07 +0000 (11:22 +0800)
committerIngo Molnar <mingo@elte.hu>
Thu, 15 Oct 2009 09:35:23 +0000 (11:35 +0200)
commitc171b552a7d316c7e1c3ad6f70a30178dd53e14c
tree99755963367839f3232565acd0ff1680037126fa
parent6fb2915df7f0747d9044da9dbff5b46dc2e20830
perf trace: Add filter Suppport

Add a new option "--filter <filter_str>" to perf record, and
it should be right after "-e trace_point":

 #./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

See Documentation/trace/events.txt for the syntax of filter
expressions.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <4AD6955F.90602@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/builtin-record.c
tools/perf/util/parse-events.c
tools/perf/util/parse-events.h