[lkml]   [2005]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Average instruction length in x86-built kernel?
Hi Karim,

On Friday 29 July 2005 23:32, Karim Yaghmour wrote:
> Googling around, I can find references claiming that the average
> instruction length on x86 is anywhere from 2.7 to 3.5 bytes, but I
> can't find anything studying Linux specifically.

This is not that hard to find out yourself:

Just study the output od objdump -d and average the differences
of the first hex number in a line printed, which are followed by a ":"


scripts/kconfig/mconf.o: file format elf32-i386

Disassembly of section .text:

00000000 <init_wsize>:
0: 83 ec 1c sub $0x1c,%esp
3: 8d 44 24 10 lea 0x10(%esp),%eax
7: 89 44 24 08 mov %eax,0x8(%esp)

so avg(3-7, 3-0) = 2.5

and so on...

Happy analyzing!


Ingo Oeser

[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2005-07-30 15:53    [W:0.065 / U:2.352 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site