source: benchmark/Makefile.am @ 7a8f5246

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

Added benchmark for relaxed atomic store to tls

  • Property mode set to 100644
File size: 10.7 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 -I$(srcdir) -lrt -pthread
24AM_CFAFLAGS = -quiet -in-tree -nodebug -std=c++14
25AM_UPPFLAGS = -quiet -nodebug -multi
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
70## =========================================================================================================
71all : ctxswitch$(EXEEXT) mutex$(EXEEXT) signal$(EXEEXT) waitfor$(EXEEXT) creation$(EXEEXT)
72
73%.run : %$(EXEEXT) ${REPEAT}
74        @rm -f .result.log
75        @echo "------------------------------------------------------"
76        @echo $<
77        @${REPEAT} ${repeats} ./a.out | tee -a .result.log
78        @${STATS} .result.log
79        @echo "------------------------------------------------------"
80        @rm -f a.out .result.log *.class
81
82%.runquiet :
83        @+make $(basename $@) CFLAGS="-w" __quiet=quiet
84        @taskset -c 1 ./a.out
85        @rm -f a.out
86
87%.make :
88        @printf "${PRINT_FORMAT}" $(basename $(subst compile-,,$@))
89        @+/usr/bin/time -f ${TIME_FORMAT} make $(basename $@) 2>&1
90
91${REPEAT} :
92        @+make -C ${abs_top_builddir}/tools repeat
93
94## =========================================================================================================
95
96jenkins$(EXEEXT):
97        @echo "{"
98        @echo -e '\t"githash": "'${githash}'",'
99        @echo -e '\t"arch": "'   ${arch}   '",'
100@DOifskipcompile@
101        @echo -e '\t"compile": {'
102        @+make compile TIME_FORMAT='%e,' PRINT_FORMAT='\t\t\"%s\" :'
103        @echo -e '\t\t"dummy" : {}'
104        @echo -e '\t},'
105@DOendif@
106        @echo -e '\t"ctxswitch": {'
107        @echo -en '\t\t"coroutine":'
108        @+make ctxswitch-cfa_coroutine.runquiet
109        @echo -en '\t\t,"thread":'
110        @+make ctxswitch-cfa_thread.runquiet
111        @echo -e '\t},'
112        @echo -e '\t"mutex": ['
113        @echo -en '\t\t'
114        @+make mutex-cfa1.runquiet
115        @echo -en '\t\t,'
116        @+make mutex-cfa2.runquiet
117        @echo -e '\t],'
118        @echo -e '\t"scheduling": ['
119        @echo -en '\t\t'
120        @+make signal-cfa1.runquiet
121        @echo -en '\t\t,'
122        @+make signal-cfa2.runquiet
123        @echo -en '\t\t,'
124        @+make waitfor-cfa1.runquiet
125        @echo -en '\t\t,'
126        @+make waitfor-cfa2.runquiet
127        @echo -e '\n\t],'
128        @echo -e '\t"epoch": ' $(shell date +%s)
129        @echo "}"
130
131## =========================================================================================================
132loop$(EXEEXT):
133        $(BENCH_V_CC)$(COMPILE) -DBENCH_N=5000000000 $(srcdir)/loop.c
134
135function$(EXEEXT):
136        $(BENCH_V_CC)$(COMPILE) -DBENCH_N=5000000000 $(srcdir)/function.c
137
138fetch_add$(EXEEXT):
139        $(BENCH_V_CC)$(COMPILE) -DBENCH_N=500000000  $(srcdir)/fetch_add.c
140
141tls-fetch_add$(EXEEXT):
142        $(BENCH_V_CC)$(COMPILE) -DBENCH_N=500000000  $(srcdir)/tls-fetch_add.c
143
144## =========================================================================================================
145CTXSWITCH_DEPEND  =                 \
146        loop.run                                \
147        function.run                    \
148        fetch_add.run                   \
149        tls-fetch_add.run                       \
150        ctxswitch-pthread.run           \
151        ctxswitch-cfa_coroutine.run     \
152        ctxswitch-cfa_thread.run        \
153        ctxswitch-cfa_thread2.run       \
154        ctxswitch-upp_coroutine.run     \
155        ctxswitch-upp_thread.run        \
156        ctxswitch-goroutine.run         \
157        ctxswitch-java_thread.run
158
159if WITH_LIBFIBRE
160CTXSWITCH_DEPEND  +=           \
161        ctxswitch-kos_fibre.run  \
162        ctxswitch-kos_fibre2.run
163
164
165ctxswitch-kos_fibre$(EXEEXT):
166        $(BENCH_V_CXX)$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre.cpp  -I$(LIBFIBRE_DIR) -lfibre
167
168ctxswitch-kos_fibre2$(EXEEXT):
169        $(BENCH_V_CXX)$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre2.cpp -I$(LIBFIBRE_DIR) -lfibre
170endif
171
172ctxswitch$(EXEEXT): $(CTXSWITCH_DEPEND)
173
174ctxswitch-pthread$(EXEEXT):
175        $(BENCH_V_CC)$(COMPILE)    -DBENCH_N=50000000 $(srcdir)/ctxswitch/pthreads.c
176
177ctxswitch-cfa_coroutine$(EXEEXT):
178        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_cor.cfa
179
180ctxswitch-cfa_thread$(EXEEXT):
181        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd.cfa
182
183ctxswitch-cfa_thread2$(EXEEXT):
184        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd2.cfa
185
186ctxswitch-upp_coroutine$(EXEEXT):
187        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_cor.cc
188
189ctxswitch-upp_thread$(EXEEXT):
190        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_thrd.cc
191
192ctxswitch-goroutine$(EXEEXT):
193        $(BENCH_V_GOC)go build -o a.out $(srcdir)/ctxswitch/goroutine.go
194
195ctxswitch-java_thread$(EXEEXT):
196        $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/ctxswitch/JavaThread.java
197        @echo "#!/bin/sh" > a.out
198        @echo "java JavaThread" >> a.out
199        @chmod a+x a.out
200
201## =========================================================================================================
202mutex$(EXEEXT) :\
203        loop.run                        \
204        function.run            \
205        fetch_add.run           \
206        mutex-pthread_lock.run  \
207        mutex-upp.run           \
208        mutex-cfa1.run          \
209        mutex-cfa2.run          \
210        mutex-cfa4.run          \
211        mutex-java_thread.run
212
213mutex-pthread_lock$(EXEEXT):
214        $(BENCH_V_CC)$(COMPILE)    -DBENCH_N=50000000 $(srcdir)/mutex/pthreads.c
215
216mutex-upp$(EXEEXT):
217        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/mutex/upp.cc
218
219mutex-cfa1$(EXEEXT):
220        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000  $(srcdir)/mutex/cfa1.cfa
221
222mutex-cfa2$(EXEEXT):
223        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000  $(srcdir)/mutex/cfa2.cfa
224
225mutex-cfa4$(EXEEXT):
226        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000  $(srcdir)/mutex/cfa4.cfa
227
228mutex-java_thread$(EXEEXT):
229        $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/mutex/JavaThread.java
230        @echo "#!/bin/sh" > a.out
231        @echo "java JavaThread" >> a.out
232        @chmod a+x a.out
233
234## =========================================================================================================
235signal$(EXEEXT) :\
236        signal-pthread_cond.run \
237        signal-upp.run          \
238        signal-cfa1.run         \
239        signal-cfa2.run         \
240        signal-cfa4.run         \
241        signal-java_thread.run
242
243signal-pthread_cond$(EXEEXT):
244        $(BENCH_V_CC)$(COMPILE)    -DBENCH_N=500000  $(srcdir)/schedint/pthreads.c
245
246signal-upp$(EXEEXT):
247        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedint/upp.cc
248
249signal-cfa1$(EXEEXT):
250        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedint/cfa1.cfa
251
252signal-cfa2$(EXEEXT):
253        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedint/cfa2.cfa
254
255signal-cfa4$(EXEEXT):
256        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedint/cfa4.cfa
257
258signal-java_thread$(EXEEXT):
259        $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/schedint/JavaThread.java
260        @echo "#!/bin/sh" > a.out
261        @echo "java JavaThread" >> a.out
262        @chmod a+x a.out
263
264
265## =========================================================================================================
266waitfor$(EXEEXT) :\
267        waitfor-upp.run         \
268        waitfor-cfa1.run                \
269        waitfor-cfa2.run                \
270        waitfor-cfa4.run
271
272waitfor-upp$(EXEEXT):
273        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedext/upp.cc
274
275waitfor-cfa1$(EXEEXT):
276        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedext/cfa1.cfa
277
278waitfor-cfa2$(EXEEXT):
279        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedext/cfa2.cfa
280
281waitfor-cfa4$(EXEEXT):
282        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedext/cfa4.cfa
283
284## =========================================================================================================
285creation$(EXEEXT) :\
286        creation-pthread.run                    \
287        creation-cfa_coroutine.run              \
288        creation-cfa_coroutine_eager.run        \
289        creation-cfa_thread.run                 \
290        creation-upp_coroutine.run              \
291        creation-upp_thread.run                 \
292        creation-goroutine.run                  \
293        creation-java_thread.run
294
295creation-cfa_coroutine$(EXEEXT):
296        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.cfa
297
298creation-cfa_coroutine_eager$(EXEEXT):
299        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.cfa  -DEAGER
300
301creation-cfa_thread$(EXEEXT):
302        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_thrd.cfa
303
304creation-upp_coroutine$(EXEEXT):
305        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_cor.cc
306
307creation-upp_thread$(EXEEXT):
308        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_thrd.cc
309
310creation-pthread$(EXEEXT):
311        $(BENCH_V_CC)$(COMPILE)    -DBENCH_N=250000   $(srcdir)/creation/pthreads.c
312
313creation-goroutine$(EXEEXT):
314        $(BENCH_V_GOC)go build -o a.out $(srcdir)/creation/goroutine.go
315
316creation-java_thread$(EXEEXT):
317        $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/creation/JavaThread.java
318        @echo "#!/bin/sh" > a.out
319        @echo "java JavaThread" >> a.out
320        @chmod a+x a.out
321
322## =========================================================================================================
323
324compile$(EXEEXT) :\
325        compile-array.make      \
326        compile-attributes.make \
327        compile-empty.make      \
328        compile-expression.make \
329        compile-io.make         \
330        compile-monitor.make    \
331        compile-operators.make  \
332        compile-typeof.make
333
334
335testdir = $(top_srcdir)/tests
336
337compile-array$(EXEEXT):
338        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/array.cfa
339
340compile-attributes$(EXEEXT):
341        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/attributes.cfa
342
343compile-empty$(EXEEXT):
344        @$(CFACOMPILE) -fsyntax-only -w $(srcdir)/compile/empty.cfa
345
346compile-expression$(EXEEXT):
347        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/expression.cfa
348
349compile-io$(EXEEXT):
350        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/io1.cfa
351
352compile-monitor$(EXEEXT):
353        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/monitor.cfa
354
355compile-operators$(EXEEXT):
356        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/operators.cfa
357
358compile-thread$(EXEEXT):
359        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/thread.cfa
360
361compile-typeof$(EXEEXT):
362        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/typeof.cfa
363
Note: See TracBrowser for help on using the repository browser.