--- old/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorStatArrayCorrectnessTest.java 2018-03-28 08:20:28.189188311 -0700 +++ new/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorStatArrayCorrectnessTest.java 2018-03-28 08:20:27.873189468 -0700 @@ -51,6 +51,7 @@ for (int currentSize : sizes) { System.out.println("Testing size " + currentSize); + HeapMonitor.resetEventStorage(); if (!HeapMonitor.eventStorageIsEmpty()) { throw new RuntimeException("Should not have any events stored yet."); } @@ -79,8 +80,6 @@ if (!HeapMonitor.statsHaveExpectedNumberSamples((int) expected, 10)) { throw new RuntimeException("Statistics should show about " + expected + " samples."); } - - HeapMonitor.resetEventStorage(); } } }