X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=markers-test%2Fruntest.sh;h=ceb4afcf1e63a5d6cece296af2a4a46062b98345;hb=fade4071bfc7dcaebaad3e7f502c62a152f659a9;hp=be857b56d45ef59c226e56553bc79e2ea94af980;hpb=7c74e09fc877f259743a5446104ba19ee3a145d7;p=lttv.git diff --git a/markers-test/runtest.sh b/markers-test/runtest.sh index be857b56..ceb4afcf 100644 --- a/markers-test/runtest.sh +++ b/markers-test/runtest.sh @@ -7,16 +7,19 @@ ITER=10 LOOPS=20000 insmod test-mark-speed-empty.ko +cat /proc/testmark for a in `seq 1 $ITER`; do cat /proc/testmark;done rmmod test-mark-speed-empty RESEMP=`dmesg |grep "cycles : " |tail -n 10 |sed 's/^\[.*\] //'| sed 's/cycles : \(.*\)$/\1/'` insmod test-mark-speed.ko +cat /proc/testmark for a in `seq 1 $ITER`; do cat /proc/testmark;done rmmod test-mark-speed RESSTD=`dmesg |grep "cycles : " |tail -n 10 |sed 's/^\[.*\] //'| sed 's/cycles : \(.*\)$/\1/'` insmod test-mark-speed-opt.ko +cat /proc/testmark for a in `seq 1 $ITER`; do cat /proc/testmark;done rmmod test-mark-speed-opt RESOPT=`dmesg |grep "cycles : " |tail -n 10 |sed 's/^\[.*\] //'| sed 's/cycles : \(.*\)$/\1/'` @@ -41,17 +44,21 @@ RESNOPLOCAL=`dmesg |grep "cycles : " |tail -n 10 |sed 's/^\[.*\] //'| sed 's/cyc make clean make EXTRA_CFLAGS=-DCACHEFLUSH + insmod test-mark-speed-empty.ko +cat /proc/testmark for a in `seq 1 $ITER`; do cat /proc/testmark;done rmmod test-mark-speed-empty RESEMPFL=`dmesg |grep "cycles : " |tail -n 10 |sed 's/^\[.*\] //'| sed 's/cycles : \(.*\)$/\1/'` insmod test-mark-speed.ko +cat /proc/testmark for a in `seq 1 $ITER`; do cat /proc/testmark;done rmmod test-mark-speed RESSTDFL=`dmesg |grep "cycles : " |tail -n 10 |sed 's/^\[.*\] //'| sed 's/cycles : \(.*\)$/\1/'` insmod test-mark-speed-opt.ko +cat /proc/testmark for a in `seq 1 $ITER`; do cat /proc/testmark;done rmmod test-mark-speed-opt RESOPTFL=`dmesg |grep "cycles : " |tail -n 10 |sed 's/^\[.*\] //'| sed 's/cycles : \(.*\)$/\1/'` @@ -74,30 +81,29 @@ RESNOPLOCALFL=`dmesg |grep "cycles : " |tail -n 10 |sed 's/^\[.*\] //'| sed 's/c - echo "Results in cycles per loop" echo "Cycles for empty loop (will be substracted for cached runs)" SUM="0" -for a in $RESEMP; do SUM=$[$SUM + $a]; done +for a in $RESEMP; do SUM=`echo "$SUM + $a" | bc -l /dev/stdin`; done RESEMP=`echo $SUM/$ITER/$LOOPS | bc -l /dev/stdin` echo $RESEMP -echo "Cycles for wbinvd() loop (will be substracted non-cached runs)" +echo "Cycles for clflush() loop (will be substracted non-cached runs)" SUM="0" -for a in $RESEMPFL; do SUM=$[$SUM + $a]; done +for a in $RESEMPFL; do SUM=`echo "$SUM + $a" | bc -l /dev/stdin`; done RESEMPFL=`echo $SUM/$ITER/$LOOPS | bc -l /dev/stdin` echo $RESEMPFL echo -n "Added cycles for normal marker [cached, uncached] " SUM="0" -for a in $RESSTD; do SUM=$[$SUM + $a]; done +for a in $RESSTD; do SUM=`echo "$SUM + $a" | bc -l /dev/stdin`; done RESSTD=`echo $SUM/$ITER/$LOOPS - $RESEMP | bc -l /dev/stdin` echo -n "[$RESSTD, " SUM="0" -for a in $RESSTDFL; do SUM=$[$SUM + $a]; done +for a in $RESSTDFL; do SUM=`echo "$SUM + $a" | bc -l /dev/stdin`; done RESSTDFL=`echo $SUM/$ITER/$LOOPS - $RESEMPFL | bc -l /dev/stdin` echo "$RESSTDFL]" @@ -105,36 +111,36 @@ echo "$RESSTDFL]" echo -n "Added cycles for optimized marker [cached, uncached] " SUM="0" -for a in $RESOPT; do SUM=$[$SUM + $a]; done +for a in $RESOPT; do SUM=`echo "$SUM + $a" | bc -l /dev/stdin`; done RESOPT=`echo $SUM/$ITER/$LOOPS - $RESEMP | bc -l /dev/stdin` echo -n "[$RESOPT, " SUM="0" -for a in $RESOPTFL; do SUM=$[$SUM + $a]; done +for a in $RESOPTFL; do SUM=`echo "$SUM + $a" | bc -l /dev/stdin`; done RESOPTFL=`echo $SUM/$ITER/$LOOPS - $RESEMPFL | bc -l /dev/stdin` echo "$RESOPTFL]" echo -n "Added cycles for NOP replacement of function call (1 pointer read, 5 local vars) [cached, uncached] " SUM="0" -for a in $RESNOP; do SUM=$[$SUM + $a]; done +for a in $RESNOP; do SUM=`echo "$SUM + $a" | bc -l /dev/stdin`; done RESNOP=`echo $SUM/$ITER/$LOOPS - $RESEMP | bc -l /dev/stdin` echo -n "[$RESNOP, " SUM="0" -for a in $RESNOPFL; do SUM=$[$SUM + $a]; done +for a in $RESNOPFL; do SUM=`echo "$SUM + $a" | bc -l /dev/stdin`; done RESNOPFL=`echo $SUM/$ITER/$LOOPS - $RESEMPFL | bc -l /dev/stdin` echo "$RESNOPFL]" echo -n "Added cycles for NOP replacement of function call (6 local vars) [cached, uncached] " SUM="0" -for a in $RESNOPLOCAL; do SUM=$[$SUM + $a]; done +for a in $RESNOPLOCAL; do SUM=`echo "$SUM + $a" | bc -l /dev/stdin`; done RESNOPLOCAL=`echo $SUM/$ITER/$LOOPS - $RESEMP | bc -l /dev/stdin` echo -n "[$RESNOPLOCAL, " SUM="0" -for a in $RESNOPLOCALFL; do SUM=$[$SUM + $a]; done +for a in $RESNOPLOCALFL; do SUM=`echo "$SUM + $a" | bc -l /dev/stdin`; done RESNOPLOCALFL=`echo $SUM/$ITER/$LOOPS - $RESEMPFL | bc -l /dev/stdin` echo "$RESNOPLOCALFL]"