< prev index next >
test/runtime/CompressedOops/UseCompressedOops.java
Print this page
rev 7462 : 8064457: Introduce compressed oops mode disjoint base and improve compressed heap handling.
@@ -61,27 +61,39 @@
testCompressedOops("-XX:+UseCompressedOops", "-Xmx5g")
.shouldContain("Zero based")
.shouldContain("Oop shift amount: 3")
.shouldHaveExitValue(0);
+ // Larger than 3gb heap and HeapBaseMinAddress=1g should result in zero based with shift 3
+ testCompressedOops("-XX:+UseCompressedOops", "-Xmx3200m", "-XX:HeapBaseMinAddress=1g")
+ .shouldContain("Zero based")
+ .shouldContain("Oop shift amount: 3")
+ .shouldHaveExitValue(0);
+
// Small heap above 4gb should result in zero based with shift 3
testCompressedOops("-XX:+UseCompressedOops", "-Xmx32m", "-XX:HeapBaseMinAddress=4g")
.shouldContain("Zero based")
.shouldContain("Oop shift amount: 3")
.shouldHaveExitValue(0);
// Small heap above 32gb should result in non-zero based with shift 3
testCompressedOops("-XX:+UseCompressedOops", "-Xmx32m", "-XX:HeapBaseMinAddress=32g")
+ .shouldContain("Non-zero disjoint base")
+ .shouldContain("Oop shift amount: 3")
+ .shouldHaveExitValue(0);
+
+ // Small heap above 32gb should result in non-zero based with shift 3
+ testCompressedOops("-XX:+UseCompressedOops", "-Xmx32m", "-XX:HeapBaseMinAddress=72704m")
.shouldContain("Non-zero based")
.shouldContain("Oop shift amount: 3")
.shouldHaveExitValue(0);
// 32gb heap with heap base above 64gb and object alignment set to 16 bytes should result
// in non-zero based with shift 4
testCompressedOops("-XX:+UseCompressedOops", "-Xmx32g", "-XX:ObjectAlignmentInBytes=16",
"-XX:HeapBaseMinAddress=64g")
- .shouldContain("Non-zero based")
+ .shouldContain("Non-zero disjoint base")
.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")
< prev index next >