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"
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
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
43 echo "-mlp <num cores> <max sese age> build mlp code"
44 echo -mlpdebug if mlp, report progress and interim results
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
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 "-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 -abcclose turnoff array boundary checks
87 echo -builddir setup different build directory
88 echo -robustroot set up the ROBUSTROOT to directory other than default one
89 echo -readset turn on readset
90 echo -mac distributed shared memory mac support
91 echo -check generate check code
92 echo -dmalloc link in dmalloc
93 echo -64bit compile for 64 bit machine
94 echo -32bit compile for 32 bit machine
95 echo -joptimize java compiler optimizations
96 echo -noloop turnoff loop optimizations
97 echo -recover compile task code
98 echo -fastcheck fast checkpointing for Bristlecone
99 echo -specdir directory
100 echo -printflat print out flat representation
101 echo -selfloop task - this task cannot self loop forever
102 echo "-excprefetch methoddescriptor - exclude prefetches for this method (specified as class.method)"
103 echo -taskstate do task state analysis
104 echo -tagstate do tag state analysis
105 echo -optional enable optional
106 echo -debug generate debug symbols
107 echo -prefetch do prefetch analysis
108 echo -heapsize-mb NUM set initial heap size in MB, default is 256
109 echo -garbagestats Print garbage collection statistics
110 echo -webinterface enable web interface
111 echo -runtimedebug printout runtime debug messages
112 echo "-thread use support for multiple threads"
113 echo "-optimize call gcc with -O9 (optimize)"
114 echo "-nooptimize call gcc with -O0 (do not optimize)"
115 echo -curdir directory
116 echo -mainclass class with main method
118 echo -nojava do not run bristlecone compiler
119 echo -instructionfailures inject code for instructionfailures
120 echo -profile build with profile options
121 echo "-enable-assertions execute assert statements during compilation"
122 echo -justanalyze exit after compiler analyses complete
123 echo "-distributioninfo execute to collect distribution info for simulated annealing in multi-core version"
124 echo "-disall execute to collect whole distribution"
125 echo "-disstart specify the start number of distribution information collection"
126 echo -assembly generate assembly
127 echo -recovery compile recovery code
128 echo -dsmtask support work and task class library
129 echo -recoverystats print out recovery record
133 tmpbuilddirectory="tmpbuilddirectory"
138 ROBUSTROOT=~/research/Robust/src
139 DSMRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface/
140 STMRUNTIME=$ROBUSTROOT/Runtime/STM/
141 DSMRECOVERYRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface_recovery/
142 REPAIRROOT=~/research/Repair/RepairCompiler/
161 TILERAZLINUXFLAG=false
162 TILERAMEMPROFFLAG=false
171 ACCURATEPROFILEFLAG=false
174 THREADSIMULATEFLAG=false;
175 MULTICOREGCFLAG=false;
176 GCMEMLOCALFLAG=false;
177 GCMEMFIXEDFLAG=false;
178 GCMEMMIXEDFLAG=false;
179 GCMEMGLOBALFLAG=false;
180 GCCACHELOCALFLAG=false;
181 GCCACHERANFLAG=false;
182 GCCONTROLLERNEARFLAG=false;
183 GCCONTROLLERREMOTEFLAG=false;
184 GCSMALLPAGESIZEFLAG=false;
185 GCLARGEPAGESIZEFLAG=false;
186 GCLARGESHAREDHEAPFLAG=false;
187 GCSMALLPAGESIZEFLAG2=false;
188 GCLARGESHAREDHEAPFLAG2=false;
199 EXITAFTERANALYSIS=false
203 TILERAN1COREFLAG=false
213 if [[ $1 = '-help' ]]
217 elif [[ $1 = '-justanalyze' ]]
219 EXITAFTERANALYSIS=true
220 elif [[ $1 = '-assembly' ]]
223 elif [[ $1 = '-abortreaders' ]]
226 EXTRAOPTIONS="$EXTRAOPTIONS -DABORTREADERS"
227 JAVAOPTS="$JAVAOPTS -abortreaders"
228 elif [[ $1 = '-sandbox' ]]
231 EXTRAOPTIONS="$EXTRAOPTIONS -DSANDBOX"
232 JAVAOPTS="$JAVAOPTS -sandbox"
233 elif [[ $1 = '-numa' ]]
235 EXTRAOPTIONS="$EXTRAOPTIONS -DAFFINITY -D_GNU_SOURCE"
237 elif [[ $1 = '-robustroot' ]]
241 elif [[ $1 = '-builddir' ]]
243 tmpbuilddirectory="$2"
245 elif [[ $1 = '-nojava' ]]
248 elif [[ $1 = '-eventmonitor' ]]
250 JAVAOPTS="$JAVAOPTS -eventmonitor"
252 EXTRAOPTIONS="$EXTRAOPTIONS -DEVENTMONITOR"
253 elif [[ $1 = '-garbagestats' ]]
255 EXTRAOPTIONS="$EXTRAOPTIONS -DGARBAGESTATS"
256 elif [[ $1 = '-64bit' ]]
258 EXTRAOPTIONS="$EXTRAOPTIONS -DBIT64 -m64"
259 elif [[ $1 = '-32bit' ]]
261 EXTRAOPTIONS="$EXTRAOPTIONS -m32"
262 elif [[ $1 = '-fastcheck' ]]
264 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTCHECK"
265 JAVAOPTS="$JAVAOPTS -fastcheck"
271 elif [[ $1 = '-mainclass' ]]
273 JAVAOPTS="$JAVAOPTS -mainclass $2"
275 elif [[ $1 = '-selfloop' ]]
277 JAVAOPTS="$JAVAOPTS -selfloop $2"
279 elif [[ $1 = '-excprefetch' ]]
281 JAVAOPTS="$JAVAOPTS -excprefetch $2"
283 elif [[ $1 = '-arraypad' ]]
285 JAVAOPTS="$JAVAOPTS -arraypad"
286 elif [[ $1 = '-dsm' ]]
288 JAVAOPTS="$JAVAOPTS -dsm"
290 elif [[ $1 = '-fastmemcpy' ]]
293 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTMEMCPY"
294 elif [[ $1 = '-singleTM' ]]
296 JAVAOPTS="$JAVAOPTS -singleTM"
297 EXTRAOPTIONS="$EXTRAOPTIONS -DSTM"
299 elif [[ $1 = '-stmarray' ]]
301 JAVAOPTS="$JAVAOPTS -stmarray"
302 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMARRAY"
304 elif [[ $1 = '-dualview' ]]
306 JAVAOPTS="$JAVAOPTS -dualview"
307 EXTRAOPTIONS="$EXTRAOPTIONS -DDUALVIEW"
309 elif [[ $1 = '-readset' ]]
311 JAVAOPTS="$JAVAOPTS -readset"
312 EXTRAOPTIONS="$EXTRAOPTIONS -DREADSET"
313 elif [[ $1 = '-stmdebug' ]]
315 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMDEBUG"
316 elif [[ $1 = '-stmstats' ]]
318 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMSTATS"
319 elif [[ $1 = '-stmlog' ]]
321 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMLOG"
322 elif [[ $1 = '-prefetch' ]]
324 JAVAOPTS="$JAVAOPTS -prefetch"
325 elif [[ $1 = '-transstats' ]]
327 EXTRAOPTIONS="$EXTRAOPTIONS -DTRANSSTATS"
328 elif [[ $1 = '-printflat' ]]
330 JAVAOPTS="$JAVAOPTS -printflat"
331 elif [[ $1 = '-trueprob' ]]
333 JAVAOPTS="$JAVAOPTS -trueprob $2"
335 elif [[ $1 = '-inlineatomic' ]]
337 JAVAOPTS="$JAVAOPTS -inlineatomic $2"
339 elif [[ $1 = '-mac' ]]
341 EXTRAOPTIONS="$EXTRAOPTIONS -DMAC"
342 elif [[ $1 = '-profile' ]]
345 EXTRAOPTIONS="$EXTRAOPTIONS -pg"
346 elif [[ $1 = '-gcprofile' ]]
349 elif [[ $1 = '-gcprofile_s' ]]
352 elif [[ $1 = '-accurateprofile' ]]
354 ACCURATEPROFILEFLAG=true
355 elif [[ $1 = '-useio' ]]
358 elif [[ $1 = '-taskstate' ]]
360 JAVAOPTS="$JAVAOPTS -taskstate"
361 elif [[ $1 = '-tagstate' ]]
363 JAVAOPTS="$JAVAOPTS -tagstate"
364 elif [[ $1 = '-scheduling' ]]
366 JAVAOPTS="$JAVAOPTS -scheduling"
367 elif [[ $1 = '-multicore' ]]
370 JAVAOPTS="$JAVAOPTS -multicore"
371 elif [[ $1 = '-numcore' ]]
373 JAVAOPTS="$JAVAOPTS -numcore $2"
374 if [[ "$2" -gt "1" ]]
376 TILERAN1COREFLAG=true
379 elif [[ $1 = '-numcore4gc' ]]
381 JAVAOPTS="$JAVAOPTS -numcore4gc $2"
383 if [[ "$2" -eq "1" ]]
388 elif [[ $1 = '-raw' ]]
391 JAVAOPTS="$JAVAOPTS -raw"
392 elif [[ $1 = '-tilera_bme' ]]
396 elif [[ $1 = '-tilera_zlinux' ]]
399 TILERAZLINUXFLAG=true
400 elif [[ $1 = '-tilera_memprof' ]]
402 TILERAMEMPROFFLAG=true
403 elif [[ $1 = '-tileraconfig' ]]
407 elif [[ $1 = '-cacheflush' ]]
410 elif [[ $1 = '-rawconfig' ]]
414 elif [[ $1 = '-interrupt' ]]
417 elif [[ $1 = '-abcclose' ]]
419 JAVAOPTS="$JAVAOPTS -abcclose"
420 elif [[ $1 = '-optional' ]]
422 JAVAOPTS="$JAVAOPTS -optional"
424 elif [[ $1 = '-multicoregc' ]]
427 JAVAOPTS="$JAVAOPTS -multicoregc"
428 elif [[ $1 = '-gcmem_local' ]]
431 elif [[ $1 = '-gcmem_fixed' ]]
434 elif [[ $1 = '-gcmem_mixed' ]]
437 elif [[ $1 = '-gcmem_global' ]]
440 elif [[ $1 = '-gccache_local' ]]
442 GCCACHELOCALFLAG=true
443 elif [[ $1 = '-gccache_ran' ]]
446 elif [[ $1 = '-gccontroller_near' ]]
448 GCCONTROLLERNEARFLAG=true
449 elif [[ $1 = '-gccontroller_remote' ]]
451 GCCONTROLLERREMOTEFLAG=true
452 elif [[ $1 = '-gcsmallpagesize' ]]
454 GCSMALLPAGESIZEFLAG=true
455 elif [[ $1 = '-gcsmallpagesize2' ]]
457 GCSMALLPAGESIZEFLAG2=true
458 elif [[ $1 = '-gclargepagesize' ]]
460 GCLARGEPAGESIZEFLAG=true
461 elif [[ $1 = '-gclargesharedheap' ]]
463 GCLARGESHAREDHEAPFLAG=true
464 elif [[ $1 = '-gclargesharedheap2' ]]
466 GCLARGESHAREDHEAPFLAG2=true
467 elif [[ $1 = '-dmalloc' ]]
470 elif [[ $1 = '-recover' ]]
473 JAVAOPTS="$JAVAOPTS -task"
474 elif [[ $1 = '-useprofile' ]]
476 JAVAOPTS="$JAVAOPTS -useprofile $2"
478 elif [[ $1 = '-webinterface' ]]
480 JAVAOPTS="$JAVAOPTS -webinterface"
481 elif [[ $1 = '-instructionfailures' ]]
483 JAVAOPTS="$JAVAOPTS -instructionfailures"
484 elif [[ $1 = '-joptimize' ]]
486 JAVAOPTS="$JAVAOPTS -optimize"
487 elif [[ $1 = '-noloop' ]]
489 JAVAOPTS="$JAVAOPTS -noloop"
490 elif [[ $1 = '-dcopts' ]]
492 JAVAOPTS="$JAVAOPTS -dcopts"
493 elif [[ $1 = '-delaycomp' ]]
495 JAVAOPTS="$JAVAOPTS -delaycomp"
496 EXTRAOPTIONS="$EXTRAOPTIONS -DDELAYCOMP"
497 elif [[ $1 = '-hybrid' ]]
499 JAVAOPTS="$JAVAOPTS -hybrid"
500 EXTRAOPTIONS="$EXTRAOPTIONS -DHYBRID"
501 elif [[ $1 = '-minimize' ]]
503 JAVAOPTS="$JAVAOPTS -minimize"
505 elif [[ $1 = '-ooojava' ]]
508 JAVAOPTS="$JAVAOPTS -ooojava $2 $3"
509 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
513 elif [[ $1 = '-heapsize-mb' ]]
515 EXTRAOPTIONS="$EXTRAOPTIONS -DINITIALHEAPSIZE_MB=($2)"
518 elif [[ $1 = '-rcr' ]]
520 JAVAOPTS="$JAVAOPTS -rcr"
522 EXTRAOPTIONS="$EXTRAOPTIONS -I$ROBUSTROOT/Runtime/oooJava"
525 elif [[ $1 = '-coreprof' ]]
528 JAVAOPTS="$JAVAOPTS -coreprof"
529 EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF -I$ROBUSTROOT/Runtime/coreprof"
531 elif [[ $1 = '-coreprof-checkoverflow' ]]
533 EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF_CHECKOVERFLOW"
535 elif [[ $1 = '-mlp' ]]
538 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
539 JAVAOPTS="$JAVAOPTS -mlp $2 $3"
543 elif [[ $1 = '-mlpdebug' ]]
545 JAVAOPTS="$JAVAOPTS -mlpdebug"
547 elif [[ $1 = '-check' ]]
550 JAVAOPTS="$JAVAOPTS -conscheck"
551 elif [[ $1 = '-enable-assertions' ]]
553 JAVAFORWARDOPTS="$JAVAFORWARDOPTS -ea"
554 elif [[ $1 = '-specdir' ]]
560 elif [[ $1 = '-debug' ]]
563 EXTRAOPTIONS="$EXTRAOPTIONS -g -rdynamic"
564 elif [[ $1 = '-rawpath' ]]
567 elif [[ $1 = '-runtimedebug' ]]
569 EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG"
570 elif [[ $1 = '-dsmcaching' ]]
572 EXTRAOPTIONS="$EXTRAOPTIONS -DCACHE"
573 elif [[ $1 = '-rangeprefetch' ]]
575 EXTRAOPTIONS="$EXTRAOPTIONS -DRANGEPREFETCH"
576 elif [[ $1 = '-nooptimize' ]]
578 EXTRAOPTIONS="$EXTRAOPTIONS -O0"
579 elif [[ $1 = '-optimize' ]]
581 EXTRAOPTIONS="$EXTRAOPTIONS -O3"
582 elif [[ $1 = '-thread' ]]
584 JAVAOPTS="$JAVAOPTS -thread"
585 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADS -lpthread"
587 elif [[ $1 = '-recovery' ]]
589 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERY"
591 elif [[ $1 = '-recoverystats' ]]
593 JAVAOPTS="$JAVAOPTS -recoverystats"
594 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERYSTATS"
595 elif [[ $1 = '-distributioninfo' ]]
597 JAVAOPTS="$JAVAOPTS -distributioninfo"
598 elif [[ $1 = '-disall' ]]
600 JAVAOPTS="$JAVAOPTS -disall"
601 elif [[ $1 = '-disstart' ]]
603 JAVAOPTS="$JAVAOPTS -disstart $2"
605 elif [[ $1 = '-noc' ]]
608 elif [[ $1 = '-curdir' ]]
612 elif [[ $1 = '-outputdir' ]]
614 JAVAOPTS="$JAVAOPTS -outputdir $2"
617 SRCFILES="$SRCFILES $1"
622 BUILDDIR="$CURDIR/$tmpbuilddirectory"
630 if $CHECKFLAG #Generate structure files for repair tool
632 JAVAOPTS="$JAVAOPTS -struct structfile"
642 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/FastCheck"
644 #base bristlecone files
645 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Bristlecone"
651 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaDSM"
654 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaSTM"
657 #threading java stuff
658 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaThread"
661 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Java"
664 # Build bristlecone/java sources
668 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
669 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ \
670 -dir $BUILDDIR $JAVAOPTS $SRCFILES
674 #if ! ${ROBUSTROOT}/ourjava -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
677 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
678 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ -dir $BUILDDIR -precise \
685 if $EXITAFTERANALYSIS
690 # Build all of the consistency specs
692 if $CHECKFLAG # CHECKFLAG
695 mkdir $BUILDDIR/specdir
696 cp $REPAIRROOT/MCC/CRuntime/* $BUILDDIR/specdir
698 echo > $BUILDDIR/specs
700 # compile specs into C code
701 for i in * # iterate over all directories
703 if [[ "$i" != "CVS" ]] # CVSDIR CHECK
706 cat $BUILDDIR/structfile.struct $i.label > $i.struct
707 java -cp $REPAIRROOT/:. MCC.Compiler -name $i -checkonly $i
708 cp size.[c,h] $BUILDDIR/specdir
709 cp $i.c $i\_aux.[c,h] $BUILDDIR/specdir
710 echo $i >> $BUILDDIR/specs
712 done # iterate over all directories
718 echo > $BUILDDIR/checkers.h
719 for i in `cat $BUILDDIR/specs`
721 gcc -O0 -g -fbounds-check -c $i\_aux.c
722 echo \#include \"specdir\/$i\_aux.h\" >> $BUILDDIR/checkers.h
726 #build and link everything
731 MAKEFILE="Makefile.raw"
737 export RAWRGCCFLAGS="-DTASK -DMULTICORE -DRAW"
741 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DCACHEFLUSH"
746 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWPATH"
751 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DDEBUG"
755 then # profile version
756 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DPROFILE"
759 if $ACCURATEPROFILEFLAG
760 then # accurateprofile version
761 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DACCURATEPROFILE"
766 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DUSEIO"
770 then #INTERRUPT version
771 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DINTERRUPT"
772 fi #INTERRUPT version
776 MAKEFILE="$MAKEFILE.io"
777 echo "+++++++++++use Makefile.raw.io++++++++++++++++"
779 MAKEFILE="$MAKEFILE.$RAWCONFIG"
782 cp $ROBUSTROOT/Runtime/RAW/$MAKEFILE ./Makefile
787 cp ../Runtime/RAW/*.c ./
788 cp ../Runtime/RAW/*.h ./
789 cp ../Runtime/RAW/*.S ./
790 cp ../Runtime/RAW/*.s ./
791 cp ../$tmpbuilddirectory/*.c ./
792 cp ../$tmpbuilddirectory/*.h ./
798 TILERADIR="$CURDIR/tilera"
802 MAKEFILE="Makefile.tilera.$TILERACONFIG"
803 SIMHVC="sim.hvc.$TILERACONFIG"
804 PCIHVC="pci.hvc.$TILERACONFIG"
808 then # not only with 1 core
812 elif $TILERAZLINUXFLAG
813 then # TILERAZLINUXFLAG
814 TILERA_INDIR="ZLinux"
815 MAKEFILE="Makefile.tilera.$TILERACONFIG"
823 export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
825 if $TILERAMEMPROFFLAG
826 then # not only with 1 core
827 PCIHVC="$PCIHVC.memprof"
828 TILERACFLAGS="${TILERACFLAGS} -DBAMBOO_MEMPROF"
833 TILERACFLAGS="${TILERACFLAGS} -DTILERA_BME"
834 elif $TILERAZLINUXFLAG
835 then # TILERAZLINUXFLAG
836 TILERACFLAGS="${TILERACFLAGS} -DTILERA_ZLINUX"
841 TILERACFLAGS="${TILERACFLAGS} -DCACHEFLUSH"
846 TILERACFLAGS="${TILERACFLAGS} -DRAWPATH"
851 TILERACFLAGS="${TILERACFLAGS} -DDEBUG"
855 then # profile version
856 TILERACFLAGS="${TILERACFLAGS} -DPROFILE"
859 if $ACCURATEPROFILEFLAG
860 then # accurateprofile version
861 TILERACFLAGS="${TILERACFLAGS} -DACCURATEPROFILE"
866 TILERACFLAGS="${TILERACFLAGS} -DUSEIO"
870 then #INTERRUPT version
871 TILERACFLAGS="${TILERACFLAGS} -DINTERRUPT"
872 fi #INTERRUPT version
875 then #MULTICOREGC version
876 TILERACFLAGS="${TILERACFLAGS} -DMULTICORE_GC -D${GCCORES}"
880 then # GC_PROFILE version
881 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE"
885 then # GC_PROFILE_S version
886 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE_S"
890 then # SMEMLOCAL version
891 TILERACFLAGS="${TILERACFLAGS} -DSMEML"
895 then # SMEMFIXED version
896 TILERACFLAGS="${TILERACFLAGS} -DSMEMF"
900 then # SMEMMIXED version
901 TILERACFLAGS="${TILERACFLAGS} -DSMEMM"
905 then # SMEMGLOBAL version
906 TILERACFLAGS="${TILERACFLAGS} -DSMEMG"
910 then # CACHE_LOCAL version
911 TILERACFLAGS="${TILERACFLAGS} -DCACHE_LOCAL"
915 then # CACHE_RAN version
916 TILERACFLAGS="${TILERACFLAGS} -DCACHE_RAN"
919 if $GCCONTROLLERNEARFLAG
920 then # CONTROLLER_NEAR version
921 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_NEAR"
924 if $GCCONTROLLERREMOTEFLAG
925 then # CONTROLLER_REMOTE version
926 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_REMOTE"
929 if $GCSMALLPAGESIZEFLAG
930 then # GC_SMALLPAGESIZE version
931 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE"
934 if $GCLARGEPAGESIZEFLAG
935 then # GC_LARGEPAGESIZE version
936 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGEPAGESIZE"
939 if $GCLARGESHAREDHEAPFLAG
940 then # GC_LARGESHAREDHEAP version
941 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP"
944 if $GCSMALLPAGESIZEFLAG2
945 then # GC_SMALLPAGESIZE2 version
946 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE2"
949 if $GCLARGESHAREDHEAPFLAG2
950 then # GC_LARGESHAREDHEAP2 version
951 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP2"
955 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$MAKEFILE ./Makefile
958 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$SIMHVC ./sim.hvc
959 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$PCIHVC ./pci.hvc
960 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc ./bamboo-vmlinux-pci.hvc
962 cp ../Runtime/multicoretask.c ./
963 cp ../Runtime/multicoreruntime.c ./
964 cp ../Runtime/Queue.c ./
965 cp ../Runtime/file.c ./
966 cp ../Runtime/math.c ./
967 cp ../Runtime/object.c ./
968 cp ../Runtime/GenericHashtable.c ./
969 cp ../Runtime/SimpleHash.c ./
970 cp ../Runtime/GCSharedHash.c ./
971 cp ../Runtime/ObjectHash.c ./
972 cp ../Runtime/socket.c ./
973 cp ../Runtime/mem.c ./
974 cp ../Runtime/multicoregarbage.c ./
975 cp ../Runtime/MGCHash.c ./
976 cp ../Runtime/GenericHashtable.h ./
977 cp ../Runtime/mem.h ./
978 cp ../Runtime/multicoreruntime.h ./
979 cp ../Runtime/object.h ./
980 cp ../Runtime/ObjectHash.h ./
981 cp ../Runtime/Queue.h ./
982 cp ../Runtime/runtime.h ./
983 cp ../Runtime/SimpleHash.h ./
984 cp ../Runtime/GCSharedHash.h ./
985 cp ../Runtime/multicoregc.h ./
986 cp ../Runtime/multicoregarbage.h ./
987 cp ../Runtime/multicorehelper.h ./
988 cp ../Runtime/MGCHash.h ./
989 cp ../Tilera/Runtime/*.c ./
990 cp ../Tilera/Runtime/*.h ./
991 cp ../Tilera/Runtime/$TILERA_INDIR/*.c ./
992 cp ../Tilera/Runtime/$TILERA_INDIR/*.h ./
994 then # TILERAZLINUXFLAG
995 cp ../Tilera/Runtime/$TILERA_INDIR/*.S ./
997 #if $TILERAMEMPROFFLAG
998 #then # TILERAMEMPROFFLAG
999 cp ../Tilera/Runtime/$TILERA_INDIR/linux_client.c ./
1001 cp ../Tilera/lib/* ./
1002 cp ../$tmpbuilddirectory/*.c ./
1003 cp ../$tmpbuilddirectory/*.h ./
1007 else #!RAWFLAG && !TILERABMEFLAG && ! TILERAZLINUXFLAG
1010 INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \
1015 RUNTIMEFILE="$ROBUSTROOT/Runtime/multicoreruntime.c $ROBUSTROOT/Runtime/multicoretask.c"
1017 RUNTIMEFILE="$ROBUSTROOT/Runtime/runtime.c $ROBUSTROOT/Runtime/task.c"
1020 FILES="$RUNTIMEFILE \
1021 $ROBUSTROOT/Runtime/file.c $ROBUSTROOT/Runtime/Queue.c \
1022 $ROBUSTROOT/Runtime/SimpleHash.c $ROBUSTROOT/Runtime/option.c \
1023 $ROBUSTROOT/Runtime/ObjectHash.c \
1024 $ROBUSTROOT/Runtime/garbage.c $ROBUSTROOT/Runtime/socket.c \
1025 $ROBUSTROOT/Runtime/math.c \
1026 $ROBUSTROOT/Runtime/GenericHashtable.c $ROBUSTROOT/Runtime/object.c"
1030 FILES="$FILES $ROBUSTROOT/Runtime/affinity.c"
1035 FILES="$FILES $ROBUSTROOT/Runtime/STM/monitor.c"
1040 FILES="$FILES $ROBUSTROOT/Runtime/memcpy32.o $ROBUSTROOT/Runtime/instrset32.o"
1047 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRECOVERYRUNTIME"
1048 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"
1050 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRUNTIME"
1051 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"
1057 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -I$STMRUNTIME"
1058 FILES="$FILES $STMRUNTIME/stmlock.c $STMRUNTIME/stm.c $STMRUNTIME/stmlookup.c $ROBUSTROOT/Runtime/thread.c $STMRUNTIME/stats.c $STMRUNTIME/commit.c $STMRUNTIME/objstr.c"
1065 FILES="$FILES $DSMRUNTIME/sandbox.c"
1067 FILES="$FILES $STMRUNTIME/sandbox.c"
1073 FILES="$FILES $DSMRUNTIME/abortreaders.c"
1078 FILES="$FILES $ROBUSTROOT/Runtime/localobjects.c"
1083 FILES="$FILES $ROBUSTROOT/Runtime/coreprof/coreprof.c"
1088 FILES="$FILES $tmpbuilddirectory/RuntimeConflictResolver.c $ROBUSTROOT/Runtime/oooJava/hashRCR.c $ROBUSTROOT/Runtime/oooJava/Queue_RCR.c"
1093 FILES="$FILES $ROBUSTROOT/Runtime/mlp_runtime.c"
1094 FILES="$FILES $ROBUSTROOT/Runtime/psemaphore.c"
1095 FILES="$FILES $ROBUSTROOT/Runtime/workschedule.c"
1100 EXTRAOPTIONS="$EXTRAOPTIONS -DTASK"
1103 EXTRAOPTIONS="$EXTRAOPTIONS -DMULTICORE"
1105 FILES="$FILES $tmpbuilddirectory/taskdefs.c $ROBUSTROOT/Runtime/checkpoint.c $ROBUSTROOT/Runtime/chash.c"
1108 EXTRAOPTIONS="$EXTRAOPTIONS -DRAW"
1110 if $THREADSIMULATEFLAG
1112 # -lpthread for pthread functions, -lrt for message queue functions
1113 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADSIMULATE -lpthread -lrt"
1119 EXTRAOPTIONS="$EXTRAOPTIONS -DOPTIONAL"
1120 FILES="$FILES $tmpbuilddirectory/optionalarrays.c"
1125 FILES="$FILES $ROBUSTROOT/Runtime/thread.c"
1130 EXTRAOPTIONS="$EXTRAOPTIONS -DCONSCHECK $BUILDDIR/specdir/*.o"
1131 INCLUDES="$INCLUDES -I$BUILDDIR/specdir"
1136 EXTRAOPTIONS="$EXTRAOPTIONS -ldmalloc -DDMALLOC"
1141 gcc -S $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1142 -c $tmpbuilddirectory/methods.c -lm
1147 gcc $INCLUDES $EXTRAOPTIONS \
1148 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin
1150 gcc $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1151 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin