8202373: Forcing eager initialization of CHM$ReservationNode avoids deoptimization
Reviewed-by: martin, psandoz, dholmes, redestad
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java Tue May 01 07:40:41 2018 -0400
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java Tue May 01 06:18:48 2018 -0700
@@ -6389,5 +6389,8 @@
// Reduce the risk of rare disastrous classloading in first call to
// LockSupport.park: https://bugs.openjdk.java.net/browse/JDK-8074773
Class<?> ensureLoaded = LockSupport.class;
+
+ // Eager class load observed to help JIT during startup
+ ensureLoaded = ReservationNode.class;
}
}