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

Print detailed info for Java objects in -Xlog:cds+map

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 22
    • 21
    • hotspot
    • b08

    Description

      Today, we can see the raw bytes of every archived Java object. For example, you can see the bytes for a java.util.concurrent.ConcurrentHashMap like this (you need to adjust the parameters to the "head" command, or just open cds.map in an editor)

      $ java -Xshare:dump -Xlog:cds+map=trace:file=cds.map:none:filesize=0

      $ grep -n '@@ Object java.util.concurrent.ConcurrentHashMap$' cds.map | head -1
      631494:0x00000007bfce62b0: @@ Object java.util.concurrent.ConcurrentHashMap

      $ grep -n . cds.map | head -636620 | tail -4
      636617:0x00000007bfcfb9d8: @@ Object java.util.concurrent.ConcurrentHashMap
      636618:0x00000007bfcfb9d8: bbcb1801 0000005a 000652c0 00000000 00000000 00000600 000002fa 00000000
      636619:0x00000007bfcfb9f8: 00000000 00000000 f7f9f743 00000000 00000000 00000000 00000000 00000000
      636620:0x00000007bfcfba18: @@ Object [Ljava.util.concurrent.ConcurrentHashMap$Node;

      Since compressed oops are used, it's hard to see the oop fields in the java.util.concurrent.ConcurrentHashMap. It would be better to print out a more detailed view of the object (e.g., something like oopDesc::print()).

      Attachments

        Issue Links

          Activity

            People

              iklam Ioi Lam
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: