linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how do YOU hack the linux kernel ?
@ 2010-01-19 12:52 Ramagudi Naziir
  2010-01-19 13:15 ` Samuel Thibault
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Ramagudi Naziir @ 2010-01-19 12:52 UTC (permalink / raw)
  To: linux-kernel

do you use vim ?

If so, how do you open files you want to read/edit ?
Assuming you don't remember their exact name/location, you'd need to
use something like 'find . -iname '*pattern*'. which is slow.
You can also ":tabnew ." and just browse the folders, but that's super slow too.


so, do you use stuff like 'Source Insight' ?

It does have a great files viewer, where you can just type a few
letters, and it immediately shows only files that match the pattern
you typed (just like in iTunes). This is blazing fast. But it's Source
Insight. you need to fight it not to over-visualizes your file, and
not to mess up with your whitespace. not to mention that it's
windows-only (although wine seems to help here a bit).


so.. back to vim ? It does have relevant plugins that tries to give
you fast files opener, like the 'project' plugin (totally unmaintained
and buggy) or the 'tselectfiles' plugin (slow, hard to use).


I'd really like to use vim, it's fast and gives you control, but
really I must have some way to quickly access my files.


Any ideas ?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how do YOU hack the linux kernel ?
  2010-01-19 12:52 how do YOU hack the linux kernel ? Ramagudi Naziir
@ 2010-01-19 13:15 ` Samuel Thibault
  2010-01-19 14:29 ` Américo Wang
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Samuel Thibault @ 2010-01-19 13:15 UTC (permalink / raw)
  To: Ramagudi Naziir; +Cc: linux-kernel

Ramagudi Naziir, le Tue 19 Jan 2010 14:52:57 +0200, a écrit :
> Any ideas ?

I just use tags.

Samuel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how do YOU hack the linux kernel ?
  2010-01-19 12:52 how do YOU hack the linux kernel ? Ramagudi Naziir
  2010-01-19 13:15 ` Samuel Thibault
@ 2010-01-19 14:29 ` Américo Wang
  2010-01-20  6:35   ` Petr Uzel
  2010-01-20  8:33 ` Michael Wookey
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 9+ messages in thread
From: Américo Wang @ 2010-01-19 14:29 UTC (permalink / raw)
  To: Ramagudi Naziir; +Cc: linux-kernel

On Tue, Jan 19, 2010 at 02:52:57PM +0200, Ramagudi Naziir wrote:
>do you use vim ?
>
...
>so, do you use stuff like 'Source Insight' ?
>
...
>
>Any ideas ?

Use cscope, if you need GUI, try kcscope.

-- 
Live like a child, think like the god.
 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how do YOU hack the linux kernel ?
  2010-01-19 14:29 ` Américo Wang
@ 2010-01-20  6:35   ` Petr Uzel
  0 siblings, 0 replies; 9+ messages in thread
From: Petr Uzel @ 2010-01-20  6:35 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 439 bytes --]

On Tue, Jan 19, 2010 at 10:29:04PM +0800, Américo Wang wrote:
> >so, do you use stuff like 'Source Insight' ?
> >
> ...
> >
> >Any ideas ?
> 
> Use cscope, if you need GUI, try kcscope.

For cscope-vim integration howto, see
http://cscope.sourceforge.net/cscope_vim_tutorial.html

This might be also interesting wrt kernel:
http://cscope.sourceforge.net/large_projects.html


Petr

--
Petr Uzel, openSUSE Boosters Team

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how do YOU hack the linux kernel ?
  2010-01-19 12:52 how do YOU hack the linux kernel ? Ramagudi Naziir
  2010-01-19 13:15 ` Samuel Thibault
  2010-01-19 14:29 ` Américo Wang
@ 2010-01-20  8:33 ` Michael Wookey
  2010-01-20 18:04 ` Krzysztof Halasa
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Michael Wookey @ 2010-01-20  8:33 UTC (permalink / raw)
  To: Ramagudi Naziir; +Cc: linux-kernel

2010/1/19 Ramagudi Naziir <naziirr@gmail.com>:
> Assuming you don't remember their exact name/location, you'd need to
> use something like 'find . -iname '*pattern*'. which is slow.

You could use git to find the files quickly...

  ~/src/linux-2.6 (master)$ git ls-files *eeepc*
  Documentation/ABI/testing/sysfs-platform-eeepc-laptop
  drivers/platform/x86/eeepc-laptop.c

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how do YOU hack the linux kernel ?
  2010-01-19 12:52 how do YOU hack the linux kernel ? Ramagudi Naziir
                   ` (2 preceding siblings ...)
  2010-01-20  8:33 ` Michael Wookey
@ 2010-01-20 18:04 ` Krzysztof Halasa
  2010-01-21  0:15 ` Andi Kleen
  2010-01-29  8:10 ` Daniel Mack
  5 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Halasa @ 2010-01-20 18:04 UTC (permalink / raw)
  To: Ramagudi Naziir; +Cc: linux-kernel

Ramagudi Naziir <naziirr@gmail.com> writes:

> do you use vim ?

Sure, for small changes. And emacs.

> If so, how do you open files you want to read/edit ?
> Assuming you don't remember their exact name/location, you'd need to
> use something like 'find . -iname '*pattern*'. which is slow.

Not very slow, if the tree is already in cache. You need only ca. 1 GB
of RAM for this. I never use ".", I use "*" instead as it ignores .git
directory:

$ time find * -iname \*pattern\*
real    0m0.051s

$ time grep "The pattern" * -r
(results)
real    0m0.330s

(grep -i is much slower).

Other tools? Git, gitk and WWW browser :-)
-- 
Krzysztof Halasa

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how do YOU hack the linux kernel ?
  2010-01-19 12:52 how do YOU hack the linux kernel ? Ramagudi Naziir
                   ` (3 preceding siblings ...)
  2010-01-20 18:04 ` Krzysztof Halasa
@ 2010-01-21  0:15 ` Andi Kleen
  2010-01-29  8:10 ` Daniel Mack
  5 siblings, 0 replies; 9+ messages in thread
From: Andi Kleen @ 2010-01-21  0:15 UTC (permalink / raw)
  To: Ramagudi Naziir; +Cc: linux-kernel

Ramagudi Naziir <naziirr@gmail.com> writes:

> do you use vim ?
>
> If so, how do you open files you want to read/edit ?
> Assuming you don't remember their exact name/location, you'd need to
> use something like 'find . -iname '*pattern*'. which is slow.

GNU id-utils does that nicely (file name / symbol lookup)
I usually use it for symbol lookup.

I am not aware of a vim integration though, although
there's one for emacs.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how do YOU hack the linux kernel ?
  2010-01-19 12:52 how do YOU hack the linux kernel ? Ramagudi Naziir
                   ` (4 preceding siblings ...)
  2010-01-21  0:15 ` Andi Kleen
@ 2010-01-29  8:10 ` Daniel Mack
  2010-01-29 11:37   ` Andy Walls
  5 siblings, 1 reply; 9+ messages in thread
From: Daniel Mack @ 2010-01-29  8:10 UTC (permalink / raw)
  To: Ramagudi Naziir; +Cc: linux-kernel

On Tue, Jan 19, 2010 at 02:52:57PM +0200, Ramagudi Naziir wrote:
> do you use vim ?
> 
> If so, how do you open files you want to read/edit ?
> Assuming you don't remember their exact name/location, you'd need to
> use something like 'find . -iname '*pattern*'. which is slow.
> You can also ":tabnew ." and just browse the folders, but that's super slow too.

Just use ctags to index your tree. Vim can then use this index to
directly drop you at the definition of a symbol. Works very well. Just
google around to find tutorials to describe that in detail.

LXR is also a nice help sometimes: http://lxr.linux.no/linux/

Other than that you might develop a feeling for where to search, so you
can narrow your 'git grep' to specific places.

HTH,
Daniel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how do YOU hack the linux kernel ?
  2010-01-29  8:10 ` Daniel Mack
@ 2010-01-29 11:37   ` Andy Walls
  0 siblings, 0 replies; 9+ messages in thread
From: Andy Walls @ 2010-01-29 11:37 UTC (permalink / raw)
  To: Daniel Mack; +Cc: Ramagudi Naziir, linux-kernel

On Fri, 2010-01-29 at 09:10 +0100, Daniel Mack wrote:
> On Tue, Jan 19, 2010 at 02:52:57PM +0200, Ramagudi Naziir wrote:
> > do you use vim ?
> > 
> > If so, how do you open files you want to read/edit ?
> > Assuming you don't remember their exact name/location, you'd need to
> > use something like 'find . -iname '*pattern*'. which is slow.
> > You can also ":tabnew ." and just browse the folders, but that's super slow too.
> 
> Just use ctags to index your tree. Vim can then use this index to
> directly drop you at the definition of a symbol. Works very well.


Yup.  That's what I use.

>  Just
> google around to find tutorials to describe that in detail.

$ man ctags
$ vim
:help tags

for those who don't wish to rely on the Goggle.

Regards,
Andy

> LXR is also a nice help sometimes: http://lxr.linux.no/linux/
> 
> Other than that you might develop a feeling for where to search, so you
> can narrow your 'git grep' to specific places.
> 
> HTH,
> Daniel



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-01-29 11:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-19 12:52 how do YOU hack the linux kernel ? Ramagudi Naziir
2010-01-19 13:15 ` Samuel Thibault
2010-01-19 14:29 ` Américo Wang
2010-01-20  6:35   ` Petr Uzel
2010-01-20  8:33 ` Michael Wookey
2010-01-20 18:04 ` Krzysztof Halasa
2010-01-21  0:15 ` Andi Kleen
2010-01-29  8:10 ` Daniel Mack
2010-01-29 11:37   ` Andy Walls

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).