< prev index next >

test/hotspot/jtreg/gc/g1/ihop/TestIHOPErgo.java

Print this page
rev 52192 : imported patch jelastic-pgc


  64         "-XX:G1HeapWastePercent=0",
  65         "-XX:MaxGCPauseMillis=30000",
  66         "-XX:G1MixedGCCountTarget=1",
  67         "-XX:+UseG1GC",
  68         "-XX:G1HeapRegionSize=1m",
  69         "-XX:+G1UseAdaptiveIHOP",
  70         "-Xlog:gc+ihop=debug,gc+ihop+ergo=debug,gc+ergo=debug",
  71         "-XX:+AlwaysTenure",
  72         "-XX:G1AdaptiveIHOPNumInitialSamples=1",
  73         "-XX:InitiatingHeapOccupancyPercent=30"
  74     };
  75 
  76     public static void main(String[] args) throws Throwable {
  77 
  78         // heap size MB, sleep time for allocator, true/false for adaptive/static
  79         runTest(64, 0, false);
  80         runTest(64, 100, false);
  81         runTest(128, 100, false);
  82         runTest(256, 50, false);
  83         runTest(512, 30, false);
  84         runTest(64, 50, true);
  85         runTest(128, 200, true);
  86         runTest(256, 100, true);
  87         runTest(512, 50, true);
  88     }
  89 
  90     /**
  91      * Runs AppIHOP in separate VM and checks GC log.
  92      *
  93      * @param heapSize       heap size
  94      * @param sleepTime      sleep time between memory allocations.
  95      * @param isIhopAdaptive true forAdaptive IHOP, false for Static
  96      *
  97      * @throws Throwable
  98      */
  99     private static void runTest(int heapSize, int sleepTime, boolean isIhopAdaptive) throws Throwable {
 100         System.out.println("IHOP test:");
 101         System.out.println("  MaxHeapSize : " + heapSize);
 102 
 103         List<String> options = new ArrayList<>();
 104         Collections.addAll(options,




  64         "-XX:G1HeapWastePercent=0",
  65         "-XX:MaxGCPauseMillis=30000",
  66         "-XX:G1MixedGCCountTarget=1",
  67         "-XX:+UseG1GC",
  68         "-XX:G1HeapRegionSize=1m",
  69         "-XX:+G1UseAdaptiveIHOP",
  70         "-Xlog:gc+ihop=debug,gc+ihop+ergo=debug,gc+ergo=debug",
  71         "-XX:+AlwaysTenure",
  72         "-XX:G1AdaptiveIHOPNumInitialSamples=1",
  73         "-XX:InitiatingHeapOccupancyPercent=30"
  74     };
  75 
  76     public static void main(String[] args) throws Throwable {
  77 
  78         // heap size MB, sleep time for allocator, true/false for adaptive/static
  79         runTest(64, 0, false);
  80         runTest(64, 100, false);
  81         runTest(128, 100, false);
  82         runTest(256, 50, false);
  83         runTest(512, 30, false);
  84         runTest(64, 100, true);
  85         runTest(128, 200, true);
  86         runTest(256, 100, true);
  87         runTest(512, 50, true);
  88     }
  89 
  90     /**
  91      * Runs AppIHOP in separate VM and checks GC log.
  92      *
  93      * @param heapSize       heap size
  94      * @param sleepTime      sleep time between memory allocations.
  95      * @param isIhopAdaptive true forAdaptive IHOP, false for Static
  96      *
  97      * @throws Throwable
  98      */
  99     private static void runTest(int heapSize, int sleepTime, boolean isIhopAdaptive) throws Throwable {
 100         System.out.println("IHOP test:");
 101         System.out.println("  MaxHeapSize : " + heapSize);
 102 
 103         List<String> options = new ArrayList<>();
 104         Collections.addAll(options,


< prev index next >