< prev index next >

test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorStackDepthTest.java

Print this page
rev 48552 : [mq]: heap10a
rev 48556 : [mq]: heap17
rev 48561 : [mq]: heap22
rev 48562 : [mq]: heap23

@@ -51,41 +51,41 @@
 
     for (int depthIdx = 0; depthIdx < depths.length; depthIdx++) {
       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.
       // To get the requested depth, remove this from the count.
       final int baseDepth = 4;
       double averageDepth = getAverageStackDepth() - baseDepth;
       double errorPercentage = calculateErrorPercentage(depth, averageDepth);
 
       // 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();
     }
 
 
     // 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();
     double errorPercentage = calculateErrorPercentage(maximumDepth, averageDepth);
     HeapMonitor.disableSampling();
 
     // 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);
     }
   }
 }
< prev index next >