source: benchmark/Makefile.am @ 56b53b2

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resnenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexerpthread-emulationqualifiedEnum
Last change on this file since 56b53b2 was 0c1b566, checked in by Thierry Delisle <tdelisle@…>, 6 years ago

Fixed missing foreign options and tentative fix for TOP directories defines

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