From a02787bf176dbdd1ecd9aa50ef5aadf82ab0af50 Mon Sep 17 00:00:00 2001 From: adash Date: Wed, 1 Apr 2009 21:25:33 +0000 Subject: [PATCH] add new option -singleTM for committing transactions on a single machine --- Robust/src/IR/State.java | 1 + Robust/src/Main/Main.java | 3 +++ Robust/src/buildscript | 12 ++++++++++++ 3 files changed, 16 insertions(+) diff --git a/Robust/src/IR/State.java b/Robust/src/IR/State.java index 9a911461..083cfada 100644 --- a/Robust/src/IR/State.java +++ b/Robust/src/IR/State.java @@ -79,6 +79,7 @@ public class State { public static boolean PRINTSCHEDULESIM=false; public static boolean PRINTCRITICALPATH=false; public static boolean ABORTREADERS=false; + public static boolean SINGLETM=false; public int CORENUM = 1; public String structfile; public String main; diff --git a/Robust/src/Main/Main.java b/Robust/src/Main/Main.java index 0430dd0e..0c6c2b7b 100644 --- a/Robust/src/Main/Main.java +++ b/Robust/src/Main/Main.java @@ -139,6 +139,8 @@ public class Main { state.THREAD=true; else if (option.equals("-dsm")) state.DSM=true; + else if (option.equals("-singleTM")) + state.SINGLETM=true; else if (option.equals("-webinterface")) state.WEBINTERFACE=true; else if (option.equals("-instructionfailures")) @@ -154,6 +156,7 @@ public class Main { System.out.println("-struct structfile -- output structure declarations for repair tool"); System.out.println("-mainclass -- main function to call"); System.out.println("-dsm -- distributed shared memory support"); + System.out.println("-singleTM -- single machine committing transactions"); System.out.println("-abortreaders -- abort readers"); System.out.println("-precise -- use precise garbage collection"); System.out.println("-conscheck -- turn on consistency checking"); diff --git a/Robust/src/buildscript b/Robust/src/buildscript index b07b3485..427f3b54 100755 --- a/Robust/src/buildscript +++ b/Robust/src/buildscript @@ -3,6 +3,7 @@ printhelp() { echo -robustroot set up the ROBUSTROOT to directory other than default one echo -dsm distributed shared memory +echo -singleTM single machine committing transactions echo -abortreaders abort readers immediately echo -trueprob double - probabiltiy of true branch echo -dsmcaching -enable caching in dsm runtime @@ -57,6 +58,7 @@ DSMRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface/ REPAIRROOT=~/research/Repair/RepairCompiler/ CURDIR=`pwd` DSMFLAG=false +SINGLETM=false NOJAVA=false CHECKFLAG=false RECOVERFLAG=false @@ -136,6 +138,10 @@ elif [[ $1 = '-dsm' ]] then JAVAOPTS="$JAVAOPTS -dsm" DSMFLAG=true +elif [[ $1 = '-singleTM' ]] +then +JAVAOPTS="$JAVAOPTS -singleTM" +SINGLETM=true elif [[ $1 = '-prefetch' ]] then JAVAOPTS="$JAVAOPTS -prefetch" @@ -469,6 +475,12 @@ fi FILES="$FILES $DSMRUNTIME/trans.c $DSMRUNTIME/mcpileq.c $DSMRUNTIME/objstr.c $DSMRUNTIME/dstm.c $DSMRUNTIME/mlookup.c $DSMRUNTIME/clookup.c $DSMRUNTIME/llookup.c $DSMRUNTIME/threadnotify.c $DSMRUNTIME/dstmserver.c $DSMRUNTIME/plookup.c $DSMRUNTIME/ip.c $DSMRUNTIME/queue.c $DSMRUNTIME/prelookup.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" fi +if $SINGLETM +then +EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DCOMPILER -I$DSMRUNTIME" +FILES="$FILES $DSMRUNTIME/singleTMCommit.c $DSMRUNTIME/objstr.c $DSMRUNTIME/clookup.c $DSMRUNTIME/threadnotify.c" +fi + if $ABORTREADERS then FILES="$FILES $DSMRUNTIME/abortreaders.c" -- 2.34.1