Skip to contentSkip to conversation

Average instruction length in x86-built kernel?

DISCUSSION Bodo Eggert 2 participants 2 messages Jul 31, 2005 – Aug 1, 2005 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 1 line · Karim Yaghmour

Here's a script that does what I was looking for:

<snip>

#!/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]+) (\t?)/){
$b+=split(" ",$1);if($2){$h{$b}++;$b=0}}'

Signature · 2 lines
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF
verbreiteten Lügen zu sabotieren.
#4 lore raw
Quoted 3 lines
Quoted 2 lines

Here's a script that does what I was looking for:

<snip>

Mmmmh, perlgolf?

Quoted 10 lines

#!/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]+) (\t?)/){
$b+=split(" ",$1);if($2){$h{$b}++;$b=0}}'

objdump -j .text -d "$@" | perl -ne ' END{$h{$b}++if$b;print map"$_: $h{$_}\n",sort keys%h}; if(/\tnop\s*$/){$h{nop}++} elsif(/^.*?:\t([^\t]+) (\t?)/){
$b+=split/ /,$1;if($2){$h{$b}++;$b=0}}'

Jan Engelhardt

Signature · 1 line
| Alphagate Systems, http://alphagate.hopto.org/