source: src/benchmark/Makefile.am @ 6810fcb

aaron-thesisarm-ehcleanup-dtorsdeferred_resndemanglerjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerwith_gc
Last change on this file since 6810fcb was 6810fcb, checked in by Thierry Delisle <tdelisle@…>, 4 years ago

Added ctxswitch benchmarks for libfibre

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