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

Wrap holder object for ClassLoaderData in a WeakHandle

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 11
    • 11
    • hotspot
    • None
    • b10

      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.

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

              Created:
              Updated:
              Resolved: