Merge
authorcoleenp
Thu, 30 Jun 2016 00:19:48 +0000
changeset 39620 aa37f6f84ef5
parent 39619 905b6eee37b3 (current diff)
parent 39618 ced8c3f59678 (diff)
child 39621 b475d96f8008
Merge
--- a/hotspot/test/gc/g1/humongousObjects/objectGraphTest/GC.java	Wed Jun 29 20:16:05 2016 -0400
+++ b/hotspot/test/gc/g1/humongousObjects/objectGraphTest/GC.java	Thu Jun 30 00:19:48 2016 +0000
@@ -138,6 +138,41 @@
         }
     },
 
+    MIXED_GC {
+        @Override
+        public Runnable get() {
+            return () -> {
+                WHITE_BOX.youngGC();
+                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
+                WHITE_BOX.youngGC();
+                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
+
+                WHITE_BOX.g1StartConcMarkCycle();
+                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
+
+                WHITE_BOX.youngGC();
+                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
+                // Provoking Mixed GC
+                WHITE_BOX.youngGC();// second evacuation pause will be mixed
+                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
+            };
+        }
+
+        public Consumer<ReferenceInfo<Object[]>> getChecker() {
+            return getCheckerImpl(true, false, true, false);
+        }
+
+        @Override
+        public List<String> shouldContain() {
+            return Arrays.asList(GCTokens.WB_INITIATED_CMC);
+        }
+
+        @Override
+        public List<String> shouldNotContain() {
+            return Arrays.asList(GCTokens.YOUNG_GC);
+        }
+    },
+
     FULL_GC_MEMORY_PRESSURE {
         @Override
         public Runnable get() {
--- a/hotspot/test/gc/g1/humongousObjects/objectGraphTest/README	Wed Jun 29 20:16:05 2016 -0400
+++ b/hotspot/test/gc/g1/humongousObjects/objectGraphTest/README	Thu Jun 30 00:19:48 2016 +0000
@@ -38,6 +38,9 @@
                         non-humongous and humongous objects are not collected since we make 2 Young GC to promote all
                         weak references to Old Gen.
 
+6. Mixed GC - weakly referenced non-humongous and humongous objects are collected, softly referenced non-humongous and
+              humongous objects are not collected.
+
 The test gets gc type as a command line argument.
 Then the test allocates object graph in heap (currently testing scenarios are pre-generated and stored in
 TestcaseData.getPregeneratedTestcases()) with TestObjectGraphAfterGC::allocateObjectGraph.
--- a/hotspot/test/gc/g1/humongousObjects/objectGraphTest/TestObjectGraphAfterGC.java	Wed Jun 29 20:16:05 2016 -0400
+++ b/hotspot/test/gc/g1/humongousObjects/objectGraphTest/TestObjectGraphAfterGC.java	Thu Jun 30 00:19:48 2016 +0000
@@ -66,6 +66,12 @@
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  *
  * @run main/othervm -Xms200M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
+ * -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=30000 -XX:G1MixedGCLiveThresholdPercent=100 -XX:G1HeapWastePercent=0
+ * -XX:G1HeapRegionSize=1M -Xlog:gc=info:file=TestObjectGraphAfterGC_MIXED_GC.gc.log -XX:MaxTenuringThreshold=1
+ * -XX:G1MixedGCCountTarget=1  -XX:G1OldCSetRegionThresholdPercent=100 -XX:SurvivorRatio=1 -XX:InitiatingHeapOccupancyPercent=0
+ * gc.g1.humongousObjects.objectGraphTest.TestObjectGraphAfterGC MIXED_GC
+ *
+ * @run main/othervm -Xms200M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
  * -XX:G1HeapRegionSize=1M -Xlog:gc*=debug:file=TestObjectGraphAfterGC_YOUNG_GC.gc.log
  * gc.g1.humongousObjects.objectGraphTest.TestObjectGraphAfterGC YOUNG_GC
  *