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

From: Masami Hiramatsu
Date: Thu Jan 13 2011 - 08:18:15 EST


(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@xxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/