source: benchmark/Makefile.am @ 2fd9f24

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

Added check for libfibre for use in benchmark

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