mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Oeser <ioe-lkml@rameria.de>
To: karim@opersys.com
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Average instruction length in x86-built kernel?
Date: Sat, 30 Jul 2005 15:49:26 +0200	[thread overview]
Message-ID: <200507301549.32528.ioe-lkml@rameria.de> (raw)
In-Reply-To: <42EAA05F.4000704@opersys.com>

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

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 ":"

e.g.


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!


Regards

Ingo Oeser


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2005-07-30 13:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-29 21:32 Karim Yaghmour
2005-07-30 13:49 ` Ingo Oeser [this message]
2005-07-30 19:57   ` Karim Yaghmour
2005-08-01  7:35     ` David Weinehall
     [not found] <4vKU4-3sU-21@gated-at.bofh.it>
     [not found] ` <4w02Q-7e6-21@gated-at.bofh.it>
     [not found]   ` <4w5OQ-6Z9-25@gated-at.bofh.it>
2005-07-31  2:19     ` Bodo Eggert
2005-08-01  6:25       ` Jan Engelhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200507301549.32528.ioe-lkml@rameria.de \
    --to=ioe-lkml@rameria.de \
    --cc=karim@opersys.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®