From 5619b51d907ac76ae554a8aae2c24799ce004ee7 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Tue, 13 Oct 2009 23:37:32 +0000 Subject: [PATCH] add new option try to start to organize these options --- Robust/src/IR/Flat/BuildCode.java | 5 +++++ Robust/src/IR/State.java | 15 +++++++++------ Robust/src/Main/Main.java | 2 ++ Robust/src/buildscript | 26 +++++++++++++++++++------- 4 files changed, 35 insertions(+), 13 deletions(-) diff --git a/Robust/src/IR/Flat/BuildCode.java b/Robust/src/IR/Flat/BuildCode.java index 9518574b..9df8f122 100644 --- a/Robust/src/IR/Flat/BuildCode.java +++ b/Robust/src/IR/Flat/BuildCode.java @@ -633,6 +633,11 @@ public class BuildCode { } printClassStruct(typeutil.getClass(TypeUtil.ObjectClass), outclassdefs); + if (state.STMARRAY) { + outclassdefs.println(" int lowindex;"); + outclassdefs.println(" int highindex;"); + } + if (state.ARRAYPAD) outclassdefs.println(" int paddingforarray;"); diff --git a/Robust/src/IR/State.java b/Robust/src/IR/State.java index ebec6914..6eadf3ed 100644 --- a/Robust/src/IR/State.java +++ b/Robust/src/IR/State.java @@ -51,8 +51,6 @@ public class State { public boolean MINIMIZE=false; public boolean TASK=false; public boolean FASTCHECK=false; - public boolean DSM=false; - public boolean DSMTASK=false; public boolean PREFETCH=false; public boolean TASKSTATE=false; public boolean TAGSTATE=false; @@ -61,7 +59,7 @@ public class State { public boolean FLATIRGRAPHUSERMETHODS=false; public boolean FLATIRGRAPHLIBMETHODS=false; public boolean MULTICORE=false; - public boolean MULTICOREGC=false; + public boolean MULTICOREGC=false; public boolean OWNERSHIP=false; public int OWNERSHIPALLOCDEPTH=3; public boolean OWNERSHIPWRITEDOTS=false; @@ -88,10 +86,18 @@ public class State { public static boolean PRINTSCHEDULING=false; public static boolean PRINTSCHEDULESIM=false; public static boolean PRINTCRITICALPATH=false; + //DSM options + public boolean DSM=false; + public boolean DSMTASK=false; public static boolean ABORTREADERS=false; + //STM options + public static boolean STMARRAY=false; public static boolean SINGLETM=false; public static boolean READSET=false; public boolean SANDBOX=false; + public boolean DCOPTS=false; + public boolean DELAYCOMP=false; + //Other options public int CORENUM = 1; public String structfile; public String main; @@ -112,9 +118,6 @@ public class State { private int numtasks=0; private int arraycount=0; public boolean OPTIMIZE=false; - public boolean DCOPTS=false; - public boolean DELAYCOMP=false; - private Hashtable> optionaltaskdescriptors; private Hashtable>> analysisresults; diff --git a/Robust/src/Main/Main.java b/Robust/src/Main/Main.java index aca40137..c5f14656 100644 --- a/Robust/src/Main/Main.java +++ b/Robust/src/Main/Main.java @@ -117,6 +117,8 @@ public class Main { state.TASKSTATE=true; else if (option.equals("-tagstate")) state.TAGSTATE=true; + else if (option.equals("-stmarray")) + state.STMARRAY=true; else if (option.equals("-flatirtasks")) { state.FLATIRGRAPH=true; state.FLATIRGRAPHTASKS=true; diff --git a/Robust/src/buildscript b/Robust/src/buildscript index e8be268d..f15b2f55 100755 --- a/Robust/src/buildscript +++ b/Robust/src/buildscript @@ -1,24 +1,32 @@ #!/bin/bash printhelp() { -echo -robustroot set up the ROBUSTROOT to directory other than default one -echo -dsm distributed shared memory +echo STM Options echo -singleTM single machine committing transactions -echo -readset turn on readset echo -stmdebug STM debug echo "-stmstats prints single machine commit (stm) statistics for the benchmark" echo -fastmemcpy use fast memcpy -echo -abortreaders abort readers immediately echo -sandbox sandbox transactions +echo -dcopts conflict optimizations for transactional memory +echo -transstats generates transaction stats on commits and aborts +echo -inlineatomic depth inline methods inside of transactions to specified depth +echo "-stmarray partial array treatment" +echo +echo DSM options +echo -dsm distributed shared memory +echo -abortreaders abort readers immediately echo -trueprob double - probabiltiy of true branch echo -dsmcaching -enable caching in dsm runtime +echo +echo Other options +echo -robustroot set up the ROBUSTROOT to directory other than default one +echo -readset turn on readset echo -mac distributed shared memory mac support echo -check generate check code echo -dmalloc link in dmalloc echo -64bit compile for 64 bit machine echo -32bit compile for 32 bit machine echo -joptimize java compiler optimizations -echo -dcopts conflict optimizations for transactional memory echo -recover compile task code echo -fastcheck fast checkpointing for Bristlecone echo -specdir directory @@ -45,11 +53,9 @@ echo -threadsimulate generate multi-thread simulate version binary echo -optional enable optional echo -debug generate debug symbols echo -prefetch do prefetch analysis -echo -transstats generates transaction stats on commits and aborts echo -garbagestats Print garbage collection statistics echo -webinterface enable web interface echo -runtimedebug printout runtime debug messages -echo -inlineatomic depth inline methods inside of transactions to specified depth echo "-thread use support for multiple threads" echo "-optimize call gcc with -O9 (optimize)" echo "-nooptimize call gcc with -O0 (do not optimize)" @@ -81,6 +87,7 @@ CURDIR=`pwd` DSMFLAG=false DSMRECOVERY=false FASTMEMCPY=false +STMARRAY=false STM=false NOJAVA=false CHECKFLAG=false @@ -194,6 +201,11 @@ then JAVAOPTS="$JAVAOPTS -singleTM" EXTRAOPTIONS="$EXTRAOPTIONS -DSTM" STM=true +elif [[ $1 = '-stmarray' ]] +then +JAVAOPTS="$JAVAOPTS -stmarray" +EXTRAOPTIONS="$EXTRAOPTIONS -DSTMARRAY" +STMARRAY=true elif [[ $1 = '-readset' ]] then JAVAOPTS="$JAVAOPTS -readset" -- 2.34.1