Changing OoOJava work scheduler to true work stealing, garbage collection can walk...
[IRC.git] / Robust / src / IR / Flat / BuildCode.java
index e14ff60a4c7b607e712de8ad4eb04b34c11e83e2..09352df46bdbf30312244d2763c4f85db4a8f85f 100644 (file)
@@ -1251,7 +1251,7 @@ public class BuildCode {
     outclassdefs.print("int numprefetchsites = " + pa.prefetchsiteid + ";\n");
     if(this.state.MLP || state.OOOJAVA ){
        outclassdefs.print("extern __thread int oid;\n");
-       outclassdefs.print("extern int numWorkers;\n");
+       outclassdefs.print("extern int numWorkSchedWorkers;\n");
     }
 
     Iterator it=state.getClassSymbolTable().getDescriptorsIterator();
@@ -2668,11 +2668,7 @@ public class BuildCode {
       if( (state.MLP && fsen.equals( mlpa.getMainSESE() )) || 
           (state.OOOJAVA && fsen.equals( oooa.getMainSESE() ))
       ) {
-       outmethod.println(  "      /* work scheduler works forever, explicitly exit */");
-        outmethod.println(  "      CP_EXIT();");
-        outmethod.println(  "      CP_DUMP();");       
         outmethod.println(  "      workScheduleExit();");
-       outmethod.println(  "      exit( 0 );");
       }
 
       outmethod.println(    "      break;");
@@ -5406,7 +5402,7 @@ public class BuildCode {
       } else if ((GENERATEPRECISEGC) || (this.state.MULTICOREGC)) {
          if(this.state.MLP || state.OOOJAVA){
             output.println(generateTemp(fm,fn.getDst(),lb)+"=allocate_newarray_mlp("+localsprefixaddr+", "+arrayid+", "+generateTemp(fm, fn.getSize(),lb)+", oid, "+oooa.getDisjointAnalysis().getAllocationSiteFromFlatNew(fn).getUniqueAllocSiteID()+");");
-       output.println("    oid += numWorkers;");
+       output.println("    oid += numWorkSchedWorkers;");
          }else{
     output.println(generateTemp(fm,fn.getDst(),lb)+"=allocate_newarray("+localsprefixaddr+", "+arrayid+", "+generateTemp(fm, fn.getSize(),lb)+");");                     
          }
@@ -5419,7 +5415,7 @@ public class BuildCode {
       } else if ((GENERATEPRECISEGC) || (this.state.MULTICOREGC)) {
          if (this.state.MLP || state.OOOJAVA){
        output.println(generateTemp(fm,fn.getDst(),lb)+"=allocate_new_mlp("+localsprefixaddr+", "+fn.getType().getClassDesc().getId()+", oid, "+oooa.getDisjointAnalysis().getAllocationSiteFromFlatNew(fn).getUniqueAllocSiteID()+");");
-       output.println("    oid += numWorkers;");
+       output.println("    oid += numWorkSchedWorkers;");
          } else {
     output.println(generateTemp(fm,fn.getDst(),lb)+"=allocate_new("+localsprefixaddr+", "+fn.getType().getClassDesc().getId()+");");                     
          }