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

Move InstanceKlass DependencyContext cleaning to SystemDictionary::do_unloading()

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 12
    • Fix Version/s: 12
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b14

      Description

      During SystemDictionary::purge(), we used to call ik->dependencies().remove_all_dependents() on dead instance klasses that were about to be deleted. But that was buggy as nmethod unloading happening before purge() could have removed nmethods that died. So instead a new member function, ik->dependencies().wipe() was called during purge to solve that problem (https://bugs.openjdk.java.net/browse/JDK-8143408).

      This code breaks the idea of removing external references to dead metadata before purge. Therefore, I think it would be more ideal to move the cleaning of the DependencyContexts from SystemDictionary::do_unloading() instead. That way, when implementing concurrent class unloading, we can focus the locking in do_unloading and just delete things in SystemDictionary::purge(), after a rendezvous handshake. This also sounds like a better solution to the earlier bug.

        Attachments

          Activity

            People

            • Assignee:
              coleenp Coleen Phillimore
              Reporter:
              eosterlund Erik Ă–sterlund
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: