source: benchmark/Makefile.am @ f15fe0a

arm-ehcleanup-dtorsjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-expr
Last change on this file since f15fe0a was f15fe0a, checked in by tdelisle <tdelisle@…>, 3 years ago

Jenkins benchmarks updated to use plot plugin

  • Property mode set to 100644
File size: 11.4 KB
Line 
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 Nov  6 09:01:23 2018
14## Update Count     : 26
15###############################################################################
16
17AUTOMAKE_OPTIONS = foreign    # do not require all the GNU file names
18ACLOCAL_AMFLAGS  = -I automake
19
20# applies to both programs
21include $(top_srcdir)/src/cfa.make
22
23AM_CFLAGS = -O2 -Wall -Wextra -Werror -I$(srcdir) -lrt -pthread
24AM_CFAFLAGS = -quiet -nodebug -in-tree
25AM_UPPFLAGS = -quiet -nodebug -multi -std=c++14
26
27BENCH_V_CC = $(__bench_v_CC_$(__quiet))
28BENCH_V_CFA = $(__bench_v_CFA_$(__quiet))
29BENCH_V_CXX = $(__bench_v_CXX_$(__quiet))
30BENCH_V_GOC = $(__bench_v_GOC_$(__quiet))
31BENCH_V_JAVAC = $(__bench_v_JAVAC_$(__quiet))
32BENCH_V_UPP = $(__bench_v_UPP_$(__quiet))
33
34__quiet = verbose
35__bench_v_CC_quiet = @
36__bench_v_CFA_quiet = @
37__bench_v_CXX_quiet = @
38__bench_v_GOC_quiet = @
39__bench_v_JAVAC_quiet = @
40__bench_v_UPP_quiet = @
41__bench_v_CC_verbose = $(AM_V_CC)
42__bench_v_CFA_verbose = $(AM_V_CFA)
43__bench_v_CXX_verbose = $(AM_V_CXX)
44__bench_v_GOC_verbose = $(AM_V_GOC)
45__bench_v_JAVAC_verbose = $(AM_V_JAVAC)
46__bench_v_UPP_verbose = $(AM_V_UPP)
47
48
49
50TOOLSDIR = ${abs_top_builddir}/tools/
51REPEAT   = ${abs_top_builddir}/tools/repeat
52STATS    = ${abs_top_srcdir}/tools/stat.py
53repeats  = 30
54skipcompile = no
55TIME_FORMAT = "%E"
56PRINT_FORMAT = %20s: #Comments needed for spacing
57
58# Dummy hack tricks
59EXTRA_PROGRAMS = dummy # build but do not install
60dummy_SOURCES = dummyC.c dummyCXX.cpp
61
62dummyC.c:
63        @echo "int main() { return 0; }" > ${@}
64
65dummyCXX.cpp:
66        @echo "int main() { return 0; }" > ${@}
67
68.NOTPARALLEL:
69.PHONY: compile.csv ctxswitch.csv mutex.csv signal.csv
70
71## =========================================================================================================
72all : ctxswitch$(EXEEXT) mutex$(EXEEXT) signal$(EXEEXT) waitfor$(EXEEXT) creation$(EXEEXT)
73
74%.run : %$(EXEEXT) ${REPEAT}
75        @rm -f .result.log
76        @echo "------------------------------------------------------"
77        @echo $<
78        @${REPEAT} ${repeats} ./a.out | tee -a .result.log
79        @${STATS} .result.log
80        @echo "------------------------------------------------------"
81        @rm -f a.out .result.log *.class
82
83%.runquiet :
84        @+make $(basename $@) CFLAGS="-w" __quiet=quiet
85        @taskset -c 1 ./a.out
86        @rm -f a.out
87
88%.make :
89        @printf "${PRINT_FORMAT}" $(basename $(subst compile-,,$@))
90        @+/usr/bin/time -f ${TIME_FORMAT} make $(basename $@) 2>&1
91
92${REPEAT} :
93        @+make -C ${abs_top_builddir}/tools repeat
94
95## =========================================================================================================
96
97FIX_NEW_LINES = cat $@ | tr "\n" "\t" | sed -r 's/\t,/,/' | tr "\t" "\n" > $@
98
99jenkins$(EXEEXT):
100@DOifskipcompile@
101        @+make compile.csv
102@DOendif@
103        @+make ctxswitch.csv
104        @+make mutex.csv
105        @+make signal.csv
106
107compile.csv:
108        @echo "array,attributes,empty,expression,io,monitor,operators,typeof" > $@
109        @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-array.make >> $@
110        @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-attributes.make >> $@
111        @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-empty.make >> $@
112        @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-expression.make >> $@
113        @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-io.make >> $@
114        @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-monitor.make >> $@
115        @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-operators.make >> $@
116        @+make TIME_FORMAT='%e' PRINT_FORMAT='' compile-typeof.make >> $@
117        @$(srcdir)/fixcsv.sh $@
118
119ctxswitch.csv:
120        @echo "coroutine,thread" > $@
121        @+make ctxswitch-cfa_coroutine.runquiet >> $@ && echo -n ',' >> $@
122        @+make ctxswitch-cfa_thread.runquiet >> $@
123        @$(srcdir)/fixcsv.sh $@
124
125mutex.csv:
126        @echo "1-monitor,2-monitor" > $@
127        @+make mutex-cfa1.runquiet >> $@ && echo -n ',' >> $@
128        @+make mutex-cfa2.runquiet >> $@
129        @$(srcdir)/fixcsv.sh $@
130
131signal.csv:
132        @echo "signal-1,signal-2,waitfor-1,waitfor-2" > $@
133        @+make signal-cfa1.runquiet >> $@ && echo -n ',' >> $@
134        @+make signal-cfa2.runquiet >> $@ && echo -n ',' >> $@
135        @+make waitfor-cfa1.runquiet >> $@ && echo -n ',' >> $@
136        @+make waitfor-cfa2.runquiet >> $@
137        @$(srcdir)/fixcsv.sh $@
138
139## =========================================================================================================
140loop$(EXEEXT):
141        $(BENCH_V_CC)$(COMPILE) -DBENCH_N=5000000000 $(srcdir)/loop.c
142
143function$(EXEEXT):
144        $(BENCH_V_CC)$(COMPILE) -DBENCH_N=5000000000 $(srcdir)/function.c
145
146fetch_add$(EXEEXT):
147        $(BENCH_V_CC)$(COMPILE) -DBENCH_N=500000000  $(srcdir)/fetch_add.c
148
149tls-fetch_add$(EXEEXT):
150        $(BENCH_V_CC)$(COMPILE) -DBENCH_N=500000000  $(srcdir)/tls-fetch_add.c
151
152## =========================================================================================================
153CTXSWITCH_DEPEND  =                 \
154        loop.run                                \
155        function.run                    \
156        fetch_add.run                   \
157        tls-fetch_add.run                       \
158        ctxswitch-pthread.run           \
159        ctxswitch-cfa_coroutine.run     \
160        ctxswitch-cfa_thread.run        \
161        ctxswitch-cfa_thread2.run       \
162        ctxswitch-upp_coroutine.run     \
163        ctxswitch-upp_thread.run        \
164        ctxswitch-goroutine.run         \
165        ctxswitch-java_thread.run
166
167if WITH_LIBFIBRE
168CTXSWITCH_DEPEND  +=           \
169        ctxswitch-kos_fibre.run  \
170        ctxswitch-kos_fibre2.run
171
172
173ctxswitch-kos_fibre$(EXEEXT):
174        $(BENCH_V_CXX)$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre.cpp  -I$(LIBFIBRE_DIR) -lfibre
175
176ctxswitch-kos_fibre2$(EXEEXT):
177        $(BENCH_V_CXX)$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre2.cpp -I$(LIBFIBRE_DIR) -lfibre
178endif
179
180ctxswitch$(EXEEXT): $(CTXSWITCH_DEPEND)
181
182ctxswitch-pthread$(EXEEXT):
183        $(BENCH_V_CC)$(COMPILE)    -DBENCH_N=50000000 $(srcdir)/ctxswitch/pthreads.c
184
185ctxswitch-cfa_coroutine$(EXEEXT):
186        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_cor.cfa
187
188ctxswitch-cfa_thread$(EXEEXT):
189        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd.cfa
190
191ctxswitch-cfa_thread2$(EXEEXT):
192        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd2.cfa
193
194ctxswitch-upp_coroutine$(EXEEXT):
195        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_cor.cc
196
197ctxswitch-upp_thread$(EXEEXT):
198        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_thrd.cc
199
200ctxswitch-goroutine$(EXEEXT):
201        $(BENCH_V_GOC)go build -o a.out $(srcdir)/ctxswitch/goroutine.go
202
203ctxswitch-java_thread$(EXEEXT):
204        $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/ctxswitch/JavaThread.java
205        @echo "#!/bin/sh" > a.out
206        @echo "java JavaThread" >> a.out
207        @chmod a+x a.out
208
209## =========================================================================================================
210mutex$(EXEEXT) :\
211        loop.run                        \
212        function.run            \
213        fetch_add.run           \
214        mutex-pthread_lock.run  \
215        mutex-upp.run           \
216        mutex-cfa1.run          \
217        mutex-cfa2.run          \
218        mutex-cfa4.run          \
219        mutex-java_thread.run
220
221mutex-pthread_lock$(EXEEXT):
222        $(BENCH_V_CC)$(COMPILE)    -DBENCH_N=50000000 $(srcdir)/mutex/pthreads.c
223
224mutex-upp$(EXEEXT):
225        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/mutex/upp.cc
226
227mutex-cfa1$(EXEEXT):
228        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000  $(srcdir)/mutex/cfa1.cfa
229
230mutex-cfa2$(EXEEXT):
231        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000  $(srcdir)/mutex/cfa2.cfa
232
233mutex-cfa4$(EXEEXT):
234        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000  $(srcdir)/mutex/cfa4.cfa
235
236mutex-java_thread$(EXEEXT):
237        $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/mutex/JavaThread.java
238        @echo "#!/bin/sh" > a.out
239        @echo "java JavaThread" >> a.out
240        @chmod a+x a.out
241
242## =========================================================================================================
243signal$(EXEEXT) :\
244        signal-pthread_cond.run \
245        signal-upp.run          \
246        signal-cfa1.run         \
247        signal-cfa2.run         \
248        signal-cfa4.run         \
249        signal-java_thread.run
250
251signal-pthread_cond$(EXEEXT):
252        $(BENCH_V_CC)$(COMPILE)    -DBENCH_N=500000  $(srcdir)/schedint/pthreads.c
253
254signal-upp$(EXEEXT):
255        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedint/upp.cc
256
257signal-cfa1$(EXEEXT):
258        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedint/cfa1.cfa
259
260signal-cfa2$(EXEEXT):
261        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedint/cfa2.cfa
262
263signal-cfa4$(EXEEXT):
264        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedint/cfa4.cfa
265
266signal-java_thread$(EXEEXT):
267        $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/schedint/JavaThread.java
268        @echo "#!/bin/sh" > a.out
269        @echo "java JavaThread" >> a.out
270        @chmod a+x a.out
271
272
273## =========================================================================================================
274waitfor$(EXEEXT) :\
275        waitfor-upp.run         \
276        waitfor-cfa1.run                \
277        waitfor-cfa2.run                \
278        waitfor-cfa4.run
279
280waitfor-upp$(EXEEXT):
281        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedext/upp.cc
282
283waitfor-cfa1$(EXEEXT):
284        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedext/cfa1.cfa
285
286waitfor-cfa2$(EXEEXT):
287        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedext/cfa2.cfa
288
289waitfor-cfa4$(EXEEXT):
290        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedext/cfa4.cfa
291
292## =========================================================================================================
293creation$(EXEEXT) :\
294        creation-pthread.run                    \
295        creation-cfa_coroutine.run              \
296        creation-cfa_coroutine_eager.run        \
297        creation-cfa_thread.run                 \
298        creation-upp_coroutine.run              \
299        creation-upp_thread.run                 \
300        creation-goroutine.run                  \
301        creation-java_thread.run
302
303creation-cfa_coroutine$(EXEEXT):
304        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.cfa
305
306creation-cfa_coroutine_eager$(EXEEXT):
307        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.cfa  -DEAGER
308
309creation-cfa_thread$(EXEEXT):
310        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_thrd.cfa
311
312creation-upp_coroutine$(EXEEXT):
313        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_cor.cc
314
315creation-upp_thread$(EXEEXT):
316        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_thrd.cc
317
318creation-pthread$(EXEEXT):
319        $(BENCH_V_CC)$(COMPILE)    -DBENCH_N=250000   $(srcdir)/creation/pthreads.c
320
321creation-goroutine$(EXEEXT):
322        $(BENCH_V_GOC)go build -o a.out $(srcdir)/creation/goroutine.go
323
324creation-java_thread$(EXEEXT):
325        $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/creation/JavaThread.java
326        @echo "#!/bin/sh" > a.out
327        @echo "java JavaThread" >> a.out
328        @chmod a+x a.out
329
330## =========================================================================================================
331
332compile$(EXEEXT) :\
333        compile-array.make      \
334        compile-attributes.make \
335        compile-empty.make      \
336        compile-expression.make \
337        compile-io.make         \
338        compile-monitor.make    \
339        compile-operators.make  \
340        compile-typeof.make
341
342
343testdir = $(top_srcdir)/tests
344
345compile-array$(EXEEXT):
346        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/array.cfa
347
348compile-attributes$(EXEEXT):
349        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/attributes.cfa
350
351compile-empty$(EXEEXT):
352        @$(CFACOMPILE) -fsyntax-only -w $(srcdir)/compile/empty.cfa
353
354compile-expression$(EXEEXT):
355        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/expression.cfa
356
357compile-io$(EXEEXT):
358        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/io1.cfa
359
360compile-monitor$(EXEEXT):
361        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/monitor.cfa
362
363compile-operators$(EXEEXT):
364        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/operators.cfa
365
366compile-thread$(EXEEXT):
367        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/thread.cfa
368
369compile-typeof$(EXEEXT):
370        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/typeof.cfa
371
Note: See TracBrowser for help on using the repository browser.