Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8267935 Replace BasicHashtable and Hashtable
  3. JDK-8291969

Convert LoaderConstraintsTable to ResourceHashtable

    XMLWordPrintable

Details

    • Sub-task
    • Resolution: Fixed
    • P4
    • 20
    • 20
    • hotspot
    • None
    • b12

    Description

      The loader constraints table is another old hashtable implementation that would benefit from from the simplicity of being a ResourceHashtable. It has no lock-free reads, and takes out the SystemDictionary_lock for all accesses.

      The LoaderConstraint table has lookups that hash on the Symbol name, but then read through the LoaderConstraintEntries found to see if the class loader is part of the entries list. So there are more than one entry per Symbol which is essentially the key.
      The literal that the old hashtable held was the InstanceKlass that can be null sometimes, which is also confusing.

      The LoaderConstraintEntry should be reworked so that its key is still the class name, but it contains a growable array of constraints on that name. Once the name is found in the hashtable, the constraints are searched for the matching constraints. Restructuring it like:

          LoaderConstraint { InstanceKlass* klass; GrowableArray<ClassLoaderData*> _loaders; }
          LoaderConstraintEntry { GrowableArray<LoaderConstraint*> _constraints; }

      Makes this table easy to maintain, and removes most of the double pointers for adding to and combining loader constraints.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: