changeset 49937:7fed08d588b5

8202373: Forcing eager initialization of CHM$ReservationNode avoids deoptimization Reviewed-by: martin, psandoz, dholmes, redestad
author dl
date Tue, 01 May 2018 06:18:48 -0700
parents 4da7dce7e2bf
children 2c2a722a2c0c
files src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
     }
 }