On Sat, Jul 30, 2005 at 03:57:25PM -0400, Karim Yaghmour wrote:
[snip]
> # Remove non-instruction lines:
> sed /^[^c].*/d $2-dissassembled-kernel > $2-stage-1
>
> # Remove empty lines:
> sed /^'\t'*$/d $2-stage-1 > $2-stage-2
>
> # Remove function names:
> sed /^c[0-9,a-f]*' '\<.*\>:$/d
>> Here's a script that does what I was looking for:
>
Mmmmh, perlgolf?
>#!/bin/bash
>for a in "$@"
>do
>objdump -d "$a" -j .text
>done | perl -ne'
>BEGIN{%h=();$b=0};
>END{if($b){$h{$b}++};print map("$_: $h{$_}\n", sort(keys(%h)))};
>if(/\tnop$/){$h{nop}++}
Here's a script that does what I was looking for:
snip
Mmmmh, perlgolf?
#!/bin/bash
for a in $@
do
objdump -d $a -j .text
done | perl -ne'
BEGIN{%h=();$b=0};
END{if($b){$h{$b}++};print map($_: $h{$_}\n, sort(keys(%h)))};
if(/\tnop$/){$h{nop}++}
elsif(/^[\s0-9a-f]{8}:\t([^\t]+)
On Sat, Jul 30, 2005 at 03:57:25PM -0400, Karim Yaghmour wrote:
[snip]
# Remove non-instruction lines:
sed /^[^c].*/d $2-dissassembled-kernel $2-stage-1
# Remove empty lines:
sed /^'\t'*$/d $2-stage-1 $2-stage-2
# Remove function names:
sed /^c[0-9,a-f]*' '\.*\:$/d $2-stage-2
Hello Ingo,
Ingo Oeser wrote:
> 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 ":"
Here's a script that does what I was looking for:
#!/bin/bash
# Dissassemble
objdump -d $1 -j .text > $2-dissassembled-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:
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
Hello Ingo,
Ingo Oeser wrote:
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 :
Here's a script that does what I was looking for:
#!/bin/bash
# Dissassemble
objdump -d $1 -j .text $2-dissassembled-kernel
#
I'm wondering if anyone's ever done an analysis on the average length
of instructions in an x86-built kernel.
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.
Just
I'm wondering if anyone's ever done an analysis on the average length
of instructions in an x86-built kernel.
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.
Just
10 matches
Mail list logo