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

JVMTI FollowReferences does not report roots reachable from nmethods

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • hotspot
    • b135

      Since 7 (with the introduction of ScavengeRootsInCode) non-perm java objects can be reachable from pointers embedded in nmethods.
      If an nmethod is on stack at the time of the VM_HeapWalkOperaion safepoint those references are not reported as GC roots and it may not be impossible to determine why an object is alive.

      It is also questionable that collect_simple_roots() iterates over the scavenge_roots_nmethods list since these nmethods are not strictly considered roots. They are treated as roots for young collections as an optimization only (similar to how dirty cards in the old generation are treated as roots to young even though their liveness is unknown).

            coleenp Coleen Phillimore
            mgerdin Mikael Gerdin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: