diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2011-01-20 09:15:30 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-28 06:19:38 -0500 |
commit | 68baa431ec2f14ba7510d4e79bceb6ceaf0d3b74 (patch) | |
tree | 01c1901907ffa1a462d8a06b126736337f11758e /tools/perf/Makefile | |
parent | d380eaaea70d775c0520dcb5702ea5d2a56b7be9 (diff) |
perf tools: Add strfilter for general purpose string filter
Add strfilter for general purpose string filter.
Every filter rules are descrived by glob matching pattern and '!' prefix
which means Logical NOT.
A strfilter consists of those filter rules connected with '&' and '|'.
A set of rules can be folded by using '(' and ')'.
It also accepts spaces around rules and those operators.
Format:
<rule> ::= <glob-exp> | "!" <rule> | <rule> <op> <rule> | "(" <rule> ")"
<op> ::= "&" | "|"
e.g.:
"(add* | del*) & *timer" filter rules pass strings which start with add
or del and end with timer.
This will be used by perf probe --filter.
Changes in V2:
- Fix to check result of strdup() and strfilter__alloc().
- Encapsulate and simplify interfaces as like regex(3).
Cc: 2nddept-manager@sdl.hitachi.co.jp
Cc: Franck Bui-Huu <fbuihuu@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <20110120141530.25915.12673.stgit@ltc236.sdl.hitachi.co.jp>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r-- | tools/perf/Makefile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 638e8e146bb9..eedcf9541572 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -417,6 +417,7 @@ LIB_H += util/help.h | |||
417 | LIB_H += util/session.h | 417 | LIB_H += util/session.h |
418 | LIB_H += util/strbuf.h | 418 | LIB_H += util/strbuf.h |
419 | LIB_H += util/strlist.h | 419 | LIB_H += util/strlist.h |
420 | LIB_H += util/strfilter.h | ||
420 | LIB_H += util/svghelper.h | 421 | LIB_H += util/svghelper.h |
421 | LIB_H += util/run-command.h | 422 | LIB_H += util/run-command.h |
422 | LIB_H += util/sigchain.h | 423 | LIB_H += util/sigchain.h |
@@ -458,6 +459,7 @@ LIB_OBJS += $(OUTPUT)util/quote.o | |||
458 | LIB_OBJS += $(OUTPUT)util/strbuf.o | 459 | LIB_OBJS += $(OUTPUT)util/strbuf.o |
459 | LIB_OBJS += $(OUTPUT)util/string.o | 460 | LIB_OBJS += $(OUTPUT)util/string.o |
460 | LIB_OBJS += $(OUTPUT)util/strlist.o | 461 | LIB_OBJS += $(OUTPUT)util/strlist.o |
462 | LIB_OBJS += $(OUTPUT)util/strfilter.o | ||
461 | LIB_OBJS += $(OUTPUT)util/usage.o | 463 | LIB_OBJS += $(OUTPUT)util/usage.o |
462 | LIB_OBJS += $(OUTPUT)util/wrapper.o | 464 | LIB_OBJS += $(OUTPUT)util/wrapper.o |
463 | LIB_OBJS += $(OUTPUT)util/sigchain.o | 465 | LIB_OBJS += $(OUTPUT)util/sigchain.o |