found a bug, wasn't returning pointer at end of poolcreate--pool allocation doesn...
authorjjenista <jjenista>
Fri, 24 Sep 2010 23:44:38 +0000 (23:44 +0000)
committerjjenista <jjenista>
Fri, 24 Sep 2010 23:44:38 +0000 (23:44 +0000)
Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java
Robust/src/Benchmarks/oooJava/sor/makefile
Robust/src/Benchmarks/oooJava/sor/speedup.notes [new file with mode: 0644]
Robust/src/IR/Flat/BuildCode.java
Robust/src/Runtime/memPool.h

index 20d5f548bafc34a386dd2900ea1151d0fbbcea2e..2424ae8d17fcf8608eaf15354a3ff5dd180403ec 100644 (file)
@@ -1540,7 +1540,11 @@ public class OoOJavaAnalysis {
       throws java.io.IOException {
 
     if (!fsen.getIsCallerSESEplaceholder()) {
-      bw.write("SESE " + fsen.getPrettyIdentifier() + " {\n");
+      bw.write("SESE " + fsen.getPrettyIdentifier());
+      if( fsen.getIsLeafSESE() ) {
+        bw.write(" (leaf)");
+      }
+      bw.write(" {\n");
 
       bw.write("  in-set: " + fsen.getInVarSet() + "\n");
       Iterator<TempDescriptor> tItr = fsen.getInVarSet().iterator();
index 4f8d6da4437f02df6a54ec5894c45222e41f1488..cebb6c2069d844878632a8e08602961d2e2384ad 100644 (file)
@@ -6,7 +6,7 @@ BUILDSCRIPT=../../../buildscript
 
 USEOOO= -ooojava 24 2  -ooodebug  
 
-BSFLAGS= -64bit -mainclass $(PROGRAM)  -heapsize-mb 6*1024 -garbagestats -debug -joptimize -noloop -optimize -ooodebug-disable-task-mem-pool
+BSFLAGS= -64bit -mainclass $(PROGRAM)  -heapsize-mb 6*1024 -garbagestats -debug -joptimize -noloop -optimize #-ooodebug-disable-task-mem-pool
 #-coreprof -coreprof-eventwords 1024*1024*128 #-coreprof-checkoverflow 
 
 DISJOINT= -disjoint -disjoint-k 1 -enable-assertions #-disjoint-desire-determinism
diff --git a/Robust/src/Benchmarks/oooJava/sor/speedup.notes b/Robust/src/Benchmarks/oooJava/sor/speedup.notes
new file mode 100644 (file)
index 0000000..3f6c727
--- /dev/null
@@ -0,0 +1,93 @@
+Without using memory pool allocation for task records:
+Single: Avg. execution time over 3 runs is
+742.761s / 3 = 247.587s
+
+Par: Avg. execution time over 3 runs is
+165.59s / 3 = 55.197s
+
+NO POOL: speedup 4.49x
+
+
+
+
+With memory pool allocation:
+Single: 697.984 / 3 = 232.661s
+Par: 184.572 / 3 = 61.524s
+
+POOL: speedup 3.78x
+
+
+
+
+RAW DATA BELOW:
+
+
+
+WITHOUT MEM POOL:
+jjenista@dc-10:~/research/Robust/src/Benchmarks/oooJava/sor$ ./runs; ./runs; ./runs; ./runp; ./runp; ./runp
+Section2:SOR:Kernel    0.000000 (s)     inf     (Iterations/s)Finished
+
+real   4m35.011s
+user   4m34.672s
+sys    0m0.273s
+Section2:SOR:Kernel    0.000000 (s)     inf     (Iterations/s)Finished
+
+real   3m53.994s
+user   3m53.689s
+sys    0m0.263s
+Section2:SOR:Kernel    0.000000 (s)     inf     (Iterations/s)Finished
+
+real   3m53.756s
+user   3m53.470s
+sys    0m0.244s
+Section2:SOR:Kernel    0.000000 (s)     inf     (Iterations/s)Finished
+
+real   0m55.299s
+user   9m11.543s
+sys    12m28.633s
+Section2:SOR:Kernel    0.000000 (s)     inf     (Iterations/s)Finished
+
+real   0m55.240s
+user   9m10.687s
+sys    12m27.857s
+Section2:SOR:Kernel    0.000000 (s)     inf     (Iterations/s)Finished
+
+real   0m55.051s
+user   9m9.511s
+sys    12m24.147s
+
+
+
+WITH MEM POOL
+
+jjenista@dc-10:~/research/Robust/src/Benchmarks/oooJava/sor$ ./runs; ./runs; ./runs; ./runp; ./runp; ./runp
+Section2:SOR:Kernel    0.000000 (s)     inf     (Iterations/s)Finished
+
+real   3m52.918s
+user   3m52.633s
+sys    0m0.244s
+Section2:SOR:Kernel    0.000000 (s)     inf     (Iterations/s)Finished
+
+real   3m52.731s
+user   3m52.449s
+sys    0m0.240s
+Section2:SOR:Kernel    0.000000 (s)     inf     (Iterations/s)Finished
+
+real   3m52.335s
+user   3m52.054s
+sys    0m0.240s
+Section2:SOR:Kernel    0.000000 (s)     inf     (Iterations/s)Finished
+
+real   0m53.868s
+user   9m2.613s
+sys    12m8.709s
+Section2:SOR:Kernel    0.000000 (s)     inf     (Iterations/s)Finished
+
+real   1m17.154s
+user   13m28.935s
+sys    16m45.794s
+Section2:SOR:Kernel    0.000000 (s)     inf     (Iterations/s)Finished
+
+real   0m53.550s
+user   9m2.889s
+sys    12m0.588s
index 884f9a1f504b2f801721e81e31b16ba5797d911b..ca23a7718bc68aae712e109c6a53fd080be6934c 100644 (file)
@@ -3642,8 +3642,8 @@ public class BuildCode {
     }
     
     // before doing anything, lock your own record and increment the running children
-    if( (state.MLP && fsen != mlpa.getMainSESE()) || 
-         (state.OOOJAVA && fsen != oooa.getMainSESE())
+    if( (state.MLP     && fsen != mlpa.getMainSESE()) || 
+        (state.OOOJAVA && fsen != oooa.getMainSESE())
     ) {      
       output.println("     atomic_inc(&(runningSESE->numRunningChildren));");
     }
index 356e15e8f3cb1cb9380798a0c3ecc9057d1349d3..b9b55cf659c3dae3cdc58edb2b08508ec2ae0a3c 100644 (file)
 //////////////////////////////////////////////////////////
 
 #include <stdlib.h>
-
-// just until uninitialized mem bug found
-#include <string.h>
-
 #include "mlp_lock.h"
 
 
@@ -56,6 +52,7 @@ static MemPool* poolcreate( int itemSize ) {
   p->head       = calloc( 1, itemSize );
   p->head->next = NULL;
   p->tail       = p->head;
+  return p;
 }
 
 
@@ -113,16 +110,13 @@ static inline void* poolalloc( MemPool* p ) {
 
   if( headCurrent->next == NULL ) {
     // only one item, so don't take from pool
-    //return malloc( p->itemSize );
-
-    // just until uninitialized mem bug found
-    return calloc( 1, p->itemSize );
+    return malloc( p->itemSize );
   }
  
   p->head = headCurrent->next;
 
   // just until uninitialized mem bug found
-  memset( headCurrent, 0, p->itemSize );
+  //memset( headCurrent, 0, p->itemSize );
 
   return headCurrent;
 }