add new option
authorbdemsky <bdemsky>
Tue, 13 Oct 2009 23:37:32 +0000 (23:37 +0000)
committerbdemsky <bdemsky>
Tue, 13 Oct 2009 23:37:32 +0000 (23:37 +0000)
try to start to organize these options

Robust/src/IR/Flat/BuildCode.java
Robust/src/IR/State.java
Robust/src/Main/Main.java
Robust/src/buildscript

index 9518574b8fea17657d5fb79a92d58bf53f27005a..9df8f12226fa897d7f4fa0e0a11f300cadf131e7 100644 (file)
@@ -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;");
 
index ebec6914f8cac4f9f461a4cc532006b4b7678ba1..6eadf3edc4b6d227c887a4e6669967ee954260c0 100644 (file)
@@ -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<ClassDescriptor, Hashtable<OptionalTaskDescriptor, OptionalTaskDescriptor>> optionaltaskdescriptors;
   private Hashtable<ClassDescriptor, Hashtable<FlagState, Set<OptionalTaskDescriptor>>> analysisresults;
index aca4013747b6a5632ad419d33b0d27fad7b78813..c5f146563337a1d4b07b91386c3ff43a5c577751 100644 (file)
@@ -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;
index e8be268d1a4e74f720fdb65981911b0371604850..f15b2f55e40c758b045b7e6f61a3eab915498132 100755 (executable)
@@ -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"