[Top] [All Lists]

Re: Average number of instructions per line of kernel code

Subject: Re: Average number of instructions per line of kernel code
From: "Jesper Juhl" <>
Date: Thu, 30 Aug 2007 15:31:12 +0200
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed;; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Colc8tCysxLzoeT3Qv7HbPTJX2PNM7vOrw+Dq7M75ZSq75FLT+V2W05q9sdvlpV3tz9sI9Vq+ErfwFOJ3RpZTnGQDKzVLqbo99OetNBLzY5DkSezpHqorfED2dxKQzB+wO+vGmJOVA3hZTCBvGh/bbv/DgHMymmYMw/7jWsv3So=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Tbf/1dqadHJfjHu2WgCOHDNLGiBeBUtJDhp2bNz7IV7H21AafjbaK8rSlgTLKFCbtGAnzwZxBGHQyNeGhLHIvWQt7d/rh3c9cexxbwa+c1RLyKeJf1SeDKUV7/+tvKOaFo7eh640/ZTZrOs5umhAhDK39wTGWYNEfW+DgmW1ZU0=
In-reply-to: <>
Original-recipient: rfc822;
References: <>
On 30/08/2007, Mohamed Bamakhrama <> wrote:
> Hi all,
> 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.
> My estimate is between 5-10 instructions. I googled for such a thing
> but couldn't find any useful papers/resources.

Why don't you simply count the number of non-blank non-comment lines
in the source files that you are building, build the kernel and then
count the number of instructions in the resulting binary ?

Jesper Juhl <>
Don't top-post
Plain text mails only, please

<Prev in Thread] Current Thread [Next in Thread>