JDK-8320382 : Remove CompressedKlassPointers::is_valid_base()
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 22
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-11-20
  • Updated: 2023-11-27
  • Resolved: 2023-11-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22 masterFixed
Related Reports
Relates :  
Description
`CompressedKlassPointers::is_valid_base(addr)` exists to abstract away any platform-specific requirements that may limit the use of an address as narrow Klass encoding base.

The function only ever mattered on aarch64, where we cannot use any arbitrary address as 64-bit immediate for the base.

It turns out that explaining the point of this function is difficult since it tries to express a very CPU-specific condition in generic terms. This is one of the cases where a generic wrapper is not helpful; we therefore decided to scrap that function. 

It is only used for two things:
- asserts at runtime; those are unnecessary since we have an assert in macroAssembler_aarch64.cpp that will fire if the base is not correct
- the only legitimate use case is checking the user input for -XX:SharedBaseAddress at dump time. We can just express the aarch64 requirement directly, which is clearer to understand.

(this is a preparatory patch for JDK-8320368)

Comments
Changeset: 98edb03a Author: Thomas Stuefe <stuefe@openjdk.org> Date: 2023-11-22 09:20:19 +0000 URL: https://git.openjdk.org/jdk/commit/98edb03abe1692dcf5c6c463011b895d6e59b8cb
22-11-2023

[RT triage] moving the task to an enhancement. See task description in guide: https://openjdk.org/guide/#types-of-issues
20-11-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/16727 Date: 2023-11-20 07:47:16 +0000
20-11-2023