RFR 8173227: [JVMCI] HotSpotJVMCIMetaAccessContext.fromClass is inefficient

Tom Rodriguez tom.rodriguez at oracle.com
Tue Jan 24 08:50:17 UTC 2017


http://cr.openjdk.java.net/~never/8173227/webrev
https://bugs.openjdk.java.net/browse/JDK-8173227

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.  Tested with Graal.

tom


More information about the hotspot-compiler-dev mailing list