1 | ######################## -*- Mode: Makefile-Automake -*- ######################
|
---|
2 | ##
|
---|
3 | ## Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
|
---|
4 | ##
|
---|
5 | ## The contents of this file are covered under the licence agreement in the
|
---|
6 | ## file "LICENCE" distributed with Cforall.
|
---|
7 | ##
|
---|
8 | ## Makefile.am --
|
---|
9 | ##
|
---|
10 | ## Author : Peter A. Buhr
|
---|
11 | ## Created On : Sun May 31 09:08:15 2015
|
---|
12 | ## Last Modified By : Peter A. Buhr
|
---|
13 | ## Last Modified On : Tue Mar 10 11:41:18 2020
|
---|
14 | ## Update Count : 258
|
---|
15 | ###############################################################################
|
---|
16 |
|
---|
17 | AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names
|
---|
18 | ACLOCAL_AMFLAGS = -I automake
|
---|
19 |
|
---|
20 | # applies to both programs
|
---|
21 | include $(top_srcdir)/tools/build/cfa.make
|
---|
22 |
|
---|
23 | AM_CFLAGS = -O3 -Wall -Wextra -I$(srcdir) -lrt -pthread # -Werror
|
---|
24 | AM_CFAFLAGS = -quiet -nodebug
|
---|
25 | AM_UPPFLAGS = -quiet -nodebug -multi -std=c++14
|
---|
26 |
|
---|
27 | BENCH_V_CC = $(__bench_v_CC_$(__quiet))
|
---|
28 | BENCH_V_CFA = $(__bench_v_CFA_$(__quiet))
|
---|
29 | BENCH_V_CXX = $(__bench_v_CXX_$(__quiet))
|
---|
30 | BENCH_V_UPP = $(__bench_v_UPP_$(__quiet))
|
---|
31 | BENCH_V_GOC = $(__bench_v_GOC_$(__quiet))
|
---|
32 | BENCH_V_PY = $(__bench_v_PY_$(__quiet))
|
---|
33 | BENCH_V_RUSTC = $(__bench_v_RUSTC_$(__quiet))
|
---|
34 | BENCH_V_NODEJS = $(__bench_v_NODEJS_$(__quiet))
|
---|
35 | BENCH_V_JAVAC = $(__bench_v_JAVAC_$(__quiet))
|
---|
36 |
|
---|
37 | __quiet = verbose
|
---|
38 | __bench_v_CC_quiet = @
|
---|
39 | __bench_v_CFA_quiet = @
|
---|
40 | __bench_v_CXX_quiet = @
|
---|
41 | __bench_v_UPP_quiet = @
|
---|
42 | __bench_v_GOC_quiet = @
|
---|
43 | __bench_v_RUSTC_quiet = @
|
---|
44 | __bench_v_JAVAC_quiet = @
|
---|
45 | __bench_v_CC_verbose = $(AM_V_CC)
|
---|
46 | __bench_v_CFA_verbose = $(AM_V_CFA)
|
---|
47 | __bench_v_CXX_verbose = $(AM_V_CXX)
|
---|
48 | __bench_v_UPP_verbose = $(AM_V_UPP)
|
---|
49 | __bench_v_GOC_verbose = $(AM_V_GOC)
|
---|
50 | __bench_v_PY_verbose = $(AM_V_PY)
|
---|
51 | __bench_v_RUSTC_verbose = $(AM_V_RUST)
|
---|
52 | __bench_v_NODEJS_verbose = $(AM_V_NODEJS)
|
---|
53 | __bench_v_JAVAC_verbose = $(AM_V_JAVAC)
|
---|
54 |
|
---|
55 |
|
---|
56 | TOOLSDIR = ${abs_top_builddir}/tools/
|
---|
57 | REPEAT = ${abs_top_builddir}/tools/repeat
|
---|
58 | STATS = ${abs_top_srcdir}/tools/stat.py
|
---|
59 | # NEED AT LEAST 4 DATA VALUES FOR BENCHMARKS BECAUSE THE MAX AND MIN VALUES ARE REMOVED
|
---|
60 | repeats = 13 # 31 for benchmarks
|
---|
61 | arch = x64
|
---|
62 | skipcompile = no
|
---|
63 | TIME_FORMAT = "%E"
|
---|
64 | PRINT_FORMAT = %20s: #Comments needed for spacing
|
---|
65 |
|
---|
66 | # Dummy hack tricks
|
---|
67 | EXTRA_PROGRAMS = dummy # build but do not install
|
---|
68 | nodist_dummy_SOURCES = dummyC.c dummyCXX.cpp
|
---|
69 |
|
---|
70 | dummyC.c:
|
---|
71 | echo "int main() { return 0; }" > ${@}
|
---|
72 |
|
---|
73 | dummyCXX.cpp:
|
---|
74 | echo "int main() { return 0; }" > ${@}
|
---|
75 |
|
---|
76 | .NOTPARALLEL:
|
---|
77 | .PHONY: jenkins cleancsv
|
---|
78 |
|
---|
79 | ## =========================================================================================================
|
---|
80 |
|
---|
81 | # all is used by make dist so ignore it
|
---|
82 | all:
|
---|
83 |
|
---|
84 | all-bench : basic$(EXEEXT) ctxswitch$(EXEEXT) mutex$(EXEEXT) schedint$(EXEEXT) schedext$(EXEEXT) creation$(EXEEXT)
|
---|
85 |
|
---|
86 | basic_loop_DURATION = 15000000000
|
---|
87 | basic_function_DURATION = 10000000000
|
---|
88 | basic_tls_fetch_add_DURATION = 10000000000
|
---|
89 | basic_DURATION = 250000000
|
---|
90 |
|
---|
91 | ctxswitch_pthread_DURATION = 25000000
|
---|
92 | ctxswitch_rust_thread_DURATION = $(ctxswitch_pthread_DURATION)
|
---|
93 | ctxswitch_cfa_generator_DURATION = 5000000000
|
---|
94 | ctxswitch_nodejs_await_DURATION = 5000000
|
---|
95 | ctxswitch_DURATION = 100000000
|
---|
96 |
|
---|
97 | #mutex_java_DURATION = 10000000
|
---|
98 | mutex_DURATION = 50000000
|
---|
99 |
|
---|
100 | schedint_pthread_DURATION = 1000000
|
---|
101 | schedint_java_DURATION = $(schedint_pthread_DURATION)
|
---|
102 | schedint_rust_DURATION = $(schedint_pthread_DURATION)
|
---|
103 | schedint_DURATION = 10000000
|
---|
104 |
|
---|
105 | schedext_DURATION = 10000000
|
---|
106 |
|
---|
107 | creation_pthread_DURATION = 250000
|
---|
108 | creation_rust_thread_DURATION = ${creation_pthread_DURATION}
|
---|
109 | creation_java_thread_DURATION = ${creation_pthread_DURATION}
|
---|
110 | creation_cfa_coroutine_DURATION = 100000000
|
---|
111 | creation_cfa_coroutine_eager_DURATION = 10000000
|
---|
112 | creation_cfa_generator_DURATION = 1000000000
|
---|
113 | creation_upp_coroutine_DURATION = ${creation_cfa_coroutine_eager_DURATION}
|
---|
114 | creation_DURATION = 10000000
|
---|
115 |
|
---|
116 | %.run : %$(EXEEXT) ${REPEAT}
|
---|
117 | @rm -f .result.log
|
---|
118 | @echo "------------------------------------------------------"
|
---|
119 | @echo $<
|
---|
120 | @${REPEAT} ${repeats} -- ./a.out\
|
---|
121 | $(if ${$(subst -,_,$(basename $@))_DURATION},\
|
---|
122 | ${$(subst -,_,$(basename $@))_DURATION},\
|
---|
123 | ${$(firstword $(subst -, ,$(basename $@)))_DURATION}) | tee -a .result.log
|
---|
124 | @${STATS} .result.log
|
---|
125 | @echo "------------------------------------------------------"
|
---|
126 | @rm -f a.out .result.log *.class
|
---|
127 |
|
---|
128 | # ${REPEAT} ${repeats} -- /usr/bin/time -f "%Uu %Ss %Er %Mkb" ./a.out
|
---|
129 |
|
---|
130 | %.runquiet :
|
---|
131 | +make $(basename $@) CFLAGS="-w" __quiet=quiet
|
---|
132 | taskset -c 1 ./a.out
|
---|
133 | rm -f a.out
|
---|
134 |
|
---|
135 | %.make :
|
---|
136 | printf "${PRINT_FORMAT}" $(basename $(subst compile-,,$@))
|
---|
137 | +/usr/bin/time -f ${TIME_FORMAT} make $(basename $@) 2>&1
|
---|
138 |
|
---|
139 | ${REPEAT} :
|
---|
140 | +make -C ${abs_top_builddir}/tools repeat
|
---|
141 |
|
---|
142 | ## =========================================================================================================
|
---|
143 |
|
---|
144 | FIX_NEW_LINES = cat $@ | tr "\n" "\t" | sed -r 's/\t,/,/' | tr "\t" "\n" > $@
|
---|
145 |
|
---|
146 | cleancsv:
|
---|
147 | rm -f compile.csv basic.csv ctxswitch.csv mutex.csv schedint.csv
|
---|
148 |
|
---|
149 | jenkins$(EXEEXT): cleancsv
|
---|
150 | @DOifskipcompile@
|
---|
151 | @+make --silent compile.csv
|
---|
152 | @-+make --silent compile.diff.csv
|
---|
153 | @DOendif@
|
---|
154 | @+make --silent ctxswitch.csv
|
---|
155 | @-+make --silent ctxswitch.diff.csv
|
---|
156 | @+make --silent mutex.csv
|
---|
157 | @-+make --silent mutex.diff.csv
|
---|
158 | @+make --silent schedint.csv
|
---|
159 | @-+make --silent schedint.diff.csv
|
---|
160 | @DOifskipcompile@
|
---|
161 | cat compile.csv
|
---|
162 | -cat compile.diff.csv
|
---|
163 | @DOendif@
|
---|
164 | cat ctxswitch.csv
|
---|
165 | -cat ctxswitch.diff.csv
|
---|
166 | cat mutex.csv
|
---|
167 | -cat mutex.diff.csv
|
---|
168 | cat schedint.csv
|
---|
169 | -cat schedint.diff.csv
|
---|
170 |
|
---|
171 | compile.csv:
|
---|
172 | echo "building $@"
|
---|
173 | echo "array,attributes,empty,expression,io,monitor,operators,typeof" > $@
|
---|
174 | +make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-array.make >> $@
|
---|
175 | +make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-attributes.make >> $@
|
---|
176 | +make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-empty.make >> $@
|
---|
177 | +make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-expression.make >> $@
|
---|
178 | +make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-io.make >> $@
|
---|
179 | +make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-monitor.make >> $@
|
---|
180 | +make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-operators.make >> $@
|
---|
181 | +make TIME_FORMAT='%e' PRINT_FORMAT='' compile-typeof.make >> $@
|
---|
182 | $(srcdir)/fixcsv.sh $@
|
---|
183 |
|
---|
184 | ctxswitch.csv:
|
---|
185 | echo "building $@"
|
---|
186 | echo "generator,coroutine,thread" > $@
|
---|
187 | +make ctxswitch-cfa_generator.runquiet >> $@ && echo -n ',' >> $@
|
---|
188 | +make ctxswitch-cfa_coroutine.runquiet >> $@ && echo -n ',' >> $@
|
---|
189 | +make ctxswitch-cfa_thread.runquiet >> $@
|
---|
190 | $(srcdir)/fixcsv.sh $@
|
---|
191 |
|
---|
192 | mutex.csv:
|
---|
193 | echo "building $@"
|
---|
194 | echo "1-monitor,2-monitor" > $@
|
---|
195 | +make mutex-cfa1.runquiet >> $@ && echo -n ',' >> $@
|
---|
196 | +make mutex-cfa2.runquiet >> $@
|
---|
197 | $(srcdir)/fixcsv.sh $@
|
---|
198 |
|
---|
199 | # use --no-print-directory to generate csv appropriately
|
---|
200 | mutexStmt.csv:
|
---|
201 | echo "building $@"
|
---|
202 | echo "1-lock,2-lock,4-lock,8-lock,1-no-stmt-lock,2-no-stmt-lock,4-no-stmt-lock,8-no-stmt-lock,1-monitor,2-monitor,4-monitor" > $@
|
---|
203 | +make mutexStmt-lock1.runquiet >> $@ && echo -n ',' >> $@
|
---|
204 | +make mutexStmt-lock2.runquiet >> $@ && echo -n ',' >> $@
|
---|
205 | +make mutexStmt-lock4.runquiet >> $@ && echo -n ',' >> $@
|
---|
206 | +make mutexStmt-lock8.runquiet >> $@ && echo -n ',' >> $@
|
---|
207 | +make mutexStmt-no-stmt-lock1.runquiet >> $@ && echo -n ',' >> $@
|
---|
208 | +make mutexStmt-no-stmt-lock2.runquiet >> $@ && echo -n ',' >> $@
|
---|
209 | +make mutexStmt-no-stmt-lock4.runquiet >> $@ && echo -n ',' >> $@
|
---|
210 | +make mutexStmt-no-stmt-lock8.runquiet >> $@ && echo -n ',' >> $@
|
---|
211 | +make mutexStmt-monitor1.runquiet >> $@ && echo -n ',' >> $@
|
---|
212 | +make mutexStmt-monitor2.runquiet >> $@ && echo -n ',' >> $@
|
---|
213 | +make mutexStmt-monitor4.runquiet >> $@
|
---|
214 | $(srcdir)/fixcsv.sh $@
|
---|
215 |
|
---|
216 | schedint.csv:
|
---|
217 | echo "building $@"
|
---|
218 | echo "schedint-1,schedint-2,schedext-1,schedext-2" > $@
|
---|
219 | +make schedint-cfa1.runquiet >> $@ && echo -n ',' >> $@
|
---|
220 | +make schedint-cfa2.runquiet >> $@ && echo -n ',' >> $@
|
---|
221 | +make schedext-cfa1.runquiet >> $@ && echo -n ',' >> $@
|
---|
222 | +make schedext-cfa2.runquiet >> $@
|
---|
223 | $(srcdir)/fixcsv.sh $@
|
---|
224 |
|
---|
225 | %.diff.csv: %.csv
|
---|
226 | test -e $(srcdir)/baselines/$(arch)/$< || (echo "Error : Missing baseline for ${<}" && false)
|
---|
227 | $(srcdir)/baselines/calc.py $(srcdir)/baselines/$(arch)/$(<) $(<) > $@
|
---|
228 |
|
---|
229 | ## =========================================================================================================
|
---|
230 |
|
---|
231 | BASIC_DEPEND = \
|
---|
232 | basic-loop.run \
|
---|
233 | basic-function.run \
|
---|
234 | basic-fetch_add.run \
|
---|
235 | basic-ttst_lock.run \
|
---|
236 | basic-tls-fetch_add.run
|
---|
237 |
|
---|
238 | basic-loop$(EXEEXT):
|
---|
239 | $(BENCH_V_CC)$(COMPILE) $(srcdir)/basic/loop.c
|
---|
240 |
|
---|
241 | basic-function$(EXEEXT):
|
---|
242 | $(BENCH_V_CC)$(COMPILE) $(srcdir)/basic/function.c
|
---|
243 |
|
---|
244 | basic-fetch_add$(EXEEXT):
|
---|
245 | $(BENCH_V_CC)$(COMPILE) $(srcdir)/basic/fetch_add.c
|
---|
246 |
|
---|
247 | basic-ttst_lock$(EXEEXT):
|
---|
248 | $(BENCH_V_CC)$(COMPILE) $(srcdir)/basic/ttst_lock.c
|
---|
249 |
|
---|
250 | basic-tls-fetch_add$(EXEEXT):
|
---|
251 | $(BENCH_V_CC)$(COMPILE) $(srcdir)/basic/tls_fetch_add.c
|
---|
252 |
|
---|
253 | basic$(EXEEXT): $(BASIC_DEPEND)
|
---|
254 |
|
---|
255 | ## =========================================================================================================
|
---|
256 |
|
---|
257 | CTXSWITCH_DEPEND = \
|
---|
258 | ctxswitch-cfa_generator.run \
|
---|
259 | ctxswitch-cfa_coroutine.run \
|
---|
260 | ctxswitch-cfa_thread.run \
|
---|
261 | ctxswitch-cfa_thread2.run \
|
---|
262 | ctxswitch-upp_coroutine.run \
|
---|
263 | ctxswitch-upp_thread.run \
|
---|
264 | ctxswitch-python_coroutine.run \
|
---|
265 | ctxswitch-nodejs_coroutine.run \
|
---|
266 | ctxswitch-nodejs_await.run \
|
---|
267 | ctxswitch-goroutine_thread.run \
|
---|
268 | ctxswitch-rust_thread.run \
|
---|
269 | ctxswitch-nodejs_coroutine.run \
|
---|
270 | ctxswitch-java_thread.run \
|
---|
271 | ctxswitch-pthread.run
|
---|
272 |
|
---|
273 | if WITH_LIBFIBRE
|
---|
274 | CTXSWITCH_DEPEND += \
|
---|
275 | ctxswitch-kos_fibre.run \
|
---|
276 | ctxswitch-kos_fibre2.run
|
---|
277 |
|
---|
278 | ctxswitch-kos_fibre$(EXEEXT):
|
---|
279 | $(BENCH_V_CXX)$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre.cpp -I$(LIBFIBRE_DIR) -lfibre
|
---|
280 |
|
---|
281 | ctxswitch-kos_fibre2$(EXEEXT):
|
---|
282 | $(BENCH_V_CXX)$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre2.cpp -I$(LIBFIBRE_DIR) -lfibre
|
---|
283 | endif
|
---|
284 |
|
---|
285 | ctxswitch$(EXEEXT): $(CTXSWITCH_DEPEND)
|
---|
286 |
|
---|
287 | ctxswitch-cfa_generator$(EXEEXT):
|
---|
288 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/ctxswitch/cfa_gen.cfa
|
---|
289 |
|
---|
290 | ctxswitch-cfa_coroutine$(EXEEXT):
|
---|
291 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/ctxswitch/cfa_cor.cfa
|
---|
292 |
|
---|
293 | ctxswitch-cfa_thread$(EXEEXT):
|
---|
294 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/ctxswitch/cfa_thrd.cfa
|
---|
295 |
|
---|
296 | ctxswitch-cfa_thread2$(EXEEXT):
|
---|
297 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/ctxswitch/cfa_thrd2.cfa
|
---|
298 |
|
---|
299 | ctxswitch-upp_coroutine$(EXEEXT):
|
---|
300 | $(BENCH_V_UPP)$(UPPCOMPILE) $(srcdir)/ctxswitch/upp_cor.cc
|
---|
301 |
|
---|
302 | ctxswitch-upp_thread$(EXEEXT):
|
---|
303 | $(BENCH_V_UPP)$(UPPCOMPILE) $(srcdir)/ctxswitch/upp_thrd.cc
|
---|
304 |
|
---|
305 | ctxswitch-python_coroutine$(EXEEXT):
|
---|
306 | $(BENCH_V_PY)echo "#!/bin/sh" > a.out
|
---|
307 | echo "python3 $(srcdir)/ctxswitch/python_cor.py \"$$""@\"" >> a.out
|
---|
308 | chmod a+x a.out
|
---|
309 |
|
---|
310 | ctxswitch-nodejs_coroutine$(EXEEXT):
|
---|
311 | $(BENCH_V_NODEJS)echo "#!/bin/sh" > a.out
|
---|
312 | echo "nodejs $(srcdir)/ctxswitch/node_cor.js \"$$""@\"" >> a.out
|
---|
313 | chmod a+x a.out
|
---|
314 |
|
---|
315 | ctxswitch-nodejs_await$(EXEEXT):
|
---|
316 | $(BENCH_V_NODEJS)echo "#!/bin/sh" > a.out
|
---|
317 | echo "nodejs $(srcdir)/ctxswitch/node_await.js \"$$""@\"" >> a.out
|
---|
318 | chmod a+x a.out
|
---|
319 |
|
---|
320 | ctxswitch-goroutine_thread$(EXEEXT):
|
---|
321 | $(BENCH_V_GOC)go build -o a.out $(srcdir)/ctxswitch/goroutine.go
|
---|
322 |
|
---|
323 | ctxswitch-rust_thread$(EXEEXT):
|
---|
324 | $(BENCH_V_RUSTC)rustc -C opt-level=3 -o a.out $(srcdir)/ctxswitch/rust_thrd.rs
|
---|
325 |
|
---|
326 | ctxswitch-java_thread$(EXEEXT):
|
---|
327 | $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/ctxswitch/JavaThread.java
|
---|
328 | echo "#!/bin/sh" > a.out
|
---|
329 | echo "java JavaThread \"$$""@\"" >> a.out
|
---|
330 | chmod a+x a.out
|
---|
331 |
|
---|
332 | ctxswitch-pthread$(EXEEXT):
|
---|
333 | $(BENCH_V_CC)$(COMPILE) $(srcdir)/ctxswitch/pthreads.c
|
---|
334 |
|
---|
335 | ## =========================================================================================================
|
---|
336 |
|
---|
337 | mutex$(EXEEXT) : \
|
---|
338 | mutex-cfa1.run \
|
---|
339 | mutex-cfa2.run \
|
---|
340 | mutex-cfa4.run \
|
---|
341 | mutex-upp.run \
|
---|
342 | mutex-go.run \
|
---|
343 | mutex-rust.run \
|
---|
344 | mutex-java.run \
|
---|
345 | mutex-pthread.run
|
---|
346 |
|
---|
347 | mutex-pthread$(EXEEXT):
|
---|
348 | $(BENCH_V_CC)$(COMPILE) $(srcdir)/mutex/pthreads.c
|
---|
349 |
|
---|
350 | mutex-cfa1$(EXEEXT):
|
---|
351 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/mutex/cfa1.cfa
|
---|
352 |
|
---|
353 | mutex-cfa2$(EXEEXT):
|
---|
354 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/mutex/cfa2.cfa
|
---|
355 |
|
---|
356 | mutex-cfa4$(EXEEXT):
|
---|
357 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/mutex/cfa4.cfa
|
---|
358 |
|
---|
359 | mutex-upp$(EXEEXT):
|
---|
360 | $(BENCH_V_UPP)$(UPPCOMPILE) $(srcdir)/mutex/upp.cc
|
---|
361 |
|
---|
362 | mutex-go$(EXEEXT):
|
---|
363 | $(BENCH_V_GOC)go build -o a.out $(srcdir)/mutex/goroutine.go
|
---|
364 |
|
---|
365 | mutex-rust$(EXEEXT):
|
---|
366 | $(BENCH_V_RUSTC)rustc -C opt-level=3 -o a.out $(srcdir)/mutex/rust.rs
|
---|
367 |
|
---|
368 | mutex-java$(EXEEXT):
|
---|
369 | $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/mutex/JavaThread.java
|
---|
370 | echo "#!/bin/sh" > a.out
|
---|
371 | echo "java JavaThread \"$$""@\"" >> a.out
|
---|
372 | chmod a+x a.out
|
---|
373 |
|
---|
374 | ## =========================================================================================================
|
---|
375 |
|
---|
376 | mutexStmt$(EXEEXT) : \
|
---|
377 | mutexStmt-cpp1.run \
|
---|
378 | mutexStmt-cpp2.run \
|
---|
379 | mutexStmt-cpp4.run \
|
---|
380 | mutexStmt-cpp8.run \
|
---|
381 | mutexStmt-java.run \
|
---|
382 | mutexStmt-lock1.run \
|
---|
383 | mutexStmt-lock2.run \
|
---|
384 | mutexStmt-lock4.run \
|
---|
385 | mutexStmt-lock8.run \
|
---|
386 | mutexStmt-no-stmt-lock1.run \
|
---|
387 | mutexStmt-no-stmt-lock2.run \
|
---|
388 | mutexStmt-no-stmt-lock4.run \
|
---|
389 | mutexStmt-no-stmt-lock8.run \
|
---|
390 | mutexStmt-monitor1.run \
|
---|
391 | mutexStmt-monitor2.run \
|
---|
392 | mutexStmt-monitor4.run
|
---|
393 |
|
---|
394 | mutexStmt-lock1$(EXEEXT):
|
---|
395 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/mutexStmt/lock1.cfa
|
---|
396 |
|
---|
397 | mutexStmt-lock2$(EXEEXT):
|
---|
398 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/mutexStmt/lock2.cfa
|
---|
399 |
|
---|
400 | mutexStmt-lock4$(EXEEXT):
|
---|
401 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/mutexStmt/lock4.cfa
|
---|
402 |
|
---|
403 | mutexStmt-lock8$(EXEEXT):
|
---|
404 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/mutexStmt/lock8.cfa
|
---|
405 |
|
---|
406 | mutexStmt-cpp1$(EXEEXT):
|
---|
407 | $(BENCH_V_CXX)$(CXXCOMPILE) -std=c++17 $(srcdir)/mutexStmt/cpp1.cc
|
---|
408 |
|
---|
409 | mutexStmt-cpp2$(EXEEXT):
|
---|
410 | $(BENCH_V_CXX)$(CXXCOMPILE) -std=c++17 $(srcdir)/mutexStmt/cpp2.cc
|
---|
411 |
|
---|
412 | mutexStmt-cpp4$(EXEEXT):
|
---|
413 | $(BENCH_V_CXX)$(CXXCOMPILE) -std=c++17 $(srcdir)/mutexStmt/cpp4.cc
|
---|
414 |
|
---|
415 | mutexStmt-cpp8$(EXEEXT):
|
---|
416 | $(BENCH_V_CXX)$(CXXCOMPILE) -std=c++17 $(srcdir)/mutexStmt/cpp8.cc
|
---|
417 |
|
---|
418 | mutexStmt-monitor1$(EXEEXT):
|
---|
419 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/mutexStmt/monitor1.cfa
|
---|
420 |
|
---|
421 | mutexStmt-monitor2$(EXEEXT):
|
---|
422 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/mutexStmt/monitor2.cfa
|
---|
423 |
|
---|
424 | mutexStmt-monitor4$(EXEEXT):
|
---|
425 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/mutexStmt/monitor4.cfa
|
---|
426 |
|
---|
427 | mutexStmt-no-stmt-lock1$(EXEEXT):
|
---|
428 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/mutexStmt/no_stmt_lock1.cfa
|
---|
429 |
|
---|
430 | mutexStmt-no-stmt-lock2$(EXEEXT):
|
---|
431 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/mutexStmt/no_stmt_lock2.cfa
|
---|
432 |
|
---|
433 | mutexStmt-no-stmt-lock4$(EXEEXT):
|
---|
434 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/mutexStmt/no_stmt_lock4.cfa
|
---|
435 |
|
---|
436 | mutexStmt-no-stmt-lock8$(EXEEXT):
|
---|
437 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/mutexStmt/no_stmt_lock8.cfa
|
---|
438 |
|
---|
439 | mutexStmt-java$(EXEEXT):
|
---|
440 | $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/mutexStmt/JavaThread.java
|
---|
441 | echo "#!/bin/sh" > a.out
|
---|
442 | echo "java JavaThread \"$$""@\"" >> a.out
|
---|
443 | chmod a+x a.out
|
---|
444 |
|
---|
445 | ## =========================================================================================================
|
---|
446 |
|
---|
447 | schedint$(EXEEXT) : \
|
---|
448 | schedint-cfa1.run \
|
---|
449 | schedint-cfa2.run \
|
---|
450 | schedint-cfa4.run \
|
---|
451 | schedint-upp.run \
|
---|
452 | schedint-rust.run \
|
---|
453 | schedint-java.run \
|
---|
454 | schedint-pthread.run
|
---|
455 |
|
---|
456 | schedint-cfa1$(EXEEXT):
|
---|
457 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/schedint/cfa1.cfa
|
---|
458 |
|
---|
459 | schedint-cfa2$(EXEEXT):
|
---|
460 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/schedint/cfa2.cfa
|
---|
461 |
|
---|
462 | schedint-cfa4$(EXEEXT):
|
---|
463 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/schedint/cfa4.cfa
|
---|
464 |
|
---|
465 | schedint-upp$(EXEEXT):
|
---|
466 | $(BENCH_V_UPP)$(UPPCOMPILE) $(srcdir)/schedint/upp.cc
|
---|
467 |
|
---|
468 | schedint-rust$(EXEEXT):
|
---|
469 | $(BENCH_V_RUSTC)rustc -C opt-level=3 -o a.out $(srcdir)/schedint/rust.rs
|
---|
470 |
|
---|
471 | schedint-java$(EXEEXT):
|
---|
472 | $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/schedint/JavaThread.java
|
---|
473 | echo "#!/bin/sh" > a.out
|
---|
474 | echo "java JavaThread \"$$""@\"" >> a.out
|
---|
475 | chmod a+x a.out
|
---|
476 |
|
---|
477 | schedint-pthread$(EXEEXT):
|
---|
478 | $(BENCH_V_CC)$(COMPILE) $(srcdir)/schedint/pthreads.c
|
---|
479 |
|
---|
480 | ## =========================================================================================================
|
---|
481 |
|
---|
482 | schedext$(EXEEXT) : \
|
---|
483 | schedext-cfa1.run \
|
---|
484 | schedext-cfa2.run \
|
---|
485 | schedext-cfa4.run \
|
---|
486 | schedext-upp.run \
|
---|
487 | schedext-goroutine.run
|
---|
488 |
|
---|
489 | schedext-cfa1$(EXEEXT):
|
---|
490 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/schedext/cfa1.cfa
|
---|
491 |
|
---|
492 | schedext-cfa2$(EXEEXT):
|
---|
493 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/schedext/cfa2.cfa
|
---|
494 |
|
---|
495 | schedext-cfa4$(EXEEXT):
|
---|
496 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/schedext/cfa4.cfa
|
---|
497 |
|
---|
498 | schedext-upp$(EXEEXT):
|
---|
499 | $(BENCH_V_UPP)$(UPPCOMPILE) $(srcdir)/schedext/upp.cc
|
---|
500 |
|
---|
501 | schedext-goroutine$(EXEEXT):
|
---|
502 | $(BENCH_V_GOC)go build -o a.out $(srcdir)/schedext/goroutine.go
|
---|
503 |
|
---|
504 |
|
---|
505 | ## =========================================================================================================
|
---|
506 |
|
---|
507 | creation$(EXEEXT) : \
|
---|
508 | creation-cfa_generator.run \
|
---|
509 | creation-cfa_coroutine.run \
|
---|
510 | creation-cfa_coroutine_eager.run \
|
---|
511 | creation-cfa_thread.run \
|
---|
512 | creation-upp_coroutine.run \
|
---|
513 | creation-upp_thread.run \
|
---|
514 | creation-python_coroutine.run \
|
---|
515 | creation-nodejs_coroutine.run \
|
---|
516 | creation-goroutine_thread.run \
|
---|
517 | creation-rust_thread.run \
|
---|
518 | creation-java_thread.run \
|
---|
519 | creation-pthread.run
|
---|
520 |
|
---|
521 | creation-cfa_generator$(EXEEXT):
|
---|
522 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/creation/cfa_gen.cfa
|
---|
523 |
|
---|
524 | creation-cfa_coroutine$(EXEEXT):
|
---|
525 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/creation/cfa_cor.cfa
|
---|
526 |
|
---|
527 | creation-cfa_coroutine_eager$(EXEEXT):
|
---|
528 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/creation/cfa_cor.cfa -DEAGER
|
---|
529 |
|
---|
530 | creation-cfa_thread$(EXEEXT):
|
---|
531 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/creation/cfa_thrd.cfa
|
---|
532 |
|
---|
533 | creation-upp_coroutine$(EXEEXT):
|
---|
534 | $(BENCH_V_UPP)$(UPPCOMPILE) $(srcdir)/creation/upp_cor.cc
|
---|
535 |
|
---|
536 | creation-upp_thread$(EXEEXT):
|
---|
537 | $(BENCH_V_UPP)$(UPPCOMPILE) $(srcdir)/creation/upp_thrd.cc
|
---|
538 |
|
---|
539 | creation-python_coroutine$(EXEEXT):
|
---|
540 | $(BENCH_V_PY)echo "#!/bin/sh" > a.out
|
---|
541 | echo "python3 $(srcdir)/creation/python_cor.py \"$$""@\"" >> a.out
|
---|
542 | chmod a+x a.out
|
---|
543 |
|
---|
544 | creation-nodejs_coroutine$(EXEEXT):
|
---|
545 | $(BENCH_V_NODEJS)echo "#!/bin/sh" > a.out
|
---|
546 | echo "nodejs $(srcdir)/creation/node_cor.js \"$$""@\"" >> a.out
|
---|
547 | chmod a+x a.out
|
---|
548 |
|
---|
549 | creation-goroutine_thread$(EXEEXT):
|
---|
550 | $(BENCH_V_GOC)go build -o a.out $(srcdir)/creation/goroutine.go
|
---|
551 |
|
---|
552 | creation-rust_thread$(EXEEXT):
|
---|
553 | $(BENCH_V_RUSTC)rustc -C opt-level=3 -o a.out $(srcdir)/creation/rust_thrd.rs
|
---|
554 |
|
---|
555 | creation-java_thread$(EXEEXT):
|
---|
556 | $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/creation/JavaThread.java
|
---|
557 | echo "#!/bin/sh" > a.out
|
---|
558 | echo "java JavaThread \"$$""@\"" >> a.out
|
---|
559 | chmod a+x a.out
|
---|
560 |
|
---|
561 | creation-pthread$(EXEEXT):
|
---|
562 | $(BENCH_V_CC)$(COMPILE) $(srcdir)/creation/pthreads.c
|
---|
563 |
|
---|
564 | ## =========================================================================================================
|
---|
565 |
|
---|
566 | bcompile$(EXEEXT) : \
|
---|
567 | compile-array.make \
|
---|
568 | compile-attributes.make \
|
---|
569 | compile-empty.make \
|
---|
570 | compile-expression.make \
|
---|
571 | compile-io.make \
|
---|
572 | compile-monitor.make \
|
---|
573 | compile-operators.make \
|
---|
574 | compile-typeof.make
|
---|
575 |
|
---|
576 | testdir = $(top_srcdir)/tests
|
---|
577 |
|
---|
578 | compile-array$(EXEEXT):
|
---|
579 | $(CFACOMPILE) -DNO_COMPILED_PRAGMA -fsyntax-only -w $(testdir)/array.cfa
|
---|
580 |
|
---|
581 | compile-attributes$(EXEEXT):
|
---|
582 | $(CFACOMPILE) -DNO_COMPILED_PRAGMA -fsyntax-only -w $(testdir)/attributes.cfa
|
---|
583 |
|
---|
584 | compile-empty$(EXEEXT):
|
---|
585 | $(CFACOMPILE) -DNO_COMPILED_PRAGMA -fsyntax-only -w $(srcdir)/compile/empty.cfa
|
---|
586 |
|
---|
587 | compile-expression$(EXEEXT):
|
---|
588 | $(CFACOMPILE) -DNO_COMPILED_PRAGMA -fsyntax-only -w $(testdir)/expression.cfa
|
---|
589 |
|
---|
590 | compile-io$(EXEEXT):
|
---|
591 | $(CFACOMPILE) -DNO_COMPILED_PRAGMA -fsyntax-only -w $(testdir)/io/io.cfa
|
---|
592 |
|
---|
593 | compile-monitor$(EXEEXT):
|
---|
594 | $(CFACOMPILE) -DNO_COMPILED_PRAGMA -fsyntax-only -w $(testdir)/concurrent/monitor.cfa
|
---|
595 |
|
---|
596 | compile-operators$(EXEEXT):
|
---|
597 | $(CFACOMPILE) -DNO_COMPILED_PRAGMA -fsyntax-only -w $(testdir)/operators.cfa
|
---|
598 |
|
---|
599 | compile-thread$(EXEEXT):
|
---|
600 | $(CFACOMPILE) -DNO_COMPILED_PRAGMA -fsyntax-only -w $(testdir)/concurrent/thread.cfa
|
---|
601 |
|
---|
602 | compile-typeof$(EXEEXT):
|
---|
603 | $(CFACOMPILE) -DNO_COMPILED_PRAGMA -fsyntax-only -w $(testdir)/typeof.cfa
|
---|
604 |
|
---|
605 | ## =========================================================================================================
|
---|
606 |
|
---|
607 | size$(EXEEXT) : size-cfa.runquiet
|
---|
608 |
|
---|
609 | size-cfa$(EXEEXT):
|
---|
610 | $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/size/size.cfa
|
---|
611 |
|
---|
612 | ## =========================================================================================================
|
---|
613 |
|
---|
614 | RDQBENCHES = \
|
---|
615 | rdq-churn-cfa \
|
---|
616 | rdq-churn-tokio \
|
---|
617 | rdq-churn-go \
|
---|
618 | rdq-churn-fibre \
|
---|
619 | rdq-cycle-cfa \
|
---|
620 | rdq-cycle-tokio \
|
---|
621 | rdq-cycle-go \
|
---|
622 | rdq-cycle-fibre \
|
---|
623 | rdq-yield-cfa \
|
---|
624 | rdq-yield-tokio \
|
---|
625 | rdq-yield-go \
|
---|
626 | rdq-yield-fibre \
|
---|
627 | rdq-locality-cfa \
|
---|
628 | rdq-locality-tokio \
|
---|
629 | rdq-locality-go \
|
---|
630 | rdq-locality-fibre \
|
---|
631 | rdq-transfer-cfa \
|
---|
632 | rdq-transfer-tokio \
|
---|
633 | rdq-transfer-go \
|
---|
634 | rdq-transfer-fibre
|
---|
635 |
|
---|
636 | rdq-benches:
|
---|
637 | +make $(RDQBENCHES)
|
---|
638 |
|
---|
639 | clean-rdq-benches:
|
---|
640 | rm -rf $(RDQBENCHES) $(builddir)/target go.mod
|
---|
641 |
|
---|
642 | rdq-%-tokio$(EXEEXT): $(builddir)/target/release/rdq-%-tokio$(EXEEXT)
|
---|
643 | $(BENCH_V_RUSTC)cp $(builddir)/target/release/$(basename $@) $@
|
---|
644 |
|
---|
645 | $(builddir)/target/release/rdq-%-tokio$(EXEEXT): $(srcdir)/readyQ/%.rs $(srcdir)/bench.rs
|
---|
646 | $(BENCH_V_RUSTC)cd $(builddir) && cargo build --release
|
---|
647 |
|
---|
648 | rdq-%-cfa$(EXEEXT): $(srcdir)/readyQ/%.cfa $(srcdir)/readyQ/rq_bench.hfa
|
---|
649 | $(BENCH_V_CFA)$(CFACOMPILE) $< -o $@
|
---|
650 |
|
---|
651 | go.mod:
|
---|
652 | touch $@
|
---|
653 | go mod edit -module=rdq.bench
|
---|
654 | go get golang.org/x/sync/semaphore
|
---|
655 | go get golang.org/x/text/language
|
---|
656 | go get golang.org/x/text/message
|
---|
657 |
|
---|
658 | rdq-%-go$(EXEEXT): $(srcdir)/readyQ/%.go $(srcdir)/readyQ/bench.go go.mod
|
---|
659 | $(BENCH_V_GOC)go build -o $@ $< $(srcdir)/readyQ/bench.go
|
---|
660 |
|
---|
661 | rdq-%-fibre$(EXEEXT): $(srcdir)/readyQ/%.cpp
|
---|
662 | $(BENCH_V_CXX)$(CXXCOMPILE) $< -o $@ -lfibre -std=c++17 $(AM_CFLAGS)
|
---|
663 |
|
---|
664 | # ## =========================================================================================================
|
---|
665 |
|
---|
666 | CLEANFILES = $(RDQBENCHES) go.mod go.sum
|
---|
667 |
|
---|
668 | clean-local:
|
---|
669 | -rm -rf target
|
---|