Add code for GC_CACHE_ADAPT version. Now the 61-1gc version works for RayTracer...
[IRC.git] / Robust / src / buildscript
1 #!/bin/bash
2
3 printhelp() {
4 echo STM Options
5 echo -singleTM single machine committing transactions
6 echo -stmdebug STM debug
7 echo "-stmstats prints single machine commit (stm) statistics for the benchmark"
8 echo -fastmemcpy use fast memcpy
9 echo -sandbox sandbox transactions
10 echo -dcopts conflict optimizations for transactional memory
11 echo -transstats generates transaction stats on commits and aborts
12 echo -inlineatomic depth inline methods inside of transactions to specified depth
13 echo "-stmarray partial array treatment"
14 echo "-dualview dual view of arrays"
15 echo "-hybrid use fission only when it looks like a good choice"
16 echo "-numa numa aware"
17 echo "-eventmonitor turn on transaction event trace recording"
18 echo
19 echo OOOJava options
20 echo -coreprof turn on profiling API
21 echo -coreprof-checkoverflow ONLY use for debugging event overflow
22 echo "-ooojava <numberofcores> <maxseseage>"
23 echo -ooodebug general OOOJava debugging messages
24 echo -rcr turn on runtime conflict resolver
25 echo
26 echo Disjoint Reachability Analysis options
27 echo -disjoint enable analysis
28 echo -disjoint-k set k-limit for heap nodes per allocation site
29 echo "-disjoint-write-dots <all/final> write reach graphs for all method sols. or only final sols."
30 echo -disjoint-write-initial-contexts write reach graphs for callee initial contexts from all call sites
31 echo -disjoint-write-ihms write reach graphs for each call site\'s Initial Heap Model
32 echo "-disjoint-alias-file <filename> <normal/tabbed> write sharing for normal human reading or LaTeX tabbed"
33 echo "-disjoint-debug-callsite <callee> <caller> <visit to start> <num caps> <T/F stop after>"
34 echo "  To debug call site, give callee caller symbols (ie foo) the analysis visit to start capturing, num captures to take, and whether to halt analysis after capturing"
35 echo "-disjoint-debug-snap-method <method> <visit to start> <num caps> <T/F stop after>"
36 echo "  To take snapshots at statements, give method symbol, the analysis visit to start capturing, num captures to take, and whether to halt analsyis after capturing"
37 echo "-disjoint-dvisit-stack use stack strat to visit descriptors (tasks or methods)"
38 echo -disjoint-dvisit-stack-callees-on-top alternate stack strat
39 echo -disjoint-dvisit-pqueue use prio. q strat to visit descriptors
40 echo -disjoint-desire-determinism set above interproc for determinism
41 echo -disjoint-debug-scheduling debug when methods are scheduled for analysis
42 echo 
43 echo "-mlp <num cores> <max sese age> build mlp code"
44 echo -mlpdebug if mlp, report progress and interim results
45 echo
46 echo DSM options
47 echo -dsm distributed shared memory
48 echo -abortreaders abort readers immediately
49 echo -trueprob double - probabiltiy of true branch
50 echo -dsmcaching -enable caching in dsm runtime
51 echo
52 echo BAMBOO Multicore options
53 echo -scheduling do task scheduling
54 echo -multicore generate multi-core version binary
55 echo "-numcore set the number of cores (should be used together with -multicore), defaultly set as 1"
56 echo "-cacheflush enable cache flush in raw version binary (should be used togethere with -raw)"
57 echo "-interrupt generate raw version binary with interruption (should be used togethere with -raw)"
58 echo "-rawpath print out execute path information for raw version (should be used together with -raw)"
59 echo "-useprofile use profiling data for scheduling (should be used together with -raw)"
60 echo -printscheduling print out scheduling graphs
61 echo -printschedulesim print out scheduling simulator result graphs
62 echo "-tilera_bme generate tilera version binary for Bare Mental Environment (should be used together with -multicore"
63 echo "-tilera_zlinux generate tilera version binary for Zero-Overhead Linux with multi-process mode (should be used together with -multicore"
64 echo "-tileraconfig config tilera simulator/pci as nxm (should be used together with -tilera)"
65 echo "-raw generate raw version binary (should be used together with -multicore)"
66 echo "-rawconfig config raw simulator as 4xn (should be used together with -raw)"
67 echo -multicoregc generate multi-core binary with garbage collection
68 echo "-numcore4gc set the number of cores for gc (should be used together with -multicoregc), defaultly set as 0"
69 echo "-gcmem_local set the gc shared memory allocation strategy as local (should be used together with -multicoregc)"
70 echo "-gcmem_fixed set the gc shared memory allocation strategy as fixed (should be used together with -multicoregc)"
71 echo "-gcmem_mixed set the gc shared memory allocation strategy as mixed (should be used together with -multicoregc)"
72 echo "-gcmem_global set the gc shared memory allocation strategy as global (should be used together with -multicoregc)"
73 echo "-gccache_local set the gc shared memory cache strategy as local (should be used together with -multicoregc)"
74 echo "-gccache_ran set the gc shared memory cache strategy as random (should be used together with -multicoregc)"
75 echo "-gccontroller_near set the gc shared memory to use the nearest controller for each core (should be used together with -multicoregc)"
76 echo "-gccontroller_remote set the gc shared memory to use a remote controller for each core (should be used together with -multicoregc)"
77 echo "-gcsmallpagesize(2) set the gc shared memory to use small page size (should be used together with -multicoregc)"
78 echo "-gclargepagesize set the gc shared memory to use large page size (should be used together with -multicoregc)"
79 echo "-gclargesharedheap(2) set the gc shared memory as large (should be used together with -multicoregc)"
80 echo "-gccacheadapt setup as cacheadaptable mode (should be used together with -multicoregc)"
81 echo -gcprofile build with gcprofile options
82 echo "-tilera_memprof build the memprof version (should be used together with -tilera_xx) "
83 echo -accurateprofile build with accurate profile information including pre/post task processing info
84 echo -profile_interrupt build with profile information of interrupts
85 echo "-useio use standard io to output profiling data (should be used together with -raw and -profile), it only works with single core version"
86 echo
87 echo Other options
88 echo -abcclose turnoff array boundary checks
89 echo -builddir setup different build directory
90 echo -robustroot set up the ROBUSTROOT to directory other than default one
91 echo -readset turn on readset
92 echo -mac distributed shared memory mac support
93 echo -check generate check code
94 echo -dmalloc link in dmalloc
95 echo -64bit compile for 64 bit machine
96 echo -32bit compile for 32 bit machine
97 echo -joptimize java compiler optimizations
98 echo -noloop turnoff loop optimizations
99 echo -recover compile task code
100 echo -fastcheck fast checkpointing for Bristlecone
101 echo -specdir directory
102 echo -printflat print out flat representation
103 echo -selfloop task - this task cannot self loop forever
104 echo "-excprefetch methoddescriptor - exclude prefetches for this method (specified as class.method)"
105 echo -taskstate do task state analysis
106 echo -tagstate do tag state analysis
107 echo -optional enable optional
108 echo -debug generate debug symbols
109 echo -prefetch do prefetch analysis
110 echo -heapsize-mb NUM  set initial heap size in MB, default is 256
111 echo -garbagestats Print garbage collection statistics
112 echo -webinterface enable web interface
113 echo -runtimedebug printout runtime debug messages
114 echo "-thread use support for multiple threads"
115 echo "-optimize call gcc with -O9 (optimize)"
116 echo "-nooptimize call gcc with -O0 (do not optimize)"
117 echo -curdir directory 
118 echo -mainclass class with main method
119 echo -o binary
120 echo -nojava do not run bristlecone compiler
121 echo -instructionfailures inject code for instructionfailures
122 echo -profile build with profile options
123 echo "-enable-assertions execute assert statements during compilation"
124 echo -justanalyze exit after compiler analyses complete
125 echo "-distributioninfo  execute to collect distribution info for simulated annealing in multi-core version"
126 echo "-disall  execute to collect whole distribution"
127 echo "-disstart specify the start number of distribution information collection"
128 echo -assembly generate assembly
129 echo -recovery compile recovery code
130 echo -dsmtask support work and task class library
131 echo -recoverystats print out recovery record 
132 echo -help help
133 }
134
135 tmpbuilddirectory="tmpbuilddirectory"
136 COREPROF=false;
137 NUMA=false;
138 SANDBOX=false;
139 ABORTREADERS=false;
140 ROBUSTROOT=~/research/Robust/src
141 DSMRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface/
142 STMRUNTIME=$ROBUSTROOT/Runtime/STM/
143 DSMRECOVERYRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface_recovery/
144 REPAIRROOT=~/research/Repair/RepairCompiler/
145 CURDIR=`pwd`
146 DSMFLAG=false
147 DSMRECOVERY=false
148 FASTMEMCPY=false
149 STMARRAY=false
150 DUALVIEW=false
151 STM=false
152 EVENTMONITOR=false
153 NOJAVA=false
154 CHECKFLAG=false
155 RECOVERFLAG=false
156 MLP_ON=false
157 RCR=false
158 MLPDEBUG=false
159 MULTICOREFLAG=false
160 RAWFLAG=false
161 TILERAFLAG=false
162 TILERABMEFLAG=false
163 TILERAZLINUXFLAG=false
164 TILERAMEMPROFFLAG=false
165 TILERACONFIG=''
166 CACHEFLUSHFLAG=false
167 RAWCONFIG=''
168 DEBUGFLAG=false
169 RAWPATHFLAG=false
170 PROFILEFLAG=false
171 GCPROFILEFLAG=false
172 GCPROFILESFLAG=false
173 ACCURATEPROFILEFLAG=false
174 PROFILEINTERRUPTFLAG=false
175 USEIOFLAG=false
176 INTERRUPTFLAG=false
177 THREADSIMULATEFLAG=false;
178 MULTICOREGCFLAG=false;
179 GCMEMLOCALFLAG=false;
180 GCMEMFIXEDFLAG=false;
181 GCMEMMIXEDFLAG=false;
182 GCMEMGLOBALFLAG=false;
183 GCCACHELOCALFLAG=false;
184 GCCACHERANFLAG=false;
185 GCCONTROLLERNEARFLAG=false;
186 GCCONTROLLERREMOTEFLAG=false;
187 GCSMALLPAGESIZEFLAG=false;
188 GCLARGEPAGESIZEFLAG=false;
189 GCLARGESHAREDHEAPFLAG=false;
190 GCSMALLPAGESIZEFLAG2=false;
191 GCLARGESHAREDHEAPFLAG2=false;
192 GCCACHEADAPTFLAG=false
193 USEDMALLOC=false
194 THREADFLAG=false
195 FASTCHECK=false
196 SPECDIR=`pwd`
197 SRCFILES=''
198 EXTRAOPTIONS=''
199 MAINFILE='a'
200 JAVAFORWARDOPTS=''
201 JAVAOPTS=''
202 OPTIONALFLAG=false
203 EXITAFTERANALYSIS=false
204 ASSEMBLY=false
205 GCCORES=''
206 TILERAN1COREFLAG=false
207 TILERA56COREFLAG=false
208
209 if [[ -z $1 ]]
210 then
211 printhelp
212 exit
213 fi
214
215 while [[ -n $1 ]]
216 do
217 if [[ $1 = '-help' ]]
218 then
219 printhelp
220 exit
221 elif [[ $1 = '-justanalyze' ]]
222 then
223 EXITAFTERANALYSIS=true
224 elif [[ $1 = '-assembly' ]]
225 then
226 ASSEMBLY=true
227 elif [[ $1 = '-abortreaders' ]]
228 then
229 ABORTREADERS=true
230 EXTRAOPTIONS="$EXTRAOPTIONS -DABORTREADERS"
231 JAVAOPTS="$JAVAOPTS -abortreaders"
232 elif [[ $1 = '-sandbox' ]]
233 then
234 SANDBOX=true
235 EXTRAOPTIONS="$EXTRAOPTIONS -DSANDBOX"
236 JAVAOPTS="$JAVAOPTS -sandbox"
237 elif [[ $1 = '-numa' ]]
238 then
239 EXTRAOPTIONS="$EXTRAOPTIONS -DAFFINITY -D_GNU_SOURCE"
240 NUMA=true
241 elif [[ $1 = '-robustroot' ]]
242 then
243 ROBUSTROOT="$2"
244 shift
245 elif [[ $1 = '-builddir' ]]
246 then
247 tmpbuilddirectory="$2"
248 shift
249 elif [[ $1 = '-nojava' ]]
250 then
251 NOJAVA=true
252 elif [[ $1 = '-eventmonitor' ]]
253 then
254 JAVAOPTS="$JAVAOPTS -eventmonitor"
255 EVENTMONITOR=true
256 EXTRAOPTIONS="$EXTRAOPTIONS -DEVENTMONITOR"
257 elif [[ $1 = '-garbagestats' ]]
258 then
259 EXTRAOPTIONS="$EXTRAOPTIONS -DGARBAGESTATS"
260 elif [[ $1 = '-64bit' ]]
261 then
262 EXTRAOPTIONS="$EXTRAOPTIONS -DBIT64 -m64"
263 elif [[ $1 = '-32bit' ]]
264 then
265 EXTRAOPTIONS="$EXTRAOPTIONS -m32"
266 elif [[ $1 = '-fastcheck' ]]
267 then
268 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTCHECK"
269 JAVAOPTS="$JAVAOPTS -fastcheck"
270 FASTCHECK=true
271 elif [[ $1 = '-o' ]]
272 then
273 MAINFILE="$2"
274 shift
275 elif [[ $1 = '-mainclass' ]]
276 then
277 JAVAOPTS="$JAVAOPTS -mainclass $2"
278 shift
279 elif [[ $1 = '-selfloop' ]]
280 then
281 JAVAOPTS="$JAVAOPTS -selfloop $2"
282 shift
283 elif [[ $1 = '-excprefetch' ]]
284 then
285 JAVAOPTS="$JAVAOPTS -excprefetch $2"
286 shift
287 elif [[ $1 = '-arraypad' ]]
288 then
289 JAVAOPTS="$JAVAOPTS -arraypad"
290 elif [[ $1 = '-dsm' ]]
291 then
292 JAVAOPTS="$JAVAOPTS -dsm"
293 DSMFLAG=true
294 elif [[ $1 = '-fastmemcpy' ]]
295 then
296 FASTMEMCPY=true
297 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTMEMCPY"
298 elif [[ $1 = '-singleTM' ]]
299 then
300 JAVAOPTS="$JAVAOPTS -singleTM"
301 EXTRAOPTIONS="$EXTRAOPTIONS -DSTM"
302 STM=true
303 elif [[ $1 = '-stmarray' ]]
304 then
305 JAVAOPTS="$JAVAOPTS -stmarray"
306 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMARRAY"
307 STMARRAY=true
308 elif [[ $1 = '-dualview' ]]
309 then
310 JAVAOPTS="$JAVAOPTS -dualview"
311 EXTRAOPTIONS="$EXTRAOPTIONS -DDUALVIEW"
312 DUALVIEW=true
313 elif [[ $1 = '-readset' ]]
314 then
315 JAVAOPTS="$JAVAOPTS -readset"
316 EXTRAOPTIONS="$EXTRAOPTIONS -DREADSET"
317 elif [[ $1 = '-stmdebug' ]]
318 then
319 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMDEBUG"
320 elif [[ $1 = '-stmstats' ]]
321 then
322 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMSTATS"
323 elif [[ $1 = '-stmlog' ]]
324 then
325 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMLOG"
326 elif [[ $1 = '-prefetch' ]]
327 then
328 JAVAOPTS="$JAVAOPTS -prefetch"
329 elif [[ $1 = '-transstats' ]]
330 then
331 EXTRAOPTIONS="$EXTRAOPTIONS -DTRANSSTATS"
332 elif [[ $1 = '-printflat' ]]
333 then
334 JAVAOPTS="$JAVAOPTS -printflat"
335 elif [[ $1 = '-trueprob' ]]
336 then
337 JAVAOPTS="$JAVAOPTS -trueprob $2"
338 shift
339 elif [[ $1 = '-inlineatomic' ]]
340 then
341 JAVAOPTS="$JAVAOPTS -inlineatomic $2"
342 shift
343 elif [[ $1 = '-mac' ]]
344 then
345 EXTRAOPTIONS="$EXTRAOPTIONS -DMAC"
346 elif [[ $1 = '-profile' ]]
347 then
348 PROFILEFLAG=true
349 EXTRAOPTIONS="$EXTRAOPTIONS -pg"
350 elif [[ $1 = '-gcprofile' ]]
351 then
352 GCPROFILEFLAG=true
353 elif [[ $1 = '-gcprofile_s' ]]
354 then
355 GCPROFILESFLAG=true
356 elif [[ $1 = '-accurateprofile' ]]
357 then
358 ACCURATEPROFILEFLAG=true
359 elif [[ $1 = '-profile_interrupt' ]]
360 then
361 PROFILEINTERRUPTFLAG=true
362 elif [[ $1 = '-useio' ]]
363 then
364 USEIOFLAG=true
365 elif [[ $1 = '-taskstate' ]]
366 then
367 JAVAOPTS="$JAVAOPTS -taskstate"
368 elif [[ $1 = '-tagstate' ]]
369 then
370 JAVAOPTS="$JAVAOPTS -tagstate"
371 elif [[ $1 = '-scheduling' ]]
372 then
373 JAVAOPTS="$JAVAOPTS -scheduling"
374 elif [[ $1 = '-multicore' ]]
375 then
376 MULTICOREFLAG=true
377 JAVAOPTS="$JAVAOPTS -multicore"
378 elif [[ $1 = '-numcore' ]]
379 then
380 JAVAOPTS="$JAVAOPTS -numcore $2"
381 if [[ "$2" -gt "1" ]]
382 then
383 TILERAN1COREFLAG=true
384 if [[ "$2" -eq "56" ]]
385 then
386 TILERA56COREFLAG=true
387 fi
388 fi
389 shift
390 elif [[ $1 = '-numcore4gc' ]]
391 then
392 JAVAOPTS="$JAVAOPTS -numcore4gc $2"
393 GCCORES="GC_$2"
394 shift
395 elif [[ $1 = '-raw' ]]
396 then
397 RAWFLAG=true
398 JAVAOPTS="$JAVAOPTS -raw"
399 elif [[ $1 = '-tilera_bme' ]]
400 then
401 TILERAFLAG=true
402 TILERABMEFLAG=true
403 elif [[ $1 = '-tilera_zlinux' ]]
404 then
405 TILERAFLAG=true
406 TILERAZLINUXFLAG=true
407 elif [[ $1 = '-tilera_memprof' ]]
408 then
409 TILERAMEMPROFFLAG=true
410 elif [[ $1 = '-tileraconfig' ]]
411 then
412 TILERACONFIG="$2"
413 shift
414 elif [[ $1 = '-cacheflush' ]]
415 then
416 CACHEFLUSHFLAG=true
417 elif [[ $1 = '-rawconfig' ]]
418 then
419 RAWCONFIG="$2"
420 shift
421 elif [[ $1 = '-interrupt' ]]
422 then
423 INTERRUPTFLAG=true
424 elif [[ $1 = '-abcclose' ]]
425 then
426 JAVAOPTS="$JAVAOPTS -abcclose"
427 elif [[ $1 = '-optional' ]]
428 then
429 JAVAOPTS="$JAVAOPTS -optional"
430 OPTIONALFLAG=true
431 elif [[ $1 = '-multicoregc' ]]
432 then
433 MULTICOREGCFLAG=true
434 JAVAOPTS="$JAVAOPTS -multicoregc"
435 elif [[ $1 = '-gcmem_local' ]]
436 then
437 GCMEMLOCALFLAG=true
438 elif [[ $1 = '-gcmem_fixed' ]]
439 then
440 GCMEMFIXEDFLAG=true
441 elif [[ $1 = '-gcmem_mixed' ]]
442 then
443 GCMEMMIXEDFLAG=true
444 elif [[ $1 = '-gcmem_global' ]]
445 then
446 GCMEMGLOBALFLAG=true
447 elif [[ $1 = '-gccache_local' ]]
448 then
449 GCCACHELOCALFLAG=true
450 elif [[ $1 = '-gccache_ran' ]]
451 then
452 GCCACHERANFLAG=true
453 elif [[ $1 = '-gccontroller_near' ]]
454 then
455 GCCONTROLLERNEARFLAG=true
456 elif [[ $1 = '-gccontroller_remote' ]]
457 then
458 GCCONTROLLERREMOTEFLAG=true
459 elif [[ $1 = '-gcsmallpagesize' ]]
460 then
461 GCSMALLPAGESIZEFLAG=true
462 elif [[ $1 = '-gcsmallpagesize2' ]]
463 then
464 GCSMALLPAGESIZEFLAG2=true
465 elif [[ $1 = '-gclargepagesize' ]]
466 then
467 GCLARGEPAGESIZEFLAG=true
468 elif [[ $1 = '-gclargesharedheap' ]]
469 then
470 GCLARGESHAREDHEAPFLAG=true
471 elif [[ $1 = '-gclargesharedheap2' ]]
472 then
473 GCLARGESHAREDHEAPFLAG2=true
474 elif [[ $1 = '-gccacheadapt' ]]
475 then
476 GCCACHEADAPTFLAG=true
477 elif [[ $1 = '-dmalloc' ]]
478 then
479 USEDMALLOC=true
480 elif [[ $1 = '-recover' ]]
481 then
482 RECOVERFLAG=true
483 JAVAOPTS="$JAVAOPTS -task"
484 elif [[ $1 = '-useprofile' ]]
485 then
486 JAVAOPTS="$JAVAOPTS -useprofile $2"
487 shift
488 elif [[ $1 = '-webinterface' ]]
489 then
490 JAVAOPTS="$JAVAOPTS -webinterface"
491 elif [[ $1 = '-instructionfailures' ]]
492 then
493 JAVAOPTS="$JAVAOPTS -instructionfailures"
494 elif [[ $1 = '-joptimize' ]]
495 then
496 JAVAOPTS="$JAVAOPTS -optimize"
497 elif [[ $1 = '-noloop' ]]
498 then
499 JAVAOPTS="$JAVAOPTS -noloop"
500 elif [[ $1 = '-dcopts' ]]
501 then
502 JAVAOPTS="$JAVAOPTS -dcopts"
503 elif [[ $1 = '-delaycomp' ]]
504 then
505 JAVAOPTS="$JAVAOPTS -delaycomp"
506 EXTRAOPTIONS="$EXTRAOPTIONS -DDELAYCOMP"
507 elif [[ $1 = '-hybrid' ]]
508 then
509 JAVAOPTS="$JAVAOPTS -hybrid"
510 EXTRAOPTIONS="$EXTRAOPTIONS -DHYBRID"
511 elif [[ $1 = '-minimize' ]]
512 then
513 JAVAOPTS="$JAVAOPTS -minimize"
514
515 elif [[ $1 = '-ooojava' ]]
516 then
517 MLP_ON=true
518 JAVAOPTS="$JAVAOPTS -ooojava $2 $3"
519 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
520 shift
521 shift
522
523 elif [[ $1 = '-heapsize-mb' ]]
524 then
525 EXTRAOPTIONS="$EXTRAOPTIONS -DINITIALHEAPSIZE_MB=($2)"
526 shift
527
528 elif [[ $1 = '-rcr' ]]
529 then
530 JAVAOPTS="$JAVAOPTS -rcr"
531 RCR=true
532 EXTRAOPTIONS="$EXTRAOPTIONS -I$ROBUSTROOT/Runtime/oooJava"
533
534
535 elif [[ $1 = '-coreprof' ]]
536 then
537 COREPROF=true
538 JAVAOPTS="$JAVAOPTS -coreprof"
539 EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF -I$ROBUSTROOT/Runtime/coreprof"
540
541 elif [[ $1 = '-coreprof-checkoverflow' ]]
542 then
543 EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF_CHECKOVERFLOW"
544
545 elif [[ $1 = '-mlp' ]]
546 then
547 MLP_ON=true
548 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
549 JAVAOPTS="$JAVAOPTS -mlp $2 $3"
550 shift
551 shift
552
553 elif [[ $1 = '-mlpdebug' ]]
554 then
555 JAVAOPTS="$JAVAOPTS -mlpdebug"
556
557 elif [[ $1 = '-check' ]]
558 then
559 CHECKFLAG=true
560 JAVAOPTS="$JAVAOPTS -conscheck"
561 elif [[ $1 = '-enable-assertions' ]]
562 then
563 JAVAFORWARDOPTS="$JAVAFORWARDOPTS -ea"
564 elif [[ $1 = '-specdir' ]]
565 then
566 cd $2
567 SPECDIR=`pwd`
568 cd $CURDIR
569 shift
570 elif [[ $1 = '-debug' ]]
571 then
572 DEBUGFLAG=true
573 EXTRAOPTIONS="$EXTRAOPTIONS -g -rdynamic"
574 elif [[ $1 = '-rawpath' ]]
575 then
576 RAWPATHFLAG=true
577 elif [[ $1 = '-runtimedebug' ]]
578 then
579 EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG"
580 elif [[ $1 = '-dsmcaching' ]]
581 then
582 EXTRAOPTIONS="$EXTRAOPTIONS -DCACHE"
583 elif [[ $1 = '-rangeprefetch' ]]
584 then
585 EXTRAOPTIONS="$EXTRAOPTIONS -DRANGEPREFETCH"
586 elif [[ $1 = '-nooptimize' ]]
587 then
588 EXTRAOPTIONS="$EXTRAOPTIONS -O0"
589 elif [[ $1 = '-optimize' ]]
590 then
591 EXTRAOPTIONS="$EXTRAOPTIONS -O3"
592 elif [[ $1 = '-thread' ]]
593 then
594 JAVAOPTS="$JAVAOPTS -thread"
595 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADS -lpthread"
596 THREADFLAG=true
597 elif [[ $1 = '-recovery' ]]
598 then
599 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERY"
600 DSMRECOVERY=true
601 elif [[ $1 = '-recoverystats' ]]
602 then
603 JAVAOPTS="$JAVAOPTS -recoverystats"
604 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERYSTATS"
605 elif [[ $1 = '-distributioninfo' ]]
606 then
607 JAVAOPTS="$JAVAOPTS -distributioninfo"
608 elif [[ $1 = '-disall' ]]
609 then
610 JAVAOPTS="$JAVAOPTS -disall"
611 elif [[ $1 = '-disstart' ]]
612 then
613 JAVAOPTS="$JAVAOPTS -disstart $2"
614 shift
615 elif [[ $1 = '-noc' ]]
616 then
617 CCOMPILEFLAG=false
618 elif [[ $1 = '-curdir' ]]
619 then
620 CURDIR=$2
621 shift
622 elif [[ $1 = '-outputdir' ]]
623 then
624 JAVAOPTS="$JAVAOPTS -outputdir $2"
625 shift
626 else
627 SRCFILES="$SRCFILES $1"
628 fi
629 shift
630 done
631
632 BUILDDIR="$CURDIR/$tmpbuilddirectory"
633
634 cd $1
635 cd $CURDIR
636 shift
637
638 mkdir $BUILDDIR
639
640 if $CHECKFLAG #Generate structure files for repair tool
641 then
642 JAVAOPTS="$JAVAOPTS -struct structfile"
643 fi
644
645 # Setup class path
646
647 if $RECOVERFLAG
648 then
649 if $FASTCHECK
650 then
651 #fast transactions
652 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/FastCheck"
653 else
654 #base bristlecone files
655 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Bristlecone"
656 fi
657 else
658 if $DSMFLAG
659 then
660 #dsm stuff
661 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaDSM"
662 elif $STM
663 then
664 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaSTM"
665 elif $THREADFLAG
666 then
667 #threading java stuff
668 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaThread"
669 fi
670 #base java stuff
671 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Java"
672 fi
673
674 # Build bristlecone/java sources
675
676 if $MULTICOREFLAG
677 then
678 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
679 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ \
680 -dir $BUILDDIR $JAVAOPTS $SRCFILES
681 then exit $?
682 fi
683 else
684 #if ! ${ROBUSTROOT}/ourjava -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
685 if ! $NOJAVA
686 then
687 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
688 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ -dir $BUILDDIR -precise \
689 $JAVAOPTS $SRCFILES
690 then exit $?
691 fi
692 fi
693 fi
694
695 if $EXITAFTERANALYSIS
696 then
697 exit
698 fi
699
700 # Build all of the consistency specs
701
702 if $CHECKFLAG # CHECKFLAG
703 then
704 cd $SPECDIR
705 mkdir $BUILDDIR/specdir
706 cp $REPAIRROOT/MCC/CRuntime/* $BUILDDIR/specdir
707
708 echo > $BUILDDIR/specs
709
710 # compile specs into C code
711 for i in * # iterate over all directories
712 do
713 if [[ "$i" != "CVS" ]] # CVSDIR CHECK
714 then
715 cd $SPECDIR/$i
716 cat $BUILDDIR/structfile.struct $i.label > $i.struct
717 java -cp $REPAIRROOT/:. MCC.Compiler -name $i -checkonly $i
718 cp size.[c,h] $BUILDDIR/specdir
719 cp $i.c $i\_aux.[c,h] $BUILDDIR/specdir
720 echo $i >> $BUILDDIR/specs
721 fi # CVSDIR CHECK
722 done # iterate over all directories
723
724 #compile C code
725
726 cd $BUILDDIR/specdir
727 ./buildrobust
728 echo > $BUILDDIR/checkers.h
729 for i in `cat $BUILDDIR/specs`
730 do
731 gcc -O0 -g -fbounds-check -c $i\_aux.c
732 echo \#include \"specdir\/$i\_aux.h\" >> $BUILDDIR/checkers.h
733 done
734 fi # CHECKFLAG
735
736 #build and link everything
737
738 if $RAWFLAG
739 then # RAWFLAG
740 RAWDIR="$CURDIR/raw"
741 MAKEFILE="Makefile.raw"
742 mkdir $RAWDIR
743 cd $RAWDIR
744 make clean
745 rm ./*
746
747 export RAWRGCCFLAGS="-DTASK -DMULTICORE -DRAW"
748
749 if $CACHEFLUSHFLAG
750 then # print path
751 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DCACHEFLUSH"
752 fi
753
754 if $RAWPATHFLAG
755 then # print path
756 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWPATH"
757 fi
758
759 if $DEBUGFLAG
760 then #debug version
761 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DDEBUG"
762 fi
763
764 if $PROFILEFLAG
765 then # profile version
766 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DPROFILE"
767 fi
768
769 if $ACCURATEPROFILEFLAG
770 then # accurateprofile version
771 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DACCURATEPROFILE"
772 fi
773
774 if $USEIOFLAG
775 then # useio version
776 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DUSEIO"
777 fi
778
779 if $INTERRUPTFLAG
780 then #INTERRUPT version
781 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DINTERRUPT"
782 fi #INTERRUPT version
783
784 if $USEIOFLAG
785 then # useio version
786 MAKEFILE="$MAKEFILE.io"
787 echo "+++++++++++use Makefile.raw.io++++++++++++++++"
788 else
789 MAKEFILE="$MAKEFILE.$RAWCONFIG"
790 fi #useio version
791
792 cp $ROBUSTROOT/Runtime/RAW/$MAKEFILE ./Makefile
793 cp ../Runtime/*.c ./
794 cp ../Runtime/*.h ./
795 cp ../Runtime/*.S ./
796 cp ../Runtime/*.s ./
797 cp ../Runtime/RAW/*.c ./
798 cp ../Runtime/RAW/*.h ./
799 cp ../Runtime/RAW/*.S ./
800 cp ../Runtime/RAW/*.s ./
801 cp ../$tmpbuilddirectory/*.c ./
802 cp ../$tmpbuilddirectory/*.h ./
803
804 make
805
806 elif $TILERAFLAG
807 then # TILERAFLAG
808 TILERADIR="$CURDIR/tilera"
809 if $TILERABMEFLAG
810 then # TILERABMEFLAG
811 TILERA_INDIR="BME"
812 MAKEFILE="Makefile.tilera.$TILERACONFIG"
813 SIMHVC="sim.hvc.$TILERACONFIG"
814 PCIHVC="pci.hvc.$TILERACONFIG"
815 if $TILERA56COREFLAG
816 then
817   PCIHVC="$PCIHVC.56"
818 fi
819 elif $TILERAZLINUXFLAG
820 then # TILERAZLINUXFLAG
821 TILERA_INDIR="ZLinux"
822 MAKEFILE="Makefile.tilera.$TILERACONFIG"
823 fi
824
825 mkdir $TILERADIR
826 cd $TILERADIR
827 make clean
828 rm ./*
829
830 export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
831
832 if $TILERAMEMPROFFLAG
833 then # not only with 1 core
834   PCIHVC="$PCIHVC.memprof"
835   TILERACFLAGS="${TILERACFLAGS} -DBAMBOO_MEMPROF"
836 fi
837
838 if $TILERABMEFLAG
839 then # TILERABMEFLAG
840 TILERACFLAGS="${TILERACFLAGS} -DTILERA_BME"
841 elif $TILERAZLINUXFLAG
842 then # TILERAZLINUXFLAG
843 TILERACFLAGS="${TILERACFLAGS} -DTILERA_ZLINUX"
844 fi
845
846 if $CACHEFLUSHFLAG
847 then # print path
848 TILERACFLAGS="${TILERACFLAGS} -DCACHEFLUSH"
849 fi
850
851 if $RAWPATHFLAG
852 then # print path
853 TILERACFLAGS="${TILERACFLAGS} -DRAWPATH"
854 fi
855
856 if $DEBUGFLAG
857 then #debug version
858 TILERACFLAGS="${TILERACFLAGS} -DDEBUG"
859 fi
860
861 if $PROFILEFLAG
862 then # profile version
863 TILERACFLAGS="${TILERACFLAGS} -DPROFILE"
864 fi
865
866 if $ACCURATEPROFILEFLAG
867 then # accurateprofile version
868 TILERACFLAGS="${TILERACFLAGS} -DACCURATEPROFILE"
869 fi
870
871 if $PROFILEINTERRUPTFLAG
872 then # profile_interrupt version
873 TILERACFLAGS="${TILERACFLAGS} -DPROFILE_INTERRUPT"
874 fi
875
876 if $USEIOFLAG
877 then # useio version
878 TILERACFLAGS="${TILERACFLAGS} -DUSEIO"
879 fi
880
881 if $INTERRUPTFLAG
882 then #INTERRUPT version
883 TILERACFLAGS="${TILERACFLAGS} -DINTERRUPT"
884 fi #INTERRUPT version
885
886 if $MULTICOREGCFLAG
887 then #MULTICOREGC version
888 TILERACFLAGS="${TILERACFLAGS} -DMULTICORE_GC -D${GCCORES}"
889 fi
890
891 if $GCPROFILEFLAG
892 then # GC_PROFILE version
893 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE"
894 fi
895
896 if $GCPROFILESFLAG
897 then # GC_PROFILE_S version
898 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE_S"
899 fi
900
901 if $GCMEMLOCALFLAG
902 then # SMEMLOCAL version
903 TILERACFLAGS="${TILERACFLAGS} -DSMEML"
904 fi
905
906 if $GCMEMFIXEDFLAG
907 then # SMEMFIXED version
908 TILERACFLAGS="${TILERACFLAGS} -DSMEMF"
909 fi
910
911 if $GCMEMMIXEDFLAG
912 then # SMEMMIXED version
913 TILERACFLAGS="${TILERACFLAGS} -DSMEMM"
914 fi
915
916 if $GCMEMGLOBALFLAG
917 then # SMEMGLOBAL version
918 TILERACFLAGS="${TILERACFLAGS} -DSMEMG"
919 fi
920
921 if $GCCACHELOCALFLAG
922 then # CACHE_LOCAL version
923 TILERACFLAGS="${TILERACFLAGS} -DCACHE_LOCAL"
924 fi
925
926 if $GCCACHERANFLAG
927 then # CACHE_RAN version
928 TILERACFLAGS="${TILERACFLAGS} -DCACHE_RAN"
929 fi
930
931 if $GCCONTROLLERNEARFLAG
932 then # CONTROLLER_NEAR version
933 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_NEAR"
934 fi
935
936 if $GCCONTROLLERREMOTEFLAG
937 then # CONTROLLER_REMOTE version
938 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_REMOTE"
939 fi
940
941 if $GCSMALLPAGESIZEFLAG
942 then # GC_SMALLPAGESIZE version
943 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE"
944 fi
945
946 if $GCLARGEPAGESIZEFLAG
947 then # GC_LARGEPAGESIZE version
948 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGEPAGESIZE"
949 fi
950
951 if $GCLARGESHAREDHEAPFLAG
952 then # GC_LARGESHAREDHEAP version
953 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP"
954 fi
955
956 if $GCSMALLPAGESIZEFLAG2
957 then # GC_SMALLPAGESIZE2 version
958 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE2"
959 fi
960
961 if $GCLARGESHAREDHEAPFLAG2
962 then # GC_LARGESHAREDHEAP2 version
963 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP2"
964 fi
965
966 if $GCCACHEADAPTFLAG
967 then # GC_CACHE_ADAPT version
968 TILERACFLAGS="${TILERACFLAGS} -DGC_CACHE_ADAPT"
969 fi
970
971 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$MAKEFILE ./Makefile
972 if $TILERABMEFLAG
973 then # TILERABMEFLAG
974 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$SIMHVC ./sim.hvc
975 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$PCIHVC ./pci.hvc
976 if $TILERA56COREFLAG
977 then
978 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc.56 ./bamboo-vmlinux-pci.hvc.56
979 else
980 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc ./bamboo-vmlinux-pci.hvc
981 fi
982 fi
983 cp ../Runtime/multicoretask.c ./
984 cp ../Runtime/multicoreruntime.c ./
985 cp ../Runtime/Queue.c ./
986 cp ../Runtime/file.c ./
987 cp ../Runtime/math.c ./
988 cp ../Runtime/object.c ./
989 cp ../Runtime/GenericHashtable.c ./
990 cp ../Runtime/SimpleHash.c ./
991 cp ../Runtime/GCSharedHash.c ./
992 cp ../Runtime/ObjectHash.c ./
993 cp ../Runtime/socket.c ./
994 cp ../Runtime/mem.c ./
995 cp ../Runtime/multicoregarbage.c ./
996 cp ../Runtime/MGCHash.c ./
997 cp ../Runtime/GenericHashtable.h ./
998 cp ../Runtime/mem.h ./
999 cp ../Runtime/multicoreruntime.h ./
1000 cp ../Runtime/object.h ./
1001 cp ../Runtime/ObjectHash.h ./
1002 cp ../Runtime/Queue.h ./
1003 cp ../Runtime/runtime.h ./
1004 cp ../Runtime/SimpleHash.h ./
1005 cp ../Runtime/GCSharedHash.h ./
1006 cp ../Runtime/multicoregc.h ./
1007 cp ../Runtime/multicoregarbage.h ./
1008 cp ../Runtime/multicorehelper.h ./
1009 cp ../Runtime/MGCHash.h ./
1010 cp ../Tilera/Runtime/*.c ./
1011 cp ../Tilera/Runtime/*.h ./
1012 cp ../Tilera/Runtime/$TILERA_INDIR/*.c ./
1013 cp ../Tilera/Runtime/$TILERA_INDIR/*.h ./
1014 if $TILERAZLINUXFLAG
1015 then # TILERAZLINUXFLAG
1016 cp ../Tilera/Runtime/$TILERA_INDIR/*.S ./
1017 fi
1018 #if $TILERAMEMPROFFLAG
1019 #then # TILERAMEMPROFFLAG
1020 cp ../Tilera/Runtime/$TILERA_INDIR/linux_client.c ./
1021 #fi
1022 cp ../Tilera/lib/* ./
1023 cp ../$tmpbuilddirectory/*.c ./
1024 cp ../$tmpbuilddirectory/*.h ./
1025
1026 make
1027
1028 else #!RAWFLAG && !TILERABMEFLAG  && ! TILERAZLINUXFLAG
1029 cd $CURDIR 
1030
1031 INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \
1032 -I$BUILDDIR"
1033
1034 if $MULTICOREFLAG
1035 then
1036 RUNTIMEFILE="$ROBUSTROOT/Runtime/multicoreruntime.c $ROBUSTROOT/Runtime/multicoretask.c"
1037 else
1038 RUNTIMEFILE="$ROBUSTROOT/Runtime/runtime.c $ROBUSTROOT/Runtime/task.c"
1039 fi
1040
1041 FILES="$RUNTIMEFILE \
1042 $ROBUSTROOT/Runtime/file.c $ROBUSTROOT/Runtime/Queue.c \
1043 $ROBUSTROOT/Runtime/SimpleHash.c $ROBUSTROOT/Runtime/option.c \
1044 $ROBUSTROOT/Runtime/ObjectHash.c \
1045 $ROBUSTROOT/Runtime/garbage.c $ROBUSTROOT/Runtime/socket.c \
1046 $ROBUSTROOT/Runtime/math.c \
1047 $ROBUSTROOT/Runtime/GenericHashtable.c $ROBUSTROOT/Runtime/object.c"
1048
1049 if $NUMA
1050 then
1051 FILES="$FILES $ROBUSTROOT/Runtime/affinity.c"
1052 fi
1053
1054 if $EVENTMONITOR
1055 then
1056 FILES="$FILES $ROBUSTROOT/Runtime/STM/monitor.c"
1057 fi
1058
1059 if $FASTMEMCPY
1060 then
1061 FILES="$FILES $ROBUSTROOT/Runtime/memcpy32.o $ROBUSTROOT/Runtime/instrset32.o"
1062 fi
1063
1064 if $DSMFLAG
1065 then
1066 if $DSMRECOVERY
1067 then
1068 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRECOVERYRUNTIME"
1069 FILES="$FILES $DSMRECOVERYRUNTIME/trans.c $DSMRECOVERYRUNTIME/mcpileq.c $DSMRECOVERYRUNTIME/objstr.c $DSMRECOVERYRUNTIME/dstm.c $DSMRECOVERYRUNTIME/altmlookup.c $DSMRECOVERYRUNTIME/clookup.c $DSMRECOVERYRUNTIME/llookup.c $DSMRECOVERYRUNTIME/tlookup.c $DSMRECOVERYRUNTIME/threadnotify.c $DSMRECOVERYRUNTIME/dstmserver.c $DSMRECOVERYRUNTIME/plookup.c $DSMRECOVERYRUNTIME/ip.c $DSMRECOVERYRUNTIME/queue.c $DSMRECOVERYRUNTIME/altprelookup.c $DSMRECOVERYRUNTIME/machinepile.c $ROBUSTROOT/Runtime/localobjects.c $ROBUSTROOT/Runtime/thread.c $DSMRECOVERYRUNTIME/sockpool.c $DSMRECOVERYRUNTIME/addUdpEnhance.c $DSMRECOVERYRUNTIME/signal.c $DSMRECOVERYRUNTIME/gCollect.c $DSMRECOVERYRUNTIME/addPrefetchEnhance.c $DSMRECOVERYRUNTIME/dsmlock.c $DSMRECOVERYRUNTIME/translist.c $DSMRECOVERYRUNTIME/paxos.c"
1070 else
1071 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRUNTIME"
1072 FILES="$FILES $DSMRUNTIME/trans.c $DSMRUNTIME/mcpileq.c $DSMRUNTIME/objstr.c $DSMRUNTIME/dstm.c $DSMRUNTIME/clookup.c $DSMRUNTIME/llookup.c $DSMRUNTIME/threadnotify.c $DSMRUNTIME/dstmserver.c $DSMRUNTIME/plookup.c $DSMRUNTIME/ip.c $DSMRUNTIME/queue.c $DSMRUNTIME/altprelookup.c $DSMRUNTIME/machinepile.c $ROBUSTROOT/Runtime/localobjects.c $ROBUSTROOT/Runtime/thread.c $DSMRUNTIME/sockpool.c $DSMRUNTIME/addUdpEnhance.c $DSMRUNTIME/signal.c $DSMRUNTIME/gCollect.c $DSMRUNTIME/addPrefetchEnhance.c $DSMRUNTIME/dsmlock.c $DSMRUNTIME/prefetch.c $DSMRUNTIME/altmlookup.c"
1073 fi
1074 fi
1075
1076 if $STM
1077 then
1078 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -I$STMRUNTIME"
1079 FILES="$FILES $STMRUNTIME/stmlock.c $STMRUNTIME/stm.c $STMRUNTIME/stmlookup.c $ROBUSTROOT/Runtime/thread.c $STMRUNTIME/stats.c $STMRUNTIME/commit.c $STMRUNTIME/objstr.c"
1080 fi
1081
1082 if $SANDBOX
1083 then
1084 if $DSMFLAG
1085 then
1086 FILES="$FILES $DSMRUNTIME/sandbox.c"
1087 else
1088 FILES="$FILES $STMRUNTIME/sandbox.c"
1089 fi
1090 fi
1091
1092 if $ABORTREADERS
1093 then
1094 FILES="$FILES $DSMRUNTIME/abortreaders.c"
1095 fi
1096
1097 if $FASTCHECK
1098 then
1099 FILES="$FILES $ROBUSTROOT/Runtime/localobjects.c"
1100 fi
1101
1102 if $COREPROF
1103 then
1104 FILES="$FILES $ROBUSTROOT/Runtime/coreprof/coreprof.c"
1105 fi
1106
1107 if $RCR
1108 then
1109 FILES="$FILES $tmpbuilddirectory/RuntimeConflictResolver.c $ROBUSTROOT/Runtime/oooJava/hashRCR.c $ROBUSTROOT/Runtime/oooJava/Queue_RCR.c" 
1110 fi
1111
1112 if $MLP_ON
1113 then
1114 FILES="$FILES $ROBUSTROOT/Runtime/mlp_runtime.c"
1115 FILES="$FILES $ROBUSTROOT/Runtime/psemaphore.c"
1116 FILES="$FILES $ROBUSTROOT/Runtime/workschedule.c"
1117 fi
1118
1119 if $RECOVERFLAG
1120 then
1121 EXTRAOPTIONS="$EXTRAOPTIONS -DTASK"
1122 if $MULTICOREFLAG
1123 then
1124 EXTRAOPTIONS="$EXTRAOPTIONS -DMULTICORE"
1125 fi
1126 FILES="$FILES $tmpbuilddirectory/taskdefs.c $ROBUSTROOT/Runtime/checkpoint.c $ROBUSTROOT/Runtime/chash.c"
1127 if $RAWFLAG
1128 then
1129 EXTRAOPTIONS="$EXTRAOPTIONS -DRAW"
1130 fi
1131 if $THREADSIMULATEFLAG
1132 then
1133 # -lpthread for pthread functions, -lrt for message queue functions
1134 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADSIMULATE -lpthread -lrt"
1135 fi
1136 fi
1137
1138 if $OPTIONALFLAG
1139 then
1140 EXTRAOPTIONS="$EXTRAOPTIONS -DOPTIONAL"
1141 FILES="$FILES $tmpbuilddirectory/optionalarrays.c"
1142 fi
1143
1144 if $THREADFLAG
1145 then
1146 FILES="$FILES $ROBUSTROOT/Runtime/thread.c"
1147 fi
1148
1149 if $CHECKFLAG
1150 then
1151 EXTRAOPTIONS="$EXTRAOPTIONS -DCONSCHECK $BUILDDIR/specdir/*.o"
1152 INCLUDES="$INCLUDES -I$BUILDDIR/specdir"
1153 fi
1154
1155 if $USEDMALLOC
1156 then
1157 EXTRAOPTIONS="$EXTRAOPTIONS -ldmalloc -DDMALLOC"
1158 fi
1159
1160 if $ASSEMBLY
1161 then
1162 gcc -S $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1163 -c $tmpbuilddirectory/methods.c -lm
1164 fi
1165
1166 if $MULTICOREFLAG
1167 then
1168 gcc $INCLUDES $EXTRAOPTIONS \
1169 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin
1170 else
1171 gcc $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1172 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin
1173 fi
1174
1175 fi #!RAWFLAG
1176
1177
1178 exit
1179