@@ -71,42 +71,42 @@ public static void checkMinInitialErgonomics(String gcflag) throws Exception {
71
71
long maxHeapSize = largeValue + (2 * 1024 * 1024 );
72
72
73
73
// -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 );
81
81
// 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 );
85
85
86
86
// -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 );
97
97
98
98
// -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 );
105
105
106
106
// -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 );
110
110
}
111
111
112
112
private static long align_up (long value , long alignment ) {
@@ -244,7 +244,7 @@ private static void getMinInitialMaxHeap(String[] args, MinInitialMaxValues val)
244
244
* Verify whether the VM automatically synchronizes minimum and initial heap size if only
245
245
* one is given for the GC specified.
246
246
*/
247
- public static void checkErgonomics (String [] args , long [] newoldsize ,
247
+ public static void checkErgonomics (String [] args ,
248
248
long expectedMin , long expectedInitial ) throws Exception {
249
249
250
250
MinInitialMaxValues v = new MinInitialMaxValues ();
0 commit comments