Hashtable flagorder;
int tag=0;
String localsprefix="___locals___";
+ String fcrevert="___fcrevert___";
String paramsprefix="___params___";
String oidstr="___nextobject___";
String nextobjstr="___nextobject___";
outmethod.println("#include \"addPrefetchEnhance.h\"");
outmethod.println("#include \"localobjects.h\"");
}
+ if (state.FASTCHECK) {
+ outmethod.println("#include \"localobjects.h\"");
+ }
if(state.MULTICORE) {
outmethod.println("#include \"task.h\"");
}
output.println("}");
}
} else {
+ if (state.FASTCHECK) {
+ String dst=generateTemp(fm, fsfn.getDst(),lb);
+ output.println("if(!"+dst+"->"+localcopystr+") {");
+ /* Link object into list */
+ if (GENERATEPRECISEGC)
+ output.println("COPY_OBJ((struct garbagelist *)&"+localsprefix+",(struct ___Object___ *)"+dst+");");
+ else
+ output.println("COPY_OBJ("+dst+");");
+ output.println(dst+"->"+nextobjstr+"="+fcrevert+";");
+ output.println(fcrevert+"=(struct ___Object___ *)"+dst+";");
+ output.println("}");
+ }
output.println(generateTemp(fm, fsfn.getDst(),lb)+"->"+ fsfn.getField().getSafeSymbol()+"="+ generateTemp(fm,fsfn.getSrc(),lb)+";");
}
}
} else {
output.println("(("+type +"*)(((char *) &("+ generateTemp(fm,fsen.getDst(),lb)+"->___length___))+sizeof(int)))["+generateTemp(fm, fsen.getIndex(),lb)+"]="+generateTemp(fm,fsen.getSrc(),lb)+";");
}
- } else
+ } else {
+ if (state.FASTCHECK) {
+ String dst=generateTemp(fm, fsen.getDst(),lb);
+ output.println("if(!"+dst+"->"+localcopystr+") {");
+ /* Link object into list */
+ if (GENERATEPRECISEGC)
+ output.println("COPY_OBJ((struct garbagelist *)&"+localsprefix+",(struct ___Object___ *)"+dst+");");
+ else
+ output.println("COPY_OBJ("+dst+");");
+ output.println(dst+"->"+nextobjstr+"="+fcrevert+";");
+ output.println(fcrevert+"=(struct ___Object___ *)"+dst+";");
+ output.println("}");
+ }
output.println("(("+type +"*)(((char *) &("+ generateTemp(fm,fsen.getDst(),lb)+"->___length___))+sizeof(int)))["+generateTemp(fm, fsen.getIndex(),lb)+"]="+generateTemp(fm,fsen.getSrc(),lb)+";");
+ }
}
protected void generateFlatNew(FlatMethod fm, LocalityBinding lb, FlatNew fn, PrintWriter output) {
if (state.DSM && locality.getAtomic(lb).get(fn).intValue()>0&&!fn.isGlobal()) {
String revertptr=generateTemp(fm, reverttable.get(lb),lb);
String dst=generateTemp(fm,fn.getDst(),lb);
- output.println(dst+"->___localcopy___=1;");
+ output.println(dst+"->___localcopy___=(struct ___Object___*)1;");
output.println(dst+"->"+nextobjstr+"="+revertptr+";");
output.println("trans->revertlist=(struct ___Object___ *)"+dst+";");
}
+ if (state.FASTCHECK) {
+ String dst=generateTemp(fm,fn.getDst(),lb);
+ output.println(dst+"->___localcopy___=(struct ___Object___*)1;");
+ output.println(dst+"->"+nextobjstr+"="+fcrevert+";");
+ output.println(fcrevert+"=(struct ___Object___ *)"+dst+";");
+ }
}
private void generateFlatTagDeclaration(FlatMethod fm, LocalityBinding lb, FlatTagDeclaration fn, PrintWriter output) {
state.PREFETCH=true;
else if (option.equals("-dir"))
IR.Flat.BuildCode.PREFIX=args[++i]+"/";
+ else if (option.equals("-fastcheck"))
+ state.FASTCHECK=true;
else if (option.equals("-selfloop"))
state.selfloops.add(args[++i]);
else if (option.equals("-excprefetch"))
System.out.println("-precise -- use precise garbage collection");
System.out.println("-conscheck -- turn on consistency checking");
System.out.println("-task -- compiler for tasks");
+ System.out.println("-fastcheck -- fastcheckpointing for Bristlecone");
System.out.println("-thread -- threads");
System.out.println("-trueprob <d> -- probability of true branch");
System.out.println("-printflat -- print out flat representation");
readSourceFile(state, ClassLibraryPrefix+"Date.java");
if (state.TASK) {
- readSourceFile(state, ClassLibraryPrefix+"Object.java");
+ if (state.FASTCHECK)
+ readSourceFile(state, ClassLibraryPrefix+"ObjectFC.java");
+ else
+ readSourceFile(state, ClassLibraryPrefix+"Object.java");
readSourceFile(state, ClassLibraryPrefix+"TagDescriptor.java");
} else if (state.DSM) {
readSourceFile(state, ClassLibraryPrefix+"ThreadDSM.java");
echo -check generate check code
echo -dmalloc link in dmalloc
echo -recover compile task code
+echo -fastcheck fast checkpointing for Bristlecone
echo -specdir directory
echo -printflat print out flat representation
echo -selfloop task - this task cannot self loop forever
THREADSIMULATEFLAG=false;
USEDMALLOC=false
THREADFLAG=false
+FASTCHECK=false
SPECDIR=`pwd`
SRCFILES=''
EXTRAOPTIONS=''
elif [[ $1 = '-nojava' ]]
then
NOJAVA=true
+elif [[ $1 = '-fastcheck' ]]
+then
+EXTRAOPTIONS="$EXTRAOPTIONS -DFASTCHECK"
+JAVAOPTS="$JAVAOPTS -fastcheck"
+FASTCHECK=true
elif [[ $1 = '-o' ]]
then
MAINFILE="$2"
then
EXTRAOPTIONS="$EXTRAOPTIONS -lpthread -DTRANSSTATS -DCOMPILER -DDSTM -I$DSMRUNTIME"
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 $DSMRUNTIME/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"
+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 $FASTCHECK
+then
+FILES="$FILES $ROBUSTROOT/Runtime/localobjects.c"
fi
if $RECOVERFLAG