| From 05546bfc9968a58e9569f2a8a9764f6e53f20167 Mon Sep 17 00:00:00 2001 |
| From: Lucas Meneghel Rodrigues <lmr@redhat.com> |
| Date: Thu, 8 Apr 2010 10:38:13 -0300 |
| Subject: [PATCH 1/2] Fix build issues with lmbench |
| |
| * removes Makefile references to bitkeeper |
| * default mail to no, fix job placement defaults (masouds) |
| * adds "config" Makefile targets to perform configuration only |
| * changes scripts/getlist to consider result files that do |
| * not start with "[lmbench 3.x..." (still requires such a line somewhere |
| in the first 1000 bytes of the file) |
| --- |
| Makefile | 4 ++++ |
| scripts/config-run | 13 ++++++++----- |
| scripts/getlist | 4 ++-- |
| src/Makefile | 44 ++++++-------------------------------------- |
| 4 files changed, 20 insertions(+), 45 deletions(-) |
| |
| diff --git a/Makefile b/Makefile |
| index d3d00f4..9a568f3 100644 |
| --- a/Makefile |
| +++ b/Makefile |
| @@ -5,6 +5,7 @@ |
| # |
| # build (default) go to the source directory and build the benchmark |
| # results go to the source directory and build and run the benchmark |
| +# config configures run parameters |
| # rerun run the benchmark again |
| # see see the results that came with this release |
| # Go to the results directory and read the Makefile. |
| @@ -22,6 +23,9 @@ build: |
| results: FRC |
| cd src && $(MAKE) results |
| |
| +config: |
| + cd src && $(MAKE) config |
| + |
| rerun: |
| cd src && $(MAKE) rerun |
| |
| diff --git a/scripts/config-run b/scripts/config-run |
| index b8c17d5..9958a31 100755 |
| --- a/scripts/config-run |
| +++ b/scripts/config-run |
| @@ -115,9 +115,12 @@ three attendent child processes sending data down the pipes and |
| three benchmark processes reading data and doing the measurements. |
| |
| EOF |
| - echo $ECHON "Job placement selection: $ECHOC" |
| + echo $ECHON "Job placement selection [DEFAULT: 1]: $ECHOC" |
| read LMBENCH_SCHED |
| AGAIN=N |
| + if [ "$LMBENCH_SCHED" == "" ]; then |
| + LMBENCH_SCHED=1 |
| + fi |
| case "$LMBENCH_SCHED" in |
| 1) LMBENCH_SCHED=DEFAULT;; |
| 2) LMBENCH_SCHED=BALANCED;; |
| @@ -657,13 +660,13 @@ fast box, they may be made available on the lmbench web page, which is |
| |
| EOF |
| |
| -echo $ECHON "Mail results [default yes] $ECHOC" |
| +echo $ECHON "Mail results [default no] $ECHOC" |
| read MAIL |
| case $MAIL in |
| - [Nn]*) MAIL=no |
| - echo OK, no results mailed. |
| + [Yy]*) MAIL=yes |
| + echo OK, results will be mailed. |
| ;; |
| - *) MAIL=yes |
| + *) MAIL=no |
| ;; |
| esac |
| |
| diff --git a/scripts/getlist b/scripts/getlist |
| index 8c35970..f03b679 100755 |
| --- a/scripts/getlist |
| +++ b/scripts/getlist |
| @@ -22,9 +22,9 @@ if (-f $LIST) { |
| foreach $file (@files) { |
| next if $file =~ /\.INFO$/; |
| open(FD, $file) || next; |
| - next unless defined($_ = <FD>); |
| + next unless read(FD, $_, 1000); |
| close(FD); |
| - next unless /^\[lmbench3.[01]/; |
| + next unless /^\[lmbench3.[01]/m; |
| print "$file "; |
| } |
| print "\n"; |
| diff --git a/src/Makefile b/src/Makefile |
| index 2555014..cf0b779 100644 |
| --- a/src/Makefile |
| +++ b/src/Makefile |
| @@ -4,6 +4,7 @@ |
| # |
| # lmbench [default] builds the benchmark suite for the current os/arch |
| # results builds, configures run parameters, and runs the benchmark |
| +# config configures run parameters |
| # rerun reruns the benchmark using the same parameters as last time |
| # scaling reruns the benchmark using same parameters as last time, |
| # except it asks what scaling value to use |
| @@ -118,8 +119,10 @@ results: lmbench |
| @env OS="${OS}" ../scripts/config-run |
| @env OS="${OS}" ../scripts/results |
| |
| -rerun: lmbench |
| +config: lmbench |
| @if [ ! -f $(CONFIG) ]; then env OS="${OS}" ../scripts/config-run; fi |
| + |
| +rerun: lmbench config |
| @env OS="${OS}" ../scripts/results |
| |
| scaling: lmbench |
| @@ -165,41 +168,6 @@ debug: |
| assembler: |
| @env CFLAGS=-O MAKE="$(MAKE)" MAKEFLAGS="$(MAKEFLAGS)" CC="${CC}" OS="${OS}" ../scripts/build asm |
| |
| -bk.ver: ../SCCS/s.ChangeSet |
| - rm -f bk.ver |
| - -echo `bk prs -hr+ -d'$$if(:SYMBOL:){:SYMBOL: }:UTC:' ../ChangeSet;` > bk.ver |
| - touch bk.ver |
| - |
| -dist: bk.ver |
| - @if [ "X`cd ..; bk sfiles -c`" != "X" ]; then \ |
| - echo "modified files!"; \ |
| - false; \ |
| - fi |
| - @if [ "X`cd ..; bk pending`" != "X" ]; then \ |
| - echo "pending changes!"; \ |
| - false; \ |
| - fi |
| - cd ..; \ |
| - SRCDIR=`pwd`; \ |
| - DIR=`basename $${SRCDIR}`; \ |
| - VERSION=`cat src/bk.ver| awk '{print $$1;}' | sed -e 's/Version-//g'`; \ |
| - cd ..; \ |
| - bk clone $${DIR} /tmp/lmbench-$${VERSION}; \ |
| - cd /tmp/lmbench-$${VERSION}; \ |
| - bk sfiles | xargs touch; \ |
| - sleep 5; \ |
| - bk get -s; \ |
| - for d in doc results scripts src; do \ |
| - cd $$d; bk get -s; cd ..; \ |
| - done; \ |
| - bk sfiles -U -g | xargs touch; \ |
| - cd src; \ |
| - make bk.ver; \ |
| - cd /tmp; \ |
| - tar czf $${SRCDIR}/../lmbench-$${VERSION}.tgz \ |
| - lmbench-$${VERSION}; \ |
| - rm -rf /tmp/lmbench-$${VERSION}; |
| - |
| get $(SRCS): |
| -get -s $(SRCS) |
| |
| @@ -228,9 +196,9 @@ testmake: $(SRCS) $(UTILS) # used by scripts/make to test gmake |
| install install-target dist get edit get-e clean clobber \ |
| share depend testmake |
| |
| -$O/lmbench : ../scripts/lmbench bk.ver |
| +$O/lmbench : ../scripts/lmbench |
| rm -f $O/lmbench |
| - sed -e "s/<version>/`cat bk.ver`/g" < ../scripts/lmbench > $O/lmbench |
| + sed -e "s/<version>/666/g" < ../scripts/lmbench > $O/lmbench |
| chmod +x $O/lmbench |
| |
| $O/lmbench.a: $(LIBOBJS) |
| -- |
| 1.6.6.1 |
| |