< prev index next >

test/hotspot/jtreg/gc/g1/humongousObjects/objectGraphTest/TestObjectGraphAfterGC.java

Print this page
rev 51981 : [mq]: 6490394-uncommit-at-remark


  39 import java.util.HashSet;
  40 import java.util.Set;
  41 import java.util.function.BiConsumer;
  42 import java.util.function.Consumer;
  43 import java.util.function.Predicate;
  44 import java.util.stream.Collectors;
  45 
  46 
  47 /**
  48  * @test TestObjectGraphAfterGC
  49  * @summary Checks that objects' graph behave as expected after gc
  50  * @requires vm.gc.G1
  51  * @requires vm.opt.ExplicitGCInvokesConcurrent != true
  52  * @library /test/lib /
  53  * @modules java.management java.base/jdk.internal.misc
  54  * @build sun.hotspot.WhiteBox
  55  *
  56  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  57  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  58  *
  59  * @run main/othervm -Xms200M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
  60  * -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=30000 -XX:G1MixedGCLiveThresholdPercent=100 -XX:G1HeapWastePercent=0
  61  * -XX:G1HeapRegionSize=1M -Xlog:gc=info:file=TestObjectGraphAfterGC_MIXED_GC.gc.log -XX:MaxTenuringThreshold=1
  62  * -XX:G1MixedGCCountTarget=1  -XX:G1OldCSetRegionThresholdPercent=100 -XX:SurvivorRatio=1 -XX:InitiatingHeapOccupancyPercent=0
  63  * gc.g1.humongousObjects.objectGraphTest.TestObjectGraphAfterGC MIXED_GC
  64  *
  65  * @run main/othervm -Xms200M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
  66  * -XX:G1HeapRegionSize=1M -Xlog:gc*=debug:file=TestObjectGraphAfterGC_YOUNG_GC.gc.log
  67  * gc.g1.humongousObjects.objectGraphTest.TestObjectGraphAfterGC YOUNG_GC
  68  *
  69  * @run main/othervm -Xms200M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
  70  * -XX:G1HeapRegionSize=1M -Xlog:gc=info:file=TestObjectGraphAfterGC_FULL_GC.gc.log
  71  * gc.g1.humongousObjects.objectGraphTest.TestObjectGraphAfterGC FULL_GC
  72  *
  73  * @run main/othervm -Xms200M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
  74  * -XX:G1HeapRegionSize=1M -Xlog:gc=info:file=TestObjectGraphAfterGC_FULL_GC_MEMORY_PRESSURE.gc.log
  75  * gc.g1.humongousObjects.objectGraphTest.TestObjectGraphAfterGC FULL_GC_MEMORY_PRESSURE
  76  *
  77  * @run main/othervm -Xms200M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
  78  * -XX:G1HeapRegionSize=1M -Xlog:gc=info:file=TestObjectGraphAfterGC_CMC.gc.log -XX:MaxTenuringThreshold=16
  79  * gc.g1.humongousObjects.objectGraphTest.TestObjectGraphAfterGC CMC
  80  *
  81  * @run main/othervm -Xms200M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
  82  * -XX:G1HeapRegionSize=1M -Xlog:gc=info:file=TestObjectGraphAfterGC_CMC_NO_SURV_ROOTS.gc.log -XX:MaxTenuringThreshold=1
  83  * gc.g1.humongousObjects.objectGraphTest.TestObjectGraphAfterGC CMC_NO_SURV_ROOTS
  84  *
  85  */
  86 
  87 /**
  88  * Checks that objects' graph behave as expected after gc
  89  * See README file for detailed info on test's logic
  90  */
  91 public class TestObjectGraphAfterGC {
  92 
  93     private static final int simpleAllocationSize = 1024;
  94 
  95     /**
  96      * Entry point
  97      *
  98      * @param args - first argument - gc name
  99      */
 100     public static void main(String[] args) {
 101 




  39 import java.util.HashSet;
  40 import java.util.Set;
  41 import java.util.function.BiConsumer;
  42 import java.util.function.Consumer;
  43 import java.util.function.Predicate;
  44 import java.util.stream.Collectors;
  45 
  46 
  47 /**
  48  * @test TestObjectGraphAfterGC
  49  * @summary Checks that objects' graph behave as expected after gc
  50  * @requires vm.gc.G1
  51  * @requires vm.opt.ExplicitGCInvokesConcurrent != true
  52  * @library /test/lib /
  53  * @modules java.management java.base/jdk.internal.misc
  54  * @build sun.hotspot.WhiteBox
  55  *
  56  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  57  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  58  *
  59  * @run main/othervm -Xms200M -Xmx200M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
  60  * -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=30000 -XX:G1MixedGCLiveThresholdPercent=100 -XX:G1HeapWastePercent=0
  61  * -XX:G1HeapRegionSize=1M -Xlog:gc=info:file=TestObjectGraphAfterGC_MIXED_GC.gc.log -XX:MaxTenuringThreshold=1
  62  * -XX:G1MixedGCCountTarget=1  -XX:G1OldCSetRegionThresholdPercent=100 -XX:SurvivorRatio=1 -XX:InitiatingHeapOccupancyPercent=0
  63  * gc.g1.humongousObjects.objectGraphTest.TestObjectGraphAfterGC MIXED_GC
  64  *
  65  * @run main/othervm -Xms200M -Xmx200M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
  66  * -XX:G1HeapRegionSize=1M -Xlog:gc*=debug:file=TestObjectGraphAfterGC_YOUNG_GC.gc.log
  67  * gc.g1.humongousObjects.objectGraphTest.TestObjectGraphAfterGC YOUNG_GC
  68  *
  69  * @run main/othervm -Xms200M -Xmx200M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
  70  * -XX:G1HeapRegionSize=1M -Xlog:gc=info:file=TestObjectGraphAfterGC_FULL_GC.gc.log
  71  * gc.g1.humongousObjects.objectGraphTest.TestObjectGraphAfterGC FULL_GC
  72  *
  73  * @run main/othervm -Xms200M -Xmx200M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
  74  * -XX:G1HeapRegionSize=1M -Xlog:gc=info:file=TestObjectGraphAfterGC_FULL_GC_MEMORY_PRESSURE.gc.log
  75  * gc.g1.humongousObjects.objectGraphTest.TestObjectGraphAfterGC FULL_GC_MEMORY_PRESSURE
  76  *
  77  * @run main/othervm -Xms200M -Xmx200M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
  78  * -XX:G1HeapRegionSize=1M -Xlog:gc=info:file=TestObjectGraphAfterGC_CMC.gc.log -XX:MaxTenuringThreshold=16
  79  * gc.g1.humongousObjects.objectGraphTest.TestObjectGraphAfterGC CMC
  80  *
  81  * @run main/othervm -Xms200M -Xmx200M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
  82  * -XX:G1HeapRegionSize=1M -Xlog:gc=info:file=TestObjectGraphAfterGC_CMC_NO_SURV_ROOTS.gc.log -XX:MaxTenuringThreshold=1
  83  * gc.g1.humongousObjects.objectGraphTest.TestObjectGraphAfterGC CMC_NO_SURV_ROOTS
  84  *
  85  */
  86 
  87 /**
  88  * Checks that objects' graph behave as expected after gc
  89  * See README file for detailed info on test's logic
  90  */
  91 public class TestObjectGraphAfterGC {
  92 
  93     private static final int simpleAllocationSize = 1024;
  94 
  95     /**
  96      * Entry point
  97      *
  98      * @param args - first argument - gc name
  99      */
 100     public static void main(String[] args) {
 101 


< prev index next >