--- old/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorStackDepthTest.java 2018-02-12 20:05:15.603725851 -0800 +++ new/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorStackDepthTest.java 2018-02-12 20:05:15.363726775 -0800 @@ -53,8 +53,8 @@ int depth = depths[depthIdx]; HeapMonitor.enableSampling(); - // Do the runner 10 times to ensure the stack is really sampled. - runner(10, depth); + // Do the runner 3 times to ensure the stack is really sampled. + runner(3, depth); // baseDepth represents the helper method depth: main, runner, HeapMonitor.allocate, // and HeapMonitor.actuallyAllocate. @@ -65,7 +65,7 @@ // 3% error should be close enough. if (errorPercentage > 3) { - throw new RuntimeException("Stack depth average over 5% for depth " + depth + " : " + averageDepth + " , error: " + errorPercentage); + throw new RuntimeException("Stack depth average over 3% for depth " + depth + " : " + averageDepth + " , error: " + errorPercentage); } HeapMonitor.disableSampling(); @@ -75,8 +75,8 @@ // Last test is 1024, which is the current maximum. HeapMonitor.enableSampling(); final int maximumDepth = 1024; - // Do the runner 10 times to ensure the stack is really sampled. - runner(10, maximumDepth); + // Do the runner 3 times to ensure the stack is really sampled. + runner(3, maximumDepth); // Because of the extra frames, we should be at (maximumDepth + a few frames). Due to the // maximum depth allowed, we hit it and so should still be at an average of 1024. double averageDepth = getAverageStackDepth(); @@ -85,7 +85,7 @@ // 3% error should be close enough. if (errorPercentage > 3) { - throw new RuntimeException("Stack depth average over 5% for depth 1024 : " + averageDepth + " , error: " + errorPercentage); + throw new RuntimeException("Stack depth average over 3% for depth 1024 : " + averageDepth + " , error: " + errorPercentage); } } }