Re: Average number of instructions per line of kernel code

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

 



On Thu, 30 Aug 2007, Mohamed Bamakhrama wrote:

I have a question regarding the average number of assembly
instructions per line of kernel code. I know that this is a difficult
question since it depends on many factors such as the instruction set
architecture, compiler used, optimizations used, type of code, coding
style, etc...
I would like to know a rough estimate for such a quantity for the
kernel 2.4/2.6 code running on MIPS32 architecture compiled using GCC.
My estimate is between 5-10 instructions. I googled for such a thing
but couldn't find any useful papers/resources.

Compile a full kernel with everything statically linked, then do objdump -D on it. wc it. Then wc the whole kernel tree.

That'll give you a pretty good ball park figure for what you're looking for.

Gordan

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux