source: src/benchmark/Makefile.am @ b834e98

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since b834e98 was 3eb4541, checked in by Thierry Delisle <tdelisle@…>, 7 years ago

Added benchmark for pthread condition variables

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