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