source: src/benchmark/Makefile.am @ 3edc2df

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

Added benchmark for compilation time

  • Property mode set to 100644
File size: 8.3 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
25
26.NOTPARALLEL:
27
28noinst_PROGRAMS =
29
30all : ctxswitch$(EXEEXT) mutex$(EXEEXT) signal$(EXEEXT) waitfor$(EXEEXT) creation$(EXEEXT)
31
32bench$(EXEEXT) :
33        @for ccflags in "-debug" "-nodebug"; do \
34                echo ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -lrt bench.c;\
35                ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt bench.c;\
36                ./a.out ; \
37        done ; \
38        rm -f ./a.out ;
39
40csv-data$(EXEEXT):
41        @${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -quiet -DN=50000000 csv-data.c
42        @./a.out
43        @rm -f ./a.out
44
45## =========================================================================================================
46ctxswitch$(EXEEXT): \
47        ctxswitch-pthread.run           \
48        ctxswitch-cfa_coroutine.run     \
49        ctxswitch-cfa_thread.run        \
50        ctxswitch-upp_coroutine.run     \
51        ctxswitch-upp_thread.run
52
53ctxswitch-cfa_coroutine$(EXEEXT):
54        ${CC}        ctxswitch/cfa_cor.c   -DBENCH_N=50000000  -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
55
56ctxswitch-cfa_thread$(EXEEXT):
57        ${CC}        ctxswitch/cfa_thrd.c  -DBENCH_N=50000000  -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
58
59ctxswitch-upp_coroutine$(EXEEXT):
60        u++          ctxswitch/upp_cor.cc  -DBENCH_N=50000000  -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
61
62ctxswitch-upp_thread$(EXEEXT):
63        u++          ctxswitch/upp_thrd.cc -DBENCH_N=50000000  -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
64
65ctxswitch-pthread$(EXEEXT):
66        @BACKEND_CC@ ctxswitch/pthreads.c  -DBENCH_N=50000000  -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
67
68## =========================================================================================================
69mutex$(EXEEXT) :\
70        mutex-function.run      \
71        mutex-pthread_lock.run  \
72        mutex-upp.run           \
73        mutex-cfa1.run          \
74        mutex-cfa2.run          \
75        mutex-cfa4.run
76
77mutex-function$(EXEEXT):
78        @BACKEND_CC@ mutex/function.c    -DBENCH_N=500000000   -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
79
80mutex-pthread_lock$(EXEEXT):
81        @BACKEND_CC@ mutex/pthreads.c    -DBENCH_N=50000000    -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
82
83mutex-upp$(EXEEXT):
84        u++          mutex/upp.cc        -DBENCH_N=50000000    -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
85
86mutex-cfa1$(EXEEXT):
87        ${CC}        mutex/cfa1.c        -DBENCH_N=5000000     -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
88
89mutex-cfa2$(EXEEXT):
90        ${CC}        mutex/cfa2.c        -DBENCH_N=5000000     -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
91
92mutex-cfa4$(EXEEXT):
93        ${CC}        mutex/cfa4.c        -DBENCH_N=5000000     -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
94
95## =========================================================================================================
96signal$(EXEEXT) :\
97        signal-upp.run          \
98        signal-cfa1.run         \
99        signal-cfa2.run         \
100        signal-cfa4.run
101
102signal-upp$(EXEEXT):
103        u++          schedint/upp.cc     -DBENCH_N=5000000     -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
104
105signal-cfa1$(EXEEXT):
106        ${CC}        schedint/cfa1.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
107
108signal-cfa2$(EXEEXT):
109        ${CC}        schedint/cfa2.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
110
111signal-cfa4$(EXEEXT):
112        ${CC}        schedint/cfa4.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
113
114## =========================================================================================================
115waitfor$(EXEEXT) :\
116        waitfor-upp.run         \
117        waitfor-cfa1.run                \
118        waitfor-cfa2.run                \
119        waitfor-cfa4.run
120
121waitfor-upp$(EXEEXT):
122        u++          schedext/upp.cc     -DBENCH_N=5000000     -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
123
124waitfor-cfa1$(EXEEXT):
125        ${CC}        schedext/cfa1.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
126
127waitfor-cfa2$(EXEEXT):
128        ${CC}        schedext/cfa2.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
129
130waitfor-cfa4$(EXEEXT):
131        ${CC}        schedext/cfa4.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
132
133## =========================================================================================================
134creation$(EXEEXT) :\
135        creation-pthread.run                    \
136        creation-cfa_coroutine.run              \
137        creation-cfa_coroutine_eager.run        \
138        creation-cfa_thread.run                 \
139        creation-upp_coroutine.run              \
140        creation-upp_thread.run
141
142creation-cfa_coroutine$(EXEEXT):
143        ${CC}        creation/cfa_cor.c   -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
144
145creation-cfa_coroutine_eager$(EXEEXT):
146        ${CC}        creation/cfa_cor.c   -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -DEAGER
147
148creation-cfa_thread$(EXEEXT):
149        ${CC}        creation/cfa_thrd.c  -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
150
151creation-upp_coroutine$(EXEEXT):
152        u++          creation/upp_cor.cc  -DBENCH_N=50000000   -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
153
154creation-upp_thread$(EXEEXT):
155        u++          creation/upp_thrd.cc -DBENCH_N=50000000   -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
156
157creation-pthread$(EXEEXT):
158        @BACKEND_CC@ creation/pthreads.c  -DBENCH_N=250000     -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
159
160## =========================================================================================================
161
162compile$(EXEEXT) :\
163        compile-array$(EXEEXT)          \
164        compile-attributes$(EXEEXT)     \
165        compile-empty$(EXEEXT)          \
166        compile-expression$(EXEEXT)     \
167        compile-io$(EXEEXT)             \
168        compile-monitor$(EXEEXT)        \
169        compile-operators$(EXEEXT)      \
170        compile-thread$(EXEEXT)         \
171        compile-typeof$(EXEEXT)
172
173
174compile-array$(EXEEXT):
175        @printf '%20s\t' $(subst compile-,,$@)
176        @/usr/bin/time -f "%E" ${CC} -quiet -fsyntax-only -w ../tests/array.c
177
178compile-attributes$(EXEEXT):
179        @printf '%20s\t' $(subst compile-,,$@)
180        @/usr/bin/time -f "%E" ${CC} -quiet -fsyntax-only -w ../tests/attributes.c
181
182compile-empty$(EXEEXT):
183        @printf '%20s\t' $(subst compile-,,$@)
184        @/usr/bin/time -f "%E" ${CC} -quiet -fsyntax-only -w compile/empty.c
185
186compile-expression$(EXEEXT):
187        @printf '%20s\t' $(subst compile-,,$@)
188        @/usr/bin/time -f "%E" ${CC} -quiet -fsyntax-only -w ../tests/expression.c
189
190compile-io$(EXEEXT):
191        @printf '%20s\t' $(subst compile-,,$@)
192        @/usr/bin/time -f "%E" ${CC} -quiet -fsyntax-only -w ../tests/io.c
193
194compile-monitor$(EXEEXT):
195        @printf '%20s\t' $(subst compile-,,$@)
196        @/usr/bin/time -f "%E" ${CC} -quiet -fsyntax-only -w ../tests/monitor.c
197
198compile-operators$(EXEEXT):
199        @printf '%20s\t' $(subst compile-,,$@)
200        @/usr/bin/time -f "%E" ${CC} -quiet -fsyntax-only -w ../tests/operators.c
201
202compile-thread$(EXEEXT):
203        @printf '%20s\t' $(subst compile-,,$@)
204        @/usr/bin/time -f "%E" ${CC} -quiet -fsyntax-only -w ../tests/thread.c
205
206compile-typeof$(EXEEXT):
207        @printf '%20s\t' $(subst compile-,,$@)
208        @/usr/bin/time -f "%E" ${CC} -quiet -fsyntax-only -w ../tests/typeof.c
209
210
211## =========================================================================================================
212
213%.run : %$(EXEEXT) ${REPEAT}
214        @rm -f .result.log
215        @echo "------------------------------------------------------"
216        @echo $<
217        @${REPEAT} ${repeats} ./a.out | tee -a .result.log
218        @${STATS} .result.log
219        @echo "------------------------------------------------------"
220        @rm -f a.out .result.log
221
222${REPEAT} :
223        @+make -C ${TOOLSDIR} repeat
Note: See TracBrowser for help on using the repository browser.