}
char value;
-
- public Character( char c ) {
+
+ public Character(char c) {
value = c;
}
- public Character( Character c ) {
+ public Character(Character c) {
value = c.value;
}
public static boolean isWhitespace(char character) {
boolean returnValue;
if ( (character == '\t') ||
- (character == '\n') ||
- (character == ' ') ||
- (character == '\u000C') ||
- (character == '\u001C') ||
- (character == '\u001D') ||
- (character == '\u001E') ||
- (character == '\u001F'))
- {
- returnValue = true;
+ (character == '\n') ||
+ (character == ' ') ||
+ (character == '\u000C') ||
+ (character == '\u001C') ||
+ (character == '\u001D') ||
+ (character == '\u001E') ||
+ (character == '\u001F')) {
+ returnValue = true;
} else {
returnValue = false;
}
public String readLine() {
String line = "";
int c = read();
-
+
// if we're already at the end of the file
// or there is an error, don't even return
// the empty string
- if( c <= 0 ) {
+ if( c <= 0 ) {
return null;
}
c = read();
}
- // peek and consume characters that are carriage
+ // peek and consume characters that are carriage
// returns or line feeds so the whole line is read
// and returned, and none of the line-ending chars
c = peek();
}
public void remove() {
- System.out.println( "HashMapIterator.remove() not implemented." );
- System.exit( -1 );
+ System.out.println("HashMapIterator.remove() not implemented.");
+ System.exit(-1);
}
}
public class Hashtable extends HashMap
{
public Hashtable() {
- HashMap(16, 0.75f);
+ HashMap(16, 0.75f);
}
public Hashtable(int initialCapacity) {
return String.valueOf(value);
}
- public static String toString( int i ) {
- Integer I = new Integer( i );
+ public static String toString(int i) {
+ Integer I = new Integer(i);
return I.toString();
}
public class Iterator {
boolean hasNext() {
- System.out.println( "Iterator is an abstract class." );
+ System.out.println("Iterator is an abstract class.");
System.exit(-1);
}
Object next() {
- System.out.println( "Iterator is an abstract class." );
+ System.out.println("Iterator is an abstract class.");
System.exit(-1);
}
void remove() {
- System.out.println( "Iterator is an abstract class." );
+ System.out.println("Iterator is an abstract class.");
System.exit(-1);
- }
+ }
}
public LinkedListElement prev;
public Object element;
- public LinkedListElement( Object e,
- LinkedListElement n,
- LinkedListElement p ) {
+ public LinkedListElement(Object e,
+ LinkedListElement n,
+ LinkedListElement p) {
element = e;
next = n;
prev = p;
clear();
}
- public add( Object o ) {
+ public add(Object o) {
if( tail == null ) {
- head = new LinkedListElement( o, null, null );
+ head = new LinkedListElement(o, null, null);
tail = head;
} else {
- tail.next = new LinkedListElement( o, null, tail );
+ tail.next = new LinkedListElement(o, null, tail);
tail = tail.next;
}
size++;
}
- public addFirst( Object o ) {
+ public addFirst(Object o) {
if( head == null ) {
- head = new LinkedListElement( o, null, null );
+ head = new LinkedListElement(o, null, null);
tail = head;
} else {
- head.prev = new LinkedListElement( o, head, null );
+ head.prev = new LinkedListElement(o, head, null);
head = head.prev;
}
size++;
}
- public addLast( Object o ) {
- add( o );
+ public addLast(Object o) {
+ add(o);
}
public clear() {
}
public Object clone() {
- System.out.println( "LinkedList.clone() not implemented." );
+ System.out.println("LinkedList.clone() not implemented.");
System.exit(-1);
}
- public boolean contains( Object o ) {
+ public boolean contains(Object o) {
LinkedListElement e = head;
if (o==null) {
while(e!=null) {
if (e.element==null) {
return true;
- }
- e=e.next;
+ }
+ e=e.next;
}
return false;
} else {
while( e != null ) {
- if (o.equals(e.element)) {
- return true;
- }
- e = e.next;
+ if (o.equals(e.element)) {
+ return true;
+ }
+ e = e.next;
}
}
return false;
if( tail == null ) {
return null;
}
- return tail.element;
+ return tail.element;
}
public Object element() {
public Object removeFirst() {
if( head == null ) {
- System.out.println( "LinkedList: illegal removeFirst()" );
+ System.out.println("LinkedList: illegal removeFirst()");
System.exit(-1);
}
Object o = head.element;
public Object removeLast() {
if( tail == null ) {
- System.out.println( "LinkedList: illegal removeLast()" );
+ System.out.println("LinkedList: illegal removeLast()");
System.exit(-1);
}
Object o = tail.element;
return o;
}
- public void remove( Object o ) {
+ public void remove(Object o) {
if( head == null ) {
- System.out.println( "LinkedList: illegal remove( Object o )" );
+ System.out.println("LinkedList: illegal remove( Object o )");
System.exit(-1);
}
LinkedListElement e = head;
}
e = e.next;
}
- System.out.println( "LinkedList: illegal remove( Object o ), "+o+" not found" );
- System.exit(-1);
+ System.out.println("LinkedList: illegal remove( Object o ), "+o+" not found");
+ System.exit(-1);
}
public Object pop() {
return o;
}
- public void push( Object o ) {
- addFirst( o );
+ public void push(Object o) {
+ addFirst(o);
}
public Iterator iterator() {
- return new LinkedListIterator( this );
+ return new LinkedListIterator(this);
}
}
LinkedList ll;
LinkedListElement itr;
Object removeable;
-
- public LinkedListIterator( LinkedList ll ) {
+
+ public LinkedListIterator(LinkedList ll) {
this.ll = ll;
itr = ll.head;
removeable = null;
public Object next() {
if( itr == null ) {
- System.out.println( "LinkedListIterator: illegal next()" );
+ System.out.println("LinkedListIterator: illegal next()");
System.exit(-1);
}
removeable = itr.element;
public void remove() {
if( removeable == null ) {
- System.out.println( "LinkedListIterator: illegal remove()" );
+ System.out.println("LinkedListIterator: illegal remove()");
System.exit(-1);
}
- ll.remove( removeable );
+ ll.remove(removeable);
removeable = null;
}
}
private int bottom;
private int[] stack;
-
+
public PushbackInputStream(FileInputStream fis) {
in = fis;
max = 1000;
stack = new int[max];
}
-
+
public int read() {
int v;
// put whatever it is in the ring buffer
ring[index] = v;
-
+
// keep ring buffer index
- ++index;
- if( index == max ) {
- index = 0;
+ ++index;
+ if( index == max ) {
+ index = 0;
}
// user gets what they want
// the unread stack can only get so high
if( top == max ) {
- System.printString( "PushbackInputStream: max reached" );
- System.exit( -1 );
+ System.printString("PushbackInputStream: max reached");
+ System.exit(-1);
}
// put it on the unread stack
stack[top] = ring[index];
- }
+ }
}
\ No newline at end of file
}
public int readAll(byte[] b) {
- int offset=read(b);
- if (offset<0)
- return offset;
- int toread=b.length-offset;
- while(toread>0) {
- byte[] t=new byte[toread];
- int rd=read(t);
- if (rd<0)
- return rd;
- for(int i=0;i<rd;i++)
- b[i+offset]=t[i];
- offset+=rd;
- toread-=rd;
- }
- return b.length;
+ int offset=read(b);
+ if (offset<0)
+ return offset;
+ int toread=b.length-offset;
+ while(toread>0) {
+ byte[] t=new byte[toread];
+ int rd=read(t);
+ if (rd<0)
+ return rd;
+ for(int i=0; i<rd; i++)
+ b[i+offset]=t[i];
+ offset+=rd;
+ toread-=rd;
+ }
+ return b.length;
}
public void close() {
for(i = 0; decimal != nodecimal; i++) {
long basePower = 1;
for(int x=0; x<i; x++) {
- basePower*= 10;
+ basePower*= 10;
}
nodecimal = (long) (val*basePower);
decimal = val*basePower;
for(j = 0; decimal >= 0; j++) {
long basePower = 1;
for(int x=0; x<j; x++) {
- basePower*= 10;
+ basePower*= 10;
}
nodecimal = (long) (valueA - basePower);
decimal = (double) nodecimal;
decimal = 0;
for(k = j; k > 0; k--) {
- if(k == i) //if a decimal point was previously found
- { //insert it where its meant to be
- output.append((char)46);
+ if(k == i) { //if a decimal point was previously found
+ //insert it where its meant to be
+ output.append((char)46);
}
long basePower = 1;
for(int x=0; x<(k-1); x++) {
- basePower*= 10;
+ basePower*= 10;
}
nodecimal = ((long) (valueA - decimal) / basePower);
decimal += nodecimal*basePower;
return new String(chararray);
}
- public int compareTo( String s ) {
+ public int compareTo(String s) {
int lenDiff = this.length() - s.length();
if( lenDiff != 0 ) {
return lenDiff;
- }
+ }
for( int i = 0; i < this.length(); ++i ) {
int valDiff = this.charAt(i) - s.charAt(i);
if( valDiff != 0 ) {
public static void println(String s) {
System.printString(s+"\n");
}
-
+
public static void println(Object o) {
System.printString(""+o+"\n");
}
public static void println(double o) {
System.printString(""+o+"\n");
}
-
+
public static void print(String s) {
System.printString(s);
}
public static void print(double o) {
System.printString(""+o);
}
-
+
public static void error() {
System.printString("Error (Use Breakpoint on ___System______error method for more information!)\n");
}
array=new Object[10];
}
- public Vector( int size ) {
+ public Vector(int size) {
capacityIncrement=0;
this.size=0;
array=new Object[size];
state=st;
callgraph=new CallGraph(state);
if (state.SINGLETM)
- oidstr="___objlocation___";
+ oidstr="___objlocation___";
this.temptovar=temptovar;
paramstable=new Hashtable();
tempstable=new Hashtable();
nonSESEpass = false;
while( !setSESEtoGen.isEmpty() ) {
FlatSESEEnterNode fsen = setSESEtoGen.iterator().next();
- setSESEtoGen.remove( fsen );
- generateMethodSESE( fsen, fsen.getEnclosingFlatMeth(), null, outmethod );
+ setSESEtoGen.remove(fsen);
+ generateMethodSESE(fsen, fsen.getEnclosingFlatMeth(), null, outmethod);
}
} else {
assert setSESEtoGen.isEmpty();
outmethod.println("int main(int argc, const char *argv[]) {");
outmethod.println(" int i;");
if (state.DSM) {
- outmethod.println("#ifdef TRANSSTATS \n");
- outmethod.println("handle();\n");
- outmethod.println("#endif\n");
+ outmethod.println("#ifdef TRANSSTATS \n");
+ outmethod.println("handle();\n");
+ outmethod.println("#endif\n");
}
if (state.THREAD||state.DSM||state.SINGLETM) {
outmethod.println("initializethreads();");
- outmethod.println("#ifdef STMSTATS \n");
- outmethod.println(" for(i=0; i<TOTALNUMCLASSANDARRAY; i++) {\n");
- outmethod.println(" typesCausingAbort[i] = 0;\n");
- outmethod.println(" }\n");
+ outmethod.println("#ifdef STMSTATS\n");
+ outmethod.println(" for(i=0; i<TOTALNUMCLASSANDARRAY; i++) {");
+ outmethod.println(" typesCausingAbort[i] = 0;");
+ outmethod.println(" }");
outmethod.println("#endif\n");
}
if (state.DSM) {
outmethod.println("printf(\"numTransCommit= %d\\n\", numTransCommit);");
outmethod.println("printf(\"nSoftAbort= %d\\n\", nSoftAbort);");
if (state.DSM) {
- outmethod.println("printf(\"nchashSearch= %d\\n\", nchashSearch);");
- outmethod.println("printf(\"nmhashSearch= %d\\n\", nmhashSearch);");
- outmethod.println("printf(\"nprehashSearch= %d\\n\", nprehashSearch);");
- outmethod.println("printf(\"nRemoteReadSend= %d\\n\", nRemoteSend);");
- outmethod.println("printf(\"bytesSent= %d\\n\", bytesSent);");
- outmethod.println("printf(\"bytesRecv= %d\\n\", bytesRecv);");
+ outmethod.println("printf(\"nchashSearch= %d\\n\", nchashSearch);");
+ outmethod.println("printf(\"nmhashSearch= %d\\n\", nmhashSearch);");
+ outmethod.println("printf(\"nprehashSearch= %d\\n\", nprehashSearch);");
+ outmethod.println("printf(\"nRemoteReadSend= %d\\n\", nRemoteSend);");
+ outmethod.println("printf(\"bytesSent= %d\\n\", bytesSent);");
+ outmethod.println("printf(\"bytesRecv= %d\\n\", bytesRecv);");
} else if (state.SINGLETM) {
- outmethod.println("printf(\"nSoftAbortAbort= %d\\n\", nSoftAbortAbort);");
- outmethod.println("printf(\"nSoftAbortCommit= %d\\n\", nSoftAbortCommit);");
- outmethod.println("for(i=0; i<TOTALNUMCLASSANDARRAY; i++) {\n");
- outmethod.println(" printf(\"typesCausingAbort[%d]= %d\\n\", i, typesCausingAbort[i]);\n");
- outmethod.println("}\n");
- outmethod.println("fflush(stdout);");
+ outmethod.println("printf(\"nSoftAbortAbort= %d\\n\", nSoftAbortAbort);");
+ outmethod.println("printf(\"nSoftAbortCommit= %d\\n\", nSoftAbortCommit);");
+ outmethod.println("#ifdef STMSTATS\n");
+ outmethod.println("for(i=0; i<TOTALNUMCLASSANDARRAY; i++) {\n");
+ outmethod.println(" printf(\"typesCausingAbort[%d]= %d\\n\", i, typesCausingAbort[i]);\n");
+ outmethod.println("}\n");
+ outmethod.println("#endif\n");
+ outmethod.println("fflush(stdout);");
}
outmethod.println("#endif\n");
}
if (state.THREAD||state.SINGLETM)
- outmethod.println("pthread_exit(NULL);");
+ outmethod.println("pthread_exit(NULL);");
outmethod.println("}");
outmethod.println("#include \"localobjects.h\"");
}
if (state.FASTCHECK) {
- outmethod.println("#include \"localobjects.h\"");
+ outmethod.println("#include \"localobjects.h\"");
}
if(state.MULTICORE) {
outmethod.println("#include \"task.h\"");
outclassdefs.print("extern int numTransCommit;\n");
outclassdefs.print("extern int nSoftAbort;\n");
if (state.DSM) {
- outclassdefs.print("extern int nchashSearch;\n");
- outclassdefs.print("extern int nmhashSearch;\n");
- outclassdefs.print("extern int nprehashSearch;\n");
- outclassdefs.print("extern int nRemoteSend;\n");
- outclassdefs.print("extern int bytesSent;\n");
- outclassdefs.print("extern int bytesRecv;\n");
- outclassdefs.print("extern void handle();\n");
+ outclassdefs.print("extern int nchashSearch;\n");
+ outclassdefs.print("extern int nmhashSearch;\n");
+ outclassdefs.print("extern int nprehashSearch;\n");
+ outclassdefs.print("extern int nRemoteSend;\n");
+ outclassdefs.print("extern int bytesSent;\n");
+ outclassdefs.print("extern int bytesRecv;\n");
+ outclassdefs.print("extern void handle();\n");
} else if (state.SINGLETM) {
- outclassdefs.println("extern int nSoftAbortAbort;");
- outclassdefs.println("extern int nSoftAbortCommit;");
- outclassdefs.println("extern int typesCausingAbort[];");
+ outclassdefs.println("extern int nSoftAbortAbort;");
+ outclassdefs.println("extern int nSoftAbortCommit;");
+ outclassdefs.println("#ifdef STMSTATS\n");
+ outclassdefs.println("extern int typesCausingAbort[];");
+ outclassdefs.println("#endif\n");
}
outclassdefs.print("#endif\n");
outclassdefs.print("int numprefetchsites = " + pa.prefetchsiteid + ";\n");
outclassdefs.print("sizeof(struct "+cdarray[i].getSafeSymbol()+")");
needcomma=true;
}
-
+
arraytable=new TypeDescriptor[state.numArrays()];
outclassdefs.println("};");
- ClassDescriptor objectclass=typeutil.getClass(TypeUtil.ObjectClass);
+ ClassDescriptor objectclass=typeutil.getClass(TypeUtil.ObjectClass);
needcomma=false;
outclassdefs.print("int typearray[]={");
- for(int i=0;i<state.numClasses();i++) {
+ for(int i=0; i<state.numClasses(); i++) {
ClassDescriptor cd=cdarray[i];
ClassDescriptor supercd=cd.getSuperDesc();
if (needcomma)
needcomma=true;
}
- for(int i=0;i<state.numArrays();i++) {
+ for(int i=0; i<state.numArrays(); i++) {
TypeDescriptor arraytd=arraytable[i];
ClassDescriptor arraycd=arraytd.getClassDesc();
if (arraycd==null) {
needcomma=true;
}
- outclassdefs.println("};");
+ outclassdefs.println("};");
needcomma=false;
outclassdefs.print("int typearray2[]={");
- for(int i=0;i<state.numArrays();i++) {
+ for(int i=0; i<state.numArrays(); i++) {
TypeDescriptor arraytd=arraytable[i];
ClassDescriptor arraycd=arraytd.getClassDesc();
if (arraycd==null) {
ClassDescriptor cd=arraycd.getSuperDesc();
int level=arraytd.getArrayCount()-1;
int type=-1;
- for(;level>0;level--) {
+ for(; level>0; level--) {
TypeDescriptor supertd=new TypeDescriptor(objectclass);
supertd.setArrayCount(level);
type=state.getArrayNumber(supertd);
if (lb!=null) {
paramstable.put(lb, objectparams);
backuptable.put(lb, new Hashtable<TempDescriptor, TempDescriptor>());
- }
- else if (md!=null)
+ } else if (md!=null)
paramstable.put(md, objectparams);
else
paramstable.put(task, objectparams);
}
}
- generateCode( fm.getNext(0), fm, lb, null, output );
+ generateCode(fm.getNext(0), fm, lb, null, output);
output.println("}\n\n");
}
- protected void generateMethodSESE( FlatSESEEnterNode fsen,
- FlatMethod fm,
- LocalityBinding lb,
- PrintWriter output ) {
+ protected void generateMethodSESE(FlatSESEEnterNode fsen,
+ FlatMethod fm,
+ LocalityBinding lb,
+ PrintWriter output) {
//output.println( "void _SESE"+fsen.getPrettyIdentifier()+
- //" {\n" );
+ //" {\n" );
//generateCode( fsen.getNext(0), fm, lb, fsen.getFlatExit(), output );
//output.println( "}\n\n" );
/*
- output.println("struct sese"+faen.getPrettyIdentifier()+"in {");
- Iterator<TempDescriptor> itr = faen.getInVarSet().iterator();
- while( itr.hasNext() ) {
- TempDescriptor td = itr.next();
- output.println(" "+td+";");
- }
- output.println("}");
+ output.println("struct sese"+faen.getPrettyIdentifier()+"in {");
+ Iterator<TempDescriptor> itr = faen.getInVarSet().iterator();
+ while( itr.hasNext() ) {
+ TempDescriptor td = itr.next();
+ output.println(" "+td+";");
+ }
+ output.println("}");
- output.println("struct sese"+faen.getPrettyIdentifier()+"out {");
- itr = faen.getOutVarSet().iterator();
- while( itr.hasNext() ) {
- TempDescriptor td = itr.next();
- output.println(" "+td+";");
- }
- output.println("}");
- */
+ output.println("struct sese"+faen.getPrettyIdentifier()+"out {");
+ itr = faen.getOutVarSet().iterator();
+ while( itr.hasNext() ) {
+ TempDescriptor td = itr.next();
+ output.println(" "+td+";");
+ }
+ output.println("}");
+ */
}
- protected void generateCode( FlatNode first,
- FlatMethod fm,
- LocalityBinding lb,
- FlatSESEExitNode stop,
- PrintWriter output ) {
+ protected void generateCode(FlatNode first,
+ FlatMethod fm,
+ LocalityBinding lb,
+ FlatSESEExitNode stop,
+ PrintWriter output) {
/* Assign labels to FlatNode's if necessary.*/
Hashtable<FlatNode, Integer> nodetolabel=assignLabels(first);
if (current_node==null) {
current_node=(FlatNode)tovisit.iterator().next();
tovisit.remove(current_node);
- } else if (tovisit.contains(current_node)){
- tovisit.remove(current_node);
+ } else if (tovisit.contains(current_node)) {
+ tovisit.remove(current_node);
+ }
+ if(current_node==stop) {
+ return;
}
- if(current_node==stop) { return; }
visited.add(current_node);
if (nodetolabel.containsKey(current_node))
output.println("L"+nodetolabel.get(current_node)+":");
nextnode=fsen.getFlatExit().getNext(0);
} else {
output.print(" ");
- generateFlatNode(fm, lb, current_node, output);
+ generateFlatNode(fm, lb, current_node, output);
nextnode=current_node.getNext(0);
}
if (visited.contains(nextnode)) {
if(state.DSM&&locality.getAtomic(lb).get(fn).intValue()>0) {
output.println("if (needtocollect) checkcollect2(&"+localsprefix+");");
} else
- output.println("if (needtocollect) checkcollect(&"+localsprefix+");");
+ output.println("if (needtocollect) checkcollect(&"+localsprefix+");");
} else
output.println("/* nop */");
return;
return;
/* Have to generate flat globalconv */
if (fgcn.getMakePtr()) {
- if (state.DSM) {
- output.println("TRANSREAD("+generateTemp(fm, fgcn.getSrc(),lb)+", (unsigned int) "+generateTemp(fm, fgcn.getSrc(),lb)+");");
- } else {
- output.println("TRANSREAD("+generateTemp(fm, fgcn.getSrc(),lb)+", "+generateTemp(fm, fgcn.getSrc(),lb)+");");
- }
+ if (state.DSM) {
+ output.println("TRANSREAD("+generateTemp(fm, fgcn.getSrc(),lb)+", (unsigned int) "+generateTemp(fm, fgcn.getSrc(),lb)+");");
+ } else {
+ output.println("TRANSREAD("+generateTemp(fm, fgcn.getSrc(),lb)+", "+generateTemp(fm, fgcn.getSrc(),lb)+");");
+ }
} else {
/* Need to convert to OID */
if (fgcn.doConvert()) {
} else {
type=fion.getType().getClassDesc().getId();
}
-
+
if (fion.getType().getSymbol().equals(TypeUtil.ObjectClass))
output.println(generateTemp(fm, fion.getDst(), lb)+"=1;");
else
TempDescriptor tmp=tmpit.next();
output.println(generateTemp(fm, backuptable.get(lb).get(tmp),lb)+"="+generateTemp(fm,tmp,lb)+";");
}
-
+
output.println("goto transstart"+faen.getIdentifier()+";");
/******* Print code to retry aborted transaction *******/
if (state.DSM) {
/********* Need to revert local object store ********/
String revertptr=generateTemp(fm, reverttable.get(lb),lb);
-
+
output.println("while ("+revertptr+") {");
output.println("struct ___Object___ * tmpptr;");
output.println("tmpptr="+revertptr+"->"+nextobjstr+";");
output.println("transstart"+faen.getIdentifier()+":");
output.println("transStart();");
-
+
if (state.ABORTREADERS) {
output.println("if (_setjmp(aborttrans)) {");
output.println(" goto transretry"+faen.getIdentifier()+"; }");
output.println("goto transretry"+faen.getAtomicEnter().getIdentifier()+";");
if (state.DSM) {
output.println("} else {");
- /* Need to commit local object store */
+ /* Need to commit local object store */
output.println("while ("+revertptr+") {");
output.println("struct ___Object___ * tmpptr;");
output.println("tmpptr="+revertptr+"->"+nextobjstr+";");
public void generateSESE(FlatMethod fm, LocalityBinding lb, FlatSESEEnterNode faen, PrintWriter output) {
-
+
}
output.println(dst+"="+ src +"->"+field+ ";");
if (ffn.getField().getType().isPtr()&&locality.getAtomic(lb).get(ffn).intValue()>0&&
- ((dc==null)||dc.getNeedTrans(lb, ffn))&&
- locality.getNodePreTempInfo(lb, ffn).get(ffn.getSrc())!=LocalityAnalysis.SCRATCH) {
+ ((dc==null)||dc.getNeedTrans(lb, ffn))&&
+ locality.getNodePreTempInfo(lb, ffn).get(ffn.getSrc())!=LocalityAnalysis.SCRATCH) {
output.println("TRANSREAD("+dst+", "+dst+");");
}
} else if (state.DSM) {
if (srcptr&&!fsfn.getSrc().getType().isNull()) {
output.println("{");
if ((dc==null)||dc.getNeedSrcTrans(lb, fsfn)&&
- locality.getNodePreTempInfo(lb, fsfn).get(fsfn.getSrc())!=LocalityAnalysis.SCRATCH) {
+ locality.getNodePreTempInfo(lb, fsfn).get(fsfn.getSrc())!=LocalityAnalysis.SCRATCH) {
output.println("INTPTR srcoid=("+src+"!=NULL?((INTPTR)"+src+"->"+oidstr+"):0);");
} else {
output.println("INTPTR srcoid=(INTPTR)"+src+";");
}
}
if (wb.needBarrier(fsfn)&&
- locality.getNodePreTempInfo(lb, fsfn).get(fsfn.getDst())!=LocalityAnalysis.SCRATCH) {
+ locality.getNodePreTempInfo(lb, fsfn).get(fsfn.getDst())!=LocalityAnalysis.SCRATCH) {
output.println("*((unsigned int *)&("+dst+"->___objstatus___))|=DIRTY;");
}
if (srcptr&!fsfn.getSrc().getType().isNull()) {
output.println(dst +"=(("+ type+"*)(((char *) &("+ generateTemp(fm,fen.getSrc(),lb)+"->___length___))+sizeof(int)))["+generateTemp(fm, fen.getIndex(),lb)+"];");
if (elementtype.isPtr()&&locality.getAtomic(lb).get(fen).intValue()>0&&
- ((dc==null)||dc.getNeedTrans(lb, fen))&&
- locality.getNodePreTempInfo(lb, fen).get(fen.getSrc())!=LocalityAnalysis.SCRATCH) {
+ ((dc==null)||dc.getNeedTrans(lb, fen))&&
+ locality.getNodePreTempInfo(lb, fen).get(fen.getSrc())!=LocalityAnalysis.SCRATCH) {
output.println("TRANSREAD("+dst+", "+dst+");");
}
} else if (state.DSM) {
if (state.SINGLETM && locality.getAtomic(lb).get(fsen).intValue()>0) {
//Transaction set element case
if (wb.needBarrier(fsen)&&
- locality.getNodePreTempInfo(lb, fsen).get(fsen.getDst())!=LocalityAnalysis.SCRATCH) {
+ locality.getNodePreTempInfo(lb, fsen).get(fsen.getDst())!=LocalityAnalysis.SCRATCH) {
output.println("*((unsigned int *)&("+generateTemp(fm,fsen.getDst(),lb)+"->___objstatus___))|=DIRTY;");
}
if (fsen.getSrc().getType().isPtr()&&!fsen.getSrc().getType().isNull()) {
/* ============================================================
- * singleTMCommit.c
+ * singleTMCommit.c
* - single thread commit on local machine
* =============================================================
* Copyright (c) 2009, University of California, Irvine, USA.
* All rights reserved.
- * Author: Alokika Dash
+ * Author: Alokika Dash
* adash@uci.edu
* =============================================================
*
int nSoftAbort = 0;
int nSoftAbortCommit = 0;
int nSoftAbortAbort = 0;
-int typesCausingAbort[TOTALNUMCLASSANDARRAY];
#endif
#ifdef STMSTATS
+int typesCausingAbort[TOTALNUMCLASSANDARRAY];
/******Keep track of objects and types causing aborts******/
#define DEBUGSTMSTAT(args...) { \
- printf(args); \
- fflush(stdout); \
+ printf(args); \
+ fflush(stdout); \
}
#else
#define DEBUGSTMSTAT(args...)
/* ==================================================
* stmStartup
- * This function starts up the transaction runtime.
+ * This function starts up the transaction runtime.
* ==================================================
*/
int stmStartup() {
/* =================================================
* transStart
- * This function initializes things required in the
+ * This function initializes things required in the
* transaction start
* =================================================
*/
/* =======================================================
* transCreateObj
- * This function creates objects in the transaction record
+ * This function creates objects in the transaction record
* =======================================================
*/
objheader_t *transCreateObj(void * ptr, unsigned int size) {
size+=(8-(size&7));
}
- for(;i<2;i++) {
+ for(; i<2; i++) {
if (OSFREE(store)>=size) {
tmp=store->top;
store->top +=size;
}
{
- unsigned int newsize=size>DEFAULT_OBJ_STORE_SIZE?size:DEFAULT_OBJ_STORE_SIZE;
+ unsigned int newsize=size>DEFAULT_OBJ_STORE_SIZE ? size : DEFAULT_OBJ_STORE_SIZE;
objstr_t **otmp=&t_reserve;
objstr_t *ptr;
while((ptr=*otmp)!=NULL) {
return &ptr[1];
}
}
-
+
objstr_t *os=(objstr_t *)calloc(1,(sizeof(objstr_t) + newsize));
void *nptr=&os[1];
os->next=t_cache;
/* Read from the main heap */
//No lock for now
- objheader_t *header = (objheader_t *)(((char *)oid) - sizeof(objheader_t));
+ objheader_t *header = (objheader_t *)(((char *)oid) - sizeof(objheader_t));
GETSIZE(size, header);
size += sizeof(objheader_t);
objcopy = (objheader_t *) objstrAlloc(size);
* transCommit
* - This function initiates the transaction commit process
* - goes through the transaction cache and decides
- * - a final response
+ * - a final response
* ================================================================
*/
int transCommit() {
#endif
softaborted++;
if (softaborted>4) {
- //retry if to many soft aborts
+ //retry if too many soft aborts
freenewobjs();
objstrReset();
t_chashreset();
while(curr != NULL) {
//if the first bin in hash table is empty
if(curr->key == NULL)
- break;
+ break;
objheader_t * headeraddr=&((objheader_t *) curr->val)[-1];
- objheader_t *header=(objheader_t *) (((char *)curr->key)-sizeof(objheader_t));
+ objheader_t *header=(objheader_t *)(((char *)curr->key)-sizeof(objheader_t));
unsigned int version = headeraddr->version;
-
+
if(STATUS(headeraddr) & DIRTY) {
/* Read from the main heap and compare versions */
if(write_trylock(&header->lock)) { //can aquire write lock
- if (version == header->version) {/* versions match */
+ if (version == header->version) { /* versions match */
/* Keep track of objects locked */
oidwrlocked[numoidwrlocked++] = OID(header);
- } else {
+ } else {
oidwrlocked[numoidwrlocked++] = OID(header);
transAbortProcess(oidwrlocked, numoidwrlocked);
#ifdef STMSTATS
- header->abortCount++;
- (typesCausingAbort[TYPE(header)])++;
+ header->abortCount++;
+ (typesCausingAbort[TYPE(header)])++;
+ getTotalAbortCount(i+1, size, (void *)(curr->next), NULL, 'w');
#endif
DEBUGSTM("WR Abort: rd: %u wr: %u tot: %u type: %u ver: %u\n", numoidrdlocked, numoidwrlocked, c_numelements, TYPE(header), header->version);
- DEBUGSTMSTAT("WR Abort: Access Count: %u AbortCount: %u type: %u ver: %u \n", header->accessCount, header->abortCount, TYPE(header), header->version);
+ DEBUGSTMSTAT("WR Abort: Access Count: %u AbortCount: %u type: %u ver: %u \n", header->accessCount, header->abortCount, TYPE(header), header->version);
if (c_numelements>=200) {
free(oidrdlocked);
free(oidrdversion);
return TRANS_ABORT;
}
} else { /* cannot aquire lock */
-#ifdef STMSTATS
- header->abortCount++;
- (typesCausingAbort[TYPE(header)])++;
-#endif
if(version == header->version) {
/* versions match */
softabort=1;
} else {
transAbortProcess(oidwrlocked, numoidwrlocked);
+#ifdef STMSTATS
+ header->abortCount++;
+ (typesCausingAbort[TYPE(header)])++;
+ getTotalAbortCount(i+1, size, (void *)(curr->next), NULL, 'w');
+#endif
DEBUGSTM("WR Abort: rd: %u wr: %u tot: %u type: %u ver: %u\n", numoidrdlocked, numoidwrlocked, c_numelements, TYPE(header), header->version);
- DEBUGSTMSTAT("WR Abort: Access Count: %u AbortCount: %u type: %u ver: %u \n", header->accessCount, header->abortCount, TYPE(header), header->version);
+ DEBUGSTMSTAT("WR Abort: Access Count: %u AbortCount: %u type: %u ver: %u \n", header->accessCount, header->abortCount, TYPE(header), header->version);
if (c_numelements>=200) {
free(oidrdlocked);
free(oidrdversion);
//THIS IS THE SERIALIZATION POINT *****
- for(i=0;i<numoidrdlocked;i++) {
+ for(i=0; i<numoidrdlocked; i++) {
/* Read from the main heap and compare versions */
objheader_t *header=oidrdlocked[i];
unsigned int version=oidrdversion[i];
if(header->lock>0) { //not write locked
- if(version != header->version) {/* versions do not match */
+ if(version != header->version) { /* versions do not match */
oidrdlocked[numoidrdlocked++] = OID(header);
transAbortProcess(oidwrlocked, numoidwrlocked);
#ifdef STMSTATS
- header->abortCount++;
- (typesCausingAbort[TYPE(header)])++;
+ header->abortCount++;
+ (typesCausingAbort[TYPE(header)])++;
+ getTotalAbortCount(i+1, numoidrdlocked, oidrdlocked, (void *) oidrdversion, 'r');
#endif
DEBUGSTM("RD Abort: rd: %u wr: %u tot: %u type: %u ver: %u\n", numoidrdlocked, numoidwrlocked, c_numelements, TYPE(header), header->version);
- DEBUGSTMSTAT("RD Abort: Access Count: %u AbortCount: %u type: %u ver: %u \n", header->accessCount, header->abortCount, TYPE(header), header->version);
+ DEBUGSTMSTAT("RD Abort: Access Count: %u AbortCount: %u type: %u ver: %u \n", header->accessCount, header->abortCount, TYPE(header), header->version);
if (c_numelements>=200) {
free(oidrdlocked);
free(oidrdversion);
return TRANS_ABORT;
}
} else { /* cannot aquire lock */
-#ifdef STMSTATS
- header->abortCount++;
- (typesCausingAbort[TYPE(header)])++;
-#endif
//do increment as we didn't get lock
if(version == header->version) {
softabort=1;
} else {
transAbortProcess(oidwrlocked, numoidwrlocked);
+#ifdef STMSTATS
+ header->abortCount++;
+ (typesCausingAbort[TYPE(header)])++;
+ getTotalAbortCount(i+1, numoidrdlocked, oidrdlocked, (void *) oidrdversion, 'r');
+#endif
DEBUGSTM("RD Abort: rd: %u wr: %u tot: %u type: %u ver: %u\n", numoidrdlocked, numoidwrlocked, c_numelements, TYPE(header), header->version);
- DEBUGSTMSTAT("RD Abort: Access Count: %u AbortCount: %u type: %u ver: %u \n", header->accessCount, header->abortCount, TYPE(header), header->version);
+ DEBUGSTMSTAT("RD Abort: Access Count: %u AbortCount: %u type: %u ver: %u \n", header->accessCount, header->abortCount, TYPE(header), header->version);
if (c_numelements>=200) {
free(oidrdlocked);
free(oidrdversion);
}
}
}
-
+
/* Decide the final response */
if (softabort) {
transAbortProcess(oidwrlocked, numoidwrlocked);
while(curr != NULL) {
//if the first bin in hash table is empty
objheader_t * headeraddr=&((objheader_t *) curr->val)[-1];
- objheader_t *header=(objheader_t *) (((char *)curr->key)-sizeof(objheader_t));
+ objheader_t *header=(objheader_t *)(((char *)curr->key)-sizeof(objheader_t));
unsigned int version = headeraddr->version;
-
+
if(STATUS(headeraddr) & DIRTY) {
/* Read from the main heap and compare versions */
if(write_trylock(&header->lock)) { //can aquire write lock
- if (version == header->version) {/* versions match */
+ if (version == header->version) { /* versions match */
/* Keep track of objects locked */
oidwrlocked[numoidwrlocked++] = OID(header);
- } else {
+ } else {
oidwrlocked[numoidwrlocked++] = OID(header);
transAbortProcess(oidwrlocked, numoidwrlocked);
#ifdef STMSTATS
- header->abortCount++;
- (typesCausingAbort[TYPE(header)])++;
+ header->abortCount++;
+ (typesCausingAbort[TYPE(header)])++;
+ getTotalAbortCount(0, 1, (void *) curr->next, NULL, 'w');
#endif
DEBUGSTM("WR Abort: rd: %u wr: %u tot: %u type: %u ver: %u\n", numoidrdlocked, numoidwrlocked, c_numelements, TYPE(header), header->version);
- DEBUGSTMSTAT("WR Abort: Access Count: %u AbortCount: %u type: %u ver: %u \n", header->accessCount, header->abortCount, TYPE(header), header->version);
+ DEBUGSTMSTAT("WR Abort: Access Count: %u AbortCount: %u type: %u ver: %u \n", header->accessCount, header->abortCount, TYPE(header), header->version);
if (c_numelements>=200) {
free(oidrdlocked);
free(oidrdversion);
} else {
transAbortProcess(oidwrlocked, numoidwrlocked);
#ifdef STMSTATS
- header->abortCount++;
- (typesCausingAbort[TYPE(header)])++;
+ header->abortCount++;
+ (typesCausingAbort[TYPE(header)])++;
+ getTotalAbortCount(0, 1, (void *) curr->next, NULL, 'w');
#endif
DEBUGSTM("WR Abort: rd: %u wr: %u tot: %u type: %u ver: %u\n", numoidrdlocked, numoidwrlocked, c_numelements, TYPE(header), header->version);
- DEBUGSTMSTAT("WR Abort: Access Count: %u AbortCount: %u type: %u ver: %u \n", header->accessCount, header->abortCount, TYPE(header), header->version);
+ DEBUGSTMSTAT("WR Abort: Access Count: %u AbortCount: %u type: %u ver: %u \n", header->accessCount, header->abortCount, TYPE(header), header->version);
if (c_numelements>=200) {
free(oidrdlocked);
free(oidrdversion);
curr = curr->lnext;
}
//THIS IS THE SERIALIZATION POINT *****
- for(i=0;i<numoidrdlocked;i++) {
+ for(i=0; i<numoidrdlocked; i++) {
objheader_t * header = oidrdlocked[i];
unsigned int version=oidrdversion[i];
if(header->lock>=0) {
if(version != header->version) {
transAbortProcess(oidwrlocked, numoidwrlocked);
#ifdef STMSTATS
- header->abortCount++;
- (typesCausingAbort[TYPE(header)])++;
+ header->abortCount++;
+ (typesCausingAbort[TYPE(header)])++;
+ getTotalAbortCount(i+1, numoidrdlocked, oidrdlocked, (void *)oidrdversion, 'r');
#endif
DEBUGSTM("RD Abort: rd: %u wr: %u tot: %u type: %u ver: %u\n", numoidrdlocked, numoidwrlocked, c_numelements, TYPE(header), header->version);
- DEBUGSTMSTAT("RD Abort: Access Count: %u AbortCount: %u type: %u ver: %u \n", header->accessCount, header->abortCount, TYPE(header), header->version);
+ DEBUGSTMSTAT("RD Abort: Access Count: %u AbortCount: %u type: %u ver: %u \n", header->accessCount, header->abortCount, TYPE(header), header->version);
if (c_numelements>=200) {
free(oidrdlocked);
free(oidrdversion);
return TRANS_ABORT;
}
} else { /* cannot aquire lock */
-#ifdef STMSTATS
- header->abortCount++;
- (typesCausingAbort[TYPE(header)])++;
-#endif
if(version == header->version) {
softabort=1;
} else {
transAbortProcess(oidwrlocked, numoidwrlocked);
+#ifdef STMSTATS
+ header->abortCount++;
+ (typesCausingAbort[TYPE(header)])++;
+ getTotalAbortCount(i+1, numoidrdlocked, oidrdlocked, (void *)oidrdversion, 'r');
+#endif
DEBUGSTM("RD Abort: rd: %u wr: %u tot: %u type: %u ver: %u\n", numoidrdlocked, numoidwrlocked, c_numelements, TYPE(header), header->version);
- DEBUGSTMSTAT("RD Abort: Access Count: %u AbortCount: %u type: %u ver: %u \n", header->accessCount, header->abortCount, TYPE(header), header->version);
+ DEBUGSTMSTAT("RD Abort: Access Count: %u AbortCount: %u type: %u ver: %u \n", header->accessCount, header->abortCount, TYPE(header), header->version);
if (c_numelements>=200) {
free(oidrdlocked);
free(oidrdversion);
}
}
}
-
+
/* Decide the final response */
if (softabort) {
transAbortProcess(oidwrlocked, numoidwrlocked);
struct objlist *ptr=newobjs;
while(ptr!=NULL) {
int max=ptr->offset;
- for(i=0;i<max;i++) {
+ for(i=0; i<max; i++) {
//clear the new flag
((struct ___Object___ *)ptr->objs[i])->___objstatus___=0;
}
ptr=ptr->next;
}
-
+
/* Copy from transaction cache -> main object store */
for (i = 0; i < numoidwrlocked; i++) {
- /* Read from the main heap */
+ /* Read from the main heap */
header = (objheader_t *)(((char *)(oidwrlocked[i])) - sizeof(objheader_t));
int tmpsize;
GETSIZE(tmpsize, header);
memcpy(&dst[1], &src[1], tmpsize-sizeof(struct ___Object___));
header->version += 1;
}
-
+
/* Release write locks */
for(i=0; i< numoidwrlocked; i++) {
- header = (objheader_t *)(((char *)(oidwrlocked[i])) - sizeof(objheader_t));
+ header = (objheader_t *)(((char *)(oidwrlocked[i])) - sizeof(objheader_t));
write_unlock(&header->lock);
}
return 0;
}
+/** ========================================================================================
+ * getTotalAbortCount
+ * params : start: start index of the loop
+ * : stop: stop index of the loop
+ * : startptr: pointer that points to where to start looking in the array/ linked list
+ * 'r'/'w' if found when visiting objects read/ objects modified
+ * =========================================================================================
+ **/
+#ifdef STMSTATS
+void getTotalAbortCount(int start, int stop, void *startptr, void *checkptr, char type) {
+ printf("Inside %s()\n", __func__);
+ int i;
+ if(type == 'w') {
+ int isFirstTime = 0;
+ chashlistnode_t *curr = (chashlistnode_t *) startptr;
+ chashlistnode_t *ptr = c_table;
+ for(i = start; i < stop; i++) {
+ if(!isFirstTime)
+ curr = &ptr[i];
+ /* Inner loop to traverse the linked list of the cache lookupTable */
+ while(curr != NULL) {
+ if(curr->key == NULL)
+ break;
+ objheader_t * headeraddr=&((objheader_t *) curr->val)[-1];
+ objheader_t *header=(objheader_t *)(((char *)curr->key)-sizeof(objheader_t));
+ unsigned int version = headeraddr->version;
+ /* versions do not match */
+ if(version != header->version) {
+ header->abortCount++;
+ (typesCausingAbort[TYPE(header)])++;
+ }
+ curr = curr->next;
+ }
+ isFirstTime = 1;
+ }
+ } else {
+ /* Go through oids read that are locked */
+ for(i = start; i < stop; i++) {
+ objheader_t *header = ((void **)startptr)[i];
+ unsigned int version = ((int *)checkptr)[i];
+ if(version != header->version) { /* versions do not match */
+ header->abortCount++;
+ (typesCausingAbort[TYPE(header)])++;
+ }
+ }
+ }
+}
+#else
+void getTotalAbortCount(int start, int stop, void *startptr, void *checkptr, char type) {
+ return;
+}
+#endif
int i;
// Allocate space for the hash table
-
+
c_table = calloc(size, sizeof(chashlistnode_t));
c_loadfactor = loadfactor;
int isfirst; // Keeps track of the first element in the chashlistnode_t for each bin in hashtable
unsigned int i,index;
unsigned int mask;
-
+
ptr = c_table;
oldsize = c_size;
c_list=NULL;
do { //Inner loop to go through linked lists
void * key;
chashlistnode_t *tmp,*next;
-
+
if ((key=curr->key) == 0) { //Exit inner loop if there the first element is 0
break; //key = val =0 for element if not present within the hash table
}
tmp->val = curr->val;
tmp->lnext=c_list;
c_list=tmp;
- }/*
- NOTE: Add this case if you change this...
- This case currently never happens because of the way things rehash....
- else if (isfirst) {
- chashlistnode_t *newnode= calloc(1, sizeof(chashlistnode_t));
- newnode->key = curr->key;
- newnode->val = curr->val;
- newnode->next = tmp->next;
- tmp->next=newnode;
- } */
+ } /*
+ NOTE: Add this case if you change this...
+ This case currently never happens because of the way things rehash....
+ else if (isfirst) {
+ chashlistnode_t *newnode= calloc(1, sizeof(chashlistnode_t));
+ newnode->key = curr->key;
+ newnode->val = curr->val;
+ newnode->next = tmp->next;
+ tmp->next=newnode;
+ } */
else {
curr->next=tmp->next;
tmp->next=curr;
* Control Messages
* ==================
*/
-#define TRANS_AGREE 10
-#define TRANS_DISAGREE 11
#define TRANS_SOFT_ABORT 12
#define TRANS_ABORT 13
#define TRANS_COMMIT 14
-#define READ_OBJ 15
-#define THREAD_NOTIFY 16
-#define THREAD_RESPONSE 17
/* ========================
#include <pthread.h>
#include <sys/time.h>
#include <errno.h>
-#include "threadnotify.h"
+//#include "threadnotify.h"
#include "stmlookup.h"
#include "dsmlock.h"
/* ==================================
* Bit designation for status field
- * of object header
+ * of object header
* ==================================
*/
#define DIRTY 0x01
#define OSUSED(x) (((unsigned INTPTR)(x)->top)-((unsigned INTPTR) (x+1)))
#define OSFREE(x) ((x)->size-OSUSED(x))
#define TRANSREAD(x,y) { \
- void * inputvalue;\
-if ((inputvalue=y)==NULL) x=NULL;\
-else { \
-chashlistnode_t * cnodetmp=&c_table[(((unsigned INTPTR)inputvalue)&c_mask)>>4]; \
-do { \
- if (cnodetmp->key==inputvalue) {x=cnodetmp->val;break;} \
-cnodetmp=cnodetmp->next;\
- if (cnodetmp==NULL) {if (((struct ___Object___*)inputvalue)->___objstatus___&NEW) {x=inputvalue;break;} else \
-{x=transRead(inputvalue); asm volatile("":"=m"(c_table),"=m"(c_mask));break;}} \
-} while(1);\
-}}
+ void * inputvalue; \
+ if ((inputvalue=y)==NULL) x=NULL;\
+ else { \
+ chashlistnode_t * cnodetmp=&c_table[(((unsigned INTPTR)inputvalue)&c_mask)>>4]; \
+ do { \
+ if (cnodetmp->key==inputvalue) {x=cnodetmp->val; break;} \
+ cnodetmp=cnodetmp->next; \
+ if (cnodetmp==NULL) {if (((struct ___Object___*)inputvalue)->___objstatus___&NEW) {x=inputvalue; break;} else \
+ {x=transRead(inputvalue); asm volatile ("" : "=m" (c_table),"=m" (c_mask)); break;}} \
+ } while(1); \
+ }}
/* =================================
- * Data structures
+ * Data structures
* =================================
*/
typedef struct objstr {
extern __thread objstr_t *t_reserve;
-#ifdef TRANSSTATS
/***********************************
* Global Variables for statistics
**********************************/
+#ifdef TRANSSTATS
extern int numTransCommit;
extern int numTransAbort;
extern int nSoftAbort;
extern int nSoftAbortAbort;
extern int nSoftAbortCommit;
+#endif
+
+#ifdef STMSTATS
extern int typesCausingAbort[];
#endif
+
/* ================================
* Functions used
* ================================
int transAbortProcess(void **, int);
int transCommmitProcess(void **, int);
void randomdelay(int);
+void getTotalAbortCount(int, int, void *, void *, char);
#endif
#include "tm.h"
#include <pthread.h>
/* Global barrier for STM */
-pthread_barrier_t barrier;
+pthread_barrier_t barrier;
pthread_barrierattr_t attr;
#endif
#include <string.h>
#ifdef STM
printf("nSoftAbortCommit = %d\n", nSoftAbortCommit);
printf("nSoftAbortAbort = %d\n", nSoftAbortAbort);
+#ifdef STMSTATS
int i;
for(i=0; i<TOTALNUMCLASSANDARRAY; i++) {
printf("typesCausingAbort[%d]= %d\n", i, typesCausingAbort[i]);
}
#endif
+#endif
#endif
exit(___status___);
}
struct listitem *tmp=stopforgc((struct garbagelist *)___params___);
#endif
// Barrier initialization
- int ret;
+ int ret;
if((ret = pthread_barrier_init(&barrier, NULL, nthreads)) != 0) {
printf("%s() Could not create a barrier: numthreads = 0 in %s\n", __func__, __FILE__);
exit(-1);
#ifdef PRECISE_GC
restartaftergc(tmp);
#endif
-}
+}
#endif
#ifdef D___Barrier______enterBarrier____
echo -dsm distributed shared memory
echo -singleTM single machine committing transactions
echo -stmdebug STM debug
+echo "-stmstats prints single machine commit (stm) statistics for the benchmark"
echo -abortreaders abort readers immediately
echo -trueprob double - probabiltiy of true branch
echo -dsmcaching -enable caching in dsm runtime