@@ -71,42 +71,42 @@ public static void checkMinInitialErgonomics(String gcflag) throws Exception {
7171 long maxHeapSize = largeValue + (2 * 1024 * 1024 );
7272
7373 // -Xms is not set
74- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize }, values , -1 , -1 );
75- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-XX:MinHeapSize=" + smallValue }, values , smallValue , -1 );
76- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-XX:MinHeapSize=" + largeValue }, values , largeValue , -1 );
77- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-XX:MinHeapSize=0" }, values , -1 , -1 );
78- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-XX:InitialHeapSize=" + smallValue }, values , -1 , smallValue );
79- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-XX:InitialHeapSize=" + largeValue }, values , -1 , largeValue );
80- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-XX:InitialHeapSize=0" }, values , -1 , -1 );
74+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize }, -1 , -1 );
75+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-XX:MinHeapSize=" + smallValue }, smallValue , -1 );
76+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-XX:MinHeapSize=" + largeValue }, largeValue , -1 );
77+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-XX:MinHeapSize=0" }, -1 , -1 );
78+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-XX:InitialHeapSize=" + smallValue }, -1 , smallValue );
79+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-XX:InitialHeapSize=" + largeValue }, -1 , largeValue );
80+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-XX:InitialHeapSize=0" }, -1 , -1 );
8181 // Some extra checks when both are set.
82- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-XX:MinHeapSize=" + smallValue , "-XX:InitialHeapSize=" + smallValue }, values , smallValue , smallValue );
83- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-XX:MinHeapSize=" + smallValue , "-XX:InitialHeapSize=" + largeValue }, values , smallValue , largeValue );
84- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-XX:MinHeapSize=" + largeValue , "-XX:InitialHeapSize=" + largeValue }, values , largeValue , largeValue );
82+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-XX:MinHeapSize=" + smallValue , "-XX:InitialHeapSize=" + smallValue }, smallValue , smallValue );
83+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-XX:MinHeapSize=" + smallValue , "-XX:InitialHeapSize=" + largeValue }, smallValue , largeValue );
84+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-XX:MinHeapSize=" + largeValue , "-XX:InitialHeapSize=" + largeValue }, largeValue , largeValue );
8585
8686 // -Xms is set to zero
87- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" }, values , -1 , -1 );
88- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" , "-XX:MinHeapSize=" + smallValue }, values , smallValue , -1 );
89- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" , "-XX:MinHeapSize=" + largeValue }, values , largeValue , -1 );
90- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" , "-XX:MinHeapSize=0" }, values , -1 , -1 );
91- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" , "-XX:InitialHeapSize=" + smallValue }, values , -1 , smallValue );
92- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" , "-XX:InitialHeapSize=" + largeValue }, values , -1 , largeValue );
93- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" , "-XX:InitialHeapSize=0" }, values , -1 , -1 );
94- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" , "-XX:MinHeapSize=" + smallValue , "-XX:InitialHeapSize=" + smallValue }, values , smallValue , smallValue );
95- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" , "-XX:MinHeapSize=" + smallValue , "-XX:InitialHeapSize=" + largeValue }, values , smallValue , largeValue );
96- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" , "-XX:MinHeapSize=" + largeValue , "-XX:InitialHeapSize=" + largeValue }, values , largeValue , largeValue );
87+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" }, -1 , -1 );
88+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" , "-XX:MinHeapSize=" + smallValue }, smallValue , -1 );
89+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" , "-XX:MinHeapSize=" + largeValue }, largeValue , -1 );
90+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" , "-XX:MinHeapSize=0" }, -1 , -1 );
91+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" , "-XX:InitialHeapSize=" + smallValue }, -1 , smallValue );
92+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" , "-XX:InitialHeapSize=" + largeValue }, -1 , largeValue );
93+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" , "-XX:InitialHeapSize=0" }, -1 , -1 );
94+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" , "-XX:MinHeapSize=" + smallValue , "-XX:InitialHeapSize=" + smallValue }, smallValue , smallValue );
95+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" , "-XX:MinHeapSize=" + smallValue , "-XX:InitialHeapSize=" + largeValue }, smallValue , largeValue );
96+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms0" , "-XX:MinHeapSize=" + largeValue , "-XX:InitialHeapSize=" + largeValue }, largeValue , largeValue );
9797
9898 // -Xms is set to small value
99- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms" + smallValue }, values , -1 , -1 );
100- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms" + smallValue , "-XX:MinHeapSize=" + smallValue }, values , smallValue , smallValue );
101- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms" + smallValue , "-XX:MinHeapSize=0" }, values , -1 , smallValue );
102- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms" + smallValue , "-XX:InitialHeapSize=" + smallValue }, values , smallValue , smallValue );
103- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms" + smallValue , "-XX:InitialHeapSize=" + largeValue }, values , smallValue , largeValue );
104- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms" + smallValue , "-XX:InitialHeapSize=0" }, values , smallValue , -1 );
99+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms" + smallValue }, -1 , -1 );
100+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms" + smallValue , "-XX:MinHeapSize=" + smallValue }, smallValue , smallValue );
101+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms" + smallValue , "-XX:MinHeapSize=0" }, -1 , smallValue );
102+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms" + smallValue , "-XX:InitialHeapSize=" + smallValue }, smallValue , smallValue );
103+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms" + smallValue , "-XX:InitialHeapSize=" + largeValue }, smallValue , largeValue );
104+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms" + smallValue , "-XX:InitialHeapSize=0" }, smallValue , -1 );
105105
106106 // -Xms is set to large value
107- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms" + largeValue }, values , largeValue , largeValue );
108- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms" + largeValue , "-XX:InitialHeapSize=0" }, values , largeValue , -1 );
109- checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms" + largeValue , "-XX:MinHeapSize=0" }, values , -1 , largeValue );
107+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms" + largeValue }, largeValue , largeValue );
108+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms" + largeValue , "-XX:InitialHeapSize=0" }, largeValue , -1 );
109+ checkErgonomics (new String [] { gcflag , "-Xmx" + maxHeapSize , "-Xms" + largeValue , "-XX:MinHeapSize=0" }, -1 , largeValue );
110110 }
111111
112112 private static long align_up (long value , long alignment ) {
@@ -244,7 +244,7 @@ private static void getMinInitialMaxHeap(String[] args, MinInitialMaxValues val)
244244 * Verify whether the VM automatically synchronizes minimum and initial heap size if only
245245 * one is given for the GC specified.
246246 */
247- public static void checkErgonomics (String [] args , long [] newoldsize ,
247+ public static void checkErgonomics (String [] args ,
248248 long expectedMin , long expectedInitial ) throws Exception {
249249
250250 MinInitialMaxValues v = new MinInitialMaxValues ();
0 commit comments