XMLWordPrintable

Details

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

    Description

      The SystemDictionary is a collection of Dictionary hash tables: one per ClassLoaderData for a java/lang/ClassLoader object. The SystemDictionary has a find_instance_klass() function that needs to do lookups lock free - for each reference to a class name, there's a lookup and the lookup succeeds most of the time. Adding a lock for lookup has pretty significant performance degradation for at least one benchmark.

      Adding to the SystemDictionary takes out a SystemDictionary_lock, and each of these Dictionary hashtables are removed all at once when the ClassLoader is unloaded.

      Using the ConcurrentHashTable adds a few words of overhead per ClassLoaderData, but no more than Hashtable::_stats_rate (TableRateStatistics) in the old Hashtable implementation. TableRateStatistics is optional now in ConcurrentHashTable.

      Besides unlocked lookups, the advantage of using ConcurrrentHashTable is that the resizing can be done concurrently. Also, we may be able to eventually optimize out the SystemDictionary_lock locking, although this lock controls more than dictionary additions, so maybe not. TBD.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: