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 \
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
// 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" );
long e2;
rblock parent {
- long y = 0;
+ //long y = 0;
for( long i = 0; i < count; i++ ) {
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" );
public class Foo {
- int z;
+ public Foo() {}
+ int f;
}
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] );
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" );
+
}
}
--- /dev/null
+include ../micro-master-makefile
--- /dev/null
+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" );
+
+ }
+}