From: Alan Cox Date: Fri, 29 May 2015 14:47:58 +0000 (+0100) Subject: tools/mostcalled: find most called Z80 fns, so we can do RST hacks X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=8f7b4de761380b7f1c5e1e95b479bb5eaa8ed55c;p=FUZIX.git tools/mostcalled: find most called Z80 fns, so we can do RST hacks --- diff --git a/Kernel/tools/mostcalled b/Kernel/tools/mostcalled new file mode 100755 index 00000000..8ab4ad5d --- /dev/null +++ b/Kernel/tools/mostcalled @@ -0,0 +1,13 @@ +#!/bin/sh + +( +grep -h "call _" *.asm platform/*.asm > tmp_calls + +X=$(sed -e "s/^.*call.//" < tmp_calls| sort -n|uniq) + +for i in $X +do + n=$(grep $i tmp_calls | wc -l) + echo $n": "$i +done +) | sort -n