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

Clarify documentation of the HotSpot -XX:SharedArchiveConfigFile option

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 11
    • 10
    • docs

      There are 2 issues with the JDK 10 documentation that describes the -XX:SharedArchiveConfigFile=<config_file> option:

      https://docs.oracle.com/javase/10/tools/java.htm#JSWOR-GUID-31503FCE-93D0-4175-9B4F-F6A738B2F4C4

      1. In the paragraph:

      "Symbol data should be generated by the jcmd tool ....
      The following is an example of the symbol dumping command in jcmd:

      jcmd pid VM.symboltable -verbose"

      It should be clarified that the first line (process ID) and the second line ("@VERSION ...") of this jcmd output should be excluded from the <config_file>

      2. The sentence "The @SECTION: String section that adds the string literals specified in SharedArchiveConfigFile are ignored." is incorrect. The string literals are not ignored. See:

      http://hg.openjdk.java.net/jdk/jdk10/file/b09e56145e11/src/hotspot/share/classfile/sharedClassUtil.cpp#l203

      In fact, even if JDK 10 resolves all CONSTANT_String literals in all archived classes, in some cases it's still beneficial to add additional strings that are not string literals in class files, but are likely to be used by your application at run time.

            cwayne Clifford Wayne (Inactive)
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: