9 public static void main( String argv[] ) {
14 if( argv.length > 0 ) {
15 count = count * Integer.parseInt( argv[0] );
18 if( argv.length > 1 ) {
19 numFoo = numFoo * Integer.parseInt( argv[1] );
23 long s = System.currentTimeMillis();
29 Foo[] array = new Foo[numFoo];
31 for( int i = 0; i < numFoo; i++ ) {
35 for( long j = 0; j < count; j++ ) {
36 for( int i = 0; i < numFoo; i++ ) {
45 // AND memory dependence
52 // force a coarse grained conflict
53 //array[numFoo - 1].f++;
56 e1 = System.currentTimeMillis();
59 // just read vars so compile doesn't throw them out
60 // and force parent of parent to depend on z, for
62 System.out.println( "ignore: "+z );
63 e2 = System.currentTimeMillis();
66 double dt1 = ((double)e1-s)/(Math.pow( 10.0, 3.0 ) );
67 double dt2 = ((double)e2-s)/(Math.pow( 10.0, 3.0 ) );
68 System.out.println( "dt to parent done ="+dt1+"s" );
69 System.out.println( "dt to parent retired="+dt2+"s" );