From 88e96ff89c5e40831feac5196210078e6cbf146d Mon Sep 17 00:00:00 2001 From: bdemsky Date: Sat, 21 Nov 2009 09:16:35 +0000 Subject: [PATCH] changes --- Robust/src/Analysis/Locality/DCWrapper.java | 10 ++++++++++ Robust/src/IR/Flat/BuildCode.java | 17 +++++++++++++---- Robust/src/Runtime/STM/tm.h | 7 +++++++ Robust/src/Runtime/garbage.c | 2 +- 4 files changed, 31 insertions(+), 5 deletions(-) diff --git a/Robust/src/Analysis/Locality/DCWrapper.java b/Robust/src/Analysis/Locality/DCWrapper.java index 394f9b40..0735a458 100644 --- a/Robust/src/Analysis/Locality/DCWrapper.java +++ b/Robust/src/Analysis/Locality/DCWrapper.java @@ -42,6 +42,7 @@ public class DCWrapper { Hashtable> notreadymap=new Hashtable>(); Hashtable> cannotdelaymap=new Hashtable>(); Hashtable> derefmap=new Hashtable>(); + Hashtable> convmap=new Hashtable>(); public DiscoverConflicts getConflicts() { DiscoverConflicts dc=new DiscoverConflicts(locality, state, typeanalysis, cannotdelaymap, false, false, state.READSET?gft:null); @@ -95,12 +96,18 @@ public class DCWrapper { return othermap.get(lb); } + public Set getConv(LocalityBinding lb) { + return convmap.get(lb); + } + public Set livecode(LocalityBinding lb) { return recordmap.get(lb); } private void processlb(LocalityBinding lb) { transmap.put(lb, new HashSet()); + Set convset=new HashSet(); + convmap.put(lb, convset); if (lb.isAtomic()||!lb.getHasAtomic()) return; @@ -119,12 +126,14 @@ public class DCWrapper { Set nnotready=new HashSet(); Set nderef=new HashSet(); + 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 fnit=fm.getNodeSet().iterator();fnit.hasNext();) { FlatNode fn=fnit.next(); @@ -147,6 +156,7 @@ public class DCWrapper { if (state.STMARRAY&&!state.DUALVIEW) nderef.addAll(tderef); transmap.get(lb).add(fn); + convset.addAll(transSet); } else { ncannotdelay.addAll(transSet); } diff --git a/Robust/src/IR/Flat/BuildCode.java b/Robust/src/IR/Flat/BuildCode.java index eb3b6a5f..de3ee767 100644 --- a/Robust/src/IR/Flat/BuildCode.java +++ b/Robust/src/IR/Flat/BuildCode.java @@ -2940,7 +2940,10 @@ public class BuildCode { //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 { @@ -3045,7 +3048,7 @@ public class BuildCode { output.println("transaction_check_counter=*counter_reset_pointer;"); sandboxcounter++; } - output.println("transStart();"); + //output.println("transStart();"); if (state.ABORTREADERS||state.SANDBOX) { if (state.SANDBOX) @@ -3665,7 +3668,10 @@ public class BuildCode { (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) { @@ -3844,7 +3850,10 @@ public class BuildCode { 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) { diff --git a/Robust/src/Runtime/STM/tm.h b/Robust/src/Runtime/STM/tm.h index ef8937e3..d8472610 100644 --- a/Robust/src/Runtime/STM/tm.h +++ b/Robust/src/Runtime/STM/tm.h @@ -121,6 +121,13 @@ typedef struct objheader { } 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 * ================================= diff --git a/Robust/src/Runtime/garbage.c b/Robust/src/Runtime/garbage.c index 8611dce6..5160bc9f 100644 --- a/Robust/src/Runtime/garbage.c +++ b/Robust/src/Runtime/garbage.c @@ -30,7 +30,7 @@ #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 -- 2.34.1