--- /dev/null
+##########################################################################
+#
+# This master makefile should be included in each local makefile of a
+# MICRO benchmark directory. Note that joptimize is disabled so
+# nonsensical code patterns will still generate the micro structure
+# desired.
+#
+##########################################################################
+
+PROGRAM=test
+SOURCE_FILES=test.java
+
+
+BUILDSCRIPT=../../../buildscript
+
+
+COREPROFOVERFLOW= #-coreprof-checkoverflow
+USECOREPROF= -coreprof $(COREPROFOVERFLOW) \
+ -coreprof-eventwords 1024*1024*128 \
+ -coreprof-enable cpe_main \
+ -coreprof-enable cpe_runmalloc \
+ -coreprof-enable cpe_taskexecute \
+ -coreprof-enable cpe_taskdispatch \
+ -coreprof-enable cpe_poolalloc
+# -coreprof-enable cpe_preparememq
+# -coreprof-enable cpe_runfree \
+# -coreprof-enable cpe_count_poolalloc \
+# -coreprof-enable cpe_count_poolreuse \
+# -coreprof-enable cpe_workschedgrab \
+# -coreprof-enable cpe_taskretire \
+# -coreprof-enable cpe_taskstallvar \
+# -coreprof-enable cpe_taskstallmem
+
+
+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
+
+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
+
+default:
+ $(BUILDSCRIPT) -nojava $(BSFLAGS) $(USECOREPROF) $(USEOOO) $(DISJOINT) -o $(PROGRAM)p -builddir par $(SOURCE_FILES)
+
+single:
+ $(BUILDSCRIPT) -thread $(BSFLAGS) $(USECOREPROF) -o $(PROGRAM)s -builddir sing $(SOURCE_FILES)
+
+ooo:
+ $(BUILDSCRIPT) $(BSFLAGS) $(USECOREPROF) $(USEOOO) $(DISJOINT) -o $(PROGRAM)p -builddir par $(SOURCE_FILES)
+
+clean:
+ rm -f $(PROGRAM)p.bin $(PROGRAM)s.bin
+ rm -fr par sing
+ rm -f tmp.c
+ rm -f *~
+ rm -f *.dot
+ rm -f *.png
+ rm -f *.txt
+ rm -f aliases.txt
+ rm -f mlpReport*txt
+ rm -f results*txt
+ rm -f coreprof.dat
+ rm -f trace.out
-#raytracer
-PROGRAM=test
-
-SOURCE_FILES=test.java
-
-BUILDSCRIPT=../../../buildscript
-
-USEOOO= -ooojava 1 2 -ooodebug
-BSFLAGS= -64bit -mainclass test -debug -garbagestats -joptimize -optimize
-DISJOINT= -disjoint -disjoint-k 1 -enable-assertions
-
-default:
- $(BUILDSCRIPT) -nojava $(USEOOO) $(BSFLAGS) $(DISJOINT) -o $(PROGRAM)p $(SOURCE_FILES) -builddir par
-
-single:
- $(BUILDSCRIPT) $(BSFLAGS) -o $(PROGRAM)s -builddir sing $(SOURCE_FILES)
-
-ooo:
- $(BUILDSCRIPT) $(USEOOO) $(BSFLAGS) $(DISJOINT) -o $(PROGRAM)p -builddir par $(SOURCE_FILES)
-
-clean:
- rm -f $(PROGRAM)p.bin $(PROGRAM)s.bin
- rm -fr par sing
- rm -f *~
- rm -f *.dot
- rm -f *.png
- rm -f *.txt
- rm -f aliases.txt
- rm -f mlpReport*txt
- rm -f results*txt
+include ../micro-master-makefile
public class test {
- public static void main(String argv[]) {
-
- long x=0;
- long count=500000;
-
- if(argv.length>0){
- count=count * Integer.parseInt(argv[0]);
- }
+ public static void main( String argv[] ) {
+
+ long count = 500000;
+
+ if( argv.length > 0 ) {
+ count = count * Integer.parseInt( argv[0] );
+ }
- long s=System.currentTimeMillis();
-
- for(long i=0;i<count;i++){
- rblock rchild{
- x++;
- for(int j=0;j<1000;j++) {
- x++;x--;
- }
- }
- }
+ long s = System.currentTimeMillis();
+ long e1;
+ long e2;
- long e1=System.currentTimeMillis();
- System.out.println( "x="+x );
- long e2=System.currentTimeMillis();
+ rblock parent {
+ long x = 3;
+ long y = 0;
+
+ for( long i = 0; i < count; i++ ) {
- 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( "dt1="+dt1+"s" );
- System.out.println( "dt2="+dt2+"s" );
- }
+ // the parent does a simple variable copy
+ // into this child's record at issue because
+ // the value is definitely available, the
+ // child needs the value read-only
+ rblock child {
+ if( x + 4 == -9 ) {
+ ++y;
+ }
+ }
+ }
+ e1 = System.currentTimeMillis();
+ }
+ 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" );
+ }
}
-#raytracer
-PROGRAM=test
-
-SOURCE_FILES=test.java
-
-BUILDSCRIPT=../../../buildscript
-
-USEOOO= -ooojava 1 2 -ooodebug
-BSFLAGS= -64bit -optimize -mainclass test -debug -garbagestats -joptimize
-DISJOINT= -disjoint -disjoint-k 1 -enable-assertions
-
-default:
- $(BUILDSCRIPT) -nojava $(USEOOO) $(BSFLAGS) $(DISJOINT) -o $(PROGRAM)p $(SOURCE_FILES) -builddir par
-
-single:
- $(BUILDSCRIPT) $(BSFLAGS) -o $(PROGRAM)s -builddir sing $(SOURCE_FILES)
-
-ooo:
- $(BUILDSCRIPT) $(USEOOO) $(BSFLAGS) $(DISJOINT) -o $(PROGRAM)p -builddir par $(SOURCE_FILES)
-
-clean:
- rm -f $(PROGRAM)p.bin $(PROGRAM)s.bin
- rm -fr par sing
- rm -f *~
- rm -f *.dot
- rm -f *.png
- rm -f *.txt
- rm -f aliases.txt
- rm -f mlpReport*txt
- rm -f results*txt
+include ../micro-master-makefile
public class test {
- public static void main(String argv[]) {
-
- long x=0;
- long count=500000;
-
- if(argv.length>0){
- count=count * Integer.parseInt(argv[0]);
- }
-
- long s=System.currentTimeMillis();
-
- for(long i=0;i<count;i++){
- rblock rchild{
- }
- x++;
- }
-
- long e1=System.currentTimeMillis();
- System.out.println( "x="+x );
- long 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( "dt1="+dt1+"s" );
- System.out.println( "dt2="+dt2+"s" );
- }
-
+ public static void main( String argv[] ) {
+
+ long count = 500000;
+
+ if( argv.length > 0 ) {
+ count = count * Integer.parseInt( argv[0] );
+ }
+
+ long s = System.currentTimeMillis();
+ long e1;
+ long e2;
+
+ rblock parent {
+ long y = 0;
+
+ for( long i = 0; i < count; i++ ) {
+
+ // the subsequent sibling has a dependence
+ // on the first
+ rblock child1 {
+ long x = 3;
+ }
+
+ rblock child1 {
+ if( x + 4 == -9 ) {
+ ++y;
+ }
+ }
+
+ }
+ e1 = System.currentTimeMillis();
+ }
+ 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" );
+ }
}
-#raytracer
-PROGRAM=test
-
-SOURCE_FILES=test.java
-
-BUILDSCRIPT=../../../buildscript
-
-USEOOO= -ooojava 1 2 -ooodebug
-BSFLAGS= -64bit -optimize -mainclass test -debug -garbagestats -joptimize
-DISJOINT= -disjoint -disjoint-k 1 -enable-assertions
-
-default:
- $(BUILDSCRIPT) -nojava $(USEOOO) $(BSFLAGS) $(DISJOINT) -o $(PROGRAM)p $(SOURCE_FILES) -builddir par
-
-single:
- $(BUILDSCRIPT) $(BSFLAGS) -o $(PROGRAM)s -builddir sing $(SOURCE_FILES)
-
-ooo:
- $(BUILDSCRIPT) $(USEOOO) $(BSFLAGS) $(DISJOINT) -o $(PROGRAM)p -builddir par $(SOURCE_FILES)
-
-clean:
- rm -f $(PROGRAM)p.bin $(PROGRAM)s.bin
- rm -fr par sing
- rm -f *~
- rm -f *.dot
- rm -f *.png
- rm -f *.txt
- rm -f aliases.txt
- rm -f mlpReport*txt
- rm -f results*txt
+include ../micro-master-makefile
-public class test {
-
- public static void main(String argv[]) {
-
- long x=0;
- long count=500000;
-
- if(argv.length>0){
- count=count * Integer.parseInt(argv[0]);
- }
-
- long s=System.currentTimeMillis();
-
- for(long i=0;i<count;i++){
- rblock rchild{
- }
- }
+public class Foo {
+ int z;
+}
- long e1=System.currentTimeMillis();
- System.out.println( "x="+x );
- long 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( "dt1="+dt1+"s" );
- System.out.println( "dt2="+dt2+"s" );
- }
+public class test {
+ public static void main( String argv[] ) {
+
+ long count = 500000;
+ long 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( long i = 0; i < numFoo; i++ ) {
+ array[i] = new Foo();
+ }
+
+ for( long j = 0; j < count; j++ ) {
+ for( long i = 0; i < numFoo; i++ ) {
+
+ Foo f = array[i];
+ rblock child {
+ f.z++;
+ }
+ }
+ }
+
+ // force a coarse grained conflict
+ //array[numFoo - 1].z++;
+
+ e1 = System.currentTimeMillis();
+ }
+ 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" );
+ }
}