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

JVMTI FollowReferences doesn't traverse references to Object.class

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Not an Issue
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot

      Description

      According to jvmti spec, FollowReferences jvmtiHeapReferenceCallback should report
      - Classes report a reference to the superclass and directly implemented/extended interfaces.
      - Classes report a reference to the class loader, protection domain, signers, and resolved entries in the constant pool.

      Please, observe attached files (with scripts for Raspberry PI, Solaris and Linux). You can find logs above. Please note original class is tagged with 888 and Object.class is marked with 777.

      - Running java app with -Xcomp doesn't affect solaris's result (it misses Object.class reference anyway):
      (SOLARIS V9)
      Running without -Xcomp
      JVMTI_HEAP_REFERENCE_CLASS_LOADER: 888 -> 0
      C1@66048bfd
      ------
      Running with -Xcomp
      JVMTI_HEAP_REFERENCE_CLASS_LOADER: 888 -> 0
      C1@66048bfd

      - In the case of -Xcomp JVMTI on Linux/Raspberry PI misses Object.class references:

      (LINUX x64)
      Running without -Xcomp
      JVMTI_HEAP_REFERENCE_CLASS_LOADER: 888 -> 0
      JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN: 888 -> 0
      JVMTI_HEAP_REFERENCE_CONSTANT_POOL: 888 -> 777
      C1@2a18f23c
      ------

      Running with -Xcomp
      JVMTI_HEAP_REFERENCE_CLASS_LOADER: 888 -> 0
      JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN: 888 -> 0
      C1@2a18f23c

      (RASPBERRY PI)
      Running without -Xcomp
      JVMTI_HEAP_REFERENCE_CLASS_LOADER: 888 -> 0
      JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN: 888 -> 0
      JVMTI_HEAP_REFERENCE_CONSTANT_POOL: 888 -> 777
      C1@864e92
      ------

      Running with -Xcomp
      JVMTI_HEAP_REFERENCE_CLASS_LOADER: 888 -> 0
      JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN: 888 -> 0
      C1@864e92

      Was found on jdk9b147

        Attachments

        1. Main.c
          4 kB
        2. Main.h
          0.5 kB
        3. Main.java
          0.5 kB
        4. run-linux.sh
          0.4 kB
        5. run-raspberry.sh
          0.4 kB
        6. run-solaris.sh
          0.4 kB

          Issue Links

            Activity

              People

              • Assignee:
                zmajo Zoltan Majo (Inactive)
                Reporter:
                asolodkaya Anastasiya Solodkaya (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: