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