output.println("if (needtocollect) checkcollect2("+localsprefixaddr+");");
else if (this.state.MULTICOREGC) {
output.println("if(gcflag) gc("+localsprefixaddr+");");
- } else if (state.SINGLETM) {
+ } else {
output.println("if (unlikely(needtocollect)) checkcollect("+localsprefixaddr+");");
- } else
- output.println("if (needtocollect) checkcollect("+localsprefixaddr+");");
+ }
}
}
if (callgraph.getAllMethods(md).contains(md)) {
if(this.state.MULTICOREGC) {
output.println("if(gcflag) gc("+localsprefixaddr+");");
- } else if (state.SINGLETM) {
+ } else {
output.println("if (unlikely(needtocollect)) checkcollect("+localsprefixaddr+");");
- } else {
- output.println("if (needtocollect) checkcollect("+localsprefixaddr+");");
- }
+ }
}
}
output.println("if (needtocollect) checkcollect2("+localsprefixaddr+");");
} else if(this.state.MULTICOREGC) {
output.println("if (gcflag) gc("+localsprefixaddr+");");
- } else if (state.SINGLETM) {
+ } else {
output.println("if (unlikely(needtocollect)) checkcollect("+localsprefixaddr+");");
- } else
- output.println("if (needtocollect) checkcollect("+localsprefixaddr+");");
+ }
} else
output.println("/* nop */");
break;
} else
output.println("if (transCommit()) {");
/* Transaction aborts if it returns true */
+ output.println("if (unlikely(needtocollect)) checkcollect("+localsprefixaddr+");");
+
output.println("goto transretry"+faen.getAtomicEnter().getIdentifier()+";");
if (state.DSM) {
output.println("} else {");
type=elementtype.getSafeSymbol()+" ";
if (this.state.ARRAYBOUNDARYCHECK && fen.needsBoundsCheck()) {
- output.println("if (((unsigned int)"+generateTemp(fm, fen.getIndex(),lb)+") >= "+generateTemp(fm,fen.getSrc(),lb) + "->___length___)");
+ output.println("if (unlikely(((unsigned int)"+generateTemp(fm, fen.getIndex(),lb)+") >= "+generateTemp(fm,fen.getSrc(),lb) + "->___length___))");
output.println("failedboundschk();");
}
if (state.SINGLETM) {
type=elementtype.getSafeSymbol()+" ";
if (this.state.ARRAYBOUNDARYCHECK && fsen.needsBoundsCheck()) {
- output.println("if (((unsigned int)"+generateTemp(fm, fsen.getIndex(),lb)+") >= "+generateTemp(fm,fsen.getDst(),lb) + "->___length___)");
+ output.println("if (unlikely(((unsigned int)"+generateTemp(fm, fsen.getIndex(),lb)+") >= "+generateTemp(fm,fsen.getDst(),lb) + "->___length___))");
output.println("failedboundschk();");
}
/* Look through all the objects in the transaction hash table */
int finalResponse;
#ifdef DELAYCOMP
- if (c_numelements<(c_size>>1))
+ if (c_numelements<(c_size>>3))
finalResponse=alttraverseCache(commitmethod, primitives, locals, params);
else
finalResponse=traverseCache(commitmethod, primitives, locals, params);
#else
- if (c_numelements<(c_size>>1))
+ if (c_numelements<(c_size>>3))
finalResponse=alttraverseCache();
else
finalResponse=traverseCache();
#ifdef SANDBOX
abortenabled=1;
#endif
+
return TRANS_ABORT;
}
if(finalResponse == TRANS_COMMIT) {