< prev index next >

test/jdk/jdk/jfr/event/gc/collection/TestG1ParallelPhases.java

Print this page
rev 56876 : imported patch 8233792-testg1parallelgcevents-2

@@ -174,10 +174,13 @@
     * @param g1HeapRegionSize The size of your regions in bytes
     */
     public static void provokeMixedGC(int g1HeapRegionSize) {
         final var arraySize = 20_000;
         var liveOldObjects = new ArrayList<byte[]>();
+
+        // Make sure the heap is in a known state.
+        getWhiteBox().fullGC();
         allocateOldObjects(liveOldObjects, g1HeapRegionSize, arraySize);
         waitTillCMCFinished(10);
         getWhiteBox().g1StartConcMarkCycle();
         waitTillCMCFinished(10);
         getWhiteBox().youngGC();
< prev index next >