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