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

Wrap holder object for ClassLoaderData in a WeakHandle

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b10

      Description

      Either a class_loader object or a mirror is the oop that determines whether a ClassLoaderData should be unloaded and reclaimed.

      Wrapping the holder in a type called WeakHandle encapsulates the Access barrier semantics for the holder of a class, so that when cleared, the runtime can unload this ClassLoaderData.

      This work is preliminary work to fix bug
      https://bugs.openjdk.java.net/browse/JDK-8197844
      JVMTI GetLoadedClasses should use the Access API

      This encapsulation will be used to set the proper Access barrier when the ClassLoaderData is iterated on concurrently, in places that call ClassLoaderDataGraph::classes_do() so that GC doesn't miss marking and relocating the mirror or other object found during ClassLoaderDataGraph iteration.

      This work is also preparation for gc-agnostic class unloading and in preparation for concurrent class unloading.

        Attachments

          Activity

            People

            • Assignee:
              coleenp Coleen Phillimore
              Reporter:
              coleenp Coleen Phillimore
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: