X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=testub10.git;a=blobdiff_plain;f=scripts%2Fbench.sh;h=d53bc9872a7d7050c417e0972717394e1825896a;hp=009a0f14669a70ae3951ece9e0ab4cba6c999bde;hb=b4ea4c5166e2de33580e8fd9b43a82cb9ee3cb33;hpb=86bedab26840dfae03775f5ef3db65b5122d7982 diff --git a/scripts/bench.sh b/scripts/bench.sh index 009a0f1..d53bc98 100755 --- a/scripts/bench.sh +++ b/scripts/bench.sh @@ -53,12 +53,18 @@ for i in $TEST/*.0; do #LABEL=`grep '.globl' $TMPNAME.s | sed 's/^.*\\.globl *\\([a-zA-Z0-9_]\\+\\).*$/\1/g'` # this won't work, we need all actual labels - LABEL=`grep '[a-zA-Z0-9_.$]\\+:' $TMPNAME.s | sed 's/^\\(.*[^a-zA-Z0-9_.$]\\)\\?\\([a-zA-Z0-9_.$]\\+\\):.*$/\2/g'` + grep '[a-zA-Z_][a-zA-Z0-9_]*:' $TMPNAME.s | sed 's/^\(.*[^a-zA-Z_.]\)\?\([a-zA-Z0-9_.$]\+\):.*$/\2/g' > $TMPNAME.uniq + + LABEL_ASM=`cat $TMPNAME.uniq` + + # functionidentifiers from CALL-file + grep '[a-zA-Z_][a-zA-Z0-9_]*(.*)' ${i%.0}.call | sed 's/.*[^a-zA-Z_]\([a-zA-Z_][a-zA-Z0-9_]*\)(.*)\;/\1/g' | sort | uniq >> $TMPNAME.uniq + + LABEL=`sort $TMPNAME.uniq | uniq -d` + rm $TMPNAME.uniq rm -f $TMPNAME.trace - MATCHES=0 for j in $LABEL; do - MATCHES="$MATCHES\\|$j" # count instructions $DUMPINSTR $TMPNAME $j > /dev/null if [ $? != 0 ]; then @@ -67,6 +73,11 @@ for i in $TEST/*.0; do fi done + MATCHES=0 + for j in $LABEL_ASM; do + MATCHES="$MATCHES\\|$j" + done + # filter trace grep "<\\($MATCHES\\)\\(+[0-9]*\\)\\?>:" $TMPNAME.trace > $TRACEDIR/$bi.trace