RFR: JDK-8318485: Narrow klass shift should be zero if encoding range extends to 0x1_0000_0000

Thomas Stuefe stuefe at openjdk.org
Fri Oct 20 05:47:49 UTC 2023


See JBS issue.

The real fix, trivial, is the comparison change in compressedKlass.cpp.

This patch then also adds a test that checks, for a given forced class space location the encoding scheme expected has been chosen by the VM. In this case, if class space nestles below and ends at 4G, we should use a shift of 0.

The test can be easily extended to test more narrow Klass encoding schemes. Note that the test is skipped if the VM could not map at the expected address to begin with.

Finally, to analyze test errors, I print out the mappings at the force address if metaspace logging is debug.

Tests: manual, GHA. x86 GHA errors unrelated.


Attention @iklam and @calvinccheung

-------------

Commit messages:
 - Update CompressedClassPointersEncodingScheme.java
 - JDK-8318485

Changes: https://git.openjdk.org/jdk/pull/16261/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16261&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8318485
  Stats: 108 lines in 4 files changed: 107 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/16261.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16261/head:pull/16261

PR: https://git.openjdk.org/jdk/pull/16261


More information about the hotspot-runtime-dev mailing list