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 -garbagestats Print garbage collection statistics
109 echo -webinterface enable web interface
110 echo -runtimedebug printout runtime debug messages
111 echo "-thread use support for multiple threads"
112 echo "-optimize call gcc with -O9 (optimize)"
113 echo "-nooptimize call gcc with -O0 (do not optimize)"
114 echo -curdir directory
115 echo -mainclass class with main method
117 echo -nojava do not run bristlecone compiler
118 echo -instructionfailures inject code for instructionfailures
119 echo -profile build with profile options
120 echo "-enable-assertions execute assert statements during compilation"
121 echo -justanalyze exit after compiler analyses complete
122 echo "-distributioninfo execute to collect distribution info for simulated annealing in multi-core version"
123 echo "-disall execute to collect whole distribution"
124 echo "-disstart specify the start number of distribution information collection"
125 echo -assembly generate assembly
126 echo -recovery compile recovery code
127 echo -dsmtask support work and task class library
128 echo -recoverystats print out recovery record
132 tmpbuilddirectory="tmpbuilddirectory"
137 ROBUSTROOT=~/research/Robust/src
138 DSMRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface/
139 STMRUNTIME=$ROBUSTROOT/Runtime/STM/
140 DSMRECOVERYRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface_recovery/
141 REPAIRROOT=~/research/Repair/RepairCompiler/
159 TILERAZLINUXFLAG=false
160 TILERAMEMPROFFLAG=false
169 ACCURATEPROFILEFLAG=false
172 THREADSIMULATEFLAG=false;
173 MULTICOREGCFLAG=false;
174 GCMEMLOCALFLAG=false;
175 GCMEMFIXEDFLAG=false;
176 GCMEMMIXEDFLAG=false;
177 GCMEMGLOBALFLAG=false;
178 GCCACHELOCALFLAG=false;
179 GCCACHERANFLAG=false;
180 GCCONTROLLERNEARFLAG=false;
181 GCCONTROLLERREMOTEFLAG=false;
182 GCSMALLPAGESIZEFLAG=false;
183 GCLARGEPAGESIZEFLAG=false;
184 GCLARGESHAREDHEAPFLAG=false;
185 GCSMALLPAGESIZEFLAG2=false;
186 GCLARGESHAREDHEAPFLAG2=false;
197 EXITAFTERANALYSIS=false
201 TILERAN1COREFLAG=false
211 if [[ $1 = '-help' ]]
215 elif [[ $1 = '-justanalyze' ]]
217 EXITAFTERANALYSIS=true
218 elif [[ $1 = '-assembly' ]]
221 elif [[ $1 = '-abortreaders' ]]
224 EXTRAOPTIONS="$EXTRAOPTIONS -DABORTREADERS"
225 JAVAOPTS="$JAVAOPTS -abortreaders"
226 elif [[ $1 = '-sandbox' ]]
229 EXTRAOPTIONS="$EXTRAOPTIONS -DSANDBOX"
230 JAVAOPTS="$JAVAOPTS -sandbox"
231 elif [[ $1 = '-numa' ]]
233 EXTRAOPTIONS="$EXTRAOPTIONS -DAFFINITY -D_GNU_SOURCE"
235 elif [[ $1 = '-robustroot' ]]
239 elif [[ $1 = '-builddir' ]]
241 tmpbuilddirectory="$2"
243 elif [[ $1 = '-nojava' ]]
246 elif [[ $1 = '-eventmonitor' ]]
248 JAVAOPTS="$JAVAOPTS -eventmonitor"
250 EXTRAOPTIONS="$EXTRAOPTIONS -DEVENTMONITOR"
251 elif [[ $1 = '-garbagestats' ]]
253 EXTRAOPTIONS="$EXTRAOPTIONS -DGARBAGESTATS"
254 elif [[ $1 = '-64bit' ]]
256 EXTRAOPTIONS="$EXTRAOPTIONS -DBIT64 -m64"
257 elif [[ $1 = '-32bit' ]]
259 EXTRAOPTIONS="$EXTRAOPTIONS -m32"
260 elif [[ $1 = '-fastcheck' ]]
262 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTCHECK"
263 JAVAOPTS="$JAVAOPTS -fastcheck"
269 elif [[ $1 = '-mainclass' ]]
271 JAVAOPTS="$JAVAOPTS -mainclass $2"
273 elif [[ $1 = '-selfloop' ]]
275 JAVAOPTS="$JAVAOPTS -selfloop $2"
277 elif [[ $1 = '-excprefetch' ]]
279 JAVAOPTS="$JAVAOPTS -excprefetch $2"
281 elif [[ $1 = '-arraypad' ]]
283 JAVAOPTS="$JAVAOPTS -arraypad"
284 elif [[ $1 = '-dsm' ]]
286 JAVAOPTS="$JAVAOPTS -dsm"
288 elif [[ $1 = '-fastmemcpy' ]]
291 EXTRAOPTIONS="$EXTRAOPTIONS -DFASTMEMCPY"
292 elif [[ $1 = '-singleTM' ]]
294 JAVAOPTS="$JAVAOPTS -singleTM"
295 EXTRAOPTIONS="$EXTRAOPTIONS -DSTM"
297 elif [[ $1 = '-stmarray' ]]
299 JAVAOPTS="$JAVAOPTS -stmarray"
300 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMARRAY"
302 elif [[ $1 = '-dualview' ]]
304 JAVAOPTS="$JAVAOPTS -dualview"
305 EXTRAOPTIONS="$EXTRAOPTIONS -DDUALVIEW"
307 elif [[ $1 = '-readset' ]]
309 JAVAOPTS="$JAVAOPTS -readset"
310 EXTRAOPTIONS="$EXTRAOPTIONS -DREADSET"
311 elif [[ $1 = '-stmdebug' ]]
313 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMDEBUG"
314 elif [[ $1 = '-stmstats' ]]
316 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMSTATS"
317 elif [[ $1 = '-stmlog' ]]
319 EXTRAOPTIONS="$EXTRAOPTIONS -DSTMLOG"
320 elif [[ $1 = '-prefetch' ]]
322 JAVAOPTS="$JAVAOPTS -prefetch"
323 elif [[ $1 = '-transstats' ]]
325 EXTRAOPTIONS="$EXTRAOPTIONS -DTRANSSTATS"
326 elif [[ $1 = '-printflat' ]]
328 JAVAOPTS="$JAVAOPTS -printflat"
329 elif [[ $1 = '-trueprob' ]]
331 JAVAOPTS="$JAVAOPTS -trueprob $2"
333 elif [[ $1 = '-inlineatomic' ]]
335 JAVAOPTS="$JAVAOPTS -inlineatomic $2"
337 elif [[ $1 = '-mac' ]]
339 EXTRAOPTIONS="$EXTRAOPTIONS -DMAC"
340 elif [[ $1 = '-profile' ]]
343 EXTRAOPTIONS="$EXTRAOPTIONS -pg"
344 elif [[ $1 = '-gcprofile' ]]
347 elif [[ $1 = '-gcprofile_s' ]]
350 elif [[ $1 = '-accurateprofile' ]]
352 ACCURATEPROFILEFLAG=true
353 elif [[ $1 = '-useio' ]]
356 elif [[ $1 = '-taskstate' ]]
358 JAVAOPTS="$JAVAOPTS -taskstate"
359 elif [[ $1 = '-tagstate' ]]
361 JAVAOPTS="$JAVAOPTS -tagstate"
362 elif [[ $1 = '-scheduling' ]]
364 JAVAOPTS="$JAVAOPTS -scheduling"
365 elif [[ $1 = '-multicore' ]]
368 JAVAOPTS="$JAVAOPTS -multicore"
369 elif [[ $1 = '-numcore' ]]
371 JAVAOPTS="$JAVAOPTS -numcore $2"
372 if [[ "$2" -gt "1" ]]
374 TILERAN1COREFLAG=true
377 elif [[ $1 = '-numcore4gc' ]]
379 JAVAOPTS="$JAVAOPTS -numcore4gc $2"
381 if [[ "$2" -eq "1" ]]
386 elif [[ $1 = '-raw' ]]
389 JAVAOPTS="$JAVAOPTS -raw"
390 elif [[ $1 = '-tilera_bme' ]]
394 elif [[ $1 = '-tilera_zlinux' ]]
397 TILERAZLINUXFLAG=true
398 elif [[ $1 = '-tilera_memprof' ]]
400 TILERAMEMPROFFLAG=true
401 elif [[ $1 = '-tileraconfig' ]]
405 elif [[ $1 = '-cacheflush' ]]
408 elif [[ $1 = '-rawconfig' ]]
412 elif [[ $1 = '-interrupt' ]]
415 elif [[ $1 = '-abcclose' ]]
417 JAVAOPTS="$JAVAOPTS -abcclose"
418 elif [[ $1 = '-optional' ]]
420 JAVAOPTS="$JAVAOPTS -optional"
422 elif [[ $1 = '-multicoregc' ]]
425 JAVAOPTS="$JAVAOPTS -multicoregc"
426 elif [[ $1 = '-gcmem_local' ]]
429 elif [[ $1 = '-gcmem_fixed' ]]
432 elif [[ $1 = '-gcmem_mixed' ]]
435 elif [[ $1 = '-gcmem_global' ]]
438 elif [[ $1 = '-gccache_local' ]]
440 GCCACHELOCALFLAG=true
441 elif [[ $1 = '-gccache_ran' ]]
444 elif [[ $1 = '-gccontroller_near' ]]
446 GCCONTROLLERNEARFLAG=true
447 elif [[ $1 = '-gccontroller_remote' ]]
449 GCCONTROLLERREMOTEFLAG=true
450 elif [[ $1 = '-gcsmallpagesize' ]]
452 GCSMALLPAGESIZEFLAG=true
453 elif [[ $1 = '-gcsmallpagesize2' ]]
455 GCSMALLPAGESIZEFLAG2=true
456 elif [[ $1 = '-gclargepagesize' ]]
458 GCLARGEPAGESIZEFLAG=true
459 elif [[ $1 = '-gclargesharedheap' ]]
461 GCLARGESHAREDHEAPFLAG=true
462 elif [[ $1 = '-gclargesharedheap2' ]]
464 GCLARGESHAREDHEAPFLAG2=true
465 elif [[ $1 = '-dmalloc' ]]
468 elif [[ $1 = '-recover' ]]
471 JAVAOPTS="$JAVAOPTS -task"
472 elif [[ $1 = '-useprofile' ]]
474 JAVAOPTS="$JAVAOPTS -useprofile $2"
476 elif [[ $1 = '-webinterface' ]]
478 JAVAOPTS="$JAVAOPTS -webinterface"
479 elif [[ $1 = '-instructionfailures' ]]
481 JAVAOPTS="$JAVAOPTS -instructionfailures"
482 elif [[ $1 = '-joptimize' ]]
484 JAVAOPTS="$JAVAOPTS -optimize"
485 elif [[ $1 = '-noloop' ]]
487 JAVAOPTS="$JAVAOPTS -noloop"
488 elif [[ $1 = '-dcopts' ]]
490 JAVAOPTS="$JAVAOPTS -dcopts"
491 elif [[ $1 = '-delaycomp' ]]
493 JAVAOPTS="$JAVAOPTS -delaycomp"
494 EXTRAOPTIONS="$EXTRAOPTIONS -DDELAYCOMP"
495 elif [[ $1 = '-hybrid' ]]
497 JAVAOPTS="$JAVAOPTS -hybrid"
498 EXTRAOPTIONS="$EXTRAOPTIONS -DHYBRID"
499 elif [[ $1 = '-minimize' ]]
501 JAVAOPTS="$JAVAOPTS -minimize"
503 elif [[ $1 = '-ooojava' ]]
506 JAVAOPTS="$JAVAOPTS -ooojava $2 $3"
507 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
511 elif [[ $1 = '-rcr' ]]
513 JAVAOPTS="$JAVAOPTS -rcr"
515 elif [[ $1 = '-coreprof' ]]
518 JAVAOPTS="$JAVAOPTS -coreprof"
519 EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF -I$ROBUSTROOT/Runtime/coreprof"
521 elif [[ $1 = '-coreprof-checkoverflow' ]]
523 EXTRAOPTIONS="$EXTRAOPTIONS -DCOREPROF_CHECKOVERFLOW"
525 elif [[ $1 = '-mlp' ]]
528 EXTRAOPTIONS="$EXTRAOPTIONS -DPRECISE_GC -lpthread -DMLP"
529 JAVAOPTS="$JAVAOPTS -mlp $2 $3"
533 elif [[ $1 = '-mlpdebug' ]]
535 JAVAOPTS="$JAVAOPTS -mlpdebug"
537 elif [[ $1 = '-check' ]]
540 JAVAOPTS="$JAVAOPTS -conscheck"
541 elif [[ $1 = '-enable-assertions' ]]
543 JAVAFORWARDOPTS="$JAVAFORWARDOPTS -ea"
544 elif [[ $1 = '-specdir' ]]
550 elif [[ $1 = '-debug' ]]
553 EXTRAOPTIONS="$EXTRAOPTIONS -g -rdynamic"
554 elif [[ $1 = '-rawpath' ]]
557 elif [[ $1 = '-runtimedebug' ]]
559 EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG"
560 elif [[ $1 = '-dsmcaching' ]]
562 EXTRAOPTIONS="$EXTRAOPTIONS -DCACHE"
563 elif [[ $1 = '-rangeprefetch' ]]
565 EXTRAOPTIONS="$EXTRAOPTIONS -DRANGEPREFETCH"
566 elif [[ $1 = '-nooptimize' ]]
568 EXTRAOPTIONS="$EXTRAOPTIONS -O0"
569 elif [[ $1 = '-optimize' ]]
571 EXTRAOPTIONS="$EXTRAOPTIONS -O3"
572 elif [[ $1 = '-thread' ]]
574 JAVAOPTS="$JAVAOPTS -thread"
575 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADS -lpthread"
577 elif [[ $1 = '-recovery' ]]
579 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERY"
581 elif [[ $1 = '-recoverystats' ]]
583 JAVAOPTS="$JAVAOPTS -recoverystats"
584 EXTRAOPTIONS="$EXTRAOPTIONS -DRECOVERYSTATS"
585 elif [[ $1 = '-distributioninfo' ]]
587 JAVAOPTS="$JAVAOPTS -distributioninfo"
588 elif [[ $1 = '-disall' ]]
590 JAVAOPTS="$JAVAOPTS -disall"
591 elif [[ $1 = '-disstart' ]]
593 JAVAOPTS="$JAVAOPTS -disstart $2"
595 elif [[ $1 = '-noc' ]]
598 elif [[ $1 = '-curdir' ]]
602 elif [[ $1 = '-outputdir' ]]
604 JAVAOPTS="$JAVAOPTS -outputdir $2"
607 SRCFILES="$SRCFILES $1"
612 BUILDDIR="$CURDIR/$tmpbuilddirectory"
620 if $CHECKFLAG #Generate structure files for repair tool
622 JAVAOPTS="$JAVAOPTS -struct structfile"
632 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/FastCheck"
634 #base bristlecone files
635 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Bristlecone"
641 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaDSM"
644 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaSTM"
647 #threading java stuff
648 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/JavaThread"
651 JAVAOPTS="$JAVAOPTS -classlibrary $ROBUSTROOT/ClassLibrary/Java"
654 # Build bristlecone/java sources
658 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
659 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ \
660 -dir $BUILDDIR $JAVAOPTS $SRCFILES
664 #if ! ${ROBUSTROOT}/ourjava -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
667 if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx1500m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
668 $ROBUSTROOT/ClassLibrary/ -classlibrary $ROBUSTROOT/ClassLibrary/gnu/ -dir $BUILDDIR -precise \
675 if $EXITAFTERANALYSIS
680 # Build all of the consistency specs
682 if $CHECKFLAG # CHECKFLAG
685 mkdir $BUILDDIR/specdir
686 cp $REPAIRROOT/MCC/CRuntime/* $BUILDDIR/specdir
688 echo > $BUILDDIR/specs
690 # compile specs into C code
691 for i in * # iterate over all directories
693 if [[ "$i" != "CVS" ]] # CVSDIR CHECK
696 cat $BUILDDIR/structfile.struct $i.label > $i.struct
697 java -cp $REPAIRROOT/:. MCC.Compiler -name $i -checkonly $i
698 cp size.[c,h] $BUILDDIR/specdir
699 cp $i.c $i\_aux.[c,h] $BUILDDIR/specdir
700 echo $i >> $BUILDDIR/specs
702 done # iterate over all directories
708 echo > $BUILDDIR/checkers.h
709 for i in `cat $BUILDDIR/specs`
711 gcc -O0 -g -fbounds-check -c $i\_aux.c
712 echo \#include \"specdir\/$i\_aux.h\" >> $BUILDDIR/checkers.h
716 #build and link everything
721 MAKEFILE="Makefile.raw"
727 export RAWRGCCFLAGS="-DTASK -DMULTICORE -DRAW"
731 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DCACHEFLUSH"
736 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DRAWPATH"
741 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DDEBUG"
745 then # profile version
746 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DPROFILE"
749 if $ACCURATEPROFILEFLAG
750 then # accurateprofile version
751 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DACCURATEPROFILE"
756 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DUSEIO"
760 then #INTERRUPT version
761 RAWRGCCFLAGS="${RAWRGCCFLAGS} -DINTERRUPT"
762 fi #INTERRUPT version
766 MAKEFILE="$MAKEFILE.io"
767 echo "+++++++++++use Makefile.raw.io++++++++++++++++"
769 MAKEFILE="$MAKEFILE.$RAWCONFIG"
772 cp $ROBUSTROOT/Runtime/RAW/$MAKEFILE ./Makefile
777 cp ../Runtime/RAW/*.c ./
778 cp ../Runtime/RAW/*.h ./
779 cp ../Runtime/RAW/*.S ./
780 cp ../Runtime/RAW/*.s ./
781 cp ../$tmpbuilddirectory/*.c ./
782 cp ../$tmpbuilddirectory/*.h ./
788 TILERADIR="$CURDIR/tilera"
792 MAKEFILE="Makefile.tilera.$TILERACONFIG"
793 SIMHVC="sim.hvc.$TILERACONFIG"
794 PCIHVC="pci.hvc.$TILERACONFIG"
798 then # not only with 1 core
802 elif $TILERAZLINUXFLAG
803 then # TILERAZLINUXFLAG
804 TILERA_INDIR="ZLinux"
805 MAKEFILE="Makefile.tilera.$TILERACONFIG"
813 export TILERACFLAGS="-DTASK -DMULTICORE -DCLOSE_PRINT -DTILERA"
815 if $TILERAMEMPROFFLAG
816 then # not only with 1 core
817 PCIHVC="$PCIHVC.memprof"
818 TILERACFLAGS="${TILERACFLAGS} -DBAMBOO_MEMPROF"
823 TILERACFLAGS="${TILERACFLAGS} -DTILERA_BME"
824 elif $TILERAZLINUXFLAG
825 then # TILERAZLINUXFLAG
826 TILERACFLAGS="${TILERACFLAGS} -DTILERA_ZLINUX"
831 TILERACFLAGS="${TILERACFLAGS} -DCACHEFLUSH"
836 TILERACFLAGS="${TILERACFLAGS} -DRAWPATH"
841 TILERACFLAGS="${TILERACFLAGS} -DDEBUG"
845 then # profile version
846 TILERACFLAGS="${TILERACFLAGS} -DPROFILE"
849 if $ACCURATEPROFILEFLAG
850 then # accurateprofile version
851 TILERACFLAGS="${TILERACFLAGS} -DACCURATEPROFILE"
856 TILERACFLAGS="${TILERACFLAGS} -DUSEIO"
860 then #INTERRUPT version
861 TILERACFLAGS="${TILERACFLAGS} -DINTERRUPT"
862 fi #INTERRUPT version
865 then #MULTICOREGC version
866 TILERACFLAGS="${TILERACFLAGS} -DMULTICORE_GC -D${GCCORES}"
870 then # GC_PROFILE version
871 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE"
875 then # GC_PROFILE_S version
876 TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE_S"
880 then # SMEMLOCAL version
881 TILERACFLAGS="${TILERACFLAGS} -DSMEML"
885 then # SMEMFIXED version
886 TILERACFLAGS="${TILERACFLAGS} -DSMEMF"
890 then # SMEMMIXED version
891 TILERACFLAGS="${TILERACFLAGS} -DSMEMM"
895 then # SMEMGLOBAL version
896 TILERACFLAGS="${TILERACFLAGS} -DSMEMG"
900 then # CACHE_LOCAL version
901 TILERACFLAGS="${TILERACFLAGS} -DCACHE_LOCAL"
905 then # CACHE_RAN version
906 TILERACFLAGS="${TILERACFLAGS} -DCACHE_RAN"
909 if $GCCONTROLLERNEARFLAG
910 then # CONTROLLER_NEAR version
911 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_NEAR"
914 if $GCCONTROLLERREMOTEFLAG
915 then # CONTROLLER_REMOTE version
916 TILERACFLAGS="${TILERACFLAGS} -DCONTROLLER_REMOTE"
919 if $GCSMALLPAGESIZEFLAG
920 then # GC_SMALLPAGESIZE version
921 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE"
924 if $GCLARGEPAGESIZEFLAG
925 then # GC_LARGEPAGESIZE version
926 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGEPAGESIZE"
929 if $GCLARGESHAREDHEAPFLAG
930 then # GC_LARGESHAREDHEAP version
931 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP"
934 if $GCSMALLPAGESIZEFLAG2
935 then # GC_SMALLPAGESIZE2 version
936 TILERACFLAGS="${TILERACFLAGS} -DGC_SMALLPAGESIZE2"
939 if $GCLARGESHAREDHEAPFLAG2
940 then # GC_LARGESHAREDHEAP2 version
941 TILERACFLAGS="${TILERACFLAGS} -DGC_LARGESHAREDHEAP2"
945 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$MAKEFILE ./Makefile
948 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$SIMHVC ./sim.hvc
949 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/$PCIHVC ./pci.hvc
950 cp $ROBUSTROOT/Tilera/Runtime/$TILERA_INDIR/bamboo-vmlinux-pci.hvc ./bamboo-vmlinux-pci.hvc
952 cp ../Runtime/multicoretask.c ./
953 cp ../Runtime/multicoreruntime.c ./
954 cp ../Runtime/Queue.c ./
955 cp ../Runtime/file.c ./
956 cp ../Runtime/math.c ./
957 cp ../Runtime/object.c ./
958 cp ../Runtime/GenericHashtable.c ./
959 cp ../Runtime/SimpleHash.c ./
960 cp ../Runtime/GCSharedHash.c ./
961 cp ../Runtime/ObjectHash.c ./
962 cp ../Runtime/socket.c ./
963 cp ../Runtime/mem.c ./
964 cp ../Runtime/multicoregarbage.c ./
965 cp ../Runtime/MGCHash.c ./
966 cp ../Runtime/GenericHashtable.h ./
967 cp ../Runtime/mem.h ./
968 cp ../Runtime/multicoreruntime.h ./
969 cp ../Runtime/object.h ./
970 cp ../Runtime/ObjectHash.h ./
971 cp ../Runtime/Queue.h ./
972 cp ../Runtime/runtime.h ./
973 cp ../Runtime/SimpleHash.h ./
974 cp ../Runtime/GCSharedHash.h ./
975 cp ../Runtime/multicoregc.h ./
976 cp ../Runtime/multicoregarbage.h ./
977 cp ../Runtime/multicorehelper.h ./
978 cp ../Runtime/MGCHash.h ./
979 cp ../Tilera/Runtime/*.c ./
980 cp ../Tilera/Runtime/*.h ./
981 cp ../Tilera/Runtime/$TILERA_INDIR/*.c ./
982 cp ../Tilera/Runtime/$TILERA_INDIR/*.h ./
984 then # TILERAZLINUXFLAG
985 cp ../Tilera/Runtime/$TILERA_INDIR/*.S ./
987 #if $TILERAMEMPROFFLAG
988 #then # TILERAMEMPROFFLAG
989 cp ../Tilera/Runtime/$TILERA_INDIR/linux_client.c ./
991 cp ../Tilera/lib/* ./
992 cp ../$tmpbuilddirectory/*.c ./
993 cp ../$tmpbuilddirectory/*.h ./
997 else #!RAWFLAG && !TILERABMEFLAG && ! TILERAZLINUXFLAG
1000 INCLUDES="$INCLUDES -I$ROBUSTROOT/Runtime -I. -IRuntime/include \
1005 RUNTIMEFILE="$ROBUSTROOT/Runtime/multicoreruntime.c $ROBUSTROOT/Runtime/multicoretask.c"
1007 RUNTIMEFILE="$ROBUSTROOT/Runtime/runtime.c $ROBUSTROOT/Runtime/task.c"
1010 FILES="$RUNTIMEFILE \
1011 $ROBUSTROOT/Runtime/file.c $ROBUSTROOT/Runtime/Queue.c \
1012 $ROBUSTROOT/Runtime/SimpleHash.c $ROBUSTROOT/Runtime/option.c \
1013 $ROBUSTROOT/Runtime/ObjectHash.c \
1014 $ROBUSTROOT/Runtime/garbage.c $ROBUSTROOT/Runtime/socket.c \
1015 $ROBUSTROOT/Runtime/math.c \
1016 $ROBUSTROOT/Runtime/GenericHashtable.c $ROBUSTROOT/Runtime/object.c"
1020 FILES="$FILES $ROBUSTROOT/Runtime/affinity.c"
1025 FILES="$FILES $ROBUSTROOT/Runtime/STM/monitor.c"
1030 FILES="$FILES $ROBUSTROOT/Runtime/memcpy32.o $ROBUSTROOT/Runtime/instrset32.o"
1037 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRECOVERYRUNTIME"
1038 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"
1040 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -DDSTM -I$DSMRUNTIME"
1041 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"
1047 EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -I$STMRUNTIME"
1048 FILES="$FILES $STMRUNTIME/stmlock.c $STMRUNTIME/stm.c $STMRUNTIME/stmlookup.c $ROBUSTROOT/Runtime/thread.c $STMRUNTIME/stats.c $STMRUNTIME/commit.c $STMRUNTIME/objstr.c"
1055 FILES="$FILES $DSMRUNTIME/sandbox.c"
1057 FILES="$FILES $STMRUNTIME/sandbox.c"
1063 FILES="$FILES $DSMRUNTIME/abortreaders.c"
1068 FILES="$FILES $ROBUSTROOT/Runtime/localobjects.c"
1073 FILES="$FILES $ROBUSTROOT/Runtime/coreprof/coreprof.c"
1078 FILES="$FILES $ROBUSTROOT/Runtime/mlp_runtime.c"
1079 FILES="$FILES $ROBUSTROOT/Runtime/psemaphore.c"
1080 FILES="$FILES $ROBUSTROOT/Runtime/workschedule.c"
1085 EXTRAOPTIONS="$EXTRAOPTIONS -DTASK"
1088 EXTRAOPTIONS="$EXTRAOPTIONS -DMULTICORE"
1090 FILES="$FILES $tmpbuilddirectory/taskdefs.c $ROBUSTROOT/Runtime/checkpoint.c $ROBUSTROOT/Runtime/chash.c"
1093 EXTRAOPTIONS="$EXTRAOPTIONS -DRAW"
1095 if $THREADSIMULATEFLAG
1097 # -lpthread for pthread functions, -lrt for message queue functions
1098 EXTRAOPTIONS="$EXTRAOPTIONS -DTHREADSIMULATE -lpthread -lrt"
1104 EXTRAOPTIONS="$EXTRAOPTIONS -DOPTIONAL"
1105 FILES="$FILES $tmpbuilddirectory/optionalarrays.c"
1110 FILES="$FILES $ROBUSTROOT/Runtime/thread.c"
1115 EXTRAOPTIONS="$EXTRAOPTIONS -DCONSCHECK $BUILDDIR/specdir/*.o"
1116 INCLUDES="$INCLUDES -I$BUILDDIR/specdir"
1121 EXTRAOPTIONS="$EXTRAOPTIONS -ldmalloc -DDMALLOC"
1126 gcc -S $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1127 -c $tmpbuilddirectory/methods.c -lm
1132 gcc $INCLUDES $EXTRAOPTIONS \
1133 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin
1135 gcc $INCLUDES $EXTRAOPTIONS -DPRECISE_GC \
1136 $tmpbuilddirectory/methods.c $FILES -lm -o $MAINFILE.bin