9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8072909
27 * @summary Test TimSort stack size on big arrays
28 * @key intermittent
29 * @library /lib/testlibrary /test/lib
30 * @modules java.management
31 * java.base/jdk.internal
32 * @build jdk.testlibrary.*
33 * @build TimSortStackSize2
34 * @run driver ClassFileInstaller sun.hotspot.WhiteBox
35 * sun.hotspot.WhiteBox$WhiteBoxPermission
36 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
37 * -XX:+WhiteBoxAPI TimSortStackSize2
38 */
39 import java.util.ArrayList;
40 import java.util.Arrays;
41 import java.util.List;
42 import java.util.function.Consumer;
43
44 import jdk.testlibrary.OutputAnalyzer;
45 import jdk.testlibrary.ProcessTools;
46 import jdk.testlibrary.Utils;
47 import sun.hotspot.WhiteBox;
48
49 public class TimSortStackSize2 {
50
51 public static void main(String[] args) {
52 if ( args == null || args.length == 0 ){
53 startMeWithArgs();
54 } else {
55 doTestOfTwoTimSorts(Integer.parseInt(args[0]));
56 }
57 }
58
59 private static void startMeWithArgs(){
60 /*
61 * big tests not for regular execution on all platforms:
62 * run main/othervm -Xmx8g TimSortStackSize2 1073741824
63 * run main/othervm -Xmx16g TimSortStackSize2 2147483644
64 */
65 try {
66 Boolean compressedOops = WhiteBox.getWhiteBox()
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8072909
27 * @summary Test TimSort stack size on big arrays
28 * @key intermittent
29 * @library /test/lib
30 * @modules java.management
31 * java.base/jdk.internal
32 * @build TimSortStackSize2
33 * @run driver ClassFileInstaller sun.hotspot.WhiteBox
34 * sun.hotspot.WhiteBox$WhiteBoxPermission
35 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
36 * -XX:+WhiteBoxAPI TimSortStackSize2
37 */
38 import java.util.ArrayList;
39 import java.util.Arrays;
40 import java.util.List;
41 import java.util.function.Consumer;
42
43 import jdk.test.lib.process.OutputAnalyzer;
44 import jdk.test.lib.process.ProcessTools;
45 import sun.hotspot.WhiteBox;
46
47 public class TimSortStackSize2 {
48
49 public static void main(String[] args) {
50 if ( args == null || args.length == 0 ){
51 startMeWithArgs();
52 } else {
53 doTestOfTwoTimSorts(Integer.parseInt(args[0]));
54 }
55 }
56
57 private static void startMeWithArgs(){
58 /*
59 * big tests not for regular execution on all platforms:
60 * run main/othervm -Xmx8g TimSortStackSize2 1073741824
61 * run main/othervm -Xmx16g TimSortStackSize2 2147483644
62 */
63 try {
64 Boolean compressedOops = WhiteBox.getWhiteBox()
|