source: src/benchmark/Makefile.am @ 2086ab2

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

Fix compile benchmark for x86

  • Property mode set to 100644
File size: 8.9 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
25TIME_FORMAT = "%E"
26PRINT_FORMAT = %20s: #Comments needed for spacing
27
28.NOTPARALLEL:
29
30noinst_PROGRAMS =
31
32all : ctxswitch$(EXEEXT) mutex$(EXEEXT) signal$(EXEEXT) waitfor$(EXEEXT) creation$(EXEEXT)
33
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
42
43%.runquiet :
44        @+make $(basename $@)
45        @./a.out
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"compile": {'
62        @+make compile TIME_FORMAT='%e,' PRINT_FORMAT='\t\t\"%s\" :'
63        @echo -e '\t\t"dummy" : {}'
64        @echo -e '\t},'
65        @echo -e '\t"ctxswitch": {'
66        @echo -en '\t\t"coroutine":'
67        @+make ctxswitch-cfa_coroutine.runquiet
68        @echo -en '\t\t,"thread":'
69        @+make ctxswitch-cfa_thread.runquiet
70        @echo -e '\t},'
71        @echo -e '\t"mutex": ['
72        @echo -en '\t\t'
73        @+make mutex-cfa1.runquiet
74        @echo -en '\t\t,'
75        @+make mutex-cfa2.runquiet
76        @echo -e '\t],'
77        @echo -e '\t"scheduling": ['
78        @echo -en '\t\t'
79        @+make signal-cfa1.runquiet
80        @echo -en '\t\t,'
81        @+make signal-cfa2.runquiet
82        @echo -en '\t\t,'
83        @+make waitfor-cfa1.runquiet
84        @echo -en '\t\t,'
85        @+make waitfor-cfa2.runquiet
86        @echo -e '\n\t],'
87        @echo -e '\t"epoch": ' $(shell date +%s)
88        @echo "}"
89
90## =========================================================================================================
91ctxswitch$(EXEEXT): \
92        ctxswitch-pthread.run           \
93        ctxswitch-cfa_coroutine.run     \
94        ctxswitch-cfa_thread.run        \
95        ctxswitch-upp_coroutine.run     \
96        ctxswitch-upp_thread.run
97
98ctxswitch-cfa_coroutine$(EXEEXT):
99        @${CC}        ctxswitch/cfa_cor.c   -DBENCH_N=50000000  -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
100
101ctxswitch-cfa_thread$(EXEEXT):
102        @${CC}        ctxswitch/cfa_thrd.c  -DBENCH_N=50000000  -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
103
104ctxswitch-upp_coroutine$(EXEEXT):
105        @u++          ctxswitch/upp_cor.cc  -DBENCH_N=50000000  -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
106
107ctxswitch-upp_thread$(EXEEXT):
108        @u++          ctxswitch/upp_thrd.cc -DBENCH_N=50000000  -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
109
110ctxswitch-pthread$(EXEEXT):
111        @@BACKEND_CC@ ctxswitch/pthreads.c  -DBENCH_N=50000000  -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
112
113## =========================================================================================================
114mutex$(EXEEXT) :\
115        mutex-function.run      \
116        mutex-pthread_lock.run  \
117        mutex-upp.run           \
118        mutex-cfa1.run          \
119        mutex-cfa2.run          \
120        mutex-cfa4.run
121
122mutex-function$(EXEEXT):
123        @@BACKEND_CC@ mutex/function.c    -DBENCH_N=500000000   -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
124
125mutex-pthread_lock$(EXEEXT):
126        @@BACKEND_CC@ mutex/pthreads.c    -DBENCH_N=50000000    -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
127
128mutex-upp$(EXEEXT):
129        @u++          mutex/upp.cc        -DBENCH_N=50000000    -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
130
131mutex-cfa1$(EXEEXT):
132        @${CC}        mutex/cfa1.c        -DBENCH_N=5000000     -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
133
134mutex-cfa2$(EXEEXT):
135        @${CC}        mutex/cfa2.c        -DBENCH_N=5000000     -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
136
137mutex-cfa4$(EXEEXT):
138        @${CC}        mutex/cfa4.c        -DBENCH_N=5000000     -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
139
140## =========================================================================================================
141signal$(EXEEXT) :\
142        signal-upp.run          \
143        signal-cfa1.run         \
144        signal-cfa2.run         \
145        signal-cfa4.run
146
147signal-upp$(EXEEXT):
148        @u++          schedint/upp.cc     -DBENCH_N=5000000     -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
149
150signal-cfa1$(EXEEXT):
151        @${CC}        schedint/cfa1.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
152
153signal-cfa2$(EXEEXT):
154        @${CC}        schedint/cfa2.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
155
156signal-cfa4$(EXEEXT):
157        @${CC}        schedint/cfa4.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
158
159## =========================================================================================================
160waitfor$(EXEEXT) :\
161        waitfor-upp.run         \
162        waitfor-cfa1.run                \
163        waitfor-cfa2.run                \
164        waitfor-cfa4.run
165
166waitfor-upp$(EXEEXT):
167        @u++          schedext/upp.cc     -DBENCH_N=5000000     -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
168
169waitfor-cfa1$(EXEEXT):
170        @${CC}        schedext/cfa1.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
171
172waitfor-cfa2$(EXEEXT):
173        @${CC}        schedext/cfa2.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
174
175waitfor-cfa4$(EXEEXT):
176        @${CC}        schedext/cfa4.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
177
178## =========================================================================================================
179creation$(EXEEXT) :\
180        creation-pthread.run                    \
181        creation-cfa_coroutine.run              \
182        creation-cfa_coroutine_eager.run        \
183        creation-cfa_thread.run                 \
184        creation-upp_coroutine.run              \
185        creation-upp_thread.run
186
187creation-cfa_coroutine$(EXEEXT):
188        @${CC}        creation/cfa_cor.c   -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
189
190creation-cfa_coroutine_eager$(EXEEXT):
191        @${CC}        creation/cfa_cor.c   -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -DEAGER
192
193creation-cfa_thread$(EXEEXT):
194        @${CC}        creation/cfa_thrd.c  -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
195
196creation-upp_coroutine$(EXEEXT):
197        @u++          creation/upp_cor.cc  -DBENCH_N=50000000   -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
198
199creation-upp_thread$(EXEEXT):
200        @u++          creation/upp_thrd.cc -DBENCH_N=50000000   -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
201
202creation-pthread$(EXEEXT):
203        @@BACKEND_CC@ creation/pthreads.c  -DBENCH_N=250000     -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
204
205## =========================================================================================================
206
207compile$(EXEEXT) :\
208        compile-array.make      \
209        compile-attributes.make \
210        compile-empty.make      \
211        compile-expression.make \
212        compile-io.make         \
213        compile-monitor.make    \
214        compile-operators.make  \
215        compile-typeof.make
216
217
218compile-array$(EXEEXT):
219        @${CC} -nodebug -quiet -fsyntax-only -w ../tests/array.c                @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
220
221compile-attributes$(EXEEXT):
222        @${CC} -nodebug -quiet -fsyntax-only -w ../tests/attributes.c   @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
223
224compile-empty$(EXEEXT):
225        @${CC} -nodebug -quiet -fsyntax-only -w compile/empty.c         @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
226
227compile-expression$(EXEEXT):
228        @${CC} -nodebug -quiet -fsyntax-only -w ../tests/expression.c   @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
229
230compile-io$(EXEEXT):
231        @${CC} -nodebug -quiet -fsyntax-only -w ../tests/io.c                   @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
232
233compile-monitor$(EXEEXT):
234        @${CC} -nodebug -quiet -fsyntax-only -w ../tests/monitor.c              @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
235
236compile-operators$(EXEEXT):
237        @${CC} -nodebug -quiet -fsyntax-only -w ../tests/operators.c    @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
238
239compile-thread$(EXEEXT):
240        @${CC} -nodebug -quiet -fsyntax-only -w ../tests/thread.c               @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
241
242compile-typeof$(EXEEXT):
243        @${CC} -nodebug -quiet -fsyntax-only -w ../tests/typeof.c               @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
244
Note: See TracBrowser for help on using the repository browser.