Folks, Can you tell me how to effectively browse linux kernel code. I am familiar with lxr etc but they do not do what I want or atleast I do not know how to. 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. Thanks a lot. -- CS1
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
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
On Tue, Apr 11, 2017 at 3:17 PM, Code Soldier1 <codesoldier1@gmail.com> wrote: Folks,
Can you tell me how to effectively browse linux kernel code. I am familiar with lxr etc but they do not do what I want or atleast I do not know how to.
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.
Thanks a lot.
Ask yourself *how* is the destructor invoked ? You can find *how* here: SKB socket accounting <http://vger.kernel.org/%7Edavem/skb_sk.html> So now if you run: find . -name '*.c' | xargs grep -r -F "skb->destructor" you will have what you are looking for :) Hope this helps and this will help: http://vger.kernel.org/~davem/skb.html <http://vger.kernel.org/%7Edavem/skb_sk.html> Aruna
participants (4)
-
Aruna Hewapathirane -
Code Soldier1 -
Mandeep Sandhu -
manty kuma