how to look for source code in kernel
can anybody tell me how to look into source code, as most are hidden in
kernel.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20121227/6a538c26/attachment.html
Quoted 2 lines · kishore kumar
can anybody tell me how to look into source code, as most are hidden in kernel.
You can find the Linux source code at http://kernel.org/ .
HTH,
Jonathan Neusch?fer
http://lxr.linux.no/ is a really good linux cross referencing website for code reference.
On Thu, Dec 27, 2012 at 10:40 AM, Jonathan Neusch?fer <[email protected]
Quoted 16 lines
wrote:
Quoted 2 lines · kishore kumar
can anybody tell me how to look into source code, as most are hidden in kernel.
You can find the Linux source code at http://kernel.org/ .
HTH,
Jonathan Neusch?fer_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Signature · 5 lines
Henrique Rodrigues http://www.dcc.ufmg.br/~hsr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20121227/90cc4d90/attachment.html
Quoted 11 lines · Henrique Rodrigues
http://lxr.linux.no/ is a really good linux cross referencing website for code reference.
Quoted 6 lines · Jonathan Neusch?fer
Quoted 2 lines · kishore kumar
can anybody tell me how to look into source code, as most are hidden in kernel.
You can find the Linux source code at http://kernel.org/ .
for browsing the code unfortunately there is no good tool as in windows we have source insight.We can use wine in linux but that sucks.
Quoted 21 lines
Quoted 8 lines
HTH,
Jonathan Neusch?fer_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies--
Henrique Rodrigues
http://www.dcc.ufmg.br/~hsr_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines · kishore kumar
Quoted 2 lines
can anybody tell me how to look into source code, as most are hidden in kernel.
You can find the Linux source code at http://kernel.org/ .
for browsing the code unfortunately there is no good tool as in windows we have source insight.We can use wine in linux but that sucks.
Funny you say that!
Never heard of cscope, ctags ?
-Amit
Quoted 9 lines · amit mehta
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines · kishore kumar
Quoted 2 lines
can anybody tell me how to look into source code, as most are hidden in kernel.
You can find the Linux source code at http://kernel.org/ .
for browsing the code unfortunately there is no good tool as in windows we have source insight.We can use wine in linux but that sucks.
Funny you say that!
Never heard of cscope, ctags ?
It is not as convenient as source insight or is it?
Quoted 2 lines
-Amit
Quoted 4 lines · anish singh
Quoted 3 lines
Quoted 1 line
have source insight.We can use wine in linux but that sucks.
Funny you say that!
Never heard of cscope, ctags ?It is not as convenient as source insight or is it?
There is also LXR.
If it's not good enough for you, then don't look at it.
Quoted 11 lines · anish singh
Quoted 9 lines · amit mehta
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines · kishore kumar
Quoted 2 lines
can anybody tell me how to look into source code, as most are hidden in kernel.
You can find the Linux source code at http://kernel.org/ .
for browsing the code unfortunately there is no good tool as in windows we have source insight.We can use wine in linux but that sucks.
Funny you say that!
Never heard of cscope, ctags ?It is not as convenient as source insight or is it?
I took a look and source insite seems to have a whole lot of inconvinient mousing around. A setup where you get to stay on your home keys seems much more convinient to me.
But then I am probably peculiar keeping an index of the source code in my head. When I need to look for something and I don't know where to find it I do.
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?
My experience with gui editors is that they always hide something I need to see, or my code is just strange enough (say having asm file, or supporting multiple architectures) that the tools get horribly confused.
So I suspect source insight would be terribly inconvinient to the point of uselessness to me.
Eric
Quoted 4 lines · Eric W. Biederman
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
What I've grown accustomed to is cscope with a prior find run on the kernel source tree to create a custom cscope.files which cscope uses to index and then using vim bindings in cscope so that if, for example, the cursor is on a function call, executing a keyboard shortcut opens the definition of that function in another vim tab. I.e., a thin IDE done right.
Quoted 4 lines
My experience with gui editors is that they always hide something I need to see, or my code is just strange enough (say having asm file, or supporting multiple architectures) that the tools get horribly confused.
That's true, then I tend to use another xterm with tabbed vim showing additional files. Btw, git ls-files assumes a source file is tracked by git and in the seldom case where you're adding new, yet untracked files, that won't work.
So probably a mixed approach of cscope in one window and grep + editor in another would cover all bases. For a newbie who wants to only browse the code, cscope should be enough for starters, I'd say.
Thanks.
Signature · 2 lines
Regards/Gruss, Boris.
Quoted 8 lines · Borislav Petkov
Quoted 4 lines · Eric W. Biederman
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:
Quoted 7 lines
$ 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 -- [email protected]
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
Quoted 2 lines · Geert Uytterhoeven
That's the first run. Now everything is in the buffer cache (assumed you have enough RAM), and try again...
Right, until you do something else on the box requiring just the right amount of memory to overflow the buffer cache working set and start kicking out pages. Btw, the thing has 4G of RAM.
* first run:
$ 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
* second run coming from the buffer cache, search for something else:
$ time git ls-files | xargs grep -E 'struct task_struct\W*{'
include/linux/sched.h:struct task_struct {real 0m1.651s user 0m0.672s sys 0m1.048s
* do something else (kernel build, git gc, some (very leaky) userspace memory hog, whatever :)) which kicks some buffer cache pages out:
$ 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 0m37.360s user 0m1.152s sys 0m4.176s
so on a machine with a lot of memory and an SSD, you can probably safely rely on the buffer cache but not on a laptop, in my experience.
Btw, cscope can also grep for regex patterns so you don't need the git grep thing anymore, especially since it looks at tracked files only.
Thanks.
Signature · 2 lines
Regards/Gruss, Boris.
Quoted 16 lines · Borislav Petkov
Quoted 4 lines · Eric W. Biederman
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
Quoted 6 lines
What I've grown accustomed to is cscope with a prior find run on the kernel source tree to create a custom cscope.files which cscope uses to index and then using vim bindings in cscope so that if, for example, the cursor is on a function call, executing a keyboard shortcut opens the definition of that function in another vim tab. I.e., a thin IDE done right.
...same works with TAGS under emacs, the only annoying problem with it since "recently" (about half a year or more) is that "make TAGS" is spewing out tons of
etags: Unmatched ( or \( while compiling pattern
oh well, looks like noone is using it / noone cares enough...
Thanks
Guennadi
Quoted 11 lines
Quoted 5 lines
My experience with gui editors is that they always hide something I need to see, or my code is just strange enough (say having asm file, or supporting multiple architectures) that the tools get horribly confused.
That's true, then I tend to use another xterm with tabbed vim showing additional files. Btw, git ls-files assumes a source file is tracked by git and in the seldom case where you're adding new, yet untracked files, that won't work.
Quoted 15 lines
So probably a mixed approach of cscope in one window and grep + editor in another would cover all bases. For a newbie who wants to only browse the code, cscope should be enough for starters, I'd say.
Thanks.
Signature · 7 lines
Regards/Gruss, Boris. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
Quoted 25 lines · Guennadi Liakhovetski
Quoted 16 lines · Borislav Petkov
Quoted 4 lines · Eric W. Biederman
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.668sQuoted 6 lines
What I've grown accustomed to is cscope with a prior find run on the kernel source tree to create a custom cscope.files which cscope uses to index and then using vim bindings in cscope so that if, for example, the cursor is on a function call, executing a keyboard shortcut opens the definition of that function in another vim tab. I.e., a thin IDE done right.
Quoted 8 lines
...same works with TAGS under emacs, the only annoying problem with it since "recently" (about half a year or more) is that "make TAGS" is spewing out tons of
etags: Unmatched ( or \( while compiling pattern
oh well, looks like noone is using it / noone cares enough...
I use it. I haven't bothered (yet) to look into the cause of the message it spews since the etags ('TAGS') file it produces still seems to work well enough.
Signature · 3 lines
Jesper Juhl <[email protected]> http://www.chaosbits.net/ Don't top-post http://www.catb.org/jargon/html/T/top-post.html Plain text mails only, please.
PATCH 1/1 scripts/tags.sh: Fix regex syntax for etags
In reply to Guennadi Liakhovetski--- scripts/tags.sh | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-)
scripts/tags.sh +25 -25
@@ -201,34 +201,34 @@ exuberant() emacs() { all_target_sources | xargs $1 -a \ - --regex='/^(ENTRY|_GLOBAL)(\([^)]*\)).*/\2/' \ + --regex='/^\(ENTRY\|_GLOBAL\)(\([^)]*\)).*/\2/' \ --regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \ --regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \ --regex='/^DEFINE_EVENT([^,)]*, *\([^,)]*\).*/trace_\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex='/TESTSETFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex='/TESTPAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex='/SETPAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex='/__SETPAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex='/TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/__TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/CLEARPAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex='/__CLEARPAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex='/__PAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex='/__PAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex='/PAGEFLAG_FALSE\(([^,)]*).*/Page\1/' \ - --regex='/TESTSCFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex='/TESTSCFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/SETPAGEFLAG_NOOP\(([^,)]*).*/SetPage\1/' \ - --regex='/CLEARPAGEFLAG_NOOP\(([^,)]*).*/ClearPage\1/' \ - --regex='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \ - --regex='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ - --regex='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' \ - --regex='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' \ - --regex='/PCI_OP_READ\(([a-z]*[a-z]).*[1-4]\)/pci_bus_read_config_\1/' \ - --regex='/PCI_OP_WRITE\(([a-z]*[a-z]).*[1-4]\)/pci_bus_write_config_\1/' + --regex='/PAGEFLAG(\([^,)]*\).*/Page\1/' \ + --regex='/PAGEFLAG(\([^,)]*\).*/SetPage\1/' \ + --regex='/PAGEFLAG(\([^,)]*\).*/ClearPage\1/' \ + --regex='/TESTSETFLAG(\([^,)]*\).*/TestSetPage\1/' \ + --regex='/TESTPAGEFLAG(\([^,)]*\).*/Page\1/' \ + --regex='/SETPAGEFLAG(\([^,)]*\).*/SetPage\1/' \ + --regex='/__SETPAGEFLAG(\([^,)]*\).*/__SetPage\1/' \ + --regex='/TESTCLEARFLAG(\([^,)]*\).*/TestClearPage\1/' \ + --regex='/__TESTCLEARFLAG(\([^,)]*\).*/TestClearPage\1/' \ + --regex='/CLEARPAGEFLAG(\([^,)]*\).*/ClearPage\1/' \ + --regex='/__CLEARPAGEFLAG(\([^,)]*\).*/__ClearPage\1/' \ + --regex='/__PAGEFLAG(\([^,)]*\).*/__SetPage\1/' \ + --regex='/__PAGEFLAG(\([^,)]*\).*/__ClearPage\1/' \ + --regex='/PAGEFLAG_FALSE(\([^,)]*\).*/Page\1/' \ + --regex='/TESTSCFLAG(\([^,)]*\).*/TestSetPage\1/' \ + --regex='/TESTSCFLAG(\([^,)]*\).*/TestClearPage\1/' \ + --regex='/SETPAGEFLAG_NOOP(\([^,)]*\).*/SetPage\1/' \ + --regex='/CLEARPAGEFLAG_NOOP(\([^,)]*\).*/ClearPage\1/' \ + --regex='/__CLEARPAGEFLAG_NOOP(\([^,)]*\).*/__ClearPage\1/' \ + --regex='/TESTCLEARFLAG_FALSE(\([^,)]*\).*/TestClearPage\1/' \ + --regex='/__TESTCLEARFLAG_FALSE(\([^,)]*\).*/__TestClearPage\1/' \ + --regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/' \ + --regex='/PCI_OP_READ(\([a-z]*[a-z]\).*[1-4])/pci_bus_read_config_\1/' \ + --regex='/PCI_OP_WRITE(\([a-z]*[a-z]\).*[1-4])/pci_bus_write_config_\1/' all_kconfigs | xargs $1 -a \ --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/'
Signature · 7 lines
1.8.0.3 -- Andreas Schwab, [email protected] GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Re: [PATCH] scripts/tags.sh: Fix regex syntax for etags
Quoted 60 lines · Andreas Schwab
Signed-off-by Andreas Schwab <[email protected]>--- scripts/tags.sh | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-)scripts/tags.sh +18
-25@@ -201,34 +201,34 @@ exuberant() emacs() { all_target_sources | xargs $1 -a \ - --regex='/^(ENTRY|_GLOBAL)(\([^)]*\)).*/\2/' \ + --regex='/^\(ENTRY\|_GLOBAL\)(\([^)]*\)).*/\2/' \ --regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \ --regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \ --regex='/^DEFINE_EVENT([^,)]*, *\([^,)]*\).*/trace_\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex='/PAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex='/TESTSETFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex='/TESTPAGEFLAG\(([^,)]*).*/Page\1/' \ - --regex='/SETPAGEFLAG\(([^,)]*).*/SetPage\1/' \ - --regex='/__SETPAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex='/TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/__TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/CLEARPAGEFLAG\(([^,)]*).*/ClearPage\1/' \ - --regex='/__CLEARPAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex='/__PAGEFLAG\(([^,)]*).*/__SetPage\1/' \ - --regex='/__PAGEFLAG\(([^,)]*).*/__ClearPage\1/' \ - --regex='/PAGEFLAG_FALSE\(([^,)]*).*/Page\1/' \ - --regex='/TESTSCFLAG\(([^,)]*).*/TestSetPage\1/' \ - --regex='/TESTSCFLAG\(([^,)]*).*/TestClearPage\1/' \ - --regex='/SETPAGEFLAG_NOOP\(([^,)]*).*/SetPage\1/' \ - --regex='/CLEARPAGEFLAG_NOOP\(([^,)]*).*/ClearPage\1/' \ - --regex='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \ - --regex='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ - --regex='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' \ - --regex='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' \ - --regex='/PCI_OP_READ\(([a-z]*[a-z]).*[1-4]\)/pci_bus_read_config_\1/' \ - --regex='/PCI_OP_WRITE\(([a-z]*[a-z]).*[1-4]\)/pci_bus_write_config_\1/' + --regex='/PAGEFLAG(\([^,)]*\).*/Page\1/' \ + --regex='/PAGEFLAG(\([^,)]*\).*/SetPage\1/' \ + --regex='/PAGEFLAG(\([^,)]*\).*/ClearPage\1/' \ + --regex='/TESTSETFLAG(\([^,)]*\).*/TestSetPage\1/' \ + --regex='/TESTPAGEFLAG(\([^,)]*\).*/Page\1/' \ + --regex='/SETPAGEFLAG(\([^,)]*\).*/SetPage\1/' \ + --regex='/__SETPAGEFLAG(\([^,)]*\).*/__SetPage\1/' \ + --regex='/TESTCLEARFLAG(\([^,)]*\).*/TestClearPage\1/' \ + --regex='/__TESTCLEARFLAG(\([^,)]*\).*/TestClearPage\1/' \ + --regex='/CLEARPAGEFLAG(\([^,)]*\).*/ClearPage\1/' \ + --regex='/__CLEARPAGEFLAG(\([^,)]*\).*/__ClearPage\1/' \ + --regex='/__PAGEFLAG(\([^,)]*\).*/__SetPage\1/' \ + --regex='/__PAGEFLAG(\([^,)]*\).*/__ClearPage\1/' \ + --regex='/PAGEFLAG_FALSE(\([^,)]*\).*/Page\1/' \ + --regex='/TESTSCFLAG(\([^,)]*\).*/TestSetPage\1/' \ + --regex='/TESTSCFLAG(\([^,)]*\).*/TestClearPage\1/' \ + --regex='/SETPAGEFLAG_NOOP(\([^,)]*\).*/SetPage\1/' \
scripts/tags.sh exuberant() · line 234
Quoted 10 lines
scripts/tags.sh +7
-0+ --regex='/CLEARPAGEFLAG_NOOP(\([^,)]*\).*/ClearPage\1/' \ + --regex='/__CLEARPAGEFLAG_NOOP(\([^,)]*\).*/__ClearPage\1/' \ + --regex='/TESTCLEARFLAG_FALSE(\([^,)]*\).*/TestClearPage\1/' \ + --regex='/__TESTCLEARFLAG_FALSE(\([^,)]*\).*/__TestClearPage\1/' \ + --regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/' \ + --regex='/PCI_OP_READ(\([a-z]*[a-z]\).*[1-4])/pci_bus_read_config_\1/' \ + --regex='/PCI_OP_WRITE(\([a-z]*[a-z]\).*[1-4])/pci_bus_write_config_\1/' all_kconfigs | xargs $1 -a \ --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/'
This works for me. Thanks.
Signature · 3 lines
Jesper Juhl <[email protected]> http://www.chaosbits.net/ Don't top-post http://www.catb.org/jargon/html/T/top-post.html Plain text mails only, please.
Re: [PATCH] scripts/tags.sh: Fix regex syntax for etags
Quoted 6 lines · Jesper Juhl
Quoted 4 lines · Andreas Schwab
Signed-off-by Andreas Schwab <[email protected]>--- scripts/tags.sh | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-)
[...]
Quoted 3 lines
This works for me. Thanks.
Tested-by Jesper Juhl <[email protected]>
Applied to kbuild.git#misc, thanks.
Michal
Quoted 5 lines · Eric W. Biederman
But then I am probably peculiar keeping an index of the source code in my head. When I need to look for something and I don't know where to find it I do.
git-ls-files | xargs fgrep 'struct
f2fs_inode'
What's wrong with git grep?
Quoted 8 lines · Al Viro
Quoted 5 lines · Eric W. Biederman
But then I am probably peculiar keeping an index of the source code in my head. When I need to look for something and I don't know where to find it I do.
git-ls-files | xargs fgrep 'struct
f2fs_inode'What's wrong with git grep?
I haven't learned it yet. git-ls-files is a lot better than find
speed wise so is very much worth doing. I haven't a clue if
there is an advantage to git-grep, over just knowing find, xargs, and grep.
Eric
Quoted 7 lines · Eric W. Biederman
Quoted 5 lines · Al Viro
Quoted 4 lines · Eric W. Biederman
But then I am probably peculiar keeping an index of the source code in my head. When I need to look for something and I don't know where to find it I do.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
git-ls-files | xargs fgrep 'struct
f2fs_inode'What's wrong with git grep?
I haven't learned it yet. git-ls-files is a lot better than find
speed wise so is very much worth doing. I haven't a clue if
there is an advantage to git-grep, over just knowing find, xargs, and grep.
Brevity.
Jonathan
Quoted 8 lines · Al Viro
Quoted 5 lines · Eric W. Biederman
But then I am probably peculiar keeping an index of the source code in my head. When I need to look for something and I don't know where to find it I do.
git-ls-files | xargs fgrep 'struct
f2fs_inode'What's wrong with git grep?
Positive: it loads multiple cpus with very little file I/O
Negative: it doesn't use -P very well.
it won't spans lines like:
struct name
{
with git grep -P "\bstruct\s+\w+\s*{"
(the last grep that does I believe is 2.54)
Quoted 11 lines · anish singh
Quoted 9 lines · amit mehta
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines · kishore kumar
Quoted 2 lines
can anybody tell me how to look into source code, as most are hidden in kernel.
You can find the Linux source code at http://kernel.org/ .
for browsing the code unfortunately there is no good tool as in windows we have source insight.We can use wine in linux but that sucks.
Funny you say that!
Never heard of cscope, ctags ?It is not as convenient as source insight or is it?
I read somewhere that you can use Eclipse IDE with certain plugin to do convenient source code browsing....
Signature · 7 lines
regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
Quoted 11 lines · Mulyadi Santosa
Quoted 1 line · anish singh
On Fri, Dec 28, 2012 at 10:42 AM, amit mehta <[email protected]>
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines · kishore kumar
Quoted 1 line
can anybody tell me how to look into source code, as most are
hidden in
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
kernel.
You can find the Linux source code at http://kernel.org/ .
for browsing the code unfortunately there is no good tool as in
Quoted 9 lines
windows we
Quoted 4 lines
Quoted 3 lines
Quoted 1 line
have source insight.We can use wine in linux but that sucks.
Funny you say that!
Never heard of cscope, ctags ?It is not as convenient as source insight or is it?
I read somewhere that you can use Eclipse IDE with certain plugin to do convenient source code browsing....
Using vim and ctags will be little hard in the beginning. But IMHO the speed you attain once you are acquainted, will not match anything else.
I recommend to usage of linux as we all are Linux Guys :-)
Quoted 6 lines
--
regards,Mulyadi Santosa
Freelance Linux trainer and consultant
Quoted 8 lines
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20121228/914282d7/attachment.html
Quoted 8 lines · amit mehta
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines · kishore kumar
Quoted 2 lines
can anybody tell me how to look into source code, as most are hidden in kernel.
You can find the Linux source code at http://kernel.org/ .
for browsing the code unfortunately there is no good tool as in windows we have source insight.We can use wine in linux but that sucks.
Funny you say that!
Never heard of cscope, ctags ?
at least for me:
vi (or vim) with another command line tools (grep, wc...) are enough.
for reading or editing source code: grasp one editor is enough.
I originally work under Windows OS
using VC IDE and source insight for many years (at least 6 years).
but I never feel they are better than vi, and neither less than vi. each editor has its own efficiency using ways,
what we need do is to grasp it.
when you grasp the editor (no matter what it is), it will be enough for you.
Quoted 7 lines
-Amit
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 1 line
Flying Transformer
begin:vcard
fn:Chen Gang
n:;Chen Gang
version:2.1
end:vcard
Quoted 8 lines · amit mehta
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines · kishore kumar
Quoted 2 lines
can anybody tell me how to look into source code, as most are hidden in kernel.
You can find the Linux source code at http://kernel.org/ .
for browsing the code unfortunately there is no good tool as in windows we have source insight.We can use wine in linux but that sucks.
Funny you say that!
Never heard of cscope, ctags ?
at least for me:
vi (or vim) with another command line tools (grep, wc...) are enough.
for reading or editing source code: grasp one editor is enough.
I originally work under Windows OS,
using VC IDE and source insight for many years (at least 6 years).
but I never feel they are better than vi, and neither less than vi. each editor has its own efficiency using ways,
what we need do is to grasp it.
when you grasp the editor (no matter what it is), it will be enough for you.
Quoted 6 lines
-Amit
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 1 line
Flying Transformer
begin:vcard
fn:Chen Gang
n:;Chen Gang
version:2.1
end:vcard