Mercurial > hg > graal-compiler
diff test/runtime/CompressedOops/CompressedClassPointers.java @ 14474:de7f1b016d55
7014526: "java -version" crash on sparc with some values of HeapBaseMinAddress
Summary: Make default HeapBaseMinAddress the minimum that can be specified.
Reviewed-by: minqi, kvn, tschatzl, dholmes
author | coleenp |
---|---|
date | Wed, 19 Feb 2014 02:58:13 +0000 |
parents | 209aa13ab8c0 |
children | 4adcdd3ccb66 4ca6dc0799b6 |
line wrap: on
line diff
--- a/test/runtime/CompressedOops/CompressedClassPointers.java Tue Feb 18 09:54:24 2014 -0500 +++ b/test/runtime/CompressedOops/CompressedClassPointers.java Wed Feb 19 02:58:13 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -80,6 +80,18 @@ output.shouldHaveExitValue(0); } + public static void heapBaseMinAddressTest() throws Exception { + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( + "-XX:HeapBaseMinAddress=1m", + "-XX:+PrintMiscellaneous", + "-XX:+Verbose", + "-version"); + OutputAnalyzer output = new OutputAnalyzer(pb.start()); + output.shouldContain("HeapBaseMinAddress must be at least"); + output.shouldContain("HotSpot"); + output.shouldHaveExitValue(0); + } + public static void sharingTest() throws Exception { // Test small heaps ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( @@ -113,24 +125,25 @@ } } - public static void main(String[] args) throws Exception { - if (!Platform.is64bit()) { - // Can't test this on 32 bit, just pass - System.out.println("Skipping test on 32bit"); - return; - } - // Solaris 10 can't mmap compressed oops space without a base - if (Platform.isSolaris()) { - String name = System.getProperty("os.version"); - if (name.equals("5.10")) { - System.out.println("Skipping test on Solaris 10"); - return; - } - } - smallHeapTest(); - smallHeapTestWith3G(); - largeHeapTest(); - largePagesTest(); - sharingTest(); - } + public static void main(String[] args) throws Exception { + if (!Platform.is64bit()) { + // Can't test this on 32 bit, just pass + System.out.println("Skipping test on 32bit"); + return; + } + // Solaris 10 can't mmap compressed oops space without a base + if (Platform.isSolaris()) { + String name = System.getProperty("os.version"); + if (name.equals("5.10")) { + System.out.println("Skipping test on Solaris 10"); + return; + } + } + smallHeapTest(); + smallHeapTestWith3G(); + largeHeapTest(); + largePagesTest(); + heapBaseMinAddressTest(); + sharingTest(); + } }