RFR: https://bugs.openjdk.java.net/browse/JDK-8178349
Yumin Qi
yumin.qi at oracle.com
Thu Apr 9 16:53:11 UTC 2020
Hi, please review
bug: https://bugs.openjdk.java.net/browse/JDK-8178349
webrev: http://cr.openjdk.java.net/~minqi/8178349/webrev-01/
Summary: When CDS link class, need re- intialize_vtable and
intialize_itable. For a shared class the run for initialize table(s) in
fact just check signature loaders of virtual or interface functions but
we need go through many steps to reach the functions, iterate over the
functions for signatures, resolve the symbol in loaders. Those steps
also involved lock for SystemDictionary many times for resolving
classes. (note for boot loaded shared classed no need to rerun).
This patch record the loader constraints during dump time and in
runtime, directly check loader constraints for the shared class (loaded
by app or platform loader). The performance data showed:
Results of " perf stat -r 40 bin/javac -J-Xshare:on
-J-XX:SharedArchiveFile=javac2.jsa Bench_HelloWorld.java "
1: 2800027008 2793677554 ( -6349454) -- 390.665
390.210 ( -0.455)
2: 2799894892 2801783826 ( 1888934) 392.640
389.890 ( -2.750) ---
3: 2808688341 2792077758 (-16610583) ---- 392.430
390.210 ( -2.220) --
4: 2806708208 2790107502 (-16600706) ---- 395.210
390.060 ( -5.150) -----
5: 2807039108 2791228262 (-15810846) ---- 392.470
388.870 ( -3.600) ---
6: 2803446643 2783022861 (-20423782) ----- 392.550
388.070 ( -4.480) ----
7: 2809043394 2796696131 (-12347263) --- 394.810
389.960 ( -4.850) -----
8: 2798698381 2788160443 (-10537938) --- 393.430
390.130 ( -3.300) ---
9: 2797579793 2789786208 ( -7793585) -- 392.330
390.204 ( -2.126) --
10: 2808294825 2800296275 ( -7998550) -- 394.180
390.230 ( -3.950) ----
============================================================
2803938765 2792678505 (-11260259) --- 393.069
389.783 ( -3.287) ---
instr delta = -11260259 -0.4016%
time delta = -3.287 ms -0.8361%
Results of " perf stat -r 40 bin/java -Xshare:on
-XX:SharedArchiveFile=zprint2.jsa -cp ./zprint-filter-fixed.jar
ZPrintBench "
1: 6548556888 6376039292 (-172517596) ---- 731.250 708.030
(-23.220) -----
2: 6520993435 6391732011 (-129261424) --- 729.150 711.350
(-17.800) ----
3: 6505744758 6355633193 (-150111565) ---- 729.440 707.090
(-22.350) -----
4: 6545887467 6362941735 (-182945732) ----- 731.250
706.680 (-24.570) -----
5: 6497462252 6363834813 (-133627439) --- 729.940 709.540
(-20.400) ----
6: 6567639848 6369214232 (-198425616) ----- 733.770
709.550 (-24.220) -----
7: 6511495888 6369700928 (-141794960) ---- 729.380 710.430
(-18.950) ----
8: 6531525105 6342720734 (-188804371) ----- 730.070
706.090 (-23.980) -----
9: 6508499676 6322714877 (-185784799) ----- 728.700
705.560 (-23.140) -----
10: 6532457875 6430536065 (-101921810) --- 731.590 718.240
(-13.350) ---
============================================================
6526992135 6368448595 (-158543539) ---- 730.453 709.247
(-21.205) ----
instr delta = -158543539 -2.4290%
time delta = -21.205 ms -2.9030%
Tests: hs-tier1,2,3,4
Thanks
Yumin
More information about the hotspot-runtime-dev
mailing list