Hashtable<LocalityBinding, Set<FlatNode>> notreadymap=new Hashtable<LocalityBinding, Set<FlatNode>>();
Hashtable<LocalityBinding, HashSet<FlatNode>> cannotdelaymap=new Hashtable<LocalityBinding, HashSet<FlatNode>>();
Hashtable<LocalityBinding, Set<FlatNode>> derefmap=new Hashtable<LocalityBinding, Set<FlatNode>>();
+ Hashtable<LocalityBinding, Set<FlatNode>> convmap=new Hashtable<LocalityBinding, Set<FlatNode>>();
public DiscoverConflicts getConflicts() {
DiscoverConflicts dc=new DiscoverConflicts(locality, state, typeanalysis, cannotdelaymap, false, false, state.READSET?gft:null);
return othermap.get(lb);
}
+ public Set<FlatNode> getConv(LocalityBinding lb) {
+ return convmap.get(lb);
+ }
+
public Set<FlatNode> livecode(LocalityBinding lb) {
return recordmap.get(lb);
}
private void processlb(LocalityBinding lb) {
transmap.put(lb, new HashSet<FlatNode>());
+ Set<FlatNode> convset=new HashSet<FlatNode>();
+ convmap.put(lb, convset);
if (lb.isAtomic()||!lb.getHasAtomic())
return;
Set<FlatNode> nnotready=new HashSet<FlatNode>();
Set<FlatNode> nderef=new HashSet<FlatNode>();
+
recordmap.put(lb, nrecordset);
cannotdelaymap.put(lb, ncannotdelay);
notreadymap.put(lb, nnotready);
othermap.put(lb, notherset);
derefmap.put(lb, nderef);
+
FlatMethod fm=state.getMethodFlat(lb.getMethod());
for(Iterator<FlatNode> fnit=fm.getNodeSet().iterator();fnit.hasNext();) {
FlatNode fn=fnit.next();
if (state.STMARRAY&&!state.DUALVIEW)
nderef.addAll(tderef);
transmap.get(lb).add(fn);
+ convset.addAll(transSet);
} else {
ncannotdelay.addAll(transSet);
}
//need to do translation
output.println("TRANSREAD("+generateTemp(fm, fgcn.getSrc(),lb)+", "+generateTemp(fm, fgcn.getSrc(),lb)+", (void *)("+localsprefixaddr+"));");
} else if (state.READSET&&dc.getNeedTrans(lb, fgcn)) {
- output.println("TRANSREADRD("+generateTemp(fm, fgcn.getSrc(),lb)+", "+generateTemp(fm, fgcn.getSrc(),lb)+");");
+ if (state.HYBRID&&delaycomp.getConv(lb).contains(fgcn)) {
+ output.println("TRANSREADRDFISSION("+generateTemp(fm, fgcn.getSrc(),lb)+", "+generateTemp(fm, fgcn.getSrc(),lb)+");");
+ } else
+ output.println("TRANSREADRD("+generateTemp(fm, fgcn.getSrc(),lb)+", "+generateTemp(fm, fgcn.getSrc(),lb)+");");
}
}
} else {
output.println("transaction_check_counter=*counter_reset_pointer;");
sandboxcounter++;
}
- output.println("transStart();");
+ //output.println("transStart();");
if (state.ABORTREADERS||state.SANDBOX) {
if (state.SANDBOX)
(state.READSET&&dc.getNeedWriteTrans(lb, ffn))) {
output.println("TRANSREAD("+dst+", "+dst+", (void *) (" + localsprefixaddr + "));");
} else if (state.READSET&&dc.getNeedTrans(lb, ffn)) {
- output.println("TRANSREADRD("+dst+", "+dst+");");
+ if (state.HYBRID&&delaycomp.getConv(lb).contains(ffn)) {
+ output.println("TRANSREADRDFISSION("+dst+", "+dst+");");
+ } else
+ output.println("TRANSREADRD("+dst+", "+dst+");");
}
}
} else if (state.DSM) {
if ((dc==null)||!state.READSET&&dc.getNeedTrans(lb, fen)||state.READSET&&dc.getNeedWriteTrans(lb, fen)) {
output.println("TRANSREAD("+dst+", "+dst+", (void *)(" + localsprefixaddr+"));");
} else if (state.READSET&&dc.getNeedTrans(lb, fen)) {
- output.println("TRANSREADRD("+dst+", "+dst+");");
+ if (state.HYBRID&&delaycomp.getConv(lb).contains(fen)) {
+ output.println("TRANSREADRDFISSION("+dst+", "+dst+");");
+ } else
+ output.println("TRANSREADRD("+dst+", "+dst+");");
}
}
} else if (state.DSM) {
} while(1); \
}}
+#define TRANSREADRDFISSION(x,y) { \
+ void * inputvalue; \
+ if ((inputvalue=y)==NULL) x=NULL; \
+ else { \
+ x=inputvalue;rd_t_chashInsertOnce(inputvalue, ((objheader_t *)inputvalue)[-1].version);} \
+ }
+
/* =================================
* Data structures
* =================================
#define NUMPTRS 100
-#define INITIALHEAPSIZE 128*1024*1024L
+#define INITIALHEAPSIZE 5000*1024*1024L
#define GCPOINT(x) ((INTPTR)((x)*0.99))
/* This define takes in how full the heap is initially and returns a new heap size to use */
#define HEAPSIZE(x,y) ((INTPTR)(x+y))*2