From 4d8eb788f43cc4420e6c079a48e397ae7339c851 Mon Sep 17 00:00:00 2001 From: Christian Tornqvist Date: Wed, 17 Sep 2014 06:55:12 -0700 Subject: [PATCH 1/3] 8058369: [TESTBUG] runtime/CompressedOops/UseCompressedOops.java Exception java.lang.RuntimeException: 'Zero based' missing from stdout/stderr Solaris and OSX places the heap in unpredictable places, some of the test must be excluded on these platforms Reviewed-by: hseigel, coleenp --- .../CompressedOops/UseCompressedOops.java | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/hotspot/test/runtime/CompressedOops/UseCompressedOops.java b/hotspot/test/runtime/CompressedOops/UseCompressedOops.java index 3d31fe6d9d0..6f3e21c0e73 100644 --- a/hotspot/test/runtime/CompressedOops/UseCompressedOops.java +++ b/hotspot/test/runtime/CompressedOops/UseCompressedOops.java @@ -52,18 +52,17 @@ public class UseCompressedOops { .shouldContain("Compressed Oops mode") .shouldHaveExitValue(0); - // Larger than 4gb heap should result in zero based with shift 3 - testCompressedOops("-XX:+UseCompressedOops", "-Xmx5g") - .shouldContain("Zero based") - .shouldContain("Oop shift amount: 3") - .shouldHaveExitValue(0); - - // Skip the following three test cases if we're on OSX or Solaris Sparc. + // Skip the following three test cases if we're on OSX or Solaris. // - // OSX doesn't seem to care about HeapBaseMinAddress and Solaris Sparc + // OSX doesn't seem to care about HeapBaseMinAddress and Solaris // puts the heap way up, forcing different behaviour. + if (!Platform.isOSX() && !Platform.isSolaris()) { + // Larger than 4gb heap should result in zero based with shift 3 + testCompressedOops("-XX:+UseCompressedOops", "-Xmx5g") + .shouldContain("Zero based") + .shouldContain("Oop shift amount: 3") + .shouldHaveExitValue(0); - if (!Platform.isOSX() && !(Platform.isSolaris() && Platform.isSparc())) { // Small heap above 4gb should result in zero based with shift 3 testCompressedOops("-XX:+UseCompressedOops", "-Xmx32m", "-XX:HeapBaseMinAddress=4g") .shouldContain("Zero based") @@ -83,6 +82,12 @@ public class UseCompressedOops { .shouldContain("Non-zero based") .shouldContain("Oop shift amount: 4") .shouldHaveExitValue(0); + + // 32gb heap with object alignment set to 16 bytes should result in zero based with shift 4 + testCompressedOops("-XX:+UseCompressedOops", "-Xmx32g", "-XX:ObjectAlignmentInBytes=16") + .shouldContain("Zero based") + .shouldContain("Oop shift amount: 4") + .shouldHaveExitValue(0); } // Explicitly enabling compressed oops with 32gb heap should result a warning @@ -106,12 +111,6 @@ public class UseCompressedOops { .shouldContain("Max heap size too large for Compressed Oops") .shouldHaveExitValue(0); - // 32gb heap with object alignment set to 16 bytes should result in zero based with shift 4 - testCompressedOops("-XX:+UseCompressedOops", "-Xmx32g", "-XX:ObjectAlignmentInBytes=16") - .shouldContain("Zero based") - .shouldContain("Oop shift amount: 4") - .shouldHaveExitValue(0); - } else { // Compressed oops should only apply to 64bit platforms testCompressedOops("-XX:+UseCompressedOops", "-Xmx32m") From 1bae14de5420c929b36ae04a09a644a2af561f4b Mon Sep 17 00:00:00 2001 From: Harold Seigel Date: Fri, 19 Sep 2014 08:19:04 -0400 Subject: [PATCH 2/3] 8057845: ClassVerifier::verify_exception_handler_targets reconstructs the ExceptionTable in a loop Construct the ExceptionTable only once, before the loop Reviewed-by: acorn, jiangli, coleenp, lfoltan --- hotspot/src/share/vm/classfile/verifier.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hotspot/src/share/vm/classfile/verifier.cpp b/hotspot/src/share/vm/classfile/verifier.cpp index 89d9d8b5323..36ec76d6e5d 100644 --- a/hotspot/src/share/vm/classfile/verifier.cpp +++ b/hotspot/src/share/vm/classfile/verifier.cpp @@ -1694,8 +1694,6 @@ void ClassVerifier::verify_exception_handler_table(u4 code_length, char* code_da constantPoolHandle cp (THREAD, _method->constants()); for(int i = 0; i < exlength; i++) { - //reacquire the table in case a GC happened - ExceptionTable exhandlers(_method()); u2 start_pc = exhandlers.start_pc(i); u2 end_pc = exhandlers.end_pc(i); u2 handler_pc = exhandlers.handler_pc(i); @@ -1803,8 +1801,6 @@ void ClassVerifier::verify_exception_handler_targets(u2 bci, bool this_uninit, S ExceptionTable exhandlers(_method()); int exlength = exhandlers.length(); for(int i = 0; i < exlength; i++) { - //reacquire the table in case a GC happened - ExceptionTable exhandlers(_method()); u2 start_pc = exhandlers.start_pc(i); u2 end_pc = exhandlers.end_pc(i); u2 handler_pc = exhandlers.handler_pc(i); From 38190eccc45bfcc9dc3d004334e7add8b3b2fffe Mon Sep 17 00:00:00 2001 From: Coleen Phillimore Date: Fri, 19 Sep 2014 21:13:25 -0400 Subject: [PATCH 3/3] 8058843: TEST.groups has runtime/runtime/7158988/FieldMonitor.java Remove a runtime Reviewed-by: ctornqvi, sspitsyn, kvn --- hotspot/test/TEST.groups | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot/test/TEST.groups b/hotspot/test/TEST.groups index c2a1d47b0b8..1b0b100c99f 100644 --- a/hotspot/test/TEST.groups +++ b/hotspot/test/TEST.groups @@ -343,7 +343,7 @@ hotspot_runtime = \ -runtime/SharedArchiveFile/CdsSameObjectAlignment.java \ -runtime/SharedArchiveFile/DefaultUseWithClient.java \ -runtime/Thread/CancellableThreadTest.java \ - -runtime/runtime/7158988/FieldMonitor.java + -runtime/7158988/FieldMonitor.java hotspot_runtime_closed = \ sanity/ExecuteInternalVMTests.java