source: src/benchmark/Makefile.am @ 174845e

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumwith_gc
Last change on this file since 174845e was d885a58, checked in by Thierry Delisle <tdelisle@…>, 6 years ago

Added 3 control benchmarks to ctx-switch

  • Property mode set to 100644
File size: 11.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
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
[df47e2f]20CC = @CFA_BINDIR@/@CFA_NAME@
[b7170a64]21TOOLSDIR = ${abs_top_srcdir}/tools/
22REPEAT   = ${TOOLSDIR}repeat
23STATS    = ${TOOLSDIR}stat.py
24repeats  = 30
[05f4b85]25skipcompile = no
[a5b7905]26TIME_FORMAT = "%E"
[2086ab2]27PRINT_FORMAT = %20s: #Comments needed for spacing
[034165a]28
29.NOTPARALLEL:
[ac93b228]30
[b7170a64]31noinst_PROGRAMS =
[ac93b228]32
[4cedd9f]33all : ctxswitch$(EXEEXT) mutex$(EXEEXT) signal$(EXEEXT) waitfor$(EXEEXT) creation$(EXEEXT)
34
[a5b7905]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
[ac93b228]43
[a5b7905]44%.runquiet :
[52df81c]45        @+make $(basename $@) CFLAGS="-w"
[05f4b85]46        @taskset -c 1 ./a.out
[a5b7905]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}   '",'
[05f4b85]62@DOifskipcompile@
[91496f3]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},'
[05f4b85]67@DOendif@
[a5b7905]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 "}"
[ac93b228]92
[d885a58]93## =========================================================================================================
94loop$(EXEEXT):
95        @@BACKEND_CC@ loop.c      -DBENCH_N=5000000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags}
96
97function$(EXEEXT):
98        @@BACKEND_CC@ function.c  -DBENCH_N=5000000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags}
99
100fetch_add$(EXEEXT):
101        @@BACKEND_CC@ fetch_add.c -DBENCH_N=500000000  -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags}
102
[034165a]103## =========================================================================================================
104ctxswitch$(EXEEXT): \
[d885a58]105        loop.run                                \
106        function.run                    \
107        fetch_add.run                   \
[b7170a64]108        ctxswitch-pthread.run           \
109        ctxswitch-cfa_coroutine.run     \
110        ctxswitch-cfa_thread.run        \
[6810fcb]111        ctxswitch-cfa_thread2.run       \
[b7170a64]112        ctxswitch-upp_coroutine.run     \
[50abab9]113        ctxswitch-upp_thread.run        \
[6810fcb]114        -ctxswitch-kos_fibre.run        \
115        -ctxswitch-kos_fibre2.run       \
[50abab9]116        ctxswitch-goroutine.run         \
117        ctxswitch-java_thread.run
[034165a]118
[6810fcb]119ctxswitch-pthread$(EXEEXT):
120        @@BACKEND_CC@ ctxswitch/pthreads.c     -DBENCH_N=50000000  -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
121
[034165a]122ctxswitch-cfa_coroutine$(EXEEXT):
[6810fcb]123        @${CC}        ctxswitch/cfa_cor.c      -DBENCH_N=50000000  -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[034165a]124
125ctxswitch-cfa_thread$(EXEEXT):
[6810fcb]126        @${CC}        ctxswitch/cfa_thrd.c     -DBENCH_N=50000000  -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
127
128ctxswitch-cfa_thread2$(EXEEXT):
129        @${CC}        ctxswitch/cfa_thrd2.c    -DBENCH_N=50000000  -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[034165a]130
131ctxswitch-upp_coroutine$(EXEEXT):
[6810fcb]132        @u++          ctxswitch/upp_cor.cc     -DBENCH_N=50000000  -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[034165a]133
134ctxswitch-upp_thread$(EXEEXT):
[6810fcb]135        @u++          ctxswitch/upp_thrd.cc    -DBENCH_N=50000000  -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[ac93b228]136
[6810fcb]137ctxswitch-kos_fibre$(EXEEXT):
138        @${CXX}       ctxswitch/kos_fibre.cpp  -DBENCH_N=50000000  -I. -I/home/tdelisle/software/KOS/src/ -g -O2 -lfibre -lpthread -lrt
139
140ctxswitch-kos_fibre2$(EXEEXT):
141        @${CXX}       ctxswitch/kos_fibre2.cpp -DBENCH_N=50000000  -I. -I/home/tdelisle/software/KOS/src/ -g -O2 -lfibre -lpthread -lrt
[034165a]142
[50abab9]143ctxswitch-goroutine$(EXEEXT):
144        @go build -o a.out ctxswitch/goroutine.go
145
146ctxswitch-java_thread$(EXEEXT):
147        @javac ctxswitch/JavaThread.java
148        @echo "#!/bin/sh" > a.out
149        @echo "cd ctxswitch && java JavaThread" >> a.out
150        @chmod a+x a.out
151
[f54a0ab]152## =========================================================================================================
153mutex$(EXEEXT) :\
[d885a58]154        loop.run                        \
155        function.run            \
156        fetch_add.run           \
[f54a0ab]157        mutex-pthread_lock.run  \
158        mutex-upp.run           \
159        mutex-cfa1.run          \
160        mutex-cfa2.run          \
[6aa537a4]161        mutex-cfa4.run          \
162        mutex-java_thread.run
[f54a0ab]163
164mutex-pthread_lock$(EXEEXT):
[a5b7905]165        @@BACKEND_CC@ mutex/pthreads.c    -DBENCH_N=50000000    -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[f54a0ab]166
167mutex-upp$(EXEEXT):
[a5b7905]168        @u++          mutex/upp.cc        -DBENCH_N=50000000    -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[f54a0ab]169
170mutex-cfa1$(EXEEXT):
[a5b7905]171        @${CC}        mutex/cfa1.c        -DBENCH_N=5000000     -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[f54a0ab]172
173mutex-cfa2$(EXEEXT):
[a5b7905]174        @${CC}        mutex/cfa2.c        -DBENCH_N=5000000     -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[f54a0ab]175
176mutex-cfa4$(EXEEXT):
[a5b7905]177        @${CC}        mutex/cfa4.c        -DBENCH_N=5000000     -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[034165a]178
[6aa537a4]179mutex-java_thread$(EXEEXT):
180        @javac mutex/JavaThread.java
181        @echo "#!/bin/sh" > a.out
182        @echo "cd mutex && java JavaThread" >> a.out
183        @chmod a+x a.out
184
[9f0b975]185## =========================================================================================================
186signal$(EXEEXT) :\
[3eb4541]187        signal-pthread_cond.run \
[9f0b975]188        signal-upp.run          \
189        signal-cfa1.run         \
190        signal-cfa2.run         \
[56de6b39]191        signal-cfa4.run         \
192        signal-java_thread.run
[9f0b975]193
[3eb4541]194signal-pthread_cond$(EXEEXT):
195        @@BACKEND_CC@ schedint/pthreads.c -DBENCH_N=500000      -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
196
[9f0b975]197signal-upp$(EXEEXT):
[a5b7905]198        @u++          schedint/upp.cc     -DBENCH_N=5000000     -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[9f0b975]199
200signal-cfa1$(EXEEXT):
[a5b7905]201        @${CC}        schedint/cfa1.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[9f0b975]202
203signal-cfa2$(EXEEXT):
[a5b7905]204        @${CC}        schedint/cfa2.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[9f0b975]205
206signal-cfa4$(EXEEXT):
[a5b7905]207        @${CC}        schedint/cfa4.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[9f0b975]208
[6aa537a4]209signal-java_thread$(EXEEXT):
210        @javac schedint/JavaThread.java
211        @echo "#!/bin/sh" > a.out
212        @echo "cd schedint && java JavaThread" >> a.out
213        @chmod a+x a.out
214
215
[9f0b975]216## =========================================================================================================
217waitfor$(EXEEXT) :\
218        waitfor-upp.run         \
219        waitfor-cfa1.run                \
220        waitfor-cfa2.run                \
221        waitfor-cfa4.run
222
223waitfor-upp$(EXEEXT):
[a5b7905]224        @u++          schedext/upp.cc     -DBENCH_N=5000000     -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[9f0b975]225
226waitfor-cfa1$(EXEEXT):
[d2d50d7]227        @${CC}        schedext/cfa1.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[9f0b975]228
229waitfor-cfa2$(EXEEXT):
[a5b7905]230        @${CC}        schedext/cfa2.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[9f0b975]231
232waitfor-cfa4$(EXEEXT):
[a5b7905]233        @${CC}        schedext/cfa4.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[9f0b975]234
[4cedd9f]235## =========================================================================================================
236creation$(EXEEXT) :\
[3351cc0]237        creation-pthread.run                    \
238        creation-cfa_coroutine.run              \
239        creation-cfa_coroutine_eager.run        \
240        creation-cfa_thread.run                 \
241        creation-upp_coroutine.run              \
[50abab9]242        creation-upp_thread.run                 \
243        creation-goroutine.run                  \
244        creation-java_thread.run
[4cedd9f]245
246creation-cfa_coroutine$(EXEEXT):
[a5b7905]247        @${CC}        creation/cfa_cor.c   -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[4cedd9f]248
[3351cc0]249creation-cfa_coroutine_eager$(EXEEXT):
[a5b7905]250        @${CC}        creation/cfa_cor.c   -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -DEAGER
[3351cc0]251
[4cedd9f]252creation-cfa_thread$(EXEEXT):
[a5b7905]253        @${CC}        creation/cfa_thrd.c  -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[4cedd9f]254
255creation-upp_coroutine$(EXEEXT):
[a5b7905]256        @u++          creation/upp_cor.cc  -DBENCH_N=50000000   -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[4cedd9f]257
258creation-upp_thread$(EXEEXT):
[a5b7905]259        @u++          creation/upp_thrd.cc -DBENCH_N=50000000   -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[4cedd9f]260
261creation-pthread$(EXEEXT):
[a5b7905]262        @@BACKEND_CC@ creation/pthreads.c  -DBENCH_N=250000     -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[4cedd9f]263
[50abab9]264creation-goroutine$(EXEEXT):
265        @go build -o a.out creation/goroutine.go
266
267creation-java_thread$(EXEEXT):
268        @javac creation/JavaThread.java
269        @echo "#!/bin/sh" > a.out
270        @echo "cd creation && java JavaThread" >> a.out
271        @chmod a+x a.out
272
[034165a]273## =========================================================================================================
274
[3edc2df]275compile$(EXEEXT) :\
[a5b7905]276        compile-array.make      \
277        compile-attributes.make \
278        compile-empty.make      \
279        compile-expression.make \
280        compile-io.make         \
281        compile-monitor.make    \
282        compile-operators.make  \
283        compile-typeof.make
[3edc2df]284
285
286compile-array$(EXEEXT):
[d01811a]287        @${CC} -quiet -fsyntax-only -w ../tests/array.c                         @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[3edc2df]288
289compile-attributes$(EXEEXT):
[d01811a]290        @${CC} -quiet -fsyntax-only -w ../tests/attributes.c                    @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[3edc2df]291
292compile-empty$(EXEEXT):
[d01811a]293        @${CC} -quiet -fsyntax-only -w compile/empty.c                          @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[3edc2df]294
295compile-expression$(EXEEXT):
[d01811a]296        @${CC} -quiet -fsyntax-only -w ../tests/expression.c                    @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[3edc2df]297
298compile-io$(EXEEXT):
[1134b80]299        @${CC} -quiet -fsyntax-only -w ../tests/io1.c                           @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[3edc2df]300
301compile-monitor$(EXEEXT):
[1134b80]302        @${CC} -quiet -fsyntax-only -w ../tests/concurrent/monitor.c    @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[3edc2df]303
304compile-operators$(EXEEXT):
[d01811a]305        @${CC} -quiet -fsyntax-only -w ../tests/operators.c                     @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[3edc2df]306
307compile-thread$(EXEEXT):
[d01811a]308        @${CC} -quiet -fsyntax-only -w ../tests/concurrent/thread.c             @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[3edc2df]309
310compile-typeof$(EXEEXT):
[1134b80]311        @${CC} -quiet -fsyntax-only -w ../tests/typeof.c                        @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
[3edc2df]312
Note: See TracBrowser for help on using the repository browser.