-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy path0001-Fix-build-issues-with-lmbench.patch
173 lines (158 loc) · 4.98 KB
/
0001-Fix-build-issues-with-lmbench.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
From 05546bfc9968a58e9569f2a8a9764f6e53f20167 Mon Sep 17 00:00:00 2001
From: Lucas Meneghel Rodrigues <[email protected]>
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