Re: [PATCH -perf/perf/core 4/6] perf: Add strfilter for general purpose string filter

Masami Hiramatsu
2011-01-13T13:18:11Z

(2011/01/13 22:01), Peter Zijlstra wrote:
> On Thu, 2011-01-13 at 21:46 +0900, Masami Hiramatsu wrote:
>> 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.
>
> Why not simply use regexps?

IMHO, regexp is usually too complex and too powerful just for
filtering and the combination of wild cards are simple and enough. :)
Moreover, if you'd like to filter with regexp, you just can use
"| grep" or "| egrep". ;)

(Of course, it is possible to expand this filter to support regexp by simply
adding "~REGEXP" rule as ftrace does)

Thank you,

--
Masami HIRAMATSU
2nd Dept. Linux Technology Center
Hitachi, Ltd., Systems Development Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com