Skip to content

Commit

Permalink
[Backport] 8246689: Enable independent compressed oops/class ptrs on …
Browse files Browse the repository at this point in the history
…Aarch64

Summary: Make UseCompressedOops and UseCompressedClassPointers independent on Aarch64

Test Plan: CICD

Reviewed-by: kuaiwei, yulei

Issue: #677
  • Loading branch information
mmyxym committed Sep 21, 2023
1 parent afdaf7f commit ea25b10
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ const bool CCallingConventionRequiresIntsAsLongs = false;
#define NOT_R18_RESERVED(code) code
#endif

#define COMPRESSED_CLASS_POINTERS_DEPENDS_ON_COMPRESSED_OOPS true
#if INCLUDE_JVMCI
#define COMPRESSED_CLASS_POINTERS_DEPENDS_ON_COMPRESSED_OOPS (EnableJVMCI || UseAOT)
#else
#define COMPRESSED_CLASS_POINTERS_DEPENDS_ON_COMPRESSED_OOPS false
#endif

#endif // CPU_AARCH64_VM_GLOBALDEFINITIONS_AARCH64_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ public static void smallHeapTestWith1GNoCoop() throws Exception {
"-XX:+VerifyBeforeGC", "-version");
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.shouldContain("Narrow klass base: 0x0000000000000000");
output.shouldContain("Narrow klass shift: 0");
if (!Platform.isAArch64()) {
// Currently relax this test for Aarch64.
output.shouldContain("Narrow klass shift: 0");
}
output.shouldHaveExitValue(0);
}

Expand All @@ -188,7 +191,10 @@ public static void largeHeapTestNoCoop() throws Exception {
"-XX:+VerifyBeforeGC", "-version");
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.shouldContain("Narrow klass base: 0x0000000000000000");
output.shouldContain("Narrow klass shift: 0");
if (!Platform.isAArch64()) {
// Currently relax this test for Aarch64.
output.shouldContain("Narrow klass shift: 0");
}
output.shouldHaveExitValue(0);
}

Expand Down Expand Up @@ -272,7 +278,7 @@ public static void main(String[] args) throws Exception {
heapBaseMinAddressTest();
sharingTest();

boolean ccpRequiresCoop = Platform.isAArch64() || Platform.isSparc();
boolean ccpRequiresCoop = Platform.isSparc();

if (!ccpRequiresCoop && !Platform.isOSX()) {
// Testing compressed class pointers without compressed oops.
Expand Down

0 comments on commit ea25b10

Please sign in to comment.