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

[JVMCI] HotSpotJVMCIMetaAccessContext.fromClass is inefficient

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • hotspot
    • b157

        HotSpotJVMCIMetaAccessContext.createClass is a synchronized wrapper around a WeakHashMap with WeakReference values. During bytecode parsing this can be a heavy contention point between between multiple threads. Additionally the use of WeakReferences for the keys and values is expensive. A ClassValue<WeakReference<ResolvedJavaType>> would avoid the contention around the synchronized method and would eliminate one of the two required WeakReferences.

              never Tom Rodriguez
              never Tom Rodriguez
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: