update
[lttv.git] / markers-test / runtest.sh
... / ...
CommitLineData
1#!/bin/sh
2
3ITER=10
4LOOPS=2000
5
6insmod test-mark-speed-empty.ko
7for a in `seq 1 $ITER`; do cat /proc/testmark;done
8rmmod test-mark-speed-empty
9RESEMP=`dmesg |tail -n 10 |sed 's/^\[.*\] //'| sed 's/cycles : \(.*\)$/\1/'`
10
11insmod test-mark-speed.ko
12for a in `seq 1 $ITER`; do cat /proc/testmark;done
13rmmod test-mark-speed
14RESSTD=`dmesg |tail -n 10 |sed 's/^\[.*\] //'| sed 's/cycles : \(.*\)$/\1/'`
15
16insmod test-mark-speed-opt.ko
17for a in `seq 1 $ITER`; do cat /proc/testmark;done
18rmmod test-mark-speed-opt
19RESOPT=`dmesg |tail -n 10 |sed 's/^\[.*\] //'| sed 's/cycles : \(.*\)$/\1/'`
20
21insmod test-mark-speed-edit.ko
22#Patch with nops
23cat /proc/testmark
24
25for a in `seq 1 $ITER`; do cat /proc/testmark;done
26rmmod test-mark-speed-edit
27RESNOP=`dmesg |tail -n 10 |sed 's/^\[.*\] //'| sed 's/cycles : \(.*\)$/\1/'`
28
29echo "Results in cycles per loop"
30
31echo "Cycles for wbinvd() loop (will be substracted from following results)"
32
33SUM="0"
34for a in $RESEMP; do SUM=$[$SUM + $a]; done
35RESEMP=`echo $SUM/$ITER/$LOOPS | bc -l /dev/stdin`
36
37echo $RESEMP
38
39echo "Added cycles for normal marker"
40
41SUM="0"
42for a in $RESSTD; do SUM=$[$SUM + $a]; done
43RESSTD=`echo $SUM/$ITER/$LOOPS - $RESEMP | bc -l /dev/stdin`
44
45echo $RESSTD
46
47echo "Added cycles for optimized marker"
48SUM="0"
49for a in $RESOPT; do SUM=$[$SUM + $a]; done
50RESOPT=`echo $SUM/$ITER/$LOOPS - $RESEMP | bc -l /dev/stdin`
51echo $RESOPT
52
53echo "Added cycles for NOP replacement of function call"
54SUM="0"
55for a in $RESNOP; do SUM=$[$SUM + $a]; done
56RESNOP=`echo $SUM/$ITER/$LOOPS - $RESEMP | bc -l /dev/stdin`
57echo $RESNOP
58
This page took 0.035862 seconds and 4 git commands to generate.