Here you can see where sk_buff structure is delared. http://androidxref.com/kernel_3.18/xref/include/linux/skbuff.h#506 May be you want to get familiar on how to use opengroks interface by seeing some youtube video or some online documents... Whatever you want to do wrt to source code browsing, this can do it for you very quickly. On Thu, Apr 13, 2017 at 6:24 AM, Code Soldier1 <codesoldier1@gmail.com> wrote:
Thanks a lot. I am still not able to lookup structures, such as sk_buff and where does it's fields get set/used.
On Tue, Apr 11, 2017 at 4:56 PM, manty kuma <mantykuma@gmail.com> wrote:
I like Opengrok. It is insanely fast in giving search results. However it takes sometime to setup and you need to index it before the first use.
If you are ok with browsing someold kernels, then you can use this link http://androidxref.com/kernel_3.18/ which is maintained privately.
If you want to use opengrok on more recent linux releases, you may have to set it up yourself.
On Wed, Apr 12, 2017 at 5:13 AM, Mandeep Sandhu <mandeepsandhu.chd@gmail.com> wrote:
I am looking for something that can list all the places that a certain field of a certain structure is used. For example, sk_buff has a field called destructor, but so do many other data structures. How do I search for places where just the destructor field of sk_buff.
I think lxr has an identifier & free-text search (powered by google). If that doesn't do it for you, you can go "old school" and try cscope maybe?
HTH, -mandeep
Thanks a lot.
-- CS1
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- CS1
ctags + cscope + vim The Makefile has targets for indexing the kernel.. Sometimes "find -exec grep" helps... I will take a look in opengrok Em 13/04/2017 7:40 AM, "manty kuma" <mantykuma@gmail.com> escreveu:
Here you can see where sk_buff structure is delared. http://androidxref.com/kernel_3.18/xref/include/linux/skbuff.h#506
May be you want to get familiar on how to use opengroks interface by seeing some youtube video or some online documents...
Whatever you want to do wrt to source code browsing, this can do it for you very quickly.
On Thu, Apr 13, 2017 at 6:24 AM, Code Soldier1 <codesoldier1@gmail.com> wrote:
Thanks a lot. I am still not able to lookup structures, such as sk_buff and where does it's fields get set/used.
On Tue, Apr 11, 2017 at 4:56 PM, manty kuma <mantykuma@gmail.com> wrote:
I like Opengrok. It is insanely fast in giving search results. However it takes sometime to setup and you need to index it before the first use.
If you are ok with browsing someold kernels, then you can use this link http://androidxref.com/kernel_3.18/ which is maintained privately.
If you want to use opengrok on more recent linux releases, you may have to set it up yourself.
On Wed, Apr 12, 2017 at 5:13 AM, Mandeep Sandhu <mandeepsandhu.chd@gmail.com> wrote:
I am looking for something that can list all the places that a certain field of a certain structure is used. For example, sk_buff has a field called destructor, but so do many other data structures. How do I search for places where just the destructor field of sk_buff.
I think lxr has an identifier & free-text search (powered by google). If that doesn't do it for you, you can go "old school" and try cscope maybe?
HTH, -mandeep
Thanks a lot.
-- CS1
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- CS1
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Something else you could look at is Coccinelle. http://coccinelle.lip6.fr/ The tool can be used to find very specific pattern in the code. For instance specific structure field that are used without initialization. It takes some learning but the tool is very powerful. You can also check here for the basics: https://kernelnewbies.org/JuliaLawall http://btrlinux.inria.fr/coccinelle/ If you have any questions Julia(the main developer) is very active on the mailling list: cocci@systeme.lip6.fr Quentin
On Thu, 13 Apr 2017 08:41:18 -0300, "Daniel." said:
The Makefile has targets for indexing the kernel.. Sometimes "find -exec grep" helps... I will take a look in opengrok
find |xargs grep. Will run a lot faster because it runs one grep for several hundred files, rather than one per file. For bonus points, if you have a git tree, 'find *' at the top level will run faster than 'find .', because * will glob into something that doesn't incude .git so no traversal into that section of the source tree. git grep works too, if you have a git tree like any serious kernel hacker.
participants (4)
-
Daniel. -
manty kuma -
Quentin Lambert -
valdis.kletnieks@vt.edu