1From 4955021bc283be404df62b97b86af3943efd29de Mon Sep 17 00:00:00 2001 2From: Noor Ahsan <noor_ahsan@mentor.com> 3Date: Mon, 29 Aug 2011 16:17:51 +0000 4Subject: [PATCH] lmbench: Add version 3.0-a9 (initial recipe) 5 6Now that we have our binaries in /usr/bin rather than the normal 7lmbench hierarchy we need to update the scripts as well to behave well here. 8 9Upstream-Status: Inappropriate [This is related to the OE-specific behavior 10of installing into /usr/bin, etc, rather than dumping everything into 11/usr/share/lmbench or similar] 12 13--- 14 scripts/config-run | 40 ++++++++++++++++++++-------------------- 15 scripts/results | 8 +++----- 16 2 files changed, 23 insertions(+), 25 deletions(-) 17 18diff --git a/scripts/config-run b/scripts/config-run 19index a2d5ba4..918cbdf 100755 20--- a/scripts/config-run 21+++ b/scripts/config-run 22@@ -132,20 +132,20 @@ export LMBENCH_SCHED 23 ############################################################################ 24 echo $L; echo ""; 25 echo "Hang on, we are calculating your timing granularity." 26-../bin/$OS/msleep 250 27-ENOUGH=`../bin/$OS/enough` 28+msleep 250 29+ENOUGH=`enough` 30 export ENOUGH 31 echo "OK, it looks like you can time stuff down to $ENOUGH usec resolution." 32 echo "" 33 echo "Hang on, we are calculating your timing overhead." 34-../bin/$OS/msleep 250 35-TIMING_O=`../bin/$OS/timing_o` 36+msleep 250 37+TIMING_O=`timing_o` 38 export TIMING_O 39 echo "OK, it looks like your gettimeofday() costs $TIMING_O usecs." 40 echo "" 41 echo "Hang on, we are calculating your loop overhead." 42-../bin/$OS/msleep 250 43-LOOP_O=`../bin/$OS/loop_o` 44+msleep 250 45+LOOP_O=`loop_o` 46 export LOOP_O 47 echo "OK, it looks like your benchmark loop costs $LOOP_O usecs." 48 echo "" 49@@ -177,7 +177,7 @@ then 50 fi 51 if [ X$MB = X ] 52 then $ECHON "Probing system for available memory: $ECHOC" 53- MB=`../bin/$OS/memsize 4096` 54+ MB=`memsize 4096` 55 fi 56 TOTAL_MEM=$MB 57 MB=`echo \( $MB \* 7 \) / 10 | bc 2>/dev/null` 58@@ -205,9 +205,9 @@ fi 59 # Certain machines tend to barf when you try and bcopy 8MB. 60 # Figure out how much we can use. 61 echo "Checking to see if you have $MB MB; please wait for a moment..." 62-MB=`../bin/$OS/memsize $MB` 63-MB=`../bin/$OS/memsize $MB` 64-MB=`../bin/$OS/memsize $MB` 65+MB=`memsize $MB` 66+MB=`memsize $MB` 67+MB=`memsize $MB` 68 if [ `expr $SYNC_MAX \* $MB` -gt `expr $TOTAL_MEM` ] 69 then 70 MB=`expr $TOTAL_MEM / $SYNC_MAX` 71@@ -223,8 +223,8 @@ then echo Warning: you have only ${MB}MB available memory. 72 fi 73 74 echo "Hang on, we are calculating your cache line size." 75-../bin/$OS/msleep 250 76-LINE_SIZE=`../bin/$OS/lm_line -M ${MB}M` 77+msleep 250 78+LINE_SIZE=`lm_line -M ${MB}M` 79 export LINE_SIZE 80 echo "OK, it looks like your cache line is $LINE_SIZE bytes." 81 echo "" 82@@ -479,7 +479,7 @@ EOF 83 then 84 for i in $disks 85 do if [ -r $i ] 86- then ../bin/$OS/flushdisk $i 87+ then flushdisk $i 88 if [ $? -eq 1 ] 89 then echo "Must be root to run disk benchmarks." 90 echo "Root is needed to flush the buffer cache" 91@@ -584,7 +584,7 @@ fi 92 echo $L 93 echo "" 94 echo "Calculating mhz, please wait for a moment..." 95-MHZ=`../bin/$OS/mhz` 96+MHZ=`mhz` 97 cat<<EOF 98 I think your CPU mhz is 99 100@@ -689,9 +689,9 @@ esac 101 102 INFO=`../scripts/info` 103 if [ $MAIL = yes ] 104-then if [ ! -f ../bin/$OS/$INFO ] 105- then cp ../scripts/info-template ../bin/$OS/$INFO 106- chmod +w ../bin/$OS/$INFO 107+then if [ ! -f $INFO ] 108+ then cp ../scripts/info-template $INFO 109+ chmod +w $INFO 110 REUSE=no 111 else 112 REUSE=view 113@@ -705,7 +705,7 @@ then if [ ! -f ../bin/$OS/$INFO ] 114 ;; 115 [Vv]*) REUSE=view 116 echo $L 117- more ../bin/$OS/$INFO 118+ more $INFO 119 echo $L 120 ;; 121 *) REUSE=yes 122@@ -733,7 +733,7 @@ EOF 123 then EDITOR=$TMP 124 fi 125 if [ X$EDITOR != "none" ] 126- then $EDITOR ../bin/$OS/`../scripts/info` 127+ then $EDITOR `../scripts/info` 128 fi 129 fi 130 fi 131@@ -750,7 +750,7 @@ EOF 132 133 VERSION=`../scripts/version` 134 135-C=../bin/$OS/`../scripts/config` 136+C=`../scripts/config` 137 echo DISKS=\"$DISKS\" > $C 138 echo DISK_DESC=\"$DISK_DESC\" >> $C 139 echo OUTPUT=$OUTPUT >> $C 140diff --git a/scripts/results b/scripts/results 141index cd07c15..d5aa558 100755 142--- a/scripts/results 143+++ b/scripts/results 144@@ -8,11 +8,11 @@ RESULTS=results/$OS 145 BASE=../$RESULTS/`uname -n` 146 EXT=0 147 148-if [ ! -f "../bin/$OS/$CONFIG" ] 149+if [ ! -f "$CONFIG" ] 150 then echo "No config file?" 151 exit 1 152 fi 153-. ../bin/$OS/$CONFIG 154+. $CONFIG 155 156 if [ ! -d ../$RESULTS ] 157 then mkdir -p ../$RESULTS 158@@ -23,11 +23,9 @@ do EXT=`expr $EXT + 1` 159 RESULTS=$BASE.$EXT 160 done 161 162-cd ../bin/$OS 163-PATH=.:${PATH}; export PATH 164 export SYNC_MAX 165 export OUTPUT 166-lmbench $CONFIG 2>../${RESULTS} 167+lmbench $CONFIG 2>${RESULTS} 168 169 if [ X$MAIL = Xyes ] 170 then echo Mailing results 171