echo "-useprofile use profiling data for scheduling (should be used together with -raw)"
echo -printscheduling print out scheduling graphs
echo -printschedulesim print out scheduling simulator result graphs
+echo "-tilera_output_dir specify the output directory for the generated TILERA code"
echo "-tilera_bme generate tilera version binary for Bare Mental Environment (should be used together with -multicore"
echo "-tilera_zlinux generate tilera version binary for Zero-Overhead Linux with multi-process mode (should be used together with -multicore"
echo "-tileraconfig config tilera simulator/pci as nxm (should be used together with -tilera)"
echo "-useio use standard io to output profiling data (should be used together with -raw and -profile), it only works with single core version"
echo
echo Multicore GC options
+echo -perfcount performance counters
echo -multicoregc generate multi-core binary with garbage collection
echo -pmc parallel collector
echo "-numcore4gc set the number of cores for gc (should be used together with -multicoregc), defaultly set as 0"
INTERRUPTFLAG=false
THREADSIMULATEFLAG=false;
MULTICOREGCFLAG=false;
+PERFCOUNT=false;
PMCFLAG=false;
GCMEMLOCALFLAG=false;
GCMEMFIXEDFLAG=false;
GCCORES=''
TILERAN1COREFLAG=false
TILERA56COREFLAG=false
+TILERAOUTPUTDIR=''
if [[ -z $1 ]]
then
then
RAWFLAG=true
JAVAOPTS="$JAVAOPTS -raw"
+elif [[ $1 = '-tilera_output_dir' ]]
+then
+TILERAOUTPUTDIR="$2"
+shift
elif [[ $1 = '-tilera_bme' ]]
then
TILERAFLAG=true
then
PMCFLAG=true
JAVAOPTS="$JAVAOPTS -pmc"
+elif [[ $1 = '-perfcount' ]]
+then
+PERFCOUNT=true
elif [[ $1 = '-gcmem_local' ]]
then
GCMEMLOCALFLAG=true
elif $TILERAFLAG
then # TILERAFLAG
-TILERADIR="$CURDIR/tilera"
+TILERADIR="$CURDIR/${TILERAOUTPUTDIR}"
if $TILERABMEFLAG
then # TILERABMEFLAG
TILERA_INDIR="BME"
TILERACFLAGS="${TILERACFLAGS} -DPMC_GC -D${GCCORES}"
fi
+if $PERFCOUNT
+then #MULTICOREGC version
+TILERACFLAGS="${TILERACFLAGS} -DPERFCOUNT"
+fi
+
if $GCPROFILEFLAG
then # GC_PROFILE version
TILERACFLAGS="${TILERACFLAGS} -DGC_PROFILE"
cp ../$tmpbuilddirectory/*.c ./
cp ../$tmpbuilddirectory/*.h ./
-echo $TILERA_CFLAGS
+echo $TILERACFLAGS > ./tileracflags.txt
make