From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756749Ab1AMNSL (ORCPT ); Thu, 13 Jan 2011 08:18:11 -0500 Received: from mail4.hitachi.co.jp ([133.145.228.5]:41123 "EHLO mail4.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756285Ab1AMNSJ (ORCPT ); Thu, 13 Jan 2011 08:18:09 -0500 X-AuditID: b753bd60-9d28dba000000ca4-91-4d2efb8e680b Message-ID: <4D2EFB8A.5050105@hitachi.com> Date: Thu, 13 Jan 2011 22:18:02 +0900 From: Masami Hiramatsu Organization: Systems Development Lab., Hitachi, Ltd., Japan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Peter Zijlstra Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Steven Rostedt , Srikar Dronamraju , Franck Bui-Huu , linux-kernel@vger.kernel.org, 2nddept-manager@sdl.hitachi.co.jp, Paul Mackerras , Arnaldo Carvalho de Melo Subject: Re: [PATCH -perf/perf/core 4/6] perf: Add strfilter for general purpose string filter References: <20110113124548.22426.11201.stgit@ltc236.sdl.hitachi.co.jp> <20110113124617.22426.25293.stgit@ltc236.sdl.hitachi.co.jp> <1294923701.19601.108.camel@laptop> In-Reply-To: <1294923701.19601.108.camel@laptop> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAA== X-FMFTCR: RANGEC Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (2011/01/13 22:01), Peter Zijlstra wrote: > On Thu, 2011-01-13 at 21:46 +0900, Masami Hiramatsu wrote: >> Format: >> ::= | "!" | | "(" ")" >> ::= "&" | "|" >> >> 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