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

[aarch64] Add a fallback mode for class space reservation

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • hotspot
    • aarch64

      This issue correlates with the planned deprecation of "-UseCompressedClassPointers".

      When address space for CDS and class space are reserved, we attempt to allocate that region at a preferred address (the exact shape of which depends heavily on the specific architecture). That may very rarely fail, in which case we let the system allocate the region anywhere and set up narrow Klass decoding to cope with that.

      The only platform where this fallback has never been implemented is aarch64 (more precisely, we let the system allocate anywhere, but it may turn out that the returned address is unusable).

      Under normal circumstances, this is not a problem, but it can become a problem when running on hypothetical systems where we cannot reserve memory anywhere. I have not seen such a system, but a Github search for "-UseCompressedClassPointers" (so, users switching OFF narrow Klass pointers) yielded a suspiciously large number of cases where this was done for arm64 (e.g. FreeBSD does it).

      My suspicion is that this relates to the inability of the JVM to live with a class space anywhere, but requiring specifically aligned addresses.

      Therefore, it would be good to have a fallback mode where the compressed class encoding base is read from memory instead of being materialized with immediate moves.

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

              Created:
              Updated: