From: bdemsky Date: Sat, 3 May 2008 22:05:57 +0000 (+0000) Subject: Changes: X-Git-Tag: preEdgeChange~111 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=418997717780eef5f8cceaadcd8cca730e25e9f2;p=IRC.git Changes: 1) nojava option to the buildscript to built the executable in tmpbuilddir 2) fixed prefetch analysis --- diff --git a/Robust/src/Analysis/Locality/LocalityAnalysis.java b/Robust/src/Analysis/Locality/LocalityAnalysis.java index 7cec933f..adac83f8 100644 --- a/Robust/src/Analysis/Locality/LocalityAnalysis.java +++ b/Robust/src/Analysis/Locality/LocalityAnalysis.java @@ -91,6 +91,10 @@ public class LocalityAnalysis { return methodtolb.get(md); } + public Set getMethods() { + return methodtolb.keySet(); + } + /** This method returns a set of LocalityBindings. A * LocalityBinding specifies a context a method can be invoked in. * It specifies whether the method is in a transaction and whether diff --git a/Robust/src/Analysis/Prefetch/PrefetchAnalysis.java b/Robust/src/Analysis/Prefetch/PrefetchAnalysis.java index 196ecc9c..d6b5df3e 100644 --- a/Robust/src/Analysis/Prefetch/PrefetchAnalysis.java +++ b/Robust/src/Analysis/Prefetch/PrefetchAnalysis.java @@ -2,6 +2,7 @@ package Analysis.Prefetch; import java.util.*; import Analysis.CallGraph.CallGraph; +import Analysis.Locality.LocalityAnalysis; import Analysis.Prefetch.PrefetchPair; import Analysis.Prefetch.PairMap; import Analysis.Prefetch.IndexDescriptor; @@ -25,11 +26,13 @@ public class PrefetchAnalysis { public static final double PROB_DIFF = 0.05; //threshold for difference in probabilities during first phase of analysis public static final double ANALYSIS_THRESHOLD_PROB = 0.10; //threshold for prefetches to stop propagating during first phase of analysis public static final double PREFETCH_THRESHOLD_PROB = 0.30;//threshold for prefetches to stop propagating while applying prefetch rules during second phase of analysis - - public PrefetchAnalysis(State state, CallGraph callgraph, TypeUtil typeutil) { + LocalityAnalysis locality; + + public PrefetchAnalysis(State state, CallGraph callgraph, TypeUtil typeutil, LocalityAnalysis locality) { this.typeutil=typeutil; this.state=state; this.callgraph=callgraph; + this.locality=locality; prefetch_hash = new Hashtable>(); pmap_hash = new Hashtable>(); this.loop=new LoopExit(state); @@ -39,15 +42,7 @@ public class PrefetchAnalysis { /** This function starts the prefetch analysis */ private void DoPrefetch() { - for(Iterator classit=state.getClassSymbolTable().getDescriptorsIterator();classit.hasNext();) { - ClassDescriptor cn=(ClassDescriptor)classit.next(); - doMethodAnalysis(cn); - } - } - - /** This function calls analysis for every method in a class */ - private void doMethodAnalysis(ClassDescriptor cn) { - for (Iterator methodit=cn.getMethods();methodit.hasNext();) { + for (Iterator methodit=locality.getMethods().iterator();methodit.hasNext();) { MethodDescriptor md=(MethodDescriptor)methodit.next(); if (state.excprefetch.contains(md.getClassMethodName())) continue; //Skip this method @@ -98,6 +93,7 @@ public class PrefetchAnalysis { if(prefetch_hash.containsKey(child_node)) { child_prefetch_set_copy = (Hashtable) prefetch_hash.get(child_node).clone(); } + } switch(curr.kind()) { case FKind.FlatCall: @@ -212,7 +208,7 @@ public class PrefetchAnalysis { if (currffn_field.getType().isPtr()) { PrefetchPair pp = new PrefetchPair(currffn_src, (Descriptor) currffn_field); Double prob = new Double(1.0); - currcopy.put(pp, prob); + tocompare.put(pp, prob); } /* Get each prefetch pair of the child and match it with the destination temp descriptor of curr FlatFieldNode */ @@ -226,56 +222,35 @@ public class PrefetchAnalysis { newdesc.addAll(childpp.desc); PrefetchPair newpp = new PrefetchPair(currffn.getSrc(), newdesc); Double newprob = child_prefetch_set_copy.get(childpp).doubleValue(); + if (tocompare.containsKey(newpp)) { + Double oldprob=tocompare.get(newpp); + newprob=1.0-(1.0-oldprob)*(1.0-newprob); + } tocompare.put(newpp, newprob); pm.addPair(childpp, newpp); - child_prefetch_set_copy.remove(childpp); - /* Check for independence of prefetch pairs to compute new probability */ - if(child_prefetch_set_copy.containsKey(newpp)) { - newprob = (1.0 - ((1.0 - child_prefetch_set_copy.get(newpp).doubleValue()) * (1.0 - tocompare.get(newpp).doubleValue()))); - if(newprob < ANALYSIS_THRESHOLD_PROB) { - tocompare.remove(newpp); - } else { - tocompare.put(newpp, newprob); - pm.addPair(newpp, newpp); - } - child_prefetch_set_copy.remove(newpp); - } } + //drop if not ptr } else if(childpp.base == currffn.getDst() && (childpp.getDesc() == null)) { + //covered by current prefetch child_prefetch_set_copy.remove(childpp); } else if(childpp.containsTemp(currffn.getDst())) { child_prefetch_set_copy.remove(childpp); } else { - continue; - } - } - /* Check if curr prefetch set and the child prefetch set have same prefetch pairs - * if so, calculate the new probability */ - for (Enumeration ecld = child_prefetch_set_copy.keys();ecld.hasMoreElements();) { - PrefetchPair childpp = (PrefetchPair) ecld.nextElement(); - for(Enumeration e = currcopy.keys(); e.hasMoreElements();) { - PrefetchPair currpp = (PrefetchPair) e.nextElement(); - if(currpp.equals(childpp)) { - pm.addPair(childpp, currpp); - child_prefetch_set_copy.remove(childpp); - break; - } + Double newprob = child_prefetch_set_copy.get(childpp).doubleValue(); + if (tocompare.containsKey(childpp)) { + Double oldprob=tocompare.get(childpp); + newprob=1.0-(1.0-oldprob)*(1.0-newprob); + } + tocompare.put(childpp, newprob); + pm.addPair(childpp, childpp); } } - - /* Merge child prefetch pairs */ - for (Enumeration ecld = child_prefetch_set_copy.keys();ecld.hasMoreElements();) { - PrefetchPair childpp = (PrefetchPair) ecld.nextElement(); - tocompare.put(childpp, child_prefetch_set_copy.get(childpp).doubleValue()); - pm.addPair(childpp, childpp); - child_prefetch_set_copy.remove(childpp); - } - - /* Merge curr prefetch pairs */ - for (Enumeration e = currcopy.keys();e.hasMoreElements();) { - PrefetchPair currpp = (PrefetchPair) e.nextElement(); - tocompare.put(currpp, currcopy.get(currpp).doubleValue()); - currcopy.remove(currpp); + + for(Iterator it=tocompare.keySet().iterator();it.hasNext();) { + PrefetchPair pp=it.next(); + if (tocompare.get(pp) currhash = (Hashtable) prefetch_hash.get(fn); @@ -812,57 +788,41 @@ public class PrefetchAnalysis { } } - /* Delete redundant and subset prefetch pairs */ - delSubsetPPairs(); - /* Start with a top down sorted order of nodes */ while(!newvisited.isEmpty()) { applyPrefetchInsertRules((FlatNode) newvisited.getFirst(), newvisited, pset1_hash, newprefetchset); newvisited.remove(0); } + delSubsetPPairs(newprefetchset); } /** This function deletes the smaller prefetch pair subset from a list of prefetch pairs * for e.g. if there are 2 prefetch pairs a.b.c.d and a.b.c for a given flatnode * then this function drops a.b.c from the prefetch set of the flatnode */ - private void delSubsetPPairs() { - for (Enumeration e = prefetch_hash.keys();e.hasMoreElements();) { + private void delSubsetPPairs(Hashtable> newprefetchset) { + for (Enumeration e = newprefetchset.keys();e.hasMoreElements();) { FlatNode fn = (FlatNode) e.nextElement(); - Hashtable ppairs = prefetch_hash.get(fn); - Vector pplist = new Vector(); - Vector pplength = new Vector(); - Vector ppisMod = new Vector(); - for(Enumeration epp = ((Hashtable)(prefetch_hash.get(fn))).keys();epp.hasMoreElements();) { - PrefetchPair pp = (PrefetchPair) epp.nextElement(); - pplist.add(pp); - int length = pp.desc.size()+ 1; - pplength.add(length); - ppisMod.add(0); - } - int numpp = ((Hashtable)(prefetch_hash.get(fn))).size(); - for (int i = 0; i < numpp; i++) { - for (int j = i+1; j < numpp; j++) { - boolean ret; - int x = ((Integer) (pplength.get(i))).intValue(); - if (((Integer) (pplength.get(i))).intValue() < ((Integer)( pplength.get(j))).intValue()) { - ret = isSubSet(pplist.get(i), pplist.get(j)); - if (ret) { - ppisMod.set(i, 1); - } - } else { - ret = isSubSet(pplist.get(j), pplist.get(i)); - if (ret) { - ppisMod.set(j, 1); - } - } - } - } - for (int i = 0; i < numpp; i++) { - if (((Integer)(ppisMod.get(i))).intValue() == 1) { - PrefetchPair pp = (PrefetchPair) pplist.get(i); - ppairs.remove(pp); + Set ppairs = newprefetchset.get(fn); + Set toremove=new HashSet(); + + for(Iterator it1=ppairs.iterator();it1.hasNext();) { + PrefetchPair pp1=it1.next(); + if (toremove.contains(pp1)) + continue; + int l1=pp1.desc.size()+1; + for(Iterator it2=ppairs.iterator();it2.hasNext();) { + PrefetchPair pp2=it2.next(); + int l2=pp2.desc.size()+1; + + if (l1l1&&isSubSet(pp2,pp1)) + toremove.add(pp2); } } + + ppairs.removeAll(toremove); } } @@ -916,78 +876,65 @@ public class PrefetchAnalysis { * this function creates pset1 such that it contains prefetch pairs that have been prefetched at * the previous nodes */ - private void applyPrefetchInsertRules(FlatNode fn, LinkedList newvisited, Hashtable> pset1_hash, Hashtable> newprefetchset) { - + private void applyPrefetchInsertRules(FlatNode fn, LinkedList newvisited, Hashtable> pset1_hash, Hashtable> newprefetchset) { if(fn.kind() == FKind.FlatMethod) { HashSet pset1 = new HashSet(); - if(prefetch_hash.containsKey(fn)) { - Hashtable prefetchset = prefetch_hash.get(fn); - for(Enumeration e = prefetchset.keys();e.hasMoreElements();) { - PrefetchPair pp = (PrefetchPair) e.nextElement(); - /* Apply initial rule */ - if(prefetchset.get(pp).doubleValue() >= PREFETCH_THRESHOLD_PROB) { - pset1.add(pp); - } + Hashtable prefetchset = prefetch_hash.get(fn); + for(Enumeration e = prefetchset.keys();e.hasMoreElements();) { + PrefetchPair pp = (PrefetchPair) e.nextElement(); + /* Apply initial rule */ + if(prefetchset.get(pp).doubleValue() >= PREFETCH_THRESHOLD_PROB) { + pset1.add(pp); } - /* Enqueue child node if Pset1 has changed */ - if (comparePSet1(pset1_hash.get(fn), pset1)) { - for(int j=0; j pset2 = new HashSet(); HashSet newpset = new HashSet(); - if(prefetch_hash.containsKey(fn)) { - Hashtable prefetchset = prefetch_hash.get(fn); - Hashtable ppairmaphash = pmap_hash.get(fn); - for(Enumeration epset = prefetchset.keys(); epset.hasMoreElements();) { - PrefetchPair pp = (PrefetchPair) epset.nextElement(); - boolean pprobIsGreater = (prefetchset.get(pp).doubleValue() >= PREFETCH_THRESHOLD_PROB); - boolean mapprobIsLess=false; - boolean mapIsPresent=true; - for(int i=0;i prefetchset = prefetch_hash.get(fn); + Hashtable ppairmaphash = pmap_hash.get(fn); + for(Enumeration epset = prefetchset.keys(); epset.hasMoreElements();) { + PrefetchPair pp = (PrefetchPair) epset.nextElement(); + boolean pprobIsGreater = (prefetchset.get(pp).doubleValue() >= PREFETCH_THRESHOLD_PROB); + boolean mapprobIsLess=false; + boolean mapIsPresent=true; + for(int i=0;i pset1 = new HashSet(); @@ -1004,14 +951,10 @@ public class PrefetchAnalysis { /* To insert prefetch, apply rule: if the newpset minus pset2 is nonempty * then insert a new prefetch node here*/ - + HashSet s = new HashSet(); - for(Iterator it = newpset.iterator(); it.hasNext();) { - PrefetchPair pp = (PrefetchPair) it.next(); - if(!pset2.contains(pp)) { - s.add(pp); - } - } + s.addAll(newpset); + s.removeAll(pset2); newprefetchset.put(fn, s); } } diff --git a/Robust/src/Benchmarks/Prefetch/Em3d/dsm/Em3dN.java b/Robust/src/Benchmarks/Prefetch/Em3d/dsm/Em3dN.java index e9355cce..daf334ef 100644 --- a/Robust/src/Benchmarks/Prefetch/Em3d/dsm/Em3dN.java +++ b/Robust/src/Benchmarks/Prefetch/Em3d/dsm/Em3dN.java @@ -112,10 +112,10 @@ public class Em3d extends Thread long start0 = System.currentTimeMillis(); int numThreads = em.numThreads; int[] mid = new int[4]; - mid[0] = (128<<24)|(195<<16)|(175<<8)|80; - mid[1] = (128<<24)|(195<<16)|(175<<8)|78; + mid[0] = (128<<24)|(195<<16)|(175<<8)|69; + mid[1] = (128<<24)|(195<<16)|(175<<8)|80; mid[2] = (128<<24)|(195<<16)|(175<<8)|73; - mid[3] = (128<<24)|(195<<16)|(175<<8)|79; + mid[3] = (128<<24)|(195<<16)|(175<<8)|78; System.printString("DEBUG -> numThreads = " + numThreads+"\n"); Barrier mybarr; BiGraph graph; diff --git a/Robust/src/Benchmarks/Prefetch/Em3d/dsm/makefile b/Robust/src/Benchmarks/Prefetch/Em3d/dsm/makefile index f7031ad3..f5ec498f 100644 --- a/Robust/src/Benchmarks/Prefetch/Em3d/dsm/makefile +++ b/Robust/src/Benchmarks/Prefetch/Em3d/dsm/makefile @@ -8,14 +8,12 @@ SRC1=${MAINCLASS}N.java \ Node.java \ Barrier.java -FLAGS=-dsm -prefetch -excprefetch Em3d.main -excprefetch BiGraph.create -excprefetch Node.Node -excprefetch Node.fillTable -excprefetch Node.makeUniqueNeighbors -excprefetch Node.makeFromNodes -excprefetch Node.updateFromNodes -nooptimize -profile -debug -mainclass ${MAINCLASS} -FLAGS2=-dsm -nooptimize -profile -debug -mainclass ${MAINCLASS} +FLAGS=-dsm -prefetch -excprefetch Em3d.main -excprefetch BiGraph.create -excprefetch Node.Node -excprefetch Node.fillTable -excprefetch Node.makeUniqueNeighbors -excprefetch Node.makeFromNodes -excprefetch Node.updateFromNodes -nooptimize -debug -mainclass ${MAINCLASS} +FLAGS2=-dsm -nooptimize -debug -mainclass ${MAINCLASS} default: -# ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NP ${SRC} -# ../../../../buildscript ${FLAGS} -o ${MAINCLASS} ${SRC} - ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NNP ${SRC1} - ../../../../buildscript ${FLAGS} -o ${MAINCLASS}N ${SRC1} + ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NP ${SRC1} + ../../../../buildscript ${FLAGS} -o ${MAINCLASS}P ${SRC1} clean: rm -rf tmpbuilddirectory diff --git a/Robust/src/Benchmarks/Prefetch/LUFact/dsm/LinpackRunner.java b/Robust/src/Benchmarks/Prefetch/LUFact/dsm/LinpackRunner.java index e3d3f880..6e499d1c 100644 --- a/Robust/src/Benchmarks/Prefetch/LUFact/dsm/LinpackRunner.java +++ b/Robust/src/Benchmarks/Prefetch/LUFact/dsm/LinpackRunner.java @@ -70,8 +70,8 @@ class LinpackRunner extends Thread { } // synchronise threads Barrier.enterBarrier(tmpbr); - System.clearPrefetchCache(); - + System.clearPrefetchCache(); + // zero pivot implies this column already triangularized boolean b; atomic { @@ -79,7 +79,7 @@ class LinpackRunner extends Thread { } if (b) { Barrier.enterBarrier(tmpbr); - System.clearPrefetchCache(); + System.clearPrefetchCache(); // interchange if necessary atomic { if(lid == 0 ) { @@ -92,7 +92,7 @@ class LinpackRunner extends Thread { } // synchronise threads Barrier.enterBarrier(tmpbr); - System.clearPrefetchCache(); + System.clearPrefetchCache(); // compute multipliers atomic { t = -1.0/col_k[k]; @@ -102,7 +102,7 @@ class LinpackRunner extends Thread { } // synchronise threads Barrier.enterBarrier(tmpbr); - System.clearPrefetchCache(); + System.clearPrefetchCache(); // row elimination with column indexing atomic { slice = ((nlocal-kp1) + nthreads-1)/nthreads; @@ -123,12 +123,12 @@ class LinpackRunner extends Thread { } // synchronise threads Barrier.enterBarrier(tmpbr); - System.clearPrefetchCache(); + System.clearPrefetchCache(); } else { info = k; } Barrier.enterBarrier(tmpbr); - System.clearPrefetchCache(); + System.clearPrefetchCache(); } } diff --git a/Robust/src/Benchmarks/Prefetch/MatrixMultiply/MatrixMultiply.java b/Robust/src/Benchmarks/Prefetch/MatrixMultiply/MatrixMultiply.java index 6a75c0f6..e56a6faa 100644 --- a/Robust/src/Benchmarks/Prefetch/MatrixMultiply/MatrixMultiply.java +++ b/Robust/src/Benchmarks/Prefetch/MatrixMultiply/MatrixMultiply.java @@ -16,14 +16,17 @@ public class MatrixMultiply extends Thread{ atomic { //compute the results localresults=new double[1+x1-x0][1+y1-y0]; - + double la[][]=mmul.a; + double lbtranspose[][]=mmul.b; + double lc[][]=mmul.c; + int M=mmul.M; + //Use b transpose for cache performance for(int i = x0; i<= x1; i++){ - double a[]=mmul.a[i]; - int M=mmul.M; + double a[]=la[i]; for (int j = y0; j <= y1; j++) { double innerProduct=0; - double b[] = mmul.btranspose[j]; + double b[] = lbtranspose[j]; for(int k = 0; k < M; k++) { innerProduct += a[k] *b[k]; } @@ -44,6 +47,12 @@ public class MatrixMultiply extends Thread{ } public static void main(String[] args) { +<<<<<<< MatrixMultiply.java + int mid1 = (128<<24)|(195<<16)|(175<<8)|69; + int mid2 = (128<<24)|(195<<16)|(175<<8)|69; + int mid3 = (128<<24)|(195<<16)|(175<<8)|71; + int NUM_THREADS = 1; +======= int NUM_THREADS = 4; int[] mid = new int[NUM_THREADS]; mid[0] = (128<<24)|(195<<16)|(175<<8)|69; @@ -52,6 +61,7 @@ public class MatrixMultiply extends Thread{ mid[3] = (128<<24)|(195<<16)|(175<<8)|79; //int mid1 = (128<<24)|(195<<16)|(175<<8)|69; //int mid2 = (128<<24)|(195<<16)|(175<<8)|73; +>>>>>>> 1.19 int p, q, r; MatrixMultiply[] mm; MatrixMultiply tmp; diff --git a/Robust/src/Benchmarks/Prefetch/MatrixMultiply/MatrixMultiplyN.java b/Robust/src/Benchmarks/Prefetch/MatrixMultiply/MatrixMultiplyN.java index f0314b30..93a00316 100644 --- a/Robust/src/Benchmarks/Prefetch/MatrixMultiply/MatrixMultiplyN.java +++ b/Robust/src/Benchmarks/Prefetch/MatrixMultiply/MatrixMultiplyN.java @@ -12,14 +12,18 @@ public class MatrixMultiply extends Thread{ public void run() { atomic { + double la[][]=mmul.a; + double lc[][]=mmul.c; + double lb[][]=mmul.btranspose; + int M=mmul.M; + //Use btranspose for cache performance for(int i = x0; i< x1; i++){ - double a[]=mmul.a[i]; - double c[]=mmul.c[i]; - int M=mmul.M; + double a[]=la[i]; + double c[]=lc[i]; for (int j = y0; j < y1; j++) { double innerProduct=0; - double b[] = mmul.btranspose[j]; + double b[] = lb[j]; for(int k = 0; k < M; k++) { innerProduct += a[k] *b[k]; } @@ -39,9 +43,9 @@ public class MatrixMultiply extends Thread{ } int[] mid = new int[4]; - mid[0] = (128<<24)|(195<<16)|(175<<8)|80; - mid[1] = (128<<24)|(195<<16)|(175<<8)|73; - mid[2] = (128<<24)|(195<<16)|(175<<8)|78; + mid[0] = (128<<24)|(195<<16)|(175<<8)|69; + mid[1] = (128<<24)|(195<<16)|(175<<8)|70; + mid[2] = (128<<24)|(195<<16)|(175<<8)|71; mid[3] = (128<<24)|(195<<16)|(175<<8)|79; int p, q, r; MatrixMultiply[] mm; diff --git a/Robust/src/Benchmarks/Prefetch/MatrixMultiply/makefile b/Robust/src/Benchmarks/Prefetch/MatrixMultiply/makefile index 6281f4ce..69a49b3a 100644 --- a/Robust/src/Benchmarks/Prefetch/MatrixMultiply/makefile +++ b/Robust/src/Benchmarks/Prefetch/MatrixMultiply/makefile @@ -1,10 +1,10 @@ MAINCLASS=MatrixMultiply SRC1=${MAINCLASS}N.java -FLAGS=-dsm -prefetch -optimize -profile -debug -excprefetch MatrixMultiply.main -excprefetch MMul.setValues -excprefetch MMul.transpose -mainclass ${MAINCLASS} -trueprob 0.8 -FLAGS2=-dsm -optimize -profile -debug -excprefetch MatrixMultiply.main -excprefetch MMul.setValues -excprefetch MMul.transpose -mainclass ${MAINCLASS} +FLAGS=-dsm -prefetch -optimize -debug -excprefetch MatrixMultiply.main -excprefetch MMul.setValues -excprefetch MMul.transpose -mainclass ${MAINCLASS} -trueprob 0.7 +FLAGS2=-dsm -optimize -debug -excprefetch MatrixMultiply.main -excprefetch MMul.setValues -excprefetch MMul.transpose -mainclass ${MAINCLASS} default: - ../../../buildscript ${FLAGS2} -o ${MAINCLASS}NNP ${SRC1} - ../../../buildscript ${FLAGS} -o ${MAINCLASS}N ${SRC1} + ../../../buildscript ${FLAGS2} -o ${MAINCLASS}NP ${SRC1} + ../../../buildscript ${FLAGS} -o ${MAINCLASS}P ${SRC1} clean: rm *.bin diff --git a/Robust/src/Main/Main.java b/Robust/src/Main/Main.java index d3bc0def..a46cca82 100644 --- a/Robust/src/Main/Main.java +++ b/Robust/src/Main/Main.java @@ -417,8 +417,11 @@ public class Main { if (state.DSM) { CallGraph callgraph=new CallGraph(state); if (state.PREFETCH) { - PrefetchAnalysis pa=new PrefetchAnalysis(state, callgraph, tu); + //speed up prefetch generation using locality analysis results + LocalityAnalysis la=new LocalityAnalysis(state, callgraph, tu); + PrefetchAnalysis pa=new PrefetchAnalysis(state, callgraph, tu, la); } + LocalityAnalysis la=new LocalityAnalysis(state, callgraph, tu); GenerateConversions gc=new GenerateConversions(la, state); BuildCode bc=new BuildCode(state, bf.getMap(), tu, la); diff --git a/Robust/src/buildscript b/Robust/src/buildscript index f0140385..e0c07fd4 100755 --- a/Robust/src/buildscript +++ b/Robust/src/buildscript @@ -30,6 +30,7 @@ echo "-nooptimize call gcc with -O0 (do not optimize)" echo -curdir directory echo -mainclass class with main method echo -o binary +echo -nojava do not run bristlecone compiler echo -instructionfailures inject code for instructionfailures echo -profile build with profile options echo "-enable-assertions execute assert statements during compilation" @@ -41,6 +42,7 @@ DSMRUNTIME=$ROBUSTROOT/Runtime/DSTM/interface/ REPAIRROOT=~/research/Repair/RepairCompiler/ CURDIR=`pwd` DSMFLAG=false +NOJAVA=false CHECKFLAG=false RECOVERFLAG=false MULTICOREFLAG=false @@ -72,6 +74,9 @@ elif [[ $1 = '-robustroot' ]] then ROBUSTROOT="$2" shift +elif [[ $1 = '-nojava' ]] +then +NOJAVA=true elif [[ $1 = '-o' ]] then MAINFILE="$2" @@ -213,12 +218,15 @@ then exit $? fi else #if ! java -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \ +if ! $NOJAVA +then if ! java -Xms5m -Xmx100m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \ $ROBUSTROOT/ClassLibrary/ -dir $BUILDDIR -precise \ $JAVAOPTS $SRCFILES then exit $? fi fi +fi # Build all of the consistency specs