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

Obsolete the PrintSharedDictionary flag

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 20
    • hotspot
    • None
    • behavioral
    • minimal
    • The flag currently does nothing. It will now issue a warning if used in JDK 20
    • add/remove/modify command line option
    • Implementation

      Summary

      Bypass deprecation and obsolete unused flag PrintSharedDictionary.

      Problem

      Currently in the mainline, one doesn't need to specify -XX:+PrintSharedDictionary in order to display the class names in a CDS archive. Its functionality already exists within PrintSharedArchiveAndExit and the flag itself does nothing.

      Solution

      Obsolete PrintSharedDictionary in JDK 20 and remove it in 21.

      Specification

      Remove the flag definition from src/hotspot/share/runtime/cds_globals.hpp:

      -    product(bool, PrintSharedDictionary, false,                           \
      -        "If PrintSharedArchiveAndExit is true, also print the shared "    \
      -        "dictionary")                                                     \

      Add the flag to the obsoletion section of the special flag table:

      +  { "PrintSharedDictionary",          JDK_Version::undefined(), JDK_Version::jdk(20), JDK_Version::jdk(21) },

      Remove use of the PrintSharedDictionary flag from any remaining tests.

            matsaave Matias Saavedra Silva
            ccheung Calvin Cheung
            Coleen Phillimore, David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: