source: benchmark/Makefile.am @ 4e84ef7

ADTarm-ehast-experimentalcleanup-dtorsenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 4e84ef7 was 5a8037a7, checked in by tdelisle <tdelisle@…>, 6 years ago

Fixed benchmark flags and disallowed warnings since they cause parsing problems

  • Property mode set to 100644
File size: 10.8 KB
RevLine 
[ac93b228]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
[dc8511c]13## Last Modified On : Tue Nov  6 09:01:23 2018
14## Update Count     : 26
[ac93b228]15###############################################################################
16
[0c1b566]17AUTOMAKE_OPTIONS = foreign    # do not require all the GNU file names
[107b01a]18ACLOCAL_AMFLAGS  = -I automake
[0c1b566]19
[ac93b228]20# applies to both programs
[7a7ab42]21include $(top_srcdir)/src/cfa.make
22
[5a8037a7]23AM_CFLAGS = -O2 -Wall -Wextra -Werror -I$(srcdir) -lrt -pthread
24AM_CFAFLAGS = -quiet -nodebug -in-tree
25AM_UPPFLAGS = -quiet -nodebug -multi -std=c++14
[7a7ab42]26
[528ccc8]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
[5e49e47]50TOOLSDIR = ${abs_top_builddir}/tools/
51REPEAT   = ${abs_top_builddir}/tools/repeat
52STATS    = ${abs_top_srcdir}/tools/stat.py
[b7170a64]53repeats  = 30
[05f4b85]54skipcompile = no
[a5b7905]55TIME_FORMAT = "%E"
[2086ab2]56PRINT_FORMAT = %20s: #Comments needed for spacing
[034165a]57
[d0c91a6]58# Dummy hack tricks
[5e49e47]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
[034165a]68.NOTPARALLEL:
[ac93b228]69
[43fa66e]70## =========================================================================================================
[4cedd9f]71all : ctxswitch$(EXEEXT) mutex$(EXEEXT) signal$(EXEEXT) waitfor$(EXEEXT) creation$(EXEEXT)
72
[a5b7905]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 "------------------------------------------------------"
[88e139e]80        @rm -f a.out .result.log *.class
[ac93b228]81
[a5b7905]82%.runquiet :
[528ccc8]83        @+make $(basename $@) CFLAGS="-w" __quiet=quiet
[05f4b85]84        @taskset -c 1 ./a.out
[a5b7905]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} :
[5e49e47]92        @+make -C ${abs_top_builddir}/tools repeat
[a5b7905]93
94## =========================================================================================================
95
96jenkins$(EXEEXT):
97        @echo "{"
98        @echo -e '\t"githash": "'${githash}'",'
99        @echo -e '\t"arch": "'   ${arch}   '",'
[05f4b85]100@DOifskipcompile@
[91496f3]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},'
[05f4b85]105@DOendif@
[a5b7905]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 "}"
[ac93b228]130
[d885a58]131## =========================================================================================================
132loop$(EXEEXT):
[528ccc8]133        $(BENCH_V_CC)$(COMPILE) -DBENCH_N=5000000000 $(srcdir)/loop.c
[d885a58]134
135function$(EXEEXT):
[528ccc8]136        $(BENCH_V_CC)$(COMPILE) -DBENCH_N=5000000000 $(srcdir)/function.c
[d885a58]137
138fetch_add$(EXEEXT):
[528ccc8]139        $(BENCH_V_CC)$(COMPILE) -DBENCH_N=500000000  $(srcdir)/fetch_add.c
[d885a58]140
[7a8f5246]141tls-fetch_add$(EXEEXT):
142        $(BENCH_V_CC)$(COMPILE) -DBENCH_N=500000000  $(srcdir)/tls-fetch_add.c
143
[034165a]144## =========================================================================================================
[41cca44]145CTXSWITCH_DEPEND  =                 \
[d885a58]146        loop.run                                \
147        function.run                    \
148        fetch_add.run                   \
[7a8f5246]149        tls-fetch_add.run                       \
[b7170a64]150        ctxswitch-pthread.run           \
151        ctxswitch-cfa_coroutine.run     \
152        ctxswitch-cfa_thread.run        \
[6810fcb]153        ctxswitch-cfa_thread2.run       \
[b7170a64]154        ctxswitch-upp_coroutine.run     \
[50abab9]155        ctxswitch-upp_thread.run        \
156        ctxswitch-goroutine.run         \
157        ctxswitch-java_thread.run
[034165a]158
[41cca44]159if WITH_LIBFIBRE
160CTXSWITCH_DEPEND  +=           \
161        ctxswitch-kos_fibre.run  \
162        ctxswitch-kos_fibre2.run
163
164
165ctxswitch-kos_fibre$(EXEEXT):
[528ccc8]166        $(BENCH_V_CXX)$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre.cpp  -I$(LIBFIBRE_DIR) -lfibre
[41cca44]167
168ctxswitch-kos_fibre2$(EXEEXT):
[528ccc8]169        $(BENCH_V_CXX)$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre2.cpp -I$(LIBFIBRE_DIR) -lfibre
[41cca44]170endif
171
172ctxswitch$(EXEEXT): $(CTXSWITCH_DEPEND)
173
[6810fcb]174ctxswitch-pthread$(EXEEXT):
[528ccc8]175        $(BENCH_V_CC)$(COMPILE)    -DBENCH_N=50000000 $(srcdir)/ctxswitch/pthreads.c
[6810fcb]176
[034165a]177ctxswitch-cfa_coroutine$(EXEEXT):
[528ccc8]178        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_cor.cfa
[034165a]179
180ctxswitch-cfa_thread$(EXEEXT):
[528ccc8]181        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd.cfa
[6810fcb]182
183ctxswitch-cfa_thread2$(EXEEXT):
[528ccc8]184        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd2.cfa
[034165a]185
186ctxswitch-upp_coroutine$(EXEEXT):
[528ccc8]187        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_cor.cc
[034165a]188
189ctxswitch-upp_thread$(EXEEXT):
[528ccc8]190        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_thrd.cc
[ac93b228]191
[50abab9]192ctxswitch-goroutine$(EXEEXT):
[528ccc8]193        $(BENCH_V_GOC)go build -o a.out $(srcdir)/ctxswitch/goroutine.go
[50abab9]194
195ctxswitch-java_thread$(EXEEXT):
[528ccc8]196        $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/ctxswitch/JavaThread.java
[50abab9]197        @echo "#!/bin/sh" > a.out
[5e49e47]198        @echo "java JavaThread" >> a.out
[50abab9]199        @chmod a+x a.out
200
[f54a0ab]201## =========================================================================================================
202mutex$(EXEEXT) :\
[d885a58]203        loop.run                        \
204        function.run            \
205        fetch_add.run           \
[f54a0ab]206        mutex-pthread_lock.run  \
207        mutex-upp.run           \
208        mutex-cfa1.run          \
209        mutex-cfa2.run          \
[6aa537a4]210        mutex-cfa4.run          \
211        mutex-java_thread.run
[f54a0ab]212
213mutex-pthread_lock$(EXEEXT):
[528ccc8]214        $(BENCH_V_CC)$(COMPILE)    -DBENCH_N=50000000 $(srcdir)/mutex/pthreads.c
[f54a0ab]215
216mutex-upp$(EXEEXT):
[528ccc8]217        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/mutex/upp.cc
[f54a0ab]218
219mutex-cfa1$(EXEEXT):
[528ccc8]220        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000  $(srcdir)/mutex/cfa1.cfa
[f54a0ab]221
222mutex-cfa2$(EXEEXT):
[528ccc8]223        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000  $(srcdir)/mutex/cfa2.cfa
[f54a0ab]224
225mutex-cfa4$(EXEEXT):
[528ccc8]226        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000  $(srcdir)/mutex/cfa4.cfa
[034165a]227
[6aa537a4]228mutex-java_thread$(EXEEXT):
[528ccc8]229        $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/mutex/JavaThread.java
[6aa537a4]230        @echo "#!/bin/sh" > a.out
[5e49e47]231        @echo "java JavaThread" >> a.out
[6aa537a4]232        @chmod a+x a.out
233
[9f0b975]234## =========================================================================================================
235signal$(EXEEXT) :\
[3eb4541]236        signal-pthread_cond.run \
[9f0b975]237        signal-upp.run          \
238        signal-cfa1.run         \
239        signal-cfa2.run         \
[56de6b39]240        signal-cfa4.run         \
241        signal-java_thread.run
[9f0b975]242
[3eb4541]243signal-pthread_cond$(EXEEXT):
[528ccc8]244        $(BENCH_V_CC)$(COMPILE)    -DBENCH_N=500000  $(srcdir)/schedint/pthreads.c
[3eb4541]245
[9f0b975]246signal-upp$(EXEEXT):
[528ccc8]247        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedint/upp.cc
[9f0b975]248
249signal-cfa1$(EXEEXT):
[528ccc8]250        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedint/cfa1.cfa
[9f0b975]251
252signal-cfa2$(EXEEXT):
[528ccc8]253        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedint/cfa2.cfa
[9f0b975]254
255signal-cfa4$(EXEEXT):
[528ccc8]256        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedint/cfa4.cfa
[9f0b975]257
[6aa537a4]258signal-java_thread$(EXEEXT):
[528ccc8]259        $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/schedint/JavaThread.java
[6aa537a4]260        @echo "#!/bin/sh" > a.out
[5e49e47]261        @echo "java JavaThread" >> a.out
[6aa537a4]262        @chmod a+x a.out
263
264
[9f0b975]265## =========================================================================================================
266waitfor$(EXEEXT) :\
267        waitfor-upp.run         \
268        waitfor-cfa1.run                \
269        waitfor-cfa2.run                \
270        waitfor-cfa4.run
271
272waitfor-upp$(EXEEXT):
[528ccc8]273        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedext/upp.cc
[9f0b975]274
275waitfor-cfa1$(EXEEXT):
[528ccc8]276        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedext/cfa1.cfa
[9f0b975]277
278waitfor-cfa2$(EXEEXT):
[528ccc8]279        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedext/cfa2.cfa
[9f0b975]280
281waitfor-cfa4$(EXEEXT):
[528ccc8]282        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedext/cfa4.cfa
[9f0b975]283
[4cedd9f]284## =========================================================================================================
285creation$(EXEEXT) :\
[3351cc0]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              \
[50abab9]291        creation-upp_thread.run                 \
292        creation-goroutine.run                  \
293        creation-java_thread.run
[4cedd9f]294
295creation-cfa_coroutine$(EXEEXT):
[528ccc8]296        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.cfa
[4cedd9f]297
[3351cc0]298creation-cfa_coroutine_eager$(EXEEXT):
[528ccc8]299        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.cfa  -DEAGER
[3351cc0]300
[4cedd9f]301creation-cfa_thread$(EXEEXT):
[528ccc8]302        $(BENCH_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_thrd.cfa
[4cedd9f]303
304creation-upp_coroutine$(EXEEXT):
[528ccc8]305        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_cor.cc
[4cedd9f]306
307creation-upp_thread$(EXEEXT):
[528ccc8]308        $(BENCH_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_thrd.cc
[4cedd9f]309
310creation-pthread$(EXEEXT):
[528ccc8]311        $(BENCH_V_CC)$(COMPILE)    -DBENCH_N=250000   $(srcdir)/creation/pthreads.c
[4cedd9f]312
[50abab9]313creation-goroutine$(EXEEXT):
[528ccc8]314        $(BENCH_V_GOC)go build -o a.out $(srcdir)/creation/goroutine.go
[50abab9]315
316creation-java_thread$(EXEEXT):
[528ccc8]317        $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/creation/JavaThread.java
[50abab9]318        @echo "#!/bin/sh" > a.out
[5e49e47]319        @echo "java JavaThread" >> a.out
[50abab9]320        @chmod a+x a.out
321
[034165a]322## =========================================================================================================
323
[3edc2df]324compile$(EXEEXT) :\
[a5b7905]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
[3edc2df]333
334
[524ed86]335testdir = $(top_srcdir)/tests
[d3db83c]336
[3edc2df]337compile-array$(EXEEXT):
[528ccc8]338        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/array.cfa
[3edc2df]339
340compile-attributes$(EXEEXT):
[528ccc8]341        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/attributes.cfa
[3edc2df]342
343compile-empty$(EXEEXT):
[528ccc8]344        @$(CFACOMPILE) -fsyntax-only -w $(srcdir)/compile/empty.cfa
[3edc2df]345
346compile-expression$(EXEEXT):
[528ccc8]347        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/expression.cfa
[3edc2df]348
349compile-io$(EXEEXT):
[528ccc8]350        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/io1.cfa
[3edc2df]351
352compile-monitor$(EXEEXT):
[528ccc8]353        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/monitor.cfa
[3edc2df]354
355compile-operators$(EXEEXT):
[528ccc8]356        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/operators.cfa
[3edc2df]357
358compile-thread$(EXEEXT):
[528ccc8]359        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/thread.cfa
[3edc2df]360
361compile-typeof$(EXEEXT):
[528ccc8]362        @$(CFACOMPILE) -fsyntax-only -w $(testdir)/typeof.cfa
[3edc2df]363
Note: See TracBrowser for help on using the repository browser.