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

[cds] No message is logged when shared image cannot be used due to mismatched configuration


    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 14
    • Fix Version/s: 14
    • Component/s: hotspot


      We can only load a cds image if UseG1GC, UseCompressedOops and UseCompressedClassPointers are all active. If not, it is supposed to print an info message to UL, see filemap.cpp lines 1484 ff:

        if (!HeapShared::is_heap_object_archiving_allowed()) {
          log_info(cds)("CDS heap data is being ignored. UseG1GC, "
                        "UseCompressedOops and UseCompressedClassPointers are required.");

      For some reason I do not see this message:

      thomas@mainframe$ ./images/jdk/bin/java -XX:+UseSharedSpaces -Xlog:cds=trace -XX:-UseCompressedOops
      Usage: java [options] <mainclass> [args...]
                 (to execute a class)

      However, I do see messages if CDS is active:

      thomas@mainframe$ ./images/jdk/bin/java -XX:+UseSharedSpaces -Xlog:cds -XX:+UseCompressedOops
      [0.006s][info][cds] Mapped region #0 at base 0x800000000 top 0x800003000
      [0.006s][info][cds] Mapped region #1 at base 0x800003000 top 0x8003e1000
      [0.006s][info][cds] Mapped region #2 at base 0x8003e1000 top 0x800b00000
      [0.006s][info][cds] Mapped region #3 at base 0x800b00000 top 0x800b01000
      [0.007s][info][cds] CDS archive was created with max heap size = 128M, and the following configuration:
      [0.007s][info][cds] narrow_klass_base = 0x0000000800000000, narrow_klass_shift = 3
      [0.007s][info][cds] narrow_oop_mode = 0, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 0

      So, in general, logging at that point works.


      seen on Ubuntu 16.4 x64.




            • Assignee:
              iklam Ioi Lam
              stuefe Thomas Stuefe
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: