source: benchmark/Makefile.am @ 6a9d4b4

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

Merge branch 'master' into jenkins-sandbox

  • Property mode set to 100644
File size: 10.0 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
[d0c91a6]23
[7a7ab42]24
25AM_CFLAGS = -O2 -Wall -I$(srcdir) -lrt -pthread
26AM_CFAFLAGS = -quiet -in-tree -nodebug
27AM_UPPFLAGS = -quiet -nodebug -multi
28
[5e49e47]29TOOLSDIR = ${abs_top_builddir}/tools/
30REPEAT   = ${abs_top_builddir}/tools/repeat
31STATS    = ${abs_top_srcdir}/tools/stat.py
[b7170a64]32repeats  = 30
[05f4b85]33skipcompile = no
[a5b7905]34TIME_FORMAT = "%E"
[2086ab2]35PRINT_FORMAT = %20s: #Comments needed for spacing
[034165a]36
[d0c91a6]37# Dummy hack tricks
[5e49e47]38EXTRA_PROGRAMS = dummy # build but do not install
39dummy_SOURCES = dummyC.c dummyCXX.cpp
40
41dummyC.c:
42        @echo "int main() { return 0; }" > ${@}
43
44dummyCXX.cpp:
45        @echo "int main() { return 0; }" > ${@}
46
[034165a]47.NOTPARALLEL:
[ac93b228]48
[43fa66e]49## =========================================================================================================
[4cedd9f]50all : ctxswitch$(EXEEXT) mutex$(EXEEXT) signal$(EXEEXT) waitfor$(EXEEXT) creation$(EXEEXT)
51
[a5b7905]52%.run : %$(EXEEXT) ${REPEAT}
53        @rm -f .result.log
54        @echo "------------------------------------------------------"
55        @echo $<
56        @${REPEAT} ${repeats} ./a.out | tee -a .result.log
57        @${STATS} .result.log
58        @echo "------------------------------------------------------"
[88e139e]59        @rm -f a.out .result.log *.class
[ac93b228]60
[a5b7905]61%.runquiet :
[52df81c]62        @+make $(basename $@) CFLAGS="-w"
[05f4b85]63        @taskset -c 1 ./a.out
[a5b7905]64        @rm -f a.out
65
66%.make :
67        @printf "${PRINT_FORMAT}" $(basename $(subst compile-,,$@))
68        @+/usr/bin/time -f ${TIME_FORMAT} make $(basename $@) 2>&1
69
70${REPEAT} :
[5e49e47]71        @+make -C ${abs_top_builddir}/tools repeat
[a5b7905]72
73## =========================================================================================================
74
75jenkins$(EXEEXT):
76        @echo "{"
77        @echo -e '\t"githash": "'${githash}'",'
78        @echo -e '\t"arch": "'   ${arch}   '",'
[05f4b85]79@DOifskipcompile@
[91496f3]80        @echo -e '\t"compile": {'
81        @+make compile TIME_FORMAT='%e,' PRINT_FORMAT='\t\t\"%s\" :'
82        @echo -e '\t\t"dummy" : {}'
83        @echo -e '\t},'
[05f4b85]84@DOendif@
[a5b7905]85        @echo -e '\t"ctxswitch": {'
86        @echo -en '\t\t"coroutine":'
87        @+make ctxswitch-cfa_coroutine.runquiet
88        @echo -en '\t\t,"thread":'
89        @+make ctxswitch-cfa_thread.runquiet
90        @echo -e '\t},'
91        @echo -e '\t"mutex": ['
92        @echo -en '\t\t'
93        @+make mutex-cfa1.runquiet
94        @echo -en '\t\t,'
95        @+make mutex-cfa2.runquiet
96        @echo -e '\t],'
97        @echo -e '\t"scheduling": ['
98        @echo -en '\t\t'
99        @+make signal-cfa1.runquiet
100        @echo -en '\t\t,'
101        @+make signal-cfa2.runquiet
102        @echo -en '\t\t,'
103        @+make waitfor-cfa1.runquiet
104        @echo -en '\t\t,'
105        @+make waitfor-cfa2.runquiet
106        @echo -e '\n\t],'
107        @echo -e '\t"epoch": ' $(shell date +%s)
108        @echo "}"
[ac93b228]109
[d885a58]110## =========================================================================================================
111loop$(EXEEXT):
[43fa66e]112        $(AM_V_CC)$(COMPILE) -DBENCH_N=5000000000 $(srcdir)/loop.c
[d885a58]113
114function$(EXEEXT):
[43fa66e]115        $(AM_V_CC)$(COMPILE) -DBENCH_N=5000000000 $(srcdir)/function.c
[d885a58]116
117fetch_add$(EXEEXT):
[43fa66e]118        $(AM_V_CC)$(COMPILE) -DBENCH_N=500000000  $(srcdir)/fetch_add.c
[d885a58]119
[034165a]120## =========================================================================================================
[41cca44]121CTXSWITCH_DEPEND  =                 \
[d885a58]122        loop.run                                \
123        function.run                    \
124        fetch_add.run                   \
[b7170a64]125        ctxswitch-pthread.run           \
126        ctxswitch-cfa_coroutine.run     \
127        ctxswitch-cfa_thread.run        \
[6810fcb]128        ctxswitch-cfa_thread2.run       \
[b7170a64]129        ctxswitch-upp_coroutine.run     \
[50abab9]130        ctxswitch-upp_thread.run        \
131        ctxswitch-goroutine.run         \
132        ctxswitch-java_thread.run
[034165a]133
[41cca44]134if WITH_LIBFIBRE
135CTXSWITCH_DEPEND  +=           \
136        ctxswitch-kos_fibre.run  \
137        ctxswitch-kos_fibre2.run
138
139
140ctxswitch-kos_fibre$(EXEEXT):
[43fa66e]141        $(AM_V_CXX)$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre.cpp  -I$(LIBFIBRE_DIR) -lfibre
[41cca44]142
143ctxswitch-kos_fibre2$(EXEEXT):
[43fa66e]144        $(AM_V_CXX)$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre2.cpp -I$(LIBFIBRE_DIR) -lfibre
[41cca44]145endif
146
147ctxswitch$(EXEEXT): $(CTXSWITCH_DEPEND)
148
[6810fcb]149ctxswitch-pthread$(EXEEXT):
[43fa66e]150        $(AM_V_CC)$(COMPILE)    -DBENCH_N=50000000 $(srcdir)/ctxswitch/pthreads.c
[6810fcb]151
[034165a]152ctxswitch-cfa_coroutine$(EXEEXT):
[d0c91a6]153        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_cor.cfa
[034165a]154
155ctxswitch-cfa_thread$(EXEEXT):
[d0c91a6]156        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd.cfa
[6810fcb]157
158ctxswitch-cfa_thread2$(EXEEXT):
[d0c91a6]159        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd2.cfa
[034165a]160
161ctxswitch-upp_coroutine$(EXEEXT):
[43fa66e]162        $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_cor.cc
[034165a]163
164ctxswitch-upp_thread$(EXEEXT):
[43fa66e]165        $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_thrd.cc
[ac93b228]166
[50abab9]167ctxswitch-goroutine$(EXEEXT):
[43fa66e]168        $(AM_V_GOC)go build -o a.out $(srcdir)/ctxswitch/goroutine.go
[50abab9]169
170ctxswitch-java_thread$(EXEEXT):
[88e139e]171        $(AM_V_JAVAC)javac -d $(builddir) $(srcdir)/ctxswitch/JavaThread.java
[50abab9]172        @echo "#!/bin/sh" > a.out
[5e49e47]173        @echo "java JavaThread" >> a.out
[50abab9]174        @chmod a+x a.out
175
[f54a0ab]176## =========================================================================================================
177mutex$(EXEEXT) :\
[d885a58]178        loop.run                        \
179        function.run            \
180        fetch_add.run           \
[f54a0ab]181        mutex-pthread_lock.run  \
182        mutex-upp.run           \
183        mutex-cfa1.run          \
184        mutex-cfa2.run          \
[6aa537a4]185        mutex-cfa4.run          \
186        mutex-java_thread.run
[f54a0ab]187
188mutex-pthread_lock$(EXEEXT):
[43fa66e]189        $(AM_V_CC)$(COMPILE)    -DBENCH_N=50000000 $(srcdir)/mutex/pthreads.c
[f54a0ab]190
191mutex-upp$(EXEEXT):
[43fa66e]192        $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/mutex/upp.cc
[f54a0ab]193
194mutex-cfa1$(EXEEXT):
[d0c91a6]195        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000  $(srcdir)/mutex/cfa1.cfa
[f54a0ab]196
197mutex-cfa2$(EXEEXT):
[d0c91a6]198        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000  $(srcdir)/mutex/cfa2.cfa
[f54a0ab]199
200mutex-cfa4$(EXEEXT):
[d0c91a6]201        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=5000000  $(srcdir)/mutex/cfa4.cfa
[034165a]202
[6aa537a4]203mutex-java_thread$(EXEEXT):
[88e139e]204        $(AM_V_JAVAC)javac -d $(builddir) $(srcdir)/mutex/JavaThread.java
[6aa537a4]205        @echo "#!/bin/sh" > a.out
[5e49e47]206        @echo "java JavaThread" >> a.out
[6aa537a4]207        @chmod a+x a.out
208
[9f0b975]209## =========================================================================================================
210signal$(EXEEXT) :\
[3eb4541]211        signal-pthread_cond.run \
[9f0b975]212        signal-upp.run          \
213        signal-cfa1.run         \
214        signal-cfa2.run         \
[56de6b39]215        signal-cfa4.run         \
216        signal-java_thread.run
[9f0b975]217
[3eb4541]218signal-pthread_cond$(EXEEXT):
[43fa66e]219        $(AM_V_CC)$(COMPILE)    -DBENCH_N=500000  $(srcdir)/schedint/pthreads.c
[3eb4541]220
[9f0b975]221signal-upp$(EXEEXT):
[43fa66e]222        $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedint/upp.cc
[9f0b975]223
224signal-cfa1$(EXEEXT):
[d0c91a6]225        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedint/cfa1.cfa
[9f0b975]226
227signal-cfa2$(EXEEXT):
[d0c91a6]228        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedint/cfa2.cfa
[9f0b975]229
230signal-cfa4$(EXEEXT):
[d0c91a6]231        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedint/cfa4.cfa
[9f0b975]232
[6aa537a4]233signal-java_thread$(EXEEXT):
[88e139e]234        $(AM_V_JAVAC)javac -d $(builddir) $(srcdir)/schedint/JavaThread.java
[6aa537a4]235        @echo "#!/bin/sh" > a.out
[5e49e47]236        @echo "java JavaThread" >> a.out
[6aa537a4]237        @chmod a+x a.out
238
239
[9f0b975]240## =========================================================================================================
241waitfor$(EXEEXT) :\
242        waitfor-upp.run         \
243        waitfor-cfa1.run                \
244        waitfor-cfa2.run                \
245        waitfor-cfa4.run
246
247waitfor-upp$(EXEEXT):
[43fa66e]248        $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedext/upp.cc
[9f0b975]249
250waitfor-cfa1$(EXEEXT):
[d0c91a6]251        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedext/cfa1.cfa
[9f0b975]252
253waitfor-cfa2$(EXEEXT):
[d0c91a6]254        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedext/cfa2.cfa
[9f0b975]255
256waitfor-cfa4$(EXEEXT):
[d0c91a6]257        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedext/cfa4.cfa
[9f0b975]258
[4cedd9f]259## =========================================================================================================
260creation$(EXEEXT) :\
[3351cc0]261        creation-pthread.run                    \
262        creation-cfa_coroutine.run              \
263        creation-cfa_coroutine_eager.run        \
264        creation-cfa_thread.run                 \
265        creation-upp_coroutine.run              \
[50abab9]266        creation-upp_thread.run                 \
267        creation-goroutine.run                  \
268        creation-java_thread.run
[4cedd9f]269
270creation-cfa_coroutine$(EXEEXT):
[d0c91a6]271        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.cfa
[4cedd9f]272
[3351cc0]273creation-cfa_coroutine_eager$(EXEEXT):
[d0c91a6]274        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.cfa  -DEAGER
[3351cc0]275
[4cedd9f]276creation-cfa_thread$(EXEEXT):
[d0c91a6]277        $(AM_V_CFA)$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_thrd.cfa
[4cedd9f]278
279creation-upp_coroutine$(EXEEXT):
[43fa66e]280        $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_cor.cc
[4cedd9f]281
282creation-upp_thread$(EXEEXT):
[43fa66e]283        $(AM_V_UPP)$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_thrd.cc
[4cedd9f]284
285creation-pthread$(EXEEXT):
[43fa66e]286        $(AM_V_CC)$(COMPILE)    -DBENCH_N=250000   $(srcdir)/creation/pthreads.c
[4cedd9f]287
[50abab9]288creation-goroutine$(EXEEXT):
[43fa66e]289        $(AM_V_GOC)go build -o a.out $(srcdir)/creation/goroutine.go
[50abab9]290
291creation-java_thread$(EXEEXT):
[88e139e]292        $(AM_V_JAVAC)javac -d $(builddir) $(srcdir)/creation/JavaThread.java
[50abab9]293        @echo "#!/bin/sh" > a.out
[5e49e47]294        @echo "java JavaThread" >> a.out
[50abab9]295        @chmod a+x a.out
296
[034165a]297## =========================================================================================================
298
[3edc2df]299compile$(EXEEXT) :\
[a5b7905]300        compile-array.make      \
301        compile-attributes.make \
302        compile-empty.make      \
303        compile-expression.make \
304        compile-io.make         \
305        compile-monitor.make    \
306        compile-operators.make  \
307        compile-typeof.make
[3edc2df]308
309
[524ed86]310testdir = $(top_srcdir)/tests
[d3db83c]311
[3edc2df]312compile-array$(EXEEXT):
[d0c91a6]313        $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/array.cfa
[3edc2df]314
315compile-attributes$(EXEEXT):
[515a037]316        $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/attributes.cfa
[3edc2df]317
318compile-empty$(EXEEXT):
[d0c91a6]319        $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(srcdir)/compile/empty.cfa
[3edc2df]320
321compile-expression$(EXEEXT):
[d0c91a6]322        $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/expression.cfa
[3edc2df]323
324compile-io$(EXEEXT):
[d0c91a6]325        $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/io1.cfa
[3edc2df]326
327compile-monitor$(EXEEXT):
[d0c91a6]328        $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/monitor.cfa
[3edc2df]329
330compile-operators$(EXEEXT):
[d0c91a6]331        $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/operators.cfa
[3edc2df]332
333compile-thread$(EXEEXT):
[d0c91a6]334        $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/thread.cfa
[3edc2df]335
336compile-typeof$(EXEEXT):
[d0c91a6]337        $(AM_V_CFA)$(CFACOMPILE) -fsyntax-only -w $(testdir)/typeof.cfa
[3edc2df]338
Note: See TracBrowser for help on using the repository browser.