[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVo67RrcencMOTJSL_=fGjDFBtczRpvW6D8QbVxNy-t3g@mail.gmail.com>
Date: Fri, 28 Dec 2012 23:03:40 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Borislav Petkov <bp@...en8.de>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
anish singh <anish198519851985@...il.com>,
amit mehta <gmate.amit@...il.com>,
Henrique Rodrigues <henriquesilvar@...il.com>,
kishore kumar <kishoreopen@...il.com>,
Jonathan Neuschäfer <j.neuschaefer@....net>,
linux-kernel@...r.kernel.org, Kernelnewbies@...nelnewbies.org
Subject: Re: how to look for source code in kernel
On Fri, Dec 28, 2012 at 2:07 PM, Borislav Petkov <bp@...en8.de> wrote:
> On Thu, Dec 27, 2012 at 11:36:13PM -0800, Eric W. Biederman wrote:
>> git-ls-files | xargs fgrep 'struct f2fs_inode'
>>
>> That returns instantly and tells me where to look. If you can do an
>> instant brute force search what is the point of an index?
>
> Not if you're using a lame-ass laptop with a rotating disk:
>
> $ time git ls-files | xargs grep -E 'struct mce\W*{'
> arch/x86/include/uapi/asm/mce.h:struct mce {
> arch/x86/kernel/cpu/mcheck/mce.c: if (!final || memcmp(m, final, sizeof(struct mce))) {
>
> real 2m48.415s
> user 0m2.388s
> sys 0m15.668s
That's the first run. Now everything is in the buffer cache (assumed you have
enough RAM), and try again...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists