Re: best way to read kernel code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 26 April 2010 09:05, SandeepKsinha <sandeepksinha@xxxxxxxxx> wrote:
> On Mon, Apr 26, 2010 at 12:58 PM, Onkar Mahajan <kern.devel@xxxxxxxxx> wrote:
>> Hi All ,
>>
>> What is the fastest and the best way /method to read
>> lots of kernel code ?
>>
> Book: Understanding the Linux Kernel, O'reily publication

Sadly, that book is too old.

Was the OP asking about methodology to understand the kernel code?
In that case, I can see at least 2 options: top-down and bottom-up
reading/studying.
Top-down could mean you start with main() and work your way down to a
specific sub-system or driver or function. Bottom-up could be that you
start with a driver's function and work your way up to some
main/central point.

There are probably other ways to do it.

Things you might want to find out:
  1) Where are function / macro is defined.
  2) Does it call functions outside its file
  3) What the callers are (which functions call the function you are looking at)
  4) Which functions does this function call?

Either way, it will require a lot of time and patience, and reading of
the source code and other books.

The cscope / ctags programs could also help.

Regards,
Srdjan

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux