From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751375AbcFRKhP (ORCPT ); Sat, 18 Jun 2016 06:37:15 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:64920 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751110AbcFRKhM (ORCPT ); Sat, 18 Jun 2016 06:37:12 -0400 X-IronPort-AV: E=Sophos;i="5.26,487,1459807200"; d="scan'208";a="222948457" Date: Sat, 18 Jun 2016 12:37:09 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@localhost6.localdomain6 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 4/8] scripts: add glimpse.sh for indexing the kernel In-Reply-To: <20160618012243.GD11948@wotan.suse.de> Message-ID: References: <1466116292-21843-1-git-send-email-mcgrof@kernel.org> <1466116292-21843-5-git-send-email-mcgrof@kernel.org> <20160617151052.GN11948@wotan.suse.de> <20160618012243.GD11948@wotan.suse.de> User-Agent: Alpine 2.02 (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 Overall, idutils seems to be a good choice. As compared to a grep based solution, it knows what is code, so it doesn't report on files where the words of interest only occur in comments. As compared to glimpse, it knows that foo_bar is a single word. Indexing is faster than with glimpse, and looking things up in the index is also slightly faster, even though Coccinelle needs to make multiple calls because it doesn't support complex formulas. It does support regexps, which could perhaps be even faster, but since the running time currently is mostly under 1 second and often under .1 seconds, it probably doesn't matter. julia