Tweaks to microbenchmarks, one stall semaphore per thread changes have been backed...
authorjjenista <jjenista>
Fri, 15 Oct 2010 21:34:12 +0000 (21:34 +0000)
committerjjenista <jjenista>
Fri, 15 Oct 2010 21:34:12 +0000 (21:34 +0000)
Robust/src/Benchmarks/oooJava/micro-master-makefile
Robust/src/Benchmarks/oooJava/micro/test.java
Robust/src/Benchmarks/oooJava/micro2/test.java
Robust/src/Benchmarks/oooJava/micro3/test.java
Robust/src/Benchmarks/oooJava/micro4/makefile [new file with mode: 0644]
Robust/src/Benchmarks/oooJava/micro4/test.java [new file with mode: 0644]

index e77ffe5164a6192b9660afe31ffb633427a7fcae..54fd6ae2c8aa94fb95040083c0be06c234e1457c 100644 (file)
@@ -16,7 +16,7 @@ BUILDSCRIPT=../../../buildscript
 
 COREPROFOVERFLOW= #-coreprof-checkoverflow
 USECOREPROF= -coreprof $(COREPROFOVERFLOW) \
-       -coreprof-eventwords 1024*1024*128 \
+       -coreprof-eventwords 1024*1024*512 \
        -coreprof-enable cpe_main \
        -coreprof-enable cpe_runmalloc \
        -coreprof-enable cpe_taskexecute \
@@ -33,7 +33,7 @@ USECOREPROF= -coreprof $(COREPROFOVERFLOW) \
 
 
 USEOOO= -ooojava 24 2 #-ooodebug-disable-task-mem-pool #-ooodebug 
-BSFLAGS= -64bit -mainclass $(PROGRAM)  -heapsize-mb 8000 -garbagestats -joptimize -noloop -optimize #src-after-pp #-debug
+BSFLAGS= -64bit -mainclass $(PROGRAM)  -heapsize-mb 2000 -garbagestats -joptimize -noloop -optimize -debug #src-after-pp
 
 DRELEASEMODE=-disjoint-release-mode -disjoint-dvisit-stack-callees-on-top -disjoint-alias-file aliases.txt tabbed
 DISJOINT= -disjoint -disjoint-k 1 -enable-assertions $(DRELEASEMODE) #-disjoint-desire-determinism
index 753c8f77413d1a06f6fcda91e6e42499d994f937..69fd2f7b399057f1d413e0a9be97a93d839aa050 100644 (file)
@@ -24,14 +24,19 @@ public class test {
         // child needs the value read-only
         rblock child {
           if( x + 4 == -9 ) {
-            ++y;
           }
         }
       }
       e1 = System.currentTimeMillis();
-    }
+      long z = 1;
+    }    
+    // just read vars so compile doesn't throw them out
+    // and force parent of parent to depend on z, for
+    // timing
+    System.out.println( "ignore: "+x+y+z );
     e2 = System.currentTimeMillis();
 
+
     double dt1 = ((double)e1-s)/(Math.pow( 10.0, 3.0 ) );
     double dt2 = ((double)e2-s)/(Math.pow( 10.0, 3.0 ) );
     System.out.println( "dt to parent done   ="+dt1+"s" );
index 4146e23cd95e3a79820276749654ecb49b3bcefd..a0515c117230fe6d74031384e807a2013f31fc50 100644 (file)
@@ -13,7 +13,7 @@ public class test {
     long e2;
 
     rblock parent {
-      long y = 0;
+      //long y = 0;
       
       for( long i = 0; i < count; i++ ) {
 
@@ -23,17 +23,23 @@ public class test {
           long x = 3;
         }
 
-        rblock child1 {
+        rblock child2 {
           if( x + 4 == -9 ) {
-            ++y;
+            //++y;
           }
         }
 
       }
       e1 = System.currentTimeMillis();
+      long z = 1;
     }
+    // just read vars so compile doesn't throw them out
+    // and force parent of parent to depend on z, for
+    // timing
+    System.out.println( "ignore: "+z );
     e2 = System.currentTimeMillis();
 
+
     double dt1 = ((double)e1-s)/(Math.pow( 10.0, 3.0 ) );
     double dt2 = ((double)e2-s)/(Math.pow( 10.0, 3.0 ) );
     System.out.println( "dt to parent done   ="+dt1+"s" );
index e2fb866d89406deb1992264cd45e316041d0ee49..45dc4d4512cdd6cc1a2796ce5a7ff5abc5af02b0 100644 (file)
@@ -1,5 +1,6 @@
 public class Foo {
-  int z;
+  public Foo() {}
+  int f;
 }
 
 
@@ -7,8 +8,8 @@ public class test {
 
   public static void main( String argv[] ) {
     
-    long count  = 500000;
-    long numFoo = 1000;
+    long count  = 5000;
+    int  numFoo = 1000;
     
     if( argv.length > 0 ) {
       count = count * Integer.parseInt( argv[0] );
@@ -18,38 +19,47 @@ public class test {
       numFoo = numFoo * Integer.parseInt( argv[1] );
     }
             
+
     long s = System.currentTimeMillis();
     long e1;
     long e2;
 
     rblock parent {
-      
+
       Foo[] array = new Foo[numFoo];
-      
-      for( long i = 0; i < numFoo; i++ ) {
+
+      for( int i = 0; i < numFoo; i++ ) {
         array[i] = new Foo();
       }
-      
+                  
       for( long j = 0; j < count; j++ ) {
-        for( long i = 0; i < numFoo; i++ ) {
+        for( int i = 0; i < numFoo; i++ ) {
 
-          Foo f = array[i];
+          Foo foo = array[i];
           rblock child {
-            f.z++;
+            foo.f++;
           }
         }
       }
 
       // force a coarse grained conflict
-      //array[numFoo - 1].z++;
+      //array[numFoo - 1].f++;
+      
 
       e1 = System.currentTimeMillis();
+      long z = 1;
     }
+    // just read vars so compile doesn't throw them out
+    // and force parent of parent to depend on z, for
+    // timing
+    System.out.println( "ignore: "+z );
     e2 = System.currentTimeMillis();
 
+
     double dt1 = ((double)e1-s)/(Math.pow( 10.0, 3.0 ) );
     double dt2 = ((double)e2-s)/(Math.pow( 10.0, 3.0 ) );
     System.out.println( "dt to parent done   ="+dt1+"s" );
     System.out.println( "dt to parent retired="+dt2+"s" );
+
   }
 }
diff --git a/Robust/src/Benchmarks/oooJava/micro4/makefile b/Robust/src/Benchmarks/oooJava/micro4/makefile
new file mode 100644 (file)
index 0000000..a12742f
--- /dev/null
@@ -0,0 +1 @@
+include ../micro-master-makefile
diff --git a/Robust/src/Benchmarks/oooJava/micro4/test.java b/Robust/src/Benchmarks/oooJava/micro4/test.java
new file mode 100644 (file)
index 0000000..2acf70c
--- /dev/null
@@ -0,0 +1,72 @@
+public class Foo {
+  public Foo() {}
+  int f;
+}
+
+
+public class test {
+
+  public static void main( String argv[] ) {
+    
+    long count  = 5000;
+    int  numFoo = 1000;
+    
+    if( argv.length > 0 ) {
+      count = count * Integer.parseInt( argv[0] );
+    }
+
+    if( argv.length > 1 ) {
+      numFoo = numFoo * Integer.parseInt( argv[1] );
+    }
+            
+
+    long s = System.currentTimeMillis();
+    long e1;
+    long e2;
+
+    rblock parent {
+
+      Foo[] array = new Foo[numFoo];
+
+      for( int i = 0; i < numFoo; i++ ) {
+        array[i] = new Foo();
+      }
+                  
+      for( long j = 0; j < count; j++ ) {
+        for( int i = 0; i < numFoo; i++ ) {
+
+          rblock child1 {
+            int x = 2;
+          }
+
+          Foo foo = array[i];
+
+          // a variable fro sib
+          // AND memory dependence
+          rblock child2 {
+            foo.f += x;
+          }
+        }
+      }
+
+      // force a coarse grained conflict
+      //array[numFoo - 1].f++;
+      
+
+      e1 = System.currentTimeMillis();
+      long z = 1;
+    }
+    // just read vars so compile doesn't throw them out
+    // and force parent of parent to depend on z, for
+    // timing
+    System.out.println( "ignore: "+z );
+    e2 = System.currentTimeMillis();
+
+
+    double dt1 = ((double)e1-s)/(Math.pow( 10.0, 3.0 ) );
+    double dt2 = ((double)e2-s)/(Math.pow( 10.0, 3.0 ) );
+    System.out.println( "dt to parent done   ="+dt1+"s" );
+    System.out.println( "dt to parent retired="+dt2+"s" );
+
+  }
+}