test/gc/arguments/TestMaxNewSize.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff test/gc/arguments

test/gc/arguments/TestMaxNewSize.java

Print this page




 100     }
 101     String match = m.group();
 102     return match.substring(match.lastIndexOf(" ") + 1, match.length());
 103   }
 104 
 105   public static void main(String args[]) throws Exception {
 106     String gcName = args[0];
 107     final int M32 = 32 * 1024 * 1024;
 108     final int M64 = 64 * 1024 * 1024;
 109     final int M96 = 96 * 1024 * 1024;
 110     final int M128 = 128 * 1024 * 1024;
 111     checkMaxNewSize(new String[] { gcName, "-Xmx128M" }, M128);
 112     checkMaxNewSize(new String[] { gcName, "-Xmx128M", "-XX:NewRatio=5" }, M128);
 113     checkMaxNewSize(new String[] { gcName, "-Xmx128M", "-XX:NewSize=32M" }, M128);
 114     checkMaxNewSize(new String[] { gcName, "-Xmx128M", "-XX:OldSize=96M" }, M128);
 115     checkMaxNewSize(new String[] { gcName, "-Xmx128M", "-XX:MaxNewSize=32M" }, M32);
 116     checkMaxNewSize(new String[] { gcName, "-Xmx128M", "-XX:NewSize=32M", "-XX:MaxNewSize=32M" }, M32);
 117     checkMaxNewSize(new String[] { gcName, "-Xmx128M", "-XX:NewRatio=6", "-XX:MaxNewSize=32M" }, M32);
 118     checkMaxNewSize(new String[] { gcName, "-Xmx128M", "-Xms96M" }, M128);
 119     checkMaxNewSize(new String[] { gcName, "-Xmx96M", "-Xms96M" }, M96);
 120     checkIncompatibleNewSize(new String[] {gcName, "-XX:NewSize=100M", "-XX:MaxNewSize=50M"});
 121     // User input should be checked before any alignment adjusts the values
 122     checkIncompatibleNewSize(new String[] {gcName, "-XX:NewSize=" + M32, "-XX:MaxNewSize=" + (M32 - 1)});
 123   }
 124 }


 100     }
 101     String match = m.group();
 102     return match.substring(match.lastIndexOf(" ") + 1, match.length());
 103   }
 104 
 105   public static void main(String args[]) throws Exception {
 106     String gcName = args[0];
 107     final int M32 = 32 * 1024 * 1024;
 108     final int M64 = 64 * 1024 * 1024;
 109     final int M96 = 96 * 1024 * 1024;
 110     final int M128 = 128 * 1024 * 1024;
 111     checkMaxNewSize(new String[] { gcName, "-Xmx128M" }, M128);
 112     checkMaxNewSize(new String[] { gcName, "-Xmx128M", "-XX:NewRatio=5" }, M128);
 113     checkMaxNewSize(new String[] { gcName, "-Xmx128M", "-XX:NewSize=32M" }, M128);
 114     checkMaxNewSize(new String[] { gcName, "-Xmx128M", "-XX:OldSize=96M" }, M128);
 115     checkMaxNewSize(new String[] { gcName, "-Xmx128M", "-XX:MaxNewSize=32M" }, M32);
 116     checkMaxNewSize(new String[] { gcName, "-Xmx128M", "-XX:NewSize=32M", "-XX:MaxNewSize=32M" }, M32);
 117     checkMaxNewSize(new String[] { gcName, "-Xmx128M", "-XX:NewRatio=6", "-XX:MaxNewSize=32M" }, M32);
 118     checkMaxNewSize(new String[] { gcName, "-Xmx128M", "-Xms96M" }, M128);
 119     checkMaxNewSize(new String[] { gcName, "-Xmx96M", "-Xms96M" }, M96);
 120     checkMaxNewSize(new String[] { gcName, "-XX:NewSize=128M", "-XX:MaxNewSize=50M"}, M128);


 121   }
 122 }
test/gc/arguments/TestMaxNewSize.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File