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

Deprecate -XX:-UseCompressedClassPointers for removal

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Withdrawn
    • Icon: P4 P4
    • 20
    • hotspot
    • None
    • behavioral
    • low
    • Hide
      Users may want to use excessive amount of classes, and compressed class pointers would not give them enough space. Compressed class pointers allow to address up to 32GB of class space. I am not aware that this limit has ever been a problem.

      Class pointer compression may incur a performance penalty because class pointers cannot be used directly, but need to be decoded. This seems like a purely theoretical problem, though: loading the value from memory, even from L1, would dominate the performance of load&decode by a large margin.
      Show
      Users may want to use excessive amount of classes, and compressed class pointers would not give them enough space. Compressed class pointers allow to address up to 32GB of class space. I am not aware that this limit has ever been a problem. Class pointer compression may incur a performance penalty because class pointers cannot be used directly, but need to be decoded. This seems like a purely theoretical problem, though: loading the value from memory, even from L1, would dominate the performance of load&decode by a large margin.
    • add/remove/modify command line option
    • Implementation

      Summary

      The option UseCompressedClassPointers is deprecated for removal, and behaviour will be to always compress class pointers on 64 bit platforms.

      Problem

      We want to be able to reduce the size of object headers to 64bits or smaller. In order to do that, we need to move the class pointer into the header. This is only possible with class pointer compression.

      Solution

      Deprecate (and eventually remove) the option UseCompressedClassPointers.

      Specification

      diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
      index 8ba66a4da7b..28aaa0e27db 100644
      --- a/src/hotspot/share/runtime/arguments.cpp
      +++ b/src/hotspot/share/runtime/arguments.cpp
      @@ -538,6 +538,7 @@ static SpecialFlag const special_jvm_flags[] = {
         { "DynamicDumpSharedSpaces",      JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() },
         { "RequireSharedSpaces",          JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() },
         { "UseSharedSpaces",              JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() },
      +  { "UseCompressedClassPointers",   JDK_Version::jdk(20), JDK_Version::jdk(21), JDK_Version::jdk(22) },
      
         // --- Deprecated alias flags (see also aliased_jvm_flags) - sorted by obsolete_in then expired_in:
         { "DefaultMaxRAMFraction",        JDK_Version::jdk(8),  JDK_Version::undefined(), JDK_Version::undefined() },

            rkennke Roman Kennke
            rkennke Roman Kennke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: