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

jvmtiHeapObjectReferenceCallback needs referrer_class_tag

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 6
    • 6
    • hotspot
    • 6
    • b73
    • generic
    • generic

      Consider this as "early access feedback": The FollowReferences function in Mustang provides many improvements over the IterateOverReachableObjects. However the jvmtiHeapObjectReferenceCallback is missing the referrer_class_tag and this is needed when do doing summary/trend analysis. When doing this type of memory analysis it should not be necessary to tag all instances - just need to tag classes. However if only classses are tagged then the referrer information in the callback is useless as the referrer tag will be 0 and the referrer info (field index et. al). is meaningless without knowing the referer class. This appears to be an oversight in the development of FollowReferences.

      Please update jvmtiHeapObjectReference to include the referrer_class_tag parameter before the spec for Mustang freezes. With the change the callback will look like this:

      typedef jint (JNICALL *jvmtiHeapObjectReferenceCallback)
          (jvmtiHeapReferenceKind reference_kind,
           const jvmtiReferrerInfo* referrer_info,
           jlong class_tag,
           jlong referrer_class_tag,
           jlong size,
           jlong* tag_ptr,
           jlong* referrer_tag_ptr,
           jint length,
           void* user_data);

            rfield Robert Field (Inactive)
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: