mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-07 09:59:37 +01:00
Compare commits
1738 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10be214c1f | ||
|
|
9255096a66 | ||
|
|
9c9c6c3fb9 | ||
|
|
b40cc1c791 | ||
|
|
8b06568f22 | ||
|
|
0ed1c1c58f | ||
|
|
53b91d9ee8 | ||
|
|
0b53cd291f | ||
|
|
324e8a273d | ||
|
|
52770703ef | ||
|
|
5e0e4153dc | ||
|
|
aee5acad59 | ||
|
|
56c8c9ae5f | ||
|
|
3f1b524181 | ||
|
|
dc6ad31524 | ||
|
|
a943b850ef | ||
|
|
8ea8b95a5a | ||
|
|
8aed05eb0f | ||
|
|
08f2d873cb | ||
|
|
e2bc78646b | ||
|
|
9b18b6db07 | ||
|
|
e148413b18 | ||
|
|
4f0e658af6 | ||
|
|
7cdc3d261d | ||
|
|
3cb1ff0420 | ||
|
|
ebb7e5b243 | ||
|
|
20e0bd6fe8 | ||
|
|
bbe3fec093 | ||
|
|
f9a56f61ef | ||
|
|
619bab5b02 | ||
|
|
e072eaa78d | ||
|
|
e7288787fe | ||
|
|
542846c726 | ||
|
|
f36936e6ca | ||
|
|
bce4848e35 | ||
|
|
b2f452cc12 | ||
|
|
40be42ee97 | ||
|
|
f996257654 | ||
|
|
530cffe1d2 | ||
|
|
c06f606aec | ||
|
|
477f037983 | ||
|
|
f2f987e0a9 | ||
|
|
f948178daa | ||
|
|
04957e59cd | ||
|
|
5373b3b10a | ||
|
|
9ab7ec0539 | ||
|
|
ea43cdf94b | ||
|
|
9d09f2c707 | ||
|
|
c881afa130 | ||
|
|
0fa7274198 | ||
|
|
8dad20e8e4 | ||
|
|
c4ed5ccdab | ||
|
|
ab4f271c29 | ||
|
|
720ef332b4 | ||
|
|
394b8f734b | ||
|
|
497bc51ca2 | ||
|
|
71600c7f3b | ||
|
|
974b37fa30 | ||
|
|
f9c0d0964e | ||
|
|
e9aa5a8882 | ||
|
|
b748a5c6b8 | ||
|
|
34d195ba83 | ||
|
|
6a03e58e3d | ||
|
|
d3c843c4fd | ||
|
|
bba6998f38 | ||
|
|
c2b5c6e77a | ||
|
|
509ee029a8 | ||
|
|
ca54fa125c | ||
|
|
762a95f6a6 | ||
|
|
8fb19cb3c9 | ||
|
|
f8dd19075b | ||
|
|
3f126ee438 | ||
|
|
84845b3d3c | ||
|
|
8b68a27d2f | ||
|
|
980cfdf8d0 | ||
|
|
1806d95f1b | ||
|
|
cdf353ef5d | ||
|
|
97788712ac | ||
|
|
b7f4d30774 | ||
|
|
d153de5846 | ||
|
|
abc17b34f0 | ||
|
|
a608418642 | ||
|
|
60182b6a17 | ||
|
|
b93ab61875 | ||
|
|
8caa003fd0 | ||
|
|
413967fee8 | ||
|
|
622540cedf | ||
|
|
d933ff939e | ||
|
|
1bad418274 | ||
|
|
c541c4229f | ||
|
|
354c0e9ed6 | ||
|
|
0c4473c805 | ||
|
|
8c5e0dac5e | ||
|
|
8e448e267a | ||
|
|
0f3394e585 | ||
|
|
ec09658594 | ||
|
|
2c82f0bd08 | ||
|
|
df7b71a8a3 | ||
|
|
9f5a745718 | ||
|
|
9dd68088a9 | ||
|
|
a9f0f858df | ||
|
|
317adfb01e | ||
|
|
94e8da1502 | ||
|
|
2deb6d77e3 | ||
|
|
2a22237cc6 | ||
|
|
57c9a31852 | ||
|
|
f33ec7e550 | ||
|
|
32aea3718a | ||
|
|
54010e6f77 | ||
|
|
0aadfe1b2a | ||
|
|
243d2c8ff9 | ||
|
|
2dd3859caa | ||
|
|
ae8eef47e9 | ||
|
|
87aac49db1 | ||
|
|
279c7fa0a6 | ||
|
|
9e99f69534 | ||
|
|
4188b23289 | ||
|
|
b4d4e47bd1 | ||
|
|
5024eb818d | ||
|
|
d0d680bafe | ||
|
|
dedb47108a | ||
|
|
a8a1b3c42d | ||
|
|
d05d406220 | ||
|
|
cf80e75513 | ||
|
|
2329af3533 | ||
|
|
a84dba521d | ||
|
|
5182d5add0 | ||
|
|
86af8e5184 | ||
|
|
cf0a51ec1b | ||
|
|
4b8d52834d | ||
|
|
843e5bd3dc | ||
|
|
86b92e91cf | ||
|
|
9edf5f7ab6 | ||
|
|
1ef3bac766 | ||
|
|
4c64d5b46c | ||
|
|
1df5df6158 | ||
|
|
a57eb33d47 | ||
|
|
9058c163f9 | ||
|
|
8bd8ab7a8c | ||
|
|
6fb5337c38 | ||
|
|
120313acde | ||
|
|
80bc31775f | ||
|
|
fdde4e06e0 | ||
|
|
59b6ebd4df | ||
|
|
84def92ba4 | ||
|
|
1be6c972f8 | ||
|
|
6e6cccd956 | ||
|
|
7a96602662 | ||
|
|
94ee86f39b | ||
|
|
d0eef7a2ad | ||
|
|
7e60f86127 | ||
|
|
743ee2c55f | ||
|
|
32cc09871a | ||
|
|
8222e9545e | ||
|
|
06e2ad227e | ||
|
|
019a534346 | ||
|
|
6a19b74c22 | ||
|
|
11dccc18de | ||
|
|
aeb1c883ce | ||
|
|
041b0feaba | ||
|
|
64ec3f718a | ||
|
|
0c1b656d4e | ||
|
|
9e5e54a2dc | ||
|
|
b7324dbe33 | ||
|
|
252899b636 | ||
|
|
8e3051745d | ||
|
|
dd6f4b7869 | ||
|
|
e3c75d2bf1 | ||
|
|
9b99e90225 | ||
|
|
1801949b7c | ||
|
|
93251926fa | ||
|
|
6fd9be5aed | ||
|
|
541bb8af03 | ||
|
|
7464ba015d | ||
|
|
8d2f8106b0 | ||
|
|
98d4612e67 | ||
|
|
ee05348c36 | ||
|
|
9b72415faf | ||
|
|
5fa3f8532d | ||
|
|
d95c16fa82 | ||
|
|
9b7927c125 | ||
|
|
86d2196175 | ||
|
|
7fc8b00202 | ||
|
|
0c9a13a511 | ||
|
|
9dbf7fabd0 | ||
|
|
4db777e3c4 | ||
|
|
223973dd71 | ||
|
|
cd7068dbc2 | ||
|
|
0308e4ffa7 | ||
|
|
4714a43b1e | ||
|
|
a28c351db1 | ||
|
|
016383cbe3 | ||
|
|
c2fe7a3246 | ||
|
|
f550ab8282 | ||
|
|
8cd7309276 | ||
|
|
3d0fda5bd3 | ||
|
|
b0e4113b5f | ||
|
|
829118ef77 | ||
|
|
2703469310 | ||
|
|
1414c3ef65 | ||
|
|
cfb91cf777 | ||
|
|
66cba349f0 | ||
|
|
5eee401997 | ||
|
|
9418a6bb90 | ||
|
|
5fe5826104 | ||
|
|
b2b899568d | ||
|
|
4ad0db5e74 | ||
|
|
0ad6d36b24 | ||
|
|
116058b8b4 | ||
|
|
c0cb8bd43e | ||
|
|
76e8b08d95 | ||
|
|
6e80a5e387 | ||
|
|
818e833f10 | ||
|
|
fc211f8525 | ||
|
|
42cad27fc3 | ||
|
|
899df7ee84 | ||
|
|
af094e6e6a | ||
|
|
0b036e9cdc | ||
|
|
6332b20e25 | ||
|
|
6388d1ad5a | ||
|
|
dc1d389f05 | ||
|
|
0fa236f7a0 | ||
|
|
a8e3d0fc46 | ||
|
|
4b632d4ffe | ||
|
|
844db0cd85 | ||
|
|
87ea689c77 | ||
|
|
12d326afb6 | ||
|
|
7156f480d0 | ||
|
|
b80006b16e | ||
|
|
63858e87db | ||
|
|
0e30bb4ccf | ||
|
|
7dc71f3425 | ||
|
|
b247e082d7 | ||
|
|
3d0c9d5b47 | ||
|
|
03afcdf15d | ||
|
|
12f8e812fd | ||
|
|
f15a892f5d | ||
|
|
232aa679f7 | ||
|
|
4cb15a6983 | ||
|
|
4ba47da3b9 | ||
|
|
a19b9a51bc | ||
|
|
edbc628823 | ||
|
|
0f99709138 | ||
|
|
fbe0b6e795 | ||
|
|
745972c1aa | ||
|
|
150445f02b | ||
|
|
11d4ea0d2d | ||
|
|
ec55985836 | ||
|
|
a315b13b7b | ||
|
|
cfb73b6bfa | ||
|
|
e116ccd2c3 | ||
|
|
a150d49f71 | ||
|
|
e4f4544f92 | ||
|
|
037804f4e6 | ||
|
|
a034aab600 | ||
|
|
69c524ad35 | ||
|
|
8bd3b8fe7d | ||
|
|
14ef4bbb6f | ||
|
|
2ae44a8874 | ||
|
|
5685dd0da3 | ||
|
|
60ef15b303 | ||
|
|
f9c016a47e | ||
|
|
af4d6460f6 | ||
|
|
dfd2da1f2c | ||
|
|
3c912178f8 | ||
|
|
32461c1f59 | ||
|
|
0f773dae2b | ||
|
|
f708a37c51 | ||
|
|
2e6272f82e | ||
|
|
233bc5fa55 | ||
|
|
8f15dd7da8 | ||
|
|
95c32fa656 | ||
|
|
afdf58eac0 | ||
|
|
7c3e5cfad7 | ||
|
|
aaac75abd1 | ||
|
|
51a590b2e8 | ||
|
|
01304991d3 | ||
|
|
bae88502a4 | ||
|
|
db72dc5554 | ||
|
|
fb12f6d7f1 | ||
|
|
1bf8742a09 | ||
|
|
8f380f3581 | ||
|
|
186837353f | ||
|
|
dbfee48e45 | ||
|
|
a7486ed785 | ||
|
|
02065e9055 | ||
|
|
389f689648 | ||
|
|
e97f728e93 | ||
|
|
0c90061351 | ||
|
|
478bd6cdd7 | ||
|
|
85150e0a42 | ||
|
|
0e0562655c | ||
|
|
262751e67f | ||
|
|
085ca0056f | ||
|
|
b13eefd897 | ||
|
|
4732011a65 | ||
|
|
ff21958a2e | ||
|
|
95ac9349f6 | ||
|
|
bebabd26c9 | ||
|
|
86a60e7d96 | ||
|
|
55955484e0 | ||
|
|
d76b22195f | ||
|
|
913a4b4065 | ||
|
|
639042419f | ||
|
|
8df43eef4b | ||
|
|
96d504fe41 | ||
|
|
7b34effc17 | ||
|
|
050f3da4a0 | ||
|
|
78ff91782f | ||
|
|
5170990d7b | ||
|
|
65344c8a07 | ||
|
|
edce3fed8b | ||
|
|
68539876fe | ||
|
|
d9f253340a | ||
|
|
6036eb3c81 | ||
|
|
f90fcaa4a7 | ||
|
|
0646886007 | ||
|
|
dcaade97a5 | ||
|
|
cd5314db8b | ||
|
|
d2a8adb14f | ||
|
|
152a4e886d | ||
|
|
ef6db5cad0 | ||
|
|
6d1c3f06c4 | ||
|
|
7c2d7541ba | ||
|
|
4d01bcc46e | ||
|
|
7d915be754 | ||
|
|
f2bcb756f8 | ||
|
|
a38b7a22fe | ||
|
|
8e58801c9a | ||
|
|
7864d59d6f | ||
|
|
aad640dcc9 | ||
|
|
37901295e1 | ||
|
|
ad1595b5c2 | ||
|
|
f5c5388fb5 | ||
|
|
0bf13985d5 | ||
|
|
2f772fd1a2 | ||
|
|
accef6f21e | ||
|
|
5aa26c75b2 | ||
|
|
f0ed32fca4 | ||
|
|
5c4fd9ceaf | ||
|
|
16267bd573 | ||
|
|
9ceee497ef | ||
|
|
a69e12e0d2 | ||
|
|
f5434bcaaf | ||
|
|
86c13ecaed | ||
|
|
9c2841028f | ||
|
|
ed0b7f5488 | ||
|
|
92806ce28a | ||
|
|
2659b26438 | ||
|
|
33f1a7fdc4 | ||
|
|
bb6533b600 | ||
|
|
5c641fe1d8 | ||
|
|
74b94472d3 | ||
|
|
f485cdb549 | ||
|
|
dd98aecb75 | ||
|
|
8d9947ce75 | ||
|
|
219708a510 | ||
|
|
1139499aed | ||
|
|
85dd8c3474 | ||
|
|
1463e5612b | ||
|
|
7592f5ae6b | ||
|
|
713b003558 | ||
|
|
0a5483efed | ||
|
|
b8a407d849 | ||
|
|
0d3c39d6dc | ||
|
|
0087cd57cf | ||
|
|
76647e1edf | ||
|
|
92f67861bb | ||
|
|
13a904ddb5 | ||
|
|
3fd8325932 | ||
|
|
7fe2bec657 | ||
|
|
a2e23e49ba | ||
|
|
52169d7c56 | ||
|
|
9a23638660 | ||
|
|
a08c2a715b | ||
|
|
ba7eef6063 | ||
|
|
42a6fefec9 | ||
|
|
770b4dc9c1 | ||
|
|
70015b02b4 | ||
|
|
d9baf2d9db | ||
|
|
410f39e6b6 | ||
|
|
55c69787cf | ||
|
|
792a58ea0e | ||
|
|
5be30023b9 | ||
|
|
bc866184ee | ||
|
|
0a81e49d9e | ||
|
|
1bfd8e04f0 | ||
|
|
061d01402b | ||
|
|
28cfc4815f | ||
|
|
52478f3231 | ||
|
|
250b040f8b | ||
|
|
83556f56e7 | ||
|
|
d3a2dffee5 | ||
|
|
07a5b9672e | ||
|
|
3f7bda574d | ||
|
|
92d075c5db | ||
|
|
0fdec4edaa | ||
|
|
86b51437b3 | ||
|
|
39e0a6125f | ||
|
|
690a416aae | ||
|
|
a2d18ddba0 | ||
|
|
371c574139 | ||
|
|
19c065f9bb | ||
|
|
824f9ebec3 | ||
|
|
2a71dc5981 | ||
|
|
94a3885bbe | ||
|
|
93588d0738 | ||
|
|
c8de1037d6 | ||
|
|
431c07ac57 | ||
|
|
13dffb3db5 | ||
|
|
2ac546b054 | ||
|
|
1dcc612a81 | ||
|
|
bfd01081c3 | ||
|
|
a7d486ca3d | ||
|
|
37e6e8e616 | ||
|
|
b4d4104e40 | ||
|
|
9b5cfa7ac2 | ||
|
|
499d9f8e49 | ||
|
|
fb5f776caf | ||
|
|
067d4d500d | ||
|
|
76a279920c | ||
|
|
d1dda7f5a6 | ||
|
|
4c1030df6f | ||
|
|
6ae43c6a0e | ||
|
|
7e34e95d11 | ||
|
|
332b9ab801 | ||
|
|
e0b84005e4 | ||
|
|
471cfeb793 | ||
|
|
94ab10baf3 | ||
|
|
d60f0153e7 | ||
|
|
2b6110f6e3 | ||
|
|
63ddfb5221 | ||
|
|
4d1ff852af | ||
|
|
7db2687b73 | ||
|
|
59f4085080 | ||
|
|
9b94493edd | ||
|
|
c47f2057c5 | ||
|
|
ba539e832c | ||
|
|
f7ba738641 | ||
|
|
c00eb55594 | ||
|
|
a275ab6f48 | ||
|
|
27de8b0ff6 | ||
|
|
5d9d0a9a75 | ||
|
|
18a8fd31e5 | ||
|
|
faf6484a2b | ||
|
|
b59a15193e | ||
|
|
81c4587cf7 | ||
|
|
7ca96684b5 | ||
|
|
55d40c666d | ||
|
|
bd0b236c4a | ||
|
|
5acffe72ad | ||
|
|
fd3ce84413 | ||
|
|
3a700c8e6b | ||
|
|
2247fa9602 | ||
|
|
79d5f9c769 | ||
|
|
e6584954f5 | ||
|
|
0478b4e54c | ||
|
|
308ba715a8 | ||
|
|
60a9d39d0e | ||
|
|
201bc8380c | ||
|
|
0ed41e9ef2 | ||
|
|
0e3a3cc87a | ||
|
|
b85ab67807 | ||
|
|
a30e884f47 | ||
|
|
77447ab9da | ||
|
|
d649015cab | ||
|
|
1408d4104c | ||
|
|
2bce0bab8a | ||
|
|
bbc63ddc5a | ||
|
|
1a1cf92ea6 | ||
|
|
b40243f499 | ||
|
|
27130a7ad2 | ||
|
|
efe3d8c9fa | ||
|
|
afa82f7acd | ||
|
|
c465836189 | ||
|
|
07cb8849b7 | ||
|
|
7dbbb71015 | ||
|
|
008119aa29 | ||
|
|
6ea789002e | ||
|
|
e005989a5f | ||
|
|
33f88d585e | ||
|
|
3438de2060 | ||
|
|
cf77ddd67d | ||
|
|
382c68f8b6 | ||
|
|
abadd05c98 | ||
|
|
b61d1ec0b2 | ||
|
|
667524ec99 | ||
|
|
c7bb9526c4 | ||
|
|
1984e4ea7f | ||
|
|
7c8bed75ad | ||
|
|
d8f671e3ee | ||
|
|
ba42c17ea7 | ||
|
|
ce82bfa392 | ||
|
|
2624b2a7d7 | ||
|
|
974a06e94c | ||
|
|
ad3b5d11d7 | ||
|
|
b71bcabdc5 | ||
|
|
977d41835c | ||
|
|
c630859af5 | ||
|
|
63720c9e21 | ||
|
|
c65f7c3364 | ||
|
|
a64f9674c9 | ||
|
|
e929f1d15e | ||
|
|
733e2667a3 | ||
|
|
0979251517 | ||
|
|
bdc30661cb | ||
|
|
e7fb17ebca | ||
|
|
ade01055d1 | ||
|
|
3396a75ca7 | ||
|
|
bd91605174 | ||
|
|
24d2a6fe28 | ||
|
|
bd2a53a105 | ||
|
|
6e2ff8055d | ||
|
|
cdbcb46437 | ||
|
|
2bb749dca2 | ||
|
|
535c3bd567 | ||
|
|
03dd08df32 | ||
|
|
c6c1be68b6 | ||
|
|
b5cf4ef17e | ||
|
|
38ee00073d | ||
|
|
a7735759aa | ||
|
|
beb4d8cd85 | ||
|
|
c0c32d8bfe | ||
|
|
93606dbe3f | ||
|
|
1080bdd980 | ||
|
|
b3e3c0b89d | ||
|
|
830e654595 | ||
|
|
47e3150fad | ||
|
|
39608ad69a | ||
|
|
76e123778d | ||
|
|
4f61ac98d5 | ||
|
|
90e76c380b | ||
|
|
85a088f9f1 | ||
|
|
381de93173 | ||
|
|
5d2684022e | ||
|
|
49c77556ab | ||
|
|
7970c912fa | ||
|
|
897fed57dd | ||
|
|
6a6ae5c6ed | ||
|
|
89ec9bc1e2 | ||
|
|
5404c7fe70 | ||
|
|
1315b55c19 | ||
|
|
3a9131614b | ||
|
|
d0b370c6b8 | ||
|
|
e7bb9fd8d7 | ||
|
|
dc43f7063d | ||
|
|
d7e1f938e7 | ||
|
|
ad56416ad9 | ||
|
|
50412155f9 | ||
|
|
3e47d86db7 | ||
|
|
871cb53015 | ||
|
|
a7c4f72f75 | ||
|
|
1ee8a9a528 | ||
|
|
56c4e379af | ||
|
|
0535ead40d | ||
|
|
c64efbc559 | ||
|
|
d6f04ca27b | ||
|
|
13af04a640 | ||
|
|
893f2d4fbc | ||
|
|
63895cc7cd | ||
|
|
592583006f | ||
|
|
31344224c6 | ||
|
|
15123efa60 | ||
|
|
760f73a671 | ||
|
|
923bef0b1e | ||
|
|
39cd51acab | ||
|
|
c7afe8d09b | ||
|
|
ace76c89eb | ||
|
|
641d5af861 | ||
|
|
808c4a4a73 | ||
|
|
ff2f0003c3 | ||
|
|
3cd3b00fb7 | ||
|
|
64fe99dbec | ||
|
|
17b9e61404 | ||
|
|
c0e32c3fca | ||
|
|
2c9e087a17 | ||
|
|
dba304d265 | ||
|
|
2022e3d2f2 | ||
|
|
1f7b350fe7 | ||
|
|
eadcad1393 | ||
|
|
ec4b14d493 | ||
|
|
298401f392 | ||
|
|
29eed33b90 | ||
|
|
6cc66f7ff5 | ||
|
|
f5c06010c4 | ||
|
|
293045e187 | ||
|
|
886f5885ff | ||
|
|
05703a8824 | ||
|
|
27738b9bc1 | ||
|
|
4dc032eb32 | ||
|
|
ceb27707a6 | ||
|
|
fcce5a2b3c | ||
|
|
27fce84573 | ||
|
|
b50153e0b1 | ||
|
|
32ba7b1af9 | ||
|
|
67c4fc1a4d | ||
|
|
e612e43ec0 | ||
|
|
07bf95c9ad | ||
|
|
eef3676722 | ||
|
|
15b77b797b | ||
|
|
5cb1684f14 | ||
|
|
0a087ecb13 | ||
|
|
9c693b5575 | ||
|
|
30b018b55c | ||
|
|
7840ab7e3d | ||
|
|
0a4ab7ae9a | ||
|
|
4a9b9ddd48 | ||
|
|
f4c17f8b6c | ||
|
|
b868dea5db | ||
|
|
f0a90c039a | ||
|
|
f4615088ac | ||
|
|
838eb2387f | ||
|
|
76c6dc4591 | ||
|
|
07161d961a | ||
|
|
1b113cbc3f | ||
|
|
2892ad6bc0 | ||
|
|
3ab381bd9b | ||
|
|
55b5776d7f | ||
|
|
37e13f2348 | ||
|
|
f5a8794c07 | ||
|
|
61b424d747 | ||
|
|
a8560f5352 | ||
|
|
641a44d288 | ||
|
|
b406b996f9 | ||
|
|
1f189822f0 | ||
|
|
deeaf56fa3 | ||
|
|
ed04be67c7 | ||
|
|
5d54d23310 | ||
|
|
1f320da262 | ||
|
|
3fb01ee26b | ||
|
|
b8fc7b2e91 | ||
|
|
b8add67ee4 | ||
|
|
b00ea1cfbc | ||
|
|
d597ddafbd | ||
|
|
6625f22474 | ||
|
|
01f4133f22 | ||
|
|
b7bd90fe90 | ||
|
|
e5c9468191 | ||
|
|
6bb87f14a8 | ||
|
|
57a8722fbe | ||
|
|
436382c220 | ||
|
|
a826a12210 | ||
|
|
e7daf93c85 | ||
|
|
282a9485b8 | ||
|
|
f265ba1086 | ||
|
|
6644278e8a | ||
|
|
87ca21711a | ||
|
|
ba81371932 | ||
|
|
2c3cdba88b | ||
|
|
dc7595ea2b | ||
|
|
2dfaf4d229 | ||
|
|
0036e174ad | ||
|
|
073f57ae6d | ||
|
|
290bc74830 | ||
|
|
f5f49b6e44 | ||
|
|
06383fee91 | ||
|
|
7b69e23a4f | ||
|
|
046a5eca42 | ||
|
|
08ab93fe2b | ||
|
|
86c315b268 | ||
|
|
95ffcc0b19 | ||
|
|
c43bcc5456 | ||
|
|
ff0303d69c | ||
|
|
230e3ce141 | ||
|
|
8c83c11efa | ||
|
|
f5d030fee1 | ||
|
|
902d29380e | ||
|
|
f31624f8c4 | ||
|
|
f754b686b5 | ||
|
|
639d675ba3 | ||
|
|
072ee00a51 | ||
|
|
90c1966233 | ||
|
|
9fdc75969b | ||
|
|
c2cdacaddd | ||
|
|
2e925883d5 | ||
|
|
a156c6b9bf | ||
|
|
75335543f2 | ||
|
|
c9143a3b22 | ||
|
|
8361529140 | ||
|
|
2988403307 | ||
|
|
43fdd6cd26 | ||
|
|
9e16583b83 | ||
|
|
390fc567ef | ||
|
|
3674766d65 | ||
|
|
3b0708af7d | ||
|
|
995e2643c6 | ||
|
|
ff7ca94ca3 | ||
|
|
4a393c0243 | ||
|
|
b4316f0317 | ||
|
|
404a4329c7 | ||
|
|
504f91d4d1 | ||
|
|
0895519455 | ||
|
|
ba57c58ac7 | ||
|
|
9d7b365b76 | ||
|
|
84baaca0e7 | ||
|
|
555feccdb1 | ||
|
|
fc6d53e035 | ||
|
|
3b62f02c8a | ||
|
|
4f93d1c06e | ||
|
|
d85849294a | ||
|
|
65fd106b1a | ||
|
|
888350261c | ||
|
|
923a103580 | ||
|
|
2797ba7b4a | ||
|
|
8be8b407c9 | ||
|
|
ff4546ee49 | ||
|
|
6c9bc39e15 | ||
|
|
5e0f7c7a2b | ||
|
|
b7b0c8be3b | ||
|
|
34472d7aaa | ||
|
|
c607177336 | ||
|
|
9be32d1854 | ||
|
|
ec223b32be | ||
|
|
fe329e72bc | ||
|
|
2918bd4f51 | ||
|
|
48fbbd929e | ||
|
|
fa340f35b0 | ||
|
|
e1bea797be | ||
|
|
a2a2572f78 | ||
|
|
7b992c7cd7 | ||
|
|
8678f41971 | ||
|
|
752c0e5a49 | ||
|
|
3ea7913eaf | ||
|
|
9b4f72ad18 | ||
|
|
d5fa37b63f | ||
|
|
6a42bb54bd | ||
|
|
3b03c698ce | ||
|
|
a56060d465 | ||
|
|
97ddad2e99 | ||
|
|
01ea54d751 | ||
|
|
cad1ad4ba1 | ||
|
|
c0be778e20 | ||
|
|
0b659fef1b | ||
|
|
e62fb2762f | ||
|
|
90fff7bb1e | ||
|
|
f117b0e8ff | ||
|
|
5a2da540da | ||
|
|
23a7dbd486 | ||
|
|
104ef7a512 | ||
|
|
55c667055e | ||
|
|
bc024f9af1 | ||
|
|
dbcbc5cf36 | ||
|
|
19aa9c5ab2 | ||
|
|
4038661a40 | ||
|
|
f3f243e15e | ||
|
|
967eca8d1d | ||
|
|
c011487364 | ||
|
|
e90312b97a | ||
|
|
3cc4c7947b | ||
|
|
92948257a6 | ||
|
|
fcd5fd2fe9 | ||
|
|
403ad1569a | ||
|
|
01ad15e61c | ||
|
|
f10e324538 | ||
|
|
7d8cc524ca | ||
|
|
74252c6df6 | ||
|
|
7b3fa30b6b | ||
|
|
90f1b0812e | ||
|
|
a7a678d491 | ||
|
|
7998f964fa | ||
|
|
04ab8b2f04 | ||
|
|
3b9e5c41db | ||
|
|
e7009db076 | ||
|
|
43ac82fc82 | ||
|
|
9e6d718281 | ||
|
|
14d64f6e0a | ||
|
|
744d5d12d0 | ||
|
|
292902fa77 | ||
|
|
3820e0b62a | ||
|
|
8c55979d40 | ||
|
|
5c275d0a0c | ||
|
|
ce154c9ad4 | ||
|
|
6d6ab9dfd9 | ||
|
|
16158c2eef | ||
|
|
f4d0b285c3 | ||
|
|
071c02b771 | ||
|
|
448fa17a19 | ||
|
|
bfb3674430 | ||
|
|
95857dcfaf | ||
|
|
5520a4df6d | ||
|
|
e906af61a5 | ||
|
|
750fbac5eb | ||
|
|
c5f48bf2cf | ||
|
|
630fe55f4b | ||
|
|
1084ca8699 | ||
|
|
9d5c1c0c7e | ||
|
|
352882d1dc | ||
|
|
500634c24c | ||
|
|
49822836b8 | ||
|
|
fb9c2372f6 | ||
|
|
9e669bf6b7 | ||
|
|
6d2a2255f9 | ||
|
|
e22809895c | ||
|
|
5339faf796 | ||
|
|
9ee13893b0 | ||
|
|
3808264809 | ||
|
|
b8929acd83 | ||
|
|
f203865ad7 | ||
|
|
3c53281d4a | ||
|
|
add8207c6f | ||
|
|
f3dd1882e0 | ||
|
|
8cbf021a42 | ||
|
|
69c0011bad | ||
|
|
4be94ec941 | ||
|
|
21117cb19e | ||
|
|
a9367e1c03 | ||
|
|
efeb4ae758 | ||
|
|
94f8e8c89f | ||
|
|
700429b2a7 | ||
|
|
7526030be1 | ||
|
|
c2a8422d7f | ||
|
|
9e21248180 | ||
|
|
cd103bbab8 | ||
|
|
44fc8d89d3 | ||
|
|
0a01980897 | ||
|
|
7d74096fbc | ||
|
|
2220a431e0 | ||
|
|
e74bee8349 | ||
|
|
50483f3c81 | ||
|
|
8387ea9380 | ||
|
|
60d66beaf7 | ||
|
|
56acccd6a6 | ||
|
|
f6d3a8b591 | ||
|
|
db9b7f2787 | ||
|
|
25e7ea9c8b | ||
|
|
d5523eb04d | ||
|
|
b4d463e431 | ||
|
|
565ff2f838 | ||
|
|
4d8238cd7b | ||
|
|
a26821d6e2 | ||
|
|
0f9df78ac9 | ||
|
|
abfc410137 | ||
|
|
56c8a4b903 | ||
|
|
d3f7396d47 | ||
|
|
78e8501e6f | ||
|
|
7c281c4e71 | ||
|
|
5aac53496f | ||
|
|
be5409fd7e | ||
|
|
853c9a1c18 | ||
|
|
d5bb0ebb7e | ||
|
|
77dc0c8a0d | ||
|
|
0f4ce76379 | ||
|
|
7aae705e03 | ||
|
|
257c2089b9 | ||
|
|
4673cad7a7 | ||
|
|
070af3dd26 | ||
|
|
88a99dacaa | ||
|
|
a74d89f57b | ||
|
|
daf57531ef | ||
|
|
875447134f | ||
|
|
d0d25416fc | ||
|
|
e36b430f9a | ||
|
|
8a6d4acb9f | ||
|
|
71181df1ac | ||
|
|
2f663089b0 | ||
|
|
a16fcfdf93 | ||
|
|
f22e1413f4 | ||
|
|
521828f6d1 | ||
|
|
7229b67238 | ||
|
|
cb7f1ffe07 | ||
|
|
7513798519 | ||
|
|
8939e85fb2 | ||
|
|
35cab2f35d | ||
|
|
bc95f47b02 | ||
|
|
2706d5cb2b | ||
|
|
80be66ba39 | ||
|
|
d38ecb09d1 | ||
|
|
9adaec3e08 | ||
|
|
e1738f3d47 | ||
|
|
a07704dcde | ||
|
|
c5ec465255 | ||
|
|
910d41f4f8 | ||
|
|
f20aec9544 | ||
|
|
d0ff9f7830 | ||
|
|
5be0724dda | ||
|
|
71bf0b2560 | ||
|
|
40ec3a2df9 | ||
|
|
1a889b37c0 | ||
|
|
3d4a4b22b9 | ||
|
|
579c394338 | ||
|
|
2efe368304 | ||
|
|
df62d74c8f | ||
|
|
53b11621ca | ||
|
|
cdbc7c5ef6 | ||
|
|
64d5b87d66 | ||
|
|
1272dd6232 | ||
|
|
85a7a9efb2 | ||
|
|
eef6aa8e58 | ||
|
|
11f619cc8b | ||
|
|
e11674028b | ||
|
|
4895f13846 | ||
|
|
88b60f34ec | ||
|
|
7acf76118c | ||
|
|
a6b6b17282 | ||
|
|
85ba8dd702 | ||
|
|
38ddd2a2cd | ||
|
|
89a087236a | ||
|
|
224fa7de7d | ||
|
|
990802f817 | ||
|
|
6c186a9959 | ||
|
|
cf03ac79a4 | ||
|
|
9a78559379 | ||
|
|
2a455e32ea | ||
|
|
4d1917144c | ||
|
|
03d9a10203 | ||
|
|
46bc0d7b50 | ||
|
|
f388b74894 | ||
|
|
bd0c3e2eb0 | ||
|
|
f002bd9ae6 | ||
|
|
963e4ddaba | ||
|
|
6e7767c92a | ||
|
|
f8f9621456 | ||
|
|
6671330e27 | ||
|
|
ce5d7b61a2 | ||
|
|
1710c8869f | ||
|
|
1ae8aba390 | ||
|
|
371ceba9ab | ||
|
|
695abc55e5 | ||
|
|
0b12caa57b | ||
|
|
c9f8cd4421 | ||
|
|
44228aa152 | ||
|
|
1801b1f7d6 | ||
|
|
3107c6adbc | ||
|
|
e8e2ccc347 | ||
|
|
54a0e73af1 | ||
|
|
0979d4f31b | ||
|
|
8be76d512c | ||
|
|
10ffe89144 | ||
|
|
b0e6a142bc | ||
|
|
ee1b5a8eec | ||
|
|
ede272d863 | ||
|
|
1cf05bcb67 | ||
|
|
f32b2bccc3 | ||
|
|
de8c05df2a | ||
|
|
a82f6ed257 | ||
|
|
75558a1f13 | ||
|
|
0b23870353 | ||
|
|
3d9761fe49 | ||
|
|
b361e49c5d | ||
|
|
1b4521f76e | ||
|
|
578c46d142 | ||
|
|
8b938e54a8 | ||
|
|
63a2f90347 | ||
|
|
0dbd0d0d9e | ||
|
|
5eea5ec4c4 | ||
|
|
04536355c3 | ||
|
|
0e2c5fff47 | ||
|
|
972b5a8bc1 | ||
|
|
70965577c5 | ||
|
|
d1b89469dd | ||
|
|
7a1da1450c | ||
|
|
1c855a3f78 | ||
|
|
d298ac8fcb | ||
|
|
e0f416a338 | ||
|
|
06cff86e4b | ||
|
|
b89faecc44 | ||
|
|
4fa4b49893 | ||
|
|
eda0c03828 | ||
|
|
d975512709 | ||
|
|
98022ef10f | ||
|
|
f60744a073 | ||
|
|
1d260966a9 | ||
|
|
030badde79 | ||
|
|
8dcb78499d | ||
|
|
a9996adfe0 | ||
|
|
f75bbf78b7 | ||
|
|
1f3e9d5788 | ||
|
|
2c94df2c6e | ||
|
|
e6b04f49a7 | ||
|
|
418536236c | ||
|
|
5bbd7111dc | ||
|
|
c96537700e | ||
|
|
9d2cd63c99 | ||
|
|
5159453642 | ||
|
|
2ff1def28c | ||
|
|
a102540dc8 | ||
|
|
76dbf04010 | ||
|
|
8b3a1a7fec | ||
|
|
67e137705d | ||
|
|
026be596a2 | ||
|
|
363dde6d63 | ||
|
|
3802d6d3de | ||
|
|
481be2e7d2 | ||
|
|
fb951c5840 | ||
|
|
e83d029605 | ||
|
|
4f45175c4e | ||
|
|
837ebbeebf | ||
|
|
008d0b3165 | ||
|
|
133c22376c | ||
|
|
9b93e0a26c | ||
|
|
599e47907e | ||
|
|
66dc0156fb | ||
|
|
f9e9170415 | ||
|
|
9caca35a6f | ||
|
|
0c3b4bf9b7 | ||
|
|
216bf92575 | ||
|
|
4c6f3e4510 | ||
|
|
8d74e8e30b | ||
|
|
f4a8e51d4a | ||
|
|
db9032755a | ||
|
|
db017fbd56 | ||
|
|
479ceadb35 | ||
|
|
ad1d5061a9 | ||
|
|
ff0a538ebd | ||
|
|
c81adfed61 | ||
|
|
2ccf6b65a7 | ||
|
|
a34eeb7735 | ||
|
|
ba6b9c085e | ||
|
|
04f1cf9b47 | ||
|
|
80c6e03ec4 | ||
|
|
9001a78701 | ||
|
|
703cab8d0d | ||
|
|
3c9cdc9251 | ||
|
|
032805520d | ||
|
|
b37f7cfdb1 | ||
|
|
3668d631ca | ||
|
|
7fa3ea24ac | ||
|
|
8a521cbf64 | ||
|
|
fe9601aa6d | ||
|
|
65e8162d67 | ||
|
|
b99be427ce | ||
|
|
6b3b011d0b | ||
|
|
b53ef867e4 | ||
|
|
215fd32738 | ||
|
|
921603e356 | ||
|
|
542ee611fc | ||
|
|
99a8e45598 | ||
|
|
f096bd2b0d | ||
|
|
26dd87ab7c | ||
|
|
a6ea081ba2 | ||
|
|
2e87610593 | ||
|
|
1c336fc03a | ||
|
|
8eafcaab24 | ||
|
|
c096f12994 | ||
|
|
5cfc8b3629 | ||
|
|
65b3d32eca | ||
|
|
61de3c3065 | ||
|
|
3b101f673b | ||
|
|
bd79159249 | ||
|
|
ca4425cb21 | ||
|
|
b386e44bf5 | ||
|
|
03995a0327 | ||
|
|
bd6a088aaf | ||
|
|
c2582f8e03 | ||
|
|
c122e27068 | ||
|
|
52a2428c28 | ||
|
|
87b60afdf7 | ||
|
|
10069846d5 | ||
|
|
f06f9fe734 | ||
|
|
348e538d10 | ||
|
|
5b9ff9a29e | ||
|
|
62b04983f2 | ||
|
|
c40b9c8b9e | ||
|
|
46dfaeecc9 | ||
|
|
e03c9829e3 | ||
|
|
97c0e96a5a | ||
|
|
2b559a30df | ||
|
|
73b4a7e79e | ||
|
|
7d8aeaf7de | ||
|
|
94390c3f1e | ||
|
|
78d509ac0f | ||
|
|
0b6238990b | ||
|
|
c0e4afcddd | ||
|
|
be6a2c4f0c | ||
|
|
0b8ff1a7e6 | ||
|
|
63134e091b | ||
|
|
50ab4690de | ||
|
|
c790bf3ebc | ||
|
|
746affd753 | ||
|
|
e766df4bcc | ||
|
|
847705dc96 | ||
|
|
f10e7aca70 | ||
|
|
9ee1550815 | ||
|
|
1de6eed0e1 | ||
|
|
78510922c5 | ||
|
|
41de3a4cb1 | ||
|
|
304eb7f919 | ||
|
|
442bb7eecc | ||
|
|
09941119e1 | ||
|
|
e3aaff5db4 | ||
|
|
99242748ee | ||
|
|
c1f4b0ca72 | ||
|
|
553e5ca631 | ||
|
|
aee4b48d20 | ||
|
|
bef85f8cea | ||
|
|
0161050077 | ||
|
|
a7c8b0b535 | ||
|
|
985a1c8426 | ||
|
|
2106b67380 | ||
|
|
58493967cd | ||
|
|
2c82032f4c | ||
|
|
c571f300c6 | ||
|
|
9d8b89962f | ||
|
|
af014f4c2d | ||
|
|
b1c1b24890 | ||
|
|
0c2b6e1c04 | ||
|
|
44d8b28b0b | ||
|
|
bd43a4298c | ||
|
|
0ed7deabaa | ||
|
|
56629e4c90 | ||
|
|
11732c2469 | ||
|
|
c356f37efc | ||
|
|
d987707b0d | ||
|
|
29a0e37cb2 | ||
|
|
9397a10682 | ||
|
|
5f0af9b0f7 | ||
|
|
2af72dec9c | ||
|
|
73802596bf | ||
|
|
10a677632d | ||
|
|
7dc0618259 | ||
|
|
3f4e205ed7 | ||
|
|
a9320f9a7c | ||
|
|
f2157fc2a3 | ||
|
|
10a904bd65 | ||
|
|
478314786d | ||
|
|
87b4f75c81 | ||
|
|
3cb8a371cf | ||
|
|
2be0650a3c | ||
|
|
38f59e7a39 | ||
|
|
9cae35c8fe | ||
|
|
d56539e2ef | ||
|
|
894c226ce0 | ||
|
|
8ad2c4c130 | ||
|
|
513fce6d1f | ||
|
|
6ce327bba0 | ||
|
|
a5182b1bc8 | ||
|
|
81e42d8949 | ||
|
|
534de1d9d3 | ||
|
|
d26d470f41 | ||
|
|
6ecddfb581 | ||
|
|
382093e49b | ||
|
|
de1b27c174 | ||
|
|
d0445b53b8 | ||
|
|
7c49be5fbf | ||
|
|
14bd84f9b6 | ||
|
|
4775d5b564 | ||
|
|
24d1124689 | ||
|
|
dc80bc7a42 | ||
|
|
913c60c2e3 | ||
|
|
20e6a76d22 | ||
|
|
67fa05a1d2 | ||
|
|
b101e233a0 | ||
|
|
dcecd60677 | ||
|
|
085a4aadcb | ||
|
|
f25553eb0b | ||
|
|
7debe89a72 | ||
|
|
7ac0ac677b | ||
|
|
c00a394007 | ||
|
|
98ec465085 | ||
|
|
6dd3a81c0b | ||
|
|
f8d939adaf | ||
|
|
2fbb8399e2 | ||
|
|
6f149720d0 | ||
|
|
f777d886f5 | ||
|
|
ce51e61fb4 | ||
|
|
79f7442e0f | ||
|
|
10e00dd573 | ||
|
|
797483db7f | ||
|
|
9263119a35 | ||
|
|
d121ff949d | ||
|
|
a06c43399c | ||
|
|
6acc706e26 | ||
|
|
94d5941cc1 | ||
|
|
e05c7d817c | ||
|
|
7f8de5ab98 | ||
|
|
5921410376 | ||
|
|
c0452cc7c5 | ||
|
|
e8f3d2efca | ||
|
|
e6d2594fea | ||
|
|
24e40f463e | ||
|
|
66c9c759a3 | ||
|
|
4f90bf87af | ||
|
|
86961069ef | ||
|
|
32d1f9a117 | ||
|
|
2da1b23e0a | ||
|
|
10fc5ddab4 | ||
|
|
6589997f4f | ||
|
|
b335abd5ba | ||
|
|
22a7c3d601 | ||
|
|
dfaaa4bad2 | ||
|
|
6cf1b086b9 | ||
|
|
3d7f44bda6 | ||
|
|
4c1cb2b327 | ||
|
|
94e531fafc | ||
|
|
34482f2d45 | ||
|
|
ba756da969 | ||
|
|
dded997fe2 | ||
|
|
e4cba90584 | ||
|
|
1ad4bb39b8 | ||
|
|
d9e062c03e | ||
|
|
30be19ce1b | ||
|
|
5f619d4a4d | ||
|
|
c1e592568f | ||
|
|
ae7be26205 | ||
|
|
6ab515ca7f | ||
|
|
7908ea4a00 | ||
|
|
87a402cce6 | ||
|
|
da219becdc | ||
|
|
54d6fe8a30 | ||
|
|
8b674ce700 | ||
|
|
fd882abe71 | ||
|
|
cee0a5a21b | ||
|
|
08d859c5e1 | ||
|
|
96f470b00d | ||
|
|
98fd06a58d | ||
|
|
2d7662cef9 | ||
|
|
bb5b8a47d2 | ||
|
|
ba0b40f364 | ||
|
|
d71e96da19 | ||
|
|
91cff3e686 | ||
|
|
da5cfa80d9 | ||
|
|
739a0d94ed | ||
|
|
e4a59bd712 | ||
|
|
6ebab37627 | ||
|
|
2437c2b79e | ||
|
|
9c64f005d4 | ||
|
|
13ff94ac5d | ||
|
|
9e3413ee97 | ||
|
|
efd9998e42 | ||
|
|
6dce86ebc4 | ||
|
|
6a5e116ae0 | ||
|
|
1aba60c958 | ||
|
|
ccc74a719c | ||
|
|
1d46c49052 | ||
|
|
7fe093cf22 | ||
|
|
02d123c56a | ||
|
|
fc9d253d07 | ||
|
|
a57acf85d5 | ||
|
|
e1ef260c8d | ||
|
|
5cb8539ef7 | ||
|
|
c2832bdca3 | ||
|
|
341d176e43 | ||
|
|
094ac647d8 | ||
|
|
f2ac092d37 | ||
|
|
fae5f81fdd | ||
|
|
0c621e96a6 | ||
|
|
b845d916f0 | ||
|
|
521c6e6b50 | ||
|
|
c783454707 | ||
|
|
cc127b2513 | ||
|
|
fdc81b4580 | ||
|
|
8fe37f1355 | ||
|
|
7c7689c284 | ||
|
|
7149dc2118 | ||
|
|
aba4cf9326 | ||
|
|
28110a97bd | ||
|
|
42d0b2714f | ||
|
|
659a86e3a4 | ||
|
|
cbb3a98a03 | ||
|
|
0534cff8c3 | ||
|
|
1e6d3bd27a | ||
|
|
ea8bf3a792 | ||
|
|
4a4ca84e39 | ||
|
|
29c749a870 | ||
|
|
65c673e873 | ||
|
|
39a5127d8f | ||
|
|
14bf91f59b | ||
|
|
ece7a22aed | ||
|
|
5edf0a5a18 | ||
|
|
1c12fa294a | ||
|
|
03c19f4da7 | ||
|
|
a2dd176afa | ||
|
|
d6f2d66235 | ||
|
|
7c718843a3 | ||
|
|
73b7915762 | ||
|
|
e29237b197 | ||
|
|
60fb3522a9 | ||
|
|
24a1d8e195 | ||
|
|
d71b35062c | ||
|
|
78895cf47f | ||
|
|
8c44afebf9 | ||
|
|
e228d72cfb | ||
|
|
51719b3e8c | ||
|
|
24960a2c2a | ||
|
|
88e7487067 | ||
|
|
a8922e6e16 | ||
|
|
a7083a3b57 | ||
|
|
05b6cf6205 | ||
|
|
57ee4e4733 | ||
|
|
a5d280c81f | ||
|
|
9165fafc08 | ||
|
|
30c9dc3799 | ||
|
|
3a97a8e4ab | ||
|
|
ba8b830efb | ||
|
|
4ec99bd75c | ||
|
|
12ff105a3d | ||
|
|
428e88994d | ||
|
|
76351ec45e | ||
|
|
50b24a147b | ||
|
|
e00b5ee977 | ||
|
|
ddda860f42 | ||
|
|
18580ed527 | ||
|
|
1c2bf33db2 | ||
|
|
45cf0422f9 | ||
|
|
515e38030d | ||
|
|
470c3bd1b5 | ||
|
|
ee298f5287 | ||
|
|
a7fd723e43 | ||
|
|
7e6db54f77 | ||
|
|
88ead5d9e3 | ||
|
|
eeef67a335 | ||
|
|
f1dd523ba8 | ||
|
|
84ff4eab21 | ||
|
|
0e7f9ce4ca | ||
|
|
1714d7b627 | ||
|
|
95be4351d4 | ||
|
|
8e6710213e | ||
|
|
1fe160783a | ||
|
|
a84736ebcc | ||
|
|
f02e31a440 | ||
|
|
809ae5fedc | ||
|
|
8a58a000e3 | ||
|
|
bfc6ed7f6e | ||
|
|
3dbd4af7ae | ||
|
|
2d9fb9e7b8 | ||
|
|
f37901ffb0 | ||
|
|
e15dad041c | ||
|
|
580a370d19 | ||
|
|
7642ffdd5a | ||
|
|
d8443a1cbe | ||
|
|
0718402ff5 | ||
|
|
4281b031e6 | ||
|
|
d2ee9bd66e | ||
|
|
bf7d47e3bf | ||
|
|
4b519165aa | ||
|
|
ca1ab64827 | ||
|
|
c18cb04d88 | ||
|
|
3b7443c997 | ||
|
|
5fead08584 | ||
|
|
598cf7049c | ||
|
|
8a8349defe | ||
|
|
bc4b8e593c | ||
|
|
b67de1a1e3 | ||
|
|
370727ad41 | ||
|
|
48cc9e5374 | ||
|
|
510fab2c07 | ||
|
|
aea9725329 | ||
|
|
1bc60057f4 | ||
|
|
81649c99de | ||
|
|
d2cadcef11 | ||
|
|
ac4e1f5be0 | ||
|
|
5d545329ad | ||
|
|
9e8db31e71 | ||
|
|
f8d7b9e0b9 | ||
|
|
9c6f6f2a12 | ||
|
|
3e8f36e723 | ||
|
|
db476a1787 | ||
|
|
740e6c6534 | ||
|
|
f317336a65 | ||
|
|
49c7d75922 | ||
|
|
06e1ffdccb | ||
|
|
9398632bdb | ||
|
|
c762636c1a | ||
|
|
8e9b28f521 | ||
|
|
00c3e8774a | ||
|
|
cfd633b9fe | ||
|
|
79371ddf34 | ||
|
|
73ac0cc856 | ||
|
|
9718b44236 | ||
|
|
3d9a4eef55 | ||
|
|
6ef822dd72 | ||
|
|
20750eaf89 | ||
|
|
072d69f050 | ||
|
|
4754d939e5 | ||
|
|
9c5d643170 | ||
|
|
c811c295c2 | ||
|
|
20fe78b650 | ||
|
|
9d86b4d235 | ||
|
|
0a9f16dc90 | ||
|
|
53489fab27 | ||
|
|
92b00d50b5 | ||
|
|
2e0b486c59 | ||
|
|
9b7113a6cf | ||
|
|
8dc3fcd392 | ||
|
|
4deb3bbe61 | ||
|
|
eda8e4d50e | ||
|
|
84d4918aa2 | ||
|
|
c8d46c2c23 | ||
|
|
f8c0077b2f | ||
|
|
1437ff8717 | ||
|
|
93cbab2f2d | ||
|
|
dd055b5970 | ||
|
|
2c8cdb221b | ||
|
|
d34d6528fe | ||
|
|
1d525a2d2f | ||
|
|
3038fc95c6 | ||
|
|
10a30e2135 | ||
|
|
b46c4429b4 | ||
|
|
e51648f368 | ||
|
|
235dbdc3f0 | ||
|
|
c8f68f23d9 | ||
|
|
5cc0870756 | ||
|
|
a50a5f1bea | ||
|
|
95a47810d5 | ||
|
|
8cb0377a31 | ||
|
|
66ad6472ae | ||
|
|
0a37bf022c | ||
|
|
bed977e88e | ||
|
|
04246aac57 | ||
|
|
cd5682f5b9 | ||
|
|
bad748e3d0 | ||
|
|
176016c7db | ||
|
|
98a9219c23 | ||
|
|
697259b968 | ||
|
|
010f6fc951 | ||
|
|
e8bbd8ffdd | ||
|
|
cd6dd5c3cf | ||
|
|
f9a5f5e009 | ||
|
|
8b8d0ccb9a | ||
|
|
c21fec4119 | ||
|
|
0fa5500adf | ||
|
|
9f835d753e | ||
|
|
387470fc07 | ||
|
|
72a9541a6c | ||
|
|
b7cde4fd05 | ||
|
|
e89ed58cfa | ||
|
|
cd863bac0d | ||
|
|
e94f6057a4 | ||
|
|
e30ef51d71 | ||
|
|
acd7e3b2da | ||
|
|
83f1177a90 | ||
|
|
5e7e8fcc97 | ||
|
|
504c17b3b0 | ||
|
|
ca9d268797 | ||
|
|
967e760aa0 | ||
|
|
8bed43092c | ||
|
|
89e519a4ef | ||
|
|
44bafba5fe | ||
|
|
5acc7680a1 | ||
|
|
7408fa9ed9 | ||
|
|
fb12c14831 | ||
|
|
7bf8eb1eb9 | ||
|
|
1c1f5fd22f | ||
|
|
a5543e7396 | ||
|
|
d22040a4cd | ||
|
|
5b66b914fd | ||
|
|
bb41825c5b | ||
|
|
7802653d57 | ||
|
|
f1289c29b9 | ||
|
|
e540ba996f | ||
|
|
f0f38dfde8 | ||
|
|
3ff5734088 | ||
|
|
098d97bd64 | ||
|
|
f40d642800 | ||
|
|
9891148867 | ||
|
|
ed95bcd45a | ||
|
|
899a28c552 | ||
|
|
e101be357c | ||
|
|
da443a34b4 | ||
|
|
89da1e8daf | ||
|
|
0f1f77659c | ||
|
|
905ff191da | ||
|
|
c9e0ac1f9f | ||
|
|
a26ac2cad8 | ||
|
|
26d260a938 | ||
|
|
51b08ef9b3 | ||
|
|
45e863a853 | ||
|
|
d252c95851 | ||
|
|
8b7722cd74 | ||
|
|
ef6c86a47e | ||
|
|
46082dba1a | ||
|
|
308588eec5 | ||
|
|
7701382ce3 | ||
|
|
7a4385aefa | ||
|
|
697645c757 | ||
|
|
79ac49a4cc | ||
|
|
ef7399d356 | ||
|
|
17f5bc5b98 | ||
|
|
8c49afc8f0 | ||
|
|
1ef499823d | ||
|
|
5094b9b5ee | ||
|
|
37896f558c | ||
|
|
07281583bd | ||
|
|
a7108cbfc5 | ||
|
|
256eb1a6aa | ||
|
|
6e1d1b3a9b | ||
|
|
f523654c21 | ||
|
|
a0b9796b9f | ||
|
|
2d2730faf8 | ||
|
|
83a7c4beda | ||
|
|
09cb3da751 | ||
|
|
a1507f6e90 | ||
|
|
ae7606fe6c | ||
|
|
05b36c091c | ||
|
|
90dc74e1b9 | ||
|
|
3e3444472e | ||
|
|
503586a51c | ||
|
|
a327489b0f | ||
|
|
f99295be02 | ||
|
|
564c903844 | ||
|
|
1ea536d294 | ||
|
|
e5d9e1a4f8 | ||
|
|
70723e80ce | ||
|
|
55ba81e3d4 | ||
|
|
62057eadd5 | ||
|
|
b14e837e87 | ||
|
|
868a4b8348 | ||
|
|
e3a31d2bbd | ||
|
|
0a50aad915 | ||
|
|
43c4798b50 | ||
|
|
d956cd691a | ||
|
|
51f5bc0aae | ||
|
|
03c98cd7b0 | ||
|
|
175fceb89e | ||
|
|
80c4abef7b | ||
|
|
88f949d66f | ||
|
|
19da89a193 | ||
|
|
8cab555838 | ||
|
|
72a8d326e3 | ||
|
|
710c814a3d | ||
|
|
f12a95f6cd | ||
|
|
980226f337 | ||
|
|
8a22af8929 | ||
|
|
a9507bbe7a | ||
|
|
7b06c4f724 | ||
|
|
dcf11b2f29 | ||
|
|
8089f329af | ||
|
|
20ec00a07e | ||
|
|
e7ff20c013 | ||
|
|
44e6abfbc3 | ||
|
|
9d174c2b84 | ||
|
|
f85669d99e | ||
|
|
7bf0cd4cf8 | ||
|
|
024b17cd07 | ||
|
|
dccbd0645a | ||
|
|
cbd80b1dff | ||
|
|
e97f001647 | ||
|
|
288cb01d1e | ||
|
|
58e50eade3 | ||
|
|
b5bfaf2468 | ||
|
|
60b928fe4c | ||
|
|
c2f5f25ee6 | ||
|
|
e16a88ee6c | ||
|
|
7f90bbf2fc | ||
|
|
6e6d2b85d4 | ||
|
|
fd99818ccd | ||
|
|
8c43f76d41 | ||
|
|
77b9fb7dae | ||
|
|
e390eafb22 | ||
|
|
f65a021bf0 | ||
|
|
0d12b95241 | ||
|
|
fbf2030820 | ||
|
|
d131ad342c | ||
|
|
793e0ddfa6 | ||
|
|
bee394f465 | ||
|
|
bf58975c4e | ||
|
|
3616dee7a0 | ||
|
|
76af57e5d9 | ||
|
|
f93f4ab75e | ||
|
|
ad19522db0 | ||
|
|
b26694a0f9 | ||
|
|
36ab405269 | ||
|
|
4620397dbe | ||
|
|
a42c526b18 | ||
|
|
14c7fe0b61 | ||
|
|
e6cfd63ecd | ||
|
|
b625ec36f2 | ||
|
|
9f8b577206 | ||
|
|
00e9dff047 | ||
|
|
4defecb1ea | ||
|
|
ea22d2debd | ||
|
|
4d9f67b93b | ||
|
|
aae6ac4f69 | ||
|
|
f3765eca39 | ||
|
|
9350c687e0 | ||
|
|
af7e73eb27 | ||
|
|
48341a9b4f | ||
|
|
7781717e37 | ||
|
|
6f7c21121a | ||
|
|
ac7bb087e4 | ||
|
|
ce59727cb2 | ||
|
|
f2da7b5e8c | ||
|
|
d8dc0ea467 | ||
|
|
1f39a87a62 | ||
|
|
b11f050cfd | ||
|
|
ff039d5fe4 | ||
|
|
9f836984f1 | ||
|
|
56fd51cd53 | ||
|
|
282c7b3195 | ||
|
|
0eeb0f5772 | ||
|
|
d9cc1dae70 | ||
|
|
ece8fcc91b | ||
|
|
4d01f061fb | ||
|
|
8318f44a43 | ||
|
|
75f5e42208 | ||
|
|
85da04fb94 | ||
|
|
5c79be3ac4 | ||
|
|
92e0697af3 | ||
|
|
ac1091da41 | ||
|
|
a78c0a9dbb | ||
|
|
728f1ee8b2 | ||
|
|
792e69edc6 | ||
|
|
27c4c1ae43 | ||
|
|
6a410fc890 | ||
|
|
155efb6dce | ||
|
|
fa1e491340 | ||
|
|
35ecf979a3 | ||
|
|
f32fefb57a | ||
|
|
ea9a7e808c | ||
|
|
42b2ce754a | ||
|
|
ece3569549 | ||
|
|
73d45929ea | ||
|
|
a2fc77de24 | ||
|
|
310f6de15a | ||
|
|
22d21b77a7 | ||
|
|
1039a2a78c | ||
|
|
c5525de5f0 | ||
|
|
d5b5777bed | ||
|
|
c5be925d70 | ||
|
|
3336e5a993 | ||
|
|
f1b9ac5b74 | ||
|
|
71417ea192 | ||
|
|
72a603ebfb | ||
|
|
b02e5c6dbb | ||
|
|
292903d050 | ||
|
|
14f80f197a | ||
|
|
301391b751 | ||
|
|
9366c54ad3 | ||
|
|
36272958ae | ||
|
|
51aaccc7b6 | ||
|
|
5aecb93b5e | ||
|
|
110ad3d6dc | ||
|
|
eb335668c7 | ||
|
|
5edbfcd631 | ||
|
|
34f48c3c25 | ||
|
|
1a908f2143 | ||
|
|
d5b78cd8c4 | ||
|
|
d00809040a | ||
|
|
83e3a4f792 | ||
|
|
872a3be669 | ||
|
|
6d53cf16f8 | ||
|
|
c9d3a45626 | ||
|
|
939d481396 | ||
|
|
569ede41a0 | ||
|
|
2b4e4637e6 | ||
|
|
511f78097c | ||
|
|
db08174fd1 | ||
|
|
01dd0e2432 | ||
|
|
4ed81251c5 | ||
|
|
0cb7085706 | ||
|
|
5cb460ee1d | ||
|
|
dcabdc3f8c | ||
|
|
9c82b4a1fa | ||
|
|
6c1953558c | ||
|
|
b3819957e5 | ||
|
|
74a916cc26 | ||
|
|
e9e9a2b097 | ||
|
|
c1a84aca31 | ||
|
|
622fbd4f12 | ||
|
|
82d723bfe2 | ||
|
|
4efed15025 | ||
|
|
457295440e | ||
|
|
81330e61e0 | ||
|
|
0c8610cf4d | ||
|
|
586dfe6b76 | ||
|
|
35af20e342 | ||
|
|
d56e6f97a7 | ||
|
|
7e571bb76b | ||
|
|
de1643f260 | ||
|
|
36e4dd081b | ||
|
|
e2c56236da | ||
|
|
32394a0091 | ||
|
|
3a2177dcd5 | ||
|
|
b66a21a9d1 | ||
|
|
f5b6222835 | ||
|
|
557b87f774 | ||
|
|
bf3e1c0c31 | ||
|
|
b20c56ff3e | ||
|
|
a507cab6d3 | ||
|
|
35fc070473 | ||
|
|
1813c24330 | ||
|
|
76bdaf1131 | ||
|
|
fcc56cc8a2 | ||
|
|
1a9838082e | ||
|
|
d60027e12b | ||
|
|
bd27263ec7 | ||
|
|
27eafd8a53 | ||
|
|
96da1139c0 | ||
|
|
668570bc61 | ||
|
|
d3ec3d899d | ||
|
|
d1479872f2 | ||
|
|
e8e4741bb0 | ||
|
|
33db034d49 | ||
|
|
6a85e88e94 | ||
|
|
8b7ad2e58f | ||
|
|
696a9a4128 | ||
|
|
54bb49caeb | ||
|
|
9c0afe3a7d | ||
|
|
6dd334f9f0 | ||
|
|
96dd8fcf48 | ||
|
|
9b960dd02a | ||
|
|
6b7d5fd58c | ||
|
|
ebcdeb7d80 | ||
|
|
67870df19e | ||
|
|
afd19dbefd | ||
|
|
a55097289b | ||
|
|
8de39b80cd | ||
|
|
0f038754e5 | ||
|
|
4aa278e4a0 | ||
|
|
e3562ecc99 | ||
|
|
b62d47da9c | ||
|
|
715e8d345a | ||
|
|
e748f39e20 | ||
|
|
428ade4fd8 | ||
|
|
e28ff71e97 | ||
|
|
f826eb992e | ||
|
|
ba3f14c83a | ||
|
|
82a3601748 | ||
|
|
eeab5252e6 | ||
|
|
838bbedd1a | ||
|
|
0e4ad056dd | ||
|
|
89163e73d0 | ||
|
|
665ebc5d47 | ||
|
|
32b1c35305 | ||
|
|
55c7be5fe9 | ||
|
|
5017e2e385 | ||
|
|
492c217125 | ||
|
|
269c9580fb | ||
|
|
5f691bb788 | ||
|
|
bcdd2242ef | ||
|
|
faee138574 | ||
|
|
fb69e212ba | ||
|
|
d8cc648a18 | ||
|
|
15d2b6217d | ||
|
|
b92f4a73b4 | ||
|
|
5f0e3bcd37 | ||
|
|
e6f336ae8b | ||
|
|
7c0f78edf1 | ||
|
|
a2ba1bd211 | ||
|
|
c95adeb8f2 | ||
|
|
c30306f779 | ||
|
|
ad8ac1f3bc | ||
|
|
63719b57ed | ||
|
|
0f775c6d66 | ||
|
|
523d80cafd | ||
|
|
ca48245ee3 | ||
|
|
fd6991529e | ||
|
|
3f5ee10c34 |
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
* -text
|
||||
1513
.github/workflows/submit.yml
vendored
Normal file
1513
.github/workflows/submit.yml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
.gitignore
vendored
1
.gitignore
vendored
@@ -24,3 +24,4 @@ test/nashorn/lib
|
||||
NashornProfile.txt
|
||||
**/JTreport/**
|
||||
**/JTwork/**
|
||||
/jb/project/java-gradle/.idea/workspace.xml
|
||||
|
||||
43
.hgtags
43
.hgtags
@@ -598,3 +598,46 @@ e42c6d1a1993c720a4643140190bb1ba6f1bbf9f jdk-11.0.8+6
|
||||
59f8565ee5e224697a9e09ee2c557836733bc579 jdk-11.0.8+9
|
||||
0b0d55cb09b29360ab254edeef32a3b386e9713e jdk-11.0.8+10
|
||||
0b0d55cb09b29360ab254edeef32a3b386e9713e jdk-11.0.8-ga
|
||||
5cc275af8419178813299cc0ed81a2a85dadfdcd jdk-11.0.9+1
|
||||
3112657edde9491fb83f098f1a8b7e9275bcb2f7 jdk-11.0.9+2
|
||||
d8a0513b92ee262d4e64c1e13d43e1b3f3e5c5d5 jdk-11.0.9+3
|
||||
cb299db4a5698b814f6b3ba1f3d73d01f6a0e1f6 jdk-11.0.9+4
|
||||
55237fa85afb404bc0dc0f4948a6459d8d3e5dac jdk-11.0.9+5
|
||||
c07e785e36f587b95e151de382844cea3d1a5868 jdk-11.0.9+6
|
||||
1ba4c16a8afa3f5aaa7830fc1f14a0137cc2553b jdk-11.0.9+7
|
||||
8711e8554e15ae2fa38718d5c7dc858da10e8a4a jdk-11.0.9+8
|
||||
e872676174c7f171a9864becba83cb783cfec9d0 jdk-11.0.9+9
|
||||
6ac1b68e7c0034e08a96d7d37e93e5075a6e8d61 jdk-11.0.9+10
|
||||
4397fa4529b2794ddcdf3445c0611fe383243fb4 jdk-11.0.9+11
|
||||
4397fa4529b2794ddcdf3445c0611fe383243fb4 jdk-11.0.9-ga
|
||||
4fd46d208f0a4b55924af8e0c2fb6bcf46e18ec6 jdk-11.0.9.1+0
|
||||
27723943c0dd65a191cbefe031cec001521e4b13 jdk-11.0.9.1+1
|
||||
31affc22b3b5f5d43783ffadf57f22848bad9db8 jdk-11.0.9.1-ga
|
||||
f3168de4eb0dd74bf8e81537f62742bde5e412c3 jdk-11.0.10+1
|
||||
a35aa07b57bab3690224e3af939ee085d50eb476 jdk-11.0.10+2
|
||||
bca12c00a776f8cee7a0eeaf788499b9eab9cf9d jdk-11.0.10+3
|
||||
9504fa6f98f5aad0aa1ac36d5bff3260a32020c8 jdk-11.0.10+4
|
||||
5f5c3544ccb4d0bbc638e665524b292860dd9515 jdk-11.0.10+5
|
||||
4b9bc2a1dde0631958393125997855382325964d jdk-11.0.10+6
|
||||
c45f74d45787a857d35b5a66c9b0304c91a9c5d0 jdk-11.0.10+7
|
||||
43428f69099f6f87f6e1922deacbf13e1adb751f jdk-11.0.10+8
|
||||
8b3498547395ee80a6e731078056b2aeb3e3c5e8 jdk-11.0.10+9
|
||||
8b3498547395ee80a6e731078056b2aeb3e3c5e8 jdk-11.0.10-ga
|
||||
4ed322bf6b0098353ceaecf35662fadf457cd81d jdk-11.0.11+1
|
||||
b68647c6ecc1e73111d8047448d75966f255460f jdk-11.0.11+2
|
||||
14cc036b17a5f4be5b0643e6b24ed32563684ab9 jdk-11.0.11+3
|
||||
c4405735470a92e2c45490b89a8099252f3481d2 jdk-11.0.11+4
|
||||
38430a8a4488582612c6a87ab58d109cc5217e8b jdk-11.0.11+5
|
||||
e41ae00add1d76a8f25adb558933382947ea840d jdk-11.0.11+6
|
||||
14f9928caac31368d27f13e4e21ca25c1e0be950 jdk-11.0.11+7
|
||||
9f0347b029d3a0349f23befcfb68ee02d85d9034 jdk-11.0.11+8
|
||||
15862747ee15445292b4b9949b4f0f4badba4812 jdk-11.0.11+9
|
||||
15862747ee15445292b4b9949b4f0f4badba4812 jdk-11.0.11-ga
|
||||
5720ffa08f8514b9f0ea8b3a49e05a872c9c0efe jdk-11.0.12+1
|
||||
70a4031a8bef3e693f34864fdd482429c73dc76a jdk-11.0.12+2
|
||||
873a691b1ae4fa8b55ca5d08fa21aca3a4904fb8 jdk-11.0.12+3
|
||||
40d1e784e1937aaea696a9654cc2d944d3d78996 jdk-11.0.12+4
|
||||
6aa6f6860508fca3a97aea1de7a36574498d22bf jdk-11.0.12+5
|
||||
91e81ac088545abdc3eaaa707853d31a6cf99af3 jdk-11.0.12+6
|
||||
f412f2537f1502a9697a9684c77bea8d848db1ab jdk-11.0.12+7
|
||||
f412f2537f1502a9697a9684c77bea8d848db1ab jdk-11.0.12-ga
|
||||
|
||||
6
.idea/copyright/JetBrains.xml
generated
6
.idea/copyright/JetBrains.xml
generated
@@ -1,9 +1,7 @@
|
||||
<component name="CopyrightManager">
|
||||
<copyright>
|
||||
<option name="notice" value="Copyright 2000-&#36;today.year JetBrains s.r.o. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License." />
|
||||
<option name="keyword" value="Copyright" />
|
||||
<option name="allowReplaceKeyword" value="JetBrains" />
|
||||
<option name="allowReplaceRegexp" value="JetBrains" />
|
||||
<option name="notice" value="Copyright 2000-&#36;today.year JetBrains s.r.o. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. This code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 only, as published by the Free Software Foundation. This code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version 2 for more details (a copy is included in the LICENSE file that accompanied this code). You should have received a copy of the GNU General Public License version 2 along with this work; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or visit www.oracle.com if you need additional information or have any questions." />
|
||||
<option name="myName" value="JetBrains" />
|
||||
<option name="myLocal" value="true" />
|
||||
</copyright>
|
||||
</component>
|
||||
14
.idea/vcs.xml
generated
14
.idea/vcs.xml
generated
@@ -1,5 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="IssueNavigationConfiguration">
|
||||
<option name="links">
|
||||
<list>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="[A-Z]+\-\d+" />
|
||||
<option name="linkRegexp" value="http://youtrack.jetbrains.com/issue/$0" />
|
||||
</IssueNavigationLink>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="^(\d+)\:" />
|
||||
<option name="linkRegexp" value="https://bugs.openjdk.java.net/browse/JDK-$1" />
|
||||
</IssueNavigationLink>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
|
||||
33
.jcheck/conf
33
.jcheck/conf
@@ -1,2 +1,31 @@
|
||||
project=jdk10
|
||||
bugids=dup
|
||||
[general]
|
||||
project=jdk-updates
|
||||
jbs=JDK
|
||||
version=11.0.13
|
||||
|
||||
[checks]
|
||||
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace
|
||||
|
||||
[repository]
|
||||
tags=(?:jdk-(?:[1-9]([0-9]*)(?:\.(?:0|[1-9][0-9]*)){0,4})(?:\+(?:(?:[0-9]+))|(?:-ga)))|(?:jdk[4-9](?:u\d{1,3})?-(?:(?:b\d{2,3})|(?:ga)))|(?:hs\d\d(?:\.\d{1,2})?-b\d\d)
|
||||
branches=
|
||||
|
||||
[census]
|
||||
version=0
|
||||
domain=openjdk.org
|
||||
|
||||
[checks "whitespace"]
|
||||
files=.*\.cpp|.*\.hpp|.*\.c|.*\.h|.*\.java
|
||||
|
||||
[checks "merge"]
|
||||
message=Merge
|
||||
|
||||
[checks "reviewers"]
|
||||
reviewers=1
|
||||
ignore=duke
|
||||
|
||||
[checks "committer"]
|
||||
role=committer
|
||||
|
||||
[checks "issues"]
|
||||
pattern=^([124-8][0-9]{6}): (\S.*)$
|
||||
|
||||
177
README.md
177
README.md
@@ -1,94 +1,171 @@
|
||||
[](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
|
||||
|
||||
# Downloads
|
||||
# Welcome to JetBrains Runtime!
|
||||
|
||||
|Windows-x64 |macOS |Linux-x64 |
|
||||
|-------------|-------------|-------------|
|
||||
|[  ](https://bintray.com/jetbrains/intellij-jdk/openjdk11-windows-x64/_latestVersion)|[  ](https://bintray.com/jetbrains/intellij-jdk/openjdk11-osx-x64/_latestVersion)|[  ](https://bintray.com/jetbrains/intellij-jdk/openjdk11-linux-x64/_latestVersion)|
|
||||
JetBrains Runtime is a fork of [OpenJDK](https://github.com/openjdk/jdk) available for Windows, Mac OS X, and Linux.
|
||||
It includes a number enhancements in font rendering, HiDPI support, ligatures, performance improvements, and bugfixes.
|
||||
|
||||
## Releases
|
||||
Download the latest releases of JetBrains Runtime to use with JetBrains IDEs. The full list
|
||||
can be found on the [releases page](https://github.com/JetBrains/JetBrainsRuntime/releases).
|
||||
|
||||
# How JetBrains Runtime is organised
|
||||
## Workspaces
|
||||
| IDE Version | Latest JBR | Date Released |
|
||||
| --- | --- | --- |
|
||||
| 2021.3 | [11_0_12-b1751.11](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr11_0_12b1751.11) | 21-Oct-2021 |
|
||||
| 2021.2 | [11_0_12-b1504.40](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jb11_0_12-b1504.40) | 28-Sep-2021 |
|
||||
| 2021.1 | [11.0.11+9-b1341.60](https://confluence.jetbrains.com/pages/viewpage.action?pageId=218857477) | 15-Jun-2021 |
|
||||
| 2020.3 | [11_0_11-b1145.115](https://confluence.jetbrains.com/pages/viewpage.action?pageId=219349001) | 21-Jun-2021 |
|
||||
|
||||
[github.com/JetBrains/JetBrainsRuntime](https://github.com/JetBrains/JetBrainsRuntime)
|
||||
## Contents
|
||||
- [Welcome to JetBrains Runtime](#jetbrains-runtime)
|
||||
- [Products Built on JetBrains Runtime](#products-built-on-jetbrains-runtime)
|
||||
- [Getting Sources](#getting-sources)
|
||||
- [macOS, Linux](#macos-linux)
|
||||
- [Windows](#sources-windows)
|
||||
- [Configuring the Build Environment](#configuring-the-build-environment)
|
||||
- [Linux (Docker)](#linux-docker)
|
||||
- [Ubuntu Linux](#ubuntu-linux)
|
||||
- [Windows](#build-windows)
|
||||
- [macOS](#macos)
|
||||
- [Developing](#developing)
|
||||
- [Contributing](#contributing)
|
||||
- [Resources](#resources)
|
||||
|
||||
## Getting sources
|
||||
__OSX, Linux:__
|
||||
## Products Built on JetBrains Runtime
|
||||
* [Android Studio](https://developer.android.com/studio). The official IDE for Google's Android operating system.
|
||||
* [CLion](https://www.jetbrains.com/clion/). A cross-platform IDE for C and C++ from JetBrains.
|
||||
* [DataGrip](https://www.jetbrains.com/datagrip/). The IDE for Databases and SQL from JetBrains.
|
||||
* [GoLand](https://www.jetbrains.com/go/). The cross-platform Go IDE from JetBrains.
|
||||
* [IntelliJ IDEA](https://www.jetbrains.com/idea/). The IDE for JVM from JetBrains.
|
||||
* [JProfiler](https://www.ej-technologies.com/products/jprofiler/overview.html). The Java profiler.
|
||||
* [PhpStorm](https://www.jetbrains.com/phpstorm/). The PHP IDE from JetBrains.
|
||||
* [PyCharm](https://www.jetbrains.com/pycharm/). The Python IDE from JetBrains.
|
||||
* [Rider](https://www.jetbrains.com/rider/). The cross-platform .NET IDE from JetBrains.
|
||||
* [RubyMine](https://www.jetbrains.com/ruby/). The Ruby and Rails IDE from JetBrains.
|
||||
* [WebStorm](https://www.jetbrains.com/webstorm/). The JavaScript IDE from JetBrains.
|
||||
* [YourKit](https://www.yourkit.com/). Java and .NET profilers.
|
||||
|
||||
## Getting Sources
|
||||
### macOS, Linux
|
||||
```
|
||||
git config --global core.autocrlf input
|
||||
git clone git@github.com:JetBrains/JetBrainsRuntime.git
|
||||
```
|
||||
|
||||
__Windows:__
|
||||
### Windows
|
||||
<a name="sources-windows"></a>
|
||||
```
|
||||
git config --global core.autocrlf false
|
||||
git clone git@github.com:JetBrains/JetBrainsRuntime.git
|
||||
```
|
||||
|
||||
# Configure Local Build Environment
|
||||
[OpenJDK build docs](http://hg.openjdk.java.net/jdk/jdk11/raw-file/tip/doc/building.html)
|
||||
Tip for all platforms: run ./configure and check output.
|
||||
Usually, it has meaningful advice how to solve your problem.
|
||||
## Configuring the Build Environment
|
||||
Here are quick per-platform instructions for those who can't wait to get started.
|
||||
Please refer to [OpenJDK build docs](http://hg.openjdk.java.net/jdk/jdk11/raw-file/tip/doc/building.html) for in-depth
|
||||
coverage of all the details.
|
||||
|
||||
## Linux (docker)
|
||||
> **_TIP:_** To get a preliminary report of what's missing, run `./configure` and check its output.
|
||||
> It would usually have a meaningful advice on how to solve the problem.
|
||||
|
||||
### Linux (Docker)
|
||||
Create a container:
|
||||
```
|
||||
$ cd jb/project/docker
|
||||
$ docker build .
|
||||
...
|
||||
Successfully built 942ea9900054
|
||||
|
||||
```
|
||||
Run these commands in the new container:
|
||||
```
|
||||
$ docker run -v `pwd`../../../../:/JetBrainsRuntime -it 942ea9900054
|
||||
|
||||
# cd /JetBrainsRuntime
|
||||
# sh ./configure
|
||||
# make images CONF=linux-x86_64-normal-server-release
|
||||
|
||||
```
|
||||
|
||||
## Linux (Ubuntu 18.10 desktop)
|
||||
### Ubuntu Linux
|
||||
Install the necessary tools, libraries, and headers with:
|
||||
```
|
||||
$ sudo apt-get install autoconf make build-essential libx11-dev libxext-dev libxrender-dev libxtst-dev \
|
||||
libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev \
|
||||
openjdk-11-jdk
|
||||
```
|
||||
Then run the following:
|
||||
```
|
||||
$ sudo apt-get install autoconf make build-essential libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev
|
||||
|
||||
$ cd JetBrainsRuntime
|
||||
$ sh ./configure --disable-warnings-as-errors
|
||||
$ make images
|
||||
```
|
||||
|
||||
## Windows
|
||||
Install:
|
||||
### Windows
|
||||
<a name="build-windows"></a>
|
||||
Install the following:
|
||||
* [Cygwin x64](http://www.cygwin.com/).
|
||||
Required packages: `autoconf`, `binutils`, `cpio`, `diffutils`, `file`, `gawk`, `gcc-core`, `make`, `m4`, `unzip`, `zip`.
|
||||
Install those together with Cygwin.
|
||||
* [Visual Studio compiler toolset](https://visualstudio.microsoft.com/downloads/).
|
||||
Install with the desktop development kit, which includes Windows SDK and compilers.
|
||||
Visual Studio 2015 is supported by default.
|
||||
* [Java 11](https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html).
|
||||
If you have problems while configuring, read [Java tips on Cygwin](http://horstmann.com/articles/cygwin-tips.html).
|
||||
|
||||
* [Cygwin x64](http://www.cygwin.com/)
|
||||
Required packages: autoconf, binutils, cpio, diffutils, file, gawk, gcc-core, make, m4, unzip, zip.
|
||||
**Install them while installing cygwin**.
|
||||
* Visual Studio compiler toolset [Download](https://visualstudio.microsoft.com/downloads/)
|
||||
Visual Studio 2015 has support by default.
|
||||
**Install with desktop development kit, it includes Windows SDK and compilers**.
|
||||
* [Java 11](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
|
||||
If you have problems while configuring [read java tips on cygwin](http://horstmann.com/articles/cygwin-tips.html)
|
||||
From the command line:
|
||||
```
|
||||
"c:\Program Files (x86)\Microsoft Visual Studio 15.0\VC\vcvarsall.bat" amd64
|
||||
c:\cygwin64\bin\mintty.exe /usr/bin/bash -l
|
||||
```
|
||||
The first command sets up environment variables, the second starts a Cygwin shell with the proper environment.
|
||||
|
||||
From command line
|
||||
In the Cygwin shell:
|
||||
```
|
||||
"c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
|
||||
"c:\Program_Files\cygwin64\bin\mintty.exe" /bin/bash -l
|
||||
```
|
||||
First command will set env vars, the second will run cygwin shell with proper environment.
|
||||
In cygwin shell
|
||||
```
|
||||
cd JetBrainsRuntime
|
||||
bash configure --enable-option-checking=fatal --with-toolchain-version=2015 --with-boot-jdk="/cygdrive/c/Program Files/Java/jdk-11.0.5" --disable-warnings-as-errors
|
||||
make images
|
||||
$ cd JetBrainsRuntime
|
||||
$ bash configure --enable-option-checking=fatal --with-toolchain-version=2015 \
|
||||
--with-boot-jdk="/cygdrive/c/Program Files/Java/jdk-11.0.5" --disable-warnings-as-errors
|
||||
$ make images
|
||||
```
|
||||
|
||||
## OSX
|
||||
|
||||
install Xcode console tools, autoconf (via homebrew)
|
||||
|
||||
run
|
||||
### macOS
|
||||
Install the following:
|
||||
* Xcode command line developer tools and `autoconf` via [Homebrew](getDpiInfo).
|
||||
* [Java 11](https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html).
|
||||
|
||||
From the command line:
|
||||
```
|
||||
sh ./configure --prefix=$(pwd)/build --disable-warnings-as-errors
|
||||
make images
|
||||
$ cd JetBrainsRuntime
|
||||
$ sh ./configure --prefix=$(pwd)/build --disable-warnings-as-errors
|
||||
$ make images
|
||||
```
|
||||
|
||||
## Contribution
|
||||
We will be happy to receive your pull requests. Before you submit one, please sign our Contributor License Agreement (CLA) https://www.jetbrains.com/agreements/cla/
|
||||
## Developing
|
||||
You can use [CLion](https://www.jetbrains.com/clion/) to develop native parts of the JetBrains Runtime and
|
||||
[IntelliJ IDEA](https://www.jetbrains.com/idea/) for the parts written in Java.
|
||||
Both require projects to be created.
|
||||
|
||||
### CLion
|
||||
Run
|
||||
```
|
||||
$ make compile-commands
|
||||
```
|
||||
in the git root and open the resulting `build/.../compile_commands.json` file as a project.
|
||||
Then use `Tools | Compilation Database | Change Project Root` to point to git root of this repository.
|
||||
|
||||
See also this detailed step-by-step tutorial for all platforms:
|
||||
[How to develop OpenJDK with CLion](https://blog.jetbrains.com/clion/2020/03/openjdk-with-clion/).
|
||||
|
||||
### IDEA
|
||||
Run
|
||||
```
|
||||
$ sh ./bin/idea.sh
|
||||
```
|
||||
in the git root to generate project files (add `--help` for options). Then open the git root directory
|
||||
as a project in IDEA.
|
||||
|
||||
## Contributing
|
||||
We are happy to receive your pull requests!
|
||||
Before you submit one, please sign our [Contributor License Agreement (CLA)](https://www.jetbrains.com/agreements/cla/).
|
||||
|
||||
## Resources
|
||||
* [JetBrains Runtime on github](https://github.com/JetBrains/JetBrainsRuntime).
|
||||
* [OpenJDK build instructions](http://hg.openjdk.java.net/jdk/jdk11/raw-file/tip/doc/building.html).
|
||||
* [OpenJDK test instructions](http://hg.openjdk.java.net/jdk/jdk11/raw-file/tip/doc/building.html#running-tests).
|
||||
* [How to develop OpenJDK with CLion](https://blog.jetbrains.com/clion/2020/03/openjdk-with-clion/).
|
||||
|
||||
@@ -68,10 +68,12 @@
|
||||
</ul></li>
|
||||
<li><a href="#running-tests">Running Tests</a></li>
|
||||
<li><a href="#cross-compiling">Cross-compiling</a><ul>
|
||||
<li><a href="#cross-compiling-the-easy-way-with-openjdk-devkits">Cross compiling the easy way with OpenJDK devkits</a></li>
|
||||
<li><a href="#boot-jdk-and-build-jdk">Boot JDK and Build JDK</a></li>
|
||||
<li><a href="#specifying-the-target-platform">Specifying the Target Platform</a></li>
|
||||
<li><a href="#toolchain-considerations">Toolchain Considerations</a></li>
|
||||
<li><a href="#native-libraries">Native Libraries</a></li>
|
||||
<li><a href="#creating-and-using-sysroots-with-qemu-deboostrap">Creating And Using Sysroots With qemu-deboostrap</a></li>
|
||||
<li><a href="#building-for-armaarch64">Building for ARM/aarch64</a></li>
|
||||
<li><a href="#verifying-the-build">Verifying the Build</a></li>
|
||||
</ul></li>
|
||||
@@ -91,12 +93,10 @@
|
||||
<li><a href="#getting-help">Getting Help</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#hints-and-suggestions-for-advanced-users">Hints and Suggestions for Advanced Users</a><ul>
|
||||
<li><a href="#setting-up-a-forest-for-pushing-changes-defpath">Setting Up a Forest for Pushing Changes (defpath)</a></li>
|
||||
<li><a href="#bash-completion">Bash Completion</a></li>
|
||||
<li><a href="#using-multiple-configurations">Using Multiple Configurations</a></li>
|
||||
<li><a href="#handling-reconfigurations">Handling Reconfigurations</a></li>
|
||||
<li><a href="#using-fine-grained-make-targets">Using Fine-Grained Make Targets</a></li>
|
||||
<li><a href="#learn-about-mercurial">Learn About Mercurial</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#understanding-the-build-system">Understanding the Build System</a><ul>
|
||||
<li><a href="#configurations">Configurations</a></li>
|
||||
@@ -110,10 +110,10 @@
|
||||
</ul>
|
||||
</nav>
|
||||
<h2 id="tldr-instructions-for-the-impatient">TL;DR (Instructions for the Impatient)</h2>
|
||||
<p>If you are eager to try out building the JDK, these simple steps works most of the time. They assume that you have installed Mercurial (and Cygwin if running on Windows) and cloned the top-level JDK repository that you want to build.</p>
|
||||
<p>If you are eager to try out building the JDK, these simple steps works most of the time. They assume that you have installed Git (and Cygwin if running on Windows) and cloned the top-level JDK repository that you want to build.</p>
|
||||
<ol type="1">
|
||||
<li><p><a href="#getting-the-source-code">Get the complete source code</a>:<br />
|
||||
<code>hg clone http://hg.openjdk.java.net/jdk/jdk</code></p></li>
|
||||
<code>git clone https://git.openjdk.java.net/jdk/</code></p></li>
|
||||
<li><p><a href="#running-configure">Run configure</a>:<br />
|
||||
<code>bash configure</code></p>
|
||||
<p>If <code>configure</code> fails due to missing dependencies (to either the <a href="#native-compiler-toolchain-requirements">toolchain</a>, <a href="#build-tools-requirements">build tools</a>, <a href="#external-library-requirements">external libraries</a> or the <a href="#boot-jdk-requirements">boot JDK</a>), most of the time it prints a suggestion on how to resolve the situation on your platform. Follow the instructions, and try running <code>bash configure</code> again.</p></li>
|
||||
@@ -129,8 +129,8 @@
|
||||
<p>The JDK is a complex software project. Building it requires a certain amount of technical expertise, a fair number of dependencies on external software, and reasonably powerful hardware.</p>
|
||||
<p>If you just want to use the JDK and not build it yourself, this document is not for you. See for instance <a href="http://openjdk.java.net/install">OpenJDK installation</a> for some methods of installing a prebuilt JDK.</p>
|
||||
<h2 id="getting-the-source-code">Getting the Source Code</h2>
|
||||
<p>Make sure you are getting the correct version. As of JDK 10, the source is no longer split into separate repositories so you only need to clone one single repository. At the <a href="http://hg.openjdk.java.net/">OpenJDK Mercurial server</a> you can see a list of all available forests. If you want to build an older version, e.g. JDK 8, it is recommended that you get the <code>jdk8u</code> forest, which contains incremental updates, instead of the <code>jdk8</code> forest, which was frozen at JDK 8 GA.</p>
|
||||
<p>If you are new to Mercurial, a good place to start is the <a href="http://www.mercurial-scm.org/guide">Mercurial Beginner's Guide</a>. The rest of this document assumes a working knowledge of Mercurial.</p>
|
||||
<p>Make sure you are getting the correct version. As of JDK 10, the source is no longer split into separate repositories so you only need to clone one single repository. At the <a href="https://git.openjdk.java.net/">OpenJDK Git site</a> you can see a list of all available repositories. If you want to build an older version, e.g. JDK 8, it is recommended that you get the <code>jdk8u</code> forest, which contains incremental updates, instead of the <code>jdk8</code> forest, which was frozen at JDK 8 GA.</p>
|
||||
<p>If you are new to Git, a good place to start is the book <a href="https://git-scm.com/book/en/v2">Pro Git</a>. The rest of this document assumes a working knowledge of Git.</p>
|
||||
<h3 id="special-considerations">Special Considerations</h3>
|
||||
<p>For a smooth building experience, it is recommended that you follow these rules on where and how to check out the source code.</p>
|
||||
<ul>
|
||||
@@ -141,7 +141,11 @@
|
||||
<ul>
|
||||
<li><p>Create the directory that is going to contain the top directory of the JDK clone by using the <code>mkdir</code> command in the Cygwin bash shell. That is, do <em>not</em> create it using Windows Explorer. This will ensure that it will have proper Cygwin attributes, and that it's children will inherit those attributes.</p></li>
|
||||
<li><p>Do not put the JDK clone in a path under your Cygwin home directory. This is especially important if your user name contains spaces and/or mixed upper and lower case letters.</p></li>
|
||||
<li><p>Clone the JDK repository using the Cygwin command line <code>hg</code> client as instructed in this document. That is, do <em>not</em> use another Mercurial client such as TortoiseHg.</p></li>
|
||||
<li><p>You need to install a git client. You have two choices, Cygwin git or Git for Windows. Unfortunately there are pros and cons with each choice.</p>
|
||||
<ul>
|
||||
<li><p>The Cygwin <code>git</code> client has no line ending issues and understands Cygwin paths (which are used throughout the JDK build system). However, it does not currently work well with the Skara CLI tooling. Please see the <a href="https://wiki.openjdk.java.net/display/SKARA/Skara#Skara-Git">Skara wiki on Git clients</a> for up-to-date information about the Skara git client support.</p></li>
|
||||
<li><p>The <a href="https://gitforwindows.org">Git for Windows</a> client has issues with line endings, and do not understand Cygwin paths. It does work well with the Skara CLI tooling, however. To alleviate the line ending problems, make sure you set <code>core.autocrlf</code> to <code>false</code> (this is asked during installation).</p></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<p>Failure to follow this procedure might result in hard-to-debug build problems.</p></li>
|
||||
</ul>
|
||||
@@ -191,7 +195,7 @@
|
||||
<p>Windows XP is not a supported platform, but all newer Windows should be able to build the JDK.</p>
|
||||
<p>On Windows, it is important that you pay attention to the instructions in the <a href="#special-considerations">Special Considerations</a>.</p>
|
||||
<p>Windows is the only non-POSIX OS supported by the JDK, and as such, requires some extra care. A POSIX support layer is required to build on Windows. Currently, the only supported such layer is Cygwin. (Msys is no longer supported due to a too old bash; msys2 and the new Windows Subsystem for Linux (WSL) would likely be possible to support in a future version but that would require effort to implement.)</p>
|
||||
<p>Internally in the build system, all paths are represented as Unix-style paths, e.g. <code>/cygdrive/c/hg/jdk9/Makefile</code> rather than <code>C:\hg\jdk9\Makefile</code>. This rule also applies to input to the build system, e.g. in arguments to <code>configure</code>. So, use <code>--with-msvcr-dll=/cygdrive/c/msvcr100.dll</code> rather than <code>--with-msvcr-dll=c:\msvcr100.dll</code>. For details on this conversion, see the section on <a href="#fixpath">Fixpath</a>.</p>
|
||||
<p>Internally in the build system, all paths are represented as Unix-style paths, e.g. <code>/cygdrive/c/git/jdk/Makefile</code> rather than <code>C:\git\jdk\Makefile</code>. This rule also applies to input to the build system, e.g. in arguments to <code>configure</code>. So, use <code>--with-msvcr-dll=/cygdrive/c/msvcr100.dll</code> rather than <code>--with-msvcr-dll=c:\msvcr100.dll</code>. For details on this conversion, see the section on <a href="#fixpath">Fixpath</a>.</p>
|
||||
<h4 id="cygwin">Cygwin</h4>
|
||||
<p>A functioning <a href="http://www.cygwin.com/">Cygwin</a> environment is thus required for building the JDK on Windows. If you have a 64-bit OS, we strongly recommend using the 64-bit version of Cygwin.</p>
|
||||
<p><strong>Note:</strong> Cygwin has a model of continuously updating all packages without any easy way to install or revert to a specific version of a package. This means that whenever you add or update a package in Cygwin, you might (inadvertently) update tools that are used by the JDK build process, and that can cause unexpected build problems.</p>
|
||||
@@ -353,7 +357,7 @@ cc: Sun C 5.13 SunOS_i386 2014/10/20
|
||||
$ CC -V
|
||||
CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
|
||||
<h3 id="microsoft-visual-studio">Microsoft Visual Studio</h3>
|
||||
<p>The minimum accepted version of Visual Studio is 2010. Older versions will not be accepted by <code>configure</code>. The maximum accepted version of Visual Studio is 2017. Versions older than 2017 are unlikely to continue working for long.</p>
|
||||
<p>The minimum accepted version of Visual Studio is 2010. Older versions will not be accepted by <code>configure</code>. The maximum accepted version of Visual Studio is 2019. Versions older than 2017 are unlikely to continue working for long.</p>
|
||||
<p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting <code>--with-toolchain-version</code>, e.g. <code>--with-toolchain-version=2015</code>.</p>
|
||||
<p>If you get <code>LINK: fatal error LNK1123: failure during conversion to COFF: file invalid</code> when building using Visual Studio 2010, you have encountered <a href="http://support.microsoft.com/kb/2757355">KB2757355</a>, a bug triggered by a specific installation order. However, the solution suggested by the KB article does not always resolve the problem. See <a href="https://stackoverflow.com/questions/10888391">this stackoverflow discussion</a> for other suggestions.</p>
|
||||
<h3 id="ibm-xl-cc">IBM XL C/C++</h3>
|
||||
@@ -565,6 +569,47 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
|
||||
<p>This requires a more complex setup and build procedure. This section assumes you are familiar with cross-compiling in general, and will only deal with the particularities of cross-compiling the JDK. If you are new to cross-compiling, please see the <a href="https://en.wikipedia.org/wiki/Cross_compiler#External_links">external links at Wikipedia</a> for a good start on reading materials.</p>
|
||||
<p>Cross-compiling the JDK requires you to be able to build both for the build platform and for the target platform. The reason for the former is that we need to build and execute tools during the build process, both native tools and Java tools.</p>
|
||||
<p>If all you want to do is to compile a 32-bit version, for the same OS, on a 64-bit machine, consider using <code>--with-target-bits=32</code> instead of doing a full-blown cross-compilation. (While this surely is possible, it's a lot more work and will take much longer to build.)</p>
|
||||
<h3 id="cross-compiling-the-easy-way-with-openjdk-devkits">Cross compiling the easy way with OpenJDK devkits</h3>
|
||||
<p>The OpenJDK build system provides out-of-the box support for creating and using so called devkits. A <code>devkit</code> is basically a collection of a cross-compiling toolchain and a sysroot environment which can easily be used together with the <code>--with-devkit</code> configure option to cross compile the OpenJDK. On Linux/x86_64, the following command:</p>
|
||||
<pre><code>bash configure --with-devkit=<devkit-path> --openjdk-target=ppc64-linux-gnu && make</code></pre>
|
||||
<p>will configure and build OpenJDK for Linux/ppc64 assuming that <code><devkit-path></code> points to a Linux/x86_64 to Linux/ppc64 devkit.</p>
|
||||
<p>Devkits can be created from the <code>make/devkit</code> directory by executing:</p>
|
||||
<pre><code>make [ TARGETS="<TARGET_TRIPLET>+" ] [ BASE_OS=<OS> ] [ BASE_OS_VERSION=<VER> ]</code></pre>
|
||||
<p>where <code>TARGETS</code> contains one or more <code>TARGET_TRIPLET</code>s of the form described in <a href="https://sourceware.org/autobook/autobook/autobook_17.html">section 3.4 of the GNU Autobook</a>. If no targets are given, a native toolchain for the current platform will be created. Currently, at least the following targets are known to work:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th>Supported devkit targets</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td>x86_64-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>aarch64-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>arm-linux-gnueabihf</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>ppc64-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>ppc64le-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>s390x-linux-gnu</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><code>BASE_OS</code> must be one of "OEL6" for Oracle Enterprise Linux 6 or "Fedora" (if not specified "OEL6" will be the default). If the base OS is "Fedora" the corresponding Fedora release can be specified with the help of the <code>BASE_OS_VERSION</code> option (with "27" as default version). If the build is successful, the new devkits can be found in the <code>build/devkit/result</code> subdirectory:</p>
|
||||
<pre><code>cd make/devkit
|
||||
make TARGETS="ppc64le-linux-gnu aarch64-linux-gnu" BASE_OS=Fedora BASE_OS_VERSION=21
|
||||
ls -1 ../../build/devkit/result/
|
||||
x86_64-linux-gnu-to-aarch64-linux-gnu
|
||||
x86_64-linux-gnu-to-ppc64le-linux-gnu</code></pre>
|
||||
<p>Notice that devkits are not only useful for targeting different build platforms. Because they contain the full build dependencies for a system (i.e. compiler and root file system), they can easily be used to build well-known, reliable and reproducible build environments. You can for example create and use a devkit with GCC 7.3 and a Fedora 12 sysroot environment (with glibc 2.11) on Ubuntu 14.04 (which doesn't have GCC 7.3 by default) to produce OpenJDK binaries which will run on all Linux systems with runtime libraries newer than the ones from Fedora 12 (e.g. Ubuntu 16.04, SLES 11 or RHEL 6).</p>
|
||||
<h3 id="boot-jdk-and-build-jdk">Boot JDK and Build JDK</h3>
|
||||
<p>When cross-compiling, make sure you use a boot JDK that runs on the <em>build</em> system, and not on the <em>target</em> system.</p>
|
||||
<p>To be able to build, we need a "Build JDK", which is a JDK built from the current sources (that is, the same as the end result of the entire build process), but able to run on the <em>build</em> system, and not the <em>target</em> system. (In contrast, the Boot JDK should be from an older release, e.g. JDK 8 when building JDK 9.)</p>
|
||||
@@ -634,6 +679,72 @@ cp: cannot stat `arm-linux-gnueabihf/libSM.so': No such file or directory
|
||||
cp: cannot stat `arm-linux-gnueabihf/libXt.so': No such file or directory</code></pre></li>
|
||||
<li><p>If the X11 libraries are not properly detected by <code>configure</code>, you can point them out by <code>--with-x</code>.</p></li>
|
||||
</ul>
|
||||
<h3 id="creating-and-using-sysroots-with-qemu-deboostrap">Creating And Using Sysroots With qemu-deboostrap</h3>
|
||||
<p>Fortunately, you can create sysroots for foreign architectures with tools provided by your OS. On Debian/Ubuntu systems, one could use <code>qemu-deboostrap</code> to create the <em>target</em> system chroot, which would have the native libraries and headers specific to that <em>target</em> system. After that, we can use the cross-compiler on the <em>build</em> system, pointing into chroot to get the build dependencies right. This allows building for foreign architectures with native compilation speed.</p>
|
||||
<p>For example, cross-compiling to AArch64 from x86_64 could be done like this:</p>
|
||||
<ul>
|
||||
<li><p>Install cross-compiler on the <em>build</em> system:</p>
|
||||
<pre><code>apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu</code></pre></li>
|
||||
<li><p>Create chroot on the <em>build</em> system, configuring it for <em>target</em> system:</p>
|
||||
<pre><code>sudo qemu-debootstrap --arch=arm64 --verbose \
|
||||
--include=fakeroot,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng12-dev \
|
||||
--resolve-deps jessie /chroots/arm64 http://httpredir.debian.org/debian/</code></pre></li>
|
||||
<li><p>Configure and build with newly created chroot as sysroot/toolchain-path:</p>
|
||||
<pre><code>CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ sh ./configure --openjdk-target=aarch64-linux-gnu --with-sysroot=/chroots/arm64/ --with-toolchain-path=/chroots/arm64/
|
||||
make images
|
||||
ls build/linux-aarch64-normal-server-release/</code></pre></li>
|
||||
</ul>
|
||||
<p>The build does not create new files in that chroot, so it can be reused for multiple builds without additional cleanup.</p>
|
||||
<p>Architectures that are known to successfully cross-compile like this are:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th style="text-align: left;">Target</th>
|
||||
<th style="text-align: left;"><code>CC</code></th>
|
||||
<th style="text-align: left;"><code>CXX</code></th>
|
||||
<th><code>--arch=...</code></th>
|
||||
<th><code>--openjdk-target=...</code></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">x86</td>
|
||||
<td style="text-align: left;">default</td>
|
||||
<td style="text-align: left;">default</td>
|
||||
<td>i386</td>
|
||||
<td>i386-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">armhf</td>
|
||||
<td style="text-align: left;">gcc-arm-linux-gnueabihf</td>
|
||||
<td style="text-align: left;">g++-arm-linux-gnueabihf</td>
|
||||
<td>armhf</td>
|
||||
<td>arm-linux-gnueabihf</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">aarch64</td>
|
||||
<td style="text-align: left;">gcc-aarch64-linux-gnu</td>
|
||||
<td style="text-align: left;">g++-aarch64-linux-gnu</td>
|
||||
<td>arm64</td>
|
||||
<td>aarch64-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">ppc64el</td>
|
||||
<td style="text-align: left;">gcc-powerpc64le-linux-gnu</td>
|
||||
<td style="text-align: left;">g++-powerpc64le-linux-gnu</td>
|
||||
<td>ppc64el</td>
|
||||
<td>powerpc64le-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">s390x</td>
|
||||
<td style="text-align: left;">gcc-s390x-linux-gnu</td>
|
||||
<td style="text-align: left;">g++-s390x-linux-gnu</td>
|
||||
<td>s390x</td>
|
||||
<td>s390x-linux-gnu</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Additional architectures might be supported by Debian/Ubuntu Ports.</p>
|
||||
<h3 id="building-for-armaarch64">Building for ARM/aarch64</h3>
|
||||
<p>A common cross-compilation target is the ARM CPU. When building for ARM, it is useful to set the ABI profile. A number of pre-defined ABI profiles are available using <code>--with-abi-profile</code>: arm-vfp-sflt, arm-vfp-hflt, arm-sflt, armv5-vfp-sflt, armv6-vfp-hflt. Note that soft-float ABIs are no longer properly supported by the JDK.</p>
|
||||
<p>The JDK contains two different ports for the aarch64 platform, one is the original aarch64 port from the <a href="http://openjdk.java.net/projects/aarch64-port">AArch64 Port Project</a> and one is a 64-bit version of the Oracle contributed ARM port. When targeting aarch64, by the default the original aarch64 port is used. To select the Oracle ARM 64 port, use <code>--with-cpu-port=arm64</code>. Also set the corresponding value (<code>aarch64</code> or <code>arm64</code>) to --with-abi-profile, to ensure a consistent build.</p>
|
||||
@@ -680,14 +791,14 @@ cp: cannot stat `arm-linux-gnueabihf/libXt.so': No such file or directory</c
|
||||
|
||||
=== Output from failing command(s) repeated here ===
|
||||
* For target hotspot_variant-server_libjvm_objs_psMemoryPool.o:
|
||||
/localhome/hg/jdk9-sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type
|
||||
/localhome/git/jdk-sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type
|
||||
... (rest of output omitted)
|
||||
|
||||
* All command lines available in /localhome/hg/jdk9-sandbox/build/linux-x64/make-support/failure-logs.
|
||||
* All command lines available in /localhome/git/jdk-sandbox/build/linux-x64/make-support/failure-logs.
|
||||
=== End of repeated output ===
|
||||
|
||||
=== Make failed targets repeated here ===
|
||||
lib/CompileJvm.gmk:207: recipe for target '/localhome/hg/jdk9-sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed
|
||||
lib/CompileJvm.gmk:207: recipe for target '/localhome/git/jdk-sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed
|
||||
make/Main.gmk:263: recipe for target 'hotspot-server-libs' failed
|
||||
=== End of repeated output ===
|
||||
|
||||
@@ -710,11 +821,11 @@ Hint: If caused by a warning, try configure --disable-warnings-as-errors.</code>
|
||||
<p>Verify that the summary at the end looks correct. Are you indeed using the Boot JDK and native toolchain that you expect?</p>
|
||||
<p>By default, the JDK has a strict approach where warnings from the compiler is considered errors which fail the build. For very new or very old compiler versions, this can trigger new classes of warnings, which thus fails the build. Run <code>configure</code> with <code>--disable-warnings-as-errors</code> to turn of this behavior. (The warnings will still show, but not make the build fail.)</p>
|
||||
<h4 id="problems-with-incremental-rebuilds">Problems with Incremental Rebuilds</h4>
|
||||
<p>Incremental rebuilds mean that when you modify part of the product, only the affected parts get rebuilt. While this works great in most cases, and significantly speed up the development process, from time to time complex interdependencies will result in an incorrect build result. This is the most common cause for unexpected build problems, together with inconsistencies between the different Mercurial repositories in the forest.</p>
|
||||
<p>Incremental rebuilds mean that when you modify part of the product, only the affected parts get rebuilt. While this works great in most cases, and significantly speed up the development process, from time to time complex interdependencies will result in an incorrect build result. This is the most common cause for unexpected build problems.</p>
|
||||
<p>Here are a suggested list of things to try if you are having unexpected build problems. Each step requires more time than the one before, so try them in order. Most issues will be solved at step 1 or 2.</p>
|
||||
<ol type="1">
|
||||
<li><p>Make sure your forest is up-to-date</p>
|
||||
<p>Run <code>bash get_source.sh</code> to make sure you have the latest version of all repositories.</p></li>
|
||||
<li><p>Make sure your repository is up-to-date</p>
|
||||
<p>Run <code>git pull origin master</code> to make sure you have the latest changes.</p></li>
|
||||
<li><p>Clean build results</p>
|
||||
<p>The simplest way to fix incremental rebuild issues is to run <code>make clean</code>. This will remove all build results, but not the configuration or any build system support artifacts. In most cases, this will solve build errors resulting from incremental build mismatches.</p></li>
|
||||
<li><p>Completely clean the build directory.</p>
|
||||
@@ -723,8 +834,8 @@ Hint: If caused by a warning, try configure --disable-warnings-as-errors.</code>
|
||||
make dist-clean
|
||||
bash configure $(cat current-configuration)
|
||||
make</code></pre></li>
|
||||
<li><p>Re-clone the Mercurial forest</p>
|
||||
<p>Sometimes the Mercurial repositories themselves gets in a state that causes the product to be un-buildable. In such a case, the simplest solution is often the "sledgehammer approach": delete the entire forest, and re-clone it. If you have local changes, save them first to a different location using <code>hg export</code>.</p></li>
|
||||
<li><p>Re-clone the Git repository</p>
|
||||
<p>Sometimes the Git repository gets in a state that causes the product to be un-buildable. In such a case, the simplest solution is often the "sledgehammer approach": delete the entire repository, and re-clone it. If you have local changes, save them first to a different location using <code>git format-patch</code>.</p></li>
|
||||
</ol>
|
||||
<h3 id="specific-build-issues">Specific Build Issues</h3>
|
||||
<h4 id="clock-skew">Clock Skew</h4>
|
||||
@@ -746,20 +857,6 @@ spawn failed</code></pre>
|
||||
<p>If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to <a href="mailto:build-dev@openjdk.java.net">build-dev@openjdk.java.net</a>. Please include the relevant parts of the configure and/or build log.</p>
|
||||
<p>If you need general help or advice about developing for the JDK, you can also contact the Adoption Group. See the section on <a href="#contributing-to-openjdk">Contributing to OpenJDK</a> for more information.</p>
|
||||
<h2 id="hints-and-suggestions-for-advanced-users">Hints and Suggestions for Advanced Users</h2>
|
||||
<h3 id="setting-up-a-forest-for-pushing-changes-defpath">Setting Up a Forest for Pushing Changes (defpath)</h3>
|
||||
<p>To help you prepare a proper push path for a Mercurial repository, there exists a useful tool known as <a href="http://openjdk.java.net/projects/code-tools/defpath">defpath</a>. It will help you setup a proper push path for pushing changes to the JDK.</p>
|
||||
<p>Install the extension by cloning <code>http://hg.openjdk.java.net/code-tools/defpath</code> and updating your <code>.hgrc</code> file. Here's one way to do this:</p>
|
||||
<pre><code>cd ~
|
||||
mkdir hg-ext
|
||||
cd hg-ext
|
||||
hg clone http://hg.openjdk.java.net/code-tools/defpath
|
||||
cat << EOT >> ~/.hgrc
|
||||
[extensions]
|
||||
defpath=~/hg-ext/defpath/defpath.py
|
||||
EOT</code></pre>
|
||||
<p>You can now setup a proper push path using:</p>
|
||||
<pre><code>hg defpath -d -u <your OpenJDK username></code></pre>
|
||||
<p>If you also have the <code>trees</code> extension installed in Mercurial, you will automatically get a <code>tdefpath</code> command, which is even more useful. By running <code>hg tdefpath -du <username></code> in the top repository of your forest, all repos will get setup automatically. This is the recommended usage.</p>
|
||||
<h3 id="bash-completion">Bash Completion</h3>
|
||||
<p>The <code>configure</code> and <code>make</code> commands tries to play nice with bash command-line completion (using <code><tab></code> or <code><tab><tab></code>). To use this functionality, make sure you enable completion in your <code>~/.bashrc</code> (see instructions for bash in your operating system).</p>
|
||||
<p>Make completion will work out of the box, and will complete valid make targets. For instance, typing <code>make jdk-i<tab></code> will complete to <code>make jdk-image</code>.</p>
|
||||
@@ -813,14 +910,6 @@ sudo mv /tmp/configure /usr/local/bin</code></pre>
|
||||
<h4 id="rebuilding-part-of-java.base-jdk_filter">Rebuilding Part of java.base (JDK_FILTER)</h4>
|
||||
<p>If you are modifying files in <code>java.base</code>, which is the by far largest module in the JDK, then you need to rebuild all those files whenever a single file has changed. (This inefficiency will hopefully be addressed in JDK 10.)</p>
|
||||
<p>As a hack, you can use the make control variable <code>JDK_FILTER</code> to specify a pattern that will be used to limit the set of files being recompiled. For instance, <code>make java.base JDK_FILTER=javax/crypto</code> (or, to combine methods, <code>make java.base-java-only JDK_FILTER=javax/crypto</code>) will limit the compilation to files in the <code>javax.crypto</code> package.</p>
|
||||
<h3 id="learn-about-mercurial">Learn About Mercurial</h3>
|
||||
<p>To become an efficient JDK developer, it is recommended that you invest in learning Mercurial properly. Here are some links that can get you started:</p>
|
||||
<ul>
|
||||
<li><a href="http://www.mercurial-scm.org/wiki/GitConcepts">Mercurial for git users</a></li>
|
||||
<li><a href="http://www.mercurial-scm.org/wiki/Tutorial">The official Mercurial tutorial</a></li>
|
||||
<li><a href="http://hginit.com/">hg init</a></li>
|
||||
<li><a href="http://hgbook.red-bean.com/read/">Mercurial: The Definitive Guide</a></li>
|
||||
</ul>
|
||||
<h2 id="understanding-the-build-system">Understanding the Build System</h2>
|
||||
<p>This section will give you a more technical description on the details of the build system.</p>
|
||||
<h3 id="configurations">Configurations</h3>
|
||||
|
||||
207
doc/building.md
207
doc/building.md
@@ -3,11 +3,11 @@
|
||||
## TL;DR (Instructions for the Impatient)
|
||||
|
||||
If you are eager to try out building the JDK, these simple steps works most of
|
||||
the time. They assume that you have installed Mercurial (and Cygwin if running
|
||||
the time. They assume that you have installed Git (and Cygwin if running
|
||||
on Windows) and cloned the top-level JDK repository that you want to build.
|
||||
|
||||
1. [Get the complete source code](#getting-the-source-code): \
|
||||
`hg clone http://hg.openjdk.java.net/jdk/jdk`
|
||||
`git clone https://git.openjdk.java.net/jdk/`
|
||||
|
||||
2. [Run configure](#running-configure): \
|
||||
`bash configure`
|
||||
@@ -47,14 +47,14 @@ JDK.
|
||||
|
||||
Make sure you are getting the correct version. As of JDK 10, the source is no
|
||||
longer split into separate repositories so you only need to clone one single
|
||||
repository. At the [OpenJDK Mercurial server](http://hg.openjdk.java.net/) you
|
||||
can see a list of all available forests. If you want to build an older version,
|
||||
repository. At the [OpenJDK Git site](https://git.openjdk.java.net/) you
|
||||
can see a list of all available repositories. If you want to build an older version,
|
||||
e.g. JDK 8, it is recommended that you get the `jdk8u` forest, which contains
|
||||
incremental updates, instead of the `jdk8` forest, which was frozen at JDK 8 GA.
|
||||
|
||||
If you are new to Mercurial, a good place to start is the [Mercurial Beginner's
|
||||
Guide](http://www.mercurial-scm.org/guide). The rest of this document assumes a
|
||||
working knowledge of Mercurial.
|
||||
If you are new to Git, a good place to start is the book [Pro
|
||||
Git](https://git-scm.com/book/en/v2). The rest of this document
|
||||
assumes a working knowledge of Git.
|
||||
|
||||
### Special Considerations
|
||||
|
||||
@@ -89,9 +89,21 @@ on where and how to check out the source code.
|
||||
directory. This is especially important if your user name contains
|
||||
spaces and/or mixed upper and lower case letters.
|
||||
|
||||
* Clone the JDK repository using the Cygwin command line `hg` client
|
||||
as instructed in this document. That is, do *not* use another Mercurial
|
||||
client such as TortoiseHg.
|
||||
* You need to install a git client. You have two choices, Cygwin git or
|
||||
Git for Windows. Unfortunately there are pros and cons with each choice.
|
||||
|
||||
* The Cygwin `git` client has no line ending issues and understands
|
||||
Cygwin paths (which are used throughout the JDK build system).
|
||||
However, it does not currently work well with the Skara CLI tooling.
|
||||
Please see the [Skara wiki on Git clients](
|
||||
https://wiki.openjdk.java.net/display/SKARA/Skara#Skara-Git) for
|
||||
up-to-date information about the Skara git client support.
|
||||
|
||||
* The [Git for Windows](https://gitforwindows.org) client has issues
|
||||
with line endings, and do not understand Cygwin paths. It does work
|
||||
well with the Skara CLI tooling, however. To alleviate the line ending
|
||||
problems, make sure you set `core.autocrlf` to `false` (this is asked
|
||||
during installation).
|
||||
|
||||
Failure to follow this procedure might result in hard-to-debug build
|
||||
problems.
|
||||
@@ -171,7 +183,7 @@ supported due to a too old bash; msys2 and the new Windows Subsystem for Linux
|
||||
require effort to implement.)
|
||||
|
||||
Internally in the build system, all paths are represented as Unix-style paths,
|
||||
e.g. `/cygdrive/c/hg/jdk9/Makefile` rather than `C:\hg\jdk9\Makefile`. This
|
||||
e.g. `/cygdrive/c/git/jdk/Makefile` rather than `C:\git\jdk\Makefile`. This
|
||||
rule also applies to input to the build system, e.g. in arguments to
|
||||
`configure`. So, use `--with-msvcr-dll=/cygdrive/c/msvcr100.dll` rather than
|
||||
`--with-msvcr-dll=c:\msvcr100.dll`. For details on this conversion, see the section
|
||||
@@ -371,7 +383,7 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30
|
||||
|
||||
The minimum accepted version of Visual Studio is 2010. Older versions will not
|
||||
be accepted by `configure`. The maximum accepted version of Visual Studio is
|
||||
2017. Versions older than 2017 are unlikely to continue working for long.
|
||||
2019. Versions older than 2017 are unlikely to continue working for long.
|
||||
|
||||
If you have multiple versions of Visual Studio installed, `configure` will by
|
||||
default pick the latest. You can request a specific version to be used by
|
||||
@@ -875,6 +887,64 @@ If all you want to do is to compile a 32-bit version, for the same OS, on a
|
||||
full-blown cross-compilation. (While this surely is possible, it's a lot more
|
||||
work and will take much longer to build.)
|
||||
|
||||
### Cross compiling the easy way with OpenJDK devkits
|
||||
|
||||
The OpenJDK build system provides out-of-the box support for creating and using
|
||||
so called devkits. A `devkit` is basically a collection of a cross-compiling
|
||||
toolchain and a sysroot environment which can easily be used together with the
|
||||
`--with-devkit` configure option to cross compile the OpenJDK. On Linux/x86_64,
|
||||
the following command:
|
||||
```
|
||||
bash configure --with-devkit=<devkit-path> --openjdk-target=ppc64-linux-gnu && make
|
||||
```
|
||||
|
||||
will configure and build OpenJDK for Linux/ppc64 assuming that `<devkit-path>`
|
||||
points to a Linux/x86_64 to Linux/ppc64 devkit.
|
||||
|
||||
Devkits can be created from the `make/devkit` directory by executing:
|
||||
```
|
||||
make [ TARGETS="<TARGET_TRIPLET>+" ] [ BASE_OS=<OS> ] [ BASE_OS_VERSION=<VER> ]
|
||||
```
|
||||
|
||||
where `TARGETS` contains one or more `TARGET_TRIPLET`s of the form
|
||||
described in [section 3.4 of the GNU Autobook](
|
||||
https://sourceware.org/autobook/autobook/autobook_17.html). If no
|
||||
targets are given, a native toolchain for the current platform will be
|
||||
created. Currently, at least the following targets are known to work:
|
||||
|
||||
Supported devkit targets
|
||||
------------------------
|
||||
x86_64-linux-gnu
|
||||
aarch64-linux-gnu
|
||||
arm-linux-gnueabihf
|
||||
ppc64-linux-gnu
|
||||
ppc64le-linux-gnu
|
||||
s390x-linux-gnu
|
||||
|
||||
`BASE_OS` must be one of "OEL6" for Oracle Enterprise Linux 6 or
|
||||
"Fedora" (if not specified "OEL6" will be the default). If the base OS
|
||||
is "Fedora" the corresponding Fedora release can be specified with the
|
||||
help of the `BASE_OS_VERSION` option (with "27" as default version).
|
||||
If the build is successful, the new devkits can be found in the
|
||||
`build/devkit/result` subdirectory:
|
||||
```
|
||||
cd make/devkit
|
||||
make TARGETS="ppc64le-linux-gnu aarch64-linux-gnu" BASE_OS=Fedora BASE_OS_VERSION=21
|
||||
ls -1 ../../build/devkit/result/
|
||||
x86_64-linux-gnu-to-aarch64-linux-gnu
|
||||
x86_64-linux-gnu-to-ppc64le-linux-gnu
|
||||
```
|
||||
|
||||
Notice that devkits are not only useful for targeting different build
|
||||
platforms. Because they contain the full build dependencies for a
|
||||
system (i.e. compiler and root file system), they can easily be used
|
||||
to build well-known, reliable and reproducible build environments. You
|
||||
can for example create and use a devkit with GCC 7.3 and a Fedora 12
|
||||
sysroot environment (with glibc 2.11) on Ubuntu 14.04 (which doesn't
|
||||
have GCC 7.3 by default) to produce OpenJDK binaries which will run on
|
||||
all Linux systems with runtime libraries newer than the ones from
|
||||
Fedora 12 (e.g. Ubuntu 16.04, SLES 11 or RHEL 6).
|
||||
|
||||
### Boot JDK and Build JDK
|
||||
|
||||
When cross-compiling, make sure you use a boot JDK that runs on the *build*
|
||||
@@ -1018,6 +1088,51 @@ Note that X11 is needed even if you only want to build a headless JDK.
|
||||
* If the X11 libraries are not properly detected by `configure`, you can
|
||||
point them out by `--with-x`.
|
||||
|
||||
### Creating And Using Sysroots With qemu-deboostrap
|
||||
|
||||
Fortunately, you can create sysroots for foreign architectures with tools
|
||||
provided by your OS. On Debian/Ubuntu systems, one could use `qemu-deboostrap` to
|
||||
create the *target* system chroot, which would have the native libraries and headers
|
||||
specific to that *target* system. After that, we can use the cross-compiler on the *build*
|
||||
system, pointing into chroot to get the build dependencies right. This allows building
|
||||
for foreign architectures with native compilation speed.
|
||||
|
||||
For example, cross-compiling to AArch64 from x86_64 could be done like this:
|
||||
|
||||
* Install cross-compiler on the *build* system:
|
||||
```
|
||||
apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
|
||||
```
|
||||
|
||||
* Create chroot on the *build* system, configuring it for *target* system:
|
||||
```
|
||||
sudo qemu-debootstrap --arch=arm64 --verbose \
|
||||
--include=fakeroot,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng12-dev \
|
||||
--resolve-deps jessie /chroots/arm64 http://httpredir.debian.org/debian/
|
||||
```
|
||||
|
||||
* Configure and build with newly created chroot as sysroot/toolchain-path:
|
||||
```
|
||||
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ sh ./configure --openjdk-target=aarch64-linux-gnu --with-sysroot=/chroots/arm64/ --with-toolchain-path=/chroots/arm64/
|
||||
make images
|
||||
ls build/linux-aarch64-normal-server-release/
|
||||
```
|
||||
|
||||
The build does not create new files in that chroot, so it can be reused for multiple builds
|
||||
without additional cleanup.
|
||||
|
||||
Architectures that are known to successfully cross-compile like this are:
|
||||
|
||||
Target `CC` `CXX` `--arch=...` `--openjdk-target=...`
|
||||
------------ ------------------------- --------------------------- ------------ ----------------------
|
||||
x86 default default i386 i386-linux-gnu
|
||||
armhf gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf armhf arm-linux-gnueabihf
|
||||
aarch64 gcc-aarch64-linux-gnu g++-aarch64-linux-gnu arm64 aarch64-linux-gnu
|
||||
ppc64el gcc-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu ppc64el powerpc64le-linux-gnu
|
||||
s390x gcc-s390x-linux-gnu g++-s390x-linux-gnu s390x s390x-linux-gnu
|
||||
|
||||
Additional architectures might be supported by Debian/Ubuntu Ports.
|
||||
|
||||
### Building for ARM/aarch64
|
||||
|
||||
A common cross-compilation target is the ARM CPU. When building for ARM, it is
|
||||
@@ -1158,14 +1273,14 @@ ERROR: Build failed for target 'hotspot' in configuration 'linux-x64' (exit code
|
||||
|
||||
=== Output from failing command(s) repeated here ===
|
||||
* For target hotspot_variant-server_libjvm_objs_psMemoryPool.o:
|
||||
/localhome/hg/jdk9-sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type
|
||||
/localhome/git/jdk-sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type
|
||||
... (rest of output omitted)
|
||||
|
||||
* All command lines available in /localhome/hg/jdk9-sandbox/build/linux-x64/make-support/failure-logs.
|
||||
* All command lines available in /localhome/git/jdk-sandbox/build/linux-x64/make-support/failure-logs.
|
||||
=== End of repeated output ===
|
||||
|
||||
=== Make failed targets repeated here ===
|
||||
lib/CompileJvm.gmk:207: recipe for target '/localhome/hg/jdk9-sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed
|
||||
lib/CompileJvm.gmk:207: recipe for target '/localhome/git/jdk-sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed
|
||||
make/Main.gmk:263: recipe for target 'hotspot-server-libs' failed
|
||||
=== End of repeated output ===
|
||||
|
||||
@@ -1255,17 +1370,15 @@ Incremental rebuilds mean that when you modify part of the product, only the
|
||||
affected parts get rebuilt. While this works great in most cases, and
|
||||
significantly speed up the development process, from time to time complex
|
||||
interdependencies will result in an incorrect build result. This is the most
|
||||
common cause for unexpected build problems, together with inconsistencies
|
||||
between the different Mercurial repositories in the forest.
|
||||
common cause for unexpected build problems.
|
||||
|
||||
Here are a suggested list of things to try if you are having unexpected build
|
||||
problems. Each step requires more time than the one before, so try them in
|
||||
order. Most issues will be solved at step 1 or 2.
|
||||
|
||||
1. Make sure your forest is up-to-date
|
||||
1. Make sure your repository is up-to-date
|
||||
|
||||
Run `bash get_source.sh` to make sure you have the latest version of all
|
||||
repositories.
|
||||
Run `git pull origin master` to make sure you have the latest changes.
|
||||
|
||||
2. Clean build results
|
||||
|
||||
@@ -1290,13 +1403,13 @@ order. Most issues will be solved at step 1 or 2.
|
||||
make
|
||||
```
|
||||
|
||||
4. Re-clone the Mercurial forest
|
||||
4. Re-clone the Git repository
|
||||
|
||||
Sometimes the Mercurial repositories themselves gets in a state that causes
|
||||
the product to be un-buildable. In such a case, the simplest solution is
|
||||
often the "sledgehammer approach": delete the entire forest, and re-clone
|
||||
it. If you have local changes, save them first to a different location
|
||||
using `hg export`.
|
||||
Sometimes the Git repository gets in a state that causes the product
|
||||
to be un-buildable. In such a case, the simplest solution is often the
|
||||
"sledgehammer approach": delete the entire repository, and re-clone it.
|
||||
If you have local changes, save them first to a different location using
|
||||
`git format-patch`.
|
||||
|
||||
### Specific Build Issues
|
||||
|
||||
@@ -1347,38 +1460,6 @@ contact the Adoption Group. See the section on [Contributing to OpenJDK](
|
||||
|
||||
## Hints and Suggestions for Advanced Users
|
||||
|
||||
### Setting Up a Forest for Pushing Changes (defpath)
|
||||
|
||||
To help you prepare a proper push path for a Mercurial repository, there exists
|
||||
a useful tool known as [defpath](
|
||||
http://openjdk.java.net/projects/code-tools/defpath). It will help you setup a
|
||||
proper push path for pushing changes to the JDK.
|
||||
|
||||
Install the extension by cloning
|
||||
`http://hg.openjdk.java.net/code-tools/defpath` and updating your `.hgrc` file.
|
||||
Here's one way to do this:
|
||||
|
||||
```
|
||||
cd ~
|
||||
mkdir hg-ext
|
||||
cd hg-ext
|
||||
hg clone http://hg.openjdk.java.net/code-tools/defpath
|
||||
cat << EOT >> ~/.hgrc
|
||||
[extensions]
|
||||
defpath=~/hg-ext/defpath/defpath.py
|
||||
EOT
|
||||
```
|
||||
|
||||
You can now setup a proper push path using:
|
||||
```
|
||||
hg defpath -d -u <your OpenJDK username>
|
||||
```
|
||||
|
||||
If you also have the `trees` extension installed in Mercurial, you will
|
||||
automatically get a `tdefpath` command, which is even more useful. By running
|
||||
`hg tdefpath -du <username>` in the top repository of your forest, all repos
|
||||
will get setup automatically. This is the recommended usage.
|
||||
|
||||
### Bash Completion
|
||||
|
||||
The `configure` and `make` commands tries to play nice with bash command-line
|
||||
@@ -1521,16 +1602,6 @@ instance, `make java.base JDK_FILTER=javax/crypto` (or, to combine methods,
|
||||
`make java.base-java-only JDK_FILTER=javax/crypto`) will limit the compilation
|
||||
to files in the `javax.crypto` package.
|
||||
|
||||
### Learn About Mercurial
|
||||
|
||||
To become an efficient JDK developer, it is recommended that you invest in
|
||||
learning Mercurial properly. Here are some links that can get you started:
|
||||
|
||||
* [Mercurial for git users](http://www.mercurial-scm.org/wiki/GitConcepts)
|
||||
* [The official Mercurial tutorial](http://www.mercurial-scm.org/wiki/Tutorial)
|
||||
* [hg init](http://hginit.com/)
|
||||
* [Mercurial: The Definitive Guide](http://hgbook.red-bean.com/read/)
|
||||
|
||||
## Understanding the Build System
|
||||
|
||||
This section will give you a more technical description on the details of the
|
||||
|
||||
@@ -4,10 +4,9 @@ RUN yum -y install centos-release-scl
|
||||
RUN yum -y install devtoolset-8
|
||||
RUN yum -y install zip bzip2 unzip tar wget make autoconf automake libtool alsa-devel cups-devel xorg-x11-devel libjpeg62-devel giflib-devel freetype-devel file which libXtst-devel libXt-devel libXrender-devel alsa-lib-devel fontconfig-devel libXrandr-devel libXi-devel git
|
||||
# Install Java 11
|
||||
RUN wget https://bintray.com/jetbrains/intellij-jbr/download_file?file_path=jbrsdk-11_0_3-linux-x64-b360.2.tar.gz \
|
||||
RUN wget https://cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-linux_x64.tar.gz \
|
||||
-O - | tar xz -C /
|
||||
ENV JAVA_HOME /jbrsdk
|
||||
ENV JAVA_HOME /zulu11.45.27-ca-jdk11.0.10-linux_x64
|
||||
ENV PATH $JAVA_HOME/bin:/opt/rh/devtoolset-8/root/usr/bin:$PATH
|
||||
RUN mkdir .git
|
||||
RUN git config user.email "builduser@jetbrains.com"
|
||||
RUN git config user.name "builduser"
|
||||
RUN git config --global user.email "teamcity@buildserver.intellij.net"
|
||||
RUN git config --global user.name "builduser"
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
VENDOR_NAME="JetBrains s.r.o."
|
||||
VENDOR_VERSION_STRING="JBR-${JBSDK_VERSION_WITH_DOTS}.${JDK_BUILD_NUMBER}-${build_number}"
|
||||
[ -z ${bundle_type} ] || VENDOR_VERSION_STRING="${VENDOR_VERSION_STRING}-${bundle_type}"
|
||||
|
||||
do_reset_changes=0
|
||||
do_reset_dcevm=0
|
||||
HEAD_REVISION=0
|
||||
|
||||
function do_exit() {
|
||||
exit_code=$1
|
||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD modules.list src/java.desktop/share/classes/module-info.java
|
||||
if [ $do_reset_dcevm -eq 1 ]; then
|
||||
[ ! -z $HEAD_REVISION ] && git reset --hard $HEAD_REVISION
|
||||
fi
|
||||
exit $exit_code
|
||||
}
|
||||
|
||||
16
jb/project/tools/common/scripts/build-jbr-api.sh
Normal file
16
jb/project/tools/common/scripts/build-jbr-api.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
# $1 - Boot JDK
|
||||
# $2 - JBR part of API version
|
||||
|
||||
cd "`dirname "$0"`/../../../../.."
|
||||
PWD="`pwd`"
|
||||
CONF="$PWD/build/jbr-api.conf"
|
||||
./configure --with-debug-level=release --with-boot-jdk=$1 || exit $?
|
||||
make jbr-api CONF=release MAKEOVERRIDES= "JBR_API_CONF_FILE=$CONF" JBR_API_JBR_VERSION=$2 || exit $?
|
||||
. $CONF || exit $?
|
||||
echo "##teamcity[buildNumber '$VERSION']"
|
||||
cp "$JAR" ./jbr-api-${VERSION}.jar || exit $?
|
||||
cp "$SOURCES_JAR" ./jbr-api-${VERSION}-sources.jar || exit $?
|
||||
echo "##teamcity[publishArtifacts '$PWD/jbr-api-${VERSION}.jar']"
|
||||
echo "##teamcity[publishArtifacts '$PWD/jbr-api-${VERSION}-sources.jar']"
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
script_dir=jb/project/tools/linux/scripts
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jcef" || exit $?
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx" || exit $?
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "dcevm" || exit $?
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx_jcef" || exit $?
|
||||
@@ -6,7 +6,6 @@
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
@@ -17,6 +16,16 @@
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
while getopts ":i?" o; do
|
||||
case "${o}" in
|
||||
i)
|
||||
i="incremental build"
|
||||
INC_BUILD=1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
@@ -25,20 +34,27 @@ JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
function do_configure {
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
--with-debug-level=release \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-import-modules=./modular-sdk \
|
||||
--with-boot-jdk=amazon-corretto-11.0.5.10.1-linux-aarch64 \
|
||||
--enable-cds=yes || exit $?
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
--with-debug-level=release \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-import-modules=./modular-sdk \
|
||||
--with-boot-jdk=amazon-corretto-11.0.5.10.1-linux-aarch64 \
|
||||
--enable-cds=yes || exit $?
|
||||
make clean CONF=linux-aarch64-normal-server-release || exit $?
|
||||
if [ -z "$INC_BUILD" ]; then
|
||||
do_configure || do_exit $?
|
||||
make clean CONF=linux-aarch64-normal-server-release || exit $?
|
||||
fi
|
||||
make images CONF=linux-aarch64-normal-server-release test-image || exit $?
|
||||
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-aarch64-b${build_number}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
# bundle_type - specifies bundle to be built; possible values:
|
||||
# jcef - the release bundles with jcef
|
||||
# dcevm - the release bundles with dcevm patches
|
||||
# nomod - the release bundles without any additional modules (jcef)
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
@@ -19,8 +21,18 @@
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
|
||||
# By default imported modules should be located in ./jcef_linux_x64
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_linux_x64
|
||||
|
||||
while getopts ":i?" o; do
|
||||
case "${o}" in
|
||||
i)
|
||||
i="incremental build"
|
||||
INC_BUILD=1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
@@ -32,116 +44,127 @@ JCEF_PATH=${JCEF_PATH:=./jcef_linux_x64}
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
function do_configure {
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--enable-cds=yes || do_exit $?
|
||||
}
|
||||
|
||||
function create_jbr {
|
||||
|
||||
case "$1" in
|
||||
"${bundle_type}_lw")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}_lw-${JBSDK_VERSION}
|
||||
grep -v "jdk.compiler\|jdk.hotspot.agent" modules.list > modules_tmp.list
|
||||
;;
|
||||
"jfx" | "jcef" | "dcevm" | "nomod")
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
|
||||
case "${bundle_type}" in
|
||||
"jcef" | "dcevm" | "nomod" | "fd")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
|
||||
cat modules.list > modules_tmp.list
|
||||
;;
|
||||
"jfx_jcef")
|
||||
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
|
||||
cat modules.list > modules_tmp.list
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && exit 1
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
cat modules.list > modules_tmp.list
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
|
||||
JBR=$JBR_BASE_NAME-linux-x64-b$build_number
|
||||
JBR=${JBR_BASE_NAME}-linux-x64-b${build_number}
|
||||
|
||||
echo Running jlink....
|
||||
$JSDK/bin/jlink \
|
||||
--module-path $JSDK/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output $BASE_DIR/$JBR_BUNDLE
|
||||
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output $BASE_DIR/$JBR_BUNDLE || do_exit $?
|
||||
|
||||
if [[ "$bundle_type" == *jcef* ]] || [[ "$bundle_type" == *dcevm* ]]; then
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]; then
|
||||
cp -R $BASE_DIR/$JBR_BUNDLE $BASE_DIR/jbr
|
||||
cp -R ${JCEF_PATH}/* $BASE_DIR/$JBR_BUNDLE/lib || exit $?
|
||||
rsync -av ${JCEF_PATH}/ $BASE_DIR/$JBR_BUNDLE/lib --exclude="modular-sdk" || do_exit $?
|
||||
fi
|
||||
grep -v "^JAVA_VERSION" $JSDK/release | grep -v "^MODULES" >> $BASE_DIR/$JBR_BUNDLE/release
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
echo Creating ${JBR}.tar.gz ...
|
||||
rm -rf ${BASE_DIR}/jbr
|
||||
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
|
||||
tar -pcf $JBR.tar -C $BASE_DIR jbr || exit $?
|
||||
gzip $JBR.tar || exit $?
|
||||
tar -pcf ${JBR}.tar -C ${BASE_DIR} jbr || do_exit $?
|
||||
gzip -f ${JBR}.tar || do_exit $?
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=linux-x86_64-normal-server-release
|
||||
git checkout -- modules.list src/java.desktop/share/classes/module-info.java
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-x64-b${build_number}
|
||||
case "$bundle_type" in
|
||||
"jfx")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
|
||||
;;
|
||||
"jcef")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"dcevm")
|
||||
git am jb/project/tools/patches/dcevm/*.patch
|
||||
HEAD_REVISION=$(git rev-parse HEAD)
|
||||
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
|
||||
do_reset_dcevm=1
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"nomod")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
|
||||
WITH_IMPORT_MODULES=""
|
||||
;;
|
||||
"fd")
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=linux-x86_64-normal-server-fastdebug
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-x64-fastdebug-b${build_number}
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--enable-cds=yes || exit $?
|
||||
if [ -z "$INC_BUILD" ]; then
|
||||
do_configure || do_exit $?
|
||||
make clean CONF=$RELEASE_NAME || do_exit $?
|
||||
fi
|
||||
make images CONF=$RELEASE_NAME || do_exit $?
|
||||
|
||||
make images CONF=$RELEASE_NAME || exit $?
|
||||
|
||||
JSDK=build/$RELEASE_NAME/images/jdk
|
||||
JBSDK=$JBRSDK_BASE_NAME-linux-x64-b$build_number
|
||||
JSDK=build/${RELEASE_NAME}/images/jdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
BASE_DIR=build/$RELEASE_NAME/images
|
||||
BASE_DIR=build/${RELEASE_NAME}/images
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
|
||||
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
||||
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE}
|
||||
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || do_exit $?
|
||||
|
||||
if [[ "$bundle_type" == *jcef* ]] || [[ "$bundle_type" == *dcevm* ]]; then
|
||||
cp -R ${JCEF_PATH}/* $BASE_DIR/$JBRSDK_BUNDLE/lib || exit $?
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]; then
|
||||
rsync -av ${JCEF_PATH}/ $BASE_DIR/$JBRSDK_BUNDLE/lib --exclude="modular-sdk" || do_exit $?
|
||||
fi
|
||||
if [ "$bundle_type" == "jfx_jcef" ]; then
|
||||
if [ "${bundle_type}" == "jcef" ] || [ "${bundle_type}" == "fd" ]; then
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/release > release
|
||||
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/release
|
||||
|
||||
tar -pcf $JBSDK.tar --exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
|
||||
-C $BASE_DIR $JBRSDK_BUNDLE || exit $?
|
||||
gzip $JBSDK.tar || exit $?
|
||||
tar -pcf ${JBSDK}.tar --exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
|
||||
-C ${BASE_DIR} ${JBRSDK_BUNDLE} || do_exit $?
|
||||
gzip -f ${JBSDK}.tar || do_exit $?
|
||||
fi
|
||||
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
create_jbr ${bundle_type}
|
||||
create_jbr || do_exit $?
|
||||
|
||||
if [ "$bundle_type" == "jfx_jcef" ]; then
|
||||
make test-image || exit $?
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
make test-image CONF=$RELEASE_NAME || do_exit $?
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-x64-b$build_number
|
||||
|
||||
echo Creating $JBSDK_TEST.tar.gz ...
|
||||
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' test || exit $?
|
||||
gzip $JBRSDK_TEST.tar || exit $?
|
||||
fi
|
||||
tar -pcf ${JBRSDK_TEST}.tar -C ${BASE_DIR} --exclude='test/jdk/demos' test || do_exit $?
|
||||
gzip -f ${JBRSDK_TEST}.tar || do_exit $?
|
||||
fi
|
||||
|
||||
do_exit 0
|
||||
@@ -1,90 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
|
||||
# By default imported modules should be located in ./jcef_linux_x64
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=./modular-sdk}"
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_linux_x64}
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-import-modules=./modular-sdk \
|
||||
--enable-cds=yes || exit $?
|
||||
make clean CONF=linux-x86_64-normal-server-fastdebug || exit $?
|
||||
make images CONF=linux-x86_64-normal-server-fastdebug || exit $?
|
||||
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-x64-fastdebug-b${build_number}
|
||||
BASE_DIR=build/linux-x86_64-normal-server-fastdebug/images
|
||||
JSDK=${BASE_DIR}/jdk
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
|
||||
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
||||
cp -R jcef_linux_x64/* $BASE_DIR/$JBRSDK_BUNDLE/lib || exit $?
|
||||
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/release > release
|
||||
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/release
|
||||
|
||||
tar -pcf $JBSDK.tar \
|
||||
--exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
|
||||
-C $BASE_DIR ${JBRSDK_BUNDLE} || exit $?
|
||||
gzip $JBSDK.tar || exit $?
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
rm -rf $BASE_DIR/$JBR_BUNDLE
|
||||
|
||||
JBR=$JBR_BASE_NAME-linux-x64-fastdebug-b$build_number
|
||||
echo Running jlink....
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules.list | sed s/" "//g | sed s/,$//g) \
|
||||
--output ${BASE_DIR}/${JBR_BUNDLE} || exit $?
|
||||
cp -R jcef_linux_x64/* $BASE_DIR/$JBR_BUNDLE/lib || exit $?
|
||||
|
||||
echo Modifying release info ...
|
||||
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${BASE_DIR}/${JBR_BUNDLE}/release
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
tar -czf $JBR.tar -C $BASE_DIR ${JBR_BUNDLE} || exit $?
|
||||
gzip $JBR.tar || exit $?
|
||||
@@ -6,7 +6,6 @@
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
@@ -32,6 +31,7 @@ linux32 bash configure \
|
||||
--with-debug-level=release \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build=$JDK_BUILD_NUMBER \
|
||||
--with-version-opt=b${build_number} \
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
script_dir=jb/project/tools/mac/scripts
|
||||
${script_dir}/mkimages.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jcef" || exit $?
|
||||
${script_dir}/mkimages.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx" || exit $?
|
||||
${script_dir}/mkimages.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "dcevm" || exit $?
|
||||
${script_dir}/mkimages.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx_jcef" || exit $?
|
||||
@@ -1,12 +1,14 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
# bundle_type - specifies bundle to be built; possible values:
|
||||
# jcef - the release bundles with jcef
|
||||
# dcevm - the release bundles with dcevm patches
|
||||
# nomod - the release bundles without any additional modules (jcef)
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
@@ -19,38 +21,99 @@
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
|
||||
# By default imported modules should be located in ./jcef_mac
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_mac
|
||||
|
||||
while getopts ":i?" o; do
|
||||
case "${o}" in
|
||||
i)
|
||||
i="incremental build"
|
||||
INC_BUILD=1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
architecture=$5 # aarch64 or x64
|
||||
enable_aot=$6 # temporary param for building test jre with aot under aarch64
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=./modular-sdk}"
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_mac}
|
||||
architecture=${architecture:=x64}
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
function copyJNF {
|
||||
__contents_dir=$1
|
||||
mkdir -p ${__contents_dir}/Frameworks
|
||||
cp -Rp Frameworks/JavaNativeFoundation.framework ${__contents_dir}/Frameworks
|
||||
}
|
||||
|
||||
function do_configure {
|
||||
if [[ "${architecture}" == *aarch64* ]]; then
|
||||
# NOTE: aot, cds aren't supported yet
|
||||
WITH_JVM_FEATURES="--with-jvm-features=-aot"
|
||||
if [[ "${enable_aot}" == *enable_aot* ]]; then
|
||||
echo "Enable unstable jvm feature: AOT"
|
||||
WITH_JVM_FEATURES=""
|
||||
fi
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--with-boot-jdk=`/usr/libexec/java_home -v 11` \
|
||||
--disable-hotspot-gtest --disable-javac-server --disable-full-docs --disable-manpages \
|
||||
--enable-cds=no \
|
||||
$WITH_JVM_FEATURES \
|
||||
--with-extra-cflags="-F$(pwd)/Frameworks" \
|
||||
--with-extra-cxxflags="-F$(pwd)/Frameworks" \
|
||||
--with-extra-ldflags="-F$(pwd)/Frameworks" || do_exit $?
|
||||
else
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--with-boot-jdk=`/usr/libexec/java_home -v 11` \
|
||||
--enable-cds=yes || do_exit $?
|
||||
fi
|
||||
}
|
||||
|
||||
function create_jbr {
|
||||
|
||||
case "$1" in
|
||||
"${bundle_type}_lw")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}_lw-${JBSDK_VERSION}
|
||||
grep -v "jdk.compiler\|jdk.hotspot.agent" modules.list > modules_tmp.list
|
||||
;;
|
||||
"jfx" | "jcef" | "dcevm" | "nomod")
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
|
||||
case "${bundle_type}" in
|
||||
"jcef" | "dcevm" | "nomod" | "fd")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
|
||||
cat modules.list > modules_tmp.list
|
||||
;;
|
||||
"jfx_jcef")
|
||||
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
|
||||
cat modules.list > modules_tmp.list
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && exit 1
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
if [[ "${architecture}" == *aarch64* ]] && [[ "${enable_aot}" != *enable_aot* ]]; then
|
||||
# aot isn't supported yet, so remove dependent modules
|
||||
echo "Exclude jdk.internal.vm.compiler and jdk.aot (because aot not supported yet)"
|
||||
cat modules.list | \
|
||||
grep -v "jdk.internal.vm.compiler\|jdk.aot" \
|
||||
> modules_tmp.list
|
||||
else
|
||||
cat modules.list > modules_tmp.list
|
||||
fi
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
|
||||
JRE_CONTENTS=${BASE_DIR}/${JBR_BUNDLE}/Contents
|
||||
@@ -60,94 +123,112 @@ function create_jbr {
|
||||
fi
|
||||
mkdir -p ${JRE_CONTENTS}
|
||||
|
||||
JBR=${JBR_BASE_NAME}-osx-x64-b${build_number}
|
||||
JBR=${JBR_BASE_NAME}-osx-${architecture}-b${build_number}
|
||||
|
||||
echo Running jlink....
|
||||
${BASE_DIR}/$JBRSDK_BUNDLE/Contents/Home/bin/jlink \
|
||||
--module-path ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output ${JRE_HOME} || exit $?
|
||||
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output ${JRE_HOME} || do_exit $?
|
||||
grep -v "^JAVA_VERSION" ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release | grep -v "^MODULES" >> ${JRE_HOME}/release
|
||||
cp -R ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/MacOS ${JRE_CONTENTS}
|
||||
cp ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Info.plist ${JRE_CONTENTS}
|
||||
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]]; then
|
||||
rm -rf ${JRE_CONTENTS}/Frameworks || exit $?
|
||||
cp -a ${JCEF_PATH}/Frameworks ${JRE_CONTENTS} || exit $?
|
||||
rm -rf ${JRE_CONTENTS}/Frameworks || do_exit $?
|
||||
if [[ "${architecture}" == *aarch64* ]]; then
|
||||
# we can't notarize this library as usual framework (with headers and tbd-file)
|
||||
# but single library notarizes correctly
|
||||
copyJNF ${JRE_CONTENTS}
|
||||
fi
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]; then
|
||||
cp -a ${JCEF_PATH}/Frameworks ${JRE_CONTENTS} || do_exit $?
|
||||
fi
|
||||
|
||||
echo Creating ${JBR}.tar.gz ...
|
||||
rm -rf ${BASE_DIR}/jbr
|
||||
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
|
||||
COPYFILE_DISABLE=1 tar -pczf ${JBR}.tar.gz --exclude='*.dSYM' --exclude='man' -C ${BASE_DIR} jbr || exit $?
|
||||
|
||||
COPYFILE_DISABLE=1 tar -pczf ${JBR}.tar.gz --exclude='*.dSYM' --exclude='man' -C ${BASE_DIR} jbr || do_exit $?
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=macosx-x86_64-normal-server-release
|
||||
git checkout -- modules.list src/java.desktop/share/classes/module-info.java
|
||||
CONF_ARCHITECTURE=x86_64
|
||||
if [[ "${architecture}" == *aarch64* ]]; then
|
||||
CONF_ARCHITECTURE=aarch64
|
||||
fi
|
||||
CONF_NAME=macosx-${CONF_ARCHITECTURE}-normal-server-release
|
||||
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-${architecture}-b${build_number}
|
||||
case "$bundle_type" in
|
||||
"jfx")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
|
||||
;;
|
||||
"jcef")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"dcevm")
|
||||
git am jb/project/tools/patches/dcevm/*.patch
|
||||
HEAD_REVISION=$(git rev-parse HEAD)
|
||||
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
|
||||
do_reset_dcevm=1
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"nomod")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
|
||||
WITH_IMPORT_MODULES=""
|
||||
;;
|
||||
"fd")
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
CONF_NAME=macosx-${CONF_ARCHITECTURE}-normal-server-fastdebug
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-${architecture}-fastdebug-b${build_number}
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && do_exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--with-boot-jdk=`/usr/libexec/java_home -v 11` \
|
||||
--enable-cds=yes || exit $?
|
||||
if [ -z "$INC_BUILD" ]; then
|
||||
do_configure || do_exit $?
|
||||
make clean CONF=$RELEASE_NAME || do_exit $?
|
||||
fi
|
||||
make images CONF=$CONF_NAME || do_exit $?
|
||||
|
||||
make clean images CONF=$RELEASE_NAME || exit $?
|
||||
|
||||
JSDK=build/$RELEASE_NAME/images/jdk-bundle
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-b${build_number}
|
||||
JSDK=build/${CONF_NAME}/images/jdk-bundle
|
||||
|
||||
BASE_DIR=jre
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf $BASE_DIR
|
||||
mkdir $BASE_DIR || exit $?
|
||||
cp -a $JSDK/jdk-$JBSDK_VERSION_WITH_DOTS.jdk $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
||||
|
||||
if [[ "$bundle_type" == *jcef* ]] || [[ "$bundle_type" == *dcevm* ]]; then
|
||||
mkdir $BASE_DIR || do_exit $?
|
||||
cp -a $JSDK/jdk-$JBSDK_VERSION_WITH_DOTS.jdk $BASE_DIR/$JBRSDK_BUNDLE || do_exit $?
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]] || [[ "${bundle_type}" == fd ]]; then
|
||||
cp -a ${JCEF_PATH}/Frameworks $BASE_DIR/$JBRSDK_BUNDLE/Contents/
|
||||
fi
|
||||
if [ "$bundle_type" == "jfx_jcef" ]; then
|
||||
if [ "${bundle_type}" == "jcef" ] || [ "${bundle_type}" == "fd" ]; then
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
if [[ "${architecture}" == *aarch64* ]]; then
|
||||
copyJNF $BASE_DIR/$JBRSDK_BUNDLE/Contents
|
||||
fi
|
||||
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release > release
|
||||
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release
|
||||
COPYFILE_DISABLE=1 tar -pczf $JBSDK.tar.gz -C $BASE_DIR \
|
||||
--exclude='._*' --exclude='.DS_Store' --exclude='*~' \
|
||||
[ -f "${JBSDK}.tar.gz" ] && rm "${JBSDK}.tar.gz"
|
||||
COPYFILE_DISABLE=1 tar -pczf ${JBSDK}.tar.gz -C ${BASE_DIR} \
|
||||
--exclude='.DS_Store' --exclude='*~' \
|
||||
--exclude='Home/demo' --exclude='Home/man' --exclude='Home/sample' \
|
||||
$JBRSDK_BUNDLE || exit $?
|
||||
${JBRSDK_BUNDLE} || do_exit $?
|
||||
fi
|
||||
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
create_jbr "${bundle_type}" || exit $?
|
||||
create_jbr || do_exit $?
|
||||
|
||||
if [ "$bundle_type" == "jfx_jcef" ]; then
|
||||
make test-image || exit $?
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
make test-image CONF=$CONF_NAME || do_exit $?
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-osx-test-x64-b$build_number
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-osx-test-${architecture}-b$build_number
|
||||
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
COPYFILE_DISABLE=1 tar -pczf $JBRSDK_TEST.tar.gz -C build/macosx-x86_64-normal-server-release/images \
|
||||
--exclude='test/jdk/demos' test || exit $?
|
||||
fi
|
||||
[ -f "${JBRSDK_TEST}.tar.gz" ] && rm "${JBRSDK_TEST}.tar.gz"
|
||||
COPYFILE_DISABLE=1 tar -pczf ${JBRSDK_TEST}.tar.gz -C build/${CONF_NAME}/images \
|
||||
--exclude='test/jdk/demos' test || do_exit $?
|
||||
fi
|
||||
|
||||
do_exit 0
|
||||
@@ -1,99 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
|
||||
# By default imported modules should be located in ./jcef_mac
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
|
||||
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=./modular-sdk}"
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_mac}
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--with-boot-jdk=`/usr/libexec/java_home -v 11` \
|
||||
--enable-cds=yes || exit $?
|
||||
make clean CONF=macosx-x86_64-normal-server-fastdebug || exit $?
|
||||
make images CONF=macosx-x86_64-normal-server-fastdebug || exit $?
|
||||
|
||||
JSDK=build/macosx-x86_64-normal-server-fastdebug/images/jdk-bundle
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-fastdebug-b${build_number}
|
||||
|
||||
BASE_DIR=jre
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf $BASE_DIR
|
||||
mkdir $BASE_DIR || exit $?
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
cp -a $JSDK/jdk-$JBSDK_VERSION_WITH_DOTS.jdk $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
||||
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
cp -a ${JCEF_PATH}/Frameworks $BASE_DIR/$JBRSDK_BUNDLE/Contents/
|
||||
|
||||
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release > release
|
||||
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release
|
||||
|
||||
COPYFILE_DISABLE=1 \
|
||||
tar -pczf ${JBSDK}.tar.gz -C ${BASE_DIR} \
|
||||
--exclude='._*' --exclude='.DS_Store' --exclude='*~' \
|
||||
--exclude='Home/demo' --exclude='Home/man' --exclude='Home/sample' \
|
||||
${JBRSDK_BUNDLE} || exit $?
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
JRE_CONTENTS=$BASE_DIR/$JBR_BUNDLE/Contents
|
||||
JRE_HOME=$JRE_CONTENTS/Home
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
|
||||
mkdir -p $JRE_CONTENTS
|
||||
|
||||
if [ -d "$JRE_HOME" ]; then
|
||||
rm -rf $JRE_HOME
|
||||
fi
|
||||
|
||||
JBR=${JBR_BASE_NAME}-osx-x64-fastdebug-b${build_number}
|
||||
|
||||
$BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/bin/jlink \
|
||||
--module-path $BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules.list | sed s/" "//g) --output $JRE_HOME || exit $?
|
||||
grep -v "^JAVA_VERSION" $BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/release | grep -v "^MODULES" >> $JRE_HOME/release
|
||||
cp -R $BASE_DIR/$JBRSDK_BUNDLE/Contents/MacOS $JRE_CONTENTS
|
||||
cp $BASE_DIR/$JBRSDK_BUNDLE/Contents/Info.plist $JRE_CONTENTS
|
||||
cp -a ${JCEF_PATH}/Frameworks ${JRE_CONTENTS} || exit $?
|
||||
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
COPYFILE_DISABLE=1 tar -pczf $JBR.tar.gz --exclude='*.dSYM' --exclude='man' -C $BASE_DIR $JBR_BUNDLE || exit $?
|
||||
@@ -58,7 +58,7 @@ file="$APP_NAME.zip"
|
||||
|
||||
log "Zipping $file..."
|
||||
rm -rf "$file"
|
||||
ditto -c -k --sequesterRsrc --keepParent "$APP_DIRECTORY/Contents" "$file"
|
||||
ditto -c -k --sequesterRsrc --keepParent "$APP_DIRECTORY" "$file"
|
||||
|
||||
log "Notarizing $file..."
|
||||
rm -rf "altool.init.out" "altool.check.out"
|
||||
|
||||
@@ -26,17 +26,30 @@ log "Signing libraries and executables..."
|
||||
# -perm +111 searches for executables
|
||||
for f in \
|
||||
"Contents/Home/bin" \
|
||||
"Contents/Home/lib" \
|
||||
"Contents/Frameworks"; do
|
||||
"Contents/Home/lib"; do
|
||||
if [ -d "$APP_DIRECTORY/$f" ]; then
|
||||
find "$APP_DIRECTORY/$f" \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -perm +111 \) \
|
||||
-exec codesign --timestamp \
|
||||
-exec codesign --timestamp --force \
|
||||
-v -s "$JB_CERT" --options=runtime \
|
||||
--entitlements entitlements.xml {} \;
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -d "$APP_DIRECTORY/Contents/Frameworks" ]; then
|
||||
log "Signing frameworks..."
|
||||
for f in $APP_DIRECTORY/Contents/Frameworks/*; do
|
||||
find "$f" \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" \) \
|
||||
-exec codesign --timestamp --force \
|
||||
-v -s "$JB_CERT" \
|
||||
--entitlements entitlements.xml {} \;
|
||||
codesign --timestamp --force \
|
||||
-v -s "$JB_CERT" --options=runtime \
|
||||
--entitlements entitlements.xml "$f"
|
||||
done
|
||||
fi
|
||||
|
||||
log "Signing libraries in jars in $PWD"
|
||||
|
||||
# todo: add set -euo pipefail; into the inner sh -c
|
||||
@@ -55,7 +68,7 @@ find "$APP_DIRECTORY" -name '*.jar' \
|
||||
|
||||
find jarfolder \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "jattach" \) \
|
||||
-exec codesign --timestamp \
|
||||
-exec codesign --timestamp --force \
|
||||
-v -s "$JB_CERT" --options=runtime \
|
||||
--entitlements entitlements.xml {} \;
|
||||
|
||||
@@ -71,7 +84,7 @@ for f in \
|
||||
if [ -d "$APP_DIRECTORY/$f" ]; then
|
||||
find "$APP_DIRECTORY/$f" \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -perm +111 \) \
|
||||
-exec codesign --timestamp \
|
||||
-exec codesign --timestamp --force \
|
||||
-v -s "$JB_CERT" --options=runtime \
|
||||
--entitlements entitlements.xml {} \;
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -x
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
@@ -32,8 +32,10 @@ mkdir "$BACKUP_JMODS"
|
||||
|
||||
log "Unzipping $INPUT_FILE to $EXPLODED ..."
|
||||
tar -xzvf "$INPUT_FILE" --directory $EXPLODED
|
||||
rm "$INPUT_FILE"
|
||||
BUILD_NAME="$(ls "$EXPLODED")"
|
||||
sed -i '' s/BNDL/APPL/ $EXPLODED/$BUILD_NAME/Contents/Info.plist
|
||||
rm -f $EXPLODED/$BUILD_NAME/Contents/CodeResources
|
||||
rm "$INPUT_FILE"
|
||||
if test -d $EXPLODED/$BUILD_NAME/Contents/Home/jmods; then
|
||||
mv $EXPLODED/$BUILD_NAME/Contents/Home/jmods $BACKUP_JMODS
|
||||
fi
|
||||
@@ -125,8 +127,8 @@ log "Zipping $BUILD_NAME to $INPUT_FILE ..."
|
||||
mv $BACKUP_JMODS/jmods $EXPLODED/$BUILD_NAME/Contents/Home
|
||||
fi
|
||||
|
||||
COPYFILE_DISABLE=1 tar -pczf $INPUT_FILE --exclude='*.dSYM' --exclude='man' -C $EXPLODED $BUILD_NAME
|
||||
tar -pczvf $INPUT_FILE --exclude='*.dSYM' --exclude='man' -C $EXPLODED $BUILD_NAME
|
||||
log "Finished zipping"
|
||||
)
|
||||
rm -rf "$EXPLODED"
|
||||
log "Done"
|
||||
log "Done"
|
||||
30
jb/project/tools/patches/add_jcef_module.patch
Normal file
30
jb/project/tools/patches/add_jcef_module.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
diff --git modules.list modules.list
|
||||
index 33375b527c4..76539cbc0e0 100644
|
||||
--- modules.list
|
||||
+++ modules.list
|
||||
@@ -55,4 +55,7 @@ jdk.unsupported,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs,
|
||||
jdk.hotspot.agent,
|
||||
-jdk.jcmd
|
||||
+jdk.jcmd,
|
||||
+jcef,
|
||||
+gluegen.rt,
|
||||
+jogl.all
|
||||
diff --git src/java.desktop/share/classes/module-info.java src/java.desktop/share/classes/module-info.java
|
||||
index b663b382f52..3e9acdc0c27 100644
|
||||
--- src/java.desktop/share/classes/module-info.java
|
||||
+++ src/java.desktop/share/classes/module-info.java
|
||||
@@ -109,7 +109,11 @@ module java.desktop {
|
||||
// see make/GensrcModuleInfo.gmk
|
||||
exports sun.awt to
|
||||
jdk.accessibility,
|
||||
- jdk.unsupported.desktop;
|
||||
+ jdk.unsupported.desktop,
|
||||
+ jcef,
|
||||
+ jogl.all;
|
||||
+
|
||||
+ exports java.awt.peer to jcef;
|
||||
|
||||
exports java.awt.dnd.peer to jdk.unsupported.desktop;
|
||||
exports sun.awt.dnd to jdk.unsupported.desktop;
|
||||
27
jb/project/tools/patches/add_jcef_module_winaarch64.patch
Normal file
27
jb/project/tools/patches/add_jcef_module_winaarch64.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
diff --git modules.list modules.list
|
||||
index 33375b527c4..76539cbc0e0 100644
|
||||
--- modules.list
|
||||
+++ modules.list
|
||||
@@ -55,4 +55,5 @@ jdk.unsupported,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs,
|
||||
jdk.hotspot.agent,
|
||||
-jdk.jcmd
|
||||
+jdk.jcmd,
|
||||
+jcef
|
||||
diff --git src/java.desktop/share/classes/module-info.java src/java.desktop/share/classes/module-info.java
|
||||
index b663b382f52..3e9acdc0c27 100644
|
||||
--- src/java.desktop/share/classes/module-info.java
|
||||
+++ src/java.desktop/share/classes/module-info.java
|
||||
@@ -109,7 +109,10 @@ module java.desktop {
|
||||
// see make/GensrcModuleInfo.gmk
|
||||
exports sun.awt to
|
||||
jdk.accessibility,
|
||||
- jdk.unsupported.desktop;
|
||||
+ jdk.unsupported.desktop,
|
||||
+ jcef;
|
||||
+
|
||||
+ exports java.awt.peer to jcef;
|
||||
|
||||
exports java.awt.dnd.peer to jdk.unsupported.desktop;
|
||||
exports sun.awt.dnd to jdk.unsupported.desktop;
|
||||
@@ -1,7 +1,7 @@
|
||||
From 4f9a0ded48f51bdfb3ed7cc18df812c456d48a8c Mon Sep 17 00:00:00 2001
|
||||
From 7fd4796b1786511d28785bde7fe438ed27ee7d0d Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Wed, 14 Nov 2018 21:09:39 +0100
|
||||
Subject: [PATCH 01/50] Apply basic dcevm11 patch
|
||||
Subject: [PATCH 01/33] Apply basic dcevm11 patch
|
||||
|
||||
---
|
||||
src/hotspot/share/ci/ciObjectFactory.cpp | 25 +
|
||||
@@ -14,8 +14,9 @@ Subject: [PATCH 01/50] Apply basic dcevm11 patch
|
||||
.../share/classfile/classLoaderExt.cpp | 1 +
|
||||
src/hotspot/share/classfile/dictionary.cpp | 46 +-
|
||||
src/hotspot/share/classfile/dictionary.hpp | 10 +
|
||||
src/hotspot/share/classfile/javaClasses.cpp | 51 +
|
||||
src/hotspot/share/classfile/javaClasses.hpp | 52 +-
|
||||
src/hotspot/share/classfile/javaClasses.cpp | 63 +
|
||||
src/hotspot/share/classfile/javaClasses.hpp | 54 +-
|
||||
.../share/classfile/javaClasses.inline.hpp | 8 +
|
||||
src/hotspot/share/classfile/klassFactory.cpp | 3 +
|
||||
src/hotspot/share/classfile/klassFactory.hpp | 1 +
|
||||
.../share/classfile/loaderConstraints.cpp | 15 +-
|
||||
@@ -66,12 +67,12 @@ Subject: [PATCH 01/50] Apply basic dcevm11 patch
|
||||
src/hotspot/share/runtime/mutexLocker.cpp | 5 +-
|
||||
src/hotspot/share/runtime/mutexLocker.hpp | 2 +
|
||||
src/hotspot/share/runtime/reflection.cpp | 6 +
|
||||
62 files changed, 3530 insertions(+), 74 deletions(-)
|
||||
63 files changed, 3552 insertions(+), 74 deletions(-)
|
||||
create mode 100644 src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
create mode 100644 src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
|
||||
diff --git a/src/hotspot/share/ci/ciObjectFactory.cpp b/src/hotspot/share/ci/ciObjectFactory.cpp
|
||||
index a5dd94f4bb8..66bbe835e7b 100644
|
||||
index e6391b5f2ba..c8a03aa9ee9 100644
|
||||
--- a/src/hotspot/share/ci/ciObjectFactory.cpp
|
||||
+++ b/src/hotspot/share/ci/ciObjectFactory.cpp
|
||||
@@ -708,3 +708,28 @@ void ciObjectFactory::print() {
|
||||
@@ -125,7 +126,7 @@ index 1063c9853e1..3e9d48c4cdc 100644
|
||||
|
||||
#endif // SHARE_VM_CI_CIOBJECTFACTORY_HPP
|
||||
diff --git a/src/hotspot/share/classfile/classFileParser.cpp b/src/hotspot/share/classfile/classFileParser.cpp
|
||||
index 0d4862dd449..ea150df9104 100644
|
||||
index 2ea6b7e2331..5eaa97698d2 100644
|
||||
--- a/src/hotspot/share/classfile/classFileParser.cpp
|
||||
+++ b/src/hotspot/share/classfile/classFileParser.cpp
|
||||
@@ -954,6 +954,8 @@ void ClassFileParser::parse_interfaces(const ClassFileStream* const stream,
|
||||
@@ -137,7 +138,7 @@ index 0d4862dd449..ea150df9104 100644
|
||||
if (!interf->is_interface()) {
|
||||
THROW_MSG(vmSymbols::java_lang_IncompatibleClassChangeError(),
|
||||
err_msg("class %s can not implement %s, because it is not an interface (%s)",
|
||||
@@ -3747,7 +3749,7 @@ const InstanceKlass* ClassFileParser::parse_super_class(ConstantPool* const cp,
|
||||
@@ -3833,7 +3835,7 @@ const InstanceKlass* ClassFileParser::parse_super_class(ConstantPool* const cp,
|
||||
// However, make sure it is not an array type.
|
||||
bool is_array = false;
|
||||
if (cp->tag_at(super_class_index).is_klass()) {
|
||||
@@ -146,7 +147,7 @@ index 0d4862dd449..ea150df9104 100644
|
||||
if (need_verify)
|
||||
is_array = super_klass->is_array_klass();
|
||||
} else if (need_verify) {
|
||||
@@ -4415,7 +4417,10 @@ void ClassFileParser::set_precomputed_flags(InstanceKlass* ik) {
|
||||
@@ -4501,7 +4503,10 @@ void ClassFileParser::set_precomputed_flags(InstanceKlass* ik) {
|
||||
if (!_has_empty_finalizer) {
|
||||
if (_has_finalizer ||
|
||||
(super != NULL && super->has_finalizer())) {
|
||||
@@ -158,7 +159,7 @@ index 0d4862dd449..ea150df9104 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5792,6 +5797,7 @@ ClassFileParser::ClassFileParser(ClassFileStream* stream,
|
||||
@@ -5879,6 +5884,7 @@ ClassFileParser::ClassFileParser(ClassFileStream* stream,
|
||||
const InstanceKlass* host_klass,
|
||||
GrowableArray<Handle>* cp_patches,
|
||||
Publicity pub_level,
|
||||
@@ -166,7 +167,7 @@ index 0d4862dd449..ea150df9104 100644
|
||||
TRAPS) :
|
||||
_stream(stream),
|
||||
_requested_name(name),
|
||||
@@ -5850,7 +5856,8 @@ ClassFileParser::ClassFileParser(ClassFileStream* stream,
|
||||
@@ -5937,7 +5943,8 @@ ClassFileParser::ClassFileParser(ClassFileStream* stream,
|
||||
_has_finalizer(false),
|
||||
_has_empty_finalizer(false),
|
||||
_has_vanilla_constructor(false),
|
||||
@@ -176,7 +177,7 @@ index 0d4862dd449..ea150df9104 100644
|
||||
|
||||
_class_name = name != NULL ? name : vmSymbols::unknown_class_name();
|
||||
|
||||
@@ -6251,14 +6258,15 @@ void ClassFileParser::post_process_parsed_stream(const ClassFileStream* const st
|
||||
@@ -6338,14 +6345,15 @@ void ClassFileParser::post_process_parsed_stream(const ClassFileStream* const st
|
||||
CHECK);
|
||||
}
|
||||
Handle loader(THREAD, _loader_data->class_loader());
|
||||
@@ -195,7 +196,7 @@ index 0d4862dd449..ea150df9104 100644
|
||||
if (_super_klass != NULL) {
|
||||
if (_super_klass->has_nonstatic_concrete_methods()) {
|
||||
diff --git a/src/hotspot/share/classfile/classFileParser.hpp b/src/hotspot/share/classfile/classFileParser.hpp
|
||||
index 9f7204be9b6..3db14b678f3 100644
|
||||
index 3bdfd34e39f..d792ab4bb3f 100644
|
||||
--- a/src/hotspot/share/classfile/classFileParser.hpp
|
||||
+++ b/src/hotspot/share/classfile/classFileParser.hpp
|
||||
@@ -115,6 +115,9 @@ class ClassFileParser {
|
||||
@@ -208,7 +209,7 @@ index 9f7204be9b6..3db14b678f3 100644
|
||||
enum { fixed_buffer_size = 128 };
|
||||
u_char _linenumbertable_buffer[fixed_buffer_size];
|
||||
|
||||
@@ -496,6 +499,9 @@ class ClassFileParser {
|
||||
@@ -500,6 +503,9 @@ class ClassFileParser {
|
||||
FieldLayoutInfo* info,
|
||||
TRAPS);
|
||||
|
||||
@@ -218,7 +219,7 @@ index 9f7204be9b6..3db14b678f3 100644
|
||||
public:
|
||||
ClassFileParser(ClassFileStream* stream,
|
||||
Symbol* name,
|
||||
@@ -504,6 +510,7 @@ class ClassFileParser {
|
||||
@@ -508,6 +514,7 @@ class ClassFileParser {
|
||||
const InstanceKlass* host_klass,
|
||||
GrowableArray<Handle>* cp_patches,
|
||||
Publicity pub_level,
|
||||
@@ -226,7 +227,7 @@ index 9f7204be9b6..3db14b678f3 100644
|
||||
TRAPS);
|
||||
|
||||
~ClassFileParser();
|
||||
@@ -532,6 +539,7 @@ class ClassFileParser {
|
||||
@@ -536,6 +543,7 @@ class ClassFileParser {
|
||||
ClassLoaderData* loader_data() const { return _loader_data; }
|
||||
const Symbol* class_name() const { return _class_name; }
|
||||
const InstanceKlass* super_klass() const { return _super_klass; }
|
||||
@@ -235,10 +236,10 @@ index 9f7204be9b6..3db14b678f3 100644
|
||||
ReferenceType reference_type() const { return _rt; }
|
||||
AccessFlags access_flags() const { return _access_flags; }
|
||||
diff --git a/src/hotspot/share/classfile/classLoader.cpp b/src/hotspot/share/classfile/classLoader.cpp
|
||||
index 2c73ef93934..28ed54b93e1 100644
|
||||
index e10d32ea7b7..079558bb244 100644
|
||||
--- a/src/hotspot/share/classfile/classLoader.cpp
|
||||
+++ b/src/hotspot/share/classfile/classLoader.cpp
|
||||
@@ -1501,6 +1501,7 @@ InstanceKlass* ClassLoader::load_class(Symbol* name, bool search_append_only, TR
|
||||
@@ -1502,6 +1502,7 @@ InstanceKlass* ClassLoader::load_class(Symbol* name, bool search_append_only, TR
|
||||
protection_domain,
|
||||
NULL, // host_klass
|
||||
NULL, // cp_patches
|
||||
@@ -247,10 +248,10 @@ index 2c73ef93934..28ed54b93e1 100644
|
||||
if (HAS_PENDING_EXCEPTION) {
|
||||
if (DumpSharedSpaces) {
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
index c58026ae192..25103fff2c0 100644
|
||||
index 37bd9d8eed5..bcbd2548ffc 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
@@ -1242,6 +1242,12 @@ void ClassLoaderDataGraph::dictionary_classes_do(void f(InstanceKlass*)) {
|
||||
@@ -1245,6 +1245,12 @@ void ClassLoaderDataGraph::dictionary_classes_do(void f(InstanceKlass*)) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,7 +264,7 @@ index c58026ae192..25103fff2c0 100644
|
||||
// Only walks the classes defined in this class loader.
|
||||
void ClassLoaderDataGraph::dictionary_classes_do(void f(InstanceKlass*, TRAPS), TRAPS) {
|
||||
Thread* thread = Thread::current();
|
||||
@@ -1251,6 +1257,12 @@ void ClassLoaderDataGraph::dictionary_classes_do(void f(InstanceKlass*, TRAPS),
|
||||
@@ -1254,6 +1260,12 @@ void ClassLoaderDataGraph::dictionary_classes_do(void f(InstanceKlass*, TRAPS),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,7 +277,7 @@ index c58026ae192..25103fff2c0 100644
|
||||
// Walks all entries in the dictionary including entries initiated by this class loader.
|
||||
void ClassLoaderDataGraph::dictionary_all_entries_do(void f(InstanceKlass*, ClassLoaderData*)) {
|
||||
Thread* thread = Thread::current();
|
||||
@@ -1372,11 +1384,15 @@ bool ClassLoaderDataGraph::do_unloading(bool clean_previous_versions) {
|
||||
@@ -1375,11 +1387,15 @@ bool ClassLoaderDataGraph::do_unloading(bool clean_previous_versions) {
|
||||
// Mark metadata seen on the stack only so we can delete unneeded entries.
|
||||
// Only walk all metadata, including the expensive code cache walk, for Full GC
|
||||
// and only if class redefinition and if there's previous versions of
|
||||
@@ -293,7 +294,7 @@ index c58026ae192..25103fff2c0 100644
|
||||
|
||||
// Save previous _unloading pointer for CMS which may add to unloading list before
|
||||
// purging and we don't want to rewalk the previously unloaded class loader data.
|
||||
@@ -1386,10 +1402,12 @@ bool ClassLoaderDataGraph::do_unloading(bool clean_previous_versions) {
|
||||
@@ -1389,10 +1405,12 @@ bool ClassLoaderDataGraph::do_unloading(bool clean_previous_versions) {
|
||||
while (data != NULL) {
|
||||
if (data->is_alive()) {
|
||||
// clean metaspace
|
||||
@@ -307,7 +308,7 @@ index c58026ae192..25103fff2c0 100644
|
||||
data = data->next();
|
||||
loaders_processed++;
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.hpp b/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
index 152cc26efdb..7e357929971 100644
|
||||
index aa6b25c0bd1..b5a7cf21c85 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
@@ -125,6 +125,11 @@ class ClassLoaderDataGraph : public AllStatic {
|
||||
@@ -335,7 +336,7 @@ index f5157e07c76..e9e52f00e8a 100644
|
||||
|
||||
if (HAS_PENDING_EXCEPTION) {
|
||||
diff --git a/src/hotspot/share/classfile/dictionary.cpp b/src/hotspot/share/classfile/dictionary.cpp
|
||||
index 3ac1ca69ae5..118730f1b83 100644
|
||||
index 1ed49636e5b..4b27e572593 100644
|
||||
--- a/src/hotspot/share/classfile/dictionary.cpp
|
||||
+++ b/src/hotspot/share/classfile/dictionary.cpp
|
||||
@@ -245,6 +245,19 @@ void Dictionary::classes_do(void f(InstanceKlass*)) {
|
||||
@@ -448,10 +449,10 @@ index d26f1f11fb4..fd4b134d7a7 100644
|
||||
|
||||
// An entry in the class loader data dictionaries, this describes a class as
|
||||
diff --git a/src/hotspot/share/classfile/javaClasses.cpp b/src/hotspot/share/classfile/javaClasses.cpp
|
||||
index 438e7aa4ec9..a89443d22ea 100644
|
||||
index 17ae8be1d02..a659cd23fc8 100644
|
||||
--- a/src/hotspot/share/classfile/javaClasses.cpp
|
||||
+++ b/src/hotspot/share/classfile/javaClasses.cpp
|
||||
@@ -2443,6 +2443,8 @@ void java_lang_Throwable::fill_in_stack_trace(Handle throwable, const methodHand
|
||||
@@ -2428,6 +2428,8 @@ void java_lang_Throwable::fill_in_stack_trace(Handle throwable, const methodHand
|
||||
skip_throwableInit_check = true;
|
||||
}
|
||||
}
|
||||
@@ -460,7 +461,7 @@ index 438e7aa4ec9..a89443d22ea 100644
|
||||
if (method->is_hidden()) {
|
||||
if (skip_hidden) continue;
|
||||
}
|
||||
@@ -3625,6 +3627,50 @@ void java_lang_invoke_DirectMethodHandle::serialize_offsets(SerializeClosure* f)
|
||||
@@ -3610,6 +3612,62 @@ void java_lang_invoke_DirectMethodHandle::serialize_offsets(SerializeClosure* f)
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -478,14 +479,20 @@ index 438e7aa4ec9..a89443d22ea 100644
|
||||
+ dmh->long_field_put(_static_offset_offset, static_offset);
|
||||
+}
|
||||
+
|
||||
+#define DIRECTMETHODHANDLE_STATIC_ACCESSOR_FIELDS_DO(macro) \
|
||||
+ macro(_static_offset_offset, k, vmSymbols::static_offset_name(), long_signature, false)
|
||||
+
|
||||
+void java_lang_invoke_DirectMethodHandle_StaticAccessor::compute_offsets() {
|
||||
+ Klass* klass_oop = SystemDictionary::DirectMethodHandle_StaticAccessor_klass();
|
||||
+ if (klass_oop != NULL) {
|
||||
+ compute_offset(_static_offset_offset, InstanceKlass::cast(klass_oop), vmSymbols::static_offset_name(), vmSymbols::long_signature());
|
||||
+ }
|
||||
+ InstanceKlass* k = SystemDictionary::DirectMethodHandle_StaticAccessor_klass();
|
||||
+ DIRECTMETHODHANDLE_STATIC_ACCESSOR_FIELDS_DO(FIELD_COMPUTE_OFFSET);
|
||||
+}
|
||||
+
|
||||
+#if INCLUDE_CDS
|
||||
+void java_lang_invoke_DirectMethodHandle_StaticAccessor::serialize_offsets(SerializeClosure* f) {
|
||||
+ DIRECTMETHODHANDLE_STATIC_ACCESSOR_FIELDS_DO(FIELD_SERIALIZE_OFFSET);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+// Support for java_lang_invoke_DirectMethodHandle$Accessor
|
||||
+
|
||||
+int java_lang_invoke_DirectMethodHandle_Accessor::_field_offset_offset;
|
||||
@@ -500,18 +507,24 @@ index 438e7aa4ec9..a89443d22ea 100644
|
||||
+ dmh->int_field_put(_field_offset_offset, field_offset);
|
||||
+}
|
||||
+
|
||||
+#define DIRECTMETHODHANDLE_ACCESSOR_FIELDS_DO(macro) \
|
||||
+ macro(_field_offset_offset, k, vmSymbols::field_offset_name(), int_signature, false)
|
||||
+
|
||||
+void java_lang_invoke_DirectMethodHandle_Accessor::compute_offsets() {
|
||||
+ Klass* klass_oop = SystemDictionary::DirectMethodHandle_Accessor_klass();
|
||||
+ if (klass_oop != NULL) {
|
||||
+ compute_offset(_field_offset_offset, InstanceKlass::cast(klass_oop), vmSymbols::field_offset_name(), vmSymbols::int_signature());
|
||||
+ }
|
||||
+ InstanceKlass* k = SystemDictionary::DirectMethodHandle_Accessor_klass();
|
||||
+ DIRECTMETHODHANDLE_ACCESSOR_FIELDS_DO(FIELD_COMPUTE_OFFSET);
|
||||
+}
|
||||
+
|
||||
+#if INCLUDE_CDS
|
||||
+void java_lang_invoke_DirectMethodHandle_Accessor::serialize_offsets(SerializeClosure* f) {
|
||||
+ DIRECTMETHODHANDLE_ACCESSOR_FIELDS_DO(FIELD_SERIALIZE_OFFSET);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
// Support for java_lang_invoke_MethodHandle
|
||||
|
||||
int java_lang_invoke_MethodHandle::_type_offset;
|
||||
@@ -3811,6 +3857,11 @@ void java_lang_invoke_ResolvedMethodName::set_vmtarget(oop resolved_method, Meth
|
||||
@@ -3796,6 +3854,11 @@ void java_lang_invoke_ResolvedMethodName::set_vmtarget(oop resolved_method, Meth
|
||||
resolved_method->address_field_put(_vmtarget_offset, (address)m);
|
||||
}
|
||||
|
||||
@@ -524,10 +537,19 @@ index 438e7aa4ec9..a89443d22ea 100644
|
||||
// lookup ResolvedMethod oop in the table, or create a new one and intern it
|
||||
oop resolved_method = ResolvedMethodTable::find_method(m());
|
||||
diff --git a/src/hotspot/share/classfile/javaClasses.hpp b/src/hotspot/share/classfile/javaClasses.hpp
|
||||
index bd9cdca3fe3..ceb1670df5d 100644
|
||||
index 97df4a0bdea..2e121e19f19 100644
|
||||
--- a/src/hotspot/share/classfile/javaClasses.hpp
|
||||
+++ b/src/hotspot/share/classfile/javaClasses.hpp
|
||||
@@ -253,10 +253,10 @@ class java_lang_Class : AllStatic {
|
||||
@@ -67,6 +67,8 @@
|
||||
f(java_lang_invoke_LambdaForm) \
|
||||
f(java_lang_invoke_MethodType) \
|
||||
f(java_lang_invoke_CallSite) \
|
||||
+ f(java_lang_invoke_DirectMethodHandle_StaticAccessor) \
|
||||
+ f(java_lang_invoke_DirectMethodHandle_Accessor) \
|
||||
f(java_lang_invoke_MethodHandleNatives_CallSiteContext) \
|
||||
f(java_security_AccessControlContext) \
|
||||
f(java_lang_reflect_AccessibleObject) \
|
||||
@@ -253,10 +255,10 @@ class java_lang_Class : AllStatic {
|
||||
static void set_init_lock(oop java_class, oop init_lock);
|
||||
static void set_protection_domain(oop java_class, oop protection_domain);
|
||||
static void set_class_loader(oop java_class, oop class_loader);
|
||||
@@ -539,7 +561,7 @@ index bd9cdca3fe3..ceb1670df5d 100644
|
||||
static void allocate_fixup_lists();
|
||||
static void compute_offsets();
|
||||
|
||||
@@ -1055,6 +1055,55 @@ class java_lang_invoke_DirectMethodHandle: AllStatic {
|
||||
@@ -1048,6 +1050,55 @@ class java_lang_invoke_DirectMethodHandle: AllStatic {
|
||||
static int member_offset_in_bytes() { return _member_offset; }
|
||||
};
|
||||
|
||||
@@ -562,9 +584,9 @@ index bd9cdca3fe3..ceb1670df5d 100644
|
||||
+ static bool is_subclass(Klass* klass) {
|
||||
+ return klass->is_subclass_of(SystemDictionary::DirectMethodHandle_StaticAccessor_klass());
|
||||
+ }
|
||||
+ static bool is_instance(oop obj) {
|
||||
+ return obj != NULL && is_subclass(obj->klass());
|
||||
+ }
|
||||
+ static bool is_instance(oop obj);
|
||||
+
|
||||
+ static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
|
||||
+};
|
||||
+
|
||||
+// Interface to java.lang.invoke.DirectMethodHandle$Accessor objects
|
||||
@@ -586,16 +608,16 @@ index bd9cdca3fe3..ceb1670df5d 100644
|
||||
+ static bool is_subclass(Klass* klass) {
|
||||
+ return klass->is_subclass_of(SystemDictionary::DirectMethodHandle_Accessor_klass());
|
||||
+ }
|
||||
+ static bool is_instance(oop obj) {
|
||||
+ return obj != NULL && is_subclass(obj->klass());
|
||||
+ }
|
||||
+ static bool is_instance(oop obj);
|
||||
+
|
||||
+ static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
|
||||
+};
|
||||
+
|
||||
+
|
||||
// Interface to java.lang.invoke.LambdaForm objects
|
||||
// (These are a private interface for managing adapter code generation.)
|
||||
|
||||
@@ -1106,6 +1155,7 @@ class java_lang_invoke_ResolvedMethodName : AllStatic {
|
||||
@@ -1099,6 +1150,7 @@ class java_lang_invoke_ResolvedMethodName : AllStatic {
|
||||
|
||||
static Method* vmtarget(oop resolved_method);
|
||||
static void set_vmtarget(oop resolved_method, Method* method);
|
||||
@@ -603,6 +625,25 @@ index bd9cdca3fe3..ceb1670df5d 100644
|
||||
|
||||
// find or create resolved member name
|
||||
static oop find_resolved_method(const methodHandle& m, TRAPS);
|
||||
diff --git a/src/hotspot/share/classfile/javaClasses.inline.hpp b/src/hotspot/share/classfile/javaClasses.inline.hpp
|
||||
index 6c5787f4b70..ba9cffa8c62 100644
|
||||
--- a/src/hotspot/share/classfile/javaClasses.inline.hpp
|
||||
+++ b/src/hotspot/share/classfile/javaClasses.inline.hpp
|
||||
@@ -175,6 +175,14 @@ inline bool java_lang_invoke_DirectMethodHandle::is_instance(oop obj) {
|
||||
return obj != NULL && is_subclass(obj->klass());
|
||||
}
|
||||
|
||||
+inline bool java_lang_invoke_DirectMethodHandle_StaticAccessor::is_instance(oop obj) {
|
||||
+ return obj != NULL && is_subclass(obj->klass());
|
||||
+}
|
||||
+
|
||||
+inline bool java_lang_invoke_DirectMethodHandle_Accessor::is_instance(oop obj) {
|
||||
+ return obj != NULL && is_subclass(obj->klass());
|
||||
+}
|
||||
+
|
||||
inline bool java_lang_Module::is_instance(oop obj) {
|
||||
return obj != NULL && obj->klass() == SystemDictionary::Module_klass();
|
||||
}
|
||||
diff --git a/src/hotspot/share/classfile/klassFactory.cpp b/src/hotspot/share/classfile/klassFactory.cpp
|
||||
index 3614480f16b..355016c8f61 100644
|
||||
--- a/src/hotspot/share/classfile/klassFactory.cpp
|
||||
@@ -644,10 +685,10 @@ index c08f8b9a119..b7b96c5cfdc 100644
|
||||
public:
|
||||
static InstanceKlass* check_shared_class_file_load_hook(
|
||||
diff --git a/src/hotspot/share/classfile/loaderConstraints.cpp b/src/hotspot/share/classfile/loaderConstraints.cpp
|
||||
index 9cd141bbfa2..e4a23e8a27c 100644
|
||||
index 7cccf23efb7..a26b9d1cb55 100644
|
||||
--- a/src/hotspot/share/classfile/loaderConstraints.cpp
|
||||
+++ b/src/hotspot/share/classfile/loaderConstraints.cpp
|
||||
@@ -87,6 +87,19 @@ LoaderConstraintEntry** LoaderConstraintTable::find_loader_constraint(
|
||||
@@ -90,6 +90,19 @@ LoaderConstraintEntry** LoaderConstraintTable::find_loader_constraint(
|
||||
return pp;
|
||||
}
|
||||
|
||||
@@ -667,7 +708,7 @@ index 9cd141bbfa2..e4a23e8a27c 100644
|
||||
|
||||
void LoaderConstraintTable::purge_loader_constraints() {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
|
||||
@@ -442,7 +455,7 @@ void LoaderConstraintTable::verify(PlaceholderTable* placeholders) {
|
||||
@@ -445,7 +458,7 @@ void LoaderConstraintTable::verify(PlaceholderTable* placeholders) {
|
||||
if (k != NULL) {
|
||||
// We found the class in the dictionary, so we should
|
||||
// make sure that the Klass* matches what we already have.
|
||||
@@ -691,7 +732,7 @@ index 8a7a1248e62..611e18aaf85 100644
|
||||
bool add_entry(Symbol* name, InstanceKlass* klass1, Handle loader1,
|
||||
InstanceKlass* klass2, Handle loader2);
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.cpp b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
index 91dc9faeccb..9dbd6cc9c12 100644
|
||||
index f21fbaf2b3b..dc871ec569f 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
@@ -201,6 +201,7 @@ Klass* SystemDictionary::resolve_or_fail(Symbol* class_name, Handle class_loader
|
||||
@@ -783,7 +824,7 @@ index 91dc9faeccb..9dbd6cc9c12 100644
|
||||
} );
|
||||
|
||||
return k;
|
||||
@@ -1554,11 +1567,12 @@ static void post_class_define_event(InstanceKlass* k, const ClassLoaderData* def
|
||||
@@ -1555,11 +1568,12 @@ static void post_class_define_event(InstanceKlass* k, const ClassLoaderData* def
|
||||
}
|
||||
}
|
||||
|
||||
@@ -797,7 +838,7 @@ index 91dc9faeccb..9dbd6cc9c12 100644
|
||||
|
||||
// for bootstrap and other parallel classloaders don't acquire lock,
|
||||
// use placeholder token
|
||||
@@ -1583,7 +1597,11 @@ void SystemDictionary::define_instance_class(InstanceKlass* k, TRAPS) {
|
||||
@@ -1584,7 +1598,11 @@ void SystemDictionary::define_instance_class(InstanceKlass* k, TRAPS) {
|
||||
Symbol* name_h = k->name();
|
||||
Dictionary* dictionary = loader_data->dictionary();
|
||||
unsigned int d_hash = dictionary->compute_hash(name_h);
|
||||
@@ -810,7 +851,7 @@ index 91dc9faeccb..9dbd6cc9c12 100644
|
||||
|
||||
// Register class just loaded with class loader (placed in Vector)
|
||||
// Note we do this before updating the dictionary, as this can
|
||||
@@ -1617,7 +1635,7 @@ void SystemDictionary::define_instance_class(InstanceKlass* k, TRAPS) {
|
||||
@@ -1618,7 +1636,7 @@ void SystemDictionary::define_instance_class(InstanceKlass* k, TRAPS) {
|
||||
k->eager_initialize(THREAD);
|
||||
|
||||
// notify jvmti
|
||||
@@ -819,7 +860,7 @@ index 91dc9faeccb..9dbd6cc9c12 100644
|
||||
assert(THREAD->is_Java_thread(), "thread->is_Java_thread()");
|
||||
JvmtiExport::post_class_load((JavaThread *) THREAD, k);
|
||||
|
||||
@@ -1695,7 +1713,7 @@ InstanceKlass* SystemDictionary::find_or_define_instance_class(Symbol* class_nam
|
||||
@@ -1696,7 +1714,7 @@ InstanceKlass* SystemDictionary::find_or_define_instance_class(Symbol* class_nam
|
||||
}
|
||||
}
|
||||
|
||||
@@ -828,7 +869,7 @@ index 91dc9faeccb..9dbd6cc9c12 100644
|
||||
|
||||
Handle linkage_exception = Handle(); // null handle
|
||||
|
||||
@@ -1818,6 +1836,18 @@ void SystemDictionary::add_to_hierarchy(InstanceKlass* k, TRAPS) {
|
||||
@@ -1819,6 +1837,18 @@ void SystemDictionary::add_to_hierarchy(InstanceKlass* k, TRAPS) {
|
||||
CodeCache::flush_dependents_on(k);
|
||||
}
|
||||
|
||||
@@ -847,7 +888,7 @@ index 91dc9faeccb..9dbd6cc9c12 100644
|
||||
// ----------------------------------------------------------------------------
|
||||
// GC support
|
||||
|
||||
@@ -2089,7 +2119,7 @@ void SystemDictionary::check_constraints(unsigned int d_hash,
|
||||
@@ -2115,7 +2145,7 @@ void SystemDictionary::check_constraints(unsigned int d_hash,
|
||||
// also hold array classes.
|
||||
|
||||
assert(check->is_instance_klass(), "noninstance in systemdictionary");
|
||||
@@ -857,10 +898,10 @@ index 91dc9faeccb..9dbd6cc9c12 100644
|
||||
ss.print("loader %s", loader_data->loader_name_and_id());
|
||||
ss.print(" attempted duplicate %s definition for %s. (%s)",
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.hpp b/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
index d38dd0fd003..717f34ce9a0 100644
|
||||
index a14728df757..b956c6a7519 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
@@ -158,6 +158,8 @@ class OopStorage;
|
||||
@@ -161,6 +161,8 @@ class OopStorage;
|
||||
\
|
||||
/* support for dynamic typing; it's OK if these are NULL in earlier JDKs */ \
|
||||
do_klass(DirectMethodHandle_klass, java_lang_invoke_DirectMethodHandle, Opt ) \
|
||||
@@ -869,7 +910,7 @@ index d38dd0fd003..717f34ce9a0 100644
|
||||
do_klass(MethodHandle_klass, java_lang_invoke_MethodHandle, Pre ) \
|
||||
do_klass(VarHandle_klass, java_lang_invoke_VarHandle, Pre ) \
|
||||
do_klass(MemberName_klass, java_lang_invoke_MemberName, Pre ) \
|
||||
@@ -315,6 +317,7 @@ public:
|
||||
@@ -321,6 +323,7 @@ public:
|
||||
Handle class_loader,
|
||||
Handle protection_domain,
|
||||
ClassFileStream* st,
|
||||
@@ -877,9 +918,9 @@ index d38dd0fd003..717f34ce9a0 100644
|
||||
TRAPS);
|
||||
|
||||
// Lookup an already loaded class. If not found NULL is returned.
|
||||
@@ -452,6 +455,10 @@ public:
|
||||
}
|
||||
static BasicType box_klass_type(Klass* k); // inverse of box_klass
|
||||
@@ -465,6 +468,10 @@ public:
|
||||
static bool is_well_known_klass(Symbol* class_name);
|
||||
#endif
|
||||
|
||||
+ // Enhanced class redefinition
|
||||
+ static void remove_from_hierarchy(InstanceKlass* k);
|
||||
@@ -888,7 +929,7 @@ index d38dd0fd003..717f34ce9a0 100644
|
||||
protected:
|
||||
// Returns the class loader data to be used when looking up/updating the
|
||||
// system dictionary.
|
||||
@@ -645,7 +652,7 @@ protected:
|
||||
@@ -658,7 +665,7 @@ protected:
|
||||
// after waiting, but before reentering SystemDictionary_lock
|
||||
// to preserve lock order semantics.
|
||||
static void double_lock_wait(Handle lockObject, TRAPS);
|
||||
@@ -898,7 +939,7 @@ index d38dd0fd003..717f34ce9a0 100644
|
||||
Handle class_loader,
|
||||
InstanceKlass* k, TRAPS);
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionaryShared.cpp b/src/hotspot/share/classfile/systemDictionaryShared.cpp
|
||||
index ed75ecd9261..1f1441f3ffb 100644
|
||||
index ad638e26579..32de261588a 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionaryShared.cpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionaryShared.cpp
|
||||
@@ -520,7 +520,7 @@ InstanceKlass* SystemDictionaryShared::find_or_load_shared_class(
|
||||
@@ -911,10 +952,10 @@ index ed75ecd9261..1f1441f3ffb 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/hotspot/share/classfile/verifier.cpp b/src/hotspot/share/classfile/verifier.cpp
|
||||
index ea4f74fc783..472216b6a40 100644
|
||||
index 89f3b236ccb..c52e2531486 100644
|
||||
--- a/src/hotspot/share/classfile/verifier.cpp
|
||||
+++ b/src/hotspot/share/classfile/verifier.cpp
|
||||
@@ -237,7 +237,7 @@ bool Verifier::is_eligible_for_verification(InstanceKlass* klass, bool should_ve
|
||||
@@ -244,7 +244,7 @@ bool Verifier::is_eligible_for_verification(InstanceKlass* klass, bool should_ve
|
||||
Symbol* name = klass->name();
|
||||
Klass* refl_magic_klass = SystemDictionary::reflect_MagicAccessorImpl_klass();
|
||||
|
||||
@@ -936,10 +977,10 @@ index 05239c57866..c1357bde0ed 100644
|
||||
methodHandle _method; // current method being verified
|
||||
VerificationType _this_type; // the verification type of the current class
|
||||
diff --git a/src/hotspot/share/classfile/vmSymbols.hpp b/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
index 73645b42857..e2bac31b27f 100644
|
||||
index cef3f530cbc..17f7e720c95 100644
|
||||
--- a/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
+++ b/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
@@ -284,6 +284,8 @@
|
||||
@@ -287,6 +287,8 @@
|
||||
template(java_lang_invoke_CallSite, "java/lang/invoke/CallSite") \
|
||||
template(java_lang_invoke_ConstantCallSite, "java/lang/invoke/ConstantCallSite") \
|
||||
template(java_lang_invoke_DirectMethodHandle, "java/lang/invoke/DirectMethodHandle") \
|
||||
@@ -948,7 +989,7 @@ index 73645b42857..e2bac31b27f 100644
|
||||
template(java_lang_invoke_MutableCallSite, "java/lang/invoke/MutableCallSite") \
|
||||
template(java_lang_invoke_VolatileCallSite, "java/lang/invoke/VolatileCallSite") \
|
||||
template(java_lang_invoke_MethodHandle, "java/lang/invoke/MethodHandle") \
|
||||
@@ -444,6 +446,12 @@
|
||||
@@ -447,6 +449,12 @@
|
||||
template(module_entry_name, "module_entry") \
|
||||
template(resolved_references_name, "<resolved_references>") \
|
||||
template(init_lock_name, "<init_lock>") \
|
||||
@@ -962,7 +1003,7 @@ index 73645b42857..e2bac31b27f 100644
|
||||
/* name symbols needed by intrinsics */ \
|
||||
VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, template, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) \
|
||||
diff --git a/src/hotspot/share/gc/cms/compactibleFreeListSpace.cpp b/src/hotspot/share/gc/cms/compactibleFreeListSpace.cpp
|
||||
index 7b9096d73be..a93f764f1b9 100644
|
||||
index 17d563338b8..4c9918627a2 100644
|
||||
--- a/src/hotspot/share/gc/cms/compactibleFreeListSpace.cpp
|
||||
+++ b/src/hotspot/share/gc/cms/compactibleFreeListSpace.cpp
|
||||
@@ -376,6 +376,12 @@ CompactibleFreeListSpace::CompactibleFreeListSpace(BlockOffsetSharedArray* bs, M
|
||||
@@ -978,7 +1019,7 @@ index 7b9096d73be..a93f764f1b9 100644
|
||||
// Like CompactibleSpace forward() but always calls cross_threshold() to
|
||||
// update the block offset table. Removed initialize_threshold call because
|
||||
// CFLS does not use a block offset array for contiguous spaces.
|
||||
@@ -2190,7 +2196,8 @@ CompactibleFreeListSpace::refillLinearAllocBlock(LinearAllocBlock* blk) {
|
||||
@@ -2203,7 +2209,8 @@ CompactibleFreeListSpace::refillLinearAllocBlock(LinearAllocBlock* blk) {
|
||||
|
||||
// Support for compaction
|
||||
void CompactibleFreeListSpace::prepare_for_compaction(CompactPoint* cp) {
|
||||
@@ -988,7 +1029,7 @@ index 7b9096d73be..a93f764f1b9 100644
|
||||
// Prepare_for_compaction() uses the space between live objects
|
||||
// so that later phase can skip dead space quickly. So verification
|
||||
// of the free lists doesn't work after.
|
||||
@@ -2208,7 +2215,7 @@ void CompactibleFreeListSpace::adjust_pointers() {
|
||||
@@ -2221,7 +2228,7 @@ void CompactibleFreeListSpace::adjust_pointers() {
|
||||
}
|
||||
|
||||
void CompactibleFreeListSpace::compact() {
|
||||
@@ -1195,10 +1236,10 @@ index cf96ade0ef0..b6187dae4d0 100644
|
||||
|
||||
static void follow_klass(Klass* klass);
|
||||
diff --git a/src/hotspot/share/gc/shared/gcConfig.cpp b/src/hotspot/share/gc/shared/gcConfig.cpp
|
||||
index ddc84c1d2a4..8aac2b39e1e 100644
|
||||
index 8c42e43b00d..9779df92447 100644
|
||||
--- a/src/hotspot/share/gc/shared/gcConfig.cpp
|
||||
+++ b/src/hotspot/share/gc/shared/gcConfig.cpp
|
||||
@@ -101,7 +101,10 @@ void GCConfig::fail_if_unsupported_gc_is_selected() {
|
||||
@@ -106,7 +106,10 @@ void GCConfig::fail_if_unsupported_gc_is_selected() {
|
||||
}
|
||||
|
||||
void GCConfig::select_gc_ergonomically() {
|
||||
@@ -1643,10 +1684,10 @@ index 81998728f66..b9ccdee8cca 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp b/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp
|
||||
index b532101c9b5..8afe8985026 100644
|
||||
index 6cf7aec68f8..61a406377ee 100644
|
||||
--- a/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp
|
||||
+++ b/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp
|
||||
@@ -1467,6 +1467,7 @@ static InstanceKlass* create_new_instance_klass(InstanceKlass* ik, ClassFileStre
|
||||
@@ -1471,6 +1471,7 @@ static InstanceKlass* create_new_instance_klass(InstanceKlass* ik, ClassFileStre
|
||||
NULL, // host klass
|
||||
NULL, // cp_patches
|
||||
ClassFileParser::INTERNAL, // internal visibility
|
||||
@@ -1655,7 +1696,7 @@ index b532101c9b5..8afe8985026 100644
|
||||
if (HAS_PENDING_EXCEPTION) {
|
||||
log_pending_exception(PENDING_EXCEPTION);
|
||||
diff --git a/src/hotspot/share/memory/universe.cpp b/src/hotspot/share/memory/universe.cpp
|
||||
index 4a1bd297b72..7ecb950b231 100644
|
||||
index eab9576bcc6..c3b1d766db8 100644
|
||||
--- a/src/hotspot/share/memory/universe.cpp
|
||||
+++ b/src/hotspot/share/memory/universe.cpp
|
||||
@@ -153,6 +153,7 @@ int Universe::_base_vtable_size = 0;
|
||||
@@ -1878,7 +1919,7 @@ index 2a93500b794..2a9eb978b43 100644
|
||||
|
||||
// RedefineClasses support
|
||||
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
index 9ba36f2de3f..8a262bc3735 100644
|
||||
index 34aed3fbb3a..30b02a2ba0a 100644
|
||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
@@ -832,7 +832,8 @@ bool InstanceKlass::link_class_impl(bool throw_verifyerror, TRAPS) {
|
||||
@@ -1972,7 +2013,7 @@ index 9ba36f2de3f..8a262bc3735 100644
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
@@ -3532,7 +3582,7 @@ void InstanceKlass::verify_on(outputStream* st) {
|
||||
@@ -3564,7 +3614,7 @@ void InstanceKlass::verify_on(outputStream* st) {
|
||||
}
|
||||
|
||||
guarantee(sib->is_klass(), "should be klass");
|
||||
@@ -2145,10 +2186,10 @@ index b77a19deb38..5573b10f021 100644
|
||||
// Compiler support
|
||||
static ByteSize super_offset() { return in_ByteSize(offset_of(Klass, _super)); }
|
||||
diff --git a/src/hotspot/share/oops/method.cpp b/src/hotspot/share/oops/method.cpp
|
||||
index 7ca9b4b90ca..bee69f9cec6 100644
|
||||
index 576da96ed32..e47dd223f92 100644
|
||||
--- a/src/hotspot/share/oops/method.cpp
|
||||
+++ b/src/hotspot/share/oops/method.cpp
|
||||
@@ -1405,6 +1405,8 @@ methodHandle Method::clone_with_new_data(const methodHandle& m, u_char* new_code
|
||||
@@ -1447,6 +1447,8 @@ methodHandle Method::clone_with_new_data(const methodHandle& m, u_char* new_code
|
||||
|
||||
// Reset correct method/const method, method size, and parameter info
|
||||
newm->set_constMethod(newcm);
|
||||
@@ -2157,7 +2198,7 @@ index 7ca9b4b90ca..bee69f9cec6 100644
|
||||
newm->constMethod()->set_code_size(new_code_length);
|
||||
newm->constMethod()->set_constMethod_size(new_const_method_size);
|
||||
assert(newm->code_size() == new_code_length, "check");
|
||||
@@ -2099,6 +2101,10 @@ void Method::ensure_jmethod_ids(ClassLoaderData* loader_data, int capacity) {
|
||||
@@ -2141,6 +2143,10 @@ void Method::ensure_jmethod_ids(ClassLoaderData* loader_data, int capacity) {
|
||||
|
||||
// Add a method id to the jmethod_ids
|
||||
jmethodID Method::make_jmethod_id(ClassLoaderData* loader_data, Method* m) {
|
||||
@@ -2169,7 +2210,7 @@ index 7ca9b4b90ca..bee69f9cec6 100644
|
||||
|
||||
if (!SafepointSynchronize::is_at_safepoint()) {
|
||||
diff --git a/src/hotspot/share/oops/method.hpp b/src/hotspot/share/oops/method.hpp
|
||||
index 18c706187df..4533476ff8f 100644
|
||||
index da8468dead4..4ac3e6e80de 100644
|
||||
--- a/src/hotspot/share/oops/method.hpp
|
||||
+++ b/src/hotspot/share/oops/method.hpp
|
||||
@@ -78,6 +78,9 @@ class Method : public Metadata {
|
||||
@@ -2207,10 +2248,10 @@ index 18c706187df..4533476ff8f 100644
|
||||
Symbol* signature() const { return constants()->symbol_at(signature_index()); }
|
||||
int signature_index() const { return constMethod()->signature_index(); }
|
||||
diff --git a/src/hotspot/share/prims/jni.cpp b/src/hotspot/share/prims/jni.cpp
|
||||
index f9a69ef0c8b..231ada3f0ab 100644
|
||||
index 9410a085ec4..a8a0492e4d1 100644
|
||||
--- a/src/hotspot/share/prims/jni.cpp
|
||||
+++ b/src/hotspot/share/prims/jni.cpp
|
||||
@@ -353,6 +353,7 @@ JNI_ENTRY(jclass, jni_DefineClass(JNIEnv *env, const char *name, jobject loaderR
|
||||
@@ -354,6 +354,7 @@ JNI_ENTRY(jclass, jni_DefineClass(JNIEnv *env, const char *name, jobject loaderR
|
||||
class_loader,
|
||||
Handle(),
|
||||
&st,
|
||||
@@ -2219,10 +2260,10 @@ index f9a69ef0c8b..231ada3f0ab 100644
|
||||
|
||||
if (log_is_enabled(Debug, class, resolve) && k != NULL) {
|
||||
diff --git a/src/hotspot/share/prims/jvm.cpp b/src/hotspot/share/prims/jvm.cpp
|
||||
index 797b022d5e5..eb4b7622820 100644
|
||||
index e88c621912d..49b6776f60b 100644
|
||||
--- a/src/hotspot/share/prims/jvm.cpp
|
||||
+++ b/src/hotspot/share/prims/jvm.cpp
|
||||
@@ -927,6 +927,7 @@ static jclass jvm_define_class_common(JNIEnv *env, const char *name,
|
||||
@@ -936,6 +936,7 @@ static jclass jvm_define_class_common(JNIEnv *env, const char *name,
|
||||
class_loader,
|
||||
protection_domain,
|
||||
&st,
|
||||
@@ -2232,7 +2273,7 @@ index 797b022d5e5..eb4b7622820 100644
|
||||
if (log_is_enabled(Debug, class, resolve) && k != NULL) {
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
new file mode 100644
|
||||
index 00000000000..83c0952de37
|
||||
index 00000000000..80c31135487
|
||||
--- /dev/null
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -0,0 +1,2255 @@
|
||||
@@ -4493,7 +4534,7 @@ index 00000000000..83c0952de37
|
||||
+}
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
new file mode 100644
|
||||
index 00000000000..b712d69a193
|
||||
index 00000000000..3f95cf42645
|
||||
--- /dev/null
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -0,0 +1,202 @@
|
||||
@@ -4700,7 +4741,7 @@ index 00000000000..b712d69a193
|
||||
+};
|
||||
+#endif // SHARE_VM_PRIMS_JVMTIREDEFINECLASSES2_HPP
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnv.cpp b/src/hotspot/share/prims/jvmtiEnv.cpp
|
||||
index 1dd911fd8d8..bc6ebb2d4af 100644
|
||||
index f54c9b713be..54617f05b5a 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnv.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnv.cpp
|
||||
@@ -50,6 +50,7 @@
|
||||
@@ -4711,7 +4752,7 @@ index 1dd911fd8d8..bc6ebb2d4af 100644
|
||||
#include "prims/jvmtiTagMap.hpp"
|
||||
#include "prims/jvmtiThreadState.inline.hpp"
|
||||
#include "prims/jvmtiUtil.hpp"
|
||||
@@ -381,8 +382,13 @@ JvmtiEnv::GetClassLoaderClasses(jobject initiating_loader, jint* class_count_ptr
|
||||
@@ -382,8 +383,13 @@ JvmtiEnv::GetClassLoaderClasses(jobject initiating_loader, jint* class_count_ptr
|
||||
// is_modifiable_class_ptr - pre-checked for NULL
|
||||
jvmtiError
|
||||
JvmtiEnv::IsModifiableClass(oop k_mirror, jboolean* is_modifiable_class_ptr) {
|
||||
@@ -4727,7 +4768,7 @@ index 1dd911fd8d8..bc6ebb2d4af 100644
|
||||
return JVMTI_ERROR_NONE;
|
||||
} /* end IsModifiableClass */
|
||||
|
||||
@@ -412,7 +418,8 @@ JvmtiEnv::RetransformClasses(jint class_count, const jclass* classes) {
|
||||
@@ -413,7 +419,8 @@ JvmtiEnv::RetransformClasses(jint class_count, const jclass* classes) {
|
||||
return JVMTI_ERROR_INVALID_CLASS;
|
||||
}
|
||||
|
||||
@@ -4737,7 +4778,7 @@ index 1dd911fd8d8..bc6ebb2d4af 100644
|
||||
return JVMTI_ERROR_UNMODIFIABLE_CLASS;
|
||||
}
|
||||
|
||||
@@ -444,6 +451,12 @@ JvmtiEnv::RetransformClasses(jint class_count, const jclass* classes) {
|
||||
@@ -445,6 +452,12 @@ JvmtiEnv::RetransformClasses(jint class_count, const jclass* classes) {
|
||||
}
|
||||
class_definitions[index].klass = jcls;
|
||||
}
|
||||
@@ -4750,7 +4791,7 @@ index 1dd911fd8d8..bc6ebb2d4af 100644
|
||||
VM_RedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_retransform);
|
||||
VMThread::execute(&op);
|
||||
return (op.check_error());
|
||||
@@ -454,7 +467,12 @@ JvmtiEnv::RetransformClasses(jint class_count, const jclass* classes) {
|
||||
@@ -455,7 +468,12 @@ JvmtiEnv::RetransformClasses(jint class_count, const jclass* classes) {
|
||||
// class_definitions - pre-checked for NULL
|
||||
jvmtiError
|
||||
JvmtiEnv::RedefineClasses(jint class_count, const jvmtiClassDefinition* class_definitions) {
|
||||
@@ -4765,10 +4806,10 @@ index 1dd911fd8d8..bc6ebb2d4af 100644
|
||||
VMThread::execute(&op);
|
||||
return (op.check_error());
|
||||
diff --git a/src/hotspot/share/prims/jvmtiExport.cpp b/src/hotspot/share/prims/jvmtiExport.cpp
|
||||
index c2e86c2406a..2463c1f7bdb 100644
|
||||
index 555e0140e4f..1ffc2f9ea20 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiExport.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiExport.cpp
|
||||
@@ -2799,7 +2799,7 @@ JvmtiDynamicCodeEventCollector::JvmtiDynamicCodeEventCollector() : _code_blobs(N
|
||||
@@ -2803,7 +2803,7 @@ JvmtiDynamicCodeEventCollector::JvmtiDynamicCodeEventCollector() : _code_blobs(N
|
||||
// iterate over any code blob descriptors collected and post a
|
||||
// DYNAMIC_CODE_GENERATED event to the profiler.
|
||||
JvmtiDynamicCodeEventCollector::~JvmtiDynamicCodeEventCollector() {
|
||||
@@ -4778,10 +4819,10 @@ index c2e86c2406a..2463c1f7bdb 100644
|
||||
if (_code_blobs != NULL) {
|
||||
for (int i=0; i<_code_blobs->length(); i++) {
|
||||
diff --git a/src/hotspot/share/prims/jvmtiExport.hpp b/src/hotspot/share/prims/jvmtiExport.hpp
|
||||
index 99288f7590c..bb58ad9432c 100644
|
||||
index d0433dfc145..da6131eb2e6 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiExport.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiExport.hpp
|
||||
@@ -178,6 +178,7 @@ class JvmtiExport : public AllStatic {
|
||||
@@ -176,6 +176,7 @@ class JvmtiExport : public AllStatic {
|
||||
// systems as needed to relax invariant checks.
|
||||
static bool _has_redefined_a_class;
|
||||
friend class VM_RedefineClasses;
|
||||
@@ -4809,10 +4850,10 @@ index 61a616271f6..60604c645ff 100644
|
||||
|
||||
int extract(jclass* result_list) {
|
||||
diff --git a/src/hotspot/share/prims/jvmtiImpl.cpp b/src/hotspot/share/prims/jvmtiImpl.cpp
|
||||
index 001c592807a..2a92ece916e 100644
|
||||
index a0a6a6cbd18..39953a71244 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiImpl.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiImpl.cpp
|
||||
@@ -293,6 +293,11 @@ void JvmtiBreakpoint::each_method_version_do(method_action meth_act) {
|
||||
@@ -295,6 +295,11 @@ void JvmtiBreakpoint::each_method_version_do(method_action meth_act) {
|
||||
Symbol* m_name = _method->name();
|
||||
Symbol* m_signature = _method->signature();
|
||||
|
||||
@@ -4825,10 +4866,10 @@ index 001c592807a..2a92ece916e 100644
|
||||
for (InstanceKlass* pv_node = ik->previous_versions();
|
||||
pv_node != NULL;
|
||||
diff --git a/src/hotspot/share/prims/resolvedMethodTable.cpp b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
index c071e0641d4..a9057893368 100644
|
||||
index f68990f3af9..87be28e9eee 100644
|
||||
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
@@ -201,6 +201,8 @@ void ResolvedMethodTable::print() {
|
||||
@@ -204,6 +204,8 @@ void ResolvedMethodTable::print() {
|
||||
void ResolvedMethodTable::adjust_method_entries(bool * trace_name_printed) {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "only called at safepoint");
|
||||
// For each entry in RMT, change to new method
|
||||
@@ -4837,7 +4878,7 @@ index c071e0641d4..a9057893368 100644
|
||||
for (int i = 0; i < _the_table->table_size(); ++i) {
|
||||
for (ResolvedMethodEntry* entry = _the_table->bucket(i);
|
||||
entry != NULL;
|
||||
@@ -215,18 +217,30 @@ void ResolvedMethodTable::adjust_method_entries(bool * trace_name_printed) {
|
||||
@@ -218,18 +220,30 @@ void ResolvedMethodTable::adjust_method_entries(bool * trace_name_printed) {
|
||||
|
||||
if (old_method->is_old()) {
|
||||
|
||||
@@ -4877,7 +4918,7 @@ index c071e0641d4..a9057893368 100644
|
||||
|
||||
ResourceMark rm;
|
||||
if (!(*trace_name_printed)) {
|
||||
@@ -235,9 +249,14 @@ void ResolvedMethodTable::adjust_method_entries(bool * trace_name_printed) {
|
||||
@@ -238,9 +252,14 @@ void ResolvedMethodTable::adjust_method_entries(bool * trace_name_printed) {
|
||||
}
|
||||
log_debug(redefine, class, update, constantpool)
|
||||
("ResolvedMethod method update: %s(%s)",
|
||||
@@ -4894,10 +4935,10 @@ index c071e0641d4..a9057893368 100644
|
||||
}
|
||||
#endif // INCLUDE_JVMTI
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index 740c44cded4..ca57b524593 100644
|
||||
index cc9366dcc53..4e2a3ff1083 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -2035,6 +2035,36 @@ unsigned int addopens_count = 0;
|
||||
@@ -2033,6 +2033,36 @@ unsigned int addopens_count = 0;
|
||||
unsigned int addmods_count = 0;
|
||||
unsigned int patch_mod_count = 0;
|
||||
|
||||
@@ -4934,7 +4975,7 @@ index 740c44cded4..ca57b524593 100644
|
||||
// Check the consistency of vm_init_args
|
||||
bool Arguments::check_vm_args_consistency() {
|
||||
// Method for adding checks for flag consistency.
|
||||
@@ -2051,6 +2081,8 @@ bool Arguments::check_vm_args_consistency() {
|
||||
@@ -2049,6 +2079,8 @@ bool Arguments::check_vm_args_consistency() {
|
||||
status = false;
|
||||
}
|
||||
|
||||
@@ -4944,10 +4985,10 @@ index 740c44cded4..ca57b524593 100644
|
||||
#if INCLUDE_NMT
|
||||
if (MemTracker::tracking_level() == NMT_off) {
|
||||
diff --git a/src/hotspot/share/runtime/arguments.hpp b/src/hotspot/share/runtime/arguments.hpp
|
||||
index 72bfd2bf9e3..46450cce5c9 100644
|
||||
index bd439aab073..cc7f71a4404 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.hpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.hpp
|
||||
@@ -505,6 +505,7 @@ class Arguments : AllStatic {
|
||||
@@ -506,6 +506,7 @@ class Arguments : AllStatic {
|
||||
static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized);
|
||||
|
||||
static size_t conservative_max_heap_alignment() { return _conservative_max_heap_alignment; }
|
||||
@@ -4956,10 +4997,10 @@ index 72bfd2bf9e3..46450cce5c9 100644
|
||||
static size_t max_heap_for_compressed_oops();
|
||||
|
||||
diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp
|
||||
index 6b5713be433..f3cf08fffb6 100644
|
||||
index 5c389505417..194242e4c4b 100644
|
||||
--- a/src/hotspot/share/runtime/globals.hpp
|
||||
+++ b/src/hotspot/share/runtime/globals.hpp
|
||||
@@ -2671,7 +2671,11 @@ define_pd_global(uint64_t,MaxRAM, 1ULL*G);
|
||||
@@ -2680,7 +2680,11 @@ define_pd_global(uint64_t,MaxRAM, 1ULL*G);
|
||||
"Start flight recording with options")) \
|
||||
\
|
||||
experimental(bool, UseFastUnorderedTimeStamps, false, \
|
||||
@@ -4973,10 +5014,10 @@ index 6b5713be433..f3cf08fffb6 100644
|
||||
#define VM_FLAGS(develop, \
|
||||
develop_pd, \
|
||||
diff --git a/src/hotspot/share/runtime/interfaceSupport.inline.hpp b/src/hotspot/share/runtime/interfaceSupport.inline.hpp
|
||||
index f5dac06750a..40a8bdd8e62 100644
|
||||
index f39687a25bc..7b1aa3cc58e 100644
|
||||
--- a/src/hotspot/share/runtime/interfaceSupport.inline.hpp
|
||||
+++ b/src/hotspot/share/runtime/interfaceSupport.inline.hpp
|
||||
@@ -277,8 +277,8 @@ class ThreadToNativeFromVM : public ThreadStateTransition {
|
||||
@@ -276,8 +276,8 @@ class ThreadToNativeFromVM : public ThreadStateTransition {
|
||||
public:
|
||||
ThreadToNativeFromVM(JavaThread *thread) : ThreadStateTransition(thread) {
|
||||
// We are leaving the VM at this point and going directly to native code.
|
||||
@@ -4988,7 +5029,7 @@ index f5dac06750a..40a8bdd8e62 100644
|
||||
trans_and_fence(_thread_in_vm, _thread_in_native);
|
||||
// Check for pending. async. exceptions or suspends.
|
||||
diff --git a/src/hotspot/share/runtime/javaCalls.cpp b/src/hotspot/share/runtime/javaCalls.cpp
|
||||
index 32040586b36..0eb2fc1ec6b 100644
|
||||
index dd55cff0ea3..36e8b2b9c05 100644
|
||||
--- a/src/hotspot/share/runtime/javaCalls.cpp
|
||||
+++ b/src/hotspot/share/runtime/javaCalls.cpp
|
||||
@@ -57,7 +57,8 @@ JavaCallWrapper::JavaCallWrapper(const methodHandle& callee_method, Handle recei
|
||||
@@ -5002,7 +5043,7 @@ index 32040586b36..0eb2fc1ec6b 100644
|
||||
_result = result;
|
||||
|
||||
diff --git a/src/hotspot/share/runtime/mutexLocker.cpp b/src/hotspot/share/runtime/mutexLocker.cpp
|
||||
index b258e347c94..0e60bb4b6bd 100644
|
||||
index 42f1fa9626f..16e91c85fd1 100644
|
||||
--- a/src/hotspot/share/runtime/mutexLocker.cpp
|
||||
+++ b/src/hotspot/share/runtime/mutexLocker.cpp
|
||||
@@ -5,7 +5,7 @@
|
||||
@@ -5023,7 +5064,7 @@ index b258e347c94..0e60bb4b6bd 100644
|
||||
Monitor* GCTaskManager_lock = NULL;
|
||||
|
||||
Mutex* Management_lock = NULL;
|
||||
@@ -275,6 +277,7 @@ void mutex_init() {
|
||||
@@ -291,6 +293,7 @@ void mutex_init() {
|
||||
def(JNIGlobalActive_lock , PaddedMutex , nonleaf-1, true, Monitor::_safepoint_check_never);
|
||||
def(JNIWeakAlloc_lock , PaddedMutex , nonleaf, true, Monitor::_safepoint_check_never);
|
||||
def(JNIWeakActive_lock , PaddedMutex , nonleaf-1, true, Monitor::_safepoint_check_never);
|
||||
@@ -5032,10 +5073,10 @@ index b258e347c94..0e60bb4b6bd 100644
|
||||
def(AdapterHandlerLibrary_lock , PaddedMutex , nonleaf, true, Monitor::_safepoint_check_always);
|
||||
|
||||
diff --git a/src/hotspot/share/runtime/mutexLocker.hpp b/src/hotspot/share/runtime/mutexLocker.hpp
|
||||
index 12366c7ead1..70aeb1bd0c1 100644
|
||||
index 0d263ca55ba..b41abcb82ae 100644
|
||||
--- a/src/hotspot/share/runtime/mutexLocker.hpp
|
||||
+++ b/src/hotspot/share/runtime/mutexLocker.hpp
|
||||
@@ -123,6 +123,8 @@ extern Mutex* PerfDataManager_lock; // a long on access to PerfData
|
||||
@@ -124,6 +124,8 @@ extern Mutex* PerfDataManager_lock; // a long on access to PerfData
|
||||
extern Mutex* ParkerFreeList_lock;
|
||||
extern Mutex* OopMapCacheAlloc_lock; // protects allocation of oop_map caches
|
||||
|
||||
@@ -5045,7 +5086,7 @@ index 12366c7ead1..70aeb1bd0c1 100644
|
||||
extern Mutex* OldSets_lock; // protects the old region sets
|
||||
extern Monitor* RootRegionScan_lock; // used to notify that the CM threads have finished scanning the IM snapshot regions
|
||||
diff --git a/src/hotspot/share/runtime/reflection.cpp b/src/hotspot/share/runtime/reflection.cpp
|
||||
index a49b5108821..ed789b0bc2b 100644
|
||||
index b8f736a7dbc..ac233f3b373 100644
|
||||
--- a/src/hotspot/share/runtime/reflection.cpp
|
||||
+++ b/src/hotspot/share/runtime/reflection.cpp
|
||||
@@ -658,6 +658,12 @@ bool Reflection::verify_member_access(const Klass* current_class,
|
||||
@@ -5062,5 +5103,5 @@ index a49b5108821..ed789b0bc2b 100644
|
||||
// field's access bits are "access". We assume that we've already verified
|
||||
// that current_class can access member_class.
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
2.23.0
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From a4b2a34a6c9d477ce339bece718abe992cdd5002 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Wed, 14 Nov 2018 21:18:22 +0100
|
||||
Subject: [PATCH 02/50] We need to set classRedefinitionCount on new class, not
|
||||
old class.
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 83c0952de37..83cf0be090b 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -1904,7 +1904,7 @@ void VM_EnhancedRedefineClasses::increment_class_counter(InstanceKlass *ik, TRAP
|
||||
oop class_mirror = ik->java_mirror();
|
||||
Klass* class_oop = java_lang_Class::as_Klass(class_mirror);
|
||||
int new_count = java_lang_Class::classRedefinedCount(class_mirror) + 1;
|
||||
- java_lang_Class::set_classRedefinedCount(class_mirror, new_count);
|
||||
+ java_lang_Class::set_classRedefinedCount(ik->new_version()->java_mirror(), new_count);
|
||||
|
||||
if (class_oop != _the_class_oop) {
|
||||
// _the_class_oop count is printed at end of redefine_single_class()
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
1602
jb/project/tools/patches/dcevm/0002-dcevm11-fixes.patch
Normal file
1602
jb/project/tools/patches/dcevm/0002-dcevm11-fixes.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,30 +0,0 @@
|
||||
From e5c0b2d69ab024ec0469f5c105f13f889b598815 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Wed, 14 Nov 2018 21:22:01 +0100
|
||||
Subject: [PATCH 03/50] Fix crashes in MetadataOnStackMark::~MetadataOnSta
|
||||
|
||||
MetadataOnStackMark shoukld not remove dcevm stuff. It was added
|
||||
accidentaly in dcevm9,
|
||||
and never was part of doit() in previous versions.
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 83cf0be090b..61af07d0f86 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -470,7 +470,9 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
|
||||
// Mark methods seen on stack and everywhere else so old methods are not
|
||||
// cleaned up if they're on the stack.
|
||||
- MetadataOnStackMark md_on_stack(true);
|
||||
+
|
||||
+ // FIXME: fails in enhanced redefinition
|
||||
+ // MetadataOnStackMark md_on_stack(true);
|
||||
HandleMark hm(thread); // make sure any handles created are deleted
|
||||
// before the stack walk again.
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From cbe52ffcde1851f2c3527825f37145428aeedc67 Mon Sep 17 00:00:00 2001
|
||||
From a23078dc957ec7b88de7b82fdea6438c9a046cf1 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Wed, 12 Dec 2018 19:38:28 +0100
|
||||
Subject: [PATCH 09/50] Support for Concurrent Mark Sweep (CMS) collector
|
||||
Subject: [PATCH 03/33] Support for Concurrent Mark Sweep (CMS) collector
|
||||
|
||||
---
|
||||
.../share/gc/cms/compactibleFreeListSpace.cpp | 139 ++++++++++++------
|
||||
@@ -17,7 +17,7 @@ Subject: [PATCH 09/50] Support for Concurrent Mark Sweep (CMS) collector
|
||||
10 files changed, 135 insertions(+), 79 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/gc/cms/compactibleFreeListSpace.cpp b/src/hotspot/share/gc/cms/compactibleFreeListSpace.cpp
|
||||
index a93f764f1b9..efaa09473a9 100644
|
||||
index 4c9918627a2..f335173576f 100644
|
||||
--- a/src/hotspot/share/gc/cms/compactibleFreeListSpace.cpp
|
||||
+++ b/src/hotspot/share/gc/cms/compactibleFreeListSpace.cpp
|
||||
@@ -376,55 +376,58 @@ CompactibleFreeListSpace::CompactibleFreeListSpace(BlockOffsetSharedArray* bs, M
|
||||
@@ -118,7 +118,7 @@ index a93f764f1b9..efaa09473a9 100644
|
||||
q->forward_to(oop(compact_top));
|
||||
assert(q->is_gc_marked(), "encoding the pointer should preserve the mark");
|
||||
} else {
|
||||
@@ -2196,13 +2199,60 @@ CompactibleFreeListSpace::refillLinearAllocBlock(LinearAllocBlock* blk) {
|
||||
@@ -2209,13 +2212,60 @@ CompactibleFreeListSpace::refillLinearAllocBlock(LinearAllocBlock* blk) {
|
||||
|
||||
// Support for compaction
|
||||
void CompactibleFreeListSpace::prepare_for_compaction(CompactPoint* cp) {
|
||||
@@ -181,7 +181,7 @@ index a93f764f1b9..efaa09473a9 100644
|
||||
void CompactibleFreeListSpace::adjust_pointers() {
|
||||
// In other versions of adjust_pointers(), a bail out
|
||||
// based on the amount of live data in the generation
|
||||
@@ -2215,7 +2265,12 @@ void CompactibleFreeListSpace::adjust_pointers() {
|
||||
@@ -2228,7 +2278,12 @@ void CompactibleFreeListSpace::adjust_pointers() {
|
||||
}
|
||||
|
||||
void CompactibleFreeListSpace::compact() {
|
||||
@@ -253,10 +253,10 @@ index d0ff86c8215..b4ed59f020c 100644
|
||||
}
|
||||
_rescued_oops->clear();
|
||||
diff --git a/src/hotspot/share/gc/shared/gcConfig.cpp b/src/hotspot/share/gc/shared/gcConfig.cpp
|
||||
index 8aac2b39e1e..39364a64cb2 100644
|
||||
index 9779df92447..adb0f5dd25c 100644
|
||||
--- a/src/hotspot/share/gc/shared/gcConfig.cpp
|
||||
+++ b/src/hotspot/share/gc/shared/gcConfig.cpp
|
||||
@@ -101,7 +101,7 @@ void GCConfig::fail_if_unsupported_gc_is_selected() {
|
||||
@@ -106,7 +106,7 @@ void GCConfig::fail_if_unsupported_gc_is_selected() {
|
||||
}
|
||||
|
||||
void GCConfig::select_gc_ergonomically() {
|
||||
@@ -266,7 +266,7 @@ index 8aac2b39e1e..39364a64cb2 100644
|
||||
FLAG_SET_ERGO(bool, UseSerialGC, true);
|
||||
} else if (os::is_server_class_machine()) {
|
||||
diff --git a/src/hotspot/share/gc/shared/space.cpp b/src/hotspot/share/gc/shared/space.cpp
|
||||
index 763abc91a39..947dff8ae0c 100644
|
||||
index bc0dd1980db..56b144b46f1 100644
|
||||
--- a/src/hotspot/share/gc/shared/space.cpp
|
||||
+++ b/src/hotspot/share/gc/shared/space.cpp
|
||||
@@ -388,11 +388,11 @@ HeapWord* CompactibleSpace::forward_compact_top(size_t size, CompactPoint* cp, H
|
||||
@@ -301,7 +301,7 @@ index 763abc91a39..947dff8ae0c 100644
|
||||
size_t forward_size = size;
|
||||
|
||||
// (DCEVM) There is a new version of the class of q => different size
|
||||
if (oop(q)->klass()->new_version() != NULL && oop(q)->klass()->new_version()->update_information() != NULL) {
|
||||
if (oop(q)->klass()->new_version() != NULL) {
|
||||
|
||||
size_t new_size = oop(q)->size_given_klass(oop(q)->klass()->new_version());
|
||||
- assert(size != new_size, "instances without changed size have to be updated prior to GC run");
|
||||
@@ -360,7 +360,7 @@ index 8eb5669fb79..901c89d8a30 100644
|
||||
HeapWord* forward_rescued(CompactPoint* cp, HeapWord* compact_top);
|
||||
|
||||
diff --git a/src/hotspot/share/gc/shared/space.inline.hpp b/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
index 75d7e685edf..26e56ae6f7e 100644
|
||||
index 6b109fcd2e5..8c255d6d428 100644
|
||||
--- a/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
+++ b/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
@@ -163,6 +163,8 @@ inline void CompactibleSpace::scan_and_forward(SpaceType* space, CompactPoint* c
|
||||
@@ -402,7 +402,7 @@ index 75d7e685edf..26e56ae6f7e 100644
|
||||
end_of_live = end;
|
||||
} else {
|
||||
// otherwise, it really is a free region.
|
||||
@@ -351,7 +354,7 @@ inline void CompactibleSpace::scan_and_compact(SpaceType* space, bool redefiniti
|
||||
@@ -352,7 +355,7 @@ inline void CompactibleSpace::scan_and_compact(SpaceType* space, bool redefiniti
|
||||
HeapWord* compaction_top = (HeapWord*)oop(cur_obj)->forwardee();
|
||||
|
||||
if (redefinition_run && space->must_rescue(oop(cur_obj), oop(cur_obj)->forwardee())) {
|
||||
@@ -411,7 +411,7 @@ index 75d7e685edf..26e56ae6f7e 100644
|
||||
debug_only(Copy::fill_to_words(cur_obj, size, 0));
|
||||
cur_obj += size;
|
||||
continue;
|
||||
@@ -361,8 +364,7 @@ inline void CompactibleSpace::scan_and_compact(SpaceType* space, bool redefiniti
|
||||
@@ -362,8 +365,7 @@ inline void CompactibleSpace::scan_and_compact(SpaceType* space, bool redefiniti
|
||||
Prefetch::write(compaction_top, copy_interval);
|
||||
|
||||
// copy object and reinit its mark
|
||||
@@ -422,10 +422,10 @@ index 75d7e685edf..26e56ae6f7e 100644
|
||||
Klass* new_version = oop(cur_obj)->klass()->new_version();
|
||||
if (new_version->update_information() == NULL) {
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index c64d6bb1bb5..9b8678a53fb 100644
|
||||
index 43d761cdbb2..14af1aad21b 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -52,6 +52,7 @@
|
||||
@@ -54,6 +54,7 @@
|
||||
#include "prims/jvmtiThreadState.inline.hpp"
|
||||
#include "utilities/events.hpp"
|
||||
#include "oops/constantPool.inline.hpp"
|
||||
@@ -433,7 +433,7 @@ index c64d6bb1bb5..9b8678a53fb 100644
|
||||
|
||||
Array<Method*>* VM_EnhancedRedefineClasses::_old_methods = NULL;
|
||||
Array<Method*>* VM_EnhancedRedefineClasses::_new_methods = NULL;
|
||||
@@ -420,13 +421,11 @@ public:
|
||||
@@ -416,13 +417,11 @@ public:
|
||||
Klass* new_klass = obj->klass()->new_version();
|
||||
|
||||
if (new_klass->update_information() != NULL) {
|
||||
@@ -449,7 +449,7 @@ index c64d6bb1bb5..9b8678a53fb 100644
|
||||
oop src = obj;
|
||||
if (new_klass->is_copying_backwards()) {
|
||||
copy_to_tmp(obj);
|
||||
@@ -436,11 +435,6 @@ public:
|
||||
@@ -432,11 +431,6 @@ public:
|
||||
// FIXME: instance updates...
|
||||
//guarantee(false, "instance updates!");
|
||||
MarkSweep::update_fields(obj, src, new_klass->update_information());
|
||||
@@ -462,10 +462,10 @@ index c64d6bb1bb5..9b8678a53fb 100644
|
||||
} else {
|
||||
obj->set_klass(obj->klass()->new_version());
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index ca57b524593..2ca6dde069d 100644
|
||||
index 4e2a3ff1083..e3cb44d8690 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -2047,14 +2047,14 @@ bool Arguments::check_gc_consistency() {
|
||||
@@ -2045,14 +2045,14 @@ bool Arguments::check_gc_consistency() {
|
||||
if (AllowEnhancedClassRedefinition) {
|
||||
// Must use serial GC. This limitation applies because the instance size changing GC modifications
|
||||
// are only built into the mark and compact algorithm.
|
||||
@@ -484,5 +484,5 @@ index ca57b524593..2ca6dde069d 100644
|
||||
"Conflicting collector combinations in option list; "
|
||||
"please refer to the release notes for the combinations "
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
2.23.0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From d6a3286b9b57df4c09d859e38833f2e3dc1574d9 Mon Sep 17 00:00:00 2001
|
||||
From 89334947f64b857d6ef052e51dc645a0baa9cc65 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@mailprofiler.com>
|
||||
Date: Wed, 11 Mar 2020 14:19:34 +0100
|
||||
Subject: [PATCH 26/50] Fix class cast exception on redefinition of class A,
|
||||
Subject: [PATCH 04/33] Fix class cast exception on redefinition of class A,
|
||||
that is superclass of B that has anonymous class C
|
||||
|
||||
---
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH 26/50] Fix class cast exception on redefinition of class A,
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
index 9b6ba7e9304..8cbd4b8edf2 100644
|
||||
index 77708e25aae..76791cdd905 100644
|
||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
@@ -788,7 +788,10 @@ bool InstanceKlass::link_class_impl(bool throw_verifyerror, TRAPS) {
|
||||
@@ -17,13 +17,13 @@ index 9b6ba7e9304..8cbd4b8edf2 100644
|
||||
if (!is_linked()) {
|
||||
if (!is_rewritten()) {
|
||||
- {
|
||||
+ // In cases, if class A is being redefined and class B->A (B is extended from A) and B is host class of anonymous class C
|
||||
+ // then second redefinition fails with cannot cast klass exception. So we currently turn off bytecode verification
|
||||
+ // (DCEVM): If class A is being redefined and class B->A (B is extended from A) and B is host class of anonymous class C
|
||||
+ // then second redefinition fails with cannot cast klass exception. So we currently turn off bytecode verification
|
||||
+ // on redefinition.
|
||||
+ if (!newest_version()->is_redefining()) {
|
||||
+ if (!AllowEnhancedClassRedefinition || !newest_version()->is_redefining()) {
|
||||
bool verify_ok = verify_code(throw_verifyerror, THREAD);
|
||||
if (!verify_ok) {
|
||||
return false;
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
2.23.0
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From 360fbbd15357fb3cb19abc6ffb40320efadce616 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Mon, 3 Dec 2018 19:34:53 +0100
|
||||
Subject: [PATCH 04/50] Fix problem with nested members
|
||||
|
||||
Reported at : https://stackoverflow.com/questions/53370380/hotswapagent-incompatibleclasschangeerror-type-headerpanel1-is-not-a-nest-mem
|
||||
---
|
||||
src/hotspot/share/oops/instanceKlass.cpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
index 8a262bc3735..9b6ba7e9304 100644
|
||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
@@ -178,6 +178,7 @@ bool InstanceKlass::has_nest_member(InstanceKlass* k, TRAPS) const {
|
||||
}
|
||||
|
||||
Klass* k2 = _constants->klass_at(cp_index, CHECK_false);
|
||||
+ k2 = k2->newest_version();
|
||||
if (k2 == k) {
|
||||
log_trace(class, nestmates)("- class is listed as a nest member");
|
||||
return true;
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 24a60477aef7098ea23ab50a573332957741ea7b Mon Sep 17 00:00:00 2001
|
||||
From 9d8b4cee545f9895b77f5f05059cbd519c6c8094 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Wed, 14 Nov 2018 21:20:08 +0100
|
||||
Subject: [PATCH 15/50] HotswapAgent integration
|
||||
Date: Thu, 15 Nov 2018 03:20:08 +0700
|
||||
Subject: [PATCH 05/33] HotswapAgent integration
|
||||
|
||||
It include:
|
||||
|
||||
@@ -9,16 +9,25 @@ It include:
|
||||
to CFLAGS (bash configure --with-extra-cflags="-DDCEVM_ONLY"), by
|
||||
default compilation goes with HotswapAgent
|
||||
|
||||
Allow ha class initializer calls
|
||||
|
||||
Add --add-opens for necessary modules/packages
|
||||
- java.base/java.lang - for reflection access to Proxy.proxyCache
|
||||
- java.base/jdk.internal.loader - for access proxyCache class
|
||||
- java.desktop/java.beans - for reflection access to Introspector
|
||||
- java.desktop/com.sun.beans
|
||||
- java.base/java.io
|
||||
- com.sun.beans.util
|
||||
|
||||
Open jdk module to access ClassInfo.CACHE
|
||||
|
||||
- be quiet if HotswapAgent is not found in lib/, it is compatible with
|
||||
old DCEVM
|
||||
- disable hotswapagent for -Xshare:dump
|
||||
- disable HotswapAgent for -Xshare:dump
|
||||
- disable HotswapAgent in jvm tools
|
||||
- disable HotswapAgent in keytool
|
||||
---
|
||||
make/launcher/Launcher-java.base.gmk | 1 +
|
||||
make/launcher/Launcher-java.rmi.gmk | 2 +
|
||||
make/launcher/Launcher-java.scripting.gmk | 3 +-
|
||||
make/launcher/Launcher-java.security.jgss.gmk | 3 +
|
||||
@@ -28,7 +37,7 @@ old DCEVM
|
||||
make/launcher/Launcher-jdk.jartool.gmk | 2 +
|
||||
make/launcher/Launcher-jdk.javadoc.gmk | 3 +-
|
||||
make/launcher/Launcher-jdk.jcmd.gmk | 13 +++-
|
||||
make/launcher/Launcher-jdk.jconsole.gmk | 3 +-
|
||||
make/launcher/Launcher-jdk.jconsole.gmk | 1 +
|
||||
make/launcher/Launcher-jdk.jdeps.gmk | 3 +
|
||||
make/launcher/Launcher-jdk.jdi.gmk | 1 +
|
||||
make/launcher/Launcher-jdk.jlink.gmk | 5 +-
|
||||
@@ -37,11 +46,32 @@ old DCEVM
|
||||
make/launcher/Launcher-jdk.pack.gmk | 1 +
|
||||
make/launcher/Launcher-jdk.rmic.gmk | 1 +
|
||||
.../Launcher-jdk.scripting.nashorn.shell.gmk | 3 +-
|
||||
src/hotspot/share/runtime/arguments.cpp | 59 +++++++++++++++++++
|
||||
src/hotspot/share/classfile/vmSymbols.hpp | 1 +
|
||||
.../share/interpreter/linkResolver.cpp | 2 +-
|
||||
src/hotspot/share/runtime/arguments.cpp | 67 +++++++++++++++++++
|
||||
src/hotspot/share/runtime/arguments.hpp | 3 +
|
||||
src/hotspot/share/runtime/globals.hpp | 12 +++-
|
||||
21 files changed, 117 insertions(+), 10 deletions(-)
|
||||
.../sun/beans/introspect/package-info.java | 26 +++++++
|
||||
.../classes/com/sun/beans/package-info.java | 26 +++++++
|
||||
.../com/sun/beans/util/package-info.java | 26 +++++++
|
||||
.../share/classes/module-info.java | 3 +
|
||||
28 files changed, 208 insertions(+), 10 deletions(-)
|
||||
create mode 100644 src/java.desktop/share/classes/com/sun/beans/introspect/package-info.java
|
||||
create mode 100644 src/java.desktop/share/classes/com/sun/beans/package-info.java
|
||||
create mode 100644 src/java.desktop/share/classes/com/sun/beans/util/package-info.java
|
||||
|
||||
diff --git a/make/launcher/Launcher-java.base.gmk b/make/launcher/Launcher-java.base.gmk
|
||||
index f6d4aa28fe6..38ba29530d8 100644
|
||||
--- a/make/launcher/Launcher-java.base.gmk
|
||||
+++ b/make/launcher/Launcher-java.base.gmk
|
||||
@@ -52,6 +52,7 @@ endif
|
||||
|
||||
$(eval $(call SetupBuildLauncher, keytool, \
|
||||
MAIN_CLASS := sun.security.tools.keytool.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
################################################################################
|
||||
diff --git a/make/launcher/Launcher-java.rmi.gmk b/make/launcher/Launcher-java.rmi.gmk
|
||||
index a69a90bcc81..07046232275 100644
|
||||
--- a/make/launcher/Launcher-java.rmi.gmk
|
||||
@@ -229,16 +259,14 @@ index 7117fa78059..761a52d8466 100644
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
diff --git a/make/launcher/Launcher-jdk.jconsole.gmk b/make/launcher/Launcher-jdk.jconsole.gmk
|
||||
index 6205ae63d16..5ca6a0c123b 100644
|
||||
index 575b9e0595b..2f442f69113 100644
|
||||
--- a/make/launcher/Launcher-jdk.jconsole.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jconsole.gmk
|
||||
@@ -28,7 +28,8 @@ include LauncherCommon.gmk
|
||||
$(eval $(call SetupBuildLauncher, jconsole, \
|
||||
MAIN_CLASS := sun.tools.jconsole.JConsole, \
|
||||
@@ -30,6 +30,7 @@ $(eval $(call SetupBuildLauncher, jconsole, \
|
||||
JAVA_ARGS := --add-opens java.base/java.io=jdk.jconsole \
|
||||
- -Djconsole.showOutputViewer, \
|
||||
+ -Djconsole.showOutputViewer \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
-Djconsole.showOutputViewer \
|
||||
-Djdk.attach.allowAttachSelf=true, \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
CFLAGS_windows := -DJAVAW, \
|
||||
LIBS_windows := user32.lib, \
|
||||
))
|
||||
@@ -361,11 +389,36 @@ index 82311e69fd6..bd39f8595b2 100644
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DENABLE_ARG_FILES, \
|
||||
))
|
||||
diff --git a/src/hotspot/share/classfile/vmSymbols.hpp b/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
index 17f7e720c95..0d0badeabd0 100644
|
||||
--- a/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
+++ b/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
@@ -343,6 +343,7 @@
|
||||
/* common method and field names */ \
|
||||
template(object_initializer_name, "<init>") \
|
||||
template(class_initializer_name, "<clinit>") \
|
||||
+ template(ha_class_initializer_name, "$$ha$clinit") \
|
||||
template(println_name, "println") \
|
||||
template(printStackTrace_name, "printStackTrace") \
|
||||
template(main_name, "main") \
|
||||
diff --git a/src/hotspot/share/interpreter/linkResolver.cpp b/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
index 0c24146ff00..9dc184d02f5 100644
|
||||
--- a/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
+++ b/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
@@ -1009,7 +1009,7 @@ void LinkResolver::resolve_field(fieldDescriptor& fd,
|
||||
assert(!m.is_null(), "information about the current method must be available for 'put' bytecodes");
|
||||
bool is_initialized_static_final_update = (byte == Bytecodes::_putstatic &&
|
||||
fd.is_static() &&
|
||||
- !m()->is_static_initializer());
|
||||
+ !(m()->is_static_initializer() || m()->name() == vmSymbols::ha_class_initializer_name()));
|
||||
bool is_initialized_instance_final_update = ((byte == Bytecodes::_putfield || byte == Bytecodes::_nofast_putfield) &&
|
||||
!fd.is_static() &&
|
||||
!m->is_object_initializer());
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index 2ca6dde069d..c75bb5d8f49 100644
|
||||
index e3cb44d8690..36276741b5c 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -3937,6 +3937,8 @@ jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) {
|
||||
@@ -3967,6 +3967,8 @@ jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) {
|
||||
// Set object alignment values.
|
||||
set_object_alignment();
|
||||
|
||||
@@ -374,7 +427,7 @@ index 2ca6dde069d..c75bb5d8f49 100644
|
||||
#if !INCLUDE_CDS
|
||||
if (DumpSharedSpaces || RequireSharedSpaces) {
|
||||
jio_fprintf(defaultStream::error_stream(),
|
||||
@@ -4270,3 +4272,60 @@ bool Arguments::copy_expand_pid(const char* src, size_t srclen,
|
||||
@@ -4300,3 +4302,68 @@ bool Arguments::copy_expand_pid(const char* src, size_t srclen,
|
||||
*b = '\0';
|
||||
return (p == src_end); // return false if not all of the source was copied
|
||||
}
|
||||
@@ -431,15 +484,23 @@ index 2ca6dde069d..c75bb5d8f49 100644
|
||||
+ create_numbered_property("jdk.module.addopens", "java.base/java.lang=ALL-UNNAMED", addopens_count++);
|
||||
+ // Class of field java.lang.reflect.Proxy/proxyCache
|
||||
+ create_numbered_property("jdk.module.addopens", "java.base/jdk.internal.loader=ALL-UNNAMED", addopens_count++);
|
||||
+ // Use to access java.io.Reader, java.io.InputStream, java.io.FileInputStream
|
||||
+ create_numbered_property("jdk.module.addopens", "java.base/java.io=ALL-UNNAMED", addopens_count++);
|
||||
+ // java.beans.Introspector access
|
||||
+ create_numbered_property("jdk.module.addopens", "java.desktop/java.beans=ALL-UNNAMED", addopens_count++);
|
||||
+ // java.beans.Introspector access
|
||||
+ create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans=ALL-UNNAMED", addopens_count++);
|
||||
+ // com.sun.beans.introspect.ClassInfo access
|
||||
+ create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans.introspect=ALL-UNNAMED", addopens_count++);
|
||||
+ // com.sun.beans.introspect.util.Cache access
|
||||
+ create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans.util=ALL-UNNAMED", addopens_count++);
|
||||
+
|
||||
+}
|
||||
diff --git a/src/hotspot/share/runtime/arguments.hpp b/src/hotspot/share/runtime/arguments.hpp
|
||||
index 46450cce5c9..3dc5b3d4bae 100644
|
||||
index cc7f71a4404..b2bab2e1f44 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.hpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.hpp
|
||||
@@ -506,6 +506,9 @@ class Arguments : AllStatic {
|
||||
@@ -507,6 +507,9 @@ class Arguments : AllStatic {
|
||||
|
||||
static size_t conservative_max_heap_alignment() { return _conservative_max_heap_alignment; }
|
||||
|
||||
@@ -450,7 +511,7 @@ index 46450cce5c9..3dc5b3d4bae 100644
|
||||
static size_t max_heap_for_compressed_oops();
|
||||
|
||||
diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp
|
||||
index f3cf08fffb6..5f6c7b8e388 100644
|
||||
index 194242e4c4b..9c007fc2d82 100644
|
||||
--- a/src/hotspot/share/runtime/globals.hpp
|
||||
+++ b/src/hotspot/share/runtime/globals.hpp
|
||||
@@ -32,6 +32,12 @@
|
||||
@@ -466,7 +527,7 @@ index f3cf08fffb6..5f6c7b8e388 100644
|
||||
// The larger HeapWordSize for 64bit requires larger heaps
|
||||
// for the same application running in 64bit. See bug 4967770.
|
||||
// The minimum alignment to a heap word size is done. Other
|
||||
@@ -2675,8 +2681,10 @@ define_pd_global(uint64_t,MaxRAM, 1ULL*G);
|
||||
@@ -2684,8 +2690,10 @@ define_pd_global(uint64_t,MaxRAM, 1ULL*G);
|
||||
\
|
||||
product(bool, AllowEnhancedClassRedefinition, true, \
|
||||
"Allow enhanced class redefinition beyond swapping method " \
|
||||
@@ -479,6 +540,116 @@ index f3cf08fffb6..5f6c7b8e388 100644
|
||||
#define VM_FLAGS(develop, \
|
||||
develop_pd, \
|
||||
product, \
|
||||
diff --git a/src/java.desktop/share/classes/com/sun/beans/introspect/package-info.java b/src/java.desktop/share/classes/com/sun/beans/introspect/package-info.java
|
||||
new file mode 100644
|
||||
index 00000000000..6636e4dd62a
|
||||
--- /dev/null
|
||||
+++ b/src/java.desktop/share/classes/com/sun/beans/introspect/package-info.java
|
||||
@@ -0,0 +1,26 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
+ *
|
||||
+ * This code is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License version 2 only, as
|
||||
+ * published by the Free Software Foundation. Oracle designates this
|
||||
+ * particular file as subject to the "Classpath" exception as provided
|
||||
+ * by Oracle in the LICENSE file that accompanied this code.
|
||||
+ *
|
||||
+ * This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
+ * version 2 for more details (a copy is included in the LICENSE file that
|
||||
+ * accompanied this code).
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License version
|
||||
+ * 2 along with this work; if not, write to the Free Software Foundation,
|
||||
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+ *
|
||||
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
+ * or visit www.oracle.com if you need additional information or have any
|
||||
+ * questions.
|
||||
+ */
|
||||
+
|
||||
+package com.sun.beans.introspect;
|
||||
diff --git a/src/java.desktop/share/classes/com/sun/beans/package-info.java b/src/java.desktop/share/classes/com/sun/beans/package-info.java
|
||||
new file mode 100644
|
||||
index 00000000000..5c097eeaa53
|
||||
--- /dev/null
|
||||
+++ b/src/java.desktop/share/classes/com/sun/beans/package-info.java
|
||||
@@ -0,0 +1,26 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
+ *
|
||||
+ * This code is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License version 2 only, as
|
||||
+ * published by the Free Software Foundation. Oracle designates this
|
||||
+ * particular file as subject to the "Classpath" exception as provided
|
||||
+ * by Oracle in the LICENSE file that accompanied this code.
|
||||
+ *
|
||||
+ * This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
+ * version 2 for more details (a copy is included in the LICENSE file that
|
||||
+ * accompanied this code).
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License version
|
||||
+ * 2 along with this work; if not, write to the Free Software Foundation,
|
||||
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+ *
|
||||
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
+ * or visit www.oracle.com if you need additional information or have any
|
||||
+ * questions.
|
||||
+ */
|
||||
+
|
||||
+package com.sun.beans;
|
||||
diff --git a/src/java.desktop/share/classes/com/sun/beans/util/package-info.java b/src/java.desktop/share/classes/com/sun/beans/util/package-info.java
|
||||
new file mode 100644
|
||||
index 00000000000..2d5d735ffa8
|
||||
--- /dev/null
|
||||
+++ b/src/java.desktop/share/classes/com/sun/beans/util/package-info.java
|
||||
@@ -0,0 +1,26 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
+ *
|
||||
+ * This code is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License version 2 only, as
|
||||
+ * published by the Free Software Foundation. Oracle designates this
|
||||
+ * particular file as subject to the "Classpath" exception as provided
|
||||
+ * by Oracle in the LICENSE file that accompanied this code.
|
||||
+ *
|
||||
+ * This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
+ * version 2 for more details (a copy is included in the LICENSE file that
|
||||
+ * accompanied this code).
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License version
|
||||
+ * 2 along with this work; if not, write to the Free Software Foundation,
|
||||
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+ *
|
||||
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
+ * or visit www.oracle.com if you need additional information or have any
|
||||
+ * questions.
|
||||
+ */
|
||||
+
|
||||
+package com.sun.beans.util;
|
||||
diff --git a/src/java.desktop/share/classes/module-info.java b/src/java.desktop/share/classes/module-info.java
|
||||
index b663b382f52..2a8f0a67d52 100644
|
||||
--- a/src/java.desktop/share/classes/module-info.java
|
||||
+++ b/src/java.desktop/share/classes/module-info.java
|
||||
@@ -104,6 +104,9 @@ module java.desktop {
|
||||
exports javax.swing.text.rtf;
|
||||
exports javax.swing.tree;
|
||||
exports javax.swing.undo;
|
||||
+ exports com.sun.beans;
|
||||
+ exports com.sun.beans.introspect;
|
||||
+ exports com.sun.beans.util;
|
||||
|
||||
// qualified exports may be inserted at build time
|
||||
// see make/GensrcModuleInfo.gmk
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
2.23.0
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From 4e2aef4c3b201e9639acdd39aa9e7ecdc9fb6a86 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Mon, 10 Dec 2018 20:12:07 +0100
|
||||
Subject: [PATCH 05/50] Use init_mark_raw()
|
||||
|
||||
method changed since j8 - it used init_mark()
|
||||
---
|
||||
src/hotspot/share/gc/shared/space.inline.hpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/gc/shared/space.inline.hpp b/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
index 4394eff00c5..75d7e685edf 100644
|
||||
--- a/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
+++ b/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
@@ -371,7 +371,7 @@ inline void CompactibleSpace::scan_and_compact(SpaceType* space, bool redefiniti
|
||||
} else {
|
||||
MarkSweep::update_fields(oop(cur_obj), oop(compaction_top));
|
||||
}
|
||||
- oop(compaction_top)->init_mark();
|
||||
+ oop(compaction_top)->init_mark_raw();
|
||||
assert(oop(compaction_top)->klass() != NULL, "should have a class");
|
||||
|
||||
debug_only(prev_obj = cur_obj);
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From 15194627b2573f109aef2cacc6ebfb600d0a20f0 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Thu, 13 Dec 2018 20:51:09 +0100
|
||||
Subject: [PATCH 06/50] Fix methodHandles
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 61af07d0f86..1c7595787a1 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -248,7 +248,7 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
int ref_kind = (flags >> REFERENCE_KIND_SHIFT) & REFERENCE_KIND_MASK;
|
||||
if (MethodHandles::ref_kind_is_method(ref_kind)) {
|
||||
Method* m = (Method*) java_lang_invoke_MemberName::vmtarget(obj);
|
||||
- if (m != NULL && m->method_holder()->new_version() != NULL) {
|
||||
+ if (m != NULL && m->method_holder()->is_redefining()) {
|
||||
// Let's try to re-resolve method
|
||||
InstanceKlass* newest = InstanceKlass::cast(m->method_holder()->newest_version());
|
||||
Method* new_method = newest->find_method(m->name(), m->signature());
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 2ab70b495c43c4699ad402a714710566400de99d Mon Sep 17 00:00:00 2001
|
||||
From 4386e1b6a0429a39e390cca3bc66f920bf6dafe5 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 22 May 2020 21:23:01 +0200
|
||||
Subject: [PATCH 43/50] Support for Lambda class redefinition
|
||||
Date: Sun, 4 Oct 2020 21:12:12 +0200
|
||||
Subject: [PATCH 06/33] Support for Lambda class redefinition
|
||||
|
||||
---
|
||||
.../share/classfile/classLoaderData.cpp | 9 +++
|
||||
@@ -15,7 +15,7 @@ Subject: [PATCH 43/50] Support for Lambda class redefinition
|
||||
8 files changed, 85 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
index ab2615da0ed..1bc67adf5a7 100644
|
||||
index 3f75bffce8a..a901b4309b9 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
@@ -663,6 +663,15 @@ Dictionary* ClassLoaderData::create_dictionary() {
|
||||
@@ -35,7 +35,7 @@ index ab2615da0ed..1bc67adf5a7 100644
|
||||
oop ClassLoaderData::holder_phantom() const {
|
||||
// A klass that was previously considered dead can be looked up in the
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.hpp b/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
index 7e357929971..00a84610b43 100644
|
||||
index b5a7cf21c85..c4f617ab800 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
@@ -292,6 +292,7 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
||||
@@ -47,7 +47,7 @@ index 7e357929971..00a84610b43 100644
|
||||
|
||||
void unload();
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.cpp b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
index e70865109dd..cc9f1fa7831 100644
|
||||
index f69167ae53c..42e0fee800f 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
@@ -971,12 +971,16 @@ InstanceKlass* SystemDictionary::parse_stream(Symbol* class_name,
|
||||
@@ -81,7 +81,7 @@ index e70865109dd..cc9f1fa7831 100644
|
||||
|
||||
if (host_klass != NULL && k != NULL) {
|
||||
// Anonymous classes must update ClassLoaderData holder (was host_klass loader)
|
||||
@@ -1845,7 +1853,7 @@ void SystemDictionary::remove_from_hierarchy(InstanceKlass* k) {
|
||||
@@ -1846,7 +1854,7 @@ void SystemDictionary::remove_from_hierarchy(InstanceKlass* k) {
|
||||
k->remove_from_sibling_list();
|
||||
}
|
||||
|
||||
@@ -91,10 +91,10 @@ index e70865109dd..cc9f1fa7831 100644
|
||||
constraints()->update_after_redefinition();
|
||||
}
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.hpp b/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
index 717f34ce9a0..dc111846c12 100644
|
||||
index b956c6a7519..a8359143908 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
@@ -301,6 +301,7 @@ public:
|
||||
@@ -307,6 +307,7 @@ public:
|
||||
protection_domain,
|
||||
st,
|
||||
NULL, // host klass
|
||||
@@ -102,7 +102,7 @@ index 717f34ce9a0..dc111846c12 100644
|
||||
NULL, // cp_patches
|
||||
THREAD);
|
||||
}
|
||||
@@ -309,6 +310,7 @@ public:
|
||||
@@ -315,6 +316,7 @@ public:
|
||||
Handle protection_domain,
|
||||
ClassFileStream* st,
|
||||
const InstanceKlass* host_klass,
|
||||
@@ -111,10 +111,10 @@ index 717f34ce9a0..dc111846c12 100644
|
||||
TRAPS);
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 0ca675e8ee6..08fe42d5c28 100644
|
||||
index 14af1aad21b..0b239b2ff6d 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -503,6 +503,8 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
@@ -488,6 +488,8 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ index 0ca675e8ee6..08fe42d5c28 100644
|
||||
// JSR-292 support
|
||||
if (_any_class_has_resolved_methods) {
|
||||
bool trace_name_printed = false;
|
||||
@@ -774,12 +776,34 @@ jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
|
||||
@@ -750,12 +752,34 @@ jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
|
||||
// load hook event.
|
||||
state->set_class_being_redefined(the_class, _class_load_kind);
|
||||
|
||||
@@ -164,7 +164,7 @@ index 0ca675e8ee6..08fe42d5c28 100644
|
||||
// Clear class_being_redefined just to be sure.
|
||||
state->clear_class_being_redefined();
|
||||
|
||||
@@ -1469,6 +1493,30 @@ void VM_EnhancedRedefineClasses::MethodDataCleaner::do_klass(Klass* k) {
|
||||
@@ -1436,6 +1460,30 @@ void VM_EnhancedRedefineClasses::MethodDataCleaner::do_klass(Klass* k) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ index 0ca675e8ee6..08fe42d5c28 100644
|
||||
void VM_EnhancedRedefineClasses::update_jmethod_ids() {
|
||||
for (int j = 0; j < _matching_methods_length; ++j) {
|
||||
Method* old_method = _matching_old_methods[j];
|
||||
@@ -2018,7 +2066,10 @@ jvmtiError VM_EnhancedRedefineClasses::find_sorted_affected_classes(TRAPS) {
|
||||
@@ -1973,7 +2021,10 @@ jvmtiError VM_EnhancedRedefineClasses::find_sorted_affected_classes(TRAPS) {
|
||||
// Find classes not directly redefined, but affected by a redefinition (because one of its supertypes is redefined)
|
||||
AffectedKlassClosure closure(_affected_klasses);
|
||||
// Updated in j10, from original SystemDictionary::classes_do
|
||||
@@ -208,10 +208,10 @@ index 0ca675e8ee6..08fe42d5c28 100644
|
||||
|
||||
// Sort the affected klasses such that a supertype is always on a smaller array index than its subtype.
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index ed44f0e27ce..7e2afd49650 100644
|
||||
index a48e07e3a6a..3551b06ecde 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -119,6 +119,7 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
@@ -116,6 +116,7 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
void rollback();
|
||||
static void mark_as_scavengable(nmethod* nm);
|
||||
static void unpatch_bytecode(Method* method);
|
||||
@@ -220,10 +220,10 @@ index ed44f0e27ce..7e2afd49650 100644
|
||||
// Figure out which new methods match old methods in name and signature,
|
||||
// which methods have been added, and which are no longer present
|
||||
diff --git a/src/hotspot/share/prims/resolvedMethodTable.cpp b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
index af2ec48c2e1..7741328979f 100644
|
||||
index 8098b80baa6..5a5d5e98623 100644
|
||||
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
@@ -200,7 +200,7 @@ void ResolvedMethodTable::print() {
|
||||
@@ -203,7 +203,7 @@ void ResolvedMethodTable::print() {
|
||||
|
||||
void ResolvedMethodTable::adjust_method_entries(bool * trace_name_printed) {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "only called at safepoint");
|
||||
@@ -232,7 +232,7 @@ index af2ec48c2e1..7741328979f 100644
|
||||
for (int i = 0; i < _the_table->table_size(); ++i) {
|
||||
for (ResolvedMethodEntry* entry = _the_table->bucket(i);
|
||||
entry != NULL;
|
||||
@@ -271,6 +271,8 @@ void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed)
|
||||
@@ -274,6 +274,8 @@ void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed)
|
||||
InstanceKlass* newer_klass = InstanceKlass::cast(old_method->method_holder()->new_version());
|
||||
Method* newer_method = newer_klass->method_with_idnum(old_method->orig_method_idnum());
|
||||
|
||||
@@ -242,10 +242,10 @@ index af2ec48c2e1..7741328979f 100644
|
||||
assert(newer_method != NULL, "method_with_idnum() should not be NULL");
|
||||
assert(old_method != newer_method, "sanity check");
|
||||
diff --git a/src/hotspot/share/prims/unsafe.cpp b/src/hotspot/share/prims/unsafe.cpp
|
||||
index 2f14e01ce0d..d0e0367d8eb 100644
|
||||
index 5f9f93c6b4c..c35ef044e65 100644
|
||||
--- a/src/hotspot/share/prims/unsafe.cpp
|
||||
+++ b/src/hotspot/share/prims/unsafe.cpp
|
||||
@@ -818,6 +818,7 @@ Unsafe_DefineAnonymousClass_impl(JNIEnv *env,
|
||||
@@ -820,6 +820,7 @@ Unsafe_DefineAnonymousClass_impl(JNIEnv *env,
|
||||
host_domain,
|
||||
&st,
|
||||
InstanceKlass::cast(host_klass),
|
||||
@@ -254,5 +254,5 @@ index 2f14e01ce0d..d0e0367d8eb 100644
|
||||
CHECK_NULL);
|
||||
if (anonk == NULL) {
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
2.23.0
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
From 23a83be457df96d519db8de59a49dd65731efcc4 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 15 Dec 2018 18:23:30 +0100
|
||||
Subject: [PATCH 07/50] Fix field method
|
||||
|
||||
---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 19 ++++++++++++-------
|
||||
1 file changed, 12 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 1c7595787a1..a3b65b273e5 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -264,21 +264,26 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
}
|
||||
}
|
||||
} else if (MethodHandles::ref_kind_is_field(ref_kind)) {
|
||||
- Klass* k = (Klass*) java_lang_invoke_MemberName::vmtarget(obj);
|
||||
+ oop clazz = java_lang_invoke_MemberName::clazz(obj);
|
||||
+ if (clazz == NULL) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ Klass* k = java_lang_Class::as_Klass(clazz);
|
||||
if (k == NULL) {
|
||||
return false; // Was cleared before, this MemberName is invalid.
|
||||
}
|
||||
|
||||
- if (k != NULL && k->new_version() != NULL) {
|
||||
+ if (k->is_redefining()) {
|
||||
// Let's try to re-resolve field
|
||||
+ InstanceKlass* old = InstanceKlass::cast(k->old_version());
|
||||
fieldDescriptor fd;
|
||||
int offset = java_lang_invoke_MemberName::vmindex(obj);
|
||||
bool is_static = MethodHandles::ref_kind_is_static(ref_kind);
|
||||
- InstanceKlass* ik = InstanceKlass::cast(k);
|
||||
- if (ik->find_local_field_from_offset(offset, is_static, &fd)) {
|
||||
- InstanceKlass* newest = InstanceKlass::cast(k->newest_version());
|
||||
+ InstanceKlass* ik_old = InstanceKlass::cast(old);
|
||||
+ if (ik_old->find_local_field_from_offset(offset, is_static, &fd)) {
|
||||
+ InstanceKlass* ik_new = InstanceKlass::cast(k->newest_version());
|
||||
fieldDescriptor fd_new;
|
||||
- if (newest->find_local_field(fd.name(), fd.signature(), &fd_new)) {
|
||||
+ if (ik_new->find_local_field(fd.name(), fd.signature(), &fd_new)) {
|
||||
Handle objHandle(Thread::current(), obj); // TODO : review thread
|
||||
MethodHandles::init_field_MemberName(objHandle, fd_new, MethodHandles::ref_kind_is_setter(ref_kind));
|
||||
} else {
|
||||
@@ -288,7 +293,7 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
// Eventually, we probably want to replace them with something more meaningful,
|
||||
// like instance throwing NoSuchFieldError or DMH that will resort to dynamic
|
||||
// field resolution (with possibility of type conversion)
|
||||
- java_lang_invoke_MemberName::set_method(obj, NULL);
|
||||
+ java_lang_invoke_MemberName::set_clazz(obj, NULL);
|
||||
java_lang_invoke_MemberName::set_vmindex(obj, 0);
|
||||
return false;
|
||||
}
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
From d0d6602fe3d664cb2322d7066bf46fa7e20d5d4e Mon Sep 17 00:00:00 2001
|
||||
From 9e65f8342345df054cc1cb694fb4859e2557401d Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 23 May 2020 10:02:15 +0200
|
||||
Subject: [PATCH 45/50] Fix "no original bytecode found" error if method with
|
||||
Subject: [PATCH 07/33] Fix "no original bytecode found" error if method with
|
||||
bkp is missing
|
||||
|
||||
Sometimes IDE can deploy class with erroneous method, such method has
|
||||
no bytecode, but breakpoint position can still exist.
|
||||
n bytecode, but breakpoint position can still exist.
|
||||
---
|
||||
src/hotspot/share/interpreter/bytecodes.cpp | 2 +-
|
||||
.../share/interpreter/interpreterRuntime.cpp | 2 +-
|
||||
@@ -28,10 +28,10 @@ index e377e36b88c..262ecc021b2 100644
|
||||
|
||||
int Bytecodes::special_length_at(Bytecodes::Code code, address bcp, address end) {
|
||||
diff --git a/src/hotspot/share/interpreter/interpreterRuntime.cpp b/src/hotspot/share/interpreter/interpreterRuntime.cpp
|
||||
index f367e658879..71bbd15a4f5 100644
|
||||
index aeafba285f0..026fe9234fb 100644
|
||||
--- a/src/hotspot/share/interpreter/interpreterRuntime.cpp
|
||||
+++ b/src/hotspot/share/interpreter/interpreterRuntime.cpp
|
||||
@@ -834,7 +834,7 @@ IRT_END
|
||||
@@ -819,7 +819,7 @@ IRT_END
|
||||
// Invokes
|
||||
|
||||
IRT_ENTRY(Bytecodes::Code, InterpreterRuntime::get_original_bytecode_at(JavaThread* thread, Method* method, address bcp))
|
||||
@@ -41,10 +41,10 @@ index f367e658879..71bbd15a4f5 100644
|
||||
|
||||
IRT_ENTRY(void, InterpreterRuntime::set_original_bytecode_at(JavaThread* thread, Method* method, address bcp, Bytecodes::Code new_code))
|
||||
diff --git a/src/hotspot/share/oops/method.cpp b/src/hotspot/share/oops/method.cpp
|
||||
index bee69f9cec6..f1e22db70d6 100644
|
||||
index e47dd223f92..165a2e4de36 100644
|
||||
--- a/src/hotspot/share/oops/method.cpp
|
||||
+++ b/src/hotspot/share/oops/method.cpp
|
||||
@@ -1747,14 +1747,14 @@ bool CompressedLineNumberReadStream::read_pair() {
|
||||
@@ -1789,14 +1789,14 @@ bool CompressedLineNumberReadStream::read_pair() {
|
||||
|
||||
#if INCLUDE_JVMTI
|
||||
|
||||
@@ -61,7 +61,7 @@ index bee69f9cec6..f1e22db70d6 100644
|
||||
ResourceMark rm;
|
||||
fatal("no original bytecode found in %s at bci %d", name_and_sig_as_C_string(), bci);
|
||||
}
|
||||
@@ -1900,7 +1900,7 @@ BreakpointInfo::BreakpointInfo(Method* m, int bci) {
|
||||
@@ -1942,7 +1942,7 @@ BreakpointInfo::BreakpointInfo(Method* m, int bci) {
|
||||
_signature_index = m->signature_index();
|
||||
_orig_bytecode = (Bytecodes::Code) *m->bcp_from(_bci);
|
||||
if (_orig_bytecode == Bytecodes::_breakpoint)
|
||||
@@ -70,7 +70,7 @@ index bee69f9cec6..f1e22db70d6 100644
|
||||
_next = NULL;
|
||||
}
|
||||
|
||||
@@ -1909,7 +1909,7 @@ void BreakpointInfo::set(Method* method) {
|
||||
@@ -1951,7 +1951,7 @@ void BreakpointInfo::set(Method* method) {
|
||||
{
|
||||
Bytecodes::Code code = (Bytecodes::Code) *method->bcp_from(_bci);
|
||||
if (code == Bytecodes::_breakpoint)
|
||||
@@ -80,7 +80,7 @@ index bee69f9cec6..f1e22db70d6 100644
|
||||
}
|
||||
#endif
|
||||
diff --git a/src/hotspot/share/oops/method.hpp b/src/hotspot/share/oops/method.hpp
|
||||
index 4533476ff8f..193e1845b23 100644
|
||||
index 4ac3e6e80de..9ff4f0e8036 100644
|
||||
--- a/src/hotspot/share/oops/method.hpp
|
||||
+++ b/src/hotspot/share/oops/method.hpp
|
||||
@@ -230,7 +230,7 @@ class Method : public Metadata {
|
||||
@@ -102,10 +102,10 @@ index 4533476ff8f..193e1845b23 100644
|
||||
void set_breakpoint(int bci);
|
||||
void clear_breakpoint(int bci);
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index a785a43d352..2321483dcbd 100644
|
||||
index 0b239b2ff6d..aba99bb60fa 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -1389,14 +1389,16 @@ void VM_EnhancedRedefineClasses::unpatch_bytecode(Method* method) {
|
||||
@@ -1356,14 +1356,16 @@ void VM_EnhancedRedefineClasses::unpatch_bytecode(Method* method) {
|
||||
|
||||
if (code == Bytecodes::_breakpoint) {
|
||||
int bci = method->bci_from(bcp);
|
||||
@@ -131,5 +131,5 @@ index a785a43d352..2321483dcbd 100644
|
||||
} else {
|
||||
java_code = Bytecodes::java_code(code);
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
2.23.0
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
From 1fe56253f7e63d69f9a12963316889c5e87111eb Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 15 Dec 2018 20:16:37 +0100
|
||||
Subject: [PATCH 08/50] Fix nonstatic field handles
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index a3b65b273e5..c64d6bb1bb5 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -337,6 +337,7 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
if (obj == NULL) {
|
||||
return;
|
||||
}
|
||||
+ bool oop_updated = false;
|
||||
if (obj->is_instance() && InstanceKlass::cast(obj->klass())->is_mirror_instance_klass()) {
|
||||
Klass* klass = java_lang_Class::as_Klass(obj);
|
||||
if (klass != NULL && klass->is_instance_klass()) {
|
||||
@@ -344,13 +345,17 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
if (klass->new_version() != NULL) {
|
||||
obj = InstanceKlass::cast(klass->new_version())->java_mirror();
|
||||
S::oop_store(p, obj);
|
||||
+ oop_updated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+
|
||||
// JSR 292 support, uptade java.lang.invoke.MemberName instances
|
||||
if (java_lang_invoke_MemberName::is_instance(obj)) {
|
||||
- update_member_name(obj);
|
||||
+ if (oop_updated) {
|
||||
+ update_member_name(obj);
|
||||
+ }
|
||||
} else if (java_lang_invoke_DirectMethodHandle::is_instance(obj)) {
|
||||
if (!update_direct_method_handle(obj)) {
|
||||
// DMH is no longer valid, replace it with null reference.
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 8b79e673a3a9d12c97b8b7dd2f4d79c2d4cdd1d6 Mon Sep 17 00:00:00 2001
|
||||
From 08175b2107ccaabcd626ebaf6f154bdd2841a88e Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 24 May 2020 12:07:42 +0200
|
||||
Subject: [PATCH 48/50] Replace deleted method with
|
||||
Subject: [PATCH 08/33] Replace deleted method with
|
||||
Universe::throw_no_such_method_error
|
||||
|
||||
---
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH 48/50] Replace deleted method with
|
||||
1 file changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/resolvedMethodTable.cpp b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
index 7741328979f..06581643c3b 100644
|
||||
index 5a5d5e98623..c7996df51bc 100644
|
||||
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
@@ -261,25 +261,25 @@ void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed)
|
||||
@@ -264,25 +264,25 @@ void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed)
|
||||
|
||||
if (old_method->is_old()) {
|
||||
|
||||
@@ -53,5 +53,5 @@ index 7741328979f..06581643c3b 100644
|
||||
|
||||
java_lang_invoke_ResolvedMethodName::set_vmtarget(mem_name, newer_method);
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
2.23.0
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
From caf7fe94c42bea9606f96023cebe466058a1eef5 Mon Sep 17 00:00:00 2001
|
||||
From f243b468b99115fcc4552644fea57cb695ab3ef8 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 12 Jun 2020 17:43:52 +0200
|
||||
Subject: [PATCH 49/50] Support for G1 gc
|
||||
Subject: [PATCH 09/33] Support for G1 gc
|
||||
|
||||
---
|
||||
src/hotspot/share/gc/g1/g1CollectedHeap.hpp | 1 +
|
||||
src/hotspot/share/gc/g1/g1CollectedHeap.cpp | 20 +++
|
||||
src/hotspot/share/gc/g1/g1CollectedHeap.hpp | 3 +
|
||||
src/hotspot/share/gc/g1/g1FullCollector.cpp | 16 +-
|
||||
.../share/gc/g1/g1FullGCCompactTask.cpp | 92 +++++++++-
|
||||
.../share/gc/g1/g1FullGCCompactTask.hpp | 19 +++
|
||||
@@ -21,16 +22,54 @@ Subject: [PATCH 49/50] Support for G1 gc
|
||||
src/hotspot/share/gc/shared/gcConfig.cpp | 2 +-
|
||||
src/hotspot/share/gc/shared/space.inline.hpp | 3 +-
|
||||
src/hotspot/share/memory/universe.cpp | 5 +
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 31 +++-
|
||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 1 +
|
||||
src/hotspot/share/runtime/arguments.cpp | 2 +-
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 75 ++++++---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 6 +-
|
||||
src/hotspot/share/runtime/arguments.cpp | 4 +-
|
||||
src/hotspot/share/utilities/growableArray.hpp | 4 +
|
||||
21 files changed, 570 insertions(+), 126 deletions(-)
|
||||
22 files changed, 628 insertions(+), 141 deletions(-)
|
||||
create mode 100644 src/hotspot/share/gc/shared/dcevmSharedGC.cpp
|
||||
create mode 100644 src/hotspot/share/gc/shared/dcevmSharedGC.hpp
|
||||
|
||||
diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp
|
||||
index 83b7d6b5077..c4ae1eee351 100644
|
||||
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp
|
||||
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp
|
||||
@@ -2115,6 +2115,21 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
+class G1IterateObjectClosureTask : public AbstractGangTask {
|
||||
+ private:
|
||||
+ ObjectClosure* _cl;
|
||||
+ G1CollectedHeap* _g1h;
|
||||
+ HeapRegionClaimer _hrclaimer;
|
||||
+ public:
|
||||
+ G1IterateObjectClosureTask(ObjectClosure* cl, G1CollectedHeap* g1h) : AbstractGangTask("IterateObject Closure"),
|
||||
+ _cl(cl), _g1h(g1h), _hrclaimer(g1h->workers()->active_workers()) { }
|
||||
+
|
||||
+ virtual void work(uint worker_id) {
|
||||
+ IterateObjectClosureRegionClosure blk(_cl);
|
||||
+ _g1h->heap_region_par_iterate_from_worker_offset(&blk, &_hrclaimer, worker_id);
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
void G1CollectedHeap::object_iterate(ObjectClosure* cl) {
|
||||
IterateObjectClosureRegionClosure blk(cl);
|
||||
heap_region_iterate(&blk);
|
||||
@@ -2128,6 +2143,11 @@ void G1CollectedHeap::heap_region_iterate(HeapRegionClosure* cl) const {
|
||||
_hrm.iterate(cl);
|
||||
}
|
||||
|
||||
+void G1CollectedHeap::object_par_iterate(ObjectClosure* cl) {
|
||||
+ G1IterateObjectClosureTask iocl_task(cl, this);
|
||||
+ workers()->run_task(&iocl_task);
|
||||
+}
|
||||
+
|
||||
void G1CollectedHeap::heap_region_par_iterate_from_worker_offset(HeapRegionClosure* cl,
|
||||
HeapRegionClaimer *hrclaimer,
|
||||
uint worker_id) const {
|
||||
diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp
|
||||
index 8a171dc6b52..0735eef0da8 100644
|
||||
index be160d04bfe..9e92ee4a1fa 100644
|
||||
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp
|
||||
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp
|
||||
@@ -144,6 +144,7 @@ class G1CollectedHeap : public CollectedHeap {
|
||||
@@ -41,6 +80,15 @@ index 8a171dc6b52..0735eef0da8 100644
|
||||
|
||||
// Other related classes.
|
||||
friend class HeapRegionClaimer;
|
||||
@@ -1116,6 +1117,8 @@ public:
|
||||
|
||||
// Iteration functions.
|
||||
|
||||
+ void object_par_iterate(ObjectClosure* cl);
|
||||
+
|
||||
// Iterate over all objects, calling "cl.do_object" on each.
|
||||
virtual void object_iterate(ObjectClosure* cl);
|
||||
|
||||
diff --git a/src/hotspot/share/gc/g1/g1FullCollector.cpp b/src/hotspot/share/gc/g1/g1FullCollector.cpp
|
||||
index 4362ee87e30..7b9496976b8 100644
|
||||
--- a/src/hotspot/share/gc/g1/g1FullCollector.cpp
|
||||
@@ -76,7 +124,7 @@ index 4362ee87e30..7b9496976b8 100644
|
||||
}
|
||||
|
||||
diff --git a/src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp b/src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp
|
||||
index 660afc88f02..d101a9f2177 100644
|
||||
index 0c2fc088fa4..e7d830979f6 100644
|
||||
--- a/src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp
|
||||
+++ b/src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp
|
||||
@@ -30,6 +30,7 @@
|
||||
@@ -236,7 +284,7 @@ index 6c8eaf5967e..ea52a2db8cc 100644
|
||||
|
||||
#endif // SHARE_GC_G1_G1FULLGCCOMPACTTASK_HPP
|
||||
diff --git a/src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp b/src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp
|
||||
index 3e3440804e4..23c0d615088 100644
|
||||
index 76e9e77d739..44fc32c1c47 100644
|
||||
--- a/src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp
|
||||
+++ b/src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp
|
||||
@@ -31,13 +31,19 @@
|
||||
@@ -942,10 +990,10 @@ index 00000000000..e2ef0171fb2
|
||||
+
|
||||
+#endif
|
||||
diff --git a/src/hotspot/share/gc/shared/gcConfig.cpp b/src/hotspot/share/gc/shared/gcConfig.cpp
|
||||
index 39364a64cb2..945b06ad2a4 100644
|
||||
index adb0f5dd25c..20e0ef9ee8a 100644
|
||||
--- a/src/hotspot/share/gc/shared/gcConfig.cpp
|
||||
+++ b/src/hotspot/share/gc/shared/gcConfig.cpp
|
||||
@@ -101,7 +101,7 @@ void GCConfig::fail_if_unsupported_gc_is_selected() {
|
||||
@@ -106,7 +106,7 @@ void GCConfig::fail_if_unsupported_gc_is_selected() {
|
||||
}
|
||||
|
||||
void GCConfig::select_gc_ergonomically() {
|
||||
@@ -976,7 +1024,7 @@ index 8c255d6d428..71ed3cfcda8 100644
|
||||
oop(compaction_top)->init_mark_raw();
|
||||
assert(oop(compaction_top)->klass() != NULL, "should have a class");
|
||||
diff --git a/src/hotspot/share/memory/universe.cpp b/src/hotspot/share/memory/universe.cpp
|
||||
index d0a6d665aa0..3dc4cc1323c 100644
|
||||
index 9a633280118..2e4f597cf1f 100644
|
||||
--- a/src/hotspot/share/memory/universe.cpp
|
||||
+++ b/src/hotspot/share/memory/universe.cpp
|
||||
@@ -210,6 +210,11 @@ void Universe::root_oops_do(OopClosure *oopClosure) {
|
||||
@@ -992,7 +1040,7 @@ index d0a6d665aa0..3dc4cc1323c 100644
|
||||
SystemDictionary::oops_do(oopClosure);
|
||||
}
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 1fbba406087..32929b3d7a0 100644
|
||||
index aba99bb60fa..8b6fad2128e 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -36,7 +36,6 @@
|
||||
@@ -1003,15 +1051,16 @@ index 1fbba406087..32929b3d7a0 100644
|
||||
#include "oops/fieldStreams.hpp"
|
||||
#include "oops/klassVtable.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
@@ -55,6 +54,7 @@
|
||||
@@ -55,6 +54,8 @@
|
||||
#include "utilities/events.hpp"
|
||||
#include "oops/constantPool.inline.hpp"
|
||||
#include "gc/cms/cmsHeap.hpp"
|
||||
+#include "gc/g1/g1CollectedHeap.hpp"
|
||||
+#include "gc/shared/dcevmSharedGC.hpp"
|
||||
|
||||
Array<Method*>* VM_EnhancedRedefineClasses::_old_methods = NULL;
|
||||
Array<Method*>* VM_EnhancedRedefineClasses::_new_methods = NULL;
|
||||
@@ -78,7 +78,7 @@ Klass* VM_EnhancedRedefineClasses::_the_class_oop = NULL;
|
||||
@@ -78,7 +79,7 @@ Klass* VM_EnhancedRedefineClasses::_the_class_oop = NULL;
|
||||
// - class_defs class definition - either new class or redefined class
|
||||
// note that this is not the final array of classes to be redefined
|
||||
// we need to scan for all affected classes (e.g. subclasses) and
|
||||
@@ -1020,7 +1069,7 @@ index 1fbba406087..32929b3d7a0 100644
|
||||
// @param class_load_kind always jvmti_class_load_kind_redefine
|
||||
VM_EnhancedRedefineClasses::VM_EnhancedRedefineClasses(jint class_count, const jvmtiClassDefinition *class_defs, JvmtiClassLoadKind class_load_kind) :
|
||||
VM_GC_Operation(Universe::heap()->total_collections(), GCCause::_heap_inspection, Universe::heap()->total_full_collections(), true) {
|
||||
@@ -216,6 +216,13 @@ void VM_EnhancedRedefineClasses::mark_as_scavengable(nmethod* nm) {
|
||||
@@ -216,6 +217,13 @@ void VM_EnhancedRedefineClasses::mark_as_scavengable(nmethod* nm) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1034,7 +1083,7 @@ index 1fbba406087..32929b3d7a0 100644
|
||||
// TODO comment
|
||||
struct StoreBarrier {
|
||||
// TODO: j10 review change ::oop_store -> HeapAccess<>::oop_store
|
||||
@@ -430,7 +437,7 @@ public:
|
||||
@@ -430,7 +438,7 @@ public:
|
||||
src->set_klass(obj->klass()->new_version());
|
||||
// FIXME: instance updates...
|
||||
//guarantee(false, "instance updates!");
|
||||
@@ -1043,7 +1092,18 @@ index 1fbba406087..32929b3d7a0 100644
|
||||
}
|
||||
} else {
|
||||
obj->set_klass(obj->klass()->new_version());
|
||||
@@ -507,7 +514,12 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
@@ -452,6 +460,10 @@ public:
|
||||
void VM_EnhancedRedefineClasses::doit() {
|
||||
Thread *thread = Thread::current();
|
||||
|
||||
+ if (log_is_enabled(Info, redefine, class, timer)) {
|
||||
+ _timer_vm_op_doit.start();
|
||||
+ }
|
||||
+
|
||||
#if INCLUDE_CDS
|
||||
if (UseSharedSpaces) {
|
||||
// Sharing is enabled so we remap the shared readonly space to
|
||||
@@ -507,12 +519,31 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
// mark such nmethod's as "scavengable".
|
||||
// For now, mark all nmethod's as scavengable that are not scavengable already
|
||||
if (ScavengeRootsInCode) {
|
||||
@@ -1057,24 +1117,85 @@ index 1fbba406087..32929b3d7a0 100644
|
||||
}
|
||||
|
||||
Universe::heap()->ensure_parsability(false);
|
||||
@@ -567,6 +579,7 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
- Universe::heap()->object_iterate(&objectClosure);
|
||||
+ if (UseG1GC) {
|
||||
+ if (log_is_enabled(Info, redefine, class, timer)) {
|
||||
+ _timer_heap_iterate.start();
|
||||
+ }
|
||||
+ G1CollectedHeap::heap()->object_par_iterate(&objectClosure);
|
||||
+ _timer_heap_iterate.stop();
|
||||
+ } else {
|
||||
+ if (log_is_enabled(Info, redefine, class, timer)) {
|
||||
+ _timer_heap_iterate.start();
|
||||
+ }
|
||||
+ Universe::heap()->object_iterate(&objectClosure);
|
||||
+ _timer_heap_iterate.stop();
|
||||
+ }
|
||||
+
|
||||
Universe::root_oops_do(&oopClosureNoBarrier);
|
||||
+
|
||||
}
|
||||
log_trace(redefine, class, obsolete, metadata)("After updating instances");
|
||||
|
||||
@@ -565,11 +596,19 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
|
||||
if (objectClosure.needs_instance_update()) {
|
||||
// Do a full garbage collection to update the instance sizes accordingly
|
||||
+
|
||||
+ if (log_is_enabled(Info, redefine, class, timer)) {
|
||||
+ _timer_heap_full_gc.start();
|
||||
+ }
|
||||
+
|
||||
Universe::set_redefining_gc_run(true);
|
||||
notify_gc_begin(true);
|
||||
+ // TODO: check _metadata_GC_clear_soft_refs with ScavengeRootsInCode
|
||||
Universe::heap()->collect_as_vm_thread(GCCause::_heap_inspection);
|
||||
notify_gc_end();
|
||||
Universe::set_redefining_gc_run(false);
|
||||
@@ -877,7 +890,7 @@ jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
|
||||
// Calculated the difference between new and old class (field change, method change, supertype change, ...).
|
||||
int VM_EnhancedRedefineClasses::calculate_redefinition_flags(InstanceKlass* new_class) {
|
||||
int result = Klass::NoRedefinition;
|
||||
- log_info(redefine, class, load)("Comparing different class versions of class %s",new_class->name()->as_C_string());
|
||||
+ log_debug(redefine, class, load)("Comparing different class versions of class %s",new_class->name()->as_C_string());
|
||||
+
|
||||
+ _timer_heap_full_gc.stop();
|
||||
}
|
||||
|
||||
assert(new_class->old_version() != NULL, "must have old version");
|
||||
InstanceKlass* the_class = InstanceKlass::cast(new_class->old_version());
|
||||
@@ -1584,7 +1597,7 @@ class TransferNativeFunctionRegistration {
|
||||
// Unmark Klass*s as "redefining"
|
||||
@@ -617,6 +656,7 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
}
|
||||
#endif
|
||||
|
||||
+ _timer_vm_op_doit.stop();
|
||||
}
|
||||
|
||||
// Cleanup - runs in JVM thread
|
||||
@@ -640,16 +680,14 @@ void VM_EnhancedRedefineClasses::doit_epilogue() {
|
||||
if (log_is_enabled(Info, redefine, class, timer)) {
|
||||
// Used to have separate timers for "doit" and "all", but the timer
|
||||
// overhead skewed the measurements.
|
||||
- jlong doit_time = _timer_rsc_phase1.milliseconds() +
|
||||
- _timer_rsc_phase2.milliseconds();
|
||||
- jlong all_time = _timer_vm_op_prologue.milliseconds() + doit_time;
|
||||
+ jlong all_time = _timer_vm_op_prologue.milliseconds() + _timer_vm_op_doit.milliseconds();
|
||||
|
||||
log_info(redefine, class, timer)
|
||||
("vm_op: all=" JLONG_FORMAT " prologue=" JLONG_FORMAT " doit=" JLONG_FORMAT,
|
||||
- all_time, _timer_vm_op_prologue.milliseconds(), doit_time);
|
||||
+ all_time, _timer_vm_op_prologue.milliseconds(), _timer_vm_op_doit.milliseconds());
|
||||
log_info(redefine, class, timer)
|
||||
- ("redefine_single_class: phase1=" JLONG_FORMAT " phase2=" JLONG_FORMAT,
|
||||
- _timer_rsc_phase1.milliseconds(), _timer_rsc_phase2.milliseconds());
|
||||
+ ("doit: heap iterate=" JLONG_FORMAT " fullgc=" JLONG_FORMAT,
|
||||
+ _timer_heap_iterate.milliseconds(), _timer_heap_full_gc.milliseconds());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1398,7 +1436,7 @@ void VM_EnhancedRedefineClasses::unpatch_bytecode(Method* method) {
|
||||
// arrayKlassOops. See Open Issues in jvmtiRedefineClasses.hpp.
|
||||
void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
|
||||
if (!k->is_instance_klass()) {
|
||||
- return;
|
||||
+ return;
|
||||
}
|
||||
|
||||
HandleMark hm(_thread);
|
||||
@@ -1584,7 +1622,7 @@ class TransferNativeFunctionRegistration {
|
||||
|
||||
// Recursively search the binary tree of possibly prefixed method names.
|
||||
// Iteration could be used if all agents were well behaved. Full tree walk is
|
||||
@@ -1083,7 +1204,7 @@ index 1fbba406087..32929b3d7a0 100644
|
||||
// Branch at each depth in the binary tree is:
|
||||
// (1) without the prefix.
|
||||
// (2) with the prefix.
|
||||
@@ -1689,7 +1702,7 @@ void VM_EnhancedRedefineClasses::transfer_old_native_function_registrations(Inst
|
||||
@@ -1689,7 +1727,7 @@ void VM_EnhancedRedefineClasses::transfer_old_native_function_registrations(Inst
|
||||
transfer.transfer_registrations(_matching_old_methods, _matching_methods_length);
|
||||
}
|
||||
|
||||
@@ -1092,7 +1213,26 @@ index 1fbba406087..32929b3d7a0 100644
|
||||
// Deoptimize all compiled code that depends on this class.
|
||||
//
|
||||
// If the can_redefine_classes capability is obtained in the onload
|
||||
@@ -2057,8 +2070,8 @@ static bool match_second(void* value, KlassPair elem) {
|
||||
@@ -1816,10 +1854,6 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
|
||||
HandleMark hm(THREAD); // make sure handles from this call are freed
|
||||
|
||||
- if (log_is_enabled(Info, redefine, class, timer)) {
|
||||
- _timer_rsc_phase1.start();
|
||||
- }
|
||||
-
|
||||
InstanceKlass* new_class = new_class_oop;
|
||||
InstanceKlass* the_class = InstanceKlass::cast(new_class_oop->old_version());
|
||||
assert(the_class != NULL, "must have old version");
|
||||
@@ -1874,7 +1908,6 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
new_class->external_name(),
|
||||
java_lang_Class::classRedefinedCount(new_class->java_mirror()));
|
||||
}
|
||||
- _timer_rsc_phase2.stop();
|
||||
} // end redefine_single_class()
|
||||
|
||||
|
||||
@@ -2057,8 +2090,8 @@ static bool match_second(void* value, KlassPair elem) {
|
||||
// For each class to be redefined parse the bytecode and figure out the superclass and all interfaces.
|
||||
// First newly introduced classes (_class_defs) are scanned and then affected classed (_affected_klasses).
|
||||
// Affected flag is cleared (clear_redefinition_flag(Klass::MarkedAsAffected))
|
||||
@@ -1104,10 +1244,23 @@ index 1fbba406087..32929b3d7a0 100644
|
||||
ResourceMark mark(THREAD);
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index d8a11b51fe9..030852b160a 100644
|
||||
index 3551b06ecde..62a0fbf54d4 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -115,6 +115,7 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
@@ -86,9 +86,10 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
// Performance measurement support. These timers do not cover all
|
||||
// the work done for JVM/TI RedefineClasses() but they do cover
|
||||
// the heavy lifting.
|
||||
- elapsedTimer _timer_rsc_phase1;
|
||||
- elapsedTimer _timer_rsc_phase2;
|
||||
+ elapsedTimer _timer_vm_op_doit;
|
||||
elapsedTimer _timer_vm_op_prologue;
|
||||
+ elapsedTimer _timer_heap_iterate;
|
||||
+ elapsedTimer _timer_heap_full_gc;
|
||||
|
||||
// These routines are roughly in call order unless otherwise noted.
|
||||
|
||||
@@ -115,6 +116,7 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
|
||||
void rollback();
|
||||
static void mark_as_scavengable(nmethod* nm);
|
||||
@@ -1116,23 +1269,26 @@ index d8a11b51fe9..030852b160a 100644
|
||||
static void fix_invoke_method(Method* method);
|
||||
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index 72580b384dd..45f0858e57d 100644
|
||||
index 36276741b5c..0db55d00bd3 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -2047,7 +2047,7 @@ bool Arguments::check_gc_consistency() {
|
||||
@@ -2045,9 +2045,9 @@ bool Arguments::check_gc_consistency() {
|
||||
if (AllowEnhancedClassRedefinition) {
|
||||
// Must use serial GC. This limitation applies because the instance size changing GC modifications
|
||||
// are only built into the mark and compact algorithm.
|
||||
- if ((!UseSerialGC && !UseConcMarkSweepGC) && i >= 1) {
|
||||
+ if ((!UseSerialGC && !UseConcMarkSweepGC && !UseG1GC) && i >= 1) {
|
||||
jio_fprintf(defaultStream::error_stream(),
|
||||
"Must use the serial or concurrent mark sweep GC with enhanced class redefinition.\n");
|
||||
- "Must use the serial or concurrent mark sweep GC with enhanced class redefinition.\n");
|
||||
+ "Must use the Serial, Concurrent Mark Sweep or G1 GC with enhanced class redefinition.\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
diff --git a/src/hotspot/share/utilities/growableArray.hpp b/src/hotspot/share/utilities/growableArray.hpp
|
||||
index f37d94a0529..738d475aea6 100644
|
||||
index ea746e065fa..d13e64f3806 100644
|
||||
--- a/src/hotspot/share/utilities/growableArray.hpp
|
||||
+++ b/src/hotspot/share/utilities/growableArray.hpp
|
||||
@@ -532,6 +532,10 @@ template<class E> class GrowableArrayIterator : public StackObj {
|
||||
@@ -523,6 +523,10 @@ template<class E> class GrowableArrayIterator : public StackObj {
|
||||
assert(_array == rhs._array, "iterator belongs to different array");
|
||||
return _position != rhs._position;
|
||||
}
|
||||
@@ -1144,5 +1300,5 @@ index f37d94a0529..738d475aea6 100644
|
||||
|
||||
// Custom STL-style iterator to iterate over elements of a GrowableArray that satisfy a given predicate
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
2.23.0
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
From c7bf974723c6822dca4abc878ee3e59df59d5330 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 13 Jun 2020 18:50:59 +0200
|
||||
Subject: [PATCH 10/33] Change log level in advanced redefinition
|
||||
|
||||
- Change log level for "Comparing different class ver.." to debug
|
||||
- Fix adjust_method_entries_dcevm logging levels and severity
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 2 +-
|
||||
src/hotspot/share/prims/resolvedMethodTable.cpp | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 8b6fad2128e..a8adfa5af47 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -915,7 +915,7 @@ jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
|
||||
// Calculated the difference between new and old class (field change, method change, supertype change, ...).
|
||||
int VM_EnhancedRedefineClasses::calculate_redefinition_flags(InstanceKlass* new_class) {
|
||||
int result = Klass::NoRedefinition;
|
||||
- log_info(redefine, class, load)("Comparing different class versions of class %s",new_class->name()->as_C_string());
|
||||
+ log_debug(redefine, class, load)("Comparing different class versions of class %s",new_class->name()->as_C_string());
|
||||
|
||||
assert(new_class->old_version() != NULL, "must have old version");
|
||||
InstanceKlass* the_class = InstanceKlass::cast(new_class->old_version());
|
||||
diff --git a/src/hotspot/share/prims/resolvedMethodTable.cpp b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
index c7996df51bc..082d3d26c34 100644
|
||||
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
@@ -273,7 +273,7 @@ void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed)
|
||||
} else {
|
||||
newer_method = newer_klass->method_with_idnum(old_method->orig_method_idnum());
|
||||
|
||||
- log_info(redefine, class, load, exceptions)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
|
||||
+ log_debug(redefine, class, update)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
|
||||
|
||||
assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
|
||||
assert(newer_method != NULL, "method_with_idnum() should not be NULL");
|
||||
@@ -293,7 +293,7 @@ void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed)
|
||||
|
||||
ResourceMark rm;
|
||||
if (!(*trace_name_printed)) {
|
||||
- log_info(redefine, class, update)("adjust: name=%s", old_method->method_holder()->external_name());
|
||||
+ log_debug(redefine, class, update)("adjust: name=%s", old_method->method_holder()->external_name());
|
||||
*trace_name_printed = true;
|
||||
}
|
||||
log_debug(redefine, class, update, constantpool)
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,257 +0,0 @@
|
||||
From 11d10158d77512795b1b8ab8378620b95b67f175 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 29 Dec 2018 13:22:29 +0100
|
||||
Subject: [PATCH 10/50] Code cleanup
|
||||
|
||||
---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 125 ++++++------------
|
||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 3 -
|
||||
2 files changed, 40 insertions(+), 88 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 9b8678a53fb..0aa1ac4ff80 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "memory/metaspaceShared.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "memory/iterator.inline.hpp"
|
||||
-#include "gc/serial/markSweep.hpp" // FIXME: other GC?
|
||||
+#include "gc/serial/markSweep.hpp"
|
||||
#include "oops/fieldStreams.hpp"
|
||||
#include "oops/klassVtable.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
@@ -485,7 +485,9 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
}
|
||||
|
||||
// Deoptimize all compiled code that depends on this class (do only once, because it clears whole cache)
|
||||
- flush_dependent_code(NULL, thread);
|
||||
+ //if (_max_redefinition_flags > Klass::ModifyClass) {
|
||||
+ flush_dependent_code(NULL, thread);
|
||||
+ //}
|
||||
|
||||
// JSR-292 support
|
||||
if (_any_class_has_resolved_methods) {
|
||||
@@ -593,17 +595,28 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
// See jvmtiExport.hpp for detailed explanation.
|
||||
JvmtiExport::set_has_redefined_a_class();
|
||||
|
||||
- // check_class() is optionally called for product bits, but is
|
||||
- // always called for non-product bits.
|
||||
#ifdef PRODUCT
|
||||
if (log_is_enabled(Trace, redefine, class, obsolete, metadata)) {
|
||||
#endif
|
||||
- log_trace(redefine, class, obsolete, metadata)("calling check_class");
|
||||
- CheckClass check_class(thread);
|
||||
- ClassLoaderDataGraph::classes_do(&check_class);
|
||||
+ for (int i=0; i<_affected_klasses->length(); i++) {
|
||||
+ Klass* the_class = _affected_klasses->at(i);
|
||||
+ assert(the_class->new_version() != NULL, "Must have been redefined");
|
||||
+ Klass* new_version = the_class->new_version();
|
||||
+ assert(new_version->new_version() == NULL, "Must be newest version");
|
||||
+
|
||||
+ if (!(new_version->super() == NULL || new_version->super()->new_version() == NULL)) {
|
||||
+ new_version->print();
|
||||
+ new_version->super()->print();
|
||||
+ }
|
||||
+ assert(new_version->super() == NULL || new_version->super()->new_version() == NULL, "Super class must be newest version");
|
||||
+ }
|
||||
+ log_trace(redefine, class, obsolete, metadata)("calling check_class");
|
||||
+ CheckClass check_class(thread);
|
||||
+ ClassLoaderDataGraph::classes_do(&check_class);
|
||||
#ifdef PRODUCT
|
||||
}
|
||||
#endif
|
||||
+
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1279,24 +1292,23 @@ void VM_EnhancedRedefineClasses::calculate_instance_update_information(Klass* ne
|
||||
GrowableArray<int> result = cl.finish();
|
||||
ik->store_update_information(result);
|
||||
ik->set_copying_backwards(cl.does_copy_backwards());
|
||||
-/* TODO logging
|
||||
- if (RC_TRACE_ENABLED(0x00000001)) {
|
||||
- RC_TRACE(0x00000001, ("Instance update information for %s:", new_version->name()->as_C_string()));
|
||||
+ if (log_is_enabled(Trace, redefine, class, obsolete, metadata)) {
|
||||
+ log_trace(redefine, class, obsolete, metadata)("Instance update information for %s:", new_version->name()->as_C_string());
|
||||
if (cl.does_copy_backwards()) {
|
||||
- RC_TRACE(0x00000001, ("\tDoes copy backwards!"));
|
||||
+ log_trace(redefine, class, obsolete, metadata)("\tDoes copy backwards!");
|
||||
}
|
||||
for (int i=0; i<result.length(); i++) {
|
||||
int curNum = result.at(i);
|
||||
if (curNum < 0) {
|
||||
- RC_TRACE(0x00000001, ("\t%d CLEAN", curNum));
|
||||
+ log_trace(redefine, class, obsolete, metadata)("\t%d CLEAN", curNum);
|
||||
} else if (curNum > 0) {
|
||||
- RC_TRACE(0x00000001, ("\t%d COPY from %d", curNum, result.at(i + 1)));
|
||||
+ log_trace(redefine, class, obsolete, metadata)("\t%d COPY from %d", curNum, result.at(i + 1));
|
||||
i++;
|
||||
} else {
|
||||
- RC_TRACE(0x00000001, ("\tEND"));
|
||||
+ log_trace(redefine, class, obsolete, metadata)("\tEND");
|
||||
}
|
||||
}
|
||||
- }*/
|
||||
+ }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1813,6 +1825,7 @@ void VM_EnhancedRedefineClasses::compute_added_deleted_matching_methods() {
|
||||
/**
|
||||
FIXME - swap_annotations is never called, check that annotations work
|
||||
*/
|
||||
+// TODO : delete it
|
||||
void VM_EnhancedRedefineClasses::swap_annotations(InstanceKlass* the_class,
|
||||
InstanceKlass* new_class) {
|
||||
// FIXME - probably original implementation only
|
||||
@@ -1822,7 +1835,6 @@ void VM_EnhancedRedefineClasses::swap_annotations(InstanceKlass* the_class,
|
||||
new_class->set_annotations(old_annotations);
|
||||
}
|
||||
|
||||
-
|
||||
// Install the redefinition of a class:
|
||||
// - house keeping (flushing breakpoints and caches, deoptimizing
|
||||
// dependent compiled code)
|
||||
@@ -1853,7 +1865,9 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
|
||||
// DCEVM Deoptimization is always for whole java world, call only once after all classes are redefined
|
||||
// Deoptimize all compiled code that depends on this class
|
||||
- // flush_dependent_code(the_class, THREAD);
|
||||
+ //if (_max_redefinition_flags <= Klass::ModifyClass) {
|
||||
+ //flush_dependent_code(the_class, THREAD);
|
||||
+ //}
|
||||
|
||||
_old_methods = the_class->methods();
|
||||
_new_methods = new_class->methods();
|
||||
@@ -1928,64 +1942,15 @@ void VM_EnhancedRedefineClasses::increment_class_counter(InstanceKlass *ik, TRAP
|
||||
}
|
||||
}
|
||||
|
||||
-// FIXME - class check is currently disabled
|
||||
void VM_EnhancedRedefineClasses::CheckClass::do_klass(Klass* k) {
|
||||
- return;
|
||||
- bool no_old_methods = true; // be optimistic
|
||||
-
|
||||
- // Both array and instance classes have vtables.
|
||||
- // a vtable should never contain old or obsolete methods
|
||||
- ResourceMark rm(_thread);
|
||||
- if (k->vtable_length() > 0 &&
|
||||
- !k->vtable().check_no_old_or_obsolete_entries()) {
|
||||
- if (log_is_enabled(Trace, redefine, class, obsolete, metadata)) {
|
||||
- log_trace(redefine, class, obsolete, metadata)
|
||||
- ("klassVtable::check_no_old_or_obsolete_entries failure -- OLD or OBSOLETE method found -- class: %s",
|
||||
- k->signature_name());
|
||||
- k->vtable().dump_vtable();
|
||||
- }
|
||||
- no_old_methods = false;
|
||||
- }
|
||||
-
|
||||
- if (k->is_instance_klass()) {
|
||||
- HandleMark hm(_thread);
|
||||
- InstanceKlass *ik = InstanceKlass::cast(k);
|
||||
+ HandleMark hm(_thread);
|
||||
+ InstanceKlass *ik = (InstanceKlass *) k;
|
||||
+ assert(ik->new_version() == NULL, "must be latest version in system dictionary");
|
||||
|
||||
- // an itable should never contain old or obsolete methods
|
||||
- if (ik->itable_length() > 0 &&
|
||||
- !ik->itable().check_no_old_or_obsolete_entries()) {
|
||||
- if (log_is_enabled(Trace, redefine, class, obsolete, metadata)) {
|
||||
- log_trace(redefine, class, obsolete, metadata)
|
||||
- ("klassItable::check_no_old_or_obsolete_entries failure -- OLD or OBSOLETE method found -- class: %s",
|
||||
- ik->signature_name());
|
||||
- ik->itable().dump_itable();
|
||||
- }
|
||||
- no_old_methods = false;
|
||||
- }
|
||||
-
|
||||
- // the constant pool cache should never contain non-deleted old or obsolete methods
|
||||
- if (ik->constants() != NULL &&
|
||||
- ik->constants()->cache() != NULL &&
|
||||
- !ik->constants()->cache()->check_no_old_or_obsolete_entries()) {
|
||||
- if (log_is_enabled(Trace, redefine, class, obsolete, metadata)) {
|
||||
- log_trace(redefine, class, obsolete, metadata)
|
||||
- ("cp-cache::check_no_old_or_obsolete_entries failure -- OLD or OBSOLETE method found -- class: %s",
|
||||
- ik->signature_name());
|
||||
- ik->constants()->cache()->dump_cache();
|
||||
- }
|
||||
- no_old_methods = false;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // print and fail guarantee if old methods are found.
|
||||
- if (!no_old_methods) {
|
||||
- if (log_is_enabled(Trace, redefine, class, obsolete, metadata)) {
|
||||
- dump_methods();
|
||||
- } else {
|
||||
- log_trace(redefine, class)("Use the '-Xlog:redefine+class*:' option "
|
||||
- "to see more info about the following guarantee() failure.");
|
||||
- }
|
||||
- guarantee(false, "OLD and/or OBSOLETE method(s) found");
|
||||
+ if (ik->vtable_length() > 0) {
|
||||
+ ResourceMark rm(_thread);
|
||||
+ assert(ik->vtable().check_no_old_or_obsolete_entries(), "old method found");
|
||||
+ ik->vtable().verify(tty, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2051,15 +2016,6 @@ void VM_EnhancedRedefineClasses::dump_methods() {
|
||||
}
|
||||
}
|
||||
|
||||
-// TODO - is it called anywhere?
|
||||
-void VM_EnhancedRedefineClasses::print_on_error(outputStream* st) const {
|
||||
- VM_Operation::print_on_error(st);
|
||||
- if (_the_class_oop != NULL) {
|
||||
- ResourceMark rm;
|
||||
- st->print_cr(", redefining class %s", _the_class_oop->external_name());
|
||||
- }
|
||||
-}
|
||||
-
|
||||
/**
|
||||
Helper class to traverse all loaded classes and figure out if the class is affected by redefinition.
|
||||
*/
|
||||
@@ -2093,7 +2049,7 @@ class AffectedKlassClosure : public KlassClosure {
|
||||
log_trace(redefine, class, load)("found affected class: %s", klass->name()->as_C_string());
|
||||
klass->set_redefinition_flag(Klass::MarkedAsAffected);
|
||||
_affected_klasses->append(klass);
|
||||
- return;
|
||||
+ return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2125,7 +2081,7 @@ jvmtiError VM_EnhancedRedefineClasses::find_sorted_affected_classes(TRAPS) {
|
||||
|
||||
// Find classes not directly redefined, but affected by a redefinition (because one of its supertypes is redefined)
|
||||
AffectedKlassClosure closure(_affected_klasses);
|
||||
- // TODO: j10 - review chancge from SystemDictionary::classes_do(&closure);
|
||||
+ // Updated in j10, from original SystemDictionary::classes_do
|
||||
ClassLoaderDataGraph::dictionary_classes_do(&closure);
|
||||
log_trace(redefine, class, load)("%d classes affected", _affected_klasses->length());
|
||||
|
||||
@@ -2160,7 +2116,6 @@ static bool match_second(void* value, KlassPair elem) {
|
||||
For each class to be redefined parse the bytecode and figure out the superclass and all interfaces.
|
||||
First newly introduced classes (_class_defs) are scanned and then affected classed (_affected_klasses).
|
||||
Affected flag is cleared (clear_redefinition_flag(Klass::MarkedAsAffected))
|
||||
-
|
||||
For each dependency create a KlassPair instance. Finnaly, affected classes (_affected_klasses) are sorted according to pairs.
|
||||
|
||||
TODO - the class file is potentionally parsed multiple times - introduce a cache?
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index b712d69a193..37e63a1810f 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -195,8 +195,5 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
// Modifiable test must be shared between IsModifiableClass query
|
||||
// and redefine implementation
|
||||
static bool is_modifiable_class(oop klass_mirror);
|
||||
-
|
||||
- // Error printing
|
||||
- void print_on_error(outputStream* st) const;
|
||||
};
|
||||
#endif // SHARE_VM_PRIMS_JVMTIREDEFINECLASSES2_HPP
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From 3645c65d712993ba5af60e10585dd01c18a7f81f Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Tue, 6 Oct 2020 22:15:31 +0200
|
||||
Subject: [PATCH 11/33] AllowEnhancedClassRedefinition is false (disabled) by
|
||||
default
|
||||
|
||||
---
|
||||
src/hotspot/share/runtime/globals.hpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp
|
||||
index 9c007fc2d82..705381825ff 100644
|
||||
--- a/src/hotspot/share/runtime/globals.hpp
|
||||
+++ b/src/hotspot/share/runtime/globals.hpp
|
||||
@@ -2688,7 +2688,7 @@ define_pd_global(uint64_t,MaxRAM, 1ULL*G);
|
||||
experimental(bool, UseFastUnorderedTimeStamps, false, \
|
||||
"Use platform unstable time where supported for timestamps only") \
|
||||
\
|
||||
- product(bool, AllowEnhancedClassRedefinition, true, \
|
||||
+ product(bool, AllowEnhancedClassRedefinition, false, \
|
||||
"Allow enhanced class redefinition beyond swapping method " \
|
||||
"bodies") \
|
||||
\
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
From 1765f4c1b2e8958b458fa17d329be98ad025069c Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 29 Dec 2018 16:05:25 +0100
|
||||
Subject: [PATCH 11/50] Fix check_class
|
||||
|
||||
---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 39 +++++++------------
|
||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 5 +--
|
||||
2 files changed, 16 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 0aa1ac4ff80..c08b3e82b2e 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -1,4 +1,4 @@
|
||||
-/*
|
||||
+ /*
|
||||
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "classfile/metadataOnStackMark.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "classfile/verifier.hpp"
|
||||
+#include "classfile/dictionary.hpp"
|
||||
#include "interpreter/oopMapCache.hpp"
|
||||
#include "interpreter/rewriter.hpp"
|
||||
#include "logging/logStream.hpp"
|
||||
@@ -611,8 +612,7 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
assert(new_version->super() == NULL || new_version->super()->new_version() == NULL, "Super class must be newest version");
|
||||
}
|
||||
log_trace(redefine, class, obsolete, metadata)("calling check_class");
|
||||
- CheckClass check_class(thread);
|
||||
- ClassLoaderDataGraph::classes_do(&check_class);
|
||||
+ ClassLoaderData::the_null_class_loader_data()->dictionary()->classes_do(check_class, thread);
|
||||
#ifdef PRODUCT
|
||||
}
|
||||
#endif
|
||||
@@ -1822,19 +1822,6 @@ void VM_EnhancedRedefineClasses::compute_added_deleted_matching_methods() {
|
||||
assert(_matching_methods_length + _added_methods_length == _new_methods->length(), "sanity");
|
||||
}
|
||||
|
||||
-/**
|
||||
- FIXME - swap_annotations is never called, check that annotations work
|
||||
-*/
|
||||
-// TODO : delete it
|
||||
-void VM_EnhancedRedefineClasses::swap_annotations(InstanceKlass* the_class,
|
||||
- InstanceKlass* new_class) {
|
||||
- // FIXME - probably original implementation only
|
||||
- // Swap annotation fields values
|
||||
- Annotations* old_annotations = the_class->annotations();
|
||||
- the_class->set_annotations(new_class->annotations());
|
||||
- new_class->set_annotations(old_annotations);
|
||||
-}
|
||||
-
|
||||
// Install the redefinition of a class:
|
||||
// - house keeping (flushing breakpoints and caches, deoptimizing
|
||||
// dependent compiled code)
|
||||
@@ -1942,15 +1929,17 @@ void VM_EnhancedRedefineClasses::increment_class_counter(InstanceKlass *ik, TRAP
|
||||
}
|
||||
}
|
||||
|
||||
-void VM_EnhancedRedefineClasses::CheckClass::do_klass(Klass* k) {
|
||||
- HandleMark hm(_thread);
|
||||
- InstanceKlass *ik = (InstanceKlass *) k;
|
||||
- assert(ik->new_version() == NULL, "must be latest version in system dictionary");
|
||||
+void VM_EnhancedRedefineClasses::check_class(InstanceKlass* ik, TRAPS) {
|
||||
+ if (ik->is_instance_klass() && ik->old_version() != NULL) {
|
||||
+ HandleMark hm(THREAD);
|
||||
+
|
||||
+ assert(ik->new_version() == NULL, "must be latest version in system dictionary");
|
||||
|
||||
- if (ik->vtable_length() > 0) {
|
||||
- ResourceMark rm(_thread);
|
||||
- assert(ik->vtable().check_no_old_or_obsolete_entries(), "old method found");
|
||||
- ik->vtable().verify(tty, true);
|
||||
+ if (ik->vtable_length() > 0) {
|
||||
+ ResourceMark rm(THREAD);
|
||||
+ assert(ik->vtable().check_no_old_or_obsolete_entries(), "old method found");
|
||||
+ ik->vtable().verify(tty, true);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2017,7 +2006,7 @@ void VM_EnhancedRedefineClasses::dump_methods() {
|
||||
}
|
||||
|
||||
/**
|
||||
- Helper class to traverse all loaded classes and figure out if the class is affected by redefinition.
|
||||
+ Helper class to traverse all loaded classes and figure out if the class is affected by redefinition.
|
||||
*/
|
||||
class AffectedKlassClosure : public KlassClosure {
|
||||
private:
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index 37e63a1810f..5b3ebc13661 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -144,15 +144,14 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
// Install the redefinition of a class
|
||||
void redefine_single_class(InstanceKlass* new_class_oop, TRAPS);
|
||||
|
||||
- void swap_annotations(InstanceKlass* new_class,
|
||||
- InstanceKlass* scratch_class);
|
||||
-
|
||||
// Increment the classRedefinedCount field in the specific InstanceKlass
|
||||
// and in all direct and indirect subclasses.
|
||||
void increment_class_counter(InstanceKlass *ik, TRAPS);
|
||||
|
||||
void flush_dependent_code(InstanceKlass* k_h, TRAPS);
|
||||
|
||||
+ static void check_class(InstanceKlass* k_oop, TRAPS);
|
||||
+
|
||||
static void dump_methods();
|
||||
|
||||
// Check that there are no old or obsolete methods
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
From 0851d437a65dc9ac6d8355b54689d36e77e104b3 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 29 Dec 2018 17:58:39 +0100
|
||||
Subject: [PATCH 12/50] Fix force_forward in dead space
|
||||
|
||||
---
|
||||
src/hotspot/share/gc/shared/space.inline.hpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/hotspot/share/gc/shared/space.inline.hpp b/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
index 26e56ae6f7e..8c255d6d428 100644
|
||||
--- a/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
+++ b/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
@@ -213,6 +213,7 @@ inline void CompactibleSpace::scan_and_forward(SpaceType* space, CompactPoint* c
|
||||
// see if this is the first dead region.
|
||||
if (first_dead == NULL) {
|
||||
first_dead = cur_obj;
|
||||
+ force_forward = true;
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 800b44f545c7b99026d203690def30ec4b9ed08e Mon Sep 17 00:00:00 2001
|
||||
From ee129595faa4dfc3f9c44329a4d6c7a53f5b294d Mon Sep 17 00:00:00 2001
|
||||
From: Artem Khvastunov <artem.khvastunov@jetbrains.com>
|
||||
Date: Tue, 14 Apr 2020 19:11:35 +0200
|
||||
Subject: [PATCH 32/50] add jvmtiEnhancedRedefineClasses.* to CMakeLists.txt
|
||||
Subject: [PATCH 12/33] add jvmtiEnhancedRedefineClasses.* to CMakeLists.txt
|
||||
|
||||
---
|
||||
jb/project/hotspot-cmake/CMakeLists.txt | 2 ++
|
||||
@@ -28,5 +28,5 @@ index 8b552c27206..6516e39058f 100644
|
||||
../../../src/hotspot/share/prims/jvmtiEnvBase.cpp
|
||||
../../../src/hotspot/share/prims/methodHandles.cpp
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
2.23.0
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From 35aba247d8a3e25f5d19403ba5f293bfdaf6539c Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 1 Mar 2019 18:45:13 +0100
|
||||
Subject: [PATCH 13/50] Cleanup
|
||||
|
||||
---
|
||||
src/hotspot/share/gc/shared/space.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/gc/shared/space.cpp b/src/hotspot/share/gc/shared/space.cpp
|
||||
index 947dff8ae0c..56b144b46f1 100644
|
||||
--- a/src/hotspot/share/gc/shared/space.cpp
|
||||
+++ b/src/hotspot/share/gc/shared/space.cpp
|
||||
@@ -862,7 +862,7 @@ HeapWord* CompactibleSpace::forward_with_rescue(HeapWord* q, size_t size,
|
||||
size_t forward_size = size;
|
||||
|
||||
// (DCEVM) There is a new version of the class of q => different size
|
||||
- if (oop(q)->klass()->new_version() != NULL && oop(q)->klass()->new_version()->update_information() != NULL) {
|
||||
+ if (oop(q)->klass()->new_version() != NULL) {
|
||||
|
||||
size_t new_size = oop(q)->size_given_klass(oop(q)->klass()->new_version());
|
||||
// assert(size != new_size, "instances without changed size have to be updated prior to GC run");
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From dc397b652d9810f6f261070afbb8519f1c2964ee Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 16 Dec 2018 09:55:31 +0100
|
||||
Subject: [PATCH 16/50] Add dcevm distro name
|
||||
From faa30c1c0dc07670641a062b510363c57718e9bf Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Mon, 19 Oct 2020 20:00:04 +0200
|
||||
Subject: [PATCH 13/33] Set HOTSPOT_VM_DISTRO=Dynamic Code Evolution
|
||||
|
||||
---
|
||||
make/autoconf/version-numbers | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/make/autoconf/version-numbers b/make/autoconf/version-numbers
|
||||
index b5a23138213..5c0a3242c80 100644
|
||||
index 0b3247633e3..e1592f4cd3b 100644
|
||||
--- a/make/autoconf/version-numbers
|
||||
+++ b/make/autoconf/version-numbers
|
||||
@@ -43,7 +43,7 @@ PRODUCT_NAME=OpenJDK
|
||||
@@ -44,7 +44,7 @@ PRODUCT_NAME=OpenJDK
|
||||
PRODUCT_SUFFIX="Runtime Environment"
|
||||
JDK_RC_PLATFORM_NAME=Platform
|
||||
COMPANY_NAME=N/A
|
||||
@@ -21,5 +21,5 @@ index b5a23138213..5c0a3242c80 100644
|
||||
VENDOR_URL_BUG=https://bugreport.java.com/bugreport/
|
||||
VENDOR_URL_VM_BUG=https://bugreport.java.com/bugreport/crash.jsp
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
2.23.0
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
From 26a5079eb61a2e23328fbd8ca59ffc2ab6b6193b Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 29 Dec 2018 17:38:27 +0100
|
||||
Subject: [PATCH 14/50] Add codecache flush optimization, but just flush all
|
||||
cache.
|
||||
|
||||
Redefined class can define a new method that overrides
|
||||
method in superclass which is already used in codecache for
|
||||
optimized non-virtual calls, etc...
|
||||
---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 18 ++++++++++++------
|
||||
1 file changed, 12 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index c08b3e82b2e..4ca638548dc 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -486,9 +486,9 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
}
|
||||
|
||||
// Deoptimize all compiled code that depends on this class (do only once, because it clears whole cache)
|
||||
- //if (_max_redefinition_flags > Klass::ModifyClass) {
|
||||
+ // if (_max_redefinition_flags > Klass::ModifyClass) {
|
||||
flush_dependent_code(NULL, thread);
|
||||
- //}
|
||||
+ // }
|
||||
|
||||
// JSR-292 support
|
||||
if (_any_class_has_resolved_methods) {
|
||||
@@ -1736,8 +1736,14 @@ void VM_EnhancedRedefineClasses::flush_dependent_code(InstanceKlass* k_h, TRAPS)
|
||||
// All dependencies have been recorded from startup or this is a second or
|
||||
// subsequent use of RedefineClasses
|
||||
// FIXME: for now, deoptimize all!
|
||||
- if (0 && JvmtiExport::all_dependencies_are_recorded()) {
|
||||
+ if (0 && k_h != NULL && JvmtiExport::all_dependencies_are_recorded()) {
|
||||
CodeCache::flush_evol_dependents_on(k_h);
|
||||
+ Klass* superCl = k_h->super();
|
||||
+ // Deoptimize super classes since redefined class can has a new method override
|
||||
+ while (superCl != NULL && !superCl->is_redefining()) {
|
||||
+ CodeCache::flush_evol_dependents_on(InstanceKlass::cast(superCl));
|
||||
+ superCl = superCl->super();
|
||||
+ }
|
||||
} else {
|
||||
CodeCache::mark_all_nmethods_for_deoptimization();
|
||||
|
||||
@@ -1852,9 +1858,9 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
|
||||
// DCEVM Deoptimization is always for whole java world, call only once after all classes are redefined
|
||||
// Deoptimize all compiled code that depends on this class
|
||||
- //if (_max_redefinition_flags <= Klass::ModifyClass) {
|
||||
- //flush_dependent_code(the_class, THREAD);
|
||||
- //}
|
||||
+// if (_max_redefinition_flags <= Klass::ModifyClass) {
|
||||
+// flush_dependent_code(the_class, THREAD);
|
||||
+// }
|
||||
|
||||
_old_methods = the_class->methods();
|
||||
_new_methods = new_class->methods();
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
From 8f0ce0a1ae603cb32b2ab39a6bb7d3ad86092c46 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 11 Oct 2020 10:43:28 +0200
|
||||
Subject: [PATCH 14/33] Fix G1 nmethod registration
|
||||
|
||||
---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 19 ++++++++++++++++---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 3 ++-
|
||||
2 files changed, 18 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index a8adfa5af47..4ee12b7021f 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -217,7 +217,14 @@ void VM_EnhancedRedefineClasses::mark_as_scavengable(nmethod* nm) {
|
||||
}
|
||||
}
|
||||
|
||||
-void VM_EnhancedRedefineClasses::mark_as_scavengable_g1(nmethod* nm) {
|
||||
+void VM_EnhancedRedefineClasses::unregister_nmethod_g1(nmethod* nm) {
|
||||
+ // It should work not only for G1 but also for another GCs, but this way is safer now
|
||||
+ if (!nm->is_zombie() && !nm->is_unloaded()) {
|
||||
+ Universe::heap()->unregister_nmethod(nm);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void VM_EnhancedRedefineClasses::register_nmethod_g1(nmethod* nm) {
|
||||
// It should work not only for G1 but also for another GCs, but this way is safer now
|
||||
if (!nm->is_zombie() && !nm->is_unloaded()) {
|
||||
Universe::heap()->register_nmethod(nm);
|
||||
@@ -520,8 +527,9 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
// For now, mark all nmethod's as scavengable that are not scavengable already
|
||||
if (ScavengeRootsInCode) {
|
||||
if (UseG1GC) {
|
||||
- // this should work also for other GCs
|
||||
- CodeCache::nmethods_do(mark_as_scavengable_g1);
|
||||
+ // G1 holds references to nmethods in regions based on oops values. Since oops in nmethod can be changed in ChangePointers* closures
|
||||
+ // we unregister nmethods from G1 heap, then closures are processed (oops are changed) and finally we register nmethod to G1 again
|
||||
+ CodeCache::nmethods_do(unregister_nmethod_g1);
|
||||
} else {
|
||||
CodeCache::nmethods_do(mark_as_scavengable);
|
||||
}
|
||||
@@ -544,6 +552,11 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
|
||||
Universe::root_oops_do(&oopClosureNoBarrier);
|
||||
|
||||
+ if (UseG1GC) {
|
||||
+ // this should work also for other GCs
|
||||
+ CodeCache::nmethods_do(register_nmethod_g1);
|
||||
+ }
|
||||
+
|
||||
}
|
||||
log_trace(redefine, class, obsolete, metadata)("After updating instances");
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index 62a0fbf54d4..d00109a0b92 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -116,7 +116,8 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
|
||||
void rollback();
|
||||
static void mark_as_scavengable(nmethod* nm);
|
||||
- static void mark_as_scavengable_g1(nmethod* nm);
|
||||
+ static void unregister_nmethod_g1(nmethod* nm);
|
||||
+ static void register_nmethod_g1(nmethod* nm);
|
||||
static void unpatch_bytecode(Method* method);
|
||||
static void fix_invoke_method(Method* method);
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From 08f455c41f2db7b810c10fa208fc90f55a06fa87 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Thu, 22 Oct 2020 20:15:20 +0200
|
||||
Subject: [PATCH 15/33] Initialize method's _new_version/_old_version to NULL
|
||||
|
||||
---
|
||||
src/hotspot/share/oops/method.cpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/oops/method.cpp b/src/hotspot/share/oops/method.cpp
|
||||
index 165a2e4de36..17c08a9dc18 100644
|
||||
--- a/src/hotspot/share/oops/method.cpp
|
||||
+++ b/src/hotspot/share/oops/method.cpp
|
||||
@@ -83,7 +83,8 @@ Method* Method::allocate(ClassLoaderData* loader_data,
|
||||
return new (loader_data, size, MetaspaceObj::MethodType, THREAD) Method(cm, access_flags);
|
||||
}
|
||||
|
||||
-Method::Method(ConstMethod* xconst, AccessFlags access_flags) {
|
||||
+Method::Method(ConstMethod* xconst, AccessFlags access_flags) : _new_version(NULL),
|
||||
+ _old_version(NULL) {
|
||||
NoSafepointVerifier no_safepoint;
|
||||
set_constMethod(xconst);
|
||||
set_access_flags(access_flags);
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -0,0 +1,191 @@
|
||||
From 82bbf38d7385e26f28f47df65b58b1ab7f8c52c3 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 23 Oct 2020 10:20:26 +0200
|
||||
Subject: [PATCH 16/33] Clear dcevm code separation
|
||||
|
||||
---
|
||||
src/hotspot/share/classfile/systemDictionary.cpp | 4 ++--
|
||||
src/hotspot/share/gc/serial/genMarkSweep.cpp | 8 +++++---
|
||||
src/hotspot/share/interpreter/linkResolver.cpp | 14 ++++++++++----
|
||||
.../instrumentation/jfrEventClassTransformer.cpp | 2 +-
|
||||
src/hotspot/share/oops/instanceKlass.cpp | 10 ++++++----
|
||||
src/hotspot/share/oops/method.cpp | 2 +-
|
||||
src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp | 2 +-
|
||||
src/hotspot/share/runtime/reflection.cpp | 2 +-
|
||||
8 files changed, 27 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.cpp b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
index 42e0fee800f..be4d2010c0c 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
@@ -1152,7 +1152,7 @@ InstanceKlass* SystemDictionary::resolve_from_stream(Symbol* class_name,
|
||||
MutexLocker mu(SystemDictionary_lock, THREAD);
|
||||
|
||||
Klass* check = find_class(h_name, k->class_loader_data());
|
||||
- assert((check == k && !k->is_redefining()) || (k->is_redefining() && check == k->old_version()), "should be present in the dictionary");
|
||||
+ assert(check == k && !k->is_redefining() || k->is_redefining() && check == k->old_version(), "should be present in the dictionary");
|
||||
} );
|
||||
|
||||
return k;
|
||||
@@ -2155,7 +2155,7 @@ void SystemDictionary::check_constraints(unsigned int d_hash,
|
||||
// also hold array classes.
|
||||
|
||||
assert(check->is_instance_klass(), "noninstance in systemdictionary");
|
||||
- if ((defining == true) || ((k != check) && k->old_version() != check)) {
|
||||
+ if ((defining == true) || (k != check && (!AllowEnhancedClassRedefinition || k->old_version() != check))) {
|
||||
throwException = true;
|
||||
ss.print("loader %s", loader_data->loader_name_and_id());
|
||||
ss.print(" attempted duplicate %s definition for %s. (%s)",
|
||||
diff --git a/src/hotspot/share/gc/serial/genMarkSweep.cpp b/src/hotspot/share/gc/serial/genMarkSweep.cpp
|
||||
index b18682f9a12..590b5389b4d 100644
|
||||
--- a/src/hotspot/share/gc/serial/genMarkSweep.cpp
|
||||
+++ b/src/hotspot/share/gc/serial/genMarkSweep.cpp
|
||||
@@ -343,7 +343,9 @@ void GenMarkSweep::mark_sweep_phase4() {
|
||||
|
||||
GenCompactClosure blk;
|
||||
gch->generation_iterate(&blk, true);
|
||||
- DcevmSharedGC::copy_rescued_objects_back(MarkSweep::_rescued_oops, true);
|
||||
- DcevmSharedGC::clear_rescued_objects_resource(MarkSweep::_rescued_oops);
|
||||
- MarkSweep::_rescued_oops = NULL;
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ DcevmSharedGC::copy_rescued_objects_back(MarkSweep::_rescued_oops, true);
|
||||
+ DcevmSharedGC::clear_rescued_objects_resource(MarkSweep::_rescued_oops);
|
||||
+ MarkSweep::_rescued_oops = NULL;
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/hotspot/share/interpreter/linkResolver.cpp b/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
index 9dc184d02f5..bff1c3627b0 100644
|
||||
--- a/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
+++ b/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
@@ -295,8 +295,13 @@ void LinkResolver::check_klass_accessability(Klass* ref_klass, Klass* sel_klass,
|
||||
return; // no relevant check to do
|
||||
}
|
||||
}
|
||||
- Reflection::VerifyClassAccessResults vca_result =
|
||||
- Reflection::verify_class_access(ref_klass->newest_version(), InstanceKlass::cast(base_klass->newest_version()), true);
|
||||
+ Klass* refKlassNewest = ref_klass;
|
||||
+ Klass* baseKlassNewest = base_klass;
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ refKlassNewest = ref_klass->newest_version();
|
||||
+ baseKlassNewest = base_klass->newest_version();
|
||||
+ }
|
||||
+ Reflection::VerifyClassAccessResults vca_result = Reflection::verify_class_access(refKlassNewest, InstanceKlass::cast(baseKlassNewest), true);
|
||||
if (vca_result != Reflection::ACCESS_OK) {
|
||||
ResourceMark rm(THREAD);
|
||||
char* msg = Reflection::verify_class_access_msg(ref_klass,
|
||||
@@ -572,7 +577,8 @@ void LinkResolver::check_method_accessability(Klass* ref_klass,
|
||||
// We'll check for the method name first, as that's most likely
|
||||
// to be false (so we'll short-circuit out of these tests).
|
||||
if (sel_method->name() == vmSymbols::clone_name() &&
|
||||
- sel_klass->newest_version() == SystemDictionary::Object_klass()->newest_version() &&
|
||||
+ ( !AllowEnhancedClassRedefinition && sel_klass == SystemDictionary::Object_klass() ||
|
||||
+ AllowEnhancedClassRedefinition && sel_klass->newest_version() == SystemDictionary::Object_klass()->newest_version()) &&
|
||||
resolved_klass->is_array_klass()) {
|
||||
// We need to change "protected" to "public".
|
||||
assert(flags.is_protected(), "clone not protected?");
|
||||
@@ -997,7 +1003,7 @@ void LinkResolver::resolve_field(fieldDescriptor& fd,
|
||||
ResourceMark rm(THREAD);
|
||||
stringStream ss;
|
||||
|
||||
- if (sel_klass != current_klass && sel_klass != current_klass->active_version()) {
|
||||
+ if (sel_klass != current_klass && (!AllowEnhancedClassRedefinition || sel_klass != current_klass->active_version())) {
|
||||
ss.print("Update to %s final field %s.%s attempted from a different class (%s) than the field's declaring class",
|
||||
is_static ? "static" : "non-static", resolved_klass->external_name(), fd.name()->as_C_string(),
|
||||
current_klass->external_name());
|
||||
diff --git a/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp b/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp
|
||||
index 61a406377ee..da9df7a21a2 100644
|
||||
--- a/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp
|
||||
+++ b/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp
|
||||
@@ -1471,7 +1471,7 @@ static InstanceKlass* create_new_instance_klass(InstanceKlass* ik, ClassFileStre
|
||||
NULL, // host klass
|
||||
NULL, // cp_patches
|
||||
ClassFileParser::INTERNAL, // internal visibility
|
||||
- false,
|
||||
+ false,
|
||||
THREAD);
|
||||
if (HAS_PENDING_EXCEPTION) {
|
||||
log_pending_exception(PENDING_EXCEPTION);
|
||||
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
index 76791cdd905..cb448b1b762 100644
|
||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
@@ -178,7 +178,9 @@ bool InstanceKlass::has_nest_member(InstanceKlass* k, TRAPS) const {
|
||||
}
|
||||
|
||||
Klass* k2 = _constants->klass_at(cp_index, CHECK_false);
|
||||
- k2 = k2->newest_version();
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ k2 = k2->newest_version();
|
||||
+ }
|
||||
if (k2 == k) {
|
||||
log_trace(class, nestmates)("- class is listed as a nest member");
|
||||
return true;
|
||||
@@ -837,7 +839,7 @@ bool InstanceKlass::link_class_impl(bool throw_verifyerror, TRAPS) {
|
||||
#endif
|
||||
set_init_state(linked);
|
||||
// (DCEVM) Must check for old version in order to prevent infinite loops.
|
||||
- if (JvmtiExport::should_post_class_prepare() && old_version() == NULL /* JVMTI deadlock otherwise */) {
|
||||
+ if (JvmtiExport::should_post_class_prepare() && (!AllowEnhancedClassRedefinition || old_version() == NULL) /* JVMTI deadlock otherwise */) {
|
||||
Thread *thread = THREAD;
|
||||
assert(thread->is_Java_thread(), "thread->is_Java_thread()");
|
||||
JvmtiExport::post_class_prepare((JavaThread *) thread, this);
|
||||
@@ -919,7 +921,7 @@ void InstanceKlass::initialize_impl(TRAPS) {
|
||||
// that aren't expected to throw. This would wreak havoc. See 6320309.
|
||||
// (DCEVM) Wait also for the old class version to be fully initialized.
|
||||
while((is_being_initialized() && !is_reentrant_initialization(self))
|
||||
- || (old_version() != NULL && InstanceKlass::cast(old_version())->is_being_initialized())) {
|
||||
+ || (AllowEnhancedClassRedefinition && old_version() != NULL && InstanceKlass::cast(old_version())->is_being_initialized())) {
|
||||
wait = true;
|
||||
ol.waitUninterruptibly(CHECK);
|
||||
}
|
||||
@@ -3629,7 +3631,7 @@ void InstanceKlass::verify_on(outputStream* st) {
|
||||
|
||||
guarantee(sib->is_klass(), "should be klass");
|
||||
// TODO: (DCEVM) explain
|
||||
- guarantee(sib->super() == super || super->newest_version() == SystemDictionary::Object_klass(), "siblings should have same superklass");
|
||||
+ guarantee(sib->super() == super || AllowEnhancedClassRedefinition && super->newest_version() == SystemDictionary::Object_klass(), "siblings should have same superklass");
|
||||
}
|
||||
|
||||
// Verify implementor fields requires the Compile_lock, but this is sometimes
|
||||
diff --git a/src/hotspot/share/oops/method.cpp b/src/hotspot/share/oops/method.cpp
|
||||
index 17c08a9dc18..2596ed7add2 100644
|
||||
--- a/src/hotspot/share/oops/method.cpp
|
||||
+++ b/src/hotspot/share/oops/method.cpp
|
||||
@@ -2145,7 +2145,7 @@ void Method::ensure_jmethod_ids(ClassLoaderData* loader_data, int capacity) {
|
||||
// Add a method id to the jmethod_ids
|
||||
jmethodID Method::make_jmethod_id(ClassLoaderData* loader_data, Method* m) {
|
||||
// FIXME: (DCEVM) ???
|
||||
- if (m != m->newest_version()) {
|
||||
+ if (AllowEnhancedClassRedefinition && m != m->newest_version()) {
|
||||
m = m->newest_version();
|
||||
}
|
||||
ClassLoaderData* cld = loader_data;
|
||||
diff --git a/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp b/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
|
||||
index 60604c645ff..325bffb7ad0 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
// the new version (SystemDictionary stores only new versions). But the LoadedClassesClosure's functionality was
|
||||
// changed in java8 where jvmtiLoadedClasses collects all classes from all classloaders, therefore we
|
||||
// must use new versions only.
|
||||
- if (k->new_version()==NULL) {
|
||||
+ if (AllowEnhancedClassRedefinition && k->new_version()==NULL) {
|
||||
_classStack.push((jclass) _env->jni_reference(Handle(_cur_thread, k->java_mirror())));
|
||||
}
|
||||
}
|
||||
diff --git a/src/hotspot/share/runtime/reflection.cpp b/src/hotspot/share/runtime/reflection.cpp
|
||||
index ac233f3b373..ae0cb65969a 100644
|
||||
--- a/src/hotspot/share/runtime/reflection.cpp
|
||||
+++ b/src/hotspot/share/runtime/reflection.cpp
|
||||
@@ -660,7 +660,7 @@ bool Reflection::verify_member_access(const Klass* current_class,
|
||||
TRAPS) {
|
||||
|
||||
// (DCEVM) Decide accessibility based on active version
|
||||
- if (current_class != NULL) {
|
||||
+ if (AllowEnhancedClassRedefinition && current_class != NULL) {
|
||||
current_class = current_class->active_version();
|
||||
}
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
From 19981a51c2ea2322f958216fa2c6e83604138d7e Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 23 Oct 2020 11:07:40 +0200
|
||||
Subject: [PATCH 17/33] Fix metadataOnStack bug
|
||||
|
||||
---
|
||||
.../share/classfile/classLoaderData.cpp | 7 +-
|
||||
.../share/classfile/metadataOnStackMark.cpp | 67 ++++++++++---------
|
||||
.../share/classfile/metadataOnStackMark.hpp | 3 +-
|
||||
.../share/prims/jvmtiRedefineClasses.cpp | 2 +-
|
||||
4 files changed, 41 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
index a901b4309b9..7b88f6b44d9 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
@@ -1401,13 +1401,10 @@ bool ClassLoaderDataGraph::do_unloading(bool clean_previous_versions) {
|
||||
// Klassesoto delete.
|
||||
|
||||
// FIXME: dcevm - block asserts in MetadataOnStackMark
|
||||
- bool walk_all_metadata = false;
|
||||
- if (!AllowEnhancedClassRedefinition) {
|
||||
- walk_all_metadata = clean_previous_versions &&
|
||||
+ bool walk_all_metadata = clean_previous_versions &&
|
||||
JvmtiExport::has_redefined_a_class() &&
|
||||
InstanceKlass::has_previous_versions_and_reset();
|
||||
- MetadataOnStackMark md_on_stack(walk_all_metadata);
|
||||
- }
|
||||
+ MetadataOnStackMark md_on_stack(walk_all_metadata, AllowEnhancedClassRedefinition);
|
||||
|
||||
// Save previous _unloading pointer for CMS which may add to unloading list before
|
||||
// purging and we don't want to rewalk the previously unloaded class loader data.
|
||||
diff --git a/src/hotspot/share/classfile/metadataOnStackMark.cpp b/src/hotspot/share/classfile/metadataOnStackMark.cpp
|
||||
index 3a62c789702..9d7bdbde74b 100644
|
||||
--- a/src/hotspot/share/classfile/metadataOnStackMark.cpp
|
||||
+++ b/src/hotspot/share/classfile/metadataOnStackMark.cpp
|
||||
@@ -46,23 +46,25 @@ NOT_PRODUCT(bool MetadataOnStackMark::_is_active = false;)
|
||||
// it. Class unloading only deletes in-error class files, methods created by
|
||||
// the relocator and dummy constant pools. None of these appear anywhere except
|
||||
// in metadata Handles.
|
||||
-MetadataOnStackMark::MetadataOnStackMark(bool redefinition_walk) {
|
||||
+MetadataOnStackMark::MetadataOnStackMark(bool redefinition_walk, bool ignore) : _ignore(ignore) {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "sanity check");
|
||||
assert(_used_buffers == NULL, "sanity check");
|
||||
assert(!_is_active, "MetadataOnStackMarks do not nest");
|
||||
NOT_PRODUCT(_is_active = true;)
|
||||
|
||||
- Threads::metadata_handles_do(Metadata::mark_on_stack);
|
||||
+ if (!ignore) {
|
||||
+ Threads::metadata_handles_do(Metadata::mark_on_stack);
|
||||
|
||||
- if (redefinition_walk) {
|
||||
- Threads::metadata_do(Metadata::mark_on_stack);
|
||||
- CodeCache::metadata_do(Metadata::mark_on_stack);
|
||||
- CompileBroker::mark_on_stack();
|
||||
- JvmtiCurrentBreakpoints::metadata_do(Metadata::mark_on_stack);
|
||||
- ThreadService::metadata_do(Metadata::mark_on_stack);
|
||||
+ if (redefinition_walk) {
|
||||
+ Threads::metadata_do(Metadata::mark_on_stack);
|
||||
+ CodeCache::metadata_do(Metadata::mark_on_stack);
|
||||
+ CompileBroker::mark_on_stack();
|
||||
+ JvmtiCurrentBreakpoints::metadata_do(Metadata::mark_on_stack);
|
||||
+ ThreadService::metadata_do(Metadata::mark_on_stack);
|
||||
#if INCLUDE_JVMCI
|
||||
- JVMCIRuntime::metadata_do(Metadata::mark_on_stack);
|
||||
+ JVMCIRuntime::metadata_do(Metadata::mark_on_stack);
|
||||
#endif
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,32 +73,35 @@ MetadataOnStackMark::~MetadataOnStackMark() {
|
||||
// Unmark everything that was marked. Can't do the same walk because
|
||||
// redefine classes messes up the code cache so the set of methods
|
||||
// might not be the same.
|
||||
- retire_current_buffer();
|
||||
-
|
||||
- MetadataOnStackBuffer* buffer = _used_buffers;
|
||||
- while (buffer != NULL) {
|
||||
- // Clear on stack state for all metadata.
|
||||
- size_t size = buffer->size();
|
||||
- for (size_t i = 0; i < size; i++) {
|
||||
- Metadata* md = buffer->at(i);
|
||||
- md->set_on_stack(false);
|
||||
+ if (!_ignore)
|
||||
+ {
|
||||
+ retire_current_buffer();
|
||||
+
|
||||
+ MetadataOnStackBuffer* buffer = _used_buffers;
|
||||
+ while (buffer != NULL) {
|
||||
+ // Clear on stack state for all metadata.
|
||||
+ size_t size = buffer->size();
|
||||
+ for (size_t i = 0; i < size; i++) {
|
||||
+ Metadata* md = buffer->at(i);
|
||||
+ md->set_on_stack(false);
|
||||
+ }
|
||||
+
|
||||
+ MetadataOnStackBuffer* next = buffer->next_used();
|
||||
+
|
||||
+ // Move the buffer to the free list.
|
||||
+ buffer->clear();
|
||||
+ buffer->set_next_used(NULL);
|
||||
+ buffer->set_next_free(_free_buffers);
|
||||
+ _free_buffers = buffer;
|
||||
+
|
||||
+ // Step to next used buffer.
|
||||
+ buffer = next;
|
||||
}
|
||||
|
||||
- MetadataOnStackBuffer* next = buffer->next_used();
|
||||
-
|
||||
- // Move the buffer to the free list.
|
||||
- buffer->clear();
|
||||
- buffer->set_next_used(NULL);
|
||||
- buffer->set_next_free(_free_buffers);
|
||||
- _free_buffers = buffer;
|
||||
+ _used_buffers = NULL;
|
||||
|
||||
- // Step to next used buffer.
|
||||
- buffer = next;
|
||||
+ NOT_PRODUCT(_is_active = false;)
|
||||
}
|
||||
-
|
||||
- _used_buffers = NULL;
|
||||
-
|
||||
- NOT_PRODUCT(_is_active = false;)
|
||||
}
|
||||
|
||||
void MetadataOnStackMark::retire_buffer(MetadataOnStackBuffer* buffer) {
|
||||
diff --git a/src/hotspot/share/classfile/metadataOnStackMark.hpp b/src/hotspot/share/classfile/metadataOnStackMark.hpp
|
||||
index 8da4ac6f92b..6d327ab98f2 100644
|
||||
--- a/src/hotspot/share/classfile/metadataOnStackMark.hpp
|
||||
+++ b/src/hotspot/share/classfile/metadataOnStackMark.hpp
|
||||
@@ -47,8 +47,9 @@ class MetadataOnStackMark : public StackObj {
|
||||
static MetadataOnStackBuffer* allocate_buffer();
|
||||
static void retire_buffer(MetadataOnStackBuffer* buffer);
|
||||
|
||||
+ bool _ignore;
|
||||
public:
|
||||
- MetadataOnStackMark(bool redefinition_walk);
|
||||
+ MetadataOnStackMark(bool redefinition_walk, bool ignore);
|
||||
~MetadataOnStackMark();
|
||||
|
||||
static void record(Metadata* m);
|
||||
diff --git a/src/hotspot/share/prims/jvmtiRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiRedefineClasses.cpp
|
||||
index fb81189d9c2..18bc7f4eea4 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiRedefineClasses.cpp
|
||||
@@ -199,7 +199,7 @@ void VM_RedefineClasses::doit() {
|
||||
|
||||
// Mark methods seen on stack and everywhere else so old methods are not
|
||||
// cleaned up if they're on the stack.
|
||||
- MetadataOnStackMark md_on_stack(true);
|
||||
+ MetadataOnStackMark md_on_stack(true, false);
|
||||
HandleMark hm(thread); // make sure any handles created are deleted
|
||||
// before the stack walk again.
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
From 987645d54a6682f28a733731965d6b377e892974 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Tue, 19 Nov 2019 19:58:27 +0100
|
||||
Subject: [PATCH 17/50] java.desktop/com.sun.beans=ALL-UNNAMED
|
||||
|
||||
---
|
||||
src/hotspot/share/runtime/arguments.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index c75bb5d8f49..ba6e78d6daa 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -4327,5 +4327,7 @@ void Arguments::setup_hotswap_agent() {
|
||||
create_numbered_property("jdk.module.addopens", "java.base/jdk.internal.loader=ALL-UNNAMED", addopens_count++);
|
||||
// java.beans.Introspector access
|
||||
create_numbered_property("jdk.module.addopens", "java.desktop/java.beans=ALL-UNNAMED", addopens_count++);
|
||||
+ // java.beans.Introspector access
|
||||
+ create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans=ALL-UNNAMED", addopens_count++);
|
||||
|
||||
}
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From 163cf26017433389041f824c7d8342eb54f4cef8 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 1 Nov 2020 21:19:00 +0100
|
||||
Subject: [PATCH 18/33] Ignore MetadataOnStackMark if redefining_gc_run
|
||||
|
||||
---
|
||||
src/hotspot/share/classfile/classLoaderData.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
index 7b88f6b44d9..2f6329f3e4d 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
@@ -1404,7 +1404,7 @@ bool ClassLoaderDataGraph::do_unloading(bool clean_previous_versions) {
|
||||
bool walk_all_metadata = clean_previous_versions &&
|
||||
JvmtiExport::has_redefined_a_class() &&
|
||||
InstanceKlass::has_previous_versions_and_reset();
|
||||
- MetadataOnStackMark md_on_stack(walk_all_metadata, AllowEnhancedClassRedefinition);
|
||||
+ MetadataOnStackMark md_on_stack(walk_all_metadata, Universe::is_redefining_gc_run());
|
||||
|
||||
// Save previous _unloading pointer for CMS which may add to unloading list before
|
||||
// purging and we don't want to rewalk the previously unloaded class loader data.
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
From 60569257636a2d0b31b04ab2638d81f840d75e58 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Tue, 19 Nov 2019 21:07:59 +0100
|
||||
Subject: [PATCH 18/50] increment_class_counter() using orig dcevm code
|
||||
|
||||
Probably it is cause of SISEGV on:
|
||||
_
|
||||
VM_EnhancedRedefineClasses::redefine_single_class->java_mirror()
|
||||
---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 39 ++++++-------------
|
||||
1 file changed, 12 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 4ca638548dc..efb9e806508 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -1146,9 +1146,9 @@ int VM_EnhancedRedefineClasses::calculate_redefinition_flags(InstanceKlass* new_
|
||||
}
|
||||
|
||||
|
||||
-/**
|
||||
+/**
|
||||
Searches for the class bytecode of the given class and returns it as a byte array.
|
||||
-
|
||||
+
|
||||
@param the_class definition of a class, either existing class or new_class
|
||||
@param class_bytes - if the class is redefined, it contains new class definition, otherwise just original class bytecode.
|
||||
@param class_byte_count - size of class_bytes
|
||||
@@ -1460,7 +1460,7 @@ void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
|
||||
//
|
||||
// ik->itable()->adjust_method_entries(the_class, &trace_name_printed);
|
||||
// }
|
||||
-
|
||||
+
|
||||
constantPoolHandle other_cp = constantPoolHandle(ik->constants());
|
||||
|
||||
// Update host klass of anonymous classes (for example, produced by lambdas) to newest version.
|
||||
@@ -1764,7 +1764,7 @@ void VM_EnhancedRedefineClasses::flush_dependent_code(InstanceKlass* k_h, TRAPS)
|
||||
/**
|
||||
Compare _old_methods and _new_methods arrays and store the result into
|
||||
_matching_old_methods, _matching_new_methods, _added_methods, _deleted_methods
|
||||
-
|
||||
+
|
||||
Setup _old_methods and _new_methods before the call - it should be called for one class only!
|
||||
*/
|
||||
void VM_EnhancedRedefineClasses::compute_added_deleted_matching_methods() {
|
||||
@@ -1898,13 +1898,13 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
ResourceMark rm(THREAD);
|
||||
// increment the classRedefinedCount field in the_class and in any
|
||||
// direct and indirect subclasses of the_class
|
||||
- increment_class_counter(the_class, THREAD);
|
||||
+ increment_class_counter(new_class, THREAD);
|
||||
log_info(redefine, class, load)
|
||||
("redefined name=%s, count=%d (avail_mem=" UINT64_FORMAT "K)",
|
||||
- the_class->external_name(), java_lang_Class::classRedefinedCount(the_class->java_mirror()), os::available_memory() >> 10);
|
||||
+ new_class->external_name(), java_lang_Class::classRedefinedCount(new_class->java_mirror()), os::available_memory() >> 10);
|
||||
Events::log_redefinition(THREAD, "redefined class name=%s, count=%d",
|
||||
- the_class->external_name(),
|
||||
- java_lang_Class::classRedefinedCount(the_class->java_mirror()));
|
||||
+ new_class->external_name(),
|
||||
+ java_lang_Class::classRedefinedCount(new_class->java_mirror()));
|
||||
|
||||
}
|
||||
_timer_rsc_phase2.stop();
|
||||
@@ -1914,25 +1914,10 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
// Increment the classRedefinedCount field in the specific InstanceKlass
|
||||
// and in all direct and indirect subclasses.
|
||||
void VM_EnhancedRedefineClasses::increment_class_counter(InstanceKlass *ik, TRAPS) {
|
||||
- oop class_mirror = ik->java_mirror();
|
||||
+ oop class_mirror = ik->old_version()->java_mirror();
|
||||
Klass* class_oop = java_lang_Class::as_Klass(class_mirror);
|
||||
int new_count = java_lang_Class::classRedefinedCount(class_mirror) + 1;
|
||||
- java_lang_Class::set_classRedefinedCount(ik->new_version()->java_mirror(), new_count);
|
||||
-
|
||||
- if (class_oop != _the_class_oop) {
|
||||
- // _the_class_oop count is printed at end of redefine_single_class()
|
||||
- log_debug(redefine, class, subclass)("updated count in subclass=%s to %d", ik->external_name(), new_count);
|
||||
- }
|
||||
-
|
||||
- for (Klass *subk = ik->subklass(); subk != NULL;
|
||||
- subk = subk->next_sibling()) {
|
||||
- if (subk->is_instance_klass()) {
|
||||
- // Only update instanceKlasses
|
||||
- InstanceKlass *subik = InstanceKlass::cast(subk);
|
||||
- // recursively do subclasses of the current subclass
|
||||
- increment_class_counter(subik, THREAD);
|
||||
- }
|
||||
- }
|
||||
+ java_lang_Class::set_classRedefinedCount(ik->java_mirror(), new_count);
|
||||
}
|
||||
|
||||
void VM_EnhancedRedefineClasses::check_class(InstanceKlass* ik, TRAPS) {
|
||||
@@ -2063,7 +2048,7 @@ class AffectedKlassClosure : public KlassClosure {
|
||||
|
||||
/**
|
||||
Find all affected classes by current redefinition (either because of redefine, class hierarchy or interface change).
|
||||
- Affected classes are stored in _affected_klasses and parent classes always precedes child class.
|
||||
+ Affected classes are stored in _affected_klasses and parent classes always precedes child class.
|
||||
*/
|
||||
jvmtiError VM_EnhancedRedefineClasses::find_sorted_affected_classes(TRAPS) {
|
||||
for (int i = 0; i < _class_count; i++) {
|
||||
@@ -2112,7 +2097,7 @@ static bool match_second(void* value, KlassPair elem) {
|
||||
First newly introduced classes (_class_defs) are scanned and then affected classed (_affected_klasses).
|
||||
Affected flag is cleared (clear_redefinition_flag(Klass::MarkedAsAffected))
|
||||
For each dependency create a KlassPair instance. Finnaly, affected classes (_affected_klasses) are sorted according to pairs.
|
||||
-
|
||||
+
|
||||
TODO - the class file is potentionally parsed multiple times - introduce a cache?
|
||||
*/
|
||||
jvmtiError VM_EnhancedRedefineClasses::do_topological_class_sorting(TRAPS) {
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
From 41d2963b54490601e22cf5309ed73f78566d35ae Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Thu, 21 Nov 2019 19:30:07 +0100
|
||||
Subject: [PATCH 19/50] Allow 11715ha class initializer calls
|
||||
|
||||
---
|
||||
src/hotspot/share/classfile/vmSymbols.hpp | 1 +
|
||||
src/hotspot/share/interpreter/linkResolver.cpp | 2 +-
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/vmSymbols.hpp b/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
index e2bac31b27f..6eeda3b8f68 100644
|
||||
--- a/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
+++ b/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
@@ -340,6 +340,7 @@
|
||||
/* common method and field names */ \
|
||||
template(object_initializer_name, "<init>") \
|
||||
template(class_initializer_name, "<clinit>") \
|
||||
+ template(ha_class_initializer_name, "$$ha$clinit") \
|
||||
template(println_name, "println") \
|
||||
template(printStackTrace_name, "printStackTrace") \
|
||||
template(main_name, "main") \
|
||||
diff --git a/src/hotspot/share/interpreter/linkResolver.cpp b/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
index b9ccdee8cca..cb76d2ef50c 100644
|
||||
--- a/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
+++ b/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
@@ -1009,7 +1009,7 @@ void LinkResolver::resolve_field(fieldDescriptor& fd,
|
||||
assert(!m.is_null(), "information about the current method must be available for 'put' bytecodes");
|
||||
bool is_initialized_static_final_update = (byte == Bytecodes::_putstatic &&
|
||||
fd.is_static() &&
|
||||
- !m()->is_static_initializer());
|
||||
+ !(m()->is_static_initializer() || m()->name() == vmSymbols::ha_class_initializer_name()));
|
||||
bool is_initialized_instance_final_update = ((byte == Bytecodes::_putfield || byte == Bytecodes::_nofast_putfield) &&
|
||||
!fd.is_static() &&
|
||||
!m->is_object_initializer());
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From 1876c6a039a2b866dd9d2c3dbbcc52e8f7af4d2a Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Wed, 11 Nov 2020 18:45:15 +0100
|
||||
Subject: [PATCH 19/33] Fix LoadedClassesClosure - fixes problems with remote
|
||||
debugging
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp b/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
|
||||
index 325bffb7ad0..30752e37f1c 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
// the new version (SystemDictionary stores only new versions). But the LoadedClassesClosure's functionality was
|
||||
// changed in java8 where jvmtiLoadedClasses collects all classes from all classloaders, therefore we
|
||||
// must use new versions only.
|
||||
- if (AllowEnhancedClassRedefinition && k->new_version()==NULL) {
|
||||
+ if (!AllowEnhancedClassRedefinition || k->new_version()==NULL) {
|
||||
_classStack.push((jclass) _env->jni_reference(Handle(_cur_thread, k->java_mirror())));
|
||||
}
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From ad9db6fe3e625d0b366898c3bdb2589b678f6764 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
||||
Date: Fri, 5 Feb 2021 23:30:49 +0100
|
||||
Subject: [PATCH 20/33] Disable AllowEnhancedClassRedefinition in flight
|
||||
recorder
|
||||
|
||||
---
|
||||
src/hotspot/share/runtime/arguments.cpp | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index 0db55d00bd3..65839b842e2 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -3967,6 +3967,13 @@ jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) {
|
||||
// Set object alignment values.
|
||||
set_object_alignment();
|
||||
|
||||
+ if (FlightRecorder) {
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ warning("EnhancedClassRedefinition was disabled, it is not allowed in FlightRecorder.");
|
||||
+ AllowEnhancedClassRedefinition = false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
setup_hotswap_agent();
|
||||
|
||||
#if !INCLUDE_CDS
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
From 09799f079ef1148248ca60c917205003d2a565b3 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Tue, 26 Nov 2019 22:13:07 +0100
|
||||
Subject: [PATCH 20/50] Disable HA in keytool
|
||||
|
||||
---
|
||||
make/launcher/Launcher-java.base.gmk | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/make/launcher/Launcher-java.base.gmk b/make/launcher/Launcher-java.base.gmk
|
||||
index 5ee4530004b..88c1a14b2aa 100644
|
||||
--- a/make/launcher/Launcher-java.base.gmk
|
||||
+++ b/make/launcher/Launcher-java.base.gmk
|
||||
@@ -63,6 +63,7 @@ endif
|
||||
|
||||
$(eval $(call SetupBuildLauncher, keytool, \
|
||||
MAIN_CLASS := sun.security.tools.keytool.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
################################################################################
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From 4bcccb549465675d13a1f5bb399ca99654465ca5 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
||||
Date: Fri, 12 Feb 2021 12:33:11 +0100
|
||||
Subject: [PATCH 21/33] JBR-3106 Check InstanceKlass::has_nestmate_access_to
|
||||
with active classes
|
||||
|
||||
Dcevm can leave old host in nested class if nested class is not
|
||||
redefined together with host class
|
||||
---
|
||||
src/hotspot/share/oops/instanceKlass.cpp | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
index cb448b1b762..234c3e86037 100644
|
||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
@@ -327,11 +327,21 @@ bool InstanceKlass::has_nestmate_access_to(InstanceKlass* k, TRAPS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
+ // (DCEVM) cur_host can be old, decide accessibility based on active version
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ cur_host = InstanceKlass::cast(cur_host->active_version());
|
||||
+ }
|
||||
+
|
||||
Klass* k_nest_host = k->nest_host(icce, CHECK_false);
|
||||
if (k_nest_host == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
+ // (DCEVM) k_nest_host can be old, decide accessibility based on active version
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ k_nest_host = InstanceKlass::cast(k_nest_host->active_version());
|
||||
+ }
|
||||
+
|
||||
bool access = (cur_host == k_nest_host);
|
||||
|
||||
if (log_is_enabled(Trace, class, nestmates)) {
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
From e1d8f42f428d7d18f09f1a7098f56fdce808c3fe Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Thu, 28 Nov 2019 18:53:11 +0100
|
||||
Subject: [PATCH 21/50] Open jdk module to access ClassInfo.CACHE
|
||||
|
||||
---
|
||||
src/hotspot/share/runtime/arguments.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index ba6e78d6daa..0081f688120 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -4329,5 +4329,7 @@ void Arguments::setup_hotswap_agent() {
|
||||
create_numbered_property("jdk.module.addopens", "java.desktop/java.beans=ALL-UNNAMED", addopens_count++);
|
||||
// java.beans.Introspector access
|
||||
create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans=ALL-UNNAMED", addopens_count++);
|
||||
+ // com.sun.beans.introspect.ClassInfo access
|
||||
+ create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans.introspect=ALL-UNNAMED", addopens_count++);
|
||||
|
||||
}
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From b45056c713cd7f8496bc9fb9528ff8a20c112c76 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 7 Feb 2021 12:08:58 +0100
|
||||
Subject: [PATCH 22/33] JBR-3110 Fix assert in MetadataOnStackMark
|
||||
|
||||
Fixed fastdebug tests crashes in redefine gc run
|
||||
---
|
||||
src/hotspot/share/classfile/metadataOnStackMark.cpp | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/metadataOnStackMark.cpp b/src/hotspot/share/classfile/metadataOnStackMark.cpp
|
||||
index 9d7bdbde74b..66049f11629 100644
|
||||
--- a/src/hotspot/share/classfile/metadataOnStackMark.cpp
|
||||
+++ b/src/hotspot/share/classfile/metadataOnStackMark.cpp
|
||||
@@ -49,10 +49,11 @@ NOT_PRODUCT(bool MetadataOnStackMark::_is_active = false;)
|
||||
MetadataOnStackMark::MetadataOnStackMark(bool redefinition_walk, bool ignore) : _ignore(ignore) {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "sanity check");
|
||||
assert(_used_buffers == NULL, "sanity check");
|
||||
- assert(!_is_active, "MetadataOnStackMarks do not nest");
|
||||
- NOT_PRODUCT(_is_active = true;)
|
||||
|
||||
if (!ignore) {
|
||||
+ assert(!_is_active, "MetadataOnStackMarks do not nest");
|
||||
+ NOT_PRODUCT(_is_active = true;)
|
||||
+
|
||||
Threads::metadata_handles_do(Metadata::mark_on_stack);
|
||||
|
||||
if (redefinition_walk) {
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From 8b7323c57ee07c03a02ba951ce6d453ec4cc1a54 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 8 Dec 2019 17:55:01 +0100
|
||||
Subject: [PATCH 22/50] Open java.base/java.io module
|
||||
|
||||
---
|
||||
src/hotspot/share/runtime/arguments.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index 0081f688120..0cdd8c88315 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -4325,6 +4325,8 @@ void Arguments::setup_hotswap_agent() {
|
||||
create_numbered_property("jdk.module.addopens", "java.base/java.lang=ALL-UNNAMED", addopens_count++);
|
||||
// Class of field java.lang.reflect.Proxy/proxyCache
|
||||
create_numbered_property("jdk.module.addopens", "java.base/jdk.internal.loader=ALL-UNNAMED", addopens_count++);
|
||||
+ // Use to access java.io.Reader, java.io.InputStream, java.io.FileInputStream
|
||||
+ create_numbered_property("jdk.module.addopens", "java.base/java.io=ALL-UNNAMED", addopens_count++);
|
||||
// java.beans.Introspector access
|
||||
create_numbered_property("jdk.module.addopens", "java.desktop/java.beans=ALL-UNNAMED", addopens_count++);
|
||||
// java.beans.Introspector access
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
78
jb/project/tools/patches/dcevm/0023-Code-cleanup.patch
Normal file
78
jb/project/tools/patches/dcevm/0023-Code-cleanup.patch
Normal file
@@ -0,0 +1,78 @@
|
||||
From ae2b3fba2882b52ec7c5a9ac49d179616fc49e77 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 12 Feb 2021 11:27:39 +0100
|
||||
Subject: [PATCH 23/33] Code cleanup
|
||||
|
||||
- Rename confusing method name old_if_redefined to old_if_redefining
|
||||
- Remove unused is_redefining_gc_run
|
||||
---
|
||||
src/hotspot/share/classfile/dictionary.cpp | 6 +++---
|
||||
src/hotspot/share/classfile/dictionary.hpp | 2 +-
|
||||
src/hotspot/share/memory/universe.hpp | 5 -----
|
||||
3 files changed, 4 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/dictionary.cpp b/src/hotspot/share/classfile/dictionary.cpp
|
||||
index 86dc1f26933..d347f572350 100644
|
||||
--- a/src/hotspot/share/classfile/dictionary.cpp
|
||||
+++ b/src/hotspot/share/classfile/dictionary.cpp
|
||||
@@ -381,7 +381,7 @@ InstanceKlass* Dictionary::find(unsigned int hash, Symbol* name,
|
||||
int index = hash_to_index(hash);
|
||||
DictionaryEntry* entry = get_entry(index, hash, name);
|
||||
if (entry != NULL && entry->is_valid_protection_domain(protection_domain)) {
|
||||
- return old_if_redefined(entry->instance_klass());
|
||||
+ return old_if_redefining(entry->instance_klass());
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
@@ -394,7 +394,7 @@ InstanceKlass* Dictionary::find_class(int index, unsigned int hash,
|
||||
assert (index == index_for(name), "incorrect index?");
|
||||
|
||||
DictionaryEntry* entry = get_entry(index, hash, name);
|
||||
- return old_if_redefined((entry != NULL) ? entry->instance_klass() : NULL);
|
||||
+ return old_if_redefining((entry != NULL) ? entry->instance_klass() : NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -406,7 +406,7 @@ InstanceKlass* Dictionary::find_shared_class(int index, unsigned int hash,
|
||||
assert (index == index_for(name), "incorrect index?");
|
||||
|
||||
DictionaryEntry* entry = get_entry(index, hash, name);
|
||||
- return old_if_redefined((entry != NULL) ? entry->instance_klass() : NULL);
|
||||
+ return old_if_redefining((entry != NULL) ? entry->instance_klass() : NULL);
|
||||
}
|
||||
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/dictionary.hpp b/src/hotspot/share/classfile/dictionary.hpp
|
||||
index 5eaa741d500..f6e08e7bfd5 100644
|
||||
--- a/src/hotspot/share/classfile/dictionary.hpp
|
||||
+++ b/src/hotspot/share/classfile/dictionary.hpp
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
void rollback_redefinition();
|
||||
|
||||
// (DCEVM) return old class if redefining in AllowEnhancedClassRedefinition, otherwise return "k"
|
||||
- static InstanceKlass* old_if_redefined(InstanceKlass* k) {
|
||||
+ static InstanceKlass* old_if_redefining(InstanceKlass* k) {
|
||||
return (k != NULL && k->is_redefining()) ? ((InstanceKlass* )k->old_version()) : k;
|
||||
}
|
||||
};
|
||||
diff --git a/src/hotspot/share/memory/universe.hpp b/src/hotspot/share/memory/universe.hpp
|
||||
index b32db16b9cf..742dada0e8f 100644
|
||||
--- a/src/hotspot/share/memory/universe.hpp
|
||||
+++ b/src/hotspot/share/memory/universe.hpp
|
||||
@@ -52,13 +52,8 @@ class LatestMethodCache : public CHeapObj<mtClass> {
|
||||
Klass* _klass;
|
||||
int _method_idnum;
|
||||
|
||||
- static bool _is_redefining_gc_run;
|
||||
-
|
||||
public:
|
||||
|
||||
- static bool is_redefining_gc_run() { return _is_redefining_gc_run; }
|
||||
- static void set_redefining_gc_run(bool b) { _is_redefining_gc_run = b; }
|
||||
-
|
||||
LatestMethodCache() { _klass = NULL; _method_idnum = -1; }
|
||||
~LatestMethodCache() { _klass = NULL; _method_idnum = -1; }
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
From 14c82a29cbf8254f8da626753ea34086d38e71b4 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@mailprofiler.com>
|
||||
Date: Fri, 6 Mar 2020 09:28:24 +0100
|
||||
Subject: [PATCH 23/50] Fix fieldDescriptor.inline.hpp
|
||||
|
||||
---
|
||||
.../share/prims/jvmtiEnhancedRedefineClasses.cpp | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index efb9e806508..a404fd3f016 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -49,6 +49,7 @@
|
||||
#include "runtime/deoptimization.hpp"
|
||||
#include "runtime/jniHandles.inline.hpp"
|
||||
#include "runtime/relocator.hpp"
|
||||
+#include "runtime/fieldDescriptor.inline.hpp"
|
||||
#include "utilities/bitMap.inline.hpp"
|
||||
#include "prims/jvmtiThreadState.inline.hpp"
|
||||
#include "utilities/events.hpp"
|
||||
@@ -490,6 +491,11 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
flush_dependent_code(NULL, thread);
|
||||
// }
|
||||
|
||||
+ // Adjust constantpool caches for all classes that reference methods of the evolved class.
|
||||
+ ClearCpoolCacheAndUnpatch clear_cpool_cache(thread);
|
||||
+ ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
|
||||
+
|
||||
+
|
||||
// JSR-292 support
|
||||
if (_any_class_has_resolved_methods) {
|
||||
bool trace_name_printed = false;
|
||||
@@ -1890,9 +1896,6 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
}
|
||||
*/
|
||||
|
||||
- // Adjust constantpool caches for all classes that reference methods of the evolved class.
|
||||
- ClearCpoolCacheAndUnpatch clear_cpool_cache(THREAD);
|
||||
- ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
|
||||
|
||||
{
|
||||
ResourceMark rm(THREAD);
|
||||
@@ -1905,7 +1908,6 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
Events::log_redefinition(THREAD, "redefined class name=%s, count=%d",
|
||||
new_class->external_name(),
|
||||
java_lang_Class::classRedefinedCount(new_class->java_mirror()));
|
||||
-
|
||||
}
|
||||
_timer_rsc_phase2.stop();
|
||||
} // end redefine_single_class()
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
From 5a56f2278c0a79f4a26f369a55f4c1c4dab2621e Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@mailprofiler.com>
|
||||
Date: Fri, 6 Mar 2020 15:46:51 +0100
|
||||
Subject: [PATCH 24/50] Fix clear_cpool_cache
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 8 +++-----
|
||||
1 file changed, 3 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index a404fd3f016..1f5a67f8866 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -491,11 +491,6 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
flush_dependent_code(NULL, thread);
|
||||
// }
|
||||
|
||||
- // Adjust constantpool caches for all classes that reference methods of the evolved class.
|
||||
- ClearCpoolCacheAndUnpatch clear_cpool_cache(thread);
|
||||
- ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
|
||||
-
|
||||
-
|
||||
// JSR-292 support
|
||||
if (_any_class_has_resolved_methods) {
|
||||
bool trace_name_printed = false;
|
||||
@@ -1896,6 +1891,9 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
}
|
||||
*/
|
||||
|
||||
+ // Adjust constantpool caches for all classes that reference methods of the evolved class.
|
||||
+ ClearCpoolCacheAndUnpatch clear_cpool_cache(THREAD);
|
||||
+ ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
|
||||
|
||||
{
|
||||
ResourceMark rm(THREAD);
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
From 3af6608b1808653ad706b447e6e96a039819d03f Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 13 Feb 2021 20:47:52 +0100
|
||||
Subject: [PATCH 24/33] JBR-3111 Update class in all dictionaries where it was
|
||||
already defined
|
||||
|
||||
This patch keeps compatibility with std redefinition, that does not
|
||||
create a new Klass, but modifies it, then it is modified in all
|
||||
dictionaries containing this class.
|
||||
---
|
||||
src/hotspot/share/classfile/classLoaderData.cpp | 9 +++++++++
|
||||
src/hotspot/share/classfile/classLoaderData.hpp | 3 +++
|
||||
src/hotspot/share/classfile/dictionary.cpp | 2 +-
|
||||
src/hotspot/share/classfile/dictionary.hpp | 2 +-
|
||||
src/hotspot/share/classfile/systemDictionary.cpp | 4 +++-
|
||||
5 files changed, 17 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
index 2f6329f3e4d..68df33b6c40 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
@@ -1277,6 +1277,15 @@ void ClassLoaderDataGraph::rollback_redefinition() {
|
||||
}
|
||||
}
|
||||
|
||||
+// (DCEVM) - iterate over all classes in all dictionaries
|
||||
+bool ClassLoaderDataGraph::dictionary_classes_do_update_klass(Symbol* name, InstanceKlass* k, InstanceKlass* old_klass) {
|
||||
+ bool ok = false;
|
||||
+ FOR_ALL_DICTIONARY(cld) {
|
||||
+ ok = cld->dictionary()->update_klass(name, k, old_klass) || ok;
|
||||
+ }
|
||||
+ return ok;
|
||||
+}
|
||||
+
|
||||
// Walks all entries in the dictionary including entries initiated by this class loader.
|
||||
void ClassLoaderDataGraph::dictionary_all_entries_do(void f(InstanceKlass*, ClassLoaderData*)) {
|
||||
Thread* thread = Thread::current();
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.hpp b/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
index c4f617ab800..92f57dac23e 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
@@ -130,6 +130,9 @@ class ClassLoaderDataGraph : public AllStatic {
|
||||
// Enhanced class redefinition
|
||||
static void rollback_redefinition();
|
||||
|
||||
+ // Enhanced class redefinition
|
||||
+ static bool dictionary_classes_do_update_klass(Symbol* name, InstanceKlass* k, InstanceKlass* old_klass);
|
||||
+
|
||||
// Iterate all classes and their class loaders, including initiating class loaders.
|
||||
static void dictionary_all_entries_do(void f(InstanceKlass*, ClassLoaderData*));
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/dictionary.cpp b/src/hotspot/share/classfile/dictionary.cpp
|
||||
index d347f572350..fd9ef491ba1 100644
|
||||
--- a/src/hotspot/share/classfile/dictionary.cpp
|
||||
+++ b/src/hotspot/share/classfile/dictionary.cpp
|
||||
@@ -345,7 +345,7 @@ DictionaryEntry* Dictionary::get_entry(int index, unsigned int hash,
|
||||
}
|
||||
|
||||
// (DCEVM) replace old_class by new class in dictionary
|
||||
-bool Dictionary::update_klass(unsigned int hash, Symbol* name, ClassLoaderData* loader_data, InstanceKlass* k, InstanceKlass* old_klass) {
|
||||
+bool Dictionary::update_klass(Symbol* name, InstanceKlass* k, InstanceKlass* old_klass) {
|
||||
// There are several entries for the same class in the dictionary: One extra entry for each parent classloader of the classloader of the class.
|
||||
bool found = false;
|
||||
for (int index = 0; index < table_size(); index++) {
|
||||
diff --git a/src/hotspot/share/classfile/dictionary.hpp b/src/hotspot/share/classfile/dictionary.hpp
|
||||
index f6e08e7bfd5..2932cc9c320 100644
|
||||
--- a/src/hotspot/share/classfile/dictionary.hpp
|
||||
+++ b/src/hotspot/share/classfile/dictionary.hpp
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
void free_entry(DictionaryEntry* entry);
|
||||
|
||||
// Enhanced class redefinition
|
||||
- bool update_klass(unsigned int hash, Symbol* name, ClassLoaderData* loader_data, InstanceKlass* k, InstanceKlass* old_klass);
|
||||
+ bool update_klass(Symbol* name, InstanceKlass* k, InstanceKlass* old_klass);
|
||||
|
||||
void rollback_redefinition();
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.cpp b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
index be4d2010c0c..d0365162b81 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
@@ -1608,7 +1608,9 @@ void SystemDictionary::define_instance_class(InstanceKlass* k, InstanceKlass* ol
|
||||
Dictionary* dictionary = loader_data->dictionary();
|
||||
unsigned int d_hash = dictionary->compute_hash(name_h);
|
||||
if (is_redefining) {
|
||||
- bool ok = dictionary->update_klass(d_hash, name_h, loader_data, k, old_klass);
|
||||
+ // Update all dictionaries containing old_class to new_class
|
||||
+ // outcome must be same as result of standard redefinition, that does not create a new Klass
|
||||
+ bool ok = ClassLoaderDataGraph::dictionary_classes_do_update_klass(name_h, k, old_klass);
|
||||
assert (ok, "must have found old class and updated!");
|
||||
}
|
||||
check_constraints(d_hash, k, class_loader_h, !is_redefining, CHECK);
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -0,0 +1,527 @@
|
||||
From 7cbf2af248f33daa6fb5b55a7fb9316b1d2680e0 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Thu, 18 Jun 2020 18:40:11 +0200
|
||||
Subject: [PATCH 25/33] JBR-3140 - support for modularized HotswapAgent
|
||||
|
||||
Add -XX:HotswapAgent=[disabled,fatjar.core]
|
||||
---
|
||||
make/launcher/Launcher-java.base.gmk | 1 -
|
||||
make/launcher/Launcher-java.rmi.gmk | 2 -
|
||||
make/launcher/Launcher-java.scripting.gmk | 3 +-
|
||||
make/launcher/Launcher-java.security.jgss.gmk | 3 --
|
||||
make/launcher/Launcher-jdk.aot.gmk | 2 -
|
||||
make/launcher/Launcher-jdk.compiler.gmk | 5 +-
|
||||
make/launcher/Launcher-jdk.hotspot.agent.gmk | 1 -
|
||||
make/launcher/Launcher-jdk.jartool.gmk | 2 -
|
||||
make/launcher/Launcher-jdk.javadoc.gmk | 3 +-
|
||||
make/launcher/Launcher-jdk.jcmd.gmk | 13 +----
|
||||
make/launcher/Launcher-jdk.jdeps.gmk | 3 --
|
||||
make/launcher/Launcher-jdk.jdi.gmk | 1 -
|
||||
make/launcher/Launcher-jdk.jlink.gmk | 5 +-
|
||||
make/launcher/Launcher-jdk.jshell.gmk | 1 -
|
||||
make/launcher/Launcher-jdk.jstatd.gmk | 1 -
|
||||
make/launcher/Launcher-jdk.pack.gmk | 1 -
|
||||
make/launcher/Launcher-jdk.rmic.gmk | 1 -
|
||||
.../Launcher-jdk.scripting.nashorn.shell.gmk | 3 +-
|
||||
src/hotspot/share/runtime/arguments.cpp | 48 +++++++++++--------
|
||||
.../runtime/flags/jvmFlagConstraintList.cpp | 23 +++++++++
|
||||
.../runtime/flags/jvmFlagConstraintList.hpp | 1 +
|
||||
.../flags/jvmFlagConstraintsRuntime.cpp | 10 ++++
|
||||
.../flags/jvmFlagConstraintsRuntime.hpp | 1 +
|
||||
src/hotspot/share/runtime/globals.hpp | 12 ++++-
|
||||
24 files changed, 81 insertions(+), 65 deletions(-)
|
||||
|
||||
diff --git a/make/launcher/Launcher-java.base.gmk b/make/launcher/Launcher-java.base.gmk
|
||||
index 38ba29530d8..f6d4aa28fe6 100644
|
||||
--- a/make/launcher/Launcher-java.base.gmk
|
||||
+++ b/make/launcher/Launcher-java.base.gmk
|
||||
@@ -52,7 +52,6 @@ endif
|
||||
|
||||
$(eval $(call SetupBuildLauncher, keytool, \
|
||||
MAIN_CLASS := sun.security.tools.keytool.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
################################################################################
|
||||
diff --git a/make/launcher/Launcher-java.rmi.gmk b/make/launcher/Launcher-java.rmi.gmk
|
||||
index 07046232275..a69a90bcc81 100644
|
||||
--- a/make/launcher/Launcher-java.rmi.gmk
|
||||
+++ b/make/launcher/Launcher-java.rmi.gmk
|
||||
@@ -27,10 +27,8 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, rmid, \
|
||||
MAIN_CLASS := sun.rmi.server.Activation, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, rmiregistry, \
|
||||
MAIN_CLASS := sun.rmi.registry.RegistryImpl, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-java.scripting.gmk b/make/launcher/Launcher-java.scripting.gmk
|
||||
index cf100e20789..057d2bf3aca 100644
|
||||
--- a/make/launcher/Launcher-java.scripting.gmk
|
||||
+++ b/make/launcher/Launcher-java.scripting.gmk
|
||||
@@ -27,6 +27,5 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jrunscript, \
|
||||
MAIN_CLASS := com.sun.tools.script.shell.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-java.security.jgss.gmk b/make/launcher/Launcher-java.security.jgss.gmk
|
||||
index 2b856bfccb4..7411e1a21c4 100644
|
||||
--- a/make/launcher/Launcher-java.security.jgss.gmk
|
||||
+++ b/make/launcher/Launcher-java.security.jgss.gmk
|
||||
@@ -28,16 +28,13 @@ include LauncherCommon.gmk
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$(eval $(call SetupBuildLauncher, kinit, \
|
||||
MAIN_CLASS := sun.security.krb5.internal.tools.Kinit, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, klist, \
|
||||
MAIN_CLASS := sun.security.krb5.internal.tools.Klist, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, ktab, \
|
||||
MAIN_CLASS := sun.security.krb5.internal.tools.Ktab, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
endif
|
||||
diff --git a/make/launcher/Launcher-jdk.aot.gmk b/make/launcher/Launcher-jdk.aot.gmk
|
||||
index 2c52c31a555..10717a5e1c5 100644
|
||||
--- a/make/launcher/Launcher-jdk.aot.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.aot.gmk
|
||||
@@ -31,7 +31,6 @@ include LauncherCommon.gmk
|
||||
$(eval $(call SetupBuildLauncher, jaotc, \
|
||||
MAIN_CLASS := jdk.tools.jaotc.Main, \
|
||||
EXTRA_JAVA_ARGS := -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI \
|
||||
- -XX:+DisableHotswapAgent \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.aarch64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.amd64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
@@ -41,7 +40,6 @@ $(eval $(call SetupBuildLauncher, jaotc, \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
, \
|
||||
JAVA_ARGS := --add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
- -XX:+DisableHotswapAgent \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
diff --git a/make/launcher/Launcher-jdk.compiler.gmk b/make/launcher/Launcher-jdk.compiler.gmk
|
||||
index 744969546de..f71c37adf74 100644
|
||||
--- a/make/launcher/Launcher-jdk.compiler.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.compiler.gmk
|
||||
@@ -27,14 +27,12 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, javac, \
|
||||
MAIN_CLASS := com.sun.tools.javac.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, serialver, \
|
||||
MAIN_CLASS := sun.tools.serialver.SerialVer, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
@@ -43,7 +41,6 @@ ifeq ($(ENABLE_SJAVAC), yes)
|
||||
# into any real images
|
||||
$(eval $(call SetupBuildLauncher, sjavac, \
|
||||
MAIN_CLASS := com.sun.tools.sjavac.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
OUTPUT_DIR := $(JDK_OUTPUTDIR)/bin, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.hotspot.agent.gmk b/make/launcher/Launcher-jdk.hotspot.agent.gmk
|
||||
index 9f12b05b172..76da3600368 100644
|
||||
--- a/make/launcher/Launcher-jdk.hotspot.agent.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.hotspot.agent.gmk
|
||||
@@ -27,6 +27,5 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jhsdb, \
|
||||
MAIN_CLASS := sun.jvm.hotspot.SALauncher, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
MACOSX_PRIVILEGED := true, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jartool.gmk b/make/launcher/Launcher-jdk.jartool.gmk
|
||||
index 647d82b65b1..f74e82bfdae 100644
|
||||
--- a/make/launcher/Launcher-jdk.jartool.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jartool.gmk
|
||||
@@ -27,10 +27,8 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jar, \
|
||||
MAIN_CLASS := sun.tools.jar.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jarsigner, \
|
||||
MAIN_CLASS := sun.security.tools.jarsigner.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.javadoc.gmk b/make/launcher/Launcher-jdk.javadoc.gmk
|
||||
index c3d2093be04..889028a2b17 100644
|
||||
--- a/make/launcher/Launcher-jdk.javadoc.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.javadoc.gmk
|
||||
@@ -27,7 +27,6 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, javadoc, \
|
||||
MAIN_CLASS := jdk.javadoc.internal.tool.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jcmd.gmk b/make/launcher/Launcher-jdk.jcmd.gmk
|
||||
index 761a52d8466..7117fa78059 100644
|
||||
--- a/make/launcher/Launcher-jdk.jcmd.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jcmd.gmk
|
||||
@@ -30,7 +30,6 @@ $(eval $(call SetupBuildLauncher, jinfo, \
|
||||
JAVA_ARGS := \
|
||||
-Dsun.jvm.hotspot.debugger.useProcDebugger \
|
||||
-Dsun.jvm.hotspot.debugger.useWindbgDebugger, \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
MACOSX_PRIVILEGED := true, \
|
||||
))
|
||||
|
||||
@@ -38,36 +37,28 @@ $(eval $(call SetupBuildLauncher, jmap, \
|
||||
MAIN_CLASS := sun.tools.jmap.JMap, \
|
||||
JAVA_ARGS := \
|
||||
-Dsun.jvm.hotspot.debugger.useProcDebugger \
|
||||
- -Dsun.jvm.hotspot.debugger.useWindbgDebugger \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
+ -Dsun.jvm.hotspot.debugger.useWindbgDebugger, \
|
||||
MACOSX_PRIVILEGED := true, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jps, \
|
||||
MAIN_CLASS := sun.tools.jps.Jps, \
|
||||
- JAVA_ARGS := \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jstack, \
|
||||
MAIN_CLASS := sun.tools.jstack.JStack, \
|
||||
JAVA_ARGS := \
|
||||
-Dsun.jvm.hotspot.debugger.useProcDebugger \
|
||||
- -Dsun.jvm.hotspot.debugger.useWindbgDebugger \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
+ -Dsun.jvm.hotspot.debugger.useWindbgDebugger, \
|
||||
MACOSX_PRIVILEGED := true, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jstat, \
|
||||
MAIN_CLASS := sun.tools.jstat.Jstat, \
|
||||
- JAVA_ARGS := \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jcmd, \
|
||||
MAIN_CLASS := sun.tools.jcmd.JCmd, \
|
||||
- JAVA_ARGS := \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
diff --git a/make/launcher/Launcher-jdk.jdeps.gmk b/make/launcher/Launcher-jdk.jdeps.gmk
|
||||
index 5448278dae7..217523c48cc 100644
|
||||
--- a/make/launcher/Launcher-jdk.jdeps.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jdeps.gmk
|
||||
@@ -27,18 +27,15 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, javap, \
|
||||
MAIN_CLASS := com.sun.tools.javap.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jdeps, \
|
||||
MAIN_CLASS := com.sun.tools.jdeps.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jdeprscan, \
|
||||
MAIN_CLASS := com.sun.tools.jdeprscan.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jdi.gmk b/make/launcher/Launcher-jdk.jdi.gmk
|
||||
index 27bd448e3ae..fcce98cf430 100644
|
||||
--- a/make/launcher/Launcher-jdk.jdi.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jdi.gmk
|
||||
@@ -27,5 +27,4 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jdb, \
|
||||
MAIN_CLASS := com.sun.tools.example.debug.tty.TTY, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jlink.gmk b/make/launcher/Launcher-jdk.jlink.gmk
|
||||
index 9e61edeb2c8..df2173996d7 100644
|
||||
--- a/make/launcher/Launcher-jdk.jlink.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jlink.gmk
|
||||
@@ -27,21 +27,18 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jimage,\
|
||||
MAIN_CLASS := jdk.tools.jimage.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DENABLE_ARG_FILES, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jlink,\
|
||||
MAIN_CLASS := jdk.tools.jlink.internal.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
CFLAGS := -DENABLE_ARG_FILES \
|
||||
-DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jmod,\
|
||||
MAIN_CLASS := jdk.tools.jmod.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DENABLE_ARG_FILES \
|
||||
-DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jshell.gmk b/make/launcher/Launcher-jdk.jshell.gmk
|
||||
index 7287f8f998a..349eb88e9eb 100644
|
||||
--- a/make/launcher/Launcher-jdk.jshell.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jshell.gmk
|
||||
@@ -27,6 +27,5 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jshell, \
|
||||
MAIN_CLASS := jdk.internal.jshell.tool.JShellToolProvider, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jstatd.gmk b/make/launcher/Launcher-jdk.jstatd.gmk
|
||||
index e1657910c67..e9286d63094 100644
|
||||
--- a/make/launcher/Launcher-jdk.jstatd.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jstatd.gmk
|
||||
@@ -27,7 +27,6 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jstatd, \
|
||||
MAIN_CLASS := sun.tools.jstatd.Jstatd, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
diff --git a/make/launcher/Launcher-jdk.pack.gmk b/make/launcher/Launcher-jdk.pack.gmk
|
||||
index 64bbbb7c949..a93fd2a9017 100644
|
||||
--- a/make/launcher/Launcher-jdk.pack.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.pack.gmk
|
||||
@@ -28,7 +28,6 @@ include LauncherCommon.gmk
|
||||
$(eval $(call SetupBuildLauncher, pack200, \
|
||||
MAIN_MODULE := java.base, \
|
||||
MAIN_CLASS := com.sun.java.util.jar.pack.Driver, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
################################################################################
|
||||
diff --git a/make/launcher/Launcher-jdk.rmic.gmk b/make/launcher/Launcher-jdk.rmic.gmk
|
||||
index b8a55900b0e..d60c3d9b60b 100644
|
||||
--- a/make/launcher/Launcher-jdk.rmic.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.rmic.gmk
|
||||
@@ -27,6 +27,5 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, rmic, \
|
||||
MAIN_CLASS := sun.rmi.rmic.Main, \
|
||||
- JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk b/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk
|
||||
index bd39f8595b2..82311e69fd6 100644
|
||||
--- a/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk
|
||||
@@ -27,7 +27,6 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jjs, \
|
||||
MAIN_CLASS := jdk.nashorn.tools.jjs.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
- -XX:+DisableHotswapAgent, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
CFLAGS := -DENABLE_ARG_FILES, \
|
||||
))
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index 65839b842e2..dce89a044e9 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -4315,11 +4315,17 @@ void Arguments::setup_hotswap_agent() {
|
||||
if (DumpSharedSpaces)
|
||||
return;
|
||||
|
||||
- if (!AllowEnhancedClassRedefinition)
|
||||
+ if (HotswapAgent == NULL || strcmp(HotswapAgent, "disabled") == 0)
|
||||
return;
|
||||
|
||||
+ // Force AllowEnhancedClassRedefinition if HA is enabled
|
||||
+ AllowEnhancedClassRedefinition = true;
|
||||
+
|
||||
+ bool ha_fatjar = strcmp(HotswapAgent, "fatjar") == 0;
|
||||
+ bool ha_core = strcmp(HotswapAgent, "core") == 0;
|
||||
+
|
||||
// Set HotswapAgent
|
||||
- if (!DisableHotswapAgent) {
|
||||
+ if (ha_fatjar || ha_core) {
|
||||
|
||||
char ext_path_str[JVM_MAXPATHLEN];
|
||||
|
||||
@@ -4338,23 +4344,27 @@ void Arguments::setup_hotswap_agent() {
|
||||
}
|
||||
}
|
||||
if (ext_path_length < JVM_MAXPATHLEN - 10) {
|
||||
- jio_snprintf(ext_path_str + ext_path_length, sizeof(ext_path_str) - ext_path_length,
|
||||
- "%shotswap%shotswap-agent.jar", os::file_separator(), os::file_separator());
|
||||
- }
|
||||
-
|
||||
- int fd = ::open(ext_path_str, O_RDONLY);
|
||||
- if (fd >= 0) {
|
||||
- os::close(fd);
|
||||
- size_t length = strlen(ext_path_str) + 1;
|
||||
- char *options = NEW_C_HEAP_ARRAY(char, length, mtArguments);
|
||||
- jio_snprintf(options, length, "%s", ext_path_str);
|
||||
- add_init_agent("instrument", ext_path_str, false);
|
||||
- jio_fprintf(defaultStream::output_stream(), "Starting HotswapAgent '%s'\n", ext_path_str);
|
||||
- }
|
||||
-// else
|
||||
-// {
|
||||
-// jio_fprintf(defaultStream::error_stream(), "HotswapAgent not found on path:'%s'\n", ext_path_str);
|
||||
-// }
|
||||
+ if (ha_fatjar) {
|
||||
+ jio_snprintf(ext_path_str + ext_path_length, sizeof(ext_path_str) - ext_path_length,
|
||||
+ "%shotswap%shotswap-agent.jar", os::file_separator(), os::file_separator());
|
||||
+ } else {
|
||||
+ jio_snprintf(ext_path_str + ext_path_length, sizeof(ext_path_str) - ext_path_length,
|
||||
+ "%shotswap%shotswap-agent-core.jar", os::file_separator(), os::file_separator());
|
||||
+ }
|
||||
+ int fd = ::open(ext_path_str, O_RDONLY);
|
||||
+ if (fd >= 0) {
|
||||
+ os::close(fd);
|
||||
+ size_t length = strlen(ext_path_str) + 1;
|
||||
+ char *options = NEW_C_HEAP_ARRAY(char, length, mtArguments);
|
||||
+ jio_snprintf(options, length, "%s", ext_path_str);
|
||||
+ add_init_agent("instrument", ext_path_str, false);
|
||||
+ jio_fprintf(defaultStream::output_stream(), "Starting HotswapAgent '%s'\n", ext_path_str);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ jio_fprintf(defaultStream::error_stream(), "HotswapAgent not found on path:'%s'!\n", ext_path_str);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
// TODO: open it only for org.hotswap.agent module
|
||||
diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp
|
||||
index 16d8030fd1c..94044c4831c 100644
|
||||
--- a/src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp
|
||||
+++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp
|
||||
@@ -199,6 +199,26 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
+class JVMFlagConstraint_ccstr : public JVMFlagConstraint {
|
||||
+ JVMFlagConstraintFunc_ccstr _constraint;
|
||||
+ const ccstr* _ptr;
|
||||
+
|
||||
+public:
|
||||
+ // the "name" argument must be a string literal
|
||||
+ JVMFlagConstraint_ccstr(const char* name, const ccstr* ptr,
|
||||
+ JVMFlagConstraintFunc_ccstr func,
|
||||
+ ConstraintType type) : JVMFlagConstraint(name, type), _constraint(func), _ptr(ptr) {}
|
||||
+
|
||||
+ JVMFlag::Error apply(bool verbose) {
|
||||
+ ccstr value = *_ptr;
|
||||
+ return _constraint(value, verbose);
|
||||
+ }
|
||||
+
|
||||
+ JVMFlag::Error apply_ccstr(ccstr value, bool verbose) {
|
||||
+ return _constraint(value, verbose);
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
// No constraint emitting
|
||||
void emit_constraint_no(...) { /* NOP */ }
|
||||
|
||||
@@ -239,6 +259,9 @@ void emit_constraint_size_t(const char* name, const size_t* ptr, JVMFlagConstrai
|
||||
void emit_constraint_double(const char* name, const double* ptr, JVMFlagConstraintFunc_double func, JVMFlagConstraint::ConstraintType type) {
|
||||
JVMFlagConstraintList::add(new JVMFlagConstraint_double(name, ptr, func, type));
|
||||
}
|
||||
+void emit_constraint_ccstr(const char* name, ccstr* ptr, JVMFlagConstraintFunc_ccstr func, JVMFlagConstraint::ConstraintType type) {
|
||||
+ JVMFlagConstraintList::add(new JVMFlagConstraint_ccstr(name, ptr, func, type));
|
||||
+}
|
||||
|
||||
// Generate code to call emit_constraint_xxx function
|
||||
#define EMIT_CONSTRAINT_PRODUCT_FLAG(type, name, value, doc) ); emit_constraint_##type(#name,&name
|
||||
diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintList.hpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintList.hpp
|
||||
index 9c27f1db955..b644f7b817a 100644
|
||||
--- a/src/hotspot/share/runtime/flags/jvmFlagConstraintList.hpp
|
||||
+++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintList.hpp
|
||||
@@ -47,6 +47,7 @@ typedef JVMFlag::Error (*JVMFlagConstraintFunc_uintx)(uintx value, bool verbose)
|
||||
typedef JVMFlag::Error (*JVMFlagConstraintFunc_uint64_t)(uint64_t value, bool verbose);
|
||||
typedef JVMFlag::Error (*JVMFlagConstraintFunc_size_t)(size_t value, bool verbose);
|
||||
typedef JVMFlag::Error (*JVMFlagConstraintFunc_double)(double value, bool verbose);
|
||||
+typedef JVMFlag::Error (*JVMFlagConstraintFunc_ccstr)(ccstr value, bool verbose);
|
||||
|
||||
class JVMFlagConstraint : public CHeapObj<mtArguments> {
|
||||
public:
|
||||
diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp
|
||||
index 6559d4252f0..21afac72a2e 100644
|
||||
--- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp
|
||||
+++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp
|
||||
@@ -140,3 +140,13 @@ JVMFlag::Error ThreadLocalHandshakesConstraintFunc(bool value, bool verbose) {
|
||||
}
|
||||
return JVMFlag::SUCCESS;
|
||||
}
|
||||
+
|
||||
+JVMFlag::Error HotswapAgentConstraintFunc(char const* value, bool verbose) {
|
||||
+ if (value != NULL) {
|
||||
+ if (strcmp("disabled", value) != 0 && strcmp("fatjar", value) != 0 && strcmp("core", value) != 0 && strcmp("external", value) != 0) {
|
||||
+ JVMFlag::printError(verbose, "HotswapAgent(%s) must be one of disabled,fatjar,core or external.\n", value);
|
||||
+ return JVMFlag::VIOLATES_CONSTRAINT;
|
||||
+ }
|
||||
+ }
|
||||
+ return JVMFlag::SUCCESS;
|
||||
+}
|
||||
diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp
|
||||
index 8763b83fd37..c9ed15a89e1 100644
|
||||
--- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp
|
||||
+++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp
|
||||
@@ -46,5 +46,6 @@ JVMFlag::Error PerfDataSamplingIntervalFunc(intx value, bool verbose);
|
||||
|
||||
JVMFlag::Error ThreadLocalHandshakesConstraintFunc(bool value, bool verbose);
|
||||
|
||||
+JVMFlag::Error HotswapAgentConstraintFunc(char const* value, bool verbose);
|
||||
|
||||
#endif /* SHARE_VM_RUNTIME_JVMFLAGCONSTRAINTSRUNTIME_HPP */
|
||||
diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp
|
||||
index 705381825ff..eda4eca2451 100644
|
||||
--- a/src/hotspot/share/runtime/globals.hpp
|
||||
+++ b/src/hotspot/share/runtime/globals.hpp
|
||||
@@ -2692,8 +2692,16 @@ define_pd_global(uint64_t,MaxRAM, 1ULL*G);
|
||||
"Allow enhanced class redefinition beyond swapping method " \
|
||||
"bodies") \
|
||||
\
|
||||
- product(bool, DisableHotswapAgent, DISABLED_HOTSWAP_AGENT, \
|
||||
- "Disable integrated Hotswap Agent (HotswapVM only)")
|
||||
+ product(ccstr, HotswapAgent, "disabled", \
|
||||
+ "Specify HotswapAgent image to be used." \
|
||||
+ "disabled: hotswap agent is disabled (default)" \
|
||||
+ "fatjar: full HA. Use integrated hotswap-agent.jar" \
|
||||
+ "core: core HA. Use integrated hotswap-agent-core.jar" \
|
||||
+ "external: external HA. use external HA, open required JDK " \
|
||||
+ "modules.") \
|
||||
+ constraint(HotswapAgentConstraintFunc, AfterErgo)
|
||||
+
|
||||
+
|
||||
#define VM_FLAGS(develop, \
|
||||
develop_pd, \
|
||||
product, \
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,163 +0,0 @@
|
||||
From c1aafaafaf15780d6bca1312162d551da4f63036 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@mailprofiler.com>
|
||||
Date: Mon, 9 Mar 2020 09:54:04 +0100
|
||||
Subject: [PATCH 25/50] Refactor ClearCpoolCacheAndUnpatch
|
||||
|
||||
Call it after redefinition of all classes
|
||||
---
|
||||
make/common/MakeBase.gmk | 4 +-
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 98 ++++---------------
|
||||
2 files changed, 21 insertions(+), 81 deletions(-)
|
||||
|
||||
diff --git a/make/common/MakeBase.gmk b/make/common/MakeBase.gmk
|
||||
index a040effe83a..c33a7d52ddb 100644
|
||||
--- a/make/common/MakeBase.gmk
|
||||
+++ b/make/common/MakeBase.gmk
|
||||
@@ -1044,7 +1044,9 @@ DependOnVariableHelper = \
|
||||
$(info NewVariable $1: >$(strip $($1))<) \
|
||||
$(info OldVariable $1: >$(strip $($1_old))<)) \
|
||||
$(call WriteFile, $1_old:=$(call DoubleDollar,$(call EscapeHash,$($1))), \
|
||||
- $($1_filename))) \
|
||||
+ $($1_filename)) \
|
||||
+ $(eval $($1_filename): ) \
|
||||
+ ) \
|
||||
$($1_filename) \
|
||||
)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 1f5a67f8866..24fb76b6de4 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -491,6 +491,11 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
flush_dependent_code(NULL, thread);
|
||||
// }
|
||||
|
||||
+ // Adjust constantpool caches for all classes that reference methods of the evolved class.
|
||||
+ ClearCpoolCacheAndUnpatch clear_cpool_cache(thread);
|
||||
+ ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
|
||||
+
|
||||
+
|
||||
// JSR-292 support
|
||||
if (_any_class_has_resolved_methods) {
|
||||
bool trace_name_printed = false;
|
||||
@@ -1383,86 +1388,23 @@ void VM_EnhancedRedefineClasses::unpatch_bytecode(Method* method) {
|
||||
}
|
||||
}
|
||||
|
||||
-// Unevolving classes may point to methods of the_class directly
|
||||
+// Unevolving classes may point to old methods directly
|
||||
// from their constant pool caches, itables, and/or vtables. We
|
||||
-// use the ClassLoaderDataGraph::classes_do() facility and this helper
|
||||
-// to fix up these pointers.
|
||||
-// Adjust cpools and vtables closure
|
||||
+// use the SystemDictionary::classes_do() facility and this helper
|
||||
+// to fix up these pointers. Additional field offsets and vtable indices
|
||||
+// in the constant pool cache entries are fixed.
|
||||
+//
|
||||
+// Note: We currently don't support updating the vtable in
|
||||
+// arrayKlassOops. See Open Issues in jvmtiRedefineClasses.hpp.
|
||||
void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
|
||||
- // This is a very busy routine. We don't want too much tracing
|
||||
- // printed out.
|
||||
- bool trace_name_printed = false;
|
||||
- InstanceKlass *the_class = InstanceKlass::cast(_the_class_oop);
|
||||
-
|
||||
- // If the class being redefined is java.lang.Object, we need to fix all
|
||||
- // array class vtables also
|
||||
- if (k->is_array_klass() && _the_class_oop == SystemDictionary::Object_klass()) {
|
||||
- k->vtable().adjust_method_entries(the_class, &trace_name_printed);
|
||||
- } else if (k->is_instance_klass()) {
|
||||
- HandleMark hm(_thread);
|
||||
- InstanceKlass *ik = InstanceKlass::cast(k);
|
||||
+ if (!k->is_instance_klass()) {
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
- // HotSpot specific optimization! HotSpot does not currently
|
||||
- // support delegation from the bootstrap class loader to a
|
||||
- // user-defined class loader. This means that if the bootstrap
|
||||
- // class loader is the initiating class loader, then it will also
|
||||
- // be the defining class loader. This also means that classes
|
||||
- // loaded by the bootstrap class loader cannot refer to classes
|
||||
- // loaded by a user-defined class loader. Note: a user-defined
|
||||
- // class loader can delegate to the bootstrap class loader.
|
||||
- //
|
||||
- // If the current class being redefined has a user-defined class
|
||||
- // loader as its defining class loader, then we can skip all
|
||||
- // classes loaded by the bootstrap class loader.
|
||||
- bool is_user_defined =
|
||||
- InstanceKlass::cast(_the_class_oop)->class_loader() != NULL;
|
||||
- if (is_user_defined && ik->class_loader() == NULL) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- // Fix the vtable embedded in the_class and subclasses of the_class,
|
||||
- // if one exists. We discard scratch_class and we don't keep an
|
||||
- // InstanceKlass around to hold obsolete methods so we don't have
|
||||
- // any other InstanceKlass embedded vtables to update. The vtable
|
||||
- // holds the Method*s for virtual (but not final) methods.
|
||||
- // Default methods, or concrete methods in interfaces are stored
|
||||
- // in the vtable, so if an interface changes we need to check
|
||||
- // adjust_method_entries() for every InstanceKlass, which will also
|
||||
- // adjust the default method vtable indices.
|
||||
- // We also need to adjust any default method entries that are
|
||||
- // not yet in the vtable, because the vtable setup is in progress.
|
||||
- // This must be done after we adjust the default_methods and
|
||||
- // default_vtable_indices for methods already in the vtable.
|
||||
- // If redefining Unsafe, walk all the vtables looking for entries.
|
||||
-// FIXME - code from standard redefine - if needed, it should switch to new_class
|
||||
-// if (ik->vtable_length() > 0 && (_the_class_oop->is_interface()
|
||||
-// || _the_class_oop == SystemDictionary::internal_Unsafe_klass()
|
||||
-// || ik->is_subtype_of(_the_class_oop))) {
|
||||
-// // ik->vtable() creates a wrapper object; rm cleans it up
|
||||
-// ResourceMark rm(_thread);
|
||||
-//
|
||||
-// ik->vtable()->adjust_method_entries(the_class, &trace_name_printed);
|
||||
-// ik->adjust_default_methods(the_class, &trace_name_printed);
|
||||
-// }
|
||||
-
|
||||
- // If the current class has an itable and we are either redefining an
|
||||
- // interface or if the current class is a subclass of the_class, then
|
||||
- // we potentially have to fix the itable. If we are redefining an
|
||||
- // interface, then we have to call adjust_method_entries() for
|
||||
- // every InstanceKlass that has an itable since there isn't a
|
||||
- // subclass relationship between an interface and an InstanceKlass.
|
||||
- // If redefining Unsafe, walk all the itables looking for entries.
|
||||
-// FIXME - code from standard redefine - if needed, it should switch to new_class
|
||||
-// if (ik->itable_length() > 0 && (_the_class_oop->is_interface()
|
||||
-// || _the_class_oop == SystemDictionary::internal_Unsafe_klass()
|
||||
-// || ik->is_subclass_of(_the_class_oop))) {
|
||||
-// // ik->itable() creates a wrapper object; rm cleans it up
|
||||
-// ResourceMark rm(_thread);
|
||||
-//
|
||||
-// ik->itable()->adjust_method_entries(the_class, &trace_name_printed);
|
||||
-// }
|
||||
+ HandleMark hm(_thread);
|
||||
+ InstanceKlass *ik = InstanceKlass::cast(k);
|
||||
|
||||
- constantPoolHandle other_cp = constantPoolHandle(ik->constants());
|
||||
+ constantPoolHandle other_cp = constantPoolHandle(ik->constants());
|
||||
|
||||
// Update host klass of anonymous classes (for example, produced by lambdas) to newest version.
|
||||
if (ik->is_anonymous() && ik->host_klass()->new_version() != NULL) {
|
||||
@@ -1491,7 +1433,6 @@ void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
|
||||
if (RewriteBytecodes) {
|
||||
ik->methods_do(unpatch_bytecode);
|
||||
}
|
||||
- }
|
||||
}
|
||||
|
||||
// Clean method data for this class
|
||||
@@ -1891,9 +1832,6 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
}
|
||||
*/
|
||||
|
||||
- // Adjust constantpool caches for all classes that reference methods of the evolved class.
|
||||
- ClearCpoolCacheAndUnpatch clear_cpool_cache(THREAD);
|
||||
- ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
|
||||
|
||||
{
|
||||
ResourceMark rm(THREAD);
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,333 @@
|
||||
From 8dd54d6e012458db96f199550d0f6016537c6d82 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
||||
Date: Mon, 8 Mar 2021 02:22:54 +0700
|
||||
Subject: [PATCH 26/33] Support for redefinition of Well Known classses
|
||||
(java.*,jdk.*, sun.*)
|
||||
|
||||
---
|
||||
src/hotspot/share/ci/ciKlass.hpp | 1 +
|
||||
src/hotspot/share/ci/ciObjectFactory.cpp | 34 +++++++++++
|
||||
src/hotspot/share/ci/ciObjectFactory.hpp | 6 ++
|
||||
.../share/classfile/systemDictionary.cpp | 10 +++
|
||||
.../share/classfile/systemDictionary.hpp | 2 +
|
||||
src/hotspot/share/classfile/vmSymbols.hpp | 2 +
|
||||
src/hotspot/share/compiler/compileBroker.cpp | 11 ++++
|
||||
src/hotspot/share/memory/universe.cpp | 8 +++
|
||||
src/hotspot/share/memory/universe.hpp | 3 +
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 61 ++++++++++++++++++-
|
||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 2 +
|
||||
11 files changed, 139 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/ci/ciKlass.hpp b/src/hotspot/share/ci/ciKlass.hpp
|
||||
index 896f489453a..c610c365aba 100644
|
||||
--- a/src/hotspot/share/ci/ciKlass.hpp
|
||||
+++ b/src/hotspot/share/ci/ciKlass.hpp
|
||||
@@ -129,6 +129,7 @@ public:
|
||||
void print_name_on(outputStream* st);
|
||||
|
||||
const char* external_name() const;
|
||||
+ Klass* new_version() { return get_Klass()->new_version(); }
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_CI_CIKLASS_HPP
|
||||
diff --git a/src/hotspot/share/ci/ciObjectFactory.cpp b/src/hotspot/share/ci/ciObjectFactory.cpp
|
||||
index c8a03aa9ee9..6b187909943 100644
|
||||
--- a/src/hotspot/share/ci/ciObjectFactory.cpp
|
||||
+++ b/src/hotspot/share/ci/ciObjectFactory.cpp
|
||||
@@ -70,7 +70,10 @@ GrowableArray<ciMetadata*>* ciObjectFactory::_shared_ci_metadata = NULL;
|
||||
ciSymbol* ciObjectFactory::_shared_ci_symbols[vmSymbols::SID_LIMIT];
|
||||
int ciObjectFactory::_shared_ident_limit = 0;
|
||||
volatile bool ciObjectFactory::_initialized = false;
|
||||
+volatile bool ciObjectFactory::_reinitialize_wk_klasses = false;
|
||||
|
||||
+// TODO: review...
|
||||
+Arena* ciObjectFactory::_initial_arena = NULL;
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// ciObjectFactory::ciObjectFactory
|
||||
@@ -112,6 +115,7 @@ void ciObjectFactory::initialize() {
|
||||
// compiler thread that initializes the initial ciObjectFactory which
|
||||
// creates the shared ciObjects that all later ciObjectFactories use.
|
||||
Arena* arena = new (mtCompiler) Arena(mtCompiler);
|
||||
+ ciObjectFactory::_initial_arena = arena;
|
||||
ciEnv initial(arena);
|
||||
ciEnv* env = ciEnv::current();
|
||||
env->_factory->init_shared_objects();
|
||||
@@ -120,6 +124,36 @@ void ciObjectFactory::initialize() {
|
||||
|
||||
}
|
||||
|
||||
+// (DCEVM) wk classes could be modified
|
||||
+void ciObjectFactory::reinitialize_wk_classes() {
|
||||
+ ASSERT_IN_VM;
|
||||
+ JavaThread* thread = JavaThread::current();
|
||||
+ HandleMark handle_mark(thread);
|
||||
+
|
||||
+ // This Arena is long lived and exists in the resource mark of the
|
||||
+ // compiler thread that initializes the initial ciObjectFactory which
|
||||
+ // creates the shared ciObjects that all later ciObjectFactories use.
|
||||
+ // Arena* arena = new (mtCompiler) Arena(mtCompiler);
|
||||
+ ciEnv initial(ciObjectFactory::_initial_arena);
|
||||
+ ciEnv* env = ciEnv::current();
|
||||
+ env->_factory->do_reinitialize_wk_classes();
|
||||
+ _reinitialize_wk_klasses = false;
|
||||
+}
|
||||
+
|
||||
+// (DCEVM) wk classes could be modified
|
||||
+void ciObjectFactory::do_reinitialize_wk_classes() {
|
||||
+#define WK_KLASS_DEFN(name, ignore_s, opt) \
|
||||
+ if (ciEnv::_##name != NULL && ciEnv::_##name->new_version() != NULL) { \
|
||||
+ int old_ident = ciEnv::_##name->ident(); \
|
||||
+ ciEnv::_##name = get_metadata(SystemDictionary::name())->as_instance_klass(); \
|
||||
+ ciEnv::_##name->compute_nonstatic_fields(); \
|
||||
+ ciEnv::_##name->set_ident(old_ident); \
|
||||
+ }
|
||||
+
|
||||
+ WK_KLASSES_DO(WK_KLASS_DEFN)
|
||||
+#undef WK_KLASS_DEFN
|
||||
+}
|
||||
+
|
||||
void ciObjectFactory::init_shared_objects() {
|
||||
|
||||
_next_ident = 1; // start numbering CI objects at 1
|
||||
diff --git a/src/hotspot/share/ci/ciObjectFactory.hpp b/src/hotspot/share/ci/ciObjectFactory.hpp
|
||||
index 3e9d48c4cdc..79059f6e2e8 100644
|
||||
--- a/src/hotspot/share/ci/ciObjectFactory.hpp
|
||||
+++ b/src/hotspot/share/ci/ciObjectFactory.hpp
|
||||
@@ -41,9 +41,11 @@ class ciObjectFactory : public ResourceObj {
|
||||
|
||||
private:
|
||||
static volatile bool _initialized;
|
||||
+ static volatile bool _reinitialize_wk_klasses;
|
||||
static GrowableArray<ciMetadata*>* _shared_ci_metadata;
|
||||
static ciSymbol* _shared_ci_symbols[];
|
||||
static int _shared_ident_limit;
|
||||
+ static Arena* _initial_arena;
|
||||
|
||||
Arena* _arena;
|
||||
GrowableArray<ciMetadata*>* _ci_metadata;
|
||||
@@ -89,10 +91,14 @@ private:
|
||||
ciInstance* get_unloaded_instance(ciInstanceKlass* klass);
|
||||
|
||||
static int compare_cimetadata(ciMetadata** a, ciMetadata** b);
|
||||
+ void do_reinitialize_wk_classes();
|
||||
public:
|
||||
static bool is_initialized() { return _initialized; }
|
||||
+ static bool is_reinitialize_wk_klasses() { return _reinitialize_wk_klasses; }
|
||||
+ static void set_reinitialize_wk_klasses() { _reinitialize_wk_klasses = true; }
|
||||
|
||||
static void initialize();
|
||||
+ static void reinitialize_wk_classes();
|
||||
void init_shared_objects();
|
||||
void remove_symbols();
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.cpp b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
index d0365162b81..74f30524279 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
@@ -1985,6 +1985,16 @@ bool SystemDictionary::is_well_known_klass(Symbol* class_name) {
|
||||
}
|
||||
#endif
|
||||
|
||||
+bool SystemDictionary::update_well_known_klass(InstanceKlass* old_klass, InstanceKlass* new_klass) {
|
||||
+ for (int id = FIRST_WKID; id < WKID_LIMIT; id++) {
|
||||
+ if (well_known_klass((WKID) id) == old_klass) {
|
||||
+ *well_known_klass_addr((WKID)id) = new_klass;
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
bool SystemDictionary::resolve_wk_klass(WKID id, int init_opt, TRAPS) {
|
||||
assert(id >= (int)FIRST_WKID && id < (int)WKID_LIMIT, "oob");
|
||||
int info = wk_init_info[id - FIRST_WKID];
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.hpp b/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
index a8359143908..aba2780a321 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
@@ -470,6 +470,8 @@ public:
|
||||
static bool is_well_known_klass(Symbol* class_name);
|
||||
#endif
|
||||
|
||||
+ static bool update_well_known_klass(InstanceKlass* new_klass, InstanceKlass* old_klass);
|
||||
+
|
||||
// Enhanced class redefinition
|
||||
static void remove_from_hierarchy(InstanceKlass* k);
|
||||
static void update_constraints_after_redefinition();
|
||||
diff --git a/src/hotspot/share/classfile/vmSymbols.hpp b/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
index 0d0badeabd0..3477a408cb6 100644
|
||||
--- a/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
+++ b/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
@@ -356,6 +356,8 @@
|
||||
template(exit_method_name, "exit") \
|
||||
template(add_method_name, "add") \
|
||||
template(remove_method_name, "remove") \
|
||||
+ template(registerNatives_method_name, "registerNatives") \
|
||||
+ template(initIDs_method_name, "initIDs") \
|
||||
template(parent_name, "parent") \
|
||||
template(threads_name, "threads") \
|
||||
template(groups_name, "groups") \
|
||||
diff --git a/src/hotspot/share/compiler/compileBroker.cpp b/src/hotspot/share/compiler/compileBroker.cpp
|
||||
index 80a940980a5..5ec54baec96 100644
|
||||
--- a/src/hotspot/share/compiler/compileBroker.cpp
|
||||
+++ b/src/hotspot/share/compiler/compileBroker.cpp
|
||||
@@ -1877,6 +1877,17 @@ void CompileBroker::compiler_thread_loop() {
|
||||
if (method()->number_of_breakpoints() == 0) {
|
||||
// Compile the method.
|
||||
if ((UseCompiler || AlwaysCompileLoopMethods) && CompileBroker::should_compile_new_jobs()) {
|
||||
+
|
||||
+ // TODO: review usage of CompileThread_lock (DCEVM)
|
||||
+ if (ciObjectFactory::is_reinitialize_wk_klasses())
|
||||
+ {
|
||||
+ ASSERT_IN_VM;
|
||||
+ MutexLocker only_one (CompileThread_lock, thread);
|
||||
+ if (ciObjectFactory::is_reinitialize_wk_klasses()) {
|
||||
+ ciObjectFactory::reinitialize_wk_classes();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
invoke_compiler_on_method(task);
|
||||
thread->start_idle_timer();
|
||||
} else {
|
||||
diff --git a/src/hotspot/share/memory/universe.cpp b/src/hotspot/share/memory/universe.cpp
|
||||
index 2e4f597cf1f..4b2c3e62941 100644
|
||||
--- a/src/hotspot/share/memory/universe.cpp
|
||||
+++ b/src/hotspot/share/memory/universe.cpp
|
||||
@@ -1030,6 +1030,14 @@ void Universe::initialize_known_methods(TRAPS) {
|
||||
vmSymbols::doStackWalk_signature(), false, CHECK);
|
||||
}
|
||||
|
||||
+void Universe::reinitialize_loader_addClass_method(TRAPS) {
|
||||
+ // Set up method for registering loaded classes in class loader vector
|
||||
+ initialize_known_method(_loader_addClass_cache,
|
||||
+ SystemDictionary::ClassLoader_klass(),
|
||||
+ "addClass",
|
||||
+ vmSymbols::class_void_signature(), false, CHECK);
|
||||
+}
|
||||
+
|
||||
void universe2_init() {
|
||||
EXCEPTION_MARK;
|
||||
Universe::genesis(CATCH);
|
||||
diff --git a/src/hotspot/share/memory/universe.hpp b/src/hotspot/share/memory/universe.hpp
|
||||
index 742dada0e8f..d1af82b5fa7 100644
|
||||
--- a/src/hotspot/share/memory/universe.hpp
|
||||
+++ b/src/hotspot/share/memory/universe.hpp
|
||||
@@ -349,6 +349,9 @@ class Universe: AllStatic {
|
||||
// Function to initialize these
|
||||
static void initialize_known_methods(TRAPS);
|
||||
|
||||
+ // Enhanced class redefinition
|
||||
+ static void reinitialize_loader_addClass_method(TRAPS);
|
||||
+
|
||||
static oop null_ptr_exception_instance() { return _null_ptr_exception_instance; }
|
||||
static oop arithmetic_exception_instance() { return _arithmetic_exception_instance; }
|
||||
static oop virtual_machine_error_instance() { return _virtual_machine_error_instance; }
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 4ee12b7021f..7997b178d22 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -497,6 +497,16 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
redefine_single_class(_new_classes->at(i), thread);
|
||||
}
|
||||
|
||||
+ // Update possible redefinition of well-known classes (like ClassLoader)
|
||||
+ for (int i = 0; i < _new_classes->length(); i++) {
|
||||
+ InstanceKlass* cur = _new_classes->at(i);
|
||||
+ if (cur->old_version() != NULL && SystemDictionary::update_well_known_klass(InstanceKlass::cast(cur->old_version()), cur))
|
||||
+ {
|
||||
+ log_trace(redefine, class, obsolete, metadata)("Well known class updated %s", cur->external_name());
|
||||
+ ciObjectFactory::set_reinitialize_wk_klasses();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
// Deoptimize all compiled code that depends on this class (do only once, because it clears whole cache)
|
||||
// if (_max_redefinition_flags > Klass::ModifyClass) {
|
||||
flush_dependent_code(NULL, thread);
|
||||
@@ -672,12 +682,56 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
_timer_vm_op_doit.stop();
|
||||
}
|
||||
|
||||
+void VM_EnhancedRedefineClasses::reinitializeJDKClasses() {
|
||||
+ if (!_new_classes->is_empty()) {
|
||||
+ ResourceMark rm(Thread::current());
|
||||
+
|
||||
+ for (int i = 0; i < _new_classes->length(); i++) {
|
||||
+ InstanceKlass* cur = _new_classes->at(i);
|
||||
+
|
||||
+ if (cur->name()->starts_with("java/") || cur->name()->starts_with("jdk/") || cur->name()->starts_with("sun/")) {
|
||||
+
|
||||
+ if (cur == SystemDictionary::ClassLoader_klass()) {
|
||||
+ // ClassLoader.addClass method is cached in Universe, we must redefine
|
||||
+ Universe::reinitialize_loader_addClass_method(Thread::current());
|
||||
+ log_trace(redefine, class, obsolete, metadata)("Reinitialize ClassLoade addClass method cache.");
|
||||
+ }
|
||||
+
|
||||
+ // naive assumptions that only JDK classes has native static "registerNative" and "initIDs" methods
|
||||
+ int end;
|
||||
+ Symbol* signature = vmSymbols::registerNatives_method_name();
|
||||
+ int midx = cur->find_method_by_name(signature, &end);
|
||||
+ if (midx == -1) {
|
||||
+ signature = vmSymbols::initIDs_method_name();
|
||||
+ midx = cur->find_method_by_name(signature, &end);
|
||||
+ }
|
||||
+ Method* m = NULL;
|
||||
+ if (midx != -1) {
|
||||
+ m = cur->methods()->at(midx);
|
||||
+ }
|
||||
+ if (m != NULL && m->is_static() && m->is_native()) {
|
||||
+ // call static registerNative if present
|
||||
+ JavaValue result(T_VOID);
|
||||
+ JavaCalls::call_static(&result,
|
||||
+ cur,
|
||||
+ signature,
|
||||
+ vmSymbols::void_method_signature(),
|
||||
+ Thread::current());
|
||||
+ log_trace(redefine, class, obsolete, metadata)("Reregister natives of JDK class %s", cur->external_name());
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
// Cleanup - runs in JVM thread
|
||||
// - free used memory
|
||||
// - end GC
|
||||
void VM_EnhancedRedefineClasses::doit_epilogue() {
|
||||
VM_GC_Operation::doit_epilogue();
|
||||
|
||||
+ reinitializeJDKClasses();
|
||||
+
|
||||
if (_new_classes != NULL) {
|
||||
delete _new_classes;
|
||||
}
|
||||
@@ -1589,7 +1643,12 @@ void VM_EnhancedRedefineClasses::check_methods_and_mark_as_obsolete() {
|
||||
|
||||
// obsolete methods need a unique idnum so they become new entries in
|
||||
// the jmethodID cache in InstanceKlass
|
||||
- assert(old_method->method_idnum() == new_method->method_idnum(), "must match");
|
||||
+ if (old_method->method_idnum() != new_method->method_idnum()) {
|
||||
+ log_error(redefine, class, normalize)
|
||||
+ ("Method not matched: %d != %d old: %s = new: %s", old_method->method_idnum(), new_method->method_idnum(),
|
||||
+ old_method->name_and_sig_as_C_string(), new_method->name_and_sig_as_C_string());
|
||||
+ // assert(old_method->method_idnum() == new_method->method_idnum(), "must match");
|
||||
+ }
|
||||
// u2 num = InstanceKlass::cast(_the_class_oop)->next_method_idnum();
|
||||
// if (num != ConstMethod::UNSET_IDNUM) {
|
||||
// old_method->set_method_idnum(num);
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index d00109a0b92..8c47baa8a74 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -141,6 +141,8 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
|
||||
void flush_dependent_code(InstanceKlass* k_h, TRAPS);
|
||||
|
||||
+ void reinitializeJDKClasses();
|
||||
+
|
||||
static void check_class(InstanceKlass* k_oop, TRAPS);
|
||||
|
||||
static void dump_methods();
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From 91cfd6de1aac67a2f096568fda3b5992c19bddfb Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 19 Mar 2021 19:13:38 +0100
|
||||
Subject: [PATCH 27/33] JBR-3458: Skip dynamic proxy classes based on
|
||||
com.sun.proxy
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 7997b178d22..0d1c68f5cd0 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -689,7 +689,8 @@ void VM_EnhancedRedefineClasses::reinitializeJDKClasses() {
|
||||
for (int i = 0; i < _new_classes->length(); i++) {
|
||||
InstanceKlass* cur = _new_classes->at(i);
|
||||
|
||||
- if (cur->name()->starts_with("java/") || cur->name()->starts_with("jdk/") || cur->name()->starts_with("sun/")) {
|
||||
+ if ((cur->name()->starts_with("java/") || cur->name()->starts_with("jdk/") || cur->name()->starts_with("sun/"))
|
||||
+ && cur->name()->index_of_at(0, "$$") == -1) { // skip dynamic proxies
|
||||
|
||||
if (cur == SystemDictionary::ClassLoader_klass()) {
|
||||
// ClassLoader.addClass method is cached in Universe, we must redefine
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
From a4ab453f532839ea3b09027736bb6e74d288bf1d Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 10 Apr 2020 23:28:07 +0200
|
||||
Subject: [PATCH 27/50] Update klass reference in Klass.implementor()
|
||||
|
||||
If interface X is removed from class Y then old reference to Y could be
|
||||
stored in X.implementor()
|
||||
---
|
||||
.../share/prims/jvmtiEnhancedRedefineClasses.cpp | 12 ++++++++++++
|
||||
.../share/prims/jvmtiEnhancedRedefineClasses.hpp | 11 -----------
|
||||
2 files changed, 12 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 24fb76b6de4..f6d2d3a40fe 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -1411,6 +1411,18 @@ void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
|
||||
ik->set_host_klass(InstanceKlass::cast(ik->host_klass()->newest_version()));
|
||||
}
|
||||
|
||||
+ // Update implementor if there is only one, in this case implementor() can reference old class
|
||||
+ if (ik->is_interface()) {
|
||||
+ Klass* implKlass = ik->implementor();
|
||||
+ if (implKlass != NULL && implKlass != ik && implKlass->new_version() != NULL) {
|
||||
+ InstanceKlass* newest_impl = InstanceKlass::cast(implKlass->newest_version());
|
||||
+ ik->init_implementor();
|
||||
+ if (newest_impl->implements_interface(ik)) {
|
||||
+ ik->add_implementor(newest_impl);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
for (int i = 0; i < other_cp->length(); i++) {
|
||||
if (other_cp->tag_at(i).is_klass()) {
|
||||
Klass* klass = other_cp->resolved_klass_at(i);
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index 5b3ebc13661..2d114635ee5 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -69,17 +69,6 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
// RetransformClasses. Indicate which.
|
||||
JvmtiClassLoadKind _class_load_kind;
|
||||
|
||||
- // _index_map_count is just an optimization for knowing if
|
||||
- // _index_map_p contains any entries.
|
||||
- int _index_map_count;
|
||||
- intArray * _index_map_p;
|
||||
-
|
||||
- // _operands_index_map_count is just an optimization for knowing if
|
||||
- // _operands_index_map_p contains any entries.
|
||||
- int _operands_cur_length;
|
||||
- int _operands_index_map_count;
|
||||
- intArray * _operands_index_map_p;
|
||||
-
|
||||
GrowableArray<InstanceKlass*>* _new_classes;
|
||||
jvmtiError _res;
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
From 015c9c88e63f2dde4b8b2a09d2832a8c2a3caf25 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 10 Apr 2020 23:30:21 +0200
|
||||
Subject: [PATCH 28/50] Fix DirectMethodHandle accessors klasses
|
||||
|
||||
---
|
||||
src/hotspot/share/classfile/javaClasses.cpp | 28 +++++++++++++++------
|
||||
src/hotspot/share/classfile/javaClasses.hpp | 4 +++
|
||||
2 files changed, 24 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/javaClasses.cpp b/src/hotspot/share/classfile/javaClasses.cpp
|
||||
index a89443d22ea..ea0588e5388 100644
|
||||
--- a/src/hotspot/share/classfile/javaClasses.cpp
|
||||
+++ b/src/hotspot/share/classfile/javaClasses.cpp
|
||||
@@ -3641,14 +3641,20 @@ void java_lang_invoke_DirectMethodHandle_StaticAccessor::set_static_offset(oop d
|
||||
dmh->long_field_put(_static_offset_offset, static_offset);
|
||||
}
|
||||
|
||||
+#define DIRECTMETHODHANDLE_STATIC_ACCESSOR_FIELDS_DO(macro) \
|
||||
+ macro(_static_offset_offset, k, vmSymbols::static_offset_name(), long_signature, false)
|
||||
|
||||
void java_lang_invoke_DirectMethodHandle_StaticAccessor::compute_offsets() {
|
||||
- Klass* klass_oop = SystemDictionary::DirectMethodHandle_StaticAccessor_klass();
|
||||
- if (klass_oop != NULL) {
|
||||
- compute_offset(_static_offset_offset, InstanceKlass::cast(klass_oop), vmSymbols::static_offset_name(), vmSymbols::long_signature());
|
||||
- }
|
||||
+ InstanceKlass* k = SystemDictionary::DirectMethodHandle_StaticAccessor_klass();
|
||||
+ DIRECTMETHODHANDLE_STATIC_ACCESSOR_FIELDS_DO(FIELD_COMPUTE_OFFSET);
|
||||
}
|
||||
|
||||
+#if INCLUDE_CDS
|
||||
+void java_lang_invoke_DirectMethodHandle_StaticAccessor::serialize_offsets(SerializeClosure* f) {
|
||||
+ DIRECTMETHODHANDLE_STATIC_ACCESSOR_FIELDS_DO(FIELD_SERIALIZE_OFFSET);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
// Support for java_lang_invoke_DirectMethodHandle$Accessor
|
||||
|
||||
int java_lang_invoke_DirectMethodHandle_Accessor::_field_offset_offset;
|
||||
@@ -3663,14 +3669,20 @@ void java_lang_invoke_DirectMethodHandle_Accessor::set_field_offset(oop dmh, int
|
||||
dmh->int_field_put(_field_offset_offset, field_offset);
|
||||
}
|
||||
|
||||
+#define DIRECTMETHODHANDLE_ACCESSOR_FIELDS_DO(macro) \
|
||||
+ macro(_field_offset_offset, k, vmSymbols::field_offset_name(), int_signature, false)
|
||||
|
||||
void java_lang_invoke_DirectMethodHandle_Accessor::compute_offsets() {
|
||||
- Klass* klass_oop = SystemDictionary::DirectMethodHandle_Accessor_klass();
|
||||
- if (klass_oop != NULL) {
|
||||
- compute_offset(_field_offset_offset, InstanceKlass::cast(klass_oop), vmSymbols::field_offset_name(), vmSymbols::int_signature());
|
||||
- }
|
||||
+ InstanceKlass* k = SystemDictionary::DirectMethodHandle_Accessor_klass();
|
||||
+ DIRECTMETHODHANDLE_ACCESSOR_FIELDS_DO(FIELD_COMPUTE_OFFSET);
|
||||
}
|
||||
|
||||
+#if INCLUDE_CDS
|
||||
+void java_lang_invoke_DirectMethodHandle_Accessor::serialize_offsets(SerializeClosure* f) {
|
||||
+ DIRECTMETHODHANDLE_ACCESSOR_FIELDS_DO(FIELD_SERIALIZE_OFFSET);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
// Support for java_lang_invoke_MethodHandle
|
||||
|
||||
int java_lang_invoke_MethodHandle::_type_offset;
|
||||
diff --git a/src/hotspot/share/classfile/javaClasses.hpp b/src/hotspot/share/classfile/javaClasses.hpp
|
||||
index ceb1670df5d..55f9fa62e2b 100644
|
||||
--- a/src/hotspot/share/classfile/javaClasses.hpp
|
||||
+++ b/src/hotspot/share/classfile/javaClasses.hpp
|
||||
@@ -67,6 +67,8 @@
|
||||
f(java_lang_invoke_LambdaForm) \
|
||||
f(java_lang_invoke_MethodType) \
|
||||
f(java_lang_invoke_CallSite) \
|
||||
+ f(java_lang_invoke_DirectMethodHandle_StaticAccessor) \
|
||||
+ f(java_lang_invoke_DirectMethodHandle_Accessor) \
|
||||
f(java_lang_invoke_MethodHandleNatives_CallSiteContext) \
|
||||
f(java_security_AccessControlContext) \
|
||||
f(java_lang_reflect_AccessibleObject) \
|
||||
@@ -1077,6 +1079,7 @@ class java_lang_invoke_DirectMethodHandle_StaticAccessor: AllStatic {
|
||||
static bool is_instance(oop obj) {
|
||||
return obj != NULL && is_subclass(obj->klass());
|
||||
}
|
||||
+ static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
|
||||
};
|
||||
|
||||
// Interface to java.lang.invoke.DirectMethodHandle$Accessor objects
|
||||
@@ -1101,6 +1104,7 @@ class java_lang_invoke_DirectMethodHandle_Accessor: AllStatic {
|
||||
static bool is_instance(oop obj) {
|
||||
return obj != NULL && is_subclass(obj->klass());
|
||||
}
|
||||
+ static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
|
||||
};
|
||||
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
From 33a280c972960380f3627fd178d170b14f0b7995 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 20 Mar 2021 20:51:08 +0100
|
||||
Subject: [PATCH 28/33] JBR-3459: Fix race condition in
|
||||
ClassLoaderDataGraph::classes_do
|
||||
|
||||
InstanceKlass in ClassLoaderData can be uninitialized when
|
||||
ClassLoaderDataGraph::classes_do is called. Using
|
||||
ClassLoaderDataGraph::dictionary_classes_do is safe but problem is still
|
||||
persisting with anonymous classes.
|
||||
---
|
||||
src/hotspot/share/classfile/classLoaderData.cpp | 10 ++++++++++
|
||||
src/hotspot/share/classfile/classLoaderData.hpp | 4 ++++
|
||||
.../share/prims/jvmtiEnhancedRedefineClasses.cpp | 13 +++++++++++--
|
||||
3 files changed, 25 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
index 68df33b6c40..b12784954af 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
@@ -1169,6 +1169,16 @@ void ClassLoaderDataGraph::classes_do(KlassClosure* klass_closure) {
|
||||
}
|
||||
}
|
||||
|
||||
+void ClassLoaderDataGraph::anonymous_classes_do(KlassClosure* klass_closure) {
|
||||
+ Thread* thread = Thread::current();
|
||||
+ for (ClassLoaderData* cld = _head; cld != NULL; cld = cld->next()) {
|
||||
+ if (cld->is_anonymous()) {
|
||||
+ Handle holder(thread, cld->holder_phantom());
|
||||
+ cld->classes_do(klass_closure);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void ClassLoaderDataGraph::classes_do(void f(Klass* const)) {
|
||||
Thread* thread = Thread::current();
|
||||
for (ClassLoaderData* cld = _head; cld != NULL; cld = cld->next()) {
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.hpp b/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
index 92f57dac23e..c4c17112a2d 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
@@ -108,6 +108,10 @@ class ClassLoaderDataGraph : public AllStatic {
|
||||
// for redefinition. These classes are removed during the next class unloading.
|
||||
// Walking the ClassLoaderDataGraph also includes anonymous classes.
|
||||
static void classes_do(KlassClosure* klass_closure);
|
||||
+
|
||||
+ // Enhanced class redefinition
|
||||
+ static void anonymous_classes_do(KlassClosure* klass_closure);
|
||||
+
|
||||
static void classes_do(void f(Klass* const));
|
||||
static void methods_do(void f(Method*));
|
||||
static void modules_do(void f(ModuleEntry*));
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 0d1c68f5cd0..745109902af 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -2130,8 +2130,17 @@ jvmtiError VM_EnhancedRedefineClasses::find_sorted_affected_classes(TRAPS) {
|
||||
AffectedKlassClosure closure(_affected_klasses);
|
||||
// Updated in j10, from original SystemDictionary::classes_do
|
||||
|
||||
- ClassLoaderDataGraph::classes_do(&closure);
|
||||
- //ClassLoaderDataGraph::dictionary_classes_do(&closure);
|
||||
+ // 0. we can't use ClassLoaderDataGraph::classes_do since classes can be uninitialized in cld,
|
||||
+ // fully initialized class is in system dictionary
|
||||
+ // ClassLoaderDataGraph::classes_do(&closure);
|
||||
+
|
||||
+ // 1. Scan over dictionaries
|
||||
+ ClassLoaderDataGraph::dictionary_classes_do(&closure);
|
||||
+
|
||||
+ // 2. Anonymous class is not in dictionary, we have to iterate anonymous cld directly, but there is race cond...
|
||||
+ // TODO: review ... anonymous class is added to cld before InstanceKlass initialization,
|
||||
+ // find out how to check if the InstanceKlass is initialized
|
||||
+ ClassLoaderDataGraph::anonymous_classes_do(&closure);
|
||||
|
||||
log_trace(redefine, class, load)("%d classes affected", _affected_klasses->length());
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -0,0 +1,222 @@
|
||||
From daa0ca3b718e428ffde26e9633a07a37658beb61 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
||||
Date: Sun, 10 Oct 2021 20:25:30 +0200
|
||||
Subject: [PATCH 29/33] JBR-3867 - update keys of jvmti TAG map after
|
||||
redefinition
|
||||
|
||||
jdwp keeps relation class_ptr->class_ref in jvmti tag. class_ptr is used
|
||||
as a tag key, tag value is refnode. There are new class_ptrs after
|
||||
redefinition, therefore jdwp redefinition method update all affected
|
||||
keys in the tag map.
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiExtensions.cpp | 24 ++++++++++++++
|
||||
.../share/native/libjdwp/VirtualMachineImpl.c | 20 +++++++++++
|
||||
.../share/native/libjdwp/commonRef.c | 29 ++++++++++++++++
|
||||
.../share/native/libjdwp/commonRef.h | 2 ++
|
||||
.../share/native/libjdwp/util.c | 33 +++++++++++++++++++
|
||||
.../share/native/libjdwp/util.h | 3 ++
|
||||
6 files changed, 111 insertions(+)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiExtensions.cpp b/src/hotspot/share/prims/jvmtiExtensions.cpp
|
||||
index 36bc47ad0b5..8a6058fd884 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiExtensions.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiExtensions.cpp
|
||||
@@ -49,6 +49,15 @@ static jvmtiError JNICALL IsClassUnloadingEnabled(const jvmtiEnv* env, ...) {
|
||||
return JVMTI_ERROR_NONE;
|
||||
}
|
||||
|
||||
+// extension function
|
||||
+static jvmtiError JNICALL IsEnhancedClassRedefinitionEnabled(const jvmtiEnv* env, jboolean* enabled, ...) {
|
||||
+ if (enabled == NULL) {
|
||||
+ return JVMTI_ERROR_NULL_POINTER;
|
||||
+ }
|
||||
+ *enabled = (jboolean)AllowEnhancedClassRedefinition;
|
||||
+ return JVMTI_ERROR_NONE;
|
||||
+}
|
||||
+
|
||||
// register extension functions and events. In this implementation we
|
||||
// have a single extension function (to prove the API) that tests if class
|
||||
// unloading is enabled or disabled. We also have a single extension event
|
||||
@@ -88,6 +97,21 @@ void JvmtiExtensions::register_extensions() {
|
||||
event_params
|
||||
};
|
||||
_ext_events->append(&ext_event);
|
||||
+
|
||||
+ static jvmtiParamInfo func_params_enh_redef[] = {
|
||||
+ { (char*)"IsEnhancedClassRedefinitionEnabled", JVMTI_KIND_OUT, JVMTI_TYPE_JBOOLEAN, JNI_FALSE }
|
||||
+
|
||||
+ };
|
||||
+ static jvmtiExtensionFunctionInfo ext_func_enh_redef = {
|
||||
+ (jvmtiExtensionFunction)IsEnhancedClassRedefinitionEnabled,
|
||||
+ (char*)"com.sun.hotspot.functions.IsEnhancedClassRedefinitionEnabled",
|
||||
+ (char*)"Tell if enhanced class redefinition is enabled (-noclassgc)",
|
||||
+ sizeof(func_params_enh_redef)/sizeof(func_params_enh_redef[0]),
|
||||
+ func_params_enh_redef,
|
||||
+ 0, // no non-universal errors
|
||||
+ NULL
|
||||
+ };
|
||||
+ _ext_functions->append(&ext_func_enh_redef);
|
||||
}
|
||||
|
||||
|
||||
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c b/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c
|
||||
index d7ca956dc57..faa8f55f91f 100644
|
||||
--- a/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c
|
||||
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c
|
||||
@@ -475,6 +475,14 @@ redefineClasses(PacketInputStream *in, PacketOutputStream *out)
|
||||
if (ok == JNI_TRUE) {
|
||||
jvmtiError error;
|
||||
|
||||
+ jlong classIds[classCount];
|
||||
+
|
||||
+ if (gdata->isEnhancedClassRedefinitionEnabled) {
|
||||
+ for (i = 0; i < classCount; ++i) {
|
||||
+ classIds[i] = commonRef_refToID(env, classDefs[i].klass);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
error = JVMTI_FUNC_PTR(gdata->jvmti,RedefineClasses)
|
||||
(gdata->jvmti, classCount, classDefs);
|
||||
if (error != JVMTI_ERROR_NONE) {
|
||||
@@ -484,6 +492,18 @@ redefineClasses(PacketInputStream *in, PacketOutputStream *out)
|
||||
for ( i = 0 ; i < classCount; i++ ) {
|
||||
eventHandler_freeClassBreakpoints(classDefs[i].klass);
|
||||
}
|
||||
+
|
||||
+ if (gdata->isEnhancedClassRedefinitionEnabled) {
|
||||
+ /* Update tags in jvmti to use new classes */
|
||||
+ for ( i = 0 ; i < classCount; i++ ) {
|
||||
+ /* pointer in classIds[i] is updated by advanced redefinition to a new class */
|
||||
+ error = commonRef_updateTags(env, classIds[i]);
|
||||
+ if (error != JVMTI_ERROR_NONE) {
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/commonRef.c b/src/jdk.jdwp.agent/share/native/libjdwp/commonRef.c
|
||||
index 2a8f55014d9..3f33b423209 100644
|
||||
--- a/src/jdk.jdwp.agent/share/native/libjdwp/commonRef.c
|
||||
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/commonRef.c
|
||||
@@ -618,3 +618,32 @@ commonRef_unlock(void)
|
||||
{
|
||||
debugMonitorExit(gdata->refLock);
|
||||
}
|
||||
+
|
||||
+/*
|
||||
+ * Update JVMTI tags, used from enhanced redefinition
|
||||
+ */
|
||||
+jvmtiError
|
||||
+commonRef_updateTags(JNIEnv *env, jlong id)
|
||||
+{
|
||||
+ jvmtiError error;
|
||||
+
|
||||
+ error = JVMTI_ERROR_NONE;
|
||||
+
|
||||
+ if (id == NULL_OBJECT_ID) {
|
||||
+ return error;
|
||||
+ }
|
||||
+
|
||||
+ debugMonitorEnter(gdata->refLock); {
|
||||
+ RefNode *node;
|
||||
+
|
||||
+ node = findNodeByID(env, id);
|
||||
+ if (node != NULL) {
|
||||
+ error = JVMTI_FUNC_PTR(gdata->jvmti, SetTag)
|
||||
+ (gdata->jvmti, node->ref, ptr_to_jlong(node));
|
||||
+ } else {
|
||||
+ printf("Node not found\n");
|
||||
+ }
|
||||
+ } debugMonitorExit(gdata->refLock);
|
||||
+
|
||||
+ return error;
|
||||
+}
|
||||
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/commonRef.h b/src/jdk.jdwp.agent/share/native/libjdwp/commonRef.h
|
||||
index 7c76667eb19..d7b01e62a47 100644
|
||||
--- a/src/jdk.jdwp.agent/share/native/libjdwp/commonRef.h
|
||||
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/commonRef.h
|
||||
@@ -41,4 +41,6 @@ void commonRef_compact(void);
|
||||
void commonRef_lock(void);
|
||||
void commonRef_unlock(void);
|
||||
|
||||
+jvmtiError commonRef_updateTags(JNIEnv *env, jlong id);
|
||||
+
|
||||
#endif
|
||||
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/util.c b/src/jdk.jdwp.agent/share/native/libjdwp/util.c
|
||||
index f4a1d19589d..0642c4a3d7f 100644
|
||||
--- a/src/jdk.jdwp.agent/share/native/libjdwp/util.c
|
||||
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/util.c
|
||||
@@ -41,6 +41,7 @@ BackendGlobalData *gdata = NULL;
|
||||
static jboolean isInterface(jclass clazz);
|
||||
static jboolean isArrayClass(jclass clazz);
|
||||
static char * getPropertyUTF8(JNIEnv *env, char *propertyName);
|
||||
+static jboolean isEnhancedClassRedefinitionEnabled(JNIEnv *env);
|
||||
|
||||
/* Save an object reference for use later (create a NewGlobalRef) */
|
||||
void
|
||||
@@ -281,6 +282,8 @@ util_initialize(JNIEnv *env)
|
||||
}
|
||||
}
|
||||
|
||||
+ gdata->isEnhancedClassRedefinitionEnabled = isEnhancedClassRedefinitionEnabled(env);
|
||||
+
|
||||
} END_WITH_LOCAL_REFS(env);
|
||||
|
||||
}
|
||||
@@ -1739,6 +1742,36 @@ getPropertyUTF8(JNIEnv *env, char *propertyName)
|
||||
return value;
|
||||
}
|
||||
|
||||
+static jboolean
|
||||
+isEnhancedClassRedefinitionEnabled(JNIEnv *env)
|
||||
+{
|
||||
+ jvmtiError error;
|
||||
+ jint count, i;
|
||||
+ jvmtiExtensionFunctionInfo* ext_funcs;
|
||||
+
|
||||
+ error = JVMTI_FUNC_PTR(gdata->jvmti,GetExtensionFunctions)
|
||||
+ (gdata->jvmti, &count, &ext_funcs);
|
||||
+ if (error != JVMTI_ERROR_NONE) {
|
||||
+ return JNI_FALSE;
|
||||
+ }
|
||||
+
|
||||
+ for (i=0; i<count; i++) {
|
||||
+ if (strcmp(ext_funcs[i].id, (char*)"com.sun.hotspot.functions.IsEnhancedClassRedefinitionEnabled") == 0) {
|
||||
+ jboolean enabled;
|
||||
+ error = (*ext_funcs[i].func)(gdata->jvmti, &enabled);
|
||||
+
|
||||
+ if (error != JVMTI_ERROR_NONE) {
|
||||
+ return JNI_FALSE;
|
||||
+ } else {
|
||||
+ return enabled;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return JNI_FALSE;
|
||||
+}
|
||||
+
|
||||
+
|
||||
jboolean
|
||||
isMethodObsolete(jmethodID method)
|
||||
{
|
||||
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/util.h b/src/jdk.jdwp.agent/share/native/libjdwp/util.h
|
||||
index bcb59457120..72a365ad3c3 100644
|
||||
--- a/src/jdk.jdwp.agent/share/native/libjdwp/util.h
|
||||
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/util.h
|
||||
@@ -126,6 +126,9 @@ typedef struct {
|
||||
int objectsByIDsize;
|
||||
int objectsByIDcount;
|
||||
|
||||
+ /* true if enhanced class redefinition is enabled */
|
||||
+ jboolean isEnhancedClassRedefinitionEnabled;
|
||||
+
|
||||
/* Indication that the agent has been loaded */
|
||||
jboolean isLoaded;
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
From 14005f6176420c16fa1d152c78a3dacd26ecb647 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 11 Apr 2020 12:07:43 +0200
|
||||
Subject: [PATCH 29/50] cleanup direct method handles code
|
||||
|
||||
---
|
||||
src/hotspot/share/classfile/javaClasses.hpp | 10 ++++------
|
||||
src/hotspot/share/classfile/javaClasses.inline.hpp | 8 ++++++++
|
||||
2 files changed, 12 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/javaClasses.hpp b/src/hotspot/share/classfile/javaClasses.hpp
|
||||
index 55f9fa62e2b..da004d1b307 100644
|
||||
--- a/src/hotspot/share/classfile/javaClasses.hpp
|
||||
+++ b/src/hotspot/share/classfile/javaClasses.hpp
|
||||
@@ -1076,9 +1076,8 @@ class java_lang_invoke_DirectMethodHandle_StaticAccessor: AllStatic {
|
||||
static bool is_subclass(Klass* klass) {
|
||||
return klass->is_subclass_of(SystemDictionary::DirectMethodHandle_StaticAccessor_klass());
|
||||
}
|
||||
- static bool is_instance(oop obj) {
|
||||
- return obj != NULL && is_subclass(obj->klass());
|
||||
- }
|
||||
+ static bool is_instance(oop obj);
|
||||
+
|
||||
static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
|
||||
};
|
||||
|
||||
@@ -1101,9 +1100,8 @@ class java_lang_invoke_DirectMethodHandle_Accessor: AllStatic {
|
||||
static bool is_subclass(Klass* klass) {
|
||||
return klass->is_subclass_of(SystemDictionary::DirectMethodHandle_Accessor_klass());
|
||||
}
|
||||
- static bool is_instance(oop obj) {
|
||||
- return obj != NULL && is_subclass(obj->klass());
|
||||
- }
|
||||
+ static bool is_instance(oop obj);
|
||||
+
|
||||
static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
|
||||
};
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/javaClasses.inline.hpp b/src/hotspot/share/classfile/javaClasses.inline.hpp
|
||||
index 6c5787f4b70..ba9cffa8c62 100644
|
||||
--- a/src/hotspot/share/classfile/javaClasses.inline.hpp
|
||||
+++ b/src/hotspot/share/classfile/javaClasses.inline.hpp
|
||||
@@ -175,6 +175,14 @@ inline bool java_lang_invoke_DirectMethodHandle::is_instance(oop obj) {
|
||||
return obj != NULL && is_subclass(obj->klass());
|
||||
}
|
||||
|
||||
+inline bool java_lang_invoke_DirectMethodHandle_StaticAccessor::is_instance(oop obj) {
|
||||
+ return obj != NULL && is_subclass(obj->klass());
|
||||
+}
|
||||
+
|
||||
+inline bool java_lang_invoke_DirectMethodHandle_Accessor::is_instance(oop obj) {
|
||||
+ return obj != NULL && is_subclass(obj->klass());
|
||||
+}
|
||||
+
|
||||
inline bool java_lang_Module::is_instance(oop obj) {
|
||||
return obj != NULL && obj->klass() == SystemDictionary::Module_klass();
|
||||
}
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
From 990ffe4111fe73c3a183f8d35402cbf9e81bd587 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 11 Apr 2020 17:52:13 +0200
|
||||
Subject: [PATCH 30/50] Add init_implementor_from_redefine, that skips compiler
|
||||
lock assert
|
||||
|
||||
---
|
||||
src/hotspot/share/oops/instanceKlass.cpp | 10 +++++++++-
|
||||
src/hotspot/share/oops/instanceKlass.hpp | 1 +
|
||||
.../share/prims/jvmtiEnhancedRedefineClasses.cpp | 2 +-
|
||||
3 files changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
index 8cbd4b8edf2..c04bdf5abfc 100644
|
||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
@@ -789,7 +789,7 @@ bool InstanceKlass::link_class_impl(bool throw_verifyerror, TRAPS) {
|
||||
if (!is_linked()) {
|
||||
if (!is_rewritten()) {
|
||||
// In cases, if class A is being redefined and class B->A (B is extended from A) and B is host class of anonymous class C
|
||||
- // then second redefinition fails with cannot cast klass exception. So we currently turn off bytecode verification
|
||||
+ // then second redefinition fails with cannot cast klass exception. So we currently turn off bytecode verification
|
||||
// on redefinition.
|
||||
if (!newest_version()->is_redefining()) {
|
||||
bool verify_ok = verify_code(throw_verifyerror, THREAD);
|
||||
@@ -1139,6 +1139,14 @@ void InstanceKlass::init_implementor() {
|
||||
}
|
||||
}
|
||||
|
||||
+void InstanceKlass::init_implementor_from_redefine() {
|
||||
+ assert(is_interface(), "not interface");
|
||||
+ Klass** addr = adr_implementor();
|
||||
+ assert(addr != NULL, "null addr");
|
||||
+ if (addr != NULL) {
|
||||
+ *addr = NULL;
|
||||
+ }
|
||||
+}
|
||||
|
||||
void InstanceKlass::process_interfaces(Thread *thread) {
|
||||
// link this class into the implementors list of every interface it implements
|
||||
diff --git a/src/hotspot/share/oops/instanceKlass.hpp b/src/hotspot/share/oops/instanceKlass.hpp
|
||||
index 2cc98b636f1..e8107a39813 100644
|
||||
--- a/src/hotspot/share/oops/instanceKlass.hpp
|
||||
+++ b/src/hotspot/share/oops/instanceKlass.hpp
|
||||
@@ -1020,6 +1020,7 @@ public:
|
||||
int nof_implementors() const;
|
||||
void add_implementor(Klass* k); // k is a new class that implements this interface
|
||||
void init_implementor(); // initialize
|
||||
+ void init_implementor_from_redefine(); // initialize
|
||||
|
||||
// link this class into the implementors list of every interface it implements
|
||||
void process_interfaces(Thread *thread);
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index f6d2d3a40fe..aac9ba0911f 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -1416,7 +1416,7 @@ void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
|
||||
Klass* implKlass = ik->implementor();
|
||||
if (implKlass != NULL && implKlass != ik && implKlass->new_version() != NULL) {
|
||||
InstanceKlass* newest_impl = InstanceKlass::cast(implKlass->newest_version());
|
||||
- ik->init_implementor();
|
||||
+ ik->init_implementor_from_redefine();
|
||||
if (newest_impl->implements_interface(ik)) {
|
||||
ik->add_implementor(newest_impl);
|
||||
}
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
From d7ea3b028367ca5ac2b622a2282bb4e468442e4b Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
||||
Date: Mon, 11 Oct 2021 20:22:26 +0200
|
||||
Subject: [PATCH 30/33] JBR-3867 - fix msvc compilation issue with non const
|
||||
array on stack
|
||||
|
||||
---
|
||||
.../share/native/libjdwp/VirtualMachineImpl.c | 14 ++++++++++----
|
||||
1 file changed, 10 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c b/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c
|
||||
index faa8f55f91f..53f7e44f579 100644
|
||||
--- a/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c
|
||||
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/VirtualMachineImpl.c
|
||||
@@ -475,11 +475,16 @@ redefineClasses(PacketInputStream *in, PacketOutputStream *out)
|
||||
if (ok == JNI_TRUE) {
|
||||
jvmtiError error;
|
||||
|
||||
- jlong classIds[classCount];
|
||||
+ jlong* classIds = NULL;
|
||||
|
||||
if (gdata->isEnhancedClassRedefinitionEnabled) {
|
||||
- for (i = 0; i < classCount; ++i) {
|
||||
- classIds[i] = commonRef_refToID(env, classDefs[i].klass);
|
||||
+ classIds = jvmtiAllocate(classCount*(int)sizeof(jlong));
|
||||
+ if (classIds == NULL) {
|
||||
+ outStream_setError(out, JDWP_ERROR(OUT_OF_MEMORY));
|
||||
+ return JNI_TRUE;
|
||||
+ }
|
||||
+ for (i = 0; i < classCount; i++) {
|
||||
+ classIds[i] = commonRef_refToID(env, classDefs[i].klass);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,7 +498,7 @@ redefineClasses(PacketInputStream *in, PacketOutputStream *out)
|
||||
eventHandler_freeClassBreakpoints(classDefs[i].klass);
|
||||
}
|
||||
|
||||
- if (gdata->isEnhancedClassRedefinitionEnabled) {
|
||||
+ if (gdata->isEnhancedClassRedefinitionEnabled && classIds != NULL) {
|
||||
/* Update tags in jvmti to use new classes */
|
||||
for ( i = 0 ; i < classCount; i++ ) {
|
||||
/* pointer in classIds[i] is updated by advanced redefinition to a new class */
|
||||
@@ -502,6 +507,7 @@ redefineClasses(PacketInputStream *in, PacketOutputStream *out)
|
||||
break;
|
||||
}
|
||||
}
|
||||
+ jvmtiDeallocate((void*) classIds);
|
||||
}
|
||||
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From 6dc05f05716854367e229d72d5fa03f8f7d0739d Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
||||
Date: Tue, 19 Oct 2021 17:02:35 +0200
|
||||
Subject: [PATCH 31/33] Attempt to fix JBR-3887
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiExtensions.cpp | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiExtensions.cpp b/src/hotspot/share/prims/jvmtiExtensions.cpp
|
||||
index 8a6058fd884..9c8c98cb70e 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiExtensions.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiExtensions.cpp
|
||||
@@ -50,7 +50,13 @@ static jvmtiError JNICALL IsClassUnloadingEnabled(const jvmtiEnv* env, ...) {
|
||||
}
|
||||
|
||||
// extension function
|
||||
-static jvmtiError JNICALL IsEnhancedClassRedefinitionEnabled(const jvmtiEnv* env, jboolean* enabled, ...) {
|
||||
+static jvmtiError JNICALL IsEnhancedClassRedefinitionEnabled(const jvmtiEnv* env, ...) {
|
||||
+ jboolean* enabled = NULL;
|
||||
+ va_list ap;
|
||||
+
|
||||
+ va_start(ap, env);
|
||||
+ enabled = va_arg(ap, jboolean *);
|
||||
+ va_end(ap);
|
||||
if (enabled == NULL) {
|
||||
return JVMTI_ERROR_NULL_POINTER;
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
From 9dcddc7c2573c34579161e3ad1240b029dda1e96 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Mon, 13 Apr 2020 20:59:35 +0200
|
||||
Subject: [PATCH 31/50] not nullable oop_store_not_null() method+handle NULL in
|
||||
mem_name in dmh
|
||||
|
||||
---
|
||||
.../share/prims/jvmtiEnhancedRedefineClasses.cpp | 16 ++++++++++------
|
||||
1 file changed, 10 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index aac9ba0911f..8d861ef43c9 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -225,13 +225,15 @@ void VM_EnhancedRedefineClasses::mark_as_scavengable(nmethod* nm) {
|
||||
// TODO comment
|
||||
struct StoreBarrier {
|
||||
// TODO: j10 review change ::oop_store -> HeapAccess<>::oop_store
|
||||
- template <class T> static void oop_store(T* p, oop v) { HeapAccess<>::oop_store(p, v); }
|
||||
+ template <class T> static void oop_store_not_null(T* p, oop v) { HeapAccess<IS_NOT_NULL>::oop_store(p, v); }
|
||||
+ template <class T> static void oop_store(T* p) { HeapAccess<>::oop_store(p, oop(NULL)); }
|
||||
};
|
||||
|
||||
|
||||
// TODO comment
|
||||
struct StoreNoBarrier {
|
||||
- template <class T> static void oop_store(T* p, oop v) { RawAccess<IS_NOT_NULL>::oop_store(p, v); }
|
||||
+ template <class T> static void oop_store_not_null(T* p, oop v) { RawAccess<IS_NOT_NULL>::oop_store(p, v); }
|
||||
+ template <class T> static void oop_store(T* p) { RawAccess<>::oop_store(p, oop(NULL)); }
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -309,6 +311,9 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
bool update_direct_method_handle(oop obj) {
|
||||
// Always update member name first.
|
||||
oop mem_name = java_lang_invoke_DirectMethodHandle::member(obj);
|
||||
+ if (mem_name == NULL) {
|
||||
+ return true;
|
||||
+ }
|
||||
if (!update_member_name(mem_name)) {
|
||||
return false;
|
||||
}
|
||||
@@ -347,7 +352,7 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
assert(obj == InstanceKlass::cast(klass)->java_mirror(), "just checking");
|
||||
if (klass->new_version() != NULL) {
|
||||
obj = InstanceKlass::cast(klass->new_version())->java_mirror();
|
||||
- S::oop_store(p, obj);
|
||||
+ S::oop_store_not_null(p, obj);
|
||||
oop_updated = true;
|
||||
}
|
||||
}
|
||||
@@ -363,7 +368,7 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
if (!update_direct_method_handle(obj)) {
|
||||
// DMH is no longer valid, replace it with null reference.
|
||||
// See note above. We probably want to replace this with something more meaningful.
|
||||
- S::oop_store(p, NULL);
|
||||
+ S::oop_store(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1430,8 +1435,7 @@ void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
|
||||
// Constant pool entry points to redefined class -- update to the new version
|
||||
other_cp->klass_at_put(i, klass->newest_version());
|
||||
}
|
||||
- klass = other_cp->resolved_klass_at(i);
|
||||
- assert(klass->new_version() == NULL, "Must be new klass!");
|
||||
+ assert(other_cp->resolved_klass_at(i)->new_version() == NULL, "Must be new klass!");
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
From 256af0b88776c1ba2afdae760d3220ef48a644aa Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
||||
Date: Mon, 1 Nov 2021 19:00:41 +0100
|
||||
Subject: [PATCH 32/33] JBR-3937 Fix crashes in C1/C2 compilers
|
||||
|
||||
There is a race condition in enhanced redefinition with C1/C2. Therefore
|
||||
the patch stops C1/C2 compilation before redefinition and release after
|
||||
redefinition finishing. There is no performance impact since dcevm
|
||||
flushes all code cache.
|
||||
---
|
||||
src/hotspot/share/compiler/compileBroker.cpp | 39 +++++++++++++++++++-
|
||||
src/hotspot/share/compiler/compileBroker.hpp | 6 +++
|
||||
src/hotspot/share/prims/jvmtiEnv.cpp | 7 ++++
|
||||
3 files changed, 51 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/compiler/compileBroker.cpp b/src/hotspot/share/compiler/compileBroker.cpp
|
||||
index 5ec54baec96..a72560069e4 100644
|
||||
--- a/src/hotspot/share/compiler/compileBroker.cpp
|
||||
+++ b/src/hotspot/share/compiler/compileBroker.cpp
|
||||
@@ -133,6 +133,8 @@ CompileLog** CompileBroker::_compiler2_logs = NULL;
|
||||
// These counters are used to assign an unique ID to each compilation.
|
||||
volatile jint CompileBroker::_compilation_id = 0;
|
||||
volatile jint CompileBroker::_osr_compilation_id = 0;
|
||||
+volatile bool CompileBroker::_compilation_stopped = false;
|
||||
+volatile int CompileBroker::_active_compilations = 0;
|
||||
|
||||
// Debugging information
|
||||
int CompileBroker::_last_compile_type = no_compile;
|
||||
@@ -2203,7 +2205,22 @@ void CompileBroker::invoke_compiler_on_method(CompileTask* task) {
|
||||
locker.wait(Mutex::_no_safepoint_check_flag);
|
||||
}
|
||||
}
|
||||
- comp->compile_method(&ci_env, target, osr_bci, directive);
|
||||
+
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ {
|
||||
+ MonitorLockerEx locker(Compilation_lock, Mutex::_no_safepoint_check_flag);
|
||||
+ while (_compilation_stopped) {
|
||||
+ locker.wait(Mutex::_no_safepoint_check_flag);
|
||||
+ }
|
||||
+ Atomic::add(1, &_active_compilations);
|
||||
+ }
|
||||
+
|
||||
+ comp->compile_method(&ci_env, target, osr_bci, directive);
|
||||
+ Atomic::sub(1, &_active_compilations);
|
||||
+
|
||||
+ } else {
|
||||
+ comp->compile_method(&ci_env, target, osr_bci, directive);
|
||||
+ }
|
||||
}
|
||||
|
||||
if (!ci_env.failing() && task->code() == NULL) {
|
||||
@@ -2865,3 +2882,23 @@ void CompileBroker::print_heapinfo(outputStream* out, const char* function, size
|
||||
}
|
||||
out->print_cr("\n__ CodeHeapStateAnalytics total duration %10.3f seconds _________\n", ts_total.seconds());
|
||||
}
|
||||
+
|
||||
+void CompileBroker::stopCompilationBeforeEnhancedRedefinition() {
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ MonitorLockerEx locker(Compilation_lock, Mutex::_no_safepoint_check_flag);
|
||||
+ _compilation_stopped = true;
|
||||
+ while (_active_compilations > 0) {
|
||||
+ VM_ThreadsSuspendJVMTI tsj;
|
||||
+ VMThread::execute(&tsj);
|
||||
+ locker.wait(Mutex::_no_safepoint_check_flag);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void CompileBroker::releaseCompilationAfterEnhancedRedefinition() {
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ MonitorLockerEx locker(Compilation_lock, Mutex::_no_safepoint_check_flag);
|
||||
+ _compilation_stopped = false;
|
||||
+ locker.notify_all();
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/hotspot/share/compiler/compileBroker.hpp b/src/hotspot/share/compiler/compileBroker.hpp
|
||||
index 53e496cd306..fa50e778d9e 100644
|
||||
--- a/src/hotspot/share/compiler/compileBroker.hpp
|
||||
+++ b/src/hotspot/share/compiler/compileBroker.hpp
|
||||
@@ -173,6 +173,9 @@ class CompileBroker: AllStatic {
|
||||
static volatile jint _compilation_id;
|
||||
static volatile jint _osr_compilation_id;
|
||||
|
||||
+ static volatile bool _compilation_stopped;
|
||||
+ static volatile int _active_compilations;
|
||||
+
|
||||
static int _last_compile_type;
|
||||
static int _last_compile_level;
|
||||
static char _last_method_compiled[name_buffer_length];
|
||||
@@ -421,6 +424,9 @@ public:
|
||||
// CodeHeap State Analytics.
|
||||
static void print_info(outputStream *out);
|
||||
static void print_heapinfo(outputStream *out, const char* function, size_t granularity);
|
||||
+
|
||||
+ static void stopCompilationBeforeEnhancedRedefinition();
|
||||
+ static void releaseCompilationAfterEnhancedRedefinition();
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_COMPILER_COMPILEBROKER_HPP
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnv.cpp b/src/hotspot/share/prims/jvmtiEnv.cpp
|
||||
index 54617f05b5a..0ca9ec020a9 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnv.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnv.cpp
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "classfile/modules.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
+#include "compiler/compileBroker.hpp"
|
||||
#include "interpreter/bytecodeStream.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "jvmtifiles/jvmtiEnv.hpp"
|
||||
@@ -453,9 +454,12 @@ JvmtiEnv::RetransformClasses(jint class_count, const jclass* classes) {
|
||||
class_definitions[index].klass = jcls;
|
||||
}
|
||||
if (AllowEnhancedClassRedefinition) {
|
||||
+ // Stop compilation to avoid compilator race condition (crashes) with advanced redefinition
|
||||
+ CompileBroker::stopCompilationBeforeEnhancedRedefinition();
|
||||
MutexLocker sd_mutex(EnhancedRedefineClasses_lock);
|
||||
VM_EnhancedRedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_retransform);
|
||||
VMThread::execute(&op);
|
||||
+ CompileBroker::releaseCompilationAfterEnhancedRedefinition();
|
||||
return (op.check_error());
|
||||
}
|
||||
VM_RedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_retransform);
|
||||
@@ -469,9 +473,12 @@ JvmtiEnv::RetransformClasses(jint class_count, const jclass* classes) {
|
||||
jvmtiError
|
||||
JvmtiEnv::RedefineClasses(jint class_count, const jvmtiClassDefinition* class_definitions) {
|
||||
if (AllowEnhancedClassRedefinition) {
|
||||
+ // Stop compilation to avoid compilator race condition (crashes) with advanced redefinition
|
||||
+ CompileBroker::stopCompilationBeforeEnhancedRedefinition();
|
||||
MutexLocker sd_mutex(EnhancedRedefineClasses_lock);
|
||||
VM_EnhancedRedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_redefine);
|
||||
VMThread::execute(&op);
|
||||
+ CompileBroker::releaseCompilationAfterEnhancedRedefinition();
|
||||
return (op.check_error());
|
||||
}
|
||||
VM_RedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_redefine);
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
From 81d93376d08058144aa5b2ecf6744d607c516e88 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
||||
Date: Tue, 2 Nov 2021 01:20:13 +0700
|
||||
Subject: [PATCH 33/33] JBR-3938 - fix race condition in anonymous class
|
||||
loading
|
||||
|
||||
Anonymous class must be checked if it is fully initialized if it is used
|
||||
in ClassLoaderDataGraph closure.
|
||||
---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 44 ++++++-------------
|
||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 1 -
|
||||
2 files changed, 14 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 745109902af..1e63561064a 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -517,8 +517,6 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
|
||||
|
||||
|
||||
- // SystemDictionary::methods_do(fix_invoke_method);
|
||||
-
|
||||
// JSR-292 support
|
||||
if (_any_class_has_resolved_methods) {
|
||||
bool trace_name_printed = false;
|
||||
@@ -647,10 +645,6 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
// TODO: explain...
|
||||
ciObjectFactory::resort_shared_ci_metadata();
|
||||
|
||||
- // FIXME - check if it was in JDK8. Copied from standard JDK9 hotswap.
|
||||
- //MethodDataCleaner clean_weak_method_links;
|
||||
- //ClassLoaderDataGraph::classes_do(&clean_weak_method_links);
|
||||
-
|
||||
// Disable any dependent concurrent compilations
|
||||
SystemDictionary::notice_modification();
|
||||
|
||||
@@ -1568,29 +1562,6 @@ void VM_EnhancedRedefineClasses::MethodDataCleaner::do_klass(Klass* k) {
|
||||
}
|
||||
}
|
||||
|
||||
-void VM_EnhancedRedefineClasses::fix_invoke_method(Method* method) {
|
||||
-
|
||||
- constantPoolHandle other_cp = constantPoolHandle(method->constants());
|
||||
-
|
||||
- for (int i = 0; i < other_cp->length(); i++) {
|
||||
- if (other_cp->tag_at(i).is_klass()) {
|
||||
- Klass* klass = other_cp->resolved_klass_at(i);
|
||||
- if (klass->new_version() != NULL) {
|
||||
- // Constant pool entry points to redefined class -- update to the new version
|
||||
- other_cp->klass_at_put(i, klass->newest_version());
|
||||
- }
|
||||
- assert(other_cp->resolved_klass_at(i)->new_version() == NULL, "Must be new klass!");
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- ConstantPoolCache* cp_cache = other_cp->cache();
|
||||
- if (cp_cache != NULL) {
|
||||
- cp_cache->clear_entries();
|
||||
- }
|
||||
-
|
||||
-}
|
||||
-
|
||||
-
|
||||
|
||||
void VM_EnhancedRedefineClasses::update_jmethod_ids() {
|
||||
for (int j = 0; j < _matching_methods_length; ++j) {
|
||||
@@ -2071,12 +2042,23 @@ void VM_EnhancedRedefineClasses::dump_methods() {
|
||||
class AffectedKlassClosure : public KlassClosure {
|
||||
private:
|
||||
GrowableArray<Klass*>* _affected_klasses;
|
||||
+ bool _is_anonymous;
|
||||
public:
|
||||
- AffectedKlassClosure(GrowableArray<Klass*>* affected_klasses) : _affected_klasses(affected_klasses) {}
|
||||
+ AffectedKlassClosure(GrowableArray<Klass*>* affected_klasses) : _affected_klasses(affected_klasses), _is_anonymous(false) {}
|
||||
+
|
||||
+ bool is_anonymous() { return _is_anonymous; }
|
||||
+ void set_anonymous(bool value) { _is_anonymous = value; }
|
||||
|
||||
void do_klass(Klass* klass) {
|
||||
assert(!_affected_klasses->contains(klass), "must not occur more than once!");
|
||||
|
||||
+ if (_is_anonymous && klass->is_instance_klass()) {
|
||||
+ InstanceKlass *ik = InstanceKlass::cast(klass);
|
||||
+ if (ik->is_not_initialized()) {
|
||||
+ return; // anonymous class does not need to be initialized
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (klass->new_version() != NULL) {
|
||||
return;
|
||||
}
|
||||
@@ -2135,11 +2117,13 @@ jvmtiError VM_EnhancedRedefineClasses::find_sorted_affected_classes(TRAPS) {
|
||||
// ClassLoaderDataGraph::classes_do(&closure);
|
||||
|
||||
// 1. Scan over dictionaries
|
||||
+ closure.set_anonymous(false);
|
||||
ClassLoaderDataGraph::dictionary_classes_do(&closure);
|
||||
|
||||
// 2. Anonymous class is not in dictionary, we have to iterate anonymous cld directly, but there is race cond...
|
||||
// TODO: review ... anonymous class is added to cld before InstanceKlass initialization,
|
||||
// find out how to check if the InstanceKlass is initialized
|
||||
+ closure.set_anonymous(true);
|
||||
ClassLoaderDataGraph::anonymous_classes_do(&closure);
|
||||
|
||||
log_trace(redefine, class, load)("%d classes affected", _affected_klasses->length());
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index 8c47baa8a74..c69325ca4ab 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -119,7 +119,6 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
static void unregister_nmethod_g1(nmethod* nm);
|
||||
static void register_nmethod_g1(nmethod* nm);
|
||||
static void unpatch_bytecode(Method* method);
|
||||
- static void fix_invoke_method(Method* method);
|
||||
|
||||
// Figure out which new methods match old methods in name and signature,
|
||||
// which methods have been added, and which are no longer present
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From e009b4fcc48e9719b5b896f7f3838fbc7c579ba7 Mon Sep 17 00:00:00 2001
|
||||
From: Artem Khvastunov <artem.khvastunov@jetbrains.com>
|
||||
Date: Sun, 19 Apr 2020 11:36:12 +0200
|
||||
Subject: [PATCH 33/50] migrate DCEVM to 11.0.7
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index 2d114635ee5..6cabdca9c27 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "oops/objArrayKlass.hpp"
|
||||
#include "oops/objArrayOop.hpp"
|
||||
-#include "runtime/vm_operations.hpp"
|
||||
+#include "runtime/vmOperations.hpp"
|
||||
#include "gc/shared/vmGCOperations.hpp"
|
||||
#include "../../../java.base/unix/native/include/jni_md.h"
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
From 5653e2a5f05a9693f934b0f9c4d9286c01576807 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 8 May 2020 21:07:50 +0200
|
||||
Subject: [PATCH 34/50] Fix 11.0.7 compilation issues
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index 6cabdca9c27..ed44f0e27ce 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -16,6 +16,8 @@
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
+ *
|
||||
+ *
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
@@ -30,7 +32,6 @@
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "oops/objArrayKlass.hpp"
|
||||
#include "oops/objArrayOop.hpp"
|
||||
-#include "runtime/vmOperations.hpp"
|
||||
#include "gc/shared/vmGCOperations.hpp"
|
||||
#include "../../../java.base/unix/native/include/jni_md.h"
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
From 0b9b021f889ec001d579d192f1bd9a7a43f63871 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 9 May 2020 10:08:17 +0200
|
||||
Subject: [PATCH 35/50] Use INCLUDE_CDS condition on "UseSharedSpaces" block
|
||||
from master
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 8d861ef43c9..660bf3a2e97 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -467,6 +467,7 @@ public:
|
||||
void VM_EnhancedRedefineClasses::doit() {
|
||||
Thread *thread = Thread::current();
|
||||
|
||||
+#if INCLUDE_CDS
|
||||
if (UseSharedSpaces) {
|
||||
// Sharing is enabled so we remap the shared readonly space to
|
||||
// shared readwrite, private just in case we need to redefine
|
||||
@@ -478,6 +479,7 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
// Mark methods seen on stack and everywhere else so old methods are not
|
||||
// cleaned up if they're on the stack.
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
From 9f4b84339b55187b742682bd84fdb0e6e121917c Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 16 May 2020 15:11:40 +0200
|
||||
Subject: [PATCH 36/50] Access com.sun.beans.util - HotswapAgent patch
|
||||
|
||||
---
|
||||
src/hotspot/share/runtime/arguments.cpp | 2 ++
|
||||
.../sun/beans/introspect/package-info.java | 26 +++++++++++++++++++
|
||||
.../classes/com/sun/beans/package-info.java | 26 +++++++++++++++++++
|
||||
.../com/sun/beans/util/package-info.java | 26 +++++++++++++++++++
|
||||
.../share/classes/module-info.java | 3 +++
|
||||
5 files changed, 83 insertions(+)
|
||||
create mode 100644 src/java.desktop/share/classes/com/sun/beans/introspect/package-info.java
|
||||
create mode 100644 src/java.desktop/share/classes/com/sun/beans/package-info.java
|
||||
create mode 100644 src/java.desktop/share/classes/com/sun/beans/util/package-info.java
|
||||
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index 0cdd8c88315..72580b384dd 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -4333,5 +4333,7 @@ void Arguments::setup_hotswap_agent() {
|
||||
create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans=ALL-UNNAMED", addopens_count++);
|
||||
// com.sun.beans.introspect.ClassInfo access
|
||||
create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans.introspect=ALL-UNNAMED", addopens_count++);
|
||||
+ // com.sun.beans.introspect.util.Cache access
|
||||
+ create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans.util=ALL-UNNAMED", addopens_count++);
|
||||
|
||||
}
|
||||
diff --git a/src/java.desktop/share/classes/com/sun/beans/introspect/package-info.java b/src/java.desktop/share/classes/com/sun/beans/introspect/package-info.java
|
||||
new file mode 100644
|
||||
index 00000000000..6636e4dd62a
|
||||
--- /dev/null
|
||||
+++ b/src/java.desktop/share/classes/com/sun/beans/introspect/package-info.java
|
||||
@@ -0,0 +1,26 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
+ *
|
||||
+ * This code is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License version 2 only, as
|
||||
+ * published by the Free Software Foundation. Oracle designates this
|
||||
+ * particular file as subject to the "Classpath" exception as provided
|
||||
+ * by Oracle in the LICENSE file that accompanied this code.
|
||||
+ *
|
||||
+ * This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
+ * version 2 for more details (a copy is included in the LICENSE file that
|
||||
+ * accompanied this code).
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License version
|
||||
+ * 2 along with this work; if not, write to the Free Software Foundation,
|
||||
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+ *
|
||||
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
+ * or visit www.oracle.com if you need additional information or have any
|
||||
+ * questions.
|
||||
+ */
|
||||
+
|
||||
+package com.sun.beans.introspect;
|
||||
diff --git a/src/java.desktop/share/classes/com/sun/beans/package-info.java b/src/java.desktop/share/classes/com/sun/beans/package-info.java
|
||||
new file mode 100644
|
||||
index 00000000000..5c097eeaa53
|
||||
--- /dev/null
|
||||
+++ b/src/java.desktop/share/classes/com/sun/beans/package-info.java
|
||||
@@ -0,0 +1,26 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
+ *
|
||||
+ * This code is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License version 2 only, as
|
||||
+ * published by the Free Software Foundation. Oracle designates this
|
||||
+ * particular file as subject to the "Classpath" exception as provided
|
||||
+ * by Oracle in the LICENSE file that accompanied this code.
|
||||
+ *
|
||||
+ * This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
+ * version 2 for more details (a copy is included in the LICENSE file that
|
||||
+ * accompanied this code).
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License version
|
||||
+ * 2 along with this work; if not, write to the Free Software Foundation,
|
||||
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+ *
|
||||
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
+ * or visit www.oracle.com if you need additional information or have any
|
||||
+ * questions.
|
||||
+ */
|
||||
+
|
||||
+package com.sun.beans;
|
||||
diff --git a/src/java.desktop/share/classes/com/sun/beans/util/package-info.java b/src/java.desktop/share/classes/com/sun/beans/util/package-info.java
|
||||
new file mode 100644
|
||||
index 00000000000..2d5d735ffa8
|
||||
--- /dev/null
|
||||
+++ b/src/java.desktop/share/classes/com/sun/beans/util/package-info.java
|
||||
@@ -0,0 +1,26 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
+ *
|
||||
+ * This code is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License version 2 only, as
|
||||
+ * published by the Free Software Foundation. Oracle designates this
|
||||
+ * particular file as subject to the "Classpath" exception as provided
|
||||
+ * by Oracle in the LICENSE file that accompanied this code.
|
||||
+ *
|
||||
+ * This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
+ * version 2 for more details (a copy is included in the LICENSE file that
|
||||
+ * accompanied this code).
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License version
|
||||
+ * 2 along with this work; if not, write to the Free Software Foundation,
|
||||
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+ *
|
||||
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
+ * or visit www.oracle.com if you need additional information or have any
|
||||
+ * questions.
|
||||
+ */
|
||||
+
|
||||
+package com.sun.beans.util;
|
||||
diff --git a/src/java.desktop/share/classes/module-info.java b/src/java.desktop/share/classes/module-info.java
|
||||
index f9cf021311f..e61ba7572cf 100644
|
||||
--- a/src/java.desktop/share/classes/module-info.java
|
||||
+++ b/src/java.desktop/share/classes/module-info.java
|
||||
@@ -104,6 +104,9 @@ module java.desktop {
|
||||
exports javax.swing.text.rtf;
|
||||
exports javax.swing.tree;
|
||||
exports javax.swing.undo;
|
||||
+ exports com.sun.beans;
|
||||
+ exports com.sun.beans.introspect;
|
||||
+ exports com.sun.beans.util;
|
||||
|
||||
// qualified exports may be inserted at build time
|
||||
// see make/GensrcModuleInfo.gmk
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
From 9a662b1367860920095efe79116ef9a2d53fc2c6 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 17 May 2020 12:19:18 +0200
|
||||
Subject: [PATCH 37/50] Skip verifier only in AllowEnhancedClassRedefinition
|
||||
|
||||
---
|
||||
src/hotspot/share/oops/instanceKlass.cpp | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
index c04bdf5abfc..e14aaee21c4 100644
|
||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
@@ -788,10 +788,10 @@ bool InstanceKlass::link_class_impl(bool throw_verifyerror, TRAPS) {
|
||||
|
||||
if (!is_linked()) {
|
||||
if (!is_rewritten()) {
|
||||
- // In cases, if class A is being redefined and class B->A (B is extended from A) and B is host class of anonymous class C
|
||||
+ // (DCEVM): If class A is being redefined and class B->A (B is extended from A) and B is host class of anonymous class C
|
||||
// then second redefinition fails with cannot cast klass exception. So we currently turn off bytecode verification
|
||||
// on redefinition.
|
||||
- if (!newest_version()->is_redefining()) {
|
||||
+ if (!AllowEnhancedClassRedefinition || !newest_version()->is_redefining()) {
|
||||
bool verify_ok = verify_code(throw_verifyerror, THREAD);
|
||||
if (!verify_ok) {
|
||||
return false;
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
From a58ed678218bfb80af164cfe98cdf4a3ab74a682 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 17 May 2020 18:18:52 +0200
|
||||
Subject: [PATCH 38/50] Use original code for adjust_method_entries in standard
|
||||
redefinition
|
||||
|
||||
---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 2 +-
|
||||
.../share/prims/resolvedMethodTable.cpp | 46 ++++++++++++++++++-
|
||||
.../share/prims/resolvedMethodTable.hpp | 1 +
|
||||
3 files changed, 47 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 660bf3a2e97..0ca675e8ee6 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -506,7 +506,7 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
// JSR-292 support
|
||||
if (_any_class_has_resolved_methods) {
|
||||
bool trace_name_printed = false;
|
||||
- ResolvedMethodTable::adjust_method_entries(&trace_name_printed);
|
||||
+ ResolvedMethodTable::adjust_method_entries_dcevm(&trace_name_printed);
|
||||
}
|
||||
|
||||
ChangePointersOopClosure<StoreNoBarrier> oopClosureNoBarrier;
|
||||
diff --git a/src/hotspot/share/prims/resolvedMethodTable.cpp b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
index a9057893368..af2ec48c2e1 100644
|
||||
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
@@ -197,8 +197,52 @@ void ResolvedMethodTable::print() {
|
||||
#endif // PRODUCT
|
||||
|
||||
#if INCLUDE_JVMTI
|
||||
-// It is called at safepoint only for RedefineClasses
|
||||
+
|
||||
void ResolvedMethodTable::adjust_method_entries(bool * trace_name_printed) {
|
||||
+ assert(SafepointSynchronize::is_at_safepoint(), "only called at safepoint");
|
||||
+ // For each entry in RMT, change to new method
|
||||
+ for (int i = 0; i < _the_table->table_size(); ++i) {
|
||||
+ for (ResolvedMethodEntry* entry = _the_table->bucket(i);
|
||||
+ entry != NULL;
|
||||
+ entry = entry->next()) {
|
||||
+
|
||||
+ oop mem_name = entry->object_no_keepalive();
|
||||
+ // except ones removed
|
||||
+ if (mem_name == NULL) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ Method* old_method = (Method*)java_lang_invoke_ResolvedMethodName::vmtarget(mem_name);
|
||||
+
|
||||
+ if (old_method->is_old()) {
|
||||
+
|
||||
+ Method* new_method;
|
||||
+ if (old_method->is_deleted()) {
|
||||
+ new_method = Universe::throw_no_such_method_error();
|
||||
+ } else {
|
||||
+ InstanceKlass* holder = old_method->method_holder();
|
||||
+ new_method = holder->method_with_idnum(old_method->orig_method_idnum());
|
||||
+ assert(holder == new_method->method_holder(), "call after swapping redefined guts");
|
||||
+ assert(new_method != NULL, "method_with_idnum() should not be NULL");
|
||||
+ assert(old_method != new_method, "sanity check");
|
||||
+ }
|
||||
+
|
||||
+ java_lang_invoke_ResolvedMethodName::set_vmtarget(mem_name, new_method);
|
||||
+
|
||||
+ ResourceMark rm;
|
||||
+ if (!(*trace_name_printed)) {
|
||||
+ log_info(redefine, class, update)("adjust: name=%s", old_method->method_holder()->external_name());
|
||||
+ *trace_name_printed = true;
|
||||
+ }
|
||||
+ log_debug(redefine, class, update, constantpool)
|
||||
+ ("ResolvedMethod method update: %s(%s)",
|
||||
+ new_method->name()->as_C_string(), new_method->signature()->as_C_string());
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+// (DCEVM) It is called at safepoint only for RedefineClasses
|
||||
+void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed) {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "only called at safepoint");
|
||||
// For each entry in RMT, change to new method
|
||||
GrowableArray<oop>* oops_to_add = new GrowableArray<oop>();
|
||||
diff --git a/src/hotspot/share/prims/resolvedMethodTable.hpp b/src/hotspot/share/prims/resolvedMethodTable.hpp
|
||||
index 841ae4ae585..543d4ffa485 100644
|
||||
--- a/src/hotspot/share/prims/resolvedMethodTable.hpp
|
||||
+++ b/src/hotspot/share/prims/resolvedMethodTable.hpp
|
||||
@@ -93,6 +93,7 @@ public:
|
||||
#if INCLUDE_JVMTI
|
||||
// It is called at safepoint only for RedefineClasses
|
||||
static void adjust_method_entries(bool * trace_name_printed);
|
||||
+ static void adjust_method_entries_dcevm(bool * trace_name_printed);
|
||||
#endif // INCLUDE_JVMTI
|
||||
|
||||
// Cleanup cleared entries
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
From c1e814f2f7d4f2b37abd667d0bec516474f2a119 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Tue, 19 May 2020 09:41:36 +0200
|
||||
Subject: [PATCH 39/50] Revert code for !AllowEnhancedClassRedefinition
|
||||
|
||||
---
|
||||
.../share/classfile/classLoaderData.cpp | 23 ++++++++++---------
|
||||
1 file changed, 12 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
index 25103fff2c0..f5b877b432b 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
@@ -1387,12 +1387,13 @@ bool ClassLoaderDataGraph::do_unloading(bool clean_previous_versions) {
|
||||
// Klassesoto delete.
|
||||
|
||||
// FIXME: dcevm - block asserts in MetadataOnStackMark
|
||||
- /*
|
||||
- bool walk_all_metadata = clean_previous_versions &&
|
||||
- JvmtiExport::has_redefined_a_class() &&
|
||||
- InstanceKlass::has_previous_versions_and_reset();
|
||||
- MetadataOnStackMark md_on_stack(walk_all_metadata);
|
||||
- */
|
||||
+ bool walk_all_metadata = false;
|
||||
+ if (!AllowEnhancedClassRedefinition) {
|
||||
+ walk_all_metadata = clean_previous_versions &&
|
||||
+ JvmtiExport::has_redefined_a_class() &&
|
||||
+ InstanceKlass::has_previous_versions_and_reset();
|
||||
+ MetadataOnStackMark md_on_stack(walk_all_metadata);
|
||||
+ }
|
||||
|
||||
// Save previous _unloading pointer for CMS which may add to unloading list before
|
||||
// purging and we don't want to rewalk the previously unloaded class loader data.
|
||||
@@ -1402,12 +1403,12 @@ bool ClassLoaderDataGraph::do_unloading(bool clean_previous_versions) {
|
||||
while (data != NULL) {
|
||||
if (data->is_alive()) {
|
||||
// clean metaspace
|
||||
- /*
|
||||
- if (walk_all_metadata) {
|
||||
- data->classes_do(InstanceKlass::purge_previous_versions);
|
||||
+ if (!AllowEnhancedClassRedefinition) {
|
||||
+ if (walk_all_metadata) {
|
||||
+ data->classes_do(InstanceKlass::purge_previous_versions);
|
||||
+ }
|
||||
+ data->free_deallocate_list();
|
||||
}
|
||||
- data->free_deallocate_list();
|
||||
- */
|
||||
prev = data;
|
||||
data = data->next();
|
||||
loaders_processed++;
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,278 +0,0 @@
|
||||
From 5b36c4798869c5cd4d65f7765a8447b9cf09d76b Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Tue, 19 May 2020 09:29:39 +0200
|
||||
Subject: [PATCH 40/50] Code cleanup
|
||||
|
||||
---
|
||||
src/hotspot/share/classfile/classFileParser.cpp | 4 +++-
|
||||
src/hotspot/share/classfile/classFileParser.hpp | 2 +-
|
||||
src/hotspot/share/classfile/classLoaderData.cpp | 2 ++
|
||||
src/hotspot/share/classfile/dictionary.cpp | 4 ++++
|
||||
src/hotspot/share/classfile/dictionary.hpp | 1 +
|
||||
src/hotspot/share/classfile/loaderConstraints.cpp | 3 ++-
|
||||
src/hotspot/share/classfile/systemDictionary.cpp | 8 +++++---
|
||||
src/hotspot/share/interpreter/linkResolver.cpp | 1 +
|
||||
src/hotspot/share/memory/universe.cpp | 4 ++--
|
||||
src/hotspot/share/oops/instanceKlass.cpp | 13 ++++++++-----
|
||||
10 files changed, 29 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/classFileParser.cpp b/src/hotspot/share/classfile/classFileParser.cpp
|
||||
index ea150df9104..c2cd35da4e6 100644
|
||||
--- a/src/hotspot/share/classfile/classFileParser.cpp
|
||||
+++ b/src/hotspot/share/classfile/classFileParser.cpp
|
||||
@@ -954,6 +954,7 @@ void ClassFileParser::parse_interfaces(const ClassFileStream* const stream,
|
||||
CHECK);
|
||||
}
|
||||
|
||||
+ // (DCEVM) pick newest
|
||||
interf = (Klass *) maybe_newest(interf);
|
||||
|
||||
if (!interf->is_interface()) {
|
||||
@@ -3749,6 +3750,7 @@ const InstanceKlass* ClassFileParser::parse_super_class(ConstantPool* const cp,
|
||||
// However, make sure it is not an array type.
|
||||
bool is_array = false;
|
||||
if (cp->tag_at(super_class_index).is_klass()) {
|
||||
+ // (DCEVM) pick newest
|
||||
super_klass = InstanceKlass::cast(maybe_newest(cp->resolved_klass_at(super_class_index)));
|
||||
if (need_verify)
|
||||
is_array = super_klass->is_array_klass();
|
||||
@@ -4417,7 +4419,7 @@ void ClassFileParser::set_precomputed_flags(InstanceKlass* ik) {
|
||||
if (!_has_empty_finalizer) {
|
||||
if (_has_finalizer ||
|
||||
(super != NULL && super->has_finalizer())) {
|
||||
- // FIXME - condition from previous DCEVM version, however after reload new finelize() method is not active
|
||||
+ // FIXME - (DCEVM) this is condition from previous DCEVM version, however after reload a new finalize() method is not active
|
||||
if (ik->old_version() == NULL || ik->old_version()->has_finalizer()) {
|
||||
ik->set_has_finalizer();
|
||||
}
|
||||
diff --git a/src/hotspot/share/classfile/classFileParser.hpp b/src/hotspot/share/classfile/classFileParser.hpp
|
||||
index 3db14b678f3..93ed54d8f70 100644
|
||||
--- a/src/hotspot/share/classfile/classFileParser.hpp
|
||||
+++ b/src/hotspot/share/classfile/classFileParser.hpp
|
||||
@@ -499,7 +499,7 @@ class ClassFileParser {
|
||||
FieldLayoutInfo* info,
|
||||
TRAPS);
|
||||
|
||||
- // Enhanced class redefinition
|
||||
+ // (DCEVM) Enhanced class redefinition
|
||||
inline const Klass* maybe_newest(const Klass* klass) const { return klass != NULL && _pick_newest ? klass->newest_version() : klass; }
|
||||
|
||||
public:
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
index f5b877b432b..ab2615da0ed 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
@@ -1242,6 +1242,7 @@ void ClassLoaderDataGraph::dictionary_classes_do(void f(InstanceKlass*)) {
|
||||
}
|
||||
}
|
||||
|
||||
+// (DCEVM) - iterate over dict classes
|
||||
void ClassLoaderDataGraph::dictionary_classes_do(KlassClosure* klass_closure) {
|
||||
FOR_ALL_DICTIONARY(cld) {
|
||||
cld->dictionary()->classes_do(klass_closure);
|
||||
@@ -1257,6 +1258,7 @@ void ClassLoaderDataGraph::dictionary_classes_do(void f(InstanceKlass*, TRAPS),
|
||||
}
|
||||
}
|
||||
|
||||
+// (DCEVM) rollback redefined classes
|
||||
void ClassLoaderDataGraph::rollback_redefinition() {
|
||||
FOR_ALL_DICTIONARY(cld) {
|
||||
cld->dictionary()->rollback_redefinition();
|
||||
diff --git a/src/hotspot/share/classfile/dictionary.cpp b/src/hotspot/share/classfile/dictionary.cpp
|
||||
index 118730f1b83..dda5188c370 100644
|
||||
--- a/src/hotspot/share/classfile/dictionary.cpp
|
||||
+++ b/src/hotspot/share/classfile/dictionary.cpp
|
||||
@@ -245,6 +245,8 @@ void Dictionary::classes_do(void f(InstanceKlass*)) {
|
||||
}
|
||||
}
|
||||
|
||||
+
|
||||
+// (DCEVM) iterate over dict entry
|
||||
void Dictionary::classes_do(KlassClosure* closure) {
|
||||
for (int index = 0; index < table_size(); index++) {
|
||||
for (DictionaryEntry* probe = bucket(index);
|
||||
@@ -342,6 +344,7 @@ DictionaryEntry* Dictionary::get_entry(int index, unsigned int hash,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+// (DCEVM) replace old_class by new class in dictionary
|
||||
bool Dictionary::update_klass(unsigned int hash, Symbol* name, ClassLoaderData* loader_data, InstanceKlass* k, InstanceKlass* old_klass) {
|
||||
// There are several entries for the same class in the dictionary: One extra entry for each parent classloader of the classloader of the class.
|
||||
bool found = false;
|
||||
@@ -356,6 +359,7 @@ bool Dictionary::update_klass(unsigned int hash, Symbol* name, ClassLoaderData*
|
||||
return found;
|
||||
}
|
||||
|
||||
+// (DCEVM) rollback redefinition
|
||||
void Dictionary::rollback_redefinition() {
|
||||
for (int index = 0; index < table_size(); index++) {
|
||||
for (DictionaryEntry* entry = bucket(index);
|
||||
diff --git a/src/hotspot/share/classfile/dictionary.hpp b/src/hotspot/share/classfile/dictionary.hpp
|
||||
index fd4b134d7a7..5eaa741d500 100644
|
||||
--- a/src/hotspot/share/classfile/dictionary.hpp
|
||||
+++ b/src/hotspot/share/classfile/dictionary.hpp
|
||||
@@ -119,6 +119,7 @@ public:
|
||||
|
||||
void rollback_redefinition();
|
||||
|
||||
+ // (DCEVM) return old class if redefining in AllowEnhancedClassRedefinition, otherwise return "k"
|
||||
static InstanceKlass* old_if_redefined(InstanceKlass* k) {
|
||||
return (k != NULL && k->is_redefining()) ? ((InstanceKlass* )k->old_version()) : k;
|
||||
}
|
||||
diff --git a/src/hotspot/share/classfile/loaderConstraints.cpp b/src/hotspot/share/classfile/loaderConstraints.cpp
|
||||
index e4a23e8a27c..bca73b5e0dc 100644
|
||||
--- a/src/hotspot/share/classfile/loaderConstraints.cpp
|
||||
+++ b/src/hotspot/share/classfile/loaderConstraints.cpp
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
- * published by the Free Software Foundation.
|
||||
+ * published by the Free Software Foundation) replace old_class by new class in dictionary.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
@@ -87,6 +87,7 @@ LoaderConstraintEntry** LoaderConstraintTable::find_loader_constraint(
|
||||
return pp;
|
||||
}
|
||||
|
||||
+// (DCEVM) update constraint entries to new classes, called from dcevm redefinition code only
|
||||
void LoaderConstraintTable::update_after_redefinition() {
|
||||
for (int index = 0; index < table_size(); index++) {
|
||||
LoaderConstraintEntry** p = bucket_addr(index);
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.cpp b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
index 9dbd6cc9c12..e70865109dd 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
@@ -876,7 +876,8 @@ Klass* SystemDictionary::resolve_instance_class_or_null(Symbol* name,
|
||||
ClassLoaderData* loader_data = k->class_loader_data();
|
||||
MutexLocker mu(SystemDictionary_lock, THREAD);
|
||||
Klass* kk = find_class(name, loader_data);
|
||||
- // FIXME: (kk == k() && !k->is_redefining()) || (k->is_redefining() && kk == k->old_version())
|
||||
+ // FIXME: (DCEVM)
|
||||
+ // assert(kk == k() && !k->is_redefining()) || (k->is_redefining() && kk == k->old_version())
|
||||
assert(kk == k, "should be present in dictionary");
|
||||
}
|
||||
#endif
|
||||
@@ -1083,7 +1084,7 @@ InstanceKlass* SystemDictionary::resolve_from_stream(Symbol* class_name,
|
||||
InstanceKlass* k = NULL;
|
||||
|
||||
#if INCLUDE_CDS
|
||||
- // FIXME: what to do during redefinition?
|
||||
+ // FIXME: (DCEVM) what to do during redefinition?
|
||||
if (!DumpSharedSpaces) {
|
||||
k = SystemDictionaryShared::lookup_from_stream(class_name,
|
||||
class_loader,
|
||||
@@ -1836,7 +1837,7 @@ void SystemDictionary::add_to_hierarchy(InstanceKlass* k, TRAPS) {
|
||||
CodeCache::flush_dependents_on(k);
|
||||
}
|
||||
|
||||
-// Enhanced class redefinition
|
||||
+// (DCEVM) - remove from klass hierarchy
|
||||
void SystemDictionary::remove_from_hierarchy(InstanceKlass* k) {
|
||||
assert(k != NULL, "just checking");
|
||||
|
||||
@@ -1844,6 +1845,7 @@ void SystemDictionary::remove_from_hierarchy(InstanceKlass* k) {
|
||||
k->remove_from_sibling_list();
|
||||
}
|
||||
|
||||
+// (DCEVM)
|
||||
void SystemDictionary::update_constraints_after_redefinition() {
|
||||
constraints()->update_after_redefinition();
|
||||
}
|
||||
diff --git a/src/hotspot/share/interpreter/linkResolver.cpp b/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
index cb76d2ef50c..9dc184d02f5 100644
|
||||
--- a/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
+++ b/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
@@ -1384,6 +1384,7 @@ void LinkResolver::runtime_resolve_virtual_method(CallInfo& result,
|
||||
assert(resolved_method->can_be_statically_bound(), "cannot override this method");
|
||||
selected_method = resolved_method;
|
||||
} else {
|
||||
+ // TODO: (DCEVM) explain
|
||||
assert(recv_klass->is_subtype_of(resolved_method->method_holder()), "receiver and resolved method holder are inconsistent");
|
||||
selected_method = methodHandle(THREAD, recv_klass->method_at_vtable(vtable_index));
|
||||
}
|
||||
diff --git a/src/hotspot/share/memory/universe.cpp b/src/hotspot/share/memory/universe.cpp
|
||||
index 7ecb950b231..d0a6d665aa0 100644
|
||||
--- a/src/hotspot/share/memory/universe.cpp
|
||||
+++ b/src/hotspot/share/memory/universe.cpp
|
||||
@@ -176,7 +176,7 @@ void Universe::basic_type_classes_do(void f(Klass*)) {
|
||||
f(doubleArrayKlassObj());
|
||||
}
|
||||
|
||||
-// FIXME: This method should iterate all pointers that are not within heap objects.
|
||||
+// FIXME: (DCEVM) This method should iterate all pointers that are not within heap objects.
|
||||
void Universe::root_oops_do(OopClosure *oopClosure) {
|
||||
|
||||
class AlwaysTrueClosure: public BoolObjectClosure {
|
||||
@@ -203,7 +203,7 @@ void Universe::root_oops_do(OopClosure *oopClosure) {
|
||||
CodeBlobToOopClosure blobClosure(oopClosure, CodeBlobToOopClosure::FixRelocations);
|
||||
CodeCache::blobs_do(&blobClosure);
|
||||
StringTable::oops_do(oopClosure);
|
||||
-
|
||||
+
|
||||
// (DCEVM) TODO: Check if this is correct?
|
||||
//CodeCache::scavenge_root_nmethods_oops_do(oopClosure);
|
||||
//Management::oops_do(oopClosure);
|
||||
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
index e14aaee21c4..c860371d2fc 100644
|
||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
@@ -1139,6 +1139,7 @@ void InstanceKlass::init_implementor() {
|
||||
}
|
||||
}
|
||||
|
||||
+// (DCEVM) - init_implementor() for dcevm
|
||||
void InstanceKlass::init_implementor_from_redefine() {
|
||||
assert(is_interface(), "not interface");
|
||||
Klass** addr = adr_implementor();
|
||||
@@ -1209,6 +1210,8 @@ bool InstanceKlass::implements_interface(Klass* k) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
+
|
||||
+// (DCEVM)
|
||||
bool InstanceKlass::implements_interface_any_version(Klass* k) const {
|
||||
k = k->newest_version();
|
||||
if (this->newest_version() == k) return true;
|
||||
@@ -1491,10 +1494,8 @@ void InstanceKlass::methods_do(void f(Method* method)) {
|
||||
}
|
||||
}
|
||||
|
||||
-/**
|
||||
- Update information contains mapping of fields from old class to the new class.
|
||||
- Info is stored on HEAP, you need to call clear_update_information to free the space.
|
||||
-*/
|
||||
+// (DCEVM) Update information contains mapping of fields from old class to the new class.
|
||||
+// Info is stored on HEAP, you need to call clear_update_information to free the space.
|
||||
void InstanceKlass::store_update_information(GrowableArray<int> &values) {
|
||||
int *arr = NEW_C_HEAP_ARRAY(int, values.length(), mtClass);
|
||||
for (int i = 0; i < values.length(); i++) {
|
||||
@@ -2162,6 +2163,7 @@ void InstanceKlass::add_dependent_nmethod(nmethod* nm) {
|
||||
dependencies().add_dependent_nmethod(nm);
|
||||
}
|
||||
|
||||
+// DCEVM - update jmethod ids
|
||||
bool InstanceKlass::update_jmethod_id(Method* method, jmethodID newMethodID) {
|
||||
size_t idnum = (size_t)method->method_idnum();
|
||||
jmethodID* jmeths = methods_jmethod_ids_acquire();
|
||||
@@ -2177,7 +2179,7 @@ bool InstanceKlass::update_jmethod_id(Method* method, jmethodID newMethodID) {
|
||||
|
||||
void InstanceKlass::remove_dependent_nmethod(nmethod* nm, bool delete_immediately) {
|
||||
dependencies().remove_dependent_nmethod(nm, delete_immediately);
|
||||
- // (DCEVM) Hack as dependencies get wrong version of Klass*
|
||||
+ // FIXME: (DCEVM) Hack as dependencies get wrong version of Klass*
|
||||
// if (this->old_version() != NULL) {
|
||||
// InstanceKlass::cast(this->old_version())->remove_dependent_nmethod(nm, true);
|
||||
// return;
|
||||
@@ -3594,6 +3596,7 @@ void InstanceKlass::verify_on(outputStream* st) {
|
||||
}
|
||||
|
||||
guarantee(sib->is_klass(), "should be klass");
|
||||
+ // TODO: (DCEVM) explain
|
||||
guarantee(sib->super() == super || super->newest_version() == SystemDictionary::Object_klass(), "siblings should have same superklass");
|
||||
}
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
From 71f35c41b569f72a1674ccd57118c4fe76ba3d68 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Tue, 19 May 2020 10:31:15 +0200
|
||||
Subject: [PATCH 41/50] Activate cpCache definition asserts for !dcevm
|
||||
|
||||
---
|
||||
src/hotspot/share/oops/cpCache.cpp | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/oops/cpCache.cpp b/src/hotspot/share/oops/cpCache.cpp
|
||||
index 47040d51f0c..4318df227d1 100644
|
||||
--- a/src/hotspot/share/oops/cpCache.cpp
|
||||
+++ b/src/hotspot/share/oops/cpCache.cpp
|
||||
@@ -436,8 +436,7 @@ void ConstantPoolCacheEntry::set_method_handle_common(const constantPoolHandle&
|
||||
if (has_appendix) {
|
||||
const int appendix_index = f2_as_index() + _indy_resolved_references_appendix_offset;
|
||||
assert(appendix_index >= 0 && appendix_index < resolved_references->length(), "oob");
|
||||
- // FIXME (DCEVM) relaxing for now...
|
||||
- //assert(resolved_references->obj_at(appendix_index) == NULL, "init just once");
|
||||
+ assert(AllowEnhancedClassRedefinition || resolved_references->obj_at(appendix_index) == NULL, "init just once");
|
||||
resolved_references->obj_at_put(appendix_index, appendix());
|
||||
}
|
||||
|
||||
@@ -445,8 +444,7 @@ void ConstantPoolCacheEntry::set_method_handle_common(const constantPoolHandle&
|
||||
if (has_method_type) {
|
||||
const int method_type_index = f2_as_index() + _indy_resolved_references_method_type_offset;
|
||||
assert(method_type_index >= 0 && method_type_index < resolved_references->length(), "oob");
|
||||
- // FIXME (DCEVM) relaxing for now...
|
||||
- //assert(resolved_references->obj_at(method_type_index) == NULL, "init just once");
|
||||
+ assert(AllowEnhancedClassRedefinition || resolved_references->obj_at(method_type_index) == NULL, "init just once");
|
||||
resolved_references->obj_at_put(method_type_index, method_type());
|
||||
}
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
From 961018a29ddb7eba96aca7fbc385f3c4f29e3a03 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Tue, 19 May 2020 10:54:38 +0200
|
||||
Subject: [PATCH 42/50] iterate old method version only in dcevm
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiImpl.cpp | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiImpl.cpp b/src/hotspot/share/prims/jvmtiImpl.cpp
|
||||
index 2a92ece916e..d2044541d38 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiImpl.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiImpl.cpp
|
||||
@@ -294,8 +294,10 @@ void JvmtiBreakpoint::each_method_version_do(method_action meth_act) {
|
||||
Symbol* m_signature = _method->signature();
|
||||
|
||||
// (DCEVM) Go through old versions of method
|
||||
- for (Method* m = _method->old_version(); m != NULL; m = m->old_version()) {
|
||||
- (m->*meth_act)(_bci);
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ for (Method* m = _method->old_version(); m != NULL; m = m->old_version()) {
|
||||
+ (m->*meth_act)(_bci);
|
||||
+ }
|
||||
}
|
||||
|
||||
// search previous versions if they exist
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
From 3f53bb48682b17cfbf4781d4fa47055be88baea0 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 22 May 2020 21:43:22 +0200
|
||||
Subject: [PATCH 44/50] Skip GC runs for redefinitions without instance size
|
||||
change
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 08fe42d5c28..a785a43d352 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -578,14 +578,14 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
}
|
||||
}
|
||||
|
||||
-// if (objectClosure.needs_instance_update()) {
|
||||
+ if (objectClosure.needs_instance_update()) {
|
||||
// Do a full garbage collection to update the instance sizes accordingly
|
||||
Universe::set_redefining_gc_run(true);
|
||||
notify_gc_begin(true);
|
||||
Universe::heap()->collect_as_vm_thread(GCCause::_heap_inspection);
|
||||
notify_gc_end();
|
||||
Universe::set_redefining_gc_run(false);
|
||||
-// }
|
||||
+ }
|
||||
|
||||
// Unmark Klass*s as "redefining"
|
||||
for (int i = 0; i < _new_classes->length(); i++) {
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,421 +0,0 @@
|
||||
From 585f1cb56766be837a34114b1ee5c743aa4e6801 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 23 May 2020 10:17:56 +0200
|
||||
Subject: [PATCH 46/50] Fix comments according hotspot formatting conventions
|
||||
|
||||
---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 191 +++++++-----------
|
||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 41 ++--
|
||||
2 files changed, 90 insertions(+), 142 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 2321483dcbd..8d00203fd9a 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -67,21 +67,19 @@ int VM_EnhancedRedefineClasses::_deleted_methods_length = 0;
|
||||
int VM_EnhancedRedefineClasses::_added_methods_length = 0;
|
||||
Klass* VM_EnhancedRedefineClasses::_the_class_oop = NULL;
|
||||
|
||||
-/**
|
||||
- * Create new instance of enhanced class redefiner.
|
||||
- *
|
||||
- * This class implements VM_GC_Operation - the usual usage should be:
|
||||
- * VM_EnhancedRedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_redefine);
|
||||
- * VMThread::execute(&op);
|
||||
- * Which
|
||||
- *
|
||||
- * @param class_count size of class_defs
|
||||
- * @param class_defs class definition - either new class or redefined class
|
||||
- * note that this is not the final array of classes to be redefined
|
||||
- * we need to scan for all affected classes (e.g. subclasses) and
|
||||
- * caculcate redefinition for them as well.
|
||||
- * @param class_load_kind always jvmti_class_load_kind_redefine
|
||||
- */
|
||||
+//
|
||||
+// Create new instance of enhanced class redefiner.
|
||||
+//
|
||||
+// This class implements VM_GC_Operation - the usual usage should be:
|
||||
+// VM_EnhancedRedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_redefine);
|
||||
+// VMThread::execute(&op);
|
||||
+// Which
|
||||
+// - class_count size of class_defs
|
||||
+// - class_defs class definition - either new class or redefined class
|
||||
+// note that this is not the final array of classes to be redefined
|
||||
+// we need to scan for all affected classes (e.g. subclasses) and
|
||||
+// caculcate redefinition for them as well.
|
||||
+// @param class_load_kind always jvmti_class_load_kind_redefine
|
||||
VM_EnhancedRedefineClasses::VM_EnhancedRedefineClasses(jint class_count, const jvmtiClassDefinition *class_defs, JvmtiClassLoadKind class_load_kind) :
|
||||
VM_GC_Operation(Universe::heap()->total_collections(), GCCause::_heap_inspection, Universe::heap()->total_full_collections(), true) {
|
||||
_affected_klasses = NULL;
|
||||
@@ -97,12 +95,10 @@ static inline InstanceKlass* get_ik(jclass def) {
|
||||
return InstanceKlass::cast(java_lang_Class::as_Klass(mirror));
|
||||
}
|
||||
|
||||
-/**
|
||||
- * Start the redefinition:
|
||||
- * - Load new class definitions - @see load_new_class_versions
|
||||
- * - Start mark&sweep GC.
|
||||
- * @return true if success, otherwise all chnages are rollbacked.
|
||||
- */
|
||||
+// Start the redefinition:
|
||||
+// - Load new class definitions - @see load_new_class_versions
|
||||
+// - Start mark&sweep GC.
|
||||
+// - true if success, otherwise all chnages are rollbacked.
|
||||
bool VM_EnhancedRedefineClasses::doit_prologue() {
|
||||
|
||||
if (_class_count == 0) {
|
||||
@@ -175,9 +171,7 @@ bool VM_EnhancedRedefineClasses::doit_prologue() {
|
||||
return true;
|
||||
}
|
||||
|
||||
-/**
|
||||
- * Closer for static fields - copy value from old class to the new class.
|
||||
- */
|
||||
+// Closer for static fields - copy value from old class to the new class.
|
||||
class FieldCopier : public FieldClosure {
|
||||
public:
|
||||
void do_field(fieldDescriptor* fd) {
|
||||
@@ -236,9 +230,7 @@ struct StoreNoBarrier {
|
||||
template <class T> static void oop_store(T* p) { RawAccess<>::oop_store(p, oop(NULL)); }
|
||||
};
|
||||
|
||||
-/**
|
||||
- Closure to scan all heap objects and update method handles
|
||||
-*/
|
||||
+// Closure to scan all heap objects and update method handles
|
||||
template <class S>
|
||||
class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
// import java_lang_invoke_MemberName.*
|
||||
@@ -247,7 +239,6 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
REFERENCE_KIND_MASK = java_lang_invoke_MemberName::MN_REFERENCE_KIND_MASK,
|
||||
};
|
||||
|
||||
-
|
||||
bool update_member_name(oop obj) {
|
||||
int flags = java_lang_invoke_MemberName::flags(obj);
|
||||
int ref_kind = (flags >> REFERENCE_KIND_SHIFT) & REFERENCE_KIND_MASK;
|
||||
@@ -382,14 +373,12 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
}
|
||||
};
|
||||
|
||||
-/**
|
||||
- * Closure to scan all objects on heap for objects of changed classes
|
||||
- * - if the fields are compatible, only update class definition reference
|
||||
- * - otherwise if the new object size is smaller then old size, reshufle
|
||||
- * the fields and fill the gap with "dead_space"
|
||||
- * - otherwise set the _needs_instance_update flag, we need to do full GC
|
||||
- * and reshuffle object positions durring mark&sweep
|
||||
- */
|
||||
+// Closure to scan all objects on heap for objects of changed classes
|
||||
+// - if the fields are compatible, only update class definition reference
|
||||
+// - otherwise if the new object size is smaller then old size, reshufle
|
||||
+// the fields and fill the gap with "dead_space"
|
||||
+// - otherwise set the _needs_instance_update flag, we need to do full GC
|
||||
+// and reshuffle object positions durring mark&sweep
|
||||
class ChangePointersObjectClosure : public ObjectClosure {
|
||||
private:
|
||||
|
||||
@@ -451,19 +440,16 @@ public:
|
||||
};
|
||||
|
||||
|
||||
-/**
|
||||
- Main transformation method - runs in VM thread.
|
||||
-
|
||||
- - UseSharedSpaces - TODO what does it mean?
|
||||
- - for each sratch class call redefine_single_class
|
||||
- - clear code cache (flush_dependent_code)
|
||||
- - iterate the heap and update object defintions, check it old/new class fields
|
||||
- are compatible. If new class size is smaller then old, it can be solved directly here.
|
||||
- - iterate the heap and update method handles to new version
|
||||
- - Swap marks to have same hashcodes
|
||||
- - copy static fields
|
||||
- - notify JVM of the modification
|
||||
-*/
|
||||
+// Main transformation method - runs in VM thread.
|
||||
+// - UseSharedSpaces - TODO what does it mean?
|
||||
+// - for each sratch class call redefine_single_class
|
||||
+// - clear code cache (flush_dependent_code)
|
||||
+// - iterate the heap and update object defintions, check it old/new class fields
|
||||
+// are compatible. If new class size is smaller then old, it can be solved directly here.
|
||||
+// - iterate the heap and update method handles to new version
|
||||
+// - Swap marks to have same hashcodes
|
||||
+// - copy static fields
|
||||
+// - notify JVM of the modification
|
||||
void VM_EnhancedRedefineClasses::doit() {
|
||||
Thread *thread = Thread::current();
|
||||
|
||||
@@ -634,11 +620,9 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
|
||||
}
|
||||
|
||||
-/**
|
||||
- * Cleanup - runs in JVM thread
|
||||
- * - free used memory
|
||||
- * - end GC
|
||||
- */
|
||||
+// Cleanup - runs in JVM thread
|
||||
+// - free used memory
|
||||
+// - end GC
|
||||
void VM_EnhancedRedefineClasses::doit_epilogue() {
|
||||
VM_GC_Operation::doit_epilogue();
|
||||
|
||||
@@ -670,11 +654,9 @@ void VM_EnhancedRedefineClasses::doit_epilogue() {
|
||||
}
|
||||
}
|
||||
|
||||
-/**
|
||||
- * Exclude java primitives and arrays from redefinition
|
||||
- * @param klass_mirror pointer to the klass
|
||||
- * @return true if is modifiable
|
||||
- */
|
||||
+// Exclude java primitives and arrays from redefinition
|
||||
+// - klass_mirror pointer to the klass
|
||||
+// - true if is modifiable
|
||||
bool VM_EnhancedRedefineClasses::is_modifiable_class(oop klass_mirror) {
|
||||
// classes for primitives cannot be redefined
|
||||
if (java_lang_Class::is_primitive(klass_mirror)) {
|
||||
@@ -693,17 +675,12 @@ bool VM_EnhancedRedefineClasses::is_modifiable_class(oop klass_mirror) {
|
||||
return true;
|
||||
}
|
||||
|
||||
-/**
|
||||
- Load and link new classes (either redefined or affected by redefinition - subclass, ...)
|
||||
-
|
||||
- - find sorted affected classes
|
||||
- - resolve new class
|
||||
- - calculate redefine flags (field change, method change, supertype change, ...)
|
||||
- - calculate modified fields and mapping to old fields
|
||||
- - link new classes
|
||||
-
|
||||
- The result is sotred in _affected_klasses(old definitions) and _new_classes(new definitions) arrays.
|
||||
-*/
|
||||
+// Load and link new classes (either redefined or affected by redefinition - subclass, ...)
|
||||
+// - find sorted affected classes
|
||||
+// - resolve new class
|
||||
+// - calculate redefine flags (field change, method change, supertype change, ...)
|
||||
+// - calculate modified fields and mapping to old fields
|
||||
+// - link new classes
|
||||
jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
|
||||
|
||||
_affected_klasses = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<Klass*>(_class_count, true);
|
||||
@@ -898,9 +875,7 @@ jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
|
||||
return JVMTI_ERROR_NONE;
|
||||
}
|
||||
|
||||
-/**
|
||||
- Calculated the difference between new and old class (field change, method change, supertype change, ...).
|
||||
-*/
|
||||
+ // Calculated the difference between new and old class (field change, method change, supertype change, ...).
|
||||
int VM_EnhancedRedefineClasses::calculate_redefinition_flags(InstanceKlass* new_class) {
|
||||
int result = Klass::NoRedefinition;
|
||||
log_info(redefine, class, load)("Comparing different class versions of class %s",new_class->name()->as_C_string());
|
||||
@@ -1183,14 +1158,11 @@ int VM_EnhancedRedefineClasses::calculate_redefinition_flags(InstanceKlass* new_
|
||||
}
|
||||
|
||||
|
||||
-/**
|
||||
- Searches for the class bytecode of the given class and returns it as a byte array.
|
||||
-
|
||||
- @param the_class definition of a class, either existing class or new_class
|
||||
- @param class_bytes - if the class is redefined, it contains new class definition, otherwise just original class bytecode.
|
||||
- @param class_byte_count - size of class_bytes
|
||||
- @param not_changed - new_class not available or same as current class
|
||||
-*/
|
||||
+// Searches for the class bytecode of the given class and returns it as a byte array.
|
||||
+// - the_class definition of a class, either existing class or new_class
|
||||
+// - class_bytes - if the class is redefined, it contains new class definition, otherwise just original class bytecode.
|
||||
+// - class_byte_count - size of class_bytes
|
||||
+// - not_changed - new_class not available or same as current class
|
||||
jvmtiError VM_EnhancedRedefineClasses::find_class_bytes(InstanceKlass* the_class, const unsigned char **class_bytes, jint *class_byte_count, jboolean *not_changed) {
|
||||
|
||||
*not_changed = false;
|
||||
@@ -1233,11 +1205,9 @@ jvmtiError VM_EnhancedRedefineClasses::find_class_bytes(InstanceKlass* the_class
|
||||
return JVMTI_ERROR_NONE;
|
||||
}
|
||||
|
||||
-/**
|
||||
- Calculate difference between non static fields of old and new class and store the info into new class:
|
||||
- instanceKlass->store_update_information
|
||||
- instanceKlass->copy_backwards
|
||||
-*/
|
||||
+// Calculate difference between non static fields of old and new class and store the info into new class:
|
||||
+// instanceKlass->store_update_information
|
||||
+// instanceKlass->copy_backwards
|
||||
void VM_EnhancedRedefineClasses::calculate_instance_update_information(Klass* new_version) {
|
||||
|
||||
class CalculateFieldUpdates : public FieldClosure {
|
||||
@@ -1348,9 +1318,7 @@ void VM_EnhancedRedefineClasses::calculate_instance_update_information(Klass* ne
|
||||
}
|
||||
}
|
||||
|
||||
-/**
|
||||
- Rollback all changes - clear new classes from the system dictionary, return old classes to directory, free memory.
|
||||
-*/
|
||||
+// Rollback all changes - clear new classes from the system dictionary, return old classes to directory, free memory.
|
||||
void VM_EnhancedRedefineClasses::rollback() {
|
||||
log_info(redefine, class, load)("Rolling back redefinition, result=%d", _res);
|
||||
ClassLoaderDataGraph::rollback_redefinition();
|
||||
@@ -1547,9 +1515,7 @@ void VM_EnhancedRedefineClasses::update_jmethod_ids() {
|
||||
}
|
||||
}
|
||||
|
||||
-/**
|
||||
- Set method as obsolete / old / deleted.
|
||||
-*/
|
||||
+// Set method as obsolete / old / deleted.
|
||||
void VM_EnhancedRedefineClasses::check_methods_and_mark_as_obsolete() {
|
||||
for (int j = 0; j < _matching_methods_length; ++j/*, ++old_index*/) {
|
||||
Method* old_method = _matching_old_methods[j];
|
||||
@@ -1771,12 +1737,9 @@ void VM_EnhancedRedefineClasses::flush_dependent_code(InstanceKlass* k_h, TRAPS)
|
||||
}
|
||||
}
|
||||
|
||||
-/**
|
||||
- Compare _old_methods and _new_methods arrays and store the result into
|
||||
- _matching_old_methods, _matching_new_methods, _added_methods, _deleted_methods
|
||||
-
|
||||
- Setup _old_methods and _new_methods before the call - it should be called for one class only!
|
||||
-*/
|
||||
+// Compare _old_methods and _new_methods arrays and store the result into
|
||||
+// _matching_old_methods, _matching_new_methods, _added_methods, _deleted_methods
|
||||
+// Setup _old_methods and _new_methods before the call - it should be called for one class only!
|
||||
void VM_EnhancedRedefineClasses::compute_added_deleted_matching_methods() {
|
||||
Method* old_method;
|
||||
Method* new_method;
|
||||
@@ -1900,7 +1863,6 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
}
|
||||
*/
|
||||
|
||||
-
|
||||
{
|
||||
ResourceMark rm(THREAD);
|
||||
// increment the classRedefinedCount field in the_class and in any
|
||||
@@ -1940,9 +1902,7 @@ void VM_EnhancedRedefineClasses::check_class(InstanceKlass* ik, TRAPS) {
|
||||
}
|
||||
}
|
||||
|
||||
-/**
|
||||
- * Logging of all methods (old, new, changed, ...)
|
||||
- */
|
||||
+// Logging of all methods (old, new, changed, ...)
|
||||
void VM_EnhancedRedefineClasses::dump_methods() {
|
||||
int j;
|
||||
log_trace(redefine, class, dump)("_old_methods --");
|
||||
@@ -2002,9 +1962,7 @@ void VM_EnhancedRedefineClasses::dump_methods() {
|
||||
}
|
||||
}
|
||||
|
||||
-/**
|
||||
- Helper class to traverse all loaded classes and figure out if the class is affected by redefinition.
|
||||
-*/
|
||||
+// Helper class to traverse all loaded classes and figure out if the class is affected by redefinition.
|
||||
class AffectedKlassClosure : public KlassClosure {
|
||||
private:
|
||||
GrowableArray<Klass*>* _affected_klasses;
|
||||
@@ -2052,10 +2010,8 @@ class AffectedKlassClosure : public KlassClosure {
|
||||
}
|
||||
};
|
||||
|
||||
-/**
|
||||
- Find all affected classes by current redefinition (either because of redefine, class hierarchy or interface change).
|
||||
- Affected classes are stored in _affected_klasses and parent classes always precedes child class.
|
||||
-*/
|
||||
+// Find all affected classes by current redefinition (either because of redefine, class hierarchy or interface change).
|
||||
+// Affected classes are stored in _affected_klasses and parent classes always precedes child class.
|
||||
jvmtiError VM_EnhancedRedefineClasses::find_sorted_affected_classes(TRAPS) {
|
||||
for (int i = 0; i < _class_count; i++) {
|
||||
InstanceKlass* klass_handle = get_ik(_class_defs[i].klass);
|
||||
@@ -2086,9 +2042,7 @@ jvmtiError VM_EnhancedRedefineClasses::find_sorted_affected_classes(TRAPS) {
|
||||
return JVMTI_ERROR_NONE;
|
||||
}
|
||||
|
||||
-/**
|
||||
- Pairs of class dependencies (for topological sort)
|
||||
-*/
|
||||
+// Pairs of class dependencies (for topological sort)
|
||||
struct KlassPair {
|
||||
const Klass* _left;
|
||||
const Klass* _right;
|
||||
@@ -2101,14 +2055,11 @@ static bool match_second(void* value, KlassPair elem) {
|
||||
return elem._right == value;
|
||||
}
|
||||
|
||||
-/**
|
||||
- For each class to be redefined parse the bytecode and figure out the superclass and all interfaces.
|
||||
- First newly introduced classes (_class_defs) are scanned and then affected classed (_affected_klasses).
|
||||
- Affected flag is cleared (clear_redefinition_flag(Klass::MarkedAsAffected))
|
||||
- For each dependency create a KlassPair instance. Finnaly, affected classes (_affected_klasses) are sorted according to pairs.
|
||||
-
|
||||
- TODO - the class file is potentionally parsed multiple times - introduce a cache?
|
||||
-*/
|
||||
+// For each class to be redefined parse the bytecode and figure out the superclass and all interfaces.
|
||||
+// First newly introduced classes (_class_defs) are scanned and then affected classed (_affected_klasses).
|
||||
+// Affected flag is cleared (clear_redefinition_flag(Klass::MarkedAsAffected))
|
||||
+// For each dependency create a KlassPair instance. Finnaly, affected classes (_affected_klasses) are sorted according to pairs.
|
||||
+// TODO - the class file is potentionally parsed multiple times - introduce a cache?
|
||||
jvmtiError VM_EnhancedRedefineClasses::do_topological_class_sorting(TRAPS) {
|
||||
ResourceMark mark(THREAD);
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index 7e2afd49650..d8a11b51fe9 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -35,17 +35,16 @@
|
||||
#include "gc/shared/vmGCOperations.hpp"
|
||||
#include "../../../java.base/unix/native/include/jni_md.h"
|
||||
|
||||
-/**
|
||||
- * Enhanced class redefiner.
|
||||
- *
|
||||
- * This class implements VM_GC_Operation - the usual usage should be:
|
||||
- * VM_EnhancedRedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_redefine);
|
||||
- * VMThread::execute(&op);
|
||||
- * Which in turn runs:
|
||||
- * - doit_prologue() - calculate all affected classes (add subclasses etc) and load new class versions
|
||||
- * - doit() - main redefition, adjust existing objects on the heap, clear caches
|
||||
- * - doit_epilogue() - cleanup
|
||||
-*/
|
||||
+//
|
||||
+// Enhanced class redefiner.
|
||||
+//
|
||||
+// This class implements VM_GC_Operation - the usual usage should be:
|
||||
+// VM_EnhancedRedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_redefine);
|
||||
+// VMThread::execute(&op);
|
||||
+// Which in turn runs:
|
||||
+// - doit_prologue() - calculate all affected classes (add subclasses etc) and load new class versions
|
||||
+// - doit() - main redefition, adjust existing objects on the heap, clear caches
|
||||
+// - doit_epilogue() - cleanup
|
||||
class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
private:
|
||||
// These static fields are needed by ClassLoaderDataGraph::classes_do()
|
||||
@@ -93,17 +92,15 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
|
||||
// These routines are roughly in call order unless otherwise noted.
|
||||
|
||||
- /**
|
||||
- Load and link new classes (either redefined or affected by redefinition - subclass, ...)
|
||||
-
|
||||
- - find sorted affected classes
|
||||
- - resolve new class
|
||||
- - calculate redefine flags (field change, method change, supertype change, ...)
|
||||
- - calculate modified fields and mapping to old fields
|
||||
- - link new classes
|
||||
-
|
||||
- The result is sotred in _affected_klasses(old definitions) and _new_classes(new definitions) arrays.
|
||||
- */
|
||||
+ // Load and link new classes (either redefined or affected by redefinition - subclass, ...)
|
||||
+ //
|
||||
+ // - find sorted affected classes
|
||||
+ // - resolve new class
|
||||
+ // - calculate redefine flags (field change, method change, supertype change, ...)
|
||||
+ // - calculate modified fields and mapping to old fields
|
||||
+ // - link new classes
|
||||
+ //
|
||||
+ // The result is sotred in _affected_klasses(old definitions) and _new_classes(new definitions) arrays.
|
||||
jvmtiError load_new_class_versions(TRAPS);
|
||||
|
||||
// Searches for all affected classes and performs a sorting such tha
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
From 79c80c48da4d52f4616f1c6ef37e838d29be9be1 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 24 May 2020 12:07:09 +0200
|
||||
Subject: [PATCH 47/50] Review threads, cleanup
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 9 ++++-----
|
||||
1 file changed, 4 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 8d00203fd9a..1fbba406087 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -253,7 +253,7 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
// Note: we might set NULL at this point, which should force AbstractMethodError at runtime
|
||||
Thread *thread = Thread::current();
|
||||
CallInfo info(new_method, newest, thread);
|
||||
- Handle objHandle(thread, obj); // TODO : review thread
|
||||
+ Handle objHandle(thread, obj);
|
||||
MethodHandles::init_method_MemberName(objHandle, info);
|
||||
} else {
|
||||
java_lang_invoke_MemberName::set_method(obj, NULL);
|
||||
@@ -280,7 +280,7 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
InstanceKlass* ik_new = InstanceKlass::cast(k->newest_version());
|
||||
fieldDescriptor fd_new;
|
||||
if (ik_new->find_local_field(fd.name(), fd.signature(), &fd_new)) {
|
||||
- Handle objHandle(Thread::current(), obj); // TODO : review thread
|
||||
+ Handle objHandle(Thread::current(), obj);
|
||||
MethodHandles::init_field_MemberName(objHandle, fd_new, MethodHandles::ref_kind_is_setter(ref_kind));
|
||||
} else {
|
||||
// Matching field is not found in new version, not much we can do here.
|
||||
@@ -441,10 +441,9 @@ public:
|
||||
|
||||
|
||||
// Main transformation method - runs in VM thread.
|
||||
-// - UseSharedSpaces - TODO what does it mean?
|
||||
-// - for each sratch class call redefine_single_class
|
||||
+// - for each scratch class call redefine_single_class
|
||||
// - clear code cache (flush_dependent_code)
|
||||
-// - iterate the heap and update object defintions, check it old/new class fields
|
||||
+// - iterate the heap and update object definitions, check it old/new class fields
|
||||
// are compatible. If new class size is smaller then old, it can be solved directly here.
|
||||
// - iterate the heap and update method handles to new version
|
||||
// - Swap marks to have same hashcodes
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,214 +0,0 @@
|
||||
From 55e30de9a54b2f3bec995a2df42fe14b09d16f06 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 21 Jun 2020 13:38:45 +0200
|
||||
Subject: [PATCH 50/50] G1 Heap parallel iterate method "object_par_iterate" +
|
||||
dcevm timers
|
||||
|
||||
G1 Heap does not have parallel iterate method, that is usefull in dcevm
|
||||
iterate phase. According performance tests the parallel iteration is up
|
||||
~25% faster then serial iteration, ratio depends on the size of heap.
|
||||
Dcevm's timers did not make sense. Now, there are timers fo prologue,
|
||||
doit, gc itarate and full gc phases. Iterate+fullgc time make up most
|
||||
the total doit time.
|
||||
---
|
||||
src/hotspot/share/gc/g1/g1CollectedHeap.cpp | 20 ++++++++
|
||||
src/hotspot/share/gc/g1/g1CollectedHeap.hpp | 2 +
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 46 +++++++++++++------
|
||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 5 +-
|
||||
4 files changed, 58 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp
|
||||
index dea8d9fdb0e..33664a30519 100644
|
||||
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp
|
||||
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp
|
||||
@@ -2108,6 +2108,21 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
+class G1IterateObjectClosureTask : public AbstractGangTask {
|
||||
+ private:
|
||||
+ ObjectClosure* _cl;
|
||||
+ G1CollectedHeap* _g1h;
|
||||
+ HeapRegionClaimer _hrclaimer;
|
||||
+ public:
|
||||
+ G1IterateObjectClosureTask(ObjectClosure* cl, G1CollectedHeap* g1h) : AbstractGangTask("IterateObject Closure"),
|
||||
+ _cl(cl), _g1h(g1h), _hrclaimer(g1h->workers()->active_workers()) { }
|
||||
+
|
||||
+ virtual void work(uint worker_id) {
|
||||
+ IterateObjectClosureRegionClosure blk(_cl);
|
||||
+ _g1h->heap_region_par_iterate_from_worker_offset(&blk, &_hrclaimer, worker_id);
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
void G1CollectedHeap::object_iterate(ObjectClosure* cl) {
|
||||
IterateObjectClosureRegionClosure blk(cl);
|
||||
heap_region_iterate(&blk);
|
||||
@@ -2117,6 +2132,11 @@ void G1CollectedHeap::heap_region_iterate(HeapRegionClosure* cl) const {
|
||||
_hrm.iterate(cl);
|
||||
}
|
||||
|
||||
+void G1CollectedHeap::object_par_iterate(ObjectClosure* cl) {
|
||||
+ G1IterateObjectClosureTask iocl_task(cl, this);
|
||||
+ workers()->run_task(&iocl_task);
|
||||
+}
|
||||
+
|
||||
void G1CollectedHeap::heap_region_par_iterate_from_worker_offset(HeapRegionClosure* cl,
|
||||
HeapRegionClaimer *hrclaimer,
|
||||
uint worker_id) const {
|
||||
diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp
|
||||
index 0735eef0da8..05a068bb2e0 100644
|
||||
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp
|
||||
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp
|
||||
@@ -1117,6 +1117,8 @@ public:
|
||||
|
||||
// Iteration functions.
|
||||
|
||||
+ void object_par_iterate(ObjectClosure* cl);
|
||||
+
|
||||
// Iterate over all objects, calling "cl.do_object" on each.
|
||||
virtual void object_iterate(ObjectClosure* cl);
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 32929b3d7a0..5be9bb74305 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -54,6 +54,7 @@
|
||||
#include "utilities/events.hpp"
|
||||
#include "oops/constantPool.inline.hpp"
|
||||
#include "gc/cms/cmsHeap.hpp"
|
||||
+#include "gc/g1/g1CollectedHeap.hpp"
|
||||
#include "gc/shared/dcevmSharedGC.hpp"
|
||||
|
||||
Array<Method*>* VM_EnhancedRedefineClasses::_old_methods = NULL;
|
||||
@@ -459,6 +460,10 @@ public:
|
||||
void VM_EnhancedRedefineClasses::doit() {
|
||||
Thread *thread = Thread::current();
|
||||
|
||||
+ if (log_is_enabled(Info, redefine, class, timer)) {
|
||||
+ _timer_vm_op_doit.start();
|
||||
+ }
|
||||
+
|
||||
#if INCLUDE_CDS
|
||||
if (UseSharedSpaces) {
|
||||
// Sharing is enabled so we remap the shared readonly space to
|
||||
@@ -523,8 +528,22 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
}
|
||||
|
||||
Universe::heap()->ensure_parsability(false);
|
||||
- Universe::heap()->object_iterate(&objectClosure);
|
||||
+ if (UseG1GC) {
|
||||
+ if (log_is_enabled(Info, redefine, class, timer)) {
|
||||
+ _timer_heap_iterate.start();
|
||||
+ }
|
||||
+ G1CollectedHeap::heap()->object_par_iterate(&objectClosure);
|
||||
+ _timer_heap_iterate.stop();
|
||||
+ } else {
|
||||
+ if (log_is_enabled(Info, redefine, class, timer)) {
|
||||
+ _timer_heap_iterate.start();
|
||||
+ }
|
||||
+ Universe::heap()->object_iterate(&objectClosure);
|
||||
+ _timer_heap_iterate.stop();
|
||||
+ }
|
||||
+
|
||||
Universe::root_oops_do(&oopClosureNoBarrier);
|
||||
+
|
||||
}
|
||||
log_trace(redefine, class, obsolete, metadata)("After updating instances");
|
||||
|
||||
@@ -577,12 +596,19 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
|
||||
if (objectClosure.needs_instance_update()) {
|
||||
// Do a full garbage collection to update the instance sizes accordingly
|
||||
+
|
||||
+ if (log_is_enabled(Info, redefine, class, timer)) {
|
||||
+ _timer_heap_full_gc.start();
|
||||
+ }
|
||||
+
|
||||
Universe::set_redefining_gc_run(true);
|
||||
notify_gc_begin(true);
|
||||
// TODO: check _metadata_GC_clear_soft_refs with ScavengeRootsInCode
|
||||
Universe::heap()->collect_as_vm_thread(GCCause::_heap_inspection);
|
||||
notify_gc_end();
|
||||
Universe::set_redefining_gc_run(false);
|
||||
+
|
||||
+ _timer_heap_full_gc.stop();
|
||||
}
|
||||
|
||||
// Unmark Klass*s as "redefining"
|
||||
@@ -630,6 +656,7 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
}
|
||||
#endif
|
||||
|
||||
+ _timer_vm_op_doit.stop();
|
||||
}
|
||||
|
||||
// Cleanup - runs in JVM thread
|
||||
@@ -653,16 +680,14 @@ void VM_EnhancedRedefineClasses::doit_epilogue() {
|
||||
if (log_is_enabled(Info, redefine, class, timer)) {
|
||||
// Used to have separate timers for "doit" and "all", but the timer
|
||||
// overhead skewed the measurements.
|
||||
- jlong doit_time = _timer_rsc_phase1.milliseconds() +
|
||||
- _timer_rsc_phase2.milliseconds();
|
||||
- jlong all_time = _timer_vm_op_prologue.milliseconds() + doit_time;
|
||||
+ jlong all_time = _timer_vm_op_prologue.milliseconds() + _timer_vm_op_doit.milliseconds();
|
||||
|
||||
log_info(redefine, class, timer)
|
||||
("vm_op: all=" JLONG_FORMAT " prologue=" JLONG_FORMAT " doit=" JLONG_FORMAT,
|
||||
- all_time, _timer_vm_op_prologue.milliseconds(), doit_time);
|
||||
+ all_time, _timer_vm_op_prologue.milliseconds(), _timer_vm_op_doit.milliseconds());
|
||||
log_info(redefine, class, timer)
|
||||
- ("redefine_single_class: phase1=" JLONG_FORMAT " phase2=" JLONG_FORMAT,
|
||||
- _timer_rsc_phase1.milliseconds(), _timer_rsc_phase2.milliseconds());
|
||||
+ ("doit: heap iterate=" JLONG_FORMAT " fullgc=" JLONG_FORMAT,
|
||||
+ _timer_heap_iterate.milliseconds(), _timer_heap_full_gc.milliseconds());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1411,7 +1436,7 @@ void VM_EnhancedRedefineClasses::unpatch_bytecode(Method* method) {
|
||||
// arrayKlassOops. See Open Issues in jvmtiRedefineClasses.hpp.
|
||||
void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
|
||||
if (!k->is_instance_klass()) {
|
||||
- return;
|
||||
+ return;
|
||||
}
|
||||
|
||||
HandleMark hm(_thread);
|
||||
@@ -1829,10 +1854,6 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
|
||||
HandleMark hm(THREAD); // make sure handles from this call are freed
|
||||
|
||||
- if (log_is_enabled(Info, redefine, class, timer)) {
|
||||
- _timer_rsc_phase1.start();
|
||||
- }
|
||||
-
|
||||
InstanceKlass* new_class = new_class_oop;
|
||||
InstanceKlass* the_class = InstanceKlass::cast(new_class_oop->old_version());
|
||||
assert(the_class != NULL, "must have old version");
|
||||
@@ -1887,7 +1908,6 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
new_class->external_name(),
|
||||
java_lang_Class::classRedefinedCount(new_class->java_mirror()));
|
||||
}
|
||||
- _timer_rsc_phase2.stop();
|
||||
} // end redefine_single_class()
|
||||
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index 030852b160a..9755944d70b 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -86,9 +86,10 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
// Performance measurement support. These timers do not cover all
|
||||
// the work done for JVM/TI RedefineClasses() but they do cover
|
||||
// the heavy lifting.
|
||||
- elapsedTimer _timer_rsc_phase1;
|
||||
- elapsedTimer _timer_rsc_phase2;
|
||||
+ elapsedTimer _timer_vm_op_doit;
|
||||
elapsedTimer _timer_vm_op_prologue;
|
||||
+ elapsedTimer _timer_heap_iterate;
|
||||
+ elapsedTimer _timer_heap_full_gc;
|
||||
|
||||
// These routines are roughly in call order unless otherwise noted.
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
Index: src/java.desktop/share/classes/module-info.java
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- src/java.desktop/share/classes/module-info.java (revision 5ae6630e3ebc71beb9f9df63b1b5bc19c9405d1f)
|
||||
+++ src/java.desktop/share/classes/module-info.java (date 1588168285537)
|
||||
@@ -109,10 +109,7 @@
|
||||
// see make/GensrcModuleInfo.gmk
|
||||
exports sun.awt to
|
||||
jdk.accessibility,
|
||||
- jdk.unsupported.desktop,
|
||||
- jcef;
|
||||
-
|
||||
- exports java.awt.peer to jcef;
|
||||
+ jdk.unsupported.desktop;
|
||||
|
||||
exports java.awt.dnd.peer to jdk.unsupported.desktop;
|
||||
exports sun.awt.dnd to jdk.unsupported.desktop;
|
||||
Index: modules.list
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- modules.list (revision 5ae6630e3ebc71beb9f9df63b1b5bc19c9405d1f)
|
||||
+++ modules.list (date 1588168285505)
|
||||
@@ -61,5 +61,4 @@
|
||||
jdk.unsupported,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs,
|
||||
-jdk.hotspot.agent,
|
||||
-jcef
|
||||
+jdk.hotspot.agent
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user