Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8318485

Narrow klass shift should be zero if encoding range extends to 0x1_0000_0000

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 22
    • 17, 21, 22
    • hotspot
    • b21

    Description

      If we map such that the class space ends at 0x1_0000_0000, we will use shift=3. We should use shift=0.

      Repro:

      ```
      thomas@starfish $ ./images/jdk/bin/java -XX:+UnlockDiagnosticVMOptions -XX:CompressedClassSpaceBaseAddress=0xc0000000 -XX:CompressedClassSpaceSize=1g -Xlog:metaspace* -Xshare:off
      [0.017s][info][metaspace] Successfully forced class space address to 0x00000000c0000000
      [0.017s][info][gc,metaspace] CDS archive(s) not mapped
      [0.017s][info][gc,metaspace] Compressed class space mapped at: 0x00000000c0000000-0x0000000100000000, reserved size: 1073741824
      [0.017s][info][gc,metaspace] Narrow klass base: 0x0000000000000000, Narrow klass shift: 3, Narrow klass range: 0x100000000
                                                                                                                                                      ^^^
      ```

      Attachments

        Issue Links

          Activity

            People

              stuefe Thomas Stuefe
              stuefe Thomas Stuefe
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: