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 "-ooojava <numberofcores> <maxseseage>"
22 echo -ooodebug general OOOJava debugging messages
24 echo Disjoint Reachability Analysis options
25 echo -disjoint enable analysis
26 echo -disjoint-k set k-limit for heap nodes per allocation site
27 echo "-disjoint-write-dots <all/final> write reach graphs for all method sols. or only final sols."
28 echo -disjoint-write-initial-contexts write reach graphs for callee initial contexts from all call sites
29 echo -disjoint-write-ihms write reach graphs for each call site\'s Initial Heap Model
30 echo "-disjoint-alias-file <filename> <normal/tabbed> write sharing for normal human reading or LaTeX tabbed"
31 echo "-disjoint-debug-callsite <callee> <caller> <visit to start> <num caps> <T/F stop after>"
32 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"
33 echo "-disjoint-debug-snap-method <method> <visit to start> <num caps> <T/F stop after>"
34 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"
35 echo "-disjoint-dvisit-stack use stack strat to visit descriptors (tasks or methods)"
36 echo -disjoint-dvisit-stack-callees-on-top alternate stack strat
37 echo -disjoint-dvisit-pqueue use prio. q strat to visit descriptors
38 echo -disjoint-desire-determinism set above interproc for determinism
39 echo -disjoint-debug-scheduling debug when methods are scheduled for analysis
41 echo "-mlp <num cores> <max sese age> build mlp code"
42 echo -mlpdebug if mlp, report progress and interim results
45 echo -dsm distributed shared memory
46 echo -abortreaders abort readers immediately
47 echo -trueprob double - probabiltiy of true branch
48 echo -dsmcaching -enable caching in dsm runtime
50 echo BAMBOO Multicore options
51 echo -scheduling do task scheduling
52 echo -multicore generate multi-core version binary
53 echo "-numcore set the number of cores (should be used together with -multicore), defaultly set as 1"
54 echo "-cacheflush enable cache flush in raw version binary (should be used togethere with -raw)"
55 echo "-interrupt generate raw version binary with interruption (should be used togethere with -raw)"
56 echo "-rawpath print out execute path information for raw version (should be used together with -raw)"
57 echo "-useprofile use profiling data for scheduling (should be used together with -raw)"
58 echo -printscheduling print out scheduling graphs
59 echo -printschedulesim print out scheduling simulator result graphs
60 echo "-tilera_bme generate tilera version binary for Bare Mental Environment (should be used together with -multicore"
61 echo "-tilera_zlinux generate tilera version binary for Zero-Overhead Linux with multi-process mode (should be used together with -multicore"
62 echo "-tileraconfig config tilera simulator/pci as nxm (should be used together with -tilera)"
63 echo "-raw generate raw version binary (should be used together with -multicore)"
64 echo "-rawconfig config raw simulator as 4xn (should be used together with -raw)"
65 echo -multicoregc generate multi-core binary with garbage collection
66 echo "-numcore4gc set the number of cores for gc (should be used together with -multicoregc), defaultly set as 0"
67 echo "-gcmem_local set the gc shared memory allocation strategy as local (should be used together with -multicoregc)"
68 echo "-gcmem_fixed set the gc shared memory allocation strategy as fixed (should be used together with -multicoregc)"
69 echo "-gcmem_mixed set the gc shared memory allocation strategy as mixed (should be used together with -multicoregc)"
70 echo "-gcmem_global set the gc shared memory allocation strategy as global (should be used together with -multicoregc)"
71 echo "-gccache_local set the gc shared memory cache strategy as local (should be used together with -multicoregc)"
72 echo "-gccache_ran set the gc shared memory cache strategy as random (should be used together with -multicoregc)"
73 echo "-gccontroller_near set the gc shared memory to use the nearest controller for each core (should be used together with -multicoregc)"
74 echo "-gccontroller_remote set the gc shared memory to use a remote controller for each core (should be used together with -multicoregc)"
75 echo "-gcsmallpagesize(2) set the gc shared memory to use small page size (should be used together with -multicoregc)"
76 echo "-gclargepagesize set the gc shared memory to use large page size (should be used together with -multicoregc)"
77 echo "-gclargesharedheap(2) set the gc shared memory as large (should be used together with -multicoregc)"
78 echo -gcprofile build with gcprofile options
79 echo "-tilera_memprof build the memprof version (should be used together with -tilera_xx) "
80 echo -accurateprofile build with accurate profile information including pre/post task processing info
81 echo "-useio use standard io to output profiling data (should be used together with -raw and -profile), it only works with single core version"
84 echo -abcclose turnoff array boundary checks
85 echo -builddir setup different build directory
86 echo -robustroot set up the ROBUSTROOT to directory other than default one
87 echo -readset turn on readset
88 echo -mac distributed shared memory mac support
89 echo -check generate check code
90 echo -dmalloc link in dmalloc
91 echo -64bit compile for 64 bit machine
92 echo -32bit compile for 32 bit machine
93 echo -joptimize java compiler optimizations
94 echo -noloop turnoff loop optimizations
95 echo -recover compile task code
96 echo -fastcheck fast checkpointing for Bristlecone
97 echo -specdir directory
98 echo -printflat print out flat representation
99 echo -selfloop task - this task cannot self loop forever
100 echo "-excprefetch methoddescriptor - exclude prefetches for this method (specified as class.method)"
101 echo -taskstate do task state analysis
102 echo -tagstate do tag state analysis
103 echo -optional enable optional
104 echo -debug generate debug symbols
105 echo -prefetch do prefetch analysis
106 echo -garbagestats Print garbage collection statistics
107 echo -webinterface enable web interface
108 echo -runtimedebug printout runtime debug messages
109 echo "-thread use support for multiple threads"
110 echo "-optimize call gcc with -O9 (optimize)"
111 echo "-nooptimize call gcc with -O0 (do not optimize)"
112 echo -curdir directory
113 echo -mainclass class with main method
115 echo -nojava do not run bristlecone compiler
116 echo -instructionfailures inject code for instructionfailures
117 echo -profile build with profile options
118 echo "-enable-assertions execute assert statements during compilation"
119 echo -justanalyze exit after compiler analyses complete
120 echo "-distributioninfo execute to collect distribution info for simulated annealing in multi-core version"
121 echo "-disall execute to collect whole distribution"
122 echo "-disstart specify the start number of distribution information collection"
123 echo -assembly generate assembly
124 echo -recovery compile recovery code
125 echo -dsmtask support work and task class library
126 echo -recoverystats print out recovery record
130 tmpbuilddirectory="tmpbuilddirectory"
135 ROBUSTROOT=~/research/Robust/src
136 DSMRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface/
137 STMRUNTIME=$ROBUSTROOT/Runtime/STM/
138 DSMRECOVERYRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface_recovery/
139 REPAIRROOT=~/research/Repair/RepairCompiler/
157 TILERAZLINUXFLAG=false
158 TILERAMEMPROFFLAG=false
167 ACCURATEPROFILEFLAG=false
170 THREADSIMULATEFLAG=false;
171 MULTICOREGCFLAG=false;
172 GCMEMLOCALFLAG=false;
173 GCMEMFIXEDFLAG=false;
174 GCMEMMIXEDFLAG=false;
175 GCMEMGLOBALFLAG=false;
176 GCCACHELOCALFLAG=false;
177 GCCACHERANFLAG=false;
178 GCCONTROLLERNEARFLAG=false;
179 GCCONTROLLERREMOTEFLAG=false;
180 GCSMALLPAGESIZEFLAG=false;
181 GCLARGEPAGESIZEFLAG=false;
182 GCLARGESHAREDHEAPFLAG=false;
183 GCSMALLPAGESIZEFLAG2=false;
184 GCLARGESHAREDHEAPFLAG2=false;
195 EXITAFTERANALYSIS=false
199 TILERAN1COREFLAG=false
209 if [[ $1 = '-help' ]]
213 elif [[ $1 = '-justanalyze' ]]
215 EXITAFTERANALYSIS=true
216 elif [[ $1 = '-assembly' ]]
219 elif [[ $1 = '-abortreaders' ]]
222 EXTRAOPTIONS="$EXTRAOPTIONS -DABORTREADERS"
223 JAVAOPTS="$JAVAOPTS -abortreaders"
224 elif [[ $1 = '-sandbox' ]]
227 EXTRAOPTIONS="$EXTRAOPTIONS -DSANDBOX"
228 JAVAOPTS="$JAVAOPTS -sandbox"
229 elif [[ $1 = '-numa' ]]
231 EXTRAOPTIONS="$EXTRAOPTIONS -DAFFINITY -D_GNU_SOURCE"
233 elif [[ $1 = '-robustroot' ]]
237 elif [[ $1 = '-builddir' ]]
239 tmpbuilddirectory="$2"
241 elif [[ $1 = '-nojava' ]]
244 elif [[ $1 = '-eventmonitor' ]]
246 JAVAOPTS="$JAVAOPTS -eventmonitor"
248 EXTRAOPTIONS="$EXTRAOPTIONS -DEVENTMONITOR"
249 elif [[ $1 = '-garbagestats' ]]
251 EXTRAOPTIONS="$EXTRAOPTIONS -DGARBAGESTATS"
252 elif [[ $1 = '-64bit' ]]
254 EXTRAOPTIONS="$EXTRAOPTIONS -DBIT64 -m64"
255 elif [[ $1 = '-32bit' ]]
257 EXTRAOPTIONS="$EXTRAOPTIONS -m32"
258 elif [[ $1 = '-fastcheck' ]]
260 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTCHECK"
261 JAVAOPTS="$JAVAOPTS -fastcheck"
267 elif [[ $1 = '-mainclass' ]]
269 JAVAOPTS="$JAVAOPTS -mainclass $2"
271 elif [[ $1 = '-selfloop' ]]
273 JAVAOPTS="$JAVAOPTS -selfloop $2"
275 elif [[ $1 = '-excprefetch' ]]
277 JAVAOPTS="$JAVAOPTS -excprefetch $2"
279 elif [[ $1 = '-arraypad' ]]
281 JAVAOPTS="$JAVAOPTS -arraypad"
282 elif [[ $1 = '-dsm' ]]
284 JAVAOPTS="$JAVAOPTS -dsm"
286 elif [[ $1 = '-fastmemcpy' ]]
289 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTMEMCPY"
290 elif [[ $1 = '-singleTM' ]]
292 JAVAOPTS="$JAVAOPTS -singleTM"
293 EXTRAOPTIONS="$EXTRAOPTIONS -DSTM"
295 elif [[ $1 = '-stmarray' ]]
297 JAVAOPTS="$JAVAOPTS -stmarray"
298 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMARRAY"
300 elif [[ $1 = '-dualview' ]]
302 JAVAOPTS="$JAVAOPTS -dualview"
303 EXTRAOPTIONS="$EXTRAOPTIONS -DDUALVIEW"
305 elif [[ $1 = '-readset' ]]
307 JAVAOPTS="$JAVAOPTS -readset"
308 EXTRAOPTIONS="$EXTRAOPTIONS -DREADSET"
309 elif [[ $1 = '-stmdebug' ]]
311 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMDEBUG"
312 elif [[ $1 = '-stmstats' ]]
314 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMSTATS"
315 elif [[ $1 = '-stmlog' ]]
317 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMLOG"
318 elif [[ $1 = '-prefetch' ]]
320 JAVAOPTS="$JAVAOPTS -prefetch"
321 elif [[ $1 = '-transstats' ]]
323 EXTRAOPTIONS="$EXTRAOPTIONS -DTRANSSTATS"
324 elif [[ $1 = '-printflat' ]]
326 JAVAOPTS="$JAVAOPTS -printflat"
327 elif [[ $1 = '-trueprob' ]]
329 JAVAOPTS="$JAVAOPTS -trueprob $2"
331 elif [[ $1 = '-inlineatomic' ]]
333 JAVAOPTS="$JAVAOPTS -inlineatomic $2"
335 elif [[ $1 = '-mac' ]]
337 EXTRAOPTIONS="$EXTRAOPTIONS -DMAC"
338 elif [[ $1 = '-profile' ]]
341 EXTRAOPTIONS="$EXTRAOPTIONS -pg"
342 elif [[ $1 = '-gcprofile' ]]
345 elif [[ $1 = '-gcprofile_s' ]]
348 elif [[ $1 = '-accurateprofile' ]]
350 ACCURATEPROFILEFLAG=true
351 elif [[ $1 = '-useio' ]]
354 elif [[ $1 = '-taskstate' ]]
356 JAVAOPTS="$JAVAOPTS -taskstate"
357 elif [[ $1 = '-tagstate' ]]
359 JAVAOPTS="$JAVAOPTS -tagstate"
360 elif [[ $1 = '-scheduling' ]]
362 JAVAOPTS="$JAVAOPTS -scheduling"
363 elif [[ $1 = '-multicore' ]]
366 JAVAOPTS="$JAVAOPTS -multicore"
367 elif [[ $1 = '-numcore' ]]
369 JAVAOPTS="$JAVAOPTS -numcore $2"
370 if [[ "$2" -gt "1" ]]
372 TILERAN1COREFLAG=true
375 elif [[ $1 = '-numcore4gc' ]]
377 JAVAOPTS="$JAVAOPTS -numcore4gc $2"
379 if [[ "$2" -eq "1" ]]
384 elif [[ $1 = '-raw' ]]
387 JAVAOPTS="$JAVAOPTS -raw"
388 elif [[ $1 = '-tilera_bme' ]]
392 elif [[ $1 = '-tilera_zlinux' ]]
395 TILERAZLINUXFLAG=true
396 elif [[ $1 = '-tilera_memprof' ]]
398 TILERAMEMPROFFLAG=true
399 elif [[ $1 = '-tileraconfig' ]]
403 elif [[ $1 = '-cacheflush' ]]
406 elif [[ $1 = '-rawconfig' ]]
410 elif [[ $1 = '-interrupt' ]]
413 elif [[ $1 = '-abcclose' ]]
415 JAVAOPTS="$JAVAOPTS -abcclose"
416 elif [[ $1 = '-optional' ]]
418 JAVAOPTS="$JAVAOPTS -optional"
420 elif [[ $1 = '-multicoregc' ]]
423 JAVAOPTS="$JAVAOPTS -multicoregc"
424 elif [[ $1 = '-gcmem_local' ]]
427 elif [[ $1 = '-gcmem_fixed' ]]
430 elif [[ $1 = '-gcmem_mixed' ]]
433 elif [[ $1 = '-gcmem_global' ]]
436 elif [[ $1 = '-gccache_local' ]]
438 GCCACHELOCALFLAG=true
439 elif [[ $1 = '-gccache_ran' ]]
442 elif [[ $1 = '-gccontroller_near' ]]
444 GCCONTROLLERNEARFLAG=true
445 elif [[ $1 = '-gccontroller_remote' ]]
447 GCCONTROLLERREMOTEFLAG=true
448 elif [[ $1 = '-gcsmallpagesize' ]]
450 GCSMALLPAGESIZEFLAG=true
451 elif [[ $1 = '-gcsmallpagesize2' ]]
453 GCSMALLPAGESIZEFLAG2=true
454 elif [[ $1 = '-gclargepagesize' ]]
456 GCLARGEPAGESIZEFLAG=true
457 elif [[ $1 = '-gclargesharedheap' ]]
459 GCLARGESHAREDHEAPFLAG=true
460 elif [[ $1 = '-gclargesharedheap2' ]]
462 GCLARGESHAREDHEAPFLAG2=true
463 elif [[ $1 = '-dmalloc' ]]
466 elif [[ $1 = '-recover' ]]
469 JAVAOPTS="$JAVAOPTS -task"
470 elif [[ $1 = '-useprofile' ]]
472 JAVAOPTS="$JAVAOPTS -useprofile $2"
474 elif [[ $1 = '-webinterface' ]]
476 JAVAOPTS="$JAVAOPTS -webinterface"
477 elif [[ $1 = '-instructionfailures' ]]
479 JAVAOPTS="$JAVAOPTS -instructionfailures"
480 elif [[ $1 = '-joptimize' ]]
482 JAVAOPTS="$JAVAOPTS -optimize"
483 elif [[ $1 = '-noloop' ]]
485 JAVAOPTS="$JAVAOPTS -noloop"
486 elif [[ $1 = '-dcopts' ]]
488 JAVAOPTS="$JAVAOPTS -dcopts"
489 elif [[ $1 = '-delaycomp' ]]
491 JAVAOPTS="$JAVAOPTS -delaycomp"
492 EXTRAOPTIONS="$EXTRAOPTIONS -DDELAYCOMP"
493 elif [[ $1 = '-hybrid' ]]
495 JAVAOPTS="$JAVAOPTS -hybrid"
496 EXTRAOPTIONS="$EXTRAOPTIONS -DHYBRID"
497 elif [[ $1 = '-minimize' ]]
499 JAVAOPTS="$JAVAOPTS -minimize"
501 elif [[ $1 = '-ooojava' ]]
504 JAVAOPTS="$JAVAOPTS -ooojava $2 $3"
505 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
509 elif [[ $1 = '-coreprof' ]]
512 JAVAOPTS="$JAVAOPTS -coreprof"
513 EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF -I$ROBUSTROOT/Runtime/coreprof"
515 elif [[ $1 = '-mlp' ]]
518 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
519 JAVAOPTS="$JAVAOPTS -mlp $2 $3"
523 elif [[ $1 = '-mlpdebug' ]]
525 JAVAOPTS="$JAVAOPTS -mlpdebug"
527 elif [[ $1 = '-check' ]]
530 JAVAOPTS="$JAVAOPTS -conscheck"
531 elif [[ $1 = '-enable-assertions' ]]
533 JAVAFORWARDOPTS="$JAVAFORWARDOPTS -ea"
534 elif [[ $1 = '-specdir' ]]
540 elif [[ $1 = '-debug' ]]
543 EXTRAOPTIONS="$EXTRAOPTIONS -g -rdynamic"
544 elif [[ $1 = '-rawpath' ]]
547 elif [[ $1 = '-runtimedebug' ]]
549 EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG"
550 elif [[ $1 = '-dsmcaching' ]]
552 EXTRAOPTIONS="$EXTRAOPTIONS -DCACHE"
553 elif [[ $1 = '-rangeprefetch' ]]
555 EXTRAOPTIONS="$EXTRAOPTIONS -DRANGEPREFETCH"
556 elif [[ $1 = '-nooptimize' ]]
558 EXTRAOPTIONS="$EXTRAOPTIONS -O0"
559 elif [[ $1 = '-optimize' ]]
561 EXTRAOPTIONS="$EXTRAOPTIONS -O3"
562 elif [[ $1 = '-thread' ]]
564 JAVAOPTS="$JAVAOPTS -thread"
565 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADS -lpthread"
567 elif [[ $1 = '-recovery' ]]
569 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERY"
571 elif [[ $1 = '-recoverystats' ]]
573 JAVAOPTS="$JAVAOPTS -recoverystats"
574 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERYSTATS"
575 elif [[ $1 = '-distributioninfo' ]]
577 JAVAOPTS="$JAVAOPTS -distributioninfo"
578 elif [[ $1 = '-disall' ]]
580 JAVAOPTS="$JAVAOPTS -disall"
581 elif [[ $1 = '-disstart' ]]
583 JAVAOPTS="$JAVAOPTS -disstart $2"
585 elif [[ $1 = '-noc' ]]
588 elif [[ $1 = '-curdir' ]]
592 elif [[ $1 = '-outputdir' ]]
594 JAVAOPTS="$JAVAOPTS -outputdir $2"
597 SRCFILES="$SRCFILES $1"
602 BUILDDIR="$CURDIR/$tmpbuilddirectory"
610 if $CHECKFLAG #Generate structure files for repair tool
612 JAVAOPTS="$JAVAOPTS -struct structfile"
622 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/FastCheck"
624 #base bristlecone files
625 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Bristlecone"
631 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaDSM"
634 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaSTM"
637 #threading java stuff
638 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaThread"
641 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Java"
644 # Build bristlecone/java sources
648 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
649 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ \
650 -dir $BUILDDIR $JAVAOPTS $SRCFILES
654 #if ! ${ROBUSTROOT}/ourjava -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
657 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
658 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ -dir $BUILDDIR -precise \
665 if $EXITAFTERANALYSIS
670 # Build all of the consistency specs
672 if $CHECKFLAG # CHECKFLAG
675 mkdir $BUILDDIR/specdir
676 cp $REPAIRROOT/MCC/CRuntime/* $BUILDDIR/specdir
678 echo > $BUILDDIR/specs
680 # compile specs into C code
681 for i in * # iterate over all directories
683 if [[ "$i" != "CVS" ]] # CVSDIR CHECK
686 cat $BUILDDIR/structfile.struct $i.label > $i.struct
687 java -cp $REPAIRROOT/:. MCC.Compiler -name $i -checkonly $i
688 cp size.[c,h] $BUILDDIR/specdir
689 cp $i.c $i\_aux.[c,h] $BUILDDIR/specdir
690 echo $i >> $BUILDDIR/specs
692 done # iterate over all directories
698 echo > $BUILDDIR/checkers.h
699 for i in `cat $BUILDDIR/specs`
701 gcc -O0 -g -fbounds-check -c $i\_aux.c
702 echo \#include \"specdir\/$i\_aux.h\" >> $BUILDDIR/checkers.h
706 #build and link everything
711 MAKEFILE="Makefile.raw"
717 export RAWRGCCFLAGS="-DTASK -DMULTICORE -DRAW"
721 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DCACHEFLUSH"
726 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWPATH"
731 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DDEBUG"
735 then # profile version
736 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DPROFILE"
739 if $ACCURATEPROFILEFLAG
740 then # accurateprofile version
741 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DACCURATEPROFILE"
746 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DUSEIO"
750 then #INTERRUPT version
751 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DINTERRUPT"
752 fi #INTERRUPT version
756 MAKEFILE="$MAKEFILE.io"
757 echo "+++++++++++use Makefile.raw.io++++++++++++++++"
759 MAKEFILE="$MAKEFILE.$RAWCONFIG"
762 cp $ROBUSTROOT/Runtime/RAW/$MAKEFILE ./Makefile
767 cp ../Runtime/RAW/*.c ./
768 cp ../Runtime/RAW/*.h ./
769 cp ../Runtime/RAW/*.S ./
770 cp ../Runtime/RAW/*.s ./
771 cp ../$tmpbuilddirectory/*.c ./
772 cp ../$tmpbuilddirectory/*.h ./
778 TILERADIR="$CURDIR/tilera"
782 MAKEFILE="Makefile.tilera.$TILERACONFIG"
783 SIMHVC="sim.hvc.$TILERACONFIG"
784 PCIHVC="pci.hvc.$TILERACONFIG"
788 then # not only with 1 core
792 elif $TILERAZLINUXFLAG
793 then # TILERAZLINUXFLAG
794 TILERA_INDIR="ZLinux"
795 MAKEFILE="Makefile.tilera.$TILERACONFIG"
803 export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
805 if $TILERAMEMPROFFLAG
806 then # not only with 1 core
807 PCIHVC="$PCIHVC.memprof"
808 TILERACFLAGS="${TILERACFLAGS} -DBAMBOO_MEMPROF"
813 TILERACFLAGS="${TILERACFLAGS} -DTILERA_BME"
814 elif $TILERAZLINUXFLAG
815 then # TILERAZLINUXFLAG
816 TILERACFLAGS="${TILERACFLAGS} -DTILERA_ZLINUX"
821 TILERACFLAGS="${TILERACFLAGS} -DCACHEFLUSH"
826 TILERACFLAGS="${TILERACFLAGS} -DRAWPATH"
831 TILERACFLAGS="${TILERACFLAGS} -DDEBUG"
835 then # profile version
836 TILERACFLAGS="${TILERACFLAGS} -DPROFILE"
839 if $ACCURATEPROFILEFLAG
840 then # accurateprofile version
841 TILERACFLAGS="${TILERACFLAGS} -DACCURATEPROFILE"
846 TILERACFLAGS="${TILERACFLAGS} -DUSEIO"
850 then #INTERRUPT version
851 TILERACFLAGS="${TILERACFLAGS} -DINTERRUPT"
852 fi #INTERRUPT version
855 then #MULTICOREGC version
856 TILERACFLAGS="${TILERACFLAGS} -DMULTICORE_GC -D${GCCORES}"
860 then # GC_PROFILE version
861 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE"
865 then # GC_PROFILE_S version
866 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE_S"
870 then # SMEMLOCAL version
871 TILERACFLAGS="${TILERACFLAGS} -DSMEML"
875 then # SMEMFIXED version
876 TILERACFLAGS="${TILERACFLAGS} -DSMEMF"
880 then # SMEMMIXED version
881 TILERACFLAGS="${TILERACFLAGS} -DSMEMM"
885 then # SMEMGLOBAL version
886 TILERACFLAGS="${TILERACFLAGS} -DSMEMG"
890 then # CACHE_LOCAL version
891 TILERACFLAGS="${TILERACFLAGS} -DCACHE_LOCAL"
895 then # CACHE_RAN version
896 TILERACFLAGS="${TILERACFLAGS} -DCACHE_RAN"
899 if $GCCONTROLLERNEARFLAG
900 then # CONTROLLER_NEAR version
901 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_NEAR"
904 if $GCCONTROLLERREMOTEFLAG
905 then # CONTROLLER_REMOTE version
906 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_REMOTE"
909 if $GCSMALLPAGESIZEFLAG
910 then # GC_SMALLPAGESIZE version
911 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE"
914 if $GCLARGEPAGESIZEFLAG
915 then # GC_LARGEPAGESIZE version
916 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGEPAGESIZE"
919 if $GCLARGESHAREDHEAPFLAG
920 then # GC_LARGESHAREDHEAP version
921 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP"
924 if $GCSMALLPAGESIZEFLAG2
925 then # GC_SMALLPAGESIZE2 version
926 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE2"
929 if $GCLARGESHAREDHEAPFLAG2
930 then # GC_LARGESHAREDHEAP2 version
931 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP2"
935 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$MAKEFILE ./Makefile
938 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$SIMHVC ./sim.hvc
939 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$PCIHVC ./pci.hvc
940 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc ./bamboo-vmlinux-pci.hvc
942 cp ../Runtime/multicoretask.c ./
943 cp ../Runtime/multicoreruntime.c ./
944 cp ../Runtime/Queue.c ./
945 cp ../Runtime/file.c ./
946 cp ../Runtime/math.c ./
947 cp ../Runtime/object.c ./
948 cp ../Runtime/GenericHashtable.c ./
949 cp ../Runtime/SimpleHash.c ./
950 cp ../Runtime/GCSharedHash.c ./
951 cp ../Runtime/ObjectHash.c ./
952 cp ../Runtime/socket.c ./
953 cp ../Runtime/mem.c ./
954 cp ../Runtime/multicoregarbage.c ./
955 cp ../Runtime/MGCHash.c ./
956 cp ../Runtime/GenericHashtable.h ./
957 cp ../Runtime/mem.h ./
958 cp ../Runtime/multicoreruntime.h ./
959 cp ../Runtime/object.h ./
960 cp ../Runtime/ObjectHash.h ./
961 cp ../Runtime/Queue.h ./
962 cp ../Runtime/runtime.h ./
963 cp ../Runtime/SimpleHash.h ./
964 cp ../Runtime/GCSharedHash.h ./
965 cp ../Runtime/multicoregc.h ./
966 cp ../Runtime/multicoregarbage.h ./
967 cp ../Runtime/multicorehelper.h ./
968 cp ../Runtime/MGCHash.h ./
969 cp ../Tilera/Runtime/*.c ./
970 cp ../Tilera/Runtime/*.h ./
971 cp ../Tilera/Runtime/$TILERA_INDIR/*.c ./
972 cp ../Tilera/Runtime/$TILERA_INDIR/*.h ./
974 then # TILERAZLINUXFLAG
975 cp ../Tilera/Runtime/$TILERA_INDIR/*.S ./
977 #if $TILERAMEMPROFFLAG
978 #then # TILERAMEMPROFFLAG
979 cp ../Tilera/Runtime/$TILERA_INDIR/linux_client.c ./
981 cp ../Tilera/lib/* ./
982 cp ../$tmpbuilddirectory/*.c ./
983 cp ../$tmpbuilddirectory/*.h ./
987 else #!RAWFLAG && !TILERABMEFLAG && ! TILERAZLINUXFLAG
990 INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \
995 RUNTIMEFILE="$ROBUSTROOT/Runtime/multicoreruntime.c $ROBUSTROOT/Runtime/multicoretask.c"
997 RUNTIMEFILE="$ROBUSTROOT/Runtime/runtime.c $ROBUSTROOT/Runtime/task.c"
1000 FILES="$RUNTIMEFILE \
1001 $ROBUSTROOT/Runtime/file.c $ROBUSTROOT/Runtime/Queue.c \
1002 $ROBUSTROOT/Runtime/SimpleHash.c $ROBUSTROOT/Runtime/option.c \
1003 $ROBUSTROOT/Runtime/ObjectHash.c \
1004 $ROBUSTROOT/Runtime/garbage.c $ROBUSTROOT/Runtime/socket.c \
1005 $ROBUSTROOT/Runtime/math.c \
1006 $ROBUSTROOT/Runtime/GenericHashtable.c $ROBUSTROOT/Runtime/object.c"
1010 FILES="$FILES $ROBUSTROOT/Runtime/affinity.c"
1015 FILES="$FILES $ROBUSTROOT/Runtime/STM/monitor.c"
1020 FILES="$FILES $ROBUSTROOT/Runtime/memcpy32.o $ROBUSTROOT/Runtime/instrset32.o"
1027 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRECOVERYRUNTIME"
1028 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"
1030 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRUNTIME"
1031 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"
1037 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -I$STMRUNTIME"
1038 FILES="$FILES $STMRUNTIME/stmlock.c $STMRUNTIME/stm.c $STMRUNTIME/stmlookup.c $ROBUSTROOT/Runtime/thread.c $STMRUNTIME/stats.c $STMRUNTIME/commit.c $STMRUNTIME/objstr.c"
1045 FILES="$FILES $DSMRUNTIME/sandbox.c"
1047 FILES="$FILES $STMRUNTIME/sandbox.c"
1053 FILES="$FILES $DSMRUNTIME/abortreaders.c"
1058 FILES="$FILES $ROBUSTROOT/Runtime/localobjects.c"
1063 FILES="$FILES $ROBUSTROOT/Runtime/coreprof/coreprof.c"
1068 FILES="$FILES $ROBUSTROOT/Runtime/mlp_runtime.c"
1069 FILES="$FILES $ROBUSTROOT/Runtime/psemaphore.c"
1070 FILES="$FILES $ROBUSTROOT/Runtime/workschedule.c"
1075 EXTRAOPTIONS="$EXTRAOPTIONS -DTASK"
1078 EXTRAOPTIONS="$EXTRAOPTIONS -DMULTICORE"
1080 FILES="$FILES $tmpbuilddirectory/taskdefs.c $ROBUSTROOT/Runtime/checkpoint.c $ROBUSTROOT/Runtime/chash.c"
1083 EXTRAOPTIONS="$EXTRAOPTIONS -DRAW"
1085 if $THREADSIMULATEFLAG
1087 # -lpthread for pthread functions, -lrt for message queue functions
1088 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADSIMULATE -lpthread -lrt"
1094 EXTRAOPTIONS="$EXTRAOPTIONS -DOPTIONAL"
1095 FILES="$FILES $tmpbuilddirectory/optionalarrays.c"
1100 FILES="$FILES $ROBUSTROOT/Runtime/thread.c"
1105 EXTRAOPTIONS="$EXTRAOPTIONS -DCONSCHECK $BUILDDIR/specdir/*.o"
1106 INCLUDES="$INCLUDES -I$BUILDDIR/specdir"
1111 EXTRAOPTIONS="$EXTRAOPTIONS -ldmalloc -DDMALLOC"
1116 gcc -S $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1117 -c $tmpbuilddirectory/methods.c -lm
1122 gcc $INCLUDES $EXTRAOPTIONS \
1123 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin
1125 gcc $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1126 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin