From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755683AbcFQP36 (ORCPT ); Fri, 17 Jun 2016 11:29:58 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:63661 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753126AbcFQP34 (ORCPT ); Fri, 17 Jun 2016 11:29:56 -0400 X-IronPort-AV: E=Sophos;i="5.26,484,1459807200"; d="scan'208";a="181643679" Date: Fri, 17 Jun 2016 17:29:49 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: "Luis R. Rodriguez" cc: Julia Lawall , Gilles.Muller@lip6.fr, nicolas.palix@imag.fr, mmarek@suse.com, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, gregkh@linuxfoundation.org, markivx@codeaurora.org, stephen.boyd@linaro.org, zohar@linux.vnet.ibm.com, broonie@kernel.org, ming.lei@canonical.com, tiwai@suse.de, johannes@sipsolutions.net, chunkeey@googlemail.com, hauke@hauke-m.de, jwboyer@fedoraproject.org, dmitry.torokhov@gmail.com, dwmw2@infradead.org, jslaby@suse.com, torvalds@linux-foundation.org, cocci@systeme.lip6.fr Subject: Re: [PATCH v2 3/8] coccicheck: add indexing enhancement options In-Reply-To: <20160617151229.GO11948@wotan.suse.de> Message-ID: References: <1466116292-21843-1-git-send-email-mcgrof@kernel.org> <1466116292-21843-4-git-send-email-mcgrof@kernel.org> <20160617151229.GO11948@wotan.suse.de> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 17 Jun 2016, Luis R. Rodriguez wrote: > On Fri, Jun 17, 2016 at 11:47:25AM +0200, Julia Lawall wrote: > > > > > > On Thu, 16 Jun 2016, Luis R. Rodriguez wrote: > > > > > Coccinelle has support to make use of its own enhanced "grep" > > > mechanisms instead of using regular grep for searching code, > > > it calls this 'coccigrep'. In lack of any indexing optimization > > > information it uses --use-coccigrep by default. > > > > > > This patch enable indexing optimizations heuristics so that coccigrep > > > can automatically detect what indexing options are available and use > > > them accordinly without any user input. > > > > > > Since git has its own index, support for using 'git grep' has been > > > added to Coccinelle, that should on average perform better than > > > using the internal coccigrep. Coccinelle has had idutils support > > > as well for a while now, you however need to refer to the index > > > file. We support detecting two idutils index files by default, > > > ID and .id-utils.index, assuming you ran either of: > > > > > > # What you might have done: > > > mkid -s > > > # as in coccinelle scripts/idutils_index.sh > > > mkid -i C --output .id-utils.index * > > > > > > Lastly, Coccinelle has had support for glimpseindex for a long while, > > > however the glimpseindex tool, the agrep library were previously closed > > > source, its all now open sourced, and provides the best performance, so > > > support that if we can detect you have a glimpse index. > > > > > > You can always override the index as follows: > > > > > > $ make coccicheck V=1 MODE=report COCCI_INDEX="--use-idutils ID" > > > > Why not just have a generic COCCI_ARGS argument? > > Actually SPFLAGS exists already so we can just document to > override using that. Will fix. That seems like a good solution. julia From mboxrd@z Thu Jan 1 00:00:00 1970 From: julia.lawall@lip6.fr (Julia Lawall) Date: Fri, 17 Jun 2016 17:29:49 +0200 (CEST) Subject: [Cocci] [PATCH v2 3/8] coccicheck: add indexing enhancement options In-Reply-To: <20160617151229.GO11948@wotan.suse.de> References: <1466116292-21843-1-git-send-email-mcgrof@kernel.org> <1466116292-21843-4-git-send-email-mcgrof@kernel.org> <20160617151229.GO11948@wotan.suse.de> Message-ID: To: cocci@systeme.lip6.fr List-Id: cocci@systeme.lip6.fr On Fri, 17 Jun 2016, Luis R. Rodriguez wrote: > On Fri, Jun 17, 2016 at 11:47:25AM +0200, Julia Lawall wrote: > > > > > > On Thu, 16 Jun 2016, Luis R. Rodriguez wrote: > > > > > Coccinelle has support to make use of its own enhanced "grep" > > > mechanisms instead of using regular grep for searching code, > > > it calls this 'coccigrep'. In lack of any indexing optimization > > > information it uses --use-coccigrep by default. > > > > > > This patch enable indexing optimizations heuristics so that coccigrep > > > can automatically detect what indexing options are available and use > > > them accordinly without any user input. > > > > > > Since git has its own index, support for using 'git grep' has been > > > added to Coccinelle, that should on average perform better than > > > using the internal coccigrep. Coccinelle has had idutils support > > > as well for a while now, you however need to refer to the index > > > file. We support detecting two idutils index files by default, > > > ID and .id-utils.index, assuming you ran either of: > > > > > > # What you might have done: > > > mkid -s > > > # as in coccinelle scripts/idutils_index.sh > > > mkid -i C --output .id-utils.index * > > > > > > Lastly, Coccinelle has had support for glimpseindex for a long while, > > > however the glimpseindex tool, the agrep library were previously closed > > > source, its all now open sourced, and provides the best performance, so > > > support that if we can detect you have a glimpse index. > > > > > > You can always override the index as follows: > > > > > > $ make coccicheck V=1 MODE=report COCCI_INDEX="--use-idutils ID" > > > > Why not just have a generic COCCI_ARGS argument? > > Actually SPFLAGS exists already so we can just document to > override using that. Will fix. That seems like a good solution. julia