104 values[0] = getFlagValue(" NewSize", stdout); |
104 values[0] = getFlagValue(" NewSize", stdout); |
105 values[1] = getFlagValue(" OldSize", stdout); |
105 values[1] = getFlagValue(" OldSize", stdout); |
106 } |
106 } |
107 |
107 |
108 public static void checkGenMaxHeapErgo(String gcflag) throws Exception { |
108 public static void checkGenMaxHeapErgo(String gcflag) throws Exception { |
109 TestMaxHeapSizeTools.checkGenMaxHeapSize(gcflag, 3); |
|
110 TestMaxHeapSizeTools.checkGenMaxHeapSize(gcflag, 4); |
109 TestMaxHeapSizeTools.checkGenMaxHeapSize(gcflag, 4); |
111 TestMaxHeapSizeTools.checkGenMaxHeapSize(gcflag, 5); |
110 TestMaxHeapSizeTools.checkGenMaxHeapSize(gcflag, 5); |
112 } |
111 } |
113 |
112 |
114 private static void checkInvalidMinInitialHeapCombinations(String gcflag) throws Exception { |
113 private static void checkInvalidMinInitialHeapCombinations(String gcflag) throws Exception { |
130 expectError(new String[] { gcflag, "-XX:MaxHeapSize=4M", "-XX:InitialHeapSize=8M", "-version" }); |
129 expectError(new String[] { gcflag, "-XX:MaxHeapSize=4M", "-XX:InitialHeapSize=8M", "-version" }); |
131 expectError(new String[] { gcflag, "-XX:InitialHeapSize=8M", "-XX:MaxHeapSize=4M", "-version" }); |
130 expectError(new String[] { gcflag, "-XX:InitialHeapSize=8M", "-XX:MaxHeapSize=4M", "-version" }); |
132 } |
131 } |
133 |
132 |
134 private static void checkValidInitialMaxHeapCombinations(String gcflag) throws Exception { |
133 private static void checkValidInitialMaxHeapCombinations(String gcflag) throws Exception { |
135 expectValid(new String[] { gcflag, "-XX:MaxHeapSize=2048K", "-version" }); |
|
136 expectValid(new String[] { gcflag, "-XX:InitialHeapSize=4M", "-XX:MaxHeapSize=8M", "-version" }); |
134 expectValid(new String[] { gcflag, "-XX:InitialHeapSize=4M", "-XX:MaxHeapSize=8M", "-version" }); |
137 expectValid(new String[] { gcflag, "-XX:MaxHeapSize=8M", "-XX:InitialHeapSize=4M", "-version" }); |
135 expectValid(new String[] { gcflag, "-XX:MaxHeapSize=8M", "-XX:InitialHeapSize=4M", "-version" }); |
138 expectValid(new String[] { gcflag, "-XX:MaxHeapSize=4M", "-XX:InitialHeapSize=4M", "-version" }); |
136 expectValid(new String[] { gcflag, "-XX:MaxHeapSize=4M", "-XX:InitialHeapSize=4M", "-version" }); |
139 // a value of "0" for initial heap size means auto-detect |
137 // a value of "0" for initial heap size means auto-detect |
140 expectValid(new String[] { gcflag, "-XX:MaxHeapSize=4M", "-XX:InitialHeapSize=0M", "-version" }); |
138 expectValid(new String[] { gcflag, "-XX:MaxHeapSize=4M", "-XX:InitialHeapSize=0M", "-version" }); |