mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-14 05:19:45 +01:00
Compare commits
1022 Commits
master14
...
lanai-sync
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0de241433d | ||
|
|
38716935d2 | ||
|
|
fd95090fa2 | ||
|
|
9cb40a9bc7 | ||
|
|
97c7a63ab6 | ||
|
|
3c937001b5 | ||
|
|
623aa48c4f | ||
|
|
978120f46a | ||
|
|
83bbb3941e | ||
|
|
cae4b9cc37 | ||
|
|
1ef1131ab1 | ||
|
|
9226e84501 | ||
|
|
3da068b282 | ||
|
|
cf22b4e7c8 | ||
|
|
3399842d7e | ||
|
|
40e667c174 | ||
|
|
45fea40dbd | ||
|
|
e5d516d182 | ||
|
|
545643880c | ||
|
|
ef335c75e3 | ||
|
|
602d98a72c | ||
|
|
672f3a1857 | ||
|
|
f778ad2f4b | ||
|
|
17ff85d4ad | ||
|
|
c5a7490809 | ||
|
|
37b7a23317 | ||
|
|
f67868d917 | ||
|
|
d243e40f7b | ||
|
|
db88ce172a | ||
|
|
2288788e03 | ||
|
|
b4a3809eaa | ||
|
|
34ae46e2bc | ||
|
|
136a1574ec | ||
|
|
6dffcf7533 | ||
|
|
95d2830361 | ||
|
|
cc83c45595 | ||
|
|
e7204cbc52 | ||
|
|
333a832cea | ||
|
|
104927e514 | ||
|
|
7ded8b1e30 | ||
|
|
3f698242a8 | ||
|
|
b8a2b201b5 | ||
|
|
4f629193a9 | ||
|
|
caa0884400 | ||
|
|
0f7f181d60 | ||
|
|
7143a9c581 | ||
|
|
3340e6f980 | ||
|
|
9874e698b8 | ||
|
|
4a9a1708b3 | ||
|
|
1e217e7b8b | ||
|
|
c1f7fa2ece | ||
|
|
66c8794c81 | ||
|
|
32cba67284 | ||
|
|
029fea432a | ||
|
|
9dc15f17ea | ||
|
|
d3bf915030 | ||
|
|
5695e59a72 | ||
|
|
b4e85913bf | ||
|
|
e2947fe9e8 | ||
|
|
43bbd51b72 | ||
|
|
72b251d372 | ||
|
|
bca2465c94 | ||
|
|
3a7389f564 | ||
|
|
fa069be2f2 | ||
|
|
cd7d175001 | ||
|
|
c9faf88cb7 | ||
|
|
c02799eede | ||
|
|
23fda7e41b | ||
|
|
6ff6db02e7 | ||
|
|
b4863f9dd8 | ||
|
|
032aeb34e6 | ||
|
|
4f1fabd8d0 | ||
|
|
afe70e6985 | ||
|
|
f3ef97263f | ||
|
|
40f6d697d2 | ||
|
|
bd78beae15 | ||
|
|
8b636c6a87 | ||
|
|
26d9a0794c | ||
|
|
15a838d312 | ||
|
|
7744fb099e | ||
|
|
315635ea09 | ||
|
|
bce81496ce | ||
|
|
cc9470ece1 | ||
|
|
a51dd58f38 | ||
|
|
dd63eec6e5 | ||
|
|
cadfc3d570 | ||
|
|
f1c919f28f | ||
|
|
599af2ac26 | ||
|
|
c7c8623ed6 | ||
|
|
99546049b3 | ||
|
|
44eca823aa | ||
|
|
9d7f8bc9a0 | ||
|
|
af28093ed8 | ||
|
|
9fe762d3c5 | ||
|
|
ea367322f2 | ||
|
|
34b9ac2287 | ||
|
|
bf54c47471 | ||
|
|
700f50f287 | ||
|
|
b70ef0d2e2 | ||
|
|
c6cec8a8ea | ||
|
|
1170981e93 | ||
|
|
0ee7497937 | ||
|
|
f2fb5c54ae | ||
|
|
efb25e5127 | ||
|
|
abc5619317 | ||
|
|
d76b0cf705 | ||
|
|
1d4a4fed43 | ||
|
|
e827f4ae1c | ||
|
|
e5e24ad080 | ||
|
|
0c9f8e472f | ||
|
|
a147636157 | ||
|
|
94a6149de5 | ||
|
|
f959b01203 | ||
|
|
c003fffd84 | ||
|
|
6083173f9b | ||
|
|
176192499f | ||
|
|
ec5bd02186 | ||
|
|
1a0995981c | ||
|
|
035100cc89 | ||
|
|
dbd0f0dc3b | ||
|
|
6f7a103abc | ||
|
|
195361216c | ||
|
|
2b4b3d9efc | ||
|
|
e746891f96 | ||
|
|
21cd75cb98 | ||
|
|
6ddb0f2b2c | ||
|
|
95898e86a1 | ||
|
|
4b978533ca | ||
|
|
f819e417f9 | ||
|
|
b019469232 | ||
|
|
6ead90568f | ||
|
|
3aeb2d1a51 | ||
|
|
c7e4b2afe2 | ||
|
|
afa54b7ed5 | ||
|
|
2b465b1ebf | ||
|
|
37629673e7 | ||
|
|
afbe2286e2 | ||
|
|
9e94572078 | ||
|
|
9d502f648c | ||
|
|
5ed80778bc | ||
|
|
5a68ba1339 | ||
|
|
05c539c9b4 | ||
|
|
2a35bc5aee | ||
|
|
a8b4801859 | ||
|
|
38940d166a | ||
|
|
0610992a8f | ||
|
|
2eaeb20697 | ||
|
|
5bc78c438b | ||
|
|
e30b89e138 | ||
|
|
e9494f2155 | ||
|
|
d5d6dc0caa | ||
|
|
36fac8c332 | ||
|
|
ed8c11e0d1 | ||
|
|
3aceb74ac9 | ||
|
|
58337b12f8 | ||
|
|
3ee99ca1d7 | ||
|
|
de5208e3c0 | ||
|
|
71e1277fb3 | ||
|
|
0ed44d0aee | ||
|
|
e5ab701157 | ||
|
|
70e730fd5c | ||
|
|
90a39195c1 | ||
|
|
c68e15c0c3 | ||
|
|
fee69babbd | ||
|
|
eeaafbe141 | ||
|
|
f66a1f1263 | ||
|
|
bc73e009cc | ||
|
|
e70ee3dcf7 | ||
|
|
23def435d4 | ||
|
|
c2867d6577 | ||
|
|
6b45504934 | ||
|
|
26a7b0dddd | ||
|
|
9d0a4875d7 | ||
|
|
c42de93347 | ||
|
|
70e2c013d7 | ||
|
|
35ee1cb2b3 | ||
|
|
78d35f1435 | ||
|
|
96b61b8f4b | ||
|
|
c280d98e80 | ||
|
|
e455d382e7 | ||
|
|
6bb0536293 | ||
|
|
ff5966de7f | ||
|
|
65bf61852f | ||
|
|
6ab1ed5817 | ||
|
|
0532bd23cd | ||
|
|
5e912fbec5 | ||
|
|
075e1321e3 | ||
|
|
6a57e1fd9c | ||
|
|
2e6bdc171a | ||
|
|
55768aa45d | ||
|
|
742bdf003e | ||
|
|
0a820d6d21 | ||
|
|
5bfb8146e9 | ||
|
|
f176fae840 | ||
|
|
add146cc8b | ||
|
|
b247e6d908 | ||
|
|
1be89d9640 | ||
|
|
b38f3cf3bd | ||
|
|
8a79f26795 | ||
|
|
6ad1db40d8 | ||
|
|
5afeeed5b2 | ||
|
|
637795e0a7 | ||
|
|
0cd6d13b24 | ||
|
|
bd25c0e01a | ||
|
|
290c21f067 | ||
|
|
0ab5b968fb | ||
|
|
511501048c | ||
|
|
3a5ee7b422 | ||
|
|
518f1f9a6e | ||
|
|
39d75e894b | ||
|
|
4a951001b5 | ||
|
|
ed62024978 | ||
|
|
efdc0037b8 | ||
|
|
882633a738 | ||
|
|
5551d3d888 | ||
|
|
a1e9328367 | ||
|
|
2ba0575cea | ||
|
|
c8ed0128c2 | ||
|
|
67ba91ba52 | ||
|
|
eef5ef88b3 | ||
|
|
52fe584c5a | ||
|
|
530d53f84e | ||
|
|
cea9a9b8ce | ||
|
|
be1007cfaf | ||
|
|
f729514ebd | ||
|
|
257de28b2c | ||
|
|
6913bbc200 | ||
|
|
d26dadef43 | ||
|
|
331f492ad5 | ||
|
|
b09add641b | ||
|
|
e8c32ccb2f | ||
|
|
9b12c80e21 | ||
|
|
b08595d844 | ||
|
|
fa7f53ee93 | ||
|
|
b4ff6abe63 | ||
|
|
8b73900222 | ||
|
|
add18914fb | ||
|
|
48c48b7a85 | ||
|
|
1f189228b6 | ||
|
|
21d3eaf587 | ||
|
|
d49cf17db0 | ||
|
|
7fe46b2464 | ||
|
|
c5bd0d7934 | ||
|
|
0368e41c12 | ||
|
|
19e02810db | ||
|
|
b0f32c4431 | ||
|
|
92686e1add | ||
|
|
069d9e792e | ||
|
|
5b9a09cb9c | ||
|
|
6b487c3cfe | ||
|
|
5531199db4 | ||
|
|
db69852ac2 | ||
|
|
8c6649dea0 | ||
|
|
5b323a8656 | ||
|
|
14e37ba3df | ||
|
|
6275aee690 | ||
|
|
eb974fad6d | ||
|
|
d778097371 | ||
|
|
0992e17b97 | ||
|
|
661c073594 | ||
|
|
534331f0a1 | ||
|
|
43e0fc04b0 | ||
|
|
593a05c93a | ||
|
|
1c1acb4757 | ||
|
|
441e16e2db | ||
|
|
99b28daf56 | ||
|
|
80ca356e7e | ||
|
|
08c3b1fc8f | ||
|
|
5eef59d22d | ||
|
|
0fd2ac701f | ||
|
|
39ab073173 | ||
|
|
53c6887a3d | ||
|
|
75632a6df2 | ||
|
|
0e3529ad10 | ||
|
|
02916dbb0b | ||
|
|
1dcd3d2c50 | ||
|
|
072cfd2e48 | ||
|
|
8208b9ce32 | ||
|
|
42ff13ab82 | ||
|
|
f4b5488181 | ||
|
|
aac5b27b6a | ||
|
|
edaf548beb | ||
|
|
d49eb0d9a7 | ||
|
|
43e0165eea | ||
|
|
d112950b5b | ||
|
|
9722dfc9bc | ||
|
|
2ba5ed53d6 | ||
|
|
f09cda2c70 | ||
|
|
672992f6ac | ||
|
|
123ac07064 | ||
|
|
5c8f935641 | ||
|
|
dc17821807 | ||
|
|
aa2be1141d | ||
|
|
e0fec43a9b | ||
|
|
a11912ca06 | ||
|
|
3ff8eff804 | ||
|
|
b58c8601bb | ||
|
|
1c1fb44ac1 | ||
|
|
ba2e4178ce | ||
|
|
046dcdc0bc | ||
|
|
7806ca1477 | ||
|
|
3d9dddd658 | ||
|
|
d0e44e5bb4 | ||
|
|
ff8e7d4087 | ||
|
|
f222cb8b8c | ||
|
|
c46623d071 | ||
|
|
c203cebcdf | ||
|
|
9f334a1640 | ||
|
|
9e2ab1e363 | ||
|
|
8c1204de6b | ||
|
|
375d0c1325 | ||
|
|
e2f4319171 | ||
|
|
f87ebd9e5d | ||
|
|
d8bded6fb4 | ||
|
|
c92adf4158 | ||
|
|
14c098610a | ||
|
|
f0cd9dd5c4 | ||
|
|
95a497ae9f | ||
|
|
25d2db06c4 | ||
|
|
3adad5a645 | ||
|
|
f10fd7a78e | ||
|
|
9c6a769618 | ||
|
|
f456f151cc | ||
|
|
001b8056c8 | ||
|
|
4a32eda417 | ||
|
|
3607ddd55a | ||
|
|
db91be2ee1 | ||
|
|
d75e62e16b | ||
|
|
78982f7c11 | ||
|
|
3ddd7b86c8 | ||
|
|
3490262a6b | ||
|
|
b2f1f73e75 | ||
|
|
d1818942b0 | ||
|
|
7ba18fc015 | ||
|
|
6cb2e02af6 | ||
|
|
10b09c7982 | ||
|
|
5229896f4f | ||
|
|
edb59b58b9 | ||
|
|
01ef6d791f | ||
|
|
ff843fabec | ||
|
|
128f083359 | ||
|
|
ef4053ee41 | ||
|
|
aa54795965 | ||
|
|
e44dcf09c0 | ||
|
|
0c9983887d | ||
|
|
9d57eefe6e | ||
|
|
b3666b94a3 | ||
|
|
8e74ed46df | ||
|
|
72cac62f89 | ||
|
|
dd393fadc4 | ||
|
|
2298819af8 | ||
|
|
f6e5c5a7ea | ||
|
|
bdc481e96d | ||
|
|
934db29ac5 | ||
|
|
e6f0c6bb9a | ||
|
|
dd8dbb66eb | ||
|
|
98743762dd | ||
|
|
f916df3b0e | ||
|
|
b5e162200b | ||
|
|
b5fdcb0851 | ||
|
|
f0445c24e8 | ||
|
|
53ee0c4963 | ||
|
|
1b92518389 | ||
|
|
98e0a704d4 | ||
|
|
7d5652f14a | ||
|
|
00e009d729 | ||
|
|
d7a0206262 | ||
|
|
ca838e68c9 | ||
|
|
956e20ed16 | ||
|
|
5a7b5863f0 | ||
|
|
9c35471ae0 | ||
|
|
52d7a61e8d | ||
|
|
8493812702 | ||
|
|
c30f84536e | ||
|
|
c4059c667d | ||
|
|
649a4d0613 | ||
|
|
8167fe956f | ||
|
|
f7c819a72d | ||
|
|
965e330cb4 | ||
|
|
266446f316 | ||
|
|
bb7344d919 | ||
|
|
ccdde49728 | ||
|
|
0f21211e15 | ||
|
|
bc87e7829e | ||
|
|
a9207420c5 | ||
|
|
acd2d32913 | ||
|
|
4f20fa5246 | ||
|
|
38a57e8bed | ||
|
|
aab0ce5f1c | ||
|
|
289513cc2b | ||
|
|
86ad195099 | ||
|
|
1e796eae8f | ||
|
|
89448a83d9 | ||
|
|
467ee78a52 | ||
|
|
ea55699f34 | ||
|
|
3ca275fb91 | ||
|
|
cf89ff7a4b | ||
|
|
52cfd292cc | ||
|
|
3fdf26d8dc | ||
|
|
2a79146791 | ||
|
|
908a933131 | ||
|
|
d0b2ad3e82 | ||
|
|
3c72042627 | ||
|
|
3f140fafab | ||
|
|
bd028945bd | ||
|
|
533649b8ca | ||
|
|
2596e83a34 | ||
|
|
63f939636a | ||
|
|
92b26333a4 | ||
|
|
6c0e3aeacd | ||
|
|
305fe226dc | ||
|
|
eef02376bd | ||
|
|
976473690b | ||
|
|
5275d6e2d9 | ||
|
|
ed94c0af10 | ||
|
|
da39778d42 | ||
|
|
35db376986 | ||
|
|
fb37c54630 | ||
|
|
f40220f578 | ||
|
|
23458bf4c5 | ||
|
|
2d93a28447 | ||
|
|
b4ffe4d8f7 | ||
|
|
58a5910393 | ||
|
|
c6e9d209c5 | ||
|
|
32a1a537f0 | ||
|
|
5199fb702d | ||
|
|
80f5a47b4a | ||
|
|
e6915ff175 | ||
|
|
5705a55161 | ||
|
|
784e575134 | ||
|
|
8d2aa62bd9 | ||
|
|
7af366a7e1 | ||
|
|
ff55c4903b | ||
|
|
3bd02981db | ||
|
|
dfaaec9aff | ||
|
|
4d00104f55 | ||
|
|
5f44b6ca1b | ||
|
|
0b3cf5ea13 | ||
|
|
1b3b413ee6 | ||
|
|
cf83f8e364 | ||
|
|
728592dd22 | ||
|
|
ac9c2601b8 | ||
|
|
90ee2c3d6e | ||
|
|
c1f4ea5d68 | ||
|
|
1643bc3def | ||
|
|
952f32e375 | ||
|
|
39db83a9cc | ||
|
|
e028bb4f2b | ||
|
|
8a1132d3a2 | ||
|
|
3174bd2c75 | ||
|
|
84f3e86749 | ||
|
|
1491340708 | ||
|
|
ac60e4b98e | ||
|
|
d7b122ed69 | ||
|
|
ebadfaeb2e | ||
|
|
751de03704 | ||
|
|
6e24ac5e09 | ||
|
|
080c16d36d | ||
|
|
a59e8a7f6f | ||
|
|
aa3638a32d | ||
|
|
983fc23fd1 | ||
|
|
84c24a49ad | ||
|
|
fbca3fa710 | ||
|
|
987be2bb6d | ||
|
|
b83285facc | ||
|
|
f0cdbbe120 | ||
|
|
080c67f096 | ||
|
|
9886cb401c | ||
|
|
304d764a72 | ||
|
|
326a939e1b | ||
|
|
c23d1de2f8 | ||
|
|
6d8ae023f2 | ||
|
|
c8002d297a | ||
|
|
060e4ec305 | ||
|
|
9fb0aeecb6 | ||
|
|
3b48643a82 | ||
|
|
07ac868b77 | ||
|
|
8c0fab8fbe | ||
|
|
a59ed930f5 | ||
|
|
0b5d48b9e6 | ||
|
|
6aeb78d3df | ||
|
|
04c1e2e931 | ||
|
|
71d7af4b23 | ||
|
|
970283b601 | ||
|
|
f1a2c6019e | ||
|
|
ac69c7894d | ||
|
|
7552915d3f | ||
|
|
3461ce9800 | ||
|
|
faa88c1da6 | ||
|
|
c33107053b | ||
|
|
214edaf9c2 | ||
|
|
c028965f35 | ||
|
|
bbc3d16705 | ||
|
|
1af34250aa | ||
|
|
785e7ec761 | ||
|
|
05b98dd4f9 | ||
|
|
a2d1099854 | ||
|
|
96a52e96de | ||
|
|
57e1ab737d | ||
|
|
7fa7536d7e | ||
|
|
7bc2660967 | ||
|
|
a768bfdf4d | ||
|
|
0aeed751e6 | ||
|
|
c4ef423d8e | ||
|
|
d9df6feabe | ||
|
|
d5e2e1ae13 | ||
|
|
6f7f81f794 | ||
|
|
eef726a99a | ||
|
|
e8f8eef908 | ||
|
|
3318314c7c | ||
|
|
a19ff9d98a | ||
|
|
d2cd7a5096 | ||
|
|
0ae7207e95 | ||
|
|
883a4f65b9 | ||
|
|
64a1b0599e | ||
|
|
f779e49590 | ||
|
|
b936939454 | ||
|
|
330100ddce | ||
|
|
2f76772fa9 | ||
|
|
269e7e98e6 | ||
|
|
fdbea219a1 | ||
|
|
4aab3078a2 | ||
|
|
4ca0699585 | ||
|
|
d4c3278889 | ||
|
|
6ef474a4f4 | ||
|
|
2867609482 | ||
|
|
c6da6681d4 | ||
|
|
39992dea38 | ||
|
|
a589a15e3f | ||
|
|
f129cc4328 | ||
|
|
529587547c | ||
|
|
0414acb5d6 | ||
|
|
72a4aa8c11 | ||
|
|
c639682887 | ||
|
|
3cf8b34d54 | ||
|
|
4aab785db1 | ||
|
|
7ecca1ea3c | ||
|
|
de96aeddf5 | ||
|
|
631b4d2694 | ||
|
|
8d307c1168 | ||
|
|
d32cfe3e40 | ||
|
|
bf16838a8b | ||
|
|
136f957e05 | ||
|
|
832baeaf4d | ||
|
|
2b9fef7d7b | ||
|
|
b79d75d033 | ||
|
|
2c5167803a | ||
|
|
5049cad2b0 | ||
|
|
ab90653aa9 | ||
|
|
913b8702d1 | ||
|
|
1b24cf800f | ||
|
|
91bb1d3700 | ||
|
|
861e1addda | ||
|
|
0ba8940ac0 | ||
|
|
3899de42ae | ||
|
|
6234206fc1 | ||
|
|
c2b462cf02 | ||
|
|
76b1472989 | ||
|
|
682af8be65 | ||
|
|
984da450f2 | ||
|
|
21c02a5b18 | ||
|
|
11738f10a7 | ||
|
|
cf468f1791 | ||
|
|
9ab387d14e | ||
|
|
4a84146e43 | ||
|
|
d6a5897f41 | ||
|
|
639e97df46 | ||
|
|
31b9bbd87b | ||
|
|
257a1bb854 | ||
|
|
11c073b97e | ||
|
|
ea83ced243 | ||
|
|
4b00d5753d | ||
|
|
4f35b4a65c | ||
|
|
984abfeb3f | ||
|
|
5de40a0867 | ||
|
|
78c4ab4449 | ||
|
|
016b0f0caa | ||
|
|
943b87ddde | ||
|
|
ff914903b9 | ||
|
|
fab3122111 | ||
|
|
584db9818a | ||
|
|
7d8519fffe | ||
|
|
1cf603e8fc | ||
|
|
769f853592 | ||
|
|
ed044e9142 | ||
|
|
c4b8e38de4 | ||
|
|
ee5729ac21 | ||
|
|
ffe68bcb24 | ||
|
|
5915ab980b | ||
|
|
2e237e35fd | ||
|
|
8a1b5ad914 | ||
|
|
6da7ea6ea3 | ||
|
|
0a9a7e2f6c | ||
|
|
396c363517 | ||
|
|
364be79d47 | ||
|
|
14b9fe08fe | ||
|
|
2ff87c63e3 | ||
|
|
e73ce9b406 | ||
|
|
206d72aee2 | ||
|
|
e8fdc9408e | ||
|
|
8f8f43999c | ||
|
|
e13f184eb3 | ||
|
|
2ad73d2e67 | ||
|
|
a941e59035 | ||
|
|
c4baadb3c9 | ||
|
|
911846b49b | ||
|
|
e2644b70cf | ||
|
|
995da6eb2a | ||
|
|
4cb20ae300 | ||
|
|
f4af0eadb6 | ||
|
|
c33466012e | ||
|
|
f19738aba3 | ||
|
|
1af059d4cb | ||
|
|
1745ae28b9 | ||
|
|
00c40ae1e3 | ||
|
|
38f0c08ee0 | ||
|
|
9c8f05279c | ||
|
|
9abc1a4441 | ||
|
|
9f21d809ab | ||
|
|
ccbd819a01 | ||
|
|
e37a6aed88 | ||
|
|
26b642f92f | ||
|
|
87031d4728 | ||
|
|
b3f01bb39f | ||
|
|
df72b2e2d6 | ||
|
|
d19a396e96 | ||
|
|
2ede36b3a3 | ||
|
|
df12f8b5d2 | ||
|
|
dfa757aed0 | ||
|
|
9b9830ced7 | ||
|
|
b59f630249 | ||
|
|
2d6ed667d2 | ||
|
|
79ed5ba492 | ||
|
|
98f5d98a88 | ||
|
|
c0f23a8604 | ||
|
|
f1332640d4 | ||
|
|
a7a82b0c79 | ||
|
|
8ff24c55ef | ||
|
|
b9e3a4efef | ||
|
|
e7e182a318 | ||
|
|
ccb4ab5499 | ||
|
|
03721247d8 | ||
|
|
ce28a96c28 | ||
|
|
d6aeda7b24 | ||
|
|
c09e02193b | ||
|
|
89e9ae9b3c | ||
|
|
06579fcefa | ||
|
|
029f547700 | ||
|
|
9d7777e585 | ||
|
|
b75d37538d | ||
|
|
a88734eadc | ||
|
|
b069da31e0 | ||
|
|
e104b4cee1 | ||
|
|
135f209852 | ||
|
|
f2b7509d5a | ||
|
|
ef41763d32 | ||
|
|
edd28610d5 | ||
|
|
358c56bb8b | ||
|
|
77ad678fce | ||
|
|
76675e93cf | ||
|
|
4b8a5f991f | ||
|
|
0330504ba7 | ||
|
|
1cd5eac5c3 | ||
|
|
319d6976a5 | ||
|
|
f6eaac48b8 | ||
|
|
b940e17c9e | ||
|
|
4122968ab6 | ||
|
|
18d6d92a06 | ||
|
|
ac6073f0a5 | ||
|
|
ee9483bd87 | ||
|
|
85f5e328ed | ||
|
|
b5bf0d6d2f | ||
|
|
bd7fd5610e | ||
|
|
cb636b2c0b | ||
|
|
9cfd632ef6 | ||
|
|
987ba9f3a4 | ||
|
|
44444bb249 | ||
|
|
9dcbd81920 | ||
|
|
4aa5cf5bca | ||
|
|
83911960d4 | ||
|
|
0f06a9a5cd | ||
|
|
24691f248c | ||
|
|
91d58b8f96 | ||
|
|
06456a9773 | ||
|
|
af5c725b81 | ||
|
|
dfb31205a1 | ||
|
|
cd01fa372e | ||
|
|
0b9ff0c3a4 | ||
|
|
d65f9665df | ||
|
|
c4b708b255 | ||
|
|
0b45b7a291 | ||
|
|
5d8d4cecf7 | ||
|
|
c484e1cee0 | ||
|
|
28801066d0 | ||
|
|
8aff9fca35 | ||
|
|
70fdf1e5ee | ||
|
|
5b5a5353e7 | ||
|
|
a2bbf933d9 | ||
|
|
f262092fd9 | ||
|
|
73cdeafe98 | ||
|
|
e0901fb627 | ||
|
|
9d5d2a241a | ||
|
|
91a031aa87 | ||
|
|
0dd3aaf0ed | ||
|
|
3eb71de759 | ||
|
|
6fd7ad87ce | ||
|
|
c718a082a4 | ||
|
|
2f45d46640 | ||
|
|
41f962d784 | ||
|
|
0b22124ee4 | ||
|
|
5c3d9a7d04 | ||
|
|
69f1538631 | ||
|
|
f2013ac247 | ||
|
|
a89b838d91 | ||
|
|
efa4d2f9e1 | ||
|
|
64288e1e76 | ||
|
|
e5a99b29f1 | ||
|
|
fc8d71b119 | ||
|
|
08e63539f2 | ||
|
|
6b4223eec2 | ||
|
|
99b9939318 | ||
|
|
5ac7dfa2bf | ||
|
|
3884792cda | ||
|
|
e438fb4c62 | ||
|
|
1ca54e1455 | ||
|
|
7cae6c3564 | ||
|
|
49dc57cd10 | ||
|
|
a94b4fc695 | ||
|
|
7cd21cfdec | ||
|
|
90d656d2f6 | ||
|
|
9085b7bdc7 | ||
|
|
4fdcb47304 | ||
|
|
5b1f960752 | ||
|
|
abadeda8a5 | ||
|
|
d97fe7b050 | ||
|
|
c8e7590899 | ||
|
|
46423b0f70 | ||
|
|
b223907794 | ||
|
|
17106c9e9d | ||
|
|
5013cf6e0c | ||
|
|
0f98701e87 | ||
|
|
9e4830fc30 | ||
|
|
c6c828fa6e | ||
|
|
6c9a6eac81 | ||
|
|
5e9d3fdc9c | ||
|
|
94bb505c94 | ||
|
|
4eacb6361b | ||
|
|
ffcc582601 | ||
|
|
da7cebabb2 | ||
|
|
a0882bf4cc | ||
|
|
3c5a7e9ffc | ||
|
|
6c4e2e70be | ||
|
|
78ff45ee33 | ||
|
|
b1d5bee8ca | ||
|
|
c6126d638c | ||
|
|
245b61c506 | ||
|
|
7c27f9f5dd | ||
|
|
d517220df6 | ||
|
|
b7cdc097e3 | ||
|
|
d5bdb76e84 | ||
|
|
ac7f36ce25 | ||
|
|
b25bb17b41 | ||
|
|
b21e04af5d | ||
|
|
c6a4cea7a0 | ||
|
|
d1ad0eaf8f | ||
|
|
4f22b49c85 | ||
|
|
d86eb1de69 | ||
|
|
9628324ae7 | ||
|
|
fb1c57789e | ||
|
|
91008df5a8 | ||
|
|
68122fd64e | ||
|
|
9695ddfffc | ||
|
|
a170a4af4a | ||
|
|
e4c96dea46 | ||
|
|
18bc0214db | ||
|
|
75f2e6433c | ||
|
|
e2d1e4c804 | ||
|
|
ef14de54e7 | ||
|
|
61cfabff57 | ||
|
|
4def210a22 | ||
|
|
8827df9b2d | ||
|
|
732a575738 | ||
|
|
9fdcdf4a3e | ||
|
|
7b24bd68c2 | ||
|
|
16c75e67cf | ||
|
|
fff8438af8 | ||
|
|
6015cab798 | ||
|
|
09f5194d38 | ||
|
|
7f3bbc3f20 | ||
|
|
d4a069b33b | ||
|
|
11386e7cb2 | ||
|
|
56282f7119 | ||
|
|
36cd7bdb7f | ||
|
|
f3cd52e3c7 | ||
|
|
58a0360039 | ||
|
|
a6dbc71114 | ||
|
|
bf6c14f034 | ||
|
|
cea8931aed | ||
|
|
ccb5defde4 | ||
|
|
0e49c4987d | ||
|
|
b6c1b49c97 | ||
|
|
f75f78ae3a | ||
|
|
6f6b4c0ef9 | ||
|
|
28c630046e | ||
|
|
301a2e19c3 | ||
|
|
cb2eeb7d9a | ||
|
|
4e430ffbb6 | ||
|
|
8aff5bda80 | ||
|
|
5d9c59f2f8 | ||
|
|
74bee68872 | ||
|
|
b369aefc79 | ||
|
|
cf4291db37 | ||
|
|
41d457a089 | ||
|
|
eaff9918d2 | ||
|
|
52d46c314b | ||
|
|
e4b27a48a0 | ||
|
|
248b61710e | ||
|
|
2f17073230 | ||
|
|
0249cadd62 | ||
|
|
3c7858c285 | ||
|
|
c4681a95dc | ||
|
|
71ed4f276b | ||
|
|
612342baaa | ||
|
|
110ef6f2c3 | ||
|
|
8119f836bf | ||
|
|
3bb62dc0d8 | ||
|
|
18c01206d0 | ||
|
|
b4b8ead78b | ||
|
|
945e42212d | ||
|
|
485115d1b3 | ||
|
|
416ac1d01e | ||
|
|
27391005a5 | ||
|
|
bcb804f07f | ||
|
|
b72e31b39f | ||
|
|
087074334d | ||
|
|
3c18ed58a1 | ||
|
|
4c707c1df3 | ||
|
|
f844943273 | ||
|
|
683a5b1197 | ||
|
|
1ef862d03d | ||
|
|
5b4d80d106 | ||
|
|
30707f8007 | ||
|
|
a4616a7b49 | ||
|
|
18b31b1f02 | ||
|
|
d298a05d02 | ||
|
|
2ac2d590c2 | ||
|
|
3ea92e735b | ||
|
|
e2829b7b87 | ||
|
|
8bdb972192 | ||
|
|
b0b8190ea2 | ||
|
|
446f59a26c | ||
|
|
cafdbcc6ef | ||
|
|
78f58c3e39 | ||
|
|
00484e9446 | ||
|
|
4e4d1f2b4d | ||
|
|
25c5a23695 | ||
|
|
eccdd8e603 | ||
|
|
93241e5db7 | ||
|
|
aa4ef80f6a | ||
|
|
5c3a01591c | ||
|
|
2fbbce2b23 | ||
|
|
a239c475cf | ||
|
|
411766b6bb | ||
|
|
1e0167ef92 | ||
|
|
c103a1bb69 | ||
|
|
8969aeb16b | ||
|
|
fc3b42fc8e | ||
|
|
1f17842583 | ||
|
|
c37ebcd730 | ||
|
|
56a7631555 | ||
|
|
fff1a59cfa | ||
|
|
898a903530 | ||
|
|
5e9dc46d21 | ||
|
|
74e68b4092 | ||
|
|
0d84fe9872 | ||
|
|
590f5996c6 | ||
|
|
c16040393c | ||
|
|
1d42f083c1 | ||
|
|
ddc851536c | ||
|
|
76da2b777a | ||
|
|
dee4009a97 | ||
|
|
e682c5129a | ||
|
|
cdcb094b65 | ||
|
|
1691abc747 | ||
|
|
537653bd49 | ||
|
|
4fd7c3c449 | ||
|
|
3ad9078968 | ||
|
|
2ec02181fa | ||
|
|
14e6b1244c | ||
|
|
24bff4e701 | ||
|
|
d462a6b5c9 | ||
|
|
71340f51fa | ||
|
|
65354d838a | ||
|
|
72609092fe | ||
|
|
d98a39a0e7 | ||
|
|
74f0ef5050 | ||
|
|
c6dc3308a1 | ||
|
|
a4b3e781fe | ||
|
|
18d73cb8e5 | ||
|
|
567465c62c | ||
|
|
0b2da9e239 | ||
|
|
163875d24b | ||
|
|
a544090944 | ||
|
|
bd1eff9e32 | ||
|
|
75912b7aaa | ||
|
|
7fc58a1020 | ||
|
|
e2240b714e | ||
|
|
51d5164ca2 | ||
|
|
76e420d790 | ||
|
|
a86e196559 | ||
|
|
e80a188257 | ||
|
|
abfab9e0a7 | ||
|
|
ec5869eb2e | ||
|
|
d34f561de0 | ||
|
|
eb6fa14ee6 | ||
|
|
642037eee8 | ||
|
|
45bc3871f5 | ||
|
|
c0b4e0cb25 | ||
|
|
7b5de56fc3 | ||
|
|
ff77d06f17 | ||
|
|
c0dce25756 | ||
|
|
7707e32b00 | ||
|
|
8d2e11397a | ||
|
|
f243173a18 | ||
|
|
e4aa87b816 | ||
|
|
b63b9a2edb | ||
|
|
ddcac6f066 | ||
|
|
18b550e872 | ||
|
|
fab846163c | ||
|
|
03aa3101a1 | ||
|
|
c8b91c2d3f | ||
|
|
5b3c412357 | ||
|
|
95b69fe529 | ||
|
|
535fff0dac | ||
|
|
bbfac12c68 | ||
|
|
1768149951 | ||
|
|
49ca894f15 | ||
|
|
0f76adc28d | ||
|
|
cfc96d96f7 | ||
|
|
4921d927e0 | ||
|
|
61aeca21c1 | ||
|
|
fda678bef9 | ||
|
|
aba2c30d1e | ||
|
|
3ecd356574 | ||
|
|
762853fe8f | ||
|
|
f879fa4e34 | ||
|
|
6c8022b1ee | ||
|
|
d691007acc | ||
|
|
9f250e53c8 | ||
|
|
7cba2b956a | ||
|
|
c4ee724176 | ||
|
|
393e924d2d | ||
|
|
fcba1675a7 | ||
|
|
493e7d102a | ||
|
|
54f1e4ec23 | ||
|
|
a59e9ab2ac | ||
|
|
6bd87cb96f | ||
|
|
7a448bc74d | ||
|
|
b5cc29da48 | ||
|
|
d98d18b297 | ||
|
|
1441538b23 | ||
|
|
8c1efbe38b | ||
|
|
27e0cdf12d | ||
|
|
75cd193aac | ||
|
|
14591108c7 | ||
|
|
aea0a57512 | ||
|
|
03c3f174ae | ||
|
|
e788e6dd46 | ||
|
|
c670ebb56b | ||
|
|
dc5728ed95 | ||
|
|
a3c0f4c804 | ||
|
|
7840d02140 | ||
|
|
ab7cfde85c | ||
|
|
a1b2e1042c | ||
|
|
fae788a200 | ||
|
|
bdaa9c6a1c | ||
|
|
a1d396c6cb | ||
|
|
df75426b4f | ||
|
|
b4459723ad | ||
|
|
ba9d4ad45a | ||
|
|
14459b2ad2 | ||
|
|
0743555685 | ||
|
|
d5a8e018d5 | ||
|
|
4e68ac9b15 | ||
|
|
fa070554cb | ||
|
|
e16d4a45b0 | ||
|
|
ee5777c700 | ||
|
|
3f865f4bf2 | ||
|
|
9b2bbd3df4 | ||
|
|
010ac54044 | ||
|
|
bd6ab22a59 | ||
|
|
dcb17bad55 | ||
|
|
9a31ab8862 | ||
|
|
83cb7044e9 | ||
|
|
31b07b21ae | ||
|
|
924720f6fc | ||
|
|
bc97279caf | ||
|
|
89e0d29101 | ||
|
|
1b4b652408 | ||
|
|
8b2453f93b | ||
|
|
83163dbfe6 | ||
|
|
820e1a7e14 | ||
|
|
5e85366785 | ||
|
|
9555be71a5 | ||
|
|
bf9bc1f320 | ||
|
|
f82e4b1b76 | ||
|
|
1ae2478404 | ||
|
|
6ccfc65ec3 | ||
|
|
3c0e2b4e16 | ||
|
|
4d1176fd60 | ||
|
|
20b1410d0c | ||
|
|
57ece4c21a | ||
|
|
94e8d6eca4 | ||
|
|
4fa827ec92 | ||
|
|
06ecbfd3da | ||
|
|
71da14104a | ||
|
|
9b4539886c | ||
|
|
2d2383bf32 | ||
|
|
74882b0d0d | ||
|
|
890826bf5b | ||
|
|
8a54d97a4d | ||
|
|
e4c332cd92 |
19
.hgtags
19
.hgtags
@@ -599,15 +599,30 @@ c16ac7a2eba4e73cb4f7ee9294dd647860eebff0 jdk-14+21
|
||||
438337c846fb071900ddb6922bddf8b3e895a514 jdk-14+24
|
||||
17d242844fc9e7d18b3eac97426490a9c246119e jdk-14+25
|
||||
288777cf0702914e5266bc1e5d380eed9032ca41 jdk-14+26
|
||||
2c724dba4c3cf9516b2152e151c9aea66b21b30b jdk-15+0
|
||||
91a3f092682fc715d991a87eb6ec6f28886d2035 jdk-14+27
|
||||
63e17cf29bed191ea21020b4648c9cdf893f80f5 jdk-15+1
|
||||
2069b4bfd23b56b6fc659fba8b75aaaa23debbe0 jdk-14+28
|
||||
f33197adda9ad82fdef46ac0f7dc0126204f35b2 jdk-15+2
|
||||
563fa900fa17c290ae516c7a3a69e8c069dde304 jdk-14+29
|
||||
d05fcdf25717d85e80a3a39a6b719458b22be5fe jdk-15+3
|
||||
d54ce919da90dab361995bb4d87be9851f00537a jdk-14+30
|
||||
d54ce919da90dab361995bb4d87be9851f00537a jdk-14+31
|
||||
d54ce919da90dab361995bb4d87be9851f00537a jdk-14+31
|
||||
bb0a7975b31ded63d594ee8dbfc4d4ead587f79b jdk-15+4
|
||||
decd3d2953b640f1043ee76953ff89238bff92e8 jdk-14+31
|
||||
b97c1773ccafae4a8c16cc6aedb10b2a4f9a07ed jdk-15+5
|
||||
2776da28515e087cc8849acf1e131a65ea7e77b6 jdk-14+32
|
||||
ef7d53b4fccd4a0501b17d974e84f37aa99fa813 jdk-15+6
|
||||
f728b6c7f4910d6bd6070cb4dde8393f4ba95113 jdk-14+33
|
||||
e2bc57500c1b785837982f7ce8af6751387ed73b jdk-15+7
|
||||
a96bc204e3b31ddbf909b20088964112f052927e jdk-14+34
|
||||
c7d4f2849dbfb755fc5860b362a4044ea0c9e082 jdk-15+8
|
||||
4a87bb7ebfd7f6a25ec59a5982fe3607242777f8 jdk-14+35
|
||||
62b5bfef8d618e08e6f3a56cf1fb0e67e89e9cc2 jdk-15+9
|
||||
bc54620a3848c26cff9766e5e2a6e5ddab98ed18 jdk-14+36
|
||||
1bee69801aeea1a34261c93f35bc9de072a98704 jdk-15+10
|
||||
b2dd4028a6de4e40dda8b76109e4b5c6b294f980 jdk-15+11
|
||||
2ec0ff3042630ddbd3587e340fe0dd40391cb6c4 jdk-15+12
|
||||
1c06a8ee8acad4d93c782626a233693a73de0add jdk-15+13
|
||||
1d6ceb13e142665ea833fca01c8c8598e0ddd211 jdk-15+14
|
||||
bc54620a3848c26cff9766e5e2a6e5ddab98ed18 jdk-14-ga
|
||||
82b7c62cf4cc56828a8fb724f57087967232a2a7 jdk-15+15
|
||||
|
||||
38
.jcheck/conf
38
.jcheck/conf
@@ -1,2 +1,36 @@
|
||||
project=jdk
|
||||
bugids=dup
|
||||
;
|
||||
; Copyright (c) 2020, 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.
|
||||
;
|
||||
; 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.
|
||||
;
|
||||
|
||||
[general]
|
||||
project=lanai
|
||||
jbs=JDK
|
||||
|
||||
[checks]
|
||||
error=author,whitespace,executable
|
||||
|
||||
[census]
|
||||
version=0
|
||||
domain=openjdk.org
|
||||
|
||||
[checks "whitespace"]
|
||||
files=.*\.java$|.*\.c$|.*\.h$|.*\.cpp$|.*\.hpp$
|
||||
|
||||
11
bin/idea.sh
11
bin/idea.sh
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2009, 2020, 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
|
||||
@@ -113,6 +113,14 @@ if [ "x$SPEC" = "x" ] ; then
|
||||
echo "FATAL: SPEC is empty" >&2; exit 1
|
||||
fi
|
||||
|
||||
if [ -d "$TOPLEVEL_DIR/.hg" ] ; then
|
||||
VCS_TYPE="hg4idea"
|
||||
fi
|
||||
|
||||
if [ -d "$TOPLEVEL_DIR/.git" ] ; then
|
||||
VCS_TYPE="Git"
|
||||
fi
|
||||
|
||||
### Replace template variables
|
||||
|
||||
NUM_REPLACEMENTS=0
|
||||
@@ -137,6 +145,7 @@ add_replacement() {
|
||||
}
|
||||
|
||||
add_replacement "###MODULE_NAMES###" "$MODULE_NAMES"
|
||||
add_replacement "###VCS_TYPE###" "$VCS_TYPE"
|
||||
SPEC_DIR=`dirname $SPEC`
|
||||
if [ "x$CYGPATH" = "x" ]; then
|
||||
add_replacement "###BUILD_DIR###" "$SPEC_DIR"
|
||||
|
||||
@@ -301,7 +301,7 @@
|
||||
</table>
|
||||
<p>All compilers are expected to be able to compile to the C99 language standard, as some C99 features are used in the source code. Microsoft Visual Studio doesn't fully support C99 so in practice shared code is limited to using C99 features that it does support.</p>
|
||||
<h3 id="gcc">gcc</h3>
|
||||
<p>The minimum accepted version of gcc is 4.8. Older versions will generate a warning by <code>configure</code> and are unlikely to work.</p>
|
||||
<p>The minimum accepted version of gcc is 5.0. Older versions will generate a warning by <code>configure</code> and are unlikely to work.</p>
|
||||
<p>The JDK is currently known to be able to compile with at least version 8.3 of gcc.</p>
|
||||
<p>In general, any version between these two should be usable.</p>
|
||||
<h3 id="clang">clang</h3>
|
||||
@@ -473,7 +473,7 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
|
||||
<li><code>--with-version-string=<string></code> - Specify the version string this build will be identified with.</li>
|
||||
<li><code>--with-version-<part>=<value></code> - A group of options, where <code><part></code> can be any of <code>pre</code>, <code>opt</code>, <code>build</code>, <code>major</code>, <code>minor</code>, <code>security</code> or <code>patch</code>. Use these options to modify just the corresponding part of the version string from the default, or the value provided by <code>--with-version-string</code>.</li>
|
||||
<li><code>--with-jvm-variants=<variant>[,<variant>...]</code> - Build the specified variant (or variants) of Hotspot. Valid variants are: <code>server</code>, <code>client</code>, <code>minimal</code>, <code>core</code>, <code>zero</code>, <code>custom</code>. Note that not all variants are possible to combine in a single build.</li>
|
||||
<li><code>--with-jvm-features=<feature>[,<feature>...]</code> - Use the specified JVM features when building Hotspot. The list of features will be enabled on top of the default list. For the <code>custom</code> JVM variant, this default list is empty. A complete list of available JVM features can be found using <code>bash configure --help</code>.</li>
|
||||
<li><code>--enable-jvm-feature-<feature></code> or <code>--disable-jvm-feature-<feature></code> - Include (or exclude) <code><feature></code> as a JVM feature in Hotspot. You can also specify a list of features to be enabled, separated by space or comma, as <code>--with-jvm-features=<feature>[,<feature>...]</code>. If you prefix <code><feature></code> with a <code>-</code>, it will be disabled. These options will modify the default list of features for the JVM variant(s) you are building. For the <code>custom</code> JVM variant, the default list is empty. A complete list of valid JVM features can be found using <code>bash configure --help</code>.</li>
|
||||
<li><code>--with-target-bits=<bits></code> - Create a target binary suitable for running on a <code><bits></code> platform. Use this to create 32-bit output on a 64-bit build platform, instead of doing a full cross-compile. (This is known as a <em>reduced</em> build.)</li>
|
||||
</ul>
|
||||
<p>On Linux, BSD and AIX, it is possible to override where Java by default searches for runtime/JNI libraries. This can be useful in situations where there is a special shared directory for system JNI libraries. This setting can in turn be overriden at runtime by setting the <code>java.library.path</code> property.</p>
|
||||
@@ -639,11 +639,6 @@ x86_64-linux-gnu-to-ppc64le-linux-gnu</code></pre>
|
||||
<p>You will need two copies of your toolchain, one which generates output that can run on the target system (the normal, or <em>target</em>, toolchain), and one that generates output that can run on the build system (the <em>build</em> toolchain). Note that cross-compiling is only supported for gcc at the time being. The gcc standard is to prefix cross-compiling toolchains with the target denominator. If you follow this standard, <code>configure</code> is likely to pick up the toolchain correctly.</p>
|
||||
<p>The <em>build</em> toolchain will be autodetected just the same way the normal <em>build</em>/<em>target</em> toolchain will be autodetected when not cross-compiling. If this is not what you want, or if the autodetection fails, you can specify a devkit containing the <em>build</em> toolchain using <code>--with-build-devkit</code> to <code>configure</code>, or by giving <code>BUILD_CC</code> and <code>BUILD_CXX</code> arguments.</p>
|
||||
<p>It is often helpful to locate the cross-compilation tools, headers and libraries in a separate directory, outside the normal path, and point out that directory to <code>configure</code>. Do this by setting the sysroot (<code>--with-sysroot</code>) and appending the directory when searching for cross-compilations tools (<code>--with-toolchain-path</code>). As a compact form, you can also use <code>--with-devkit</code> to point to a single directory, if it is correctly setup. (See <code>basics.m4</code> for details.)</p>
|
||||
<p>If you are unsure what toolchain and versions to use, these have been proved working at the time of writing:</p>
|
||||
<ul>
|
||||
<li><a href="https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-aarch64-linux-gnu-4.8-2013.11_linux.tar.xz">aarch64</a></li>
|
||||
<li><a href="https://launchpad.net/linaro-toolchain-unsupported/trunk/2012.09/+download/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux.tar.bz2">arm 32-bit hardware floating point</a></li>
|
||||
</ul>
|
||||
<h3 id="native-libraries">Native Libraries</h3>
|
||||
<p>You will need copies of external native libraries for the <em>target</em> system, present on the <em>build</em> machine while building.</p>
|
||||
<p>Take care not to replace the <em>build</em> system's version of these libraries by mistake, since that can render the <em>build</em> machine unusable.</p>
|
||||
|
||||
@@ -339,7 +339,7 @@ features that it does support.
|
||||
|
||||
### gcc
|
||||
|
||||
The minimum accepted version of gcc is 4.8. Older versions will generate a warning
|
||||
The minimum accepted version of gcc is 5.0. Older versions will generate a warning
|
||||
by `configure` and are unlikely to work.
|
||||
|
||||
The JDK is currently known to be able to compile with at least version 8.3 of
|
||||
@@ -684,11 +684,14 @@ features, use `bash configure --help=short` instead.)
|
||||
(or variants) of Hotspot. Valid variants are: `server`, `client`,
|
||||
`minimal`, `core`, `zero`, `custom`. Note that not all
|
||||
variants are possible to combine in a single build.
|
||||
* `--with-jvm-features=<feature>[,<feature>...]` - Use the specified JVM
|
||||
features when building Hotspot. The list of features will be enabled on top
|
||||
of the default list. For the `custom` JVM variant, this default list is
|
||||
empty. A complete list of available JVM features can be found using `bash
|
||||
configure --help`.
|
||||
* `--enable-jvm-feature-<feature>` or `--disable-jvm-feature-<feature>` -
|
||||
Include (or exclude) `<feature>` as a JVM feature in Hotspot. You can also
|
||||
specify a list of features to be enabled, separated by space or comma, as
|
||||
`--with-jvm-features=<feature>[,<feature>...]`. If you prefix `<feature>`
|
||||
with a `-`, it will be disabled. These options will modify the default list
|
||||
of features for the JVM variant(s) you are building. For the `custom` JVM
|
||||
variant, the default list is empty. A complete list of valid JVM features
|
||||
can be found using `bash configure --help`.
|
||||
* `--with-target-bits=<bits>` - Create a target binary suitable for running
|
||||
on a `<bits>` platform. Use this to create 32-bit output on a 64-bit build
|
||||
platform, instead of doing a full cross-compile. (This is known as a
|
||||
@@ -1038,14 +1041,6 @@ appending the directory when searching for cross-compilations tools
|
||||
to point to a single directory, if it is correctly setup. (See `basics.m4` for
|
||||
details.)
|
||||
|
||||
If you are unsure what toolchain and versions to use, these have been proved
|
||||
working at the time of writing:
|
||||
|
||||
* [aarch64](
|
||||
https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-aarch64-linux-gnu-4.8-2013.11_linux.tar.xz)
|
||||
* [arm 32-bit hardware floating point](
|
||||
https://launchpad.net/linaro-toolchain-unsupported/trunk/2012.09/+download/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux.tar.bz2)
|
||||
|
||||
### Native Libraries
|
||||
|
||||
You will need copies of external native libraries for the *target* system,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<title>Testing the JDK</title>
|
||||
<style>
|
||||
<style type="text/css">
|
||||
code{white-space: pre-wrap;}
|
||||
span.smallcaps{font-variant: small-caps;}
|
||||
span.underline{text-decoration: underline;}
|
||||
@@ -21,9 +21,9 @@
|
||||
<header id="title-block-header">
|
||||
<h1 class="title">Testing the JDK</h1>
|
||||
</header>
|
||||
<nav id="TOC" role="doc-toc">
|
||||
<nav id="TOC">
|
||||
<ul>
|
||||
<li><a href="#using-make-test-the-run-test-framework">Using "make test" (the run-test framework)</a><ul>
|
||||
<li><a href="#using-make-test-the-run-test-framework">Using "make test" (the run-test framework)</a><ul>
|
||||
<li><a href="#configuration">Configuration</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#test-selection">Test selection</a><ul>
|
||||
@@ -47,7 +47,7 @@
|
||||
</ul></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<h2 id="using-make-test-the-run-test-framework">Using "make test" (the run-test framework)</h2>
|
||||
<h2 id="using-make-test-the-run-test-framework">Using "make test" (the run-test framework)</h2>
|
||||
<p>This new way of running tests is developer-centric. It assumes that you have built a JDK locally and want to test it. Running common test targets is simple, and more complex ad-hoc combination of tests is possible. The user interface is forgiving, and clearly report errors it cannot resolve.</p>
|
||||
<p>The main target <code>test</code> uses the jdk-image as the tested product. There is also an alternate target <code>exploded-test</code> that uses the exploded image instead. Not all tests will run successfully on the exploded image, but using this target can greatly improve rebuild times for certain workflows.</p>
|
||||
<p>Previously, <code>make test</code> was used to invoke an old system for running tests, and <code>make run-test</code> was used for the new test framework. For backward compatibility with scripts and muscle memory, <code>run-test</code> (and variants like <code>exploded-run-test</code> or <code>run-test-tier1</code>) are kept as aliases.</p>
|
||||
@@ -65,7 +65,7 @@ $ make exploded-test TEST=tier2</code></pre>
|
||||
<p>To be able to run microbenchmarks, <code>configure</code> needs to know where to find the JMH dependency. Use <code>--with-jmh=<path to JMH jars></code> to point to a directory containing the core JMH and transitive dependencies. The recommended dependencies can be retrieved by running <code>sh make/devkit/createJMHBundle.sh</code>, after which <code>--with-jmh=build/jmh/jars</code> should work.</p>
|
||||
<h2 id="test-selection">Test selection</h2>
|
||||
<p>All functionality is available using the <code>test</code> make target. In this use case, the test or tests to be executed is controlled using the <code>TEST</code> variable. To speed up subsequent test runs with no source code changes, <code>test-only</code> can be used instead, which do not depend on the source and test image build.</p>
|
||||
<p>For some common top-level tests, direct make targets have been generated. This includes all JTReg test groups, the hotspot gtest, and custom tests (if present). This means that <code>make test-tier1</code> is equivalent to <code>make test TEST="tier1"</code>, but the latter is more tab-completion friendly. For more complex test runs, the <code>test TEST="x"</code> solution needs to be used.</p>
|
||||
<p>For some common top-level tests, direct make targets have been generated. This includes all JTReg test groups, the hotspot gtest, and custom tests (if present). This means that <code>make test-tier1</code> is equivalent to <code>make test TEST="tier1"</code>, but the latter is more tab-completion friendly. For more complex test runs, the <code>test TEST="x"</code> solution needs to be used.</p>
|
||||
<p>The test specifications given in <code>TEST</code> is parsed into fully qualified test descriptors, which clearly and unambigously show which tests will be run. As an example, <code>:tier1</code> will expand to <code>jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 jtreg:$(TOPDIR)/test/nashorn:tier1 jtreg:$(TOPDIR)/test/jaxp:tier1</code>. You can always submit a list of fully qualified test descriptors in the <code>TEST</code> variable if you want to shortcut the parser.</p>
|
||||
<h3 id="jtreg">JTReg</h3>
|
||||
<p>JTReg tests can be selected either by picking a JTReg test group, or a selection of files or directories containing JTReg tests.</p>
|
||||
@@ -105,8 +105,8 @@ TEST FAILURE</code></pre>
|
||||
<p>Additional work data is stored in <code>build/$BUILD/test-support/$TEST_ID</code>. For some frameworks, this directory might contain information that is useful in determining the cause of a failed test.</p>
|
||||
<h2 id="test-suite-control">Test suite control</h2>
|
||||
<p>It is possible to control various aspects of the test suites using make control variables.</p>
|
||||
<p>These variables use a keyword=value approach to allow multiple values to be set. So, for instance, <code>JTREG="JOBS=1;TIMEOUT_FACTOR=8"</code> will set the JTReg concurrency level to 1 and the timeout factor to 8. This is equivalent to setting <code>JTREG_JOBS=1 JTREG_TIMEOUT_FACTOR=8</code>, but using the keyword format means that the <code>JTREG</code> variable is parsed and verified for correctness, so <code>JTREG="TMIEOUT_FACTOR=8"</code> would give an error, while <code>JTREG_TMIEOUT_FACTOR=8</code> would just pass unnoticed.</p>
|
||||
<p>To separate multiple keyword=value pairs, use <code>;</code> (semicolon). Since the shell normally eats <code>;</code>, the recommended usage is to write the assignment inside qoutes, e.g. <code>JTREG="...;..."</code>. This will also make sure spaces are preserved, as in <code>JTREG="VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"</code>.</p>
|
||||
<p>These variables use a keyword=value approach to allow multiple values to be set. So, for instance, <code>JTREG="JOBS=1;TIMEOUT_FACTOR=8"</code> will set the JTReg concurrency level to 1 and the timeout factor to 8. This is equivalent to setting <code>JTREG_JOBS=1 JTREG_TIMEOUT_FACTOR=8</code>, but using the keyword format means that the <code>JTREG</code> variable is parsed and verified for correctness, so <code>JTREG="TMIEOUT_FACTOR=8"</code> would give an error, while <code>JTREG_TMIEOUT_FACTOR=8</code> would just pass unnoticed.</p>
|
||||
<p>To separate multiple keyword=value pairs, use <code>;</code> (semicolon). Since the shell normally eats <code>;</code>, the recommended usage is to write the assignment inside qoutes, e.g. <code>JTREG="...;..."</code>. This will also make sure spaces are preserved, as in <code>JTREG="VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"</code>.</p>
|
||||
<p>(Other ways are possible, e.g. using backslash: <code>JTREG=JOBS=1\;TIMEOUT_FACTOR=8</code>. Also, as a special technique, the string <code>%20</code> will be replaced with space for certain options, e.g. <code>JTREG=VM_OPTIONS=-XshowSettings%20-Xlog:gc+ref=debug</code>. This can be useful if you have layers of scripts and have trouble getting proper quoting of command line arguments through.)</p>
|
||||
<p>As far as possible, the names of the keywords have been standardized between test suites.</p>
|
||||
<h3 id="general-keywords-test_opts">General keywords (TEST_OPTS)</h3>
|
||||
@@ -127,6 +127,9 @@ TEST FAILURE</code></pre>
|
||||
<p>The simplest way to run tests with JCov coverage report is to use the special target <code>jcov-test</code> instead of <code>test</code>, e.g. <code>make jcov-test TEST=jdk_lang</code>. This will make sure the JCov image is built, and that JCov reporting is enabled.</p>
|
||||
<p>The JCov report is stored in <code>build/$BUILD/test-results/jcov-output</code>.</p>
|
||||
<p>Please note that running with JCov reporting can be very memory intensive.</p>
|
||||
<h4 id="jcov_diff_changeset">JCOV_DIFF_CHANGESET</h4>
|
||||
<p>While collecting code coverage with JCov, it is also possible to find coverage for only recently changed code. JCOV_DIFF_CHANGESET specifies a source revision. A textual report will be generated showing coverage of the diff between the specified revision and the repository tip.</p>
|
||||
<p>The report is stored in <code>build/$BUILD/test-results/jcov-output/diff_coverage_report</code> file.</p>
|
||||
<h3 id="jtreg-keywords">JTReg keywords</h3>
|
||||
<h4 id="jobs-1">JOBS</h4>
|
||||
<p>The test concurrency (<code>-concurrency</code>).</p>
|
||||
@@ -135,8 +138,8 @@ TEST FAILURE</code></pre>
|
||||
<p>The timeout factor (<code>-timeoutFactor</code>).</p>
|
||||
<p>Defaults to 4.</p>
|
||||
<h4 id="test_mode">TEST_MODE</h4>
|
||||
<p>The test mode (<code>-agentvm</code>, <code>-samevm</code> or <code>-othervm</code>).</p>
|
||||
<p>Defaults to <code>-agentvm</code>.</p>
|
||||
<p>The test mode (<code>agentvm</code> or <code>othervm</code>).</p>
|
||||
<p>Defaults to <code>agentvm</code>.</p>
|
||||
<h4 id="assert">ASSERT</h4>
|
||||
<p>Enable asserts (<code>-ea -esa</code>, or none).</p>
|
||||
<p>Set to <code>true</code> or <code>false</code>. If true, adds <code>-ea -esa</code>. Defaults to true, except for hotspot.</p>
|
||||
@@ -161,7 +164,7 @@ TEST FAILURE</code></pre>
|
||||
<p>Set to <code>true</code> or <code>false</code>. If <code>true</code>, JTReg will use <code>-match:</code> option, otherwise <code>-exclude:</code> will be used. Default is <code>false</code>.</p>
|
||||
<h4 id="options">OPTIONS</h4>
|
||||
<p>Additional options to the JTReg test framework.</p>
|
||||
<p>Use <code>JTREG="OPTIONS=--help all"</code> to see all available JTReg options.</p>
|
||||
<p>Use <code>JTREG="OPTIONS=--help all"</code> to see all available JTReg options.</p>
|
||||
<h4 id="java_options-1">JAVA_OPTIONS</h4>
|
||||
<p>Additional Java options to JTReg (<code>-javaoption</code>).</p>
|
||||
<h4 id="vm_options-1">VM_OPTIONS</h4>
|
||||
@@ -176,7 +179,7 @@ TEST FAILURE</code></pre>
|
||||
<p>Default is 1. Set to -1 to repeat indefinitely. This can be especially useful combined with <code>OPTIONS=--gtest_break_on_failure</code> to reproduce an intermittent problem.</p>
|
||||
<h4 id="options-1">OPTIONS</h4>
|
||||
<p>Additional options to the Gtest test framework.</p>
|
||||
<p>Use <code>GTEST="OPTIONS=--help"</code> to see all available Gtest options.</p>
|
||||
<p>Use <code>GTEST="OPTIONS=--help"</code> to see all available Gtest options.</p>
|
||||
<h4 id="aot_modules-2">AOT_MODULES</h4>
|
||||
<p>Generate AOT modules before testing for the specified module, or set of modules. If multiple modules are specified, they should be separated by space (or, to help avoid quoting issues, the special value <code>%20</code>).</p>
|
||||
<h3 id="microbenchmark-keywords">Microbenchmark keywords</h3>
|
||||
@@ -203,7 +206,7 @@ TEST FAILURE</code></pre>
|
||||
<p>To run these tests correctly, additional parameters for the correct docker image are required on Ubuntu 18.04 by using <code>JAVA_OPTIONS</code>.</p>
|
||||
<pre><code>$ make test TEST="jtreg:test/hotspot/jtreg/containers/docker" JTREG="JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu -Djdk.test.docker.image.version=latest"</code></pre>
|
||||
<h3 id="non-us-locale">Non-US locale</h3>
|
||||
<p>If your locale is non-US, some tests are likely to fail. To work around this you can set the locale to US. On Unix platforms simply setting <code>LANG="en_US"</code> in the environment before running tests should work. On Windows, setting <code>JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"</code> helps for most, but not all test cases. For example:</p>
|
||||
<p>If your locale is non-US, some tests are likely to fail. To work around this you can set the locale to US. On Unix platforms simply setting <code>LANG="en_US"</code> in the environment before running tests should work. On Windows, setting <code>JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"</code> helps for most, but not all test cases. For example:</p>
|
||||
<pre><code>$ export LANG="en_US" && make test TEST=...
|
||||
$ make test JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US" TEST=...</code></pre>
|
||||
<h3 id="pkcs11-tests">PKCS11 Tests</h3>
|
||||
@@ -214,11 +217,11 @@ $ make test JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US" TE
|
||||
<p>Some Client UI tests use key sequences which may be reserved by the operating system. Usually that causes the test failure. So it is highly recommended to disable system key shortcuts prior testing. The steps to access and disable system key shortcuts for various platforms are provided below.</p>
|
||||
<h4 id="macos">MacOS</h4>
|
||||
<p>Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts; select or deselect desired shortcut.</p>
|
||||
<p>For example, test/jdk/javax/swing/TooltipManager/JMenuItemToolTipKeyBindingsTest/JMenuItemToolTipKeyBindingsTest.java fails on MacOS because it uses <code>CTRL + F1</code> key sequence to show or hide tooltip message but the key combination is reserved by the operating system. To run the test correctly the default global key shortcut should be disabled using the steps described above, and then deselect "Turn keyboard access on or off" option which is responsible for <code>CTRL + F1</code> combination.</p>
|
||||
<p>For example, test/jdk/javax/swing/TooltipManager/JMenuItemToolTipKeyBindingsTest/JMenuItemToolTipKeyBindingsTest.java fails on MacOS because it uses <code>CTRL + F1</code> key sequence to show or hide tooltip message but the key combination is reserved by the operating system. To run the test correctly the default global key shortcut should be disabled using the steps described above, and then deselect "Turn keyboard access on or off" option which is responsible for <code>CTRL + F1</code> combination.</p>
|
||||
<h4 id="linux">Linux</h4>
|
||||
<p>Open the Activities overview and start typing Settings; Choose Settings, click Devices, then click Keyboard; set or override desired shortcut.</p>
|
||||
<h4 id="windows">Windows</h4>
|
||||
<p>Type <code>gpedit</code> in the Search and then click Edit group policy; navigate to User Configuration -> Administrative Templates -> Windows Components -> File Explorer; in the right-side pane look for "Turn off Windows key hotkeys" and double click on it; enable or disable hotkeys.</p>
|
||||
<p>Type <code>gpedit</code> in the Search and then click Edit group policy; navigate to User Configuration -> Administrative Templates -> Windows Components -> File Explorer; in the right-side pane look for "Turn off Windows key hotkeys" and double click on it; enable or disable hotkeys.</p>
|
||||
<p>Note: restart is required to make the settings take effect.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -241,10 +241,20 @@ The simplest way to run tests with JCov coverage report is to use the special
|
||||
target `jcov-test` instead of `test`, e.g. `make jcov-test TEST=jdk_lang`. This
|
||||
will make sure the JCov image is built, and that JCov reporting is enabled.
|
||||
|
||||
The JCov report is stored in `build/$BUILD/test-results/jcov-output`.
|
||||
The JCov report is stored in `build/$BUILD/test-results/jcov-output/report`.
|
||||
|
||||
Please note that running with JCov reporting can be very memory intensive.
|
||||
|
||||
#### JCOV_DIFF_CHANGESET
|
||||
|
||||
While collecting code coverage with JCov, it is also possible to find coverage
|
||||
for only recently changed code. JCOV_DIFF_CHANGESET specifies a source
|
||||
revision. A textual report will be generated showing coverage of the diff
|
||||
between the specified revision and the repository tip.
|
||||
|
||||
The report is stored in `build/$BUILD/test-results/jcov-output/diff_coverage_report`
|
||||
file.
|
||||
|
||||
### JTReg keywords
|
||||
|
||||
#### JOBS
|
||||
@@ -261,9 +271,9 @@ The timeout factor (`-timeoutFactor`).
|
||||
Defaults to 4.
|
||||
|
||||
#### TEST_MODE
|
||||
The test mode (`-agentvm`, `-samevm` or `-othervm`).
|
||||
The test mode (`agentvm` or `othervm`).
|
||||
|
||||
Defaults to `-agentvm`.
|
||||
Defaults to `agentvm`.
|
||||
|
||||
#### ASSERT
|
||||
Enable asserts (`-ea -esa`, or none).
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
# jetbrains/runtime:jbr14env
|
||||
FROM centos:7
|
||||
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 gcc gcc-c++ libstdc++-devel 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 13
|
||||
RUN wget https://download.java.net/java/GA/jdk13.0.1/cec27d702aa74d5a8630c65ae61e4305/9/GPL/openjdk-13.0.1_linux-x64_bin.tar.gz \
|
||||
-O - | tar xz -C /
|
||||
ENV JAVA_HOME /jbrsdk
|
||||
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"
|
||||
@@ -1,10 +0,0 @@
|
||||
FROM i386/ubuntu:xenial
|
||||
|
||||
RUN linux32 apt-get update && apt-get install -y --no-install-recommends apt-utils
|
||||
RUN linux32 apt-get -y install file build-essential zip unzip tar wget curl libx11-dev libxext-dev \
|
||||
libxrender-dev libxrandr-dev libxtst-dev libxt-dev libcups2-dev libasound2-data \
|
||||
libpng12-0 libasound2 libfreetype6 libfontconfig1-dev libasound2-dev autoconf git
|
||||
RUN wget https://cdn.azul.com/zulu/bin/zulu13.31.11-ca-jdk13.0.3-linux_i686.tar.gz \
|
||||
-O - | tar xz -C /
|
||||
ENV JAVA_HOME /zulu13.31.11-ca-jdk13.0.3-linux_i686
|
||||
ENV PATH $JAVA_HOME/bin:$PATH
|
||||
@@ -1,10 +0,0 @@
|
||||
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
|
||||
function do_exit() {
|
||||
exit_code=$1
|
||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD modules.list src/java.desktop/share/classes/module-info.java
|
||||
exit $exit_code
|
||||
}
|
||||
@@ -1,85 +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
|
||||
#
|
||||
# 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)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
|
||||
[ -z "$bundle_type" ] && (git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch || exit $?)
|
||||
|
||||
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=${BOOT_JDK} \
|
||||
--enable-cds=yes || exit $?
|
||||
make clean CONF=linux-aarch64-server-release || exit $?
|
||||
make images CONF=linux-aarch64-server-release test-image || exit $?
|
||||
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-aarch64-b${build_number}
|
||||
BASE_DIR=build/linux-aarch64-server-release/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 $?
|
||||
|
||||
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-aarch64-b$build_number
|
||||
grep -v javafx modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules.list.aarch64
|
||||
echo Running jlink....
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules.list.aarch64 | sed s/" "//g | sed s/,$//g) \
|
||||
--output ${BASE_DIR}/${JBR_BUNDLE} || 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 -pcf $JBR.tar -C $BASE_DIR ${JBR_BUNDLE} || exit $?
|
||||
gzip $JBR.tar || exit $?
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-aarch64-b$build_number
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' test || exit $?
|
||||
gzip $JBRSDK_TEST.tar || exit $?
|
||||
@@ -1,141 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# 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 be built; possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with 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
|
||||
#
|
||||
# $ ./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 with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_linux_x64
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
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
|
||||
|
||||
function create_jbr {
|
||||
|
||||
if [ -z "${bundle_type}" ]; then
|
||||
JBR_BUNDLE=jbr
|
||||
else
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
fi
|
||||
JBR_BASE_NAME=${JBR_BUNDLE}-${JBSDK_VERSION}
|
||||
cat modules.list > modules_tmp.list
|
||||
rm -rf ${BASE_DIR}/jbr
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
|
||||
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
|
||||
|
||||
if [ ! -z "${bundle_type}" ]; then
|
||||
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
|
||||
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 ...
|
||||
tar -pcf $JBR.tar -C $BASE_DIR jbr || do_exit $?
|
||||
[ -f "$JBR.tar.gz" ] && rm "$JBR.tar.gz"
|
||||
gzip $JBR.tar || do_exit $?
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=linux-x86_64-server-release
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-x64-b${build_number}
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
WITH_IMPORT_MODULES=""
|
||||
;;
|
||||
"fd")
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=linux-x86_64-server-fastdebug
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-x64-fastdebug-b${build_number}
|
||||
;;
|
||||
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=${BOOT_JDK} \
|
||||
--enable-cds=yes || do_exit $?
|
||||
|
||||
make clean CONF=$RELEASE_NAME || exit $?
|
||||
make images CONF=$RELEASE_NAME || do_exit $?
|
||||
|
||||
JSDK=build/$RELEASE_NAME/images/jdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
BASE_DIR=build/$RELEASE_NAME/images
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
|
||||
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || do_exit $?
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
rsync -av ${JCEF_PATH}/ $BASE_DIR/$JBRSDK_BUNDLE/lib --exclude="modular-sdk" || do_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 || do_exit $?
|
||||
[ -f "$JBSDK.tar.gz" ] && rm "$JBSDK.tar.gz"
|
||||
gzip $JBSDK.tar || do_exit $?
|
||||
fi
|
||||
|
||||
create_jbr || do_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 || do_exit $?
|
||||
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
|
||||
gzip $JBRSDK_TEST.tar || do_exit $?
|
||||
fi
|
||||
|
||||
do_exit 0
|
||||
@@ -1,81 +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
|
||||
#
|
||||
# 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)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
|
||||
[ -z "$bundle_type" ] && (git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch || exit $?)
|
||||
|
||||
linux32 bash 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-boot-jdk=${BOOT_JDK} \
|
||||
--enable-cds=yes || exit $?
|
||||
make clean CONF=linux-x86-server-release || exit $?
|
||||
make images CONF=linux-x86-server-release test-image || exit $?
|
||||
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-x86-b${build_number}
|
||||
BASE_DIR=build/linux-x86-server-release/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 $?
|
||||
|
||||
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-x86-b$build_number
|
||||
grep -v javafx modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules.list.x86
|
||||
echo Running jlink....
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules.list.x86 | sed s/" "//g | sed s/,$//g) --output ${BASE_DIR}/${JBR_BUNDLE} || 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 -pcf $JBR.tar -C $BASE_DIR $JBR_BUNDLE || exit $?
|
||||
gzip $JBR.tar || exit $?
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-x86-b$build_number
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' --exclude='test/hotspot/gtest' test || exit $?
|
||||
gzip $JBRSDK_TEST.tar || exit $?
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,146 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# 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 be built; possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with 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
|
||||
#
|
||||
# $ ./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 with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_mac
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
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}
|
||||
MAJOR_JBSDK_VERSION=$(echo $JBSDK_VERSION_WITH_DOTS | awk -F "." '{print $1}')
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
function create_jbr {
|
||||
|
||||
if [ -z "${bundle_type}" ]; then
|
||||
JBR_BUNDLE=jbr
|
||||
else
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
fi
|
||||
JBR_BASE_NAME=${JBR_BUNDLE}-${JBSDK_VERSION}
|
||||
cat modules.list > modules_tmp.list
|
||||
rm -rf ${BASE_DIR}/jbr
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
|
||||
JRE_CONTENTS=${BASE_DIR}/${JBR_BUNDLE}/Contents
|
||||
JRE_HOME=${JRE_CONTENTS}/Home
|
||||
if [ -d "${JRE_CONTENTS}" ]; then
|
||||
rm -rf ${JRE_CONTENTS}
|
||||
fi
|
||||
mkdir -p ${JRE_CONTENTS}
|
||||
|
||||
JBR=${JBR_BASE_NAME}-osx-x64-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} || 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}
|
||||
|
||||
rm -rf ${JRE_CONTENTS}/Frameworks || do_exit $?
|
||||
[ ! -z "${bundle_type}" ] && (cp -a ${JCEF_PATH}/Frameworks ${JRE_CONTENTS} || do_exit $?)
|
||||
|
||||
echo Creating ${JBR}.tar.gz ...
|
||||
[ ! -z "${bundle_type}" ] && 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 || 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-server-release
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-b${build_number}
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
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=macosx-x86_64-server-fastdebug
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-fastdebug-b${build_number}
|
||||
;;
|
||||
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 14` \
|
||||
--enable-cds=yes || do_exit $?
|
||||
|
||||
make clean CONF=$RELEASE_NAME || do_exit $?
|
||||
make images CONF=$RELEASE_NAME || do_exit $?
|
||||
|
||||
JSDK=build/$RELEASE_NAME/images/jdk-bundle
|
||||
|
||||
BASE_DIR=jre
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf $BASE_DIR
|
||||
mkdir $BASE_DIR || do_exit $?
|
||||
cp -a $JSDK/jdk-$MAJOR_JBSDK_VERSION.jdk $BASE_DIR/$JBRSDK_BUNDLE || do_exit $?
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
cp -a ${JCEF_PATH}/Frameworks $BASE_DIR/$JBRSDK_BUNDLE/Contents/
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release > release
|
||||
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release
|
||||
[ -f "$JBSDK.tar.gz" ] && rm "$JBSDK.tar.gz"
|
||||
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 || do_exit $?
|
||||
fi
|
||||
|
||||
create_jbr || do_exit $?
|
||||
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
make test-image CONF=$RELEASE_NAME || do_exit $?
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-osx-test-x64-b$build_number
|
||||
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
|
||||
COPYFILE_DISABLE=1 tar -pczf $JBRSDK_TEST.tar.gz -C build/${RELEASE_NAME}/images \
|
||||
--exclude='test/jdk/demos' test || do_exit $?
|
||||
fi
|
||||
|
||||
do_exit 0
|
||||
@@ -1,120 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
APP_DIRECTORY=$1
|
||||
APPL_USER=$2
|
||||
APPL_PASSWORD=$3
|
||||
APP_NAME=$4
|
||||
BUNDLE_ID=$5
|
||||
FAKE_ROOT="${6:-fake-root}"
|
||||
|
||||
if [[ -z "$APP_DIRECTORY" ]] || [[ -z "$APPL_USER" ]] || [[ -z "$APPL_PASSWORD" ]]; then
|
||||
echo "Usage: $0 AppDirectory Username Password"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -d "$APP_DIRECTORY" ]]; then
|
||||
echo "AppDirectory '$APP_DIRECTORY' does not exist or not a directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function log() {
|
||||
echo "$(date '+[%H:%M:%S]') $*"
|
||||
}
|
||||
|
||||
function publish-log() {
|
||||
id=$1
|
||||
file=$2
|
||||
curl -T "$file" "$ARTIFACTORY_URL/$id" || true
|
||||
}
|
||||
|
||||
function altool-upload() {
|
||||
# Since altool uses same file for upload token we have to trick it into using different folders for token file location
|
||||
# Also it copies zip into TMPDIR so we override it too, to simplify cleanup
|
||||
OLD_HOME="$HOME"
|
||||
export HOME="$FAKE_ROOT/home"
|
||||
export TMPDIR="$FAKE_ROOT/tmp"
|
||||
mkdir -p "$HOME"
|
||||
mkdir -p "$TMPDIR"
|
||||
export _JAVA_OPTIONS="-Duser.home=$HOME -Djava.io.tmpdir=$TMPDIR"
|
||||
# Reduce amount of downloads, cache transporter libraries
|
||||
shared_itmstransporter="$OLD_HOME/shared-itmstransporter"
|
||||
if [[ -f "$shared_itmstransporter" ]]; then
|
||||
cp -r "$shared_itmstransporter" "$HOME/.itmstransporter"
|
||||
fi
|
||||
# For some reason altool prints everything to stderr, not stdout
|
||||
set +e
|
||||
xcrun altool --notarize-app \
|
||||
--username "$APPL_USER" --password "$APPL_PASSWORD" \
|
||||
--primary-bundle-id "$BUNDLE_ID" \
|
||||
--asc-provider JetBrainssro --file "$1" 2>&1 | tee "altool.init.out"
|
||||
unset TMPDIR
|
||||
export HOME="$OLD_HOME"
|
||||
set -e
|
||||
}
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
|
||||
file="$APP_NAME.zip"
|
||||
|
||||
log "Zipping $file..."
|
||||
rm -rf "$file"
|
||||
ditto -c -k --sequesterRsrc --keepParent "$APP_DIRECTORY/Contents" "$file"
|
||||
|
||||
log "Notarizing $file..."
|
||||
rm -rf "altool.init.out" "altool.check.out"
|
||||
altool-upload "$file"
|
||||
|
||||
rm -rf "$file"
|
||||
|
||||
notarization_info="$(grep -e "RequestUUID" "altool.init.out" | grep -oE '([0-9a-f-]{36})')"
|
||||
|
||||
if [ -z "$notarization_info" ]; then
|
||||
log "Faile to read RequestUUID from altool.init.out"
|
||||
exit 10
|
||||
fi
|
||||
|
||||
PATH="$PATH:/usr/local/bin/"
|
||||
|
||||
log "Notarization request sent, awaiting response"
|
||||
spent=0
|
||||
|
||||
while true; do
|
||||
# For some reason altool prints everything to stderr, not stdout
|
||||
xcrun altool --username "$APPL_USER" --notarization-info "$notarization_info" --password "$APPL_PASSWORD" >"altool.check.out" 2>&1 || true
|
||||
status="$(grep -oe 'Status: .*' "altool.check.out" | cut -c 9- || true)"
|
||||
log "Current status: $status"
|
||||
if [ "$status" = "invalid" ]; then
|
||||
log "Notarization failed"
|
||||
ec=1
|
||||
elif [ "$status" = "success" ]; then
|
||||
log "Notarization succeeded"
|
||||
ec=0
|
||||
else
|
||||
if [ "$status" != "in progress" ]; then
|
||||
log "Unknown notarization status, waiting more, altool output:"
|
||||
cat "altool.check.out"
|
||||
fi
|
||||
if [[ $spent -gt 60 ]]; then
|
||||
log "Waiting time out (apx 60 minutes)"
|
||||
ec=2
|
||||
break
|
||||
fi
|
||||
sleep 60
|
||||
((spent += 1))
|
||||
continue
|
||||
fi
|
||||
developer_log="developer_log.json"
|
||||
log "Fetching $developer_log"
|
||||
# TODO: Replace cut with trim or something better
|
||||
url="$(grep -oe 'LogFileURL: .*' "altool.check.out" | cut -c 13-)"
|
||||
wget "$url" -O "$developer_log" && cat "$developer_log" || true
|
||||
if [ $ec != 0 ]; then
|
||||
log "Publishing $developer_log"
|
||||
publish-log "$notarization_info" "$developer_log"
|
||||
fi
|
||||
break
|
||||
done
|
||||
cat "altool.check.out"
|
||||
|
||||
rm -rf "altool.init.out" "altool.check.out"
|
||||
exit $ec
|
||||
@@ -1,94 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
APP_DIRECTORY=$1
|
||||
JB_CERT=$2
|
||||
|
||||
if [[ -z "$APP_DIRECTORY" ]] || [[ -z "$JB_CERT" ]]; then
|
||||
echo "Usage: $0 AppDirectory CertificateID"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -d "$APP_DIRECTORY" ]]; then
|
||||
echo "AppDirectory '$APP_DIRECTORY' does not exist or not a directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function log() {
|
||||
echo "$(date '+[%H:%M:%S]') $*"
|
||||
}
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
|
||||
# Cleanup files left from previous sign attempt (if any)
|
||||
find "$APP_DIRECTORY" -name '*.cstemp' -exec rm '{}' \;
|
||||
|
||||
log "Signing libraries and executables..."
|
||||
# -perm +111 searches for executables
|
||||
for f in \
|
||||
"Contents/Home/bin" \
|
||||
"Contents/Home/lib" \
|
||||
"Contents/Frameworks"; 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 \
|
||||
-v -s "$JB_CERT" --options=runtime \
|
||||
--entitlements entitlements.xml {} \;
|
||||
fi
|
||||
done
|
||||
|
||||
log "Signing libraries in jars in $PWD"
|
||||
|
||||
# todo: add set -euo pipefail; into the inner sh -c
|
||||
# `-e` prevents `grep -q && printf` loginc
|
||||
# with `-o pipefail` there's no input for 'while' loop
|
||||
find "$APP_DIRECTORY" -name '*.jar' \
|
||||
-exec sh -c "set -u; unzip -l \"\$0\" | grep -q -e '\.dylib\$' -e '\.jnilib\$' -e '\.so\$' -e '^jattach\$' && printf \"\$0\0\" " {} \; |
|
||||
while IFS= read -r -d $'\0' file; do
|
||||
log "Processing libraries in $file"
|
||||
|
||||
rm -rf jarfolder jar.jar
|
||||
mkdir jarfolder
|
||||
filename="${file##*/}"
|
||||
log "Filename: $filename"
|
||||
cp "$file" jarfolder && (cd jarfolder && jar xf "$filename" && rm "$filename")
|
||||
|
||||
find jarfolder \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "jattach" \) \
|
||||
-exec codesign --timestamp \
|
||||
-v -s "$JB_CERT" --options=runtime \
|
||||
--entitlements entitlements.xml {} \;
|
||||
|
||||
(cd jarfolder; zip -q -r -o ../jar.jar .)
|
||||
mv jar.jar "$file"
|
||||
done
|
||||
|
||||
rm -rf jarfolder jar.jar
|
||||
|
||||
log "Signing other files..."
|
||||
for f in \
|
||||
"Contents/MacOS"; 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 \
|
||||
-v -s "$JB_CERT" --options=runtime \
|
||||
--entitlements entitlements.xml {} \;
|
||||
fi
|
||||
done
|
||||
|
||||
#log "Signing executable..."
|
||||
#codesign --timestamp \
|
||||
# -v -s "$JB_CERT" --options=runtime \
|
||||
# --force \
|
||||
# --entitlements entitlements.xml "$APP_DIRECTORY/Contents/MacOS/idea"
|
||||
|
||||
log "Signing whole app..."
|
||||
codesign --timestamp \
|
||||
-v -s "$JB_CERT" --options=runtime \
|
||||
--force \
|
||||
--entitlements entitlements.xml "$APP_DIRECTORY"
|
||||
|
||||
log "Verifying java is not broken"
|
||||
find "$APP_DIRECTORY" \
|
||||
-type f -name 'java' -perm +111 -exec {} -version \;
|
||||
@@ -1,138 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
|
||||
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
|
||||
export COPYFILE_DISABLE=true
|
||||
|
||||
INPUT_FILE=$1
|
||||
EXPLODED=$2.exploded
|
||||
BACKUP_JMODS=$2.backup
|
||||
USERNAME=$3
|
||||
PASSWORD=$4
|
||||
CODESIGN_STRING=$5
|
||||
NOTARIZE=$6
|
||||
BUNDLE_ID=$7
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
function log() {
|
||||
echo "$(date '+[%H:%M:%S]') $*"
|
||||
}
|
||||
|
||||
log "Deleting $EXPLODED ..."
|
||||
if test -d "$EXPLODED"; then
|
||||
find "$EXPLODED" -mindepth 1 -maxdepth 1 -exec chmod -R u+wx '{}' \;
|
||||
fi
|
||||
rm -rf "$EXPLODED"
|
||||
mkdir "$EXPLODED"
|
||||
rm -rf "$BACKUP_JMODS"
|
||||
mkdir "$BACKUP_JMODS"
|
||||
|
||||
log "Unzipping $INPUT_FILE to $EXPLODED ..."
|
||||
tar -xzvf "$INPUT_FILE" --directory $EXPLODED
|
||||
rm "$INPUT_FILE"
|
||||
BUILD_NAME="$(ls "$EXPLODED")"
|
||||
if test -d $EXPLODED/$BUILD_NAME/Contents/Home/jmods; then
|
||||
mv $EXPLODED/$BUILD_NAME/Contents/Home/jmods $BACKUP_JMODS
|
||||
fi
|
||||
if test -f $EXPLODED/$BUILD_NAME/Contents/MacOS/libjli.dylib; then
|
||||
mv $EXPLODED/$BUILD_NAME/Contents/MacOS/libjli.dylib $BACKUP_JMODS
|
||||
fi
|
||||
if test -d $EXPLODED/$BUILD_NAME/Contents/Home/Frameworks; then
|
||||
mv $EXPLODED/$BUILD_NAME/Contents/Home/Frameworks $BACKUP_JMODS
|
||||
fi
|
||||
|
||||
log "$INPUT_FILE extracted and removed"
|
||||
|
||||
APPLICATION_PATH="$EXPLODED/$BUILD_NAME"
|
||||
|
||||
find "$APPLICATION_PATH/Contents/Home/bin" \
|
||||
-maxdepth 1 -type f -name '*.jnilib' -print0 |
|
||||
while IFS= read -r -d $'\0' file; do
|
||||
if [ -f "$file" ]; then
|
||||
log "Linking $file"
|
||||
b="$(basename "$file" .jnilib)"
|
||||
ln -sf "$b.jnilib" "$(dirname "$file")/$b.dylib"
|
||||
fi
|
||||
done
|
||||
|
||||
find "$APPLICATION_PATH/Contents/" \
|
||||
-maxdepth 1 -type f -name '*.txt' -print0 |
|
||||
while IFS= read -r -d $'\0' file; do
|
||||
if [ -f "$file" ]; then
|
||||
log "Moving $file"
|
||||
mv "$file" "$APPLICATION_PATH/Contents/Resources"
|
||||
fi
|
||||
done
|
||||
|
||||
non_plist=$(find "$APPLICATION_PATH/Contents/" -maxdepth 1 -type f -and -not -name 'Info.plist' | wc -l)
|
||||
if [[ $non_plist -gt 0 ]]; then
|
||||
log "Only Info.plist file is allowed in Contents directory but found $non_plist file(s):"
|
||||
log "$(find "$APPLICATION_PATH/Contents/" -maxdepth 1 -type f -and -not -name 'Info.plist')"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Unlocking keychain..."
|
||||
# Make sure *.p12 is imported into local KeyChain
|
||||
security unlock-keychain -p "$PASSWORD" "/Users/$USERNAME/Library/Keychains/login.keychain"
|
||||
|
||||
attempt=1
|
||||
limit=3
|
||||
set +e
|
||||
while [[ $attempt -le $limit ]]; do
|
||||
log "Signing (attempt $attempt) $APPLICATION_PATH ..."
|
||||
./sign.sh "$APPLICATION_PATH" "$CODESIGN_STRING"
|
||||
ec=$?
|
||||
if [[ $ec -ne 0 ]]; then
|
||||
((attempt += 1))
|
||||
if [ $attempt -eq $limit ]; then
|
||||
set -e
|
||||
fi
|
||||
log "Signing failed, wait for 30 sec and try to sign again"
|
||||
sleep 30
|
||||
else
|
||||
log "Signing done"
|
||||
codesign -v "$APPLICATION_PATH" -vvvvv
|
||||
log "Check sign done"
|
||||
((attempt += limit))
|
||||
fi
|
||||
done
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$NOTARIZE" = "yes" ]; then
|
||||
log "Notarizing..."
|
||||
# shellcheck disable=SC1090
|
||||
source "$HOME/.notarize_token"
|
||||
APP_NAME=$(echo ${INPUT_FILE} | awk -F"." '{ print $1 }')
|
||||
# Since notarization tool uses same file for upload token we have to trick it into using different folders, hence fake root
|
||||
# Also it leaves copy of zip file in TMPDIR, so notarize.sh overrides it and uses FAKE_ROOT as location for temp TMPDIR
|
||||
FAKE_ROOT="$(pwd)/fake-root"
|
||||
mkdir -p "$FAKE_ROOT"
|
||||
echo "Notarization will use fake root: $FAKE_ROOT"
|
||||
./notarize.sh "$APPLICATION_PATH" "$APPLE_USERNAME" "$APPLE_PASSWORD" "$APP_NAME" "$BUNDLE_ID" "$FAKE_ROOT"
|
||||
rm -rf "$FAKE_ROOT"
|
||||
|
||||
set +e
|
||||
log "Stapling..."
|
||||
xcrun stapler staple "$APPLICATION_PATH"
|
||||
else
|
||||
log "Notarization disabled"
|
||||
log "Stapling disabled"
|
||||
fi
|
||||
|
||||
log "Zipping $BUILD_NAME to $INPUT_FILE ..."
|
||||
(
|
||||
#cd "$EXPLODED"
|
||||
#ditto -c -k --sequesterRsrc --keepParent "$BUILD_NAME" "../$INPUT_FILE"
|
||||
if test -d $BACKUP_JMODS/jmods; then
|
||||
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
|
||||
log "Finished zipping"
|
||||
)
|
||||
rm -rf "$EXPLODED"
|
||||
log "Done"
|
||||
@@ -1,30 +0,0 @@
|
||||
diff --git modules.list modules.list
|
||||
index 7c4b3e9cb6d..5ed60349ca7 100644
|
||||
--- modules.list
|
||||
+++ modules.list
|
||||
@@ -53,4 +53,7 @@ jdk.security.jgss,
|
||||
jdk.unsupported,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs,
|
||||
-jdk.hotspot.agent
|
||||
+jdk.hotspot.agent,
|
||||
+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;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,26 +0,0 @@
|
||||
From 095315ce3f66bcf14ae1d06d84bbeb24bb068ae8 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/48] 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)
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
From 9ddbbcdc73e653af7807ead68705c1c9267c9192 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/48] 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,25 +0,0 @@
|
||||
From bb3eb4931818c3ef43c48d0781d73b8e2eb6dea9 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/48] 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,26 +0,0 @@
|
||||
From 90746a0267b2de4063667f5423093115f814bf08 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/48] 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 026346bfb72eaaae53e8998900d9f520da5ef74d 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/48] 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,58 +0,0 @@
|
||||
From b99ebb71bce6119cd800d69848f84281f2fd2b16 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/48] 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,43 +0,0 @@
|
||||
From dd57a1b40a83f7691c0fb9aa960f77c4428c0eec 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/48] 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,488 +0,0 @@
|
||||
From 333c0c639e12296d05a547b015c948516c8c504e 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/48] Support for Concurrent Mark Sweep (CMS) collector
|
||||
|
||||
---
|
||||
.../share/gc/cms/compactibleFreeListSpace.cpp | 139 ++++++++++++------
|
||||
.../share/gc/cms/compactibleFreeListSpace.hpp | 5 +-
|
||||
.../gc/cms/concurrentMarkSweepThread.cpp | 10 +-
|
||||
src/hotspot/share/gc/serial/markSweep.cpp | 2 +-
|
||||
src/hotspot/share/gc/shared/gcConfig.cpp | 2 +-
|
||||
src/hotspot/share/gc/shared/space.cpp | 16 +-
|
||||
src/hotspot/share/gc/shared/space.hpp | 6 +-
|
||||
src/hotspot/share/gc/shared/space.inline.hpp | 16 +-
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 12 +-
|
||||
src/hotspot/share/runtime/arguments.cpp | 6 +-
|
||||
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
|
||||
--- 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
|
||||
_used_stable = 0;
|
||||
}
|
||||
|
||||
+#define forward_compact_top_DEFN() \
|
||||
+ assert(this == cp->space, "'this' should be current compaction space."); \
|
||||
+ size_t compaction_max_size = pointer_delta(end(), compact_top); \
|
||||
+ assert(adjustObjectSize(size) == cp->space->adjust_object_size_v(size), \
|
||||
+ "virtual adjustObjectSize_v() method is not correct"); \
|
||||
+ size_t adjusted_size = adjustObjectSize(size); \
|
||||
+ assert(compaction_max_size >= MinChunkSize || compaction_max_size == 0, \
|
||||
+ "no small fragments allowed"); \
|
||||
+ assert(minimum_free_block_size() == MinChunkSize, \
|
||||
+ "for de-virtualized reference below"); \
|
||||
+ /* Can't leave a nonzero size, residual fragment smaller than MinChunkSize */ \
|
||||
+ if (adjusted_size + MinChunkSize > compaction_max_size && \
|
||||
+ adjusted_size != compaction_max_size) { \
|
||||
+ do { \
|
||||
+ /* switch to next compaction space*/ \
|
||||
+ cp->space->set_compaction_top(compact_top); \
|
||||
+ cp->space = cp->space->next_compaction_space(); \
|
||||
+ if (cp->space == NULL) { \
|
||||
+ cp->gen = CMSHeap::heap()->young_gen(); \
|
||||
+ assert(cp->gen != NULL, "compaction must succeed"); \
|
||||
+ cp->space = cp->gen->first_compaction_space(); \
|
||||
+ assert(cp->space != NULL, "generation must have a first compaction space"); \
|
||||
+ } \
|
||||
+ compact_top = cp->space->bottom(); \
|
||||
+ cp->space->set_compaction_top(compact_top); \
|
||||
+ /* The correct adjusted_size may not be the same as that for this method */ \
|
||||
+ /* (i.e., cp->space may no longer be "this" so adjust the size again. */ \
|
||||
+ /* Use the virtual method which is not used above to save the virtual */ \
|
||||
+ /* dispatch. */ \
|
||||
+ adjusted_size = cp->space->adjust_object_size_v(size); \
|
||||
+ compaction_max_size = pointer_delta(cp->space->end(), compact_top); \
|
||||
+ assert(cp->space->minimum_free_block_size() == 0, "just checking"); \
|
||||
+ } while (adjusted_size > compaction_max_size); \
|
||||
+ }
|
||||
+
|
||||
+
|
||||
HeapWord* CompactibleFreeListSpace::forward_compact_top(size_t size,
|
||||
CompactPoint* cp, HeapWord* compact_top) {
|
||||
- ShouldNotReachHere();
|
||||
- return NULL;
|
||||
+ forward_compact_top_DEFN()
|
||||
+ return compact_top;
|
||||
}
|
||||
|
||||
// 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.
|
||||
HeapWord* CompactibleFreeListSpace::forward(oop q, size_t size,
|
||||
- CompactPoint* cp, HeapWord* compact_top) {
|
||||
- // q is alive
|
||||
- // First check if we should switch compaction space
|
||||
- assert(this == cp->space, "'this' should be current compaction space.");
|
||||
- size_t compaction_max_size = pointer_delta(end(), compact_top);
|
||||
- assert(adjustObjectSize(size) == cp->space->adjust_object_size_v(size),
|
||||
- "virtual adjustObjectSize_v() method is not correct");
|
||||
- size_t adjusted_size = adjustObjectSize(size);
|
||||
- assert(compaction_max_size >= MinChunkSize || compaction_max_size == 0,
|
||||
- "no small fragments allowed");
|
||||
- assert(minimum_free_block_size() == MinChunkSize,
|
||||
- "for de-virtualized reference below");
|
||||
- // Can't leave a nonzero size, residual fragment smaller than MinChunkSize
|
||||
- if (adjusted_size + MinChunkSize > compaction_max_size &&
|
||||
- adjusted_size != compaction_max_size) {
|
||||
- do {
|
||||
- // switch to next compaction space
|
||||
- cp->space->set_compaction_top(compact_top);
|
||||
- cp->space = cp->space->next_compaction_space();
|
||||
- if (cp->space == NULL) {
|
||||
- cp->gen = CMSHeap::heap()->young_gen();
|
||||
- assert(cp->gen != NULL, "compaction must succeed");
|
||||
- cp->space = cp->gen->first_compaction_space();
|
||||
- assert(cp->space != NULL, "generation must have a first compaction space");
|
||||
- }
|
||||
- compact_top = cp->space->bottom();
|
||||
- cp->space->set_compaction_top(compact_top);
|
||||
- // The correct adjusted_size may not be the same as that for this method
|
||||
- // (i.e., cp->space may no longer be "this" so adjust the size again.
|
||||
- // Use the virtual method which is not used above to save the virtual
|
||||
- // dispatch.
|
||||
- adjusted_size = cp->space->adjust_object_size_v(size);
|
||||
- compaction_max_size = pointer_delta(cp->space->end(), compact_top);
|
||||
- assert(cp->space->minimum_free_block_size() == 0, "just checking");
|
||||
- } while (adjusted_size > compaction_max_size);
|
||||
- }
|
||||
+ CompactPoint* cp, HeapWord* compact_top, bool force_forward) {
|
||||
+ forward_compact_top_DEFN()
|
||||
|
||||
// store the forwarding pointer into the mark word
|
||||
- if ((HeapWord*)q != compact_top) {
|
||||
+ // the size of object changed for: new_version() != NULL
|
||||
+ if (force_forward || (HeapWord*)q != compact_top || q->klass()->new_version() != NULL) {
|
||||
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) {
|
||||
|
||||
// Support for compaction
|
||||
void CompactibleFreeListSpace::prepare_for_compaction(CompactPoint* cp) {
|
||||
- scan_and_forward(this, cp, false);
|
||||
- // of the free lists doesn't work after.
|
||||
+ if (!Universe::is_redefining_gc_run()) {
|
||||
+ scan_and_forward(this, cp, false);
|
||||
+ } else {
|
||||
+ // Redefinition run
|
||||
+ scan_and_forward(this, cp, true);
|
||||
+ }
|
||||
// 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.
|
||||
}
|
||||
|
||||
+bool CompactibleFreeListSpace::must_rescue(oop old_obj, oop new_obj) {
|
||||
+ // Only redefined objects can have the need to be rescued.
|
||||
+ if (oop(old_obj)->klass()->new_version() == NULL) return false;
|
||||
+
|
||||
+ int new_size = adjustObjectSize(old_obj->size_given_klass(oop(old_obj)->klass()->new_version()));
|
||||
+ int original_size = adjustObjectSize(old_obj->size());
|
||||
+
|
||||
+ Generation* tenured_gen = CMSHeap::heap()->old_gen();
|
||||
+ bool old_in_tenured = tenured_gen->is_in_reserved(old_obj);
|
||||
+ bool new_in_tenured = tenured_gen->is_in_reserved(new_obj);
|
||||
+ if (old_in_tenured == new_in_tenured) {
|
||||
+ // Rescue if object may overlap with a higher memory address.
|
||||
+ bool overlap = ((HeapWord*)old_obj + original_size < (HeapWord*)new_obj + new_size);
|
||||
+ if (old_in_tenured) {
|
||||
+ // Old and new address are in same space, so just compare the address.
|
||||
+ // Must rescue if object moves towards the top of the space.
|
||||
+ assert(space_index(old_obj) == space_index(new_obj), "old_obj and new_obj must be in same space");
|
||||
+ } else {
|
||||
+ // In the new generation, eden is located before the from space, so a
|
||||
+ // simple pointer comparison is sufficient.
|
||||
+ assert(CMSHeap::heap()->young_gen()->is_in_reserved(old_obj), "old_obj must be in DefNewGeneration");
|
||||
+ assert(CMSHeap::heap()->young_gen()->is_in_reserved(new_obj), "new_obj must be in DefNewGeneration");
|
||||
+ assert(overlap == (space_index(old_obj) < space_index(new_obj)), "slow and fast computation must yield same result");
|
||||
+ }
|
||||
+ return overlap;
|
||||
+
|
||||
+ } else {
|
||||
+ assert(space_index(old_obj) != space_index(new_obj), "old_obj and new_obj must be in different spaces");
|
||||
+ if (new_in_tenured) {
|
||||
+ // Must never rescue when moving from the new into the old generation.
|
||||
+ assert(CMSHeap::heap()->young_gen()->is_in_reserved(old_obj), "old_obj must be in DefNewGeneration");
|
||||
+ assert(space_index(old_obj) > space_index(new_obj), "must be");
|
||||
+ return false;
|
||||
+
|
||||
+ } else /* if (tenured_gen->is_in_reserved(old_obj)) */ {
|
||||
+ // Must always rescue when moving from the old into the new generation.
|
||||
+ assert(CMSHeap::heap()->young_gen()->is_in_reserved(new_obj), "new_obj must be in DefNewGeneration");
|
||||
+ assert(space_index(old_obj) < space_index(new_obj), "must be");
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
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() {
|
||||
}
|
||||
|
||||
void CompactibleFreeListSpace::compact() {
|
||||
- scan_and_compact(this, false);
|
||||
+ if(!Universe::is_redefining_gc_run()) {
|
||||
+ scan_and_compact(this, false);
|
||||
+ } else {
|
||||
+ // Redefinition run
|
||||
+ scan_and_compact(this, true);
|
||||
+ }
|
||||
}
|
||||
|
||||
// Fragmentation metric = 1 - [sum of (fbs**2) / (sum of fbs)**2]
|
||||
diff --git a/src/hotspot/share/gc/cms/compactibleFreeListSpace.hpp b/src/hotspot/share/gc/cms/compactibleFreeListSpace.hpp
|
||||
index 9fd2ea58320..d29b81f6fca 100644
|
||||
--- a/src/hotspot/share/gc/cms/compactibleFreeListSpace.hpp
|
||||
+++ b/src/hotspot/share/gc/cms/compactibleFreeListSpace.hpp
|
||||
@@ -201,7 +201,7 @@ class CompactibleFreeListSpace: public CompactibleSpace {
|
||||
// Support for compacting cms
|
||||
HeapWord* cross_threshold(HeapWord* start, HeapWord* end);
|
||||
HeapWord* forward_compact_top(size_t size, CompactPoint* cp, HeapWord* compact_top);
|
||||
- HeapWord* forward(oop q, size_t size, CompactPoint* cp, HeapWord* compact_top);
|
||||
+ HeapWord* forward(oop q, size_t size, CompactPoint* cp, HeapWord* compact_top, bool force_forward);
|
||||
|
||||
// Initialization helpers.
|
||||
void initializeIndexedFreeListArray();
|
||||
@@ -576,6 +576,9 @@ class CompactibleFreeListSpace: public CompactibleSpace {
|
||||
|
||||
// Support for compaction.
|
||||
void prepare_for_compaction(CompactPoint* cp);
|
||||
+
|
||||
+ bool must_rescue(oop old_obj, oop new_obj);
|
||||
+
|
||||
void adjust_pointers();
|
||||
void compact();
|
||||
// Reset the space to reflect the fact that a compaction of the
|
||||
diff --git a/src/hotspot/share/gc/cms/concurrentMarkSweepThread.cpp b/src/hotspot/share/gc/cms/concurrentMarkSweepThread.cpp
|
||||
index 3ada5755875..b6e930922d7 100644
|
||||
--- a/src/hotspot/share/gc/cms/concurrentMarkSweepThread.cpp
|
||||
+++ b/src/hotspot/share/gc/cms/concurrentMarkSweepThread.cpp
|
||||
@@ -78,10 +78,12 @@ void ConcurrentMarkSweepThread::run_service() {
|
||||
while (!should_terminate()) {
|
||||
sleepBeforeNextCycle();
|
||||
if (should_terminate()) break;
|
||||
- GCIdMark gc_id_mark;
|
||||
- GCCause::Cause cause = _collector->_full_gc_requested ?
|
||||
- _collector->_full_gc_cause : GCCause::_cms_concurrent_mark;
|
||||
- _collector->collect_in_background(cause);
|
||||
+ if (!Universe::is_redefining_gc_run()) {
|
||||
+ GCIdMark gc_id_mark;
|
||||
+ GCCause::Cause cause = _collector->_full_gc_requested ?
|
||||
+ _collector->_full_gc_cause : GCCause::_cms_concurrent_mark;
|
||||
+ _collector->collect_in_background(cause);
|
||||
+ }
|
||||
}
|
||||
|
||||
// Check that the state of any protocol for synchronization
|
||||
diff --git a/src/hotspot/share/gc/serial/markSweep.cpp b/src/hotspot/share/gc/serial/markSweep.cpp
|
||||
index d0ff86c8215..b4ed59f020c 100644
|
||||
--- a/src/hotspot/share/gc/serial/markSweep.cpp
|
||||
+++ b/src/hotspot/share/gc/serial/markSweep.cpp
|
||||
@@ -247,7 +247,7 @@ void MarkSweep::copy_rescued_objects_back() {
|
||||
|
||||
FREE_RESOURCE_ARRAY(HeapWord, rescued_ptr, size);
|
||||
|
||||
- new_obj->init_mark();
|
||||
+ new_obj->init_mark_raw();
|
||||
assert(oopDesc::is_oop(new_obj), "must be a valid oop");
|
||||
}
|
||||
_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
|
||||
--- 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() {
|
||||
}
|
||||
|
||||
void GCConfig::select_gc_ergonomically() {
|
||||
- if (AllowEnhancedClassRedefinition) {
|
||||
+ if (AllowEnhancedClassRedefinition && !UseConcMarkSweepGC) {
|
||||
// Enhanced class redefinition only supports serial GC at the moment
|
||||
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
|
||||
--- 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
|
||||
}
|
||||
|
||||
HeapWord* CompactibleSpace::forward(oop q, size_t size,
|
||||
- CompactPoint* cp, HeapWord* compact_top) {
|
||||
+ CompactPoint* cp, HeapWord* compact_top, bool force_forward) {
|
||||
compact_top = forward_compact_top(size, cp, compact_top);
|
||||
|
||||
// store the forwarding pointer into the mark word
|
||||
- if ((HeapWord*)q != compact_top || (size_t)q->size() != size) {
|
||||
+ if (force_forward || (HeapWord*)q != compact_top || (size_t)q->size() != size) {
|
||||
q->forward_to(oop(compact_top));
|
||||
assert(q->is_gc_marked(), "encoding the pointer should preserve the mark");
|
||||
} else {
|
||||
@@ -514,7 +514,7 @@ bool CompactibleSpace::must_rescue(oop old_obj, oop new_obj) {
|
||||
|
||||
} else {
|
||||
assert(space_index(old_obj) != space_index(new_obj), "old_obj and new_obj must be in different spaces");
|
||||
- if (tenured_gen->is_in_reserved(new_obj)) {
|
||||
+ if (new_in_tenured) {
|
||||
// Must never rescue when moving from the new into the old generation.
|
||||
assert(GenCollectedHeap::heap()->young_gen()->is_in_reserved(old_obj), "old_obj must be in DefNewGeneration");
|
||||
assert(space_index(old_obj) > space_index(new_obj), "must be");
|
||||
@@ -858,14 +858,14 @@ void OffsetTableContigSpace::verify() const {
|
||||
// Compute the forward sizes and leave out objects whose position could
|
||||
// possibly overlap other objects.
|
||||
HeapWord* CompactibleSpace::forward_with_rescue(HeapWord* q, size_t size,
|
||||
- CompactPoint* cp, HeapWord* compact_top) {
|
||||
+ CompactPoint* cp, HeapWord* compact_top, bool force_forward) {
|
||||
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) {
|
||||
|
||||
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");
|
||||
+ // assert(size != new_size, "instances without changed size have to be updated prior to GC run");
|
||||
forward_size = new_size;
|
||||
}
|
||||
|
||||
@@ -879,7 +879,7 @@ HeapWord* CompactibleSpace::forward_with_rescue(HeapWord* q, size_t size,
|
||||
return compact_top;
|
||||
}
|
||||
|
||||
- return forward(oop(q), forward_size, cp, compact_top);
|
||||
+ return forward(oop(q), forward_size, cp, compact_top, force_forward);
|
||||
}
|
||||
|
||||
// Compute the forwarding addresses for the objects that need to be rescued.
|
||||
@@ -895,11 +895,11 @@ HeapWord* CompactibleSpace::forward_rescued(CompactPoint* cp, HeapWord* compact_
|
||||
// (DCEVM) There is a new version of the class of q => different size
|
||||
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");
|
||||
+ // assert(size != new_size, "instances without changed size have to be updated prior to GC run");
|
||||
size = new_size;
|
||||
}
|
||||
|
||||
- compact_top = cp->space->forward(oop(q), size, cp, compact_top);
|
||||
+ compact_top = cp->space->forward(oop(q), size, cp, compact_top, true);
|
||||
assert(compact_top <= end(), "must not write over end of space!");
|
||||
}
|
||||
MarkSweep::_rescued_oops->clear();
|
||||
diff --git a/src/hotspot/share/gc/shared/space.hpp b/src/hotspot/share/gc/shared/space.hpp
|
||||
index 8eb5669fb79..901c89d8a30 100644
|
||||
--- a/src/hotspot/share/gc/shared/space.hpp
|
||||
+++ b/src/hotspot/share/gc/shared/space.hpp
|
||||
@@ -421,7 +421,7 @@ public:
|
||||
virtual void prepare_for_compaction(CompactPoint* cp) = 0;
|
||||
// MarkSweep support phase3
|
||||
DEBUG_ONLY(int space_index(oop obj));
|
||||
- bool must_rescue(oop old_obj, oop new_obj);
|
||||
+ virtual bool must_rescue(oop old_obj, oop new_obj);
|
||||
HeapWord* rescue(HeapWord* old_obj);
|
||||
virtual void adjust_pointers();
|
||||
// MarkSweep support phase4
|
||||
@@ -452,11 +452,11 @@ public:
|
||||
// function of the then-current compaction space, and updates "cp->threshold
|
||||
// accordingly".
|
||||
virtual HeapWord* forward(oop q, size_t size, CompactPoint* cp,
|
||||
- HeapWord* compact_top);
|
||||
+ HeapWord* compact_top, bool force_forward);
|
||||
// (DCEVM) same as forwad, but can rescue objects. Invoked only during
|
||||
// redefinition runs
|
||||
HeapWord* forward_with_rescue(HeapWord* q, size_t size, CompactPoint* cp,
|
||||
- HeapWord* compact_top);
|
||||
+ HeapWord* compact_top, bool force_forward);
|
||||
|
||||
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
|
||||
--- 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
|
||||
HeapWord* cur_obj = space->bottom();
|
||||
HeapWord* scan_limit = space->scan_limit();
|
||||
|
||||
+ bool force_forward = false;
|
||||
+
|
||||
while (cur_obj < scan_limit) {
|
||||
assert(!space->scanned_block_is_obj(cur_obj) ||
|
||||
oop(cur_obj)->mark_raw()->is_marked() || oop(cur_obj)->mark_raw()->is_unlocked() ||
|
||||
@@ -174,14 +176,15 @@ inline void CompactibleSpace::scan_and_forward(SpaceType* space, CompactPoint* c
|
||||
size_t size = space->scanned_block_size(cur_obj);
|
||||
|
||||
if (redefinition_run) {
|
||||
- compact_top = cp->space->forward_with_rescue(cur_obj, size, cp, compact_top);
|
||||
+ compact_top = cp->space->forward_with_rescue(cur_obj, size, cp, compact_top, force_forward);
|
||||
if (first_dead == NULL && oop(cur_obj)->is_gc_marked()) {
|
||||
/* Was moved (otherwise, forward would reset mark),
|
||||
set first_dead to here */
|
||||
first_dead = cur_obj;
|
||||
+ force_forward = true;
|
||||
}
|
||||
} else {
|
||||
- compact_top = cp->space->forward(oop(cur_obj), size, cp, compact_top);
|
||||
+ compact_top = cp->space->forward(oop(cur_obj), size, cp, compact_top, false);
|
||||
}
|
||||
|
||||
cur_obj += size;
|
||||
@@ -197,9 +200,9 @@ inline void CompactibleSpace::scan_and_forward(SpaceType* space, CompactPoint* c
|
||||
|
||||
// see if we might want to pretend this object is alive so that
|
||||
// we don't have to compact quite as often.
|
||||
- if (cur_obj == compact_top && dead_spacer.insert_deadspace(cur_obj, end)) {
|
||||
+ if (!redefinition_run && cur_obj == compact_top && dead_spacer.insert_deadspace(cur_obj, end)) {
|
||||
oop obj = oop(cur_obj);
|
||||
- compact_top = cp->space->forward(obj, obj->size(), cp, compact_top);
|
||||
+ compact_top = cp->space->forward(obj, obj->size(), cp, compact_top, force_forward);
|
||||
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
|
||||
HeapWord* compaction_top = (HeapWord*)oop(cur_obj)->forwardee();
|
||||
|
||||
if (redefinition_run && space->must_rescue(oop(cur_obj), oop(cur_obj)->forwardee())) {
|
||||
- space->rescue(cur_obj);
|
||||
+ space->rescue(cur_obj);
|
||||
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
|
||||
Prefetch::write(compaction_top, copy_interval);
|
||||
|
||||
// copy object and reinit its mark
|
||||
- assert(cur_obj != compaction_top || oop(cur_obj)->klass()->new_version() != NULL,
|
||||
- "everything in this pass should be moving");
|
||||
+ assert(redefinition_run || cur_obj != compaction_top, "everything in this pass should be moving");
|
||||
if (redefinition_run && oop(cur_obj)->klass()->new_version() != NULL) {
|
||||
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
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -52,6 +52,7 @@
|
||||
#include "prims/jvmtiThreadState.inline.hpp"
|
||||
#include "utilities/events.hpp"
|
||||
#include "oops/constantPool.inline.hpp"
|
||||
+#include "gc/cms/cmsHeap.hpp"
|
||||
|
||||
Array<Method*>* VM_EnhancedRedefineClasses::_old_methods = NULL;
|
||||
Array<Method*>* VM_EnhancedRedefineClasses::_new_methods = NULL;
|
||||
@@ -420,13 +421,11 @@ public:
|
||||
Klass* new_klass = obj->klass()->new_version();
|
||||
|
||||
if (new_klass->update_information() != NULL) {
|
||||
- int size_diff = obj->size() - obj->size_given_klass(new_klass);
|
||||
-
|
||||
- // Either new size is bigger or gap is to small to be filled
|
||||
- if (size_diff < 0 || (size_diff > 0 && (size_t) size_diff < CollectedHeap::min_fill_size())) {
|
||||
+ if (obj->size() - obj->size_given_klass(new_klass) != 0) {
|
||||
// We need an instance update => set back to old klass
|
||||
_needs_instance_update = true;
|
||||
} else {
|
||||
+ // Either new size is bigger or gap is to small to be filled
|
||||
oop src = obj;
|
||||
if (new_klass->is_copying_backwards()) {
|
||||
copy_to_tmp(obj);
|
||||
@@ -436,11 +435,6 @@ public:
|
||||
// FIXME: instance updates...
|
||||
//guarantee(false, "instance updates!");
|
||||
MarkSweep::update_fields(obj, src, new_klass->update_information());
|
||||
-
|
||||
- if (size_diff > 0) {
|
||||
- HeapWord* dead_space = ((HeapWord *)obj) + obj->size();
|
||||
- CollectedHeap::fill_with_object(dead_space, size_diff);
|
||||
- }
|
||||
}
|
||||
} 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
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -2047,14 +2047,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.
|
||||
- if (!UseSerialGC && i >= 1) {
|
||||
+ if ((!UseSerialGC && !UseConcMarkSweepGC) && i >= 1) {
|
||||
jio_fprintf(defaultStream::error_stream(),
|
||||
- "Must use the serial GC with enhanced class redefinition\n");
|
||||
+ "Must use the serial or concurrent mark sweep GC with enhanced class redefinition.\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
- if (i > 1) {
|
||||
+ if (i > 2) {
|
||||
jio_fprintf(defaultStream::error_stream(),
|
||||
"Conflicting collector combinations in option list; "
|
||||
"please refer to the release notes for the combinations "
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,257 +0,0 @@
|
||||
From b9ceda6f7c230750a87e8a686d833ce853d84712 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/48] 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)
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
From 1d147a5db94b531fa027d5e13e4dd5cbaef62952 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/48] 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 84777c09ddbbbbd6a90de5b1f17a4101c8f076b8 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/48] 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,25 +0,0 @@
|
||||
From 4d973861fbcd13dc50bd603f731c75d2013034c6 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/48] 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,61 +0,0 @@
|
||||
From 5f31460556d86fa0233e7998112a65483034fd45 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/48] 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)
|
||||
|
||||
@@ -1,484 +0,0 @@
|
||||
From d457702275bc47f3f9ea416dc794be403bc6eb94 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/48] HotswapAgent integration
|
||||
|
||||
It include:
|
||||
|
||||
- option to compile DCEVM only version with -DDCEVM_ONLY added
|
||||
to CFLAGS (bash configure --with-extra-cflags="-DDCEVM_ONLY"), by
|
||||
default compilation goes with HotswapAgent
|
||||
|
||||
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
|
||||
|
||||
- be quiet if HotswapAgent is not found in lib/, it is compatible with
|
||||
old DCEVM
|
||||
- disable hotswapagent for -Xshare:dump
|
||||
- disable HotswapAgent in jvm tools
|
||||
---
|
||||
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.jconsole.gmk | 3 +-
|
||||
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 | 59 +++++++++++++++++++
|
||||
src/hotspot/share/runtime/arguments.hpp | 3 +
|
||||
src/hotspot/share/runtime/globals.hpp | 12 +++-
|
||||
21 files changed, 117 insertions(+), 10 deletions(-)
|
||||
|
||||
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
|
||||
+++ b/make/launcher/Launcher-java.rmi.gmk
|
||||
@@ -27,8 +27,10 @@ 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 057d2bf3aca..cf100e20789 100644
|
||||
--- a/make/launcher/Launcher-java.scripting.gmk
|
||||
+++ b/make/launcher/Launcher-java.scripting.gmk
|
||||
@@ -27,5 +27,6 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jrunscript, \
|
||||
MAIN_CLASS := com.sun.tools.script.shell.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-java.security.jgss.gmk b/make/launcher/Launcher-java.security.jgss.gmk
|
||||
index 7411e1a21c4..2b856bfccb4 100644
|
||||
--- a/make/launcher/Launcher-java.security.jgss.gmk
|
||||
+++ b/make/launcher/Launcher-java.security.jgss.gmk
|
||||
@@ -28,13 +28,16 @@ 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 10717a5e1c5..2c52c31a555 100644
|
||||
--- a/make/launcher/Launcher-jdk.aot.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.aot.gmk
|
||||
@@ -31,6 +31,7 @@ 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) \
|
||||
@@ -40,6 +41,7 @@ $(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 f71c37adf74..744969546de 100644
|
||||
--- a/make/launcher/Launcher-jdk.compiler.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.compiler.gmk
|
||||
@@ -27,12 +27,14 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, javac, \
|
||||
MAIN_CLASS := com.sun.tools.javac.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, serialver, \
|
||||
MAIN_CLASS := sun.tools.serialver.SerialVer, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
@@ -41,6 +43,7 @@ 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 76da3600368..9f12b05b172 100644
|
||||
--- a/make/launcher/Launcher-jdk.hotspot.agent.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.hotspot.agent.gmk
|
||||
@@ -27,5 +27,6 @@ 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 f74e82bfdae..647d82b65b1 100644
|
||||
--- a/make/launcher/Launcher-jdk.jartool.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jartool.gmk
|
||||
@@ -27,8 +27,10 @@ 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 889028a2b17..c3d2093be04 100644
|
||||
--- a/make/launcher/Launcher-jdk.javadoc.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.javadoc.gmk
|
||||
@@ -27,6 +27,7 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, javadoc, \
|
||||
MAIN_CLASS := jdk.javadoc.internal.tool.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jcmd.gmk b/make/launcher/Launcher-jdk.jcmd.gmk
|
||||
index 7117fa78059..761a52d8466 100644
|
||||
--- a/make/launcher/Launcher-jdk.jcmd.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jcmd.gmk
|
||||
@@ -30,6 +30,7 @@ $(eval $(call SetupBuildLauncher, jinfo, \
|
||||
JAVA_ARGS := \
|
||||
-Dsun.jvm.hotspot.debugger.useProcDebugger \
|
||||
-Dsun.jvm.hotspot.debugger.useWindbgDebugger, \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
MACOSX_PRIVILEGED := true, \
|
||||
))
|
||||
|
||||
@@ -37,28 +38,36 @@ $(eval $(call SetupBuildLauncher, jmap, \
|
||||
MAIN_CLASS := sun.tools.jmap.JMap, \
|
||||
JAVA_ARGS := \
|
||||
-Dsun.jvm.hotspot.debugger.useProcDebugger \
|
||||
- -Dsun.jvm.hotspot.debugger.useWindbgDebugger, \
|
||||
+ -Dsun.jvm.hotspot.debugger.useWindbgDebugger \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
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, \
|
||||
+ -Dsun.jvm.hotspot.debugger.useWindbgDebugger \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
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.jconsole.gmk b/make/launcher/Launcher-jdk.jconsole.gmk
|
||||
index 6205ae63d16..5ca6a0c123b 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, \
|
||||
JAVA_ARGS := --add-opens java.base/java.io=jdk.jconsole \
|
||||
- -Djconsole.showOutputViewer, \
|
||||
+ -Djconsole.showOutputViewer \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
CFLAGS_windows := -DJAVAW, \
|
||||
LIBS_windows := user32.lib, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jdeps.gmk b/make/launcher/Launcher-jdk.jdeps.gmk
|
||||
index 217523c48cc..5448278dae7 100644
|
||||
--- a/make/launcher/Launcher-jdk.jdeps.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jdeps.gmk
|
||||
@@ -27,15 +27,18 @@ 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 fcce98cf430..27bd448e3ae 100644
|
||||
--- a/make/launcher/Launcher-jdk.jdi.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jdi.gmk
|
||||
@@ -27,4 +27,5 @@ 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 df2173996d7..9e61edeb2c8 100644
|
||||
--- a/make/launcher/Launcher-jdk.jlink.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jlink.gmk
|
||||
@@ -27,18 +27,21 @@ 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, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
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 349eb88e9eb..7287f8f998a 100644
|
||||
--- a/make/launcher/Launcher-jdk.jshell.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jshell.gmk
|
||||
@@ -27,5 +27,6 @@ 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 e9286d63094..e1657910c67 100644
|
||||
--- a/make/launcher/Launcher-jdk.jstatd.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jstatd.gmk
|
||||
@@ -27,6 +27,7 @@ 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 a93fd2a9017..64bbbb7c949 100644
|
||||
--- a/make/launcher/Launcher-jdk.pack.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.pack.gmk
|
||||
@@ -28,6 +28,7 @@ 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 d60c3d9b60b..b8a55900b0e 100644
|
||||
--- a/make/launcher/Launcher-jdk.rmic.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.rmic.gmk
|
||||
@@ -27,5 +27,6 @@ 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 82311e69fd6..bd39f8595b2 100644
|
||||
--- a/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk
|
||||
@@ -27,6 +27,7 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jjs, \
|
||||
MAIN_CLASS := jdk.nashorn.tools.jjs.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DENABLE_ARG_FILES, \
|
||||
))
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index 2ca6dde069d..c75bb5d8f49 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) {
|
||||
// Set object alignment values.
|
||||
set_object_alignment();
|
||||
|
||||
+ setup_hotswap_agent();
|
||||
+
|
||||
#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,
|
||||
*b = '\0';
|
||||
return (p == src_end); // return false if not all of the source was copied
|
||||
}
|
||||
+
|
||||
+void Arguments::setup_hotswap_agent() {
|
||||
+
|
||||
+ if (DumpSharedSpaces)
|
||||
+ return;
|
||||
+
|
||||
+ if (!AllowEnhancedClassRedefinition)
|
||||
+ return;
|
||||
+
|
||||
+ // Set HotswapAgent
|
||||
+ if (!DisableHotswapAgent) {
|
||||
+
|
||||
+ char ext_path_str[JVM_MAXPATHLEN];
|
||||
+
|
||||
+ os::jvm_path(ext_path_str, sizeof(ext_path_str));
|
||||
+ for (int i = 0; i < 3; i++) {
|
||||
+ char *end = strrchr(ext_path_str, *os::file_separator());
|
||||
+ if (end != NULL) *end = '\0';
|
||||
+ }
|
||||
+ size_t ext_path_length = strlen(ext_path_str);
|
||||
+ if (ext_path_length >= 3) {
|
||||
+ if (strcmp(ext_path_str + ext_path_length - 3, "lib") != 0) {
|
||||
+ if (ext_path_length < JVM_MAXPATHLEN - 4) {
|
||||
+ jio_snprintf(ext_path_str + ext_path_length, sizeof(ext_path_str) - ext_path_length, "%slib", os::file_separator());
|
||||
+ ext_path_length += 4;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ 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);
|
||||
+// }
|
||||
+ }
|
||||
+
|
||||
+ // TODO: open it only for org.hotswap.agent module
|
||||
+ // Use to access java.lang.reflect.Proxy/proxyCache
|
||||
+ 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++);
|
||||
+ // java.beans.Introspector access
|
||||
+ create_numbered_property("jdk.module.addopens", "java.desktop/java.beans=ALL-UNNAMED", addopens_count++);
|
||||
+
|
||||
+}
|
||||
diff --git a/src/hotspot/share/runtime/arguments.hpp b/src/hotspot/share/runtime/arguments.hpp
|
||||
index 46450cce5c9..3dc5b3d4bae 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.hpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.hpp
|
||||
@@ -506,6 +506,9 @@ class Arguments : AllStatic {
|
||||
|
||||
static size_t conservative_max_heap_alignment() { return _conservative_max_heap_alignment; }
|
||||
|
||||
+ // Initialize HotswapAgent
|
||||
+ static void setup_hotswap_agent();
|
||||
+
|
||||
// Return the maximum size a heap with compressed oops can take
|
||||
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
|
||||
--- a/src/hotspot/share/runtime/globals.hpp
|
||||
+++ b/src/hotspot/share/runtime/globals.hpp
|
||||
@@ -32,6 +32,12 @@
|
||||
|
||||
#include <float.h> // for DBL_MAX
|
||||
|
||||
+#ifdef DCEVM_ONLY
|
||||
+#define DISABLED_HOTSWAP_AGENT true
|
||||
+#else
|
||||
+#define DISABLED_HOTSWAP_AGENT false
|
||||
+#endif
|
||||
+
|
||||
// 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);
|
||||
\
|
||||
product(bool, AllowEnhancedClassRedefinition, true, \
|
||||
"Allow enhanced class redefinition beyond swapping method " \
|
||||
- "bodies")
|
||||
-
|
||||
+ "bodies") \
|
||||
+ \
|
||||
+ product(bool, DisableHotswapAgent, DISABLED_HOTSWAP_AGENT, \
|
||||
+ "Disable integrated Hotswap Agent (HotswapVM only)")
|
||||
#define VM_FLAGS(develop, \
|
||||
develop_pd, \
|
||||
product, \
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From 603b446449aa715aa3f409fb49ed00169b89fd91 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/48] Add dcevm distro name
|
||||
|
||||
---
|
||||
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
|
||||
--- a/make/autoconf/version-numbers
|
||||
+++ b/make/autoconf/version-numbers
|
||||
@@ -43,7 +43,7 @@ PRODUCT_NAME=OpenJDK
|
||||
PRODUCT_SUFFIX="Runtime Environment"
|
||||
JDK_RC_PLATFORM_NAME=Platform
|
||||
COMPANY_NAME=N/A
|
||||
-HOTSPOT_VM_DISTRO="OpenJDK"
|
||||
+HOTSPOT_VM_DISTRO="Dynamic Code Evolution"
|
||||
|
||||
# Might need better names for these
|
||||
MACOSX_BUNDLE_NAME_BASE="OpenJDK"
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
From 6869b6f67f8c8db57d91ea0ef9f33aaf44def1db 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/48] 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)
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
From bbcbaa9d5814017565b8f7f0d86844e9f64905c1 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/48] 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 62c65c226bbc4fadbc598db1a2ac7d05d17ae731 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/48] 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)
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
From 88b6f7a27e35d9ed3b82418b82c1cb1fe14f61e6 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/48] 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)
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
From 7fb12fc40a76a37ce67b051276a7ef582de1b04a 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/48] 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)
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From d3d53f242337bd3bc79917f922ff569c0a112f3b 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/48] 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)
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
From 833ef503677e066b3639e7418a22587992df1829 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/48] 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 1af8b1f3f891388a37cc71076c324d3905ab2a46 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/48] 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)
|
||||
|
||||
@@ -1,163 +0,0 @@
|
||||
From def550828411b677ed2d7807e51cc5ffe70331fc 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/48] 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)
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
From 5f416d7a25bd23399b9189cc94ab5d5887e6b4d4 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/48] Fix class cast exception on redefinition of class A,
|
||||
that is superclass of B that has anonymous class C
|
||||
|
||||
---
|
||||
src/hotspot/share/oops/instanceKlass.cpp | 5 ++++-
|
||||
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
|
||||
--- 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) {
|
||||
|
||||
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
|
||||
+ // on redefinition.
|
||||
+ if (!newest_version()->is_redefining()) {
|
||||
bool verify_ok = verify_code(throw_verifyerror, THREAD);
|
||||
if (!verify_ok) {
|
||||
return false;
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
From 9a7abdf08bf207f5265a552500446c3178bf5794 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/48] 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 8f13d3b4ba9aecd847b7da306055ba53ee2e29d0 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/48] 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)
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
From cbad9c34bf8920d772c646d041d4fc04fea203cc 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/48] 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 e3b94671ce5108a91e3a3e92b01eea07731c7639 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/48] 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)
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
From a95c3daf0a1db23e2dcc977f427faa7be41007c9 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/48] 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)
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From 15690197a276a86054e1ec9724c877d6d871ca01 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/48] add jvmtiEnhancedRedefineClasses.* to CMakeLists.txt
|
||||
|
||||
---
|
||||
jb/project/hotspot-cmake/CMakeLists.txt | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/jb/project/hotspot-cmake/CMakeLists.txt b/jb/project/hotspot-cmake/CMakeLists.txt
|
||||
index 8b552c27206..6516e39058f 100644
|
||||
--- a/jb/project/hotspot-cmake/CMakeLists.txt
|
||||
+++ b/jb/project/hotspot-cmake/CMakeLists.txt
|
||||
@@ -1663,6 +1663,7 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/share/prims/jvmtiGetLoadedClasses.hpp
|
||||
../../../src/hotspot/share/prims/jvmtiAgentThread.hpp
|
||||
../../../src/hotspot/share/prims/jvmtiCodeBlobEvents.cpp
|
||||
+../../../src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
../../../src/hotspot/share/prims/stackwalk.cpp
|
||||
../../../src/hotspot/share/prims/privilegedStack.hpp
|
||||
../../../src/hotspot/share/prims/jvmtiUtil.hpp
|
||||
@@ -1684,6 +1685,7 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/share/prims/stackwalk.hpp
|
||||
../../../src/hotspot/share/prims/privilegedStack.cpp
|
||||
../../../src/hotspot/share/prims/jvmtiCodeBlobEvents.hpp
|
||||
+../../../src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
../../../src/hotspot/share/prims/jvmtiUtil.cpp
|
||||
../../../src/hotspot/share/prims/jvmtiEnvBase.cpp
|
||||
../../../src/hotspot/share/prims/methodHandles.cpp
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From dab6a53de4c25aae95667c78b8e1f1097ab47130 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/48] 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 70d53ce28f9df75d9e50819d2b6654855da0d533 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/48] 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 805b588bc4bd45e61b81c90e23b71337072e9549 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/48] 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 78619004206d224b319d68493672bee2c97f0946 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/48] 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 baf26456579eb0e560471d3bcb150005492f69f4 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/48] 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 46dc38a58ac8afafab4e04ee47a1ed2b9e65c1e1 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/48] 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 6ac099d1b07fcc0d3c17ebd5d3335bcb6ceaedc9 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/48] 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 de04154ee21d33c1ac1b74b2740f2fda117c0430 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/48] 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 ab8888737eaed76776b41b28af93a0c47826b8d6 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/48] 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 8596cf8b677eadcd18b527dd61c891475758bbaa 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/48] 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,258 +0,0 @@
|
||||
From f3c1667fc04abdd9aa556b2c00a23239eba14287 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/48] Support for Lambda class redefinition
|
||||
|
||||
---
|
||||
.../share/classfile/classLoaderData.cpp | 9 +++
|
||||
.../share/classfile/classLoaderData.hpp | 1 +
|
||||
.../share/classfile/systemDictionary.cpp | 12 +++-
|
||||
.../share/classfile/systemDictionary.hpp | 2 +
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 65 +++++++++++++++++--
|
||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 1 +
|
||||
.../share/prims/resolvedMethodTable.cpp | 4 +-
|
||||
src/hotspot/share/prims/unsafe.cpp | 1 +
|
||||
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
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
@@ -663,6 +663,15 @@ Dictionary* ClassLoaderData::create_dictionary() {
|
||||
return new Dictionary(this, size, resizable);
|
||||
}
|
||||
|
||||
+void ClassLoaderData::exchange_holders(ClassLoaderData* cld) {
|
||||
+ oop holder_oop = _holder.peek();
|
||||
+ _holder.replace(cld->_holder.peek());
|
||||
+ cld->_holder.replace(holder_oop);
|
||||
+ WeakHandle<vm_class_loader_data> exchange = _holder;
|
||||
+ _holder = cld->_holder;
|
||||
+ cld->_holder = exchange;
|
||||
+}
|
||||
+
|
||||
// Tell the GC to keep this klass alive while iterating ClassLoaderDataGraph
|
||||
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
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
@@ -292,6 +292,7 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
||||
void accumulate_modified_oops() { if (has_modified_oops()) _accumulated_modified_oops = true; }
|
||||
void clear_accumulated_modified_oops() { _accumulated_modified_oops = false; }
|
||||
bool has_accumulated_modified_oops() { return _accumulated_modified_oops; }
|
||||
+ void exchange_holders(ClassLoaderData* cld);
|
||||
private:
|
||||
|
||||
void unload();
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.cpp b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
index e70865109dd..cc9f1fa7831 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,
|
||||
Handle protection_domain,
|
||||
ClassFileStream* st,
|
||||
const InstanceKlass* host_klass,
|
||||
+ InstanceKlass* old_klass,
|
||||
GrowableArray<Handle>* cp_patches,
|
||||
TRAPS) {
|
||||
|
||||
EventClassLoad class_load_start_event;
|
||||
|
||||
ClassLoaderData* loader_data;
|
||||
+
|
||||
+ bool is_redefining = (old_klass != NULL);
|
||||
+
|
||||
if (host_klass != NULL) {
|
||||
// Create a new CLD for anonymous class, that uses the same class loader
|
||||
// as the host_klass
|
||||
@@ -1000,8 +1004,12 @@ InstanceKlass* SystemDictionary::parse_stream(Symbol* class_name,
|
||||
protection_domain,
|
||||
host_klass,
|
||||
cp_patches,
|
||||
- false, // pick_newest
|
||||
+ is_redefining, // pick_newest
|
||||
CHECK_NULL);
|
||||
+ if (is_redefining && k != NULL) {
|
||||
+ k->set_redefining(true);
|
||||
+ k->set_old_version(old_klass);
|
||||
+ }
|
||||
|
||||
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) {
|
||||
k->remove_from_sibling_list();
|
||||
}
|
||||
|
||||
-// (DCEVM)
|
||||
+// (DCEVM)
|
||||
void SystemDictionary::update_constraints_after_redefinition() {
|
||||
constraints()->update_after_redefinition();
|
||||
}
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.hpp b/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
index 717f34ce9a0..dc111846c12 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
@@ -301,6 +301,7 @@ public:
|
||||
protection_domain,
|
||||
st,
|
||||
NULL, // host klass
|
||||
+ NULL, // old class
|
||||
NULL, // cp_patches
|
||||
THREAD);
|
||||
}
|
||||
@@ -309,6 +310,7 @@ public:
|
||||
Handle protection_domain,
|
||||
ClassFileStream* st,
|
||||
const InstanceKlass* host_klass,
|
||||
+ InstanceKlass* old_klass,
|
||||
GrowableArray<Handle>* cp_patches,
|
||||
TRAPS);
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 0ca675e8ee6..08fe42d5c28 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -503,6 +503,8 @@ 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;
|
||||
@@ -774,12 +776,34 @@ jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
|
||||
// load hook event.
|
||||
state->set_class_being_redefined(the_class, _class_load_kind);
|
||||
|
||||
- InstanceKlass* k = SystemDictionary::resolve_from_stream(the_class_sym,
|
||||
- the_class_loader,
|
||||
- protection_domain,
|
||||
- &st,
|
||||
- the_class,
|
||||
- THREAD);
|
||||
+ InstanceKlass* k;
|
||||
+
|
||||
+ if (InstanceKlass::cast(the_class)->is_anonymous()) {
|
||||
+ const InstanceKlass* host_class = the_class->host_klass();
|
||||
+
|
||||
+ // Make sure it's the real host class, not another anonymous class.
|
||||
+ while (host_class != NULL && host_class->is_anonymous()) {
|
||||
+ host_class = host_class->host_klass();
|
||||
+ }
|
||||
+
|
||||
+ k = SystemDictionary::parse_stream(the_class_sym,
|
||||
+ the_class_loader,
|
||||
+ protection_domain,
|
||||
+ &st,
|
||||
+ host_class,
|
||||
+ the_class,
|
||||
+ NULL,
|
||||
+ THREAD);
|
||||
+ k->class_loader_data()->exchange_holders(the_class->class_loader_data());
|
||||
+ the_class->class_loader_data()->inc_keep_alive();
|
||||
+ } else {
|
||||
+ k = SystemDictionary::resolve_from_stream(the_class_sym,
|
||||
+ the_class_loader,
|
||||
+ protection_domain,
|
||||
+ &st,
|
||||
+ the_class,
|
||||
+ THREAD);
|
||||
+ }
|
||||
// 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) {
|
||||
}
|
||||
}
|
||||
|
||||
+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) {
|
||||
Method* old_method = _matching_old_methods[j];
|
||||
@@ -2018,7 +2066,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
|
||||
- ClassLoaderDataGraph::dictionary_classes_do(&closure);
|
||||
+
|
||||
+ ClassLoaderDataGraph::classes_do(&closure);
|
||||
+ //ClassLoaderDataGraph::dictionary_classes_do(&closure);
|
||||
+
|
||||
log_trace(redefine, class, load)("%d classes affected", _affected_klasses->length());
|
||||
|
||||
// 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
|
||||
--- 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 {
|
||||
void rollback();
|
||||
static void mark_as_scavengable(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
|
||||
diff --git a/src/hotspot/share/prims/resolvedMethodTable.cpp b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
index af2ec48c2e1..7741328979f 100644
|
||||
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
@@ -200,7 +200,7 @@ 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
|
||||
+ // For each entry in RMT, change to new methodadjust_method_entries_dcevm
|
||||
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)
|
||||
InstanceKlass* newer_klass = InstanceKlass::cast(old_method->method_holder()->new_version());
|
||||
Method* 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());
|
||||
+
|
||||
assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
|
||||
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
|
||||
--- a/src/hotspot/share/prims/unsafe.cpp
|
||||
+++ b/src/hotspot/share/prims/unsafe.cpp
|
||||
@@ -818,6 +818,7 @@ Unsafe_DefineAnonymousClass_impl(JNIEnv *env,
|
||||
host_domain,
|
||||
&st,
|
||||
InstanceKlass::cast(host_klass),
|
||||
+ NULL,
|
||||
cp_patches,
|
||||
CHECK_NULL);
|
||||
if (anonk == NULL) {
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
From b8a3d4249eb97613f796edc709e414900c9a0828 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/48] 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,135 +0,0 @@
|
||||
From 77bdf6253c457ed88436fb4da6a53c7c0c361a1c 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/48] 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.
|
||||
---
|
||||
src/hotspot/share/interpreter/bytecodes.cpp | 2 +-
|
||||
.../share/interpreter/interpreterRuntime.cpp | 2 +-
|
||||
src/hotspot/share/oops/method.cpp | 8 ++++----
|
||||
src/hotspot/share/oops/method.hpp | 4 ++--
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 18 ++++++++++--------
|
||||
5 files changed, 18 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/interpreter/bytecodes.cpp b/src/hotspot/share/interpreter/bytecodes.cpp
|
||||
index e377e36b88c..262ecc021b2 100644
|
||||
--- a/src/hotspot/share/interpreter/bytecodes.cpp
|
||||
+++ b/src/hotspot/share/interpreter/bytecodes.cpp
|
||||
@@ -84,7 +84,7 @@ Bytecodes::Code Bytecodes::code_at(Method* method, int bci) {
|
||||
Bytecodes::Code Bytecodes::non_breakpoint_code_at(const Method* method, address bcp) {
|
||||
assert(method != NULL, "must have the method for breakpoint conversion");
|
||||
assert(method->contains(bcp), "must be valid bcp in method");
|
||||
- return method->orig_bytecode_at(method->bci_from(bcp));
|
||||
+ return method->orig_bytecode_at(method->bci_from(bcp), false);
|
||||
}
|
||||
|
||||
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
|
||||
--- a/src/hotspot/share/interpreter/interpreterRuntime.cpp
|
||||
+++ b/src/hotspot/share/interpreter/interpreterRuntime.cpp
|
||||
@@ -834,7 +834,7 @@ IRT_END
|
||||
// Invokes
|
||||
|
||||
IRT_ENTRY(Bytecodes::Code, InterpreterRuntime::get_original_bytecode_at(JavaThread* thread, Method* method, address bcp))
|
||||
- return method->orig_bytecode_at(method->bci_from(bcp));
|
||||
+ return method->orig_bytecode_at(method->bci_from(bcp), false);
|
||||
IRT_END
|
||||
|
||||
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
|
||||
--- a/src/hotspot/share/oops/method.cpp
|
||||
+++ b/src/hotspot/share/oops/method.cpp
|
||||
@@ -1747,14 +1747,14 @@ bool CompressedLineNumberReadStream::read_pair() {
|
||||
|
||||
#if INCLUDE_JVMTI
|
||||
|
||||
-Bytecodes::Code Method::orig_bytecode_at(int bci) const {
|
||||
+Bytecodes::Code Method::orig_bytecode_at(int bci, bool no_fatal) const {
|
||||
BreakpointInfo* bp = method_holder()->breakpoints();
|
||||
for (; bp != NULL; bp = bp->next()) {
|
||||
if (bp->match(this, bci)) {
|
||||
return bp->orig_bytecode();
|
||||
}
|
||||
}
|
||||
- {
|
||||
+ if (!no_fatal) {
|
||||
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) {
|
||||
_signature_index = m->signature_index();
|
||||
_orig_bytecode = (Bytecodes::Code) *m->bcp_from(_bci);
|
||||
if (_orig_bytecode == Bytecodes::_breakpoint)
|
||||
- _orig_bytecode = m->orig_bytecode_at(_bci);
|
||||
+ _orig_bytecode = m->orig_bytecode_at(_bci, false);
|
||||
_next = NULL;
|
||||
}
|
||||
|
||||
@@ -1909,7 +1909,7 @@ void BreakpointInfo::set(Method* method) {
|
||||
{
|
||||
Bytecodes::Code code = (Bytecodes::Code) *method->bcp_from(_bci);
|
||||
if (code == Bytecodes::_breakpoint)
|
||||
- code = method->orig_bytecode_at(_bci);
|
||||
+ code = method->orig_bytecode_at(_bci, false);
|
||||
assert(orig_bytecode() == code, "original bytecode must be the same");
|
||||
}
|
||||
#endif
|
||||
diff --git a/src/hotspot/share/oops/method.hpp b/src/hotspot/share/oops/method.hpp
|
||||
index 4533476ff8f..193e1845b23 100644
|
||||
--- a/src/hotspot/share/oops/method.hpp
|
||||
+++ b/src/hotspot/share/oops/method.hpp
|
||||
@@ -230,7 +230,7 @@ class Method : public Metadata {
|
||||
|
||||
// JVMTI breakpoints
|
||||
#if !INCLUDE_JVMTI
|
||||
- Bytecodes::Code orig_bytecode_at(int bci) const {
|
||||
+ Bytecodes::Code orig_bytecode_at(int bci, bool no_fatal) const {
|
||||
ShouldNotReachHere();
|
||||
return Bytecodes::_shouldnotreachhere;
|
||||
}
|
||||
@@ -239,7 +239,7 @@ class Method : public Metadata {
|
||||
};
|
||||
u2 number_of_breakpoints() const {return 0;}
|
||||
#else // !INCLUDE_JVMTI
|
||||
- Bytecodes::Code orig_bytecode_at(int bci) const;
|
||||
+ Bytecodes::Code orig_bytecode_at(int bci, bool no_fatal) const;
|
||||
void set_orig_bytecode_at(int bci, Bytecodes::Code code);
|
||||
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
|
||||
--- 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) {
|
||||
|
||||
if (code == Bytecodes::_breakpoint) {
|
||||
int bci = method->bci_from(bcp);
|
||||
- code = method->orig_bytecode_at(bci);
|
||||
- java_code = Bytecodes::java_code(code);
|
||||
- if (code != java_code &&
|
||||
- (java_code == Bytecodes::_getfield ||
|
||||
- java_code == Bytecodes::_putfield ||
|
||||
- java_code == Bytecodes::_aload_0)) {
|
||||
- // Let breakpoint table handling unpatch bytecode
|
||||
- method->set_orig_bytecode_at(bci, java_code);
|
||||
+ code = method->orig_bytecode_at(bci, true);
|
||||
+ if (code != Bytecodes::_shouldnotreachhere) {
|
||||
+ java_code = Bytecodes::java_code(code);
|
||||
+ if (code != java_code &&
|
||||
+ (java_code == Bytecodes::_getfield ||
|
||||
+ java_code == Bytecodes::_putfield ||
|
||||
+ java_code == Bytecodes::_aload_0)) {
|
||||
+ // Let breakpoint table handling unpatch bytecode
|
||||
+ method->set_orig_bytecode_at(bci, java_code);
|
||||
+ }
|
||||
}
|
||||
} else {
|
||||
java_code = Bytecodes::java_code(code);
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,421 +0,0 @@
|
||||
From d3371d7d52bd4dc66efd4f6a946d5045b8bc8b2b 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/48] 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 2ad306a4cce06cfccf95a1193daf5b968ec1fa87 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/48] 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,57 +0,0 @@
|
||||
From a5586aff03fde654102e2c2e1fc19fdea406b31e 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/48] Replace deleted method with
|
||||
Universe::throw_no_such_method_error
|
||||
|
||||
---
|
||||
.../share/prims/resolvedMethodTable.cpp | 28 +++++++++----------
|
||||
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
|
||||
--- 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)
|
||||
|
||||
if (old_method->is_old()) {
|
||||
|
||||
+ InstanceKlass* newer_klass = InstanceKlass::cast(old_method->method_holder()->new_version());
|
||||
+ Method* newer_method;
|
||||
+
|
||||
// Method* new_method;
|
||||
if (old_method->is_deleted()) {
|
||||
- // FIXME:(DCEVM) - check if exception can be thrown
|
||||
- // new_method = Universe::throw_no_such_method_error();
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- InstanceKlass* newer_klass = InstanceKlass::cast(old_method->method_holder()->new_version());
|
||||
- Method* newer_method = newer_klass->method_with_idnum(old_method->orig_method_idnum());
|
||||
+ newer_method = Universe::throw_no_such_method_error();
|
||||
+ } 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_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());
|
||||
|
||||
- assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
|
||||
- assert(newer_method != NULL, "method_with_idnum() should not be NULL");
|
||||
- assert(old_method != newer_method, "sanity check");
|
||||
+ assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
|
||||
+ assert(newer_method != NULL, "method_with_idnum() should not be NULL");
|
||||
+ assert(old_method != newer_method, "sanity check");
|
||||
|
||||
- if (_the_table->lookup(newer_method) != NULL) {
|
||||
- // old method was already adjusted if new method exists in _the_table
|
||||
- continue;
|
||||
+ if (_the_table->lookup(newer_method) != NULL) {
|
||||
+ // old method was already adjusted if new method exists in _the_table
|
||||
+ continue;
|
||||
+ }
|
||||
}
|
||||
|
||||
java_lang_invoke_ResolvedMethodName::set_vmtarget(mem_name, newer_method);
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# 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 be built; possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with 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
|
||||
#
|
||||
# $ ./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 with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_win_x64
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
WORK_DIR=$(pwd)
|
||||
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=$WORK_DIR/modular-sdk}"
|
||||
JCEF_PATH=${JCEF_PATH:=$WORK_DIR/jcef_win_x64}
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
function create_jbr {
|
||||
|
||||
if [ -z "${bundle_type}" ]; then
|
||||
JBR_BUNDLE=jbr
|
||||
else
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
fi
|
||||
cat modules.list > modules_tmp.list
|
||||
rm -rf ${JBR_BUNDLE}
|
||||
|
||||
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 ${JBR_BUNDLE} || do_exit $?
|
||||
|
||||
[ ! -z "${bundle_type}" ] && (rsync -av ${JCEF_PATH}/ ${JBR_BUNDLE}/bin --exclude="modular-sdk" || do_exit $?)
|
||||
echo Modifying release info ...
|
||||
cat ${JSDK}/release | tr -d '\r' | grep -v 'JAVA_VERSION' | grep -v 'MODULES' >> ${JBR_BUNDLE}/release
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=windows-x86_64-server-release
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-b${build_number}
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
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=windows-x86_64-server-fastdebug
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-fastdebug-b${build_number}
|
||||
;;
|
||||
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-toolchain-version=${TOOLCHAIN_VERSION} \
|
||||
--with-boot-jdk=${BOOT_JDK} \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes || do_exit $?
|
||||
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME clean images test-image || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME clean images || do_exit $?
|
||||
fi
|
||||
|
||||
JSDK=build/$RELEASE_NAME/images/jdk
|
||||
BASE_DIR=build/$RELEASE_NAME/images
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
rsync -av ${JCEF_PATH}/ ${JBRSDK_BUNDLE}/bin --exclude='modular-sdk' || do_exit $?
|
||||
sed 's/JBR/JBRSDK/g' ${JSDK}/release > release
|
||||
mv release ${JBRSDK_BUNDLE}/release
|
||||
fi
|
||||
|
||||
create_jbr || do_exit $?
|
||||
|
||||
do_exit 0
|
||||
@@ -1,63 +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
|
||||
#
|
||||
# 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)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WORK_DIR=$(pwd)
|
||||
|
||||
[ -z "$bundle_type" ] && (git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch || exit $?)
|
||||
|
||||
PATH="/usr/local/bin:/usr/bin:${PATH}"
|
||||
./configure \
|
||||
--disable-warnings-as-errors \
|
||||
--with-target-bits=32 \
|
||||
--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-toolchain-version=${TOOLCHAIN_VERSION} \
|
||||
--with-boot-jdk=${BOOT_JDK} \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes || exit 1
|
||||
make clean CONF=windows-x86-server-release || exit 1
|
||||
make LOG=info images CONF=windows-x86-server-release test-image || exit 1
|
||||
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-x86-b${build_number}
|
||||
BASE_DIR=build/windows-x86-server-release/images
|
||||
JSDK=${BASE_DIR}/jdk
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || exit 1
|
||||
sed 's/JBR/JBRSDK/g' ${JSDK}/release > release
|
||||
mv release ${JBRSDK_BUNDLE}/release
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
rm -rf ${JBR_BUNDLE}
|
||||
grep -v javafx modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules.list.x86
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules.list.x86 | sed s/" "//g) --output ${JBR_BUNDLE} || exit $?
|
||||
|
||||
echo Modifying release info ...
|
||||
#grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${JBR_BUNDLE}/release
|
||||
@@ -1,75 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
|
||||
# JDK_BUILD_NUMBER - specifies udate 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 be built; possible values:
|
||||
# <empty> or nomod - the bundles without any additional modules (jcef)
|
||||
# jcef - the bundles with 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
|
||||
#
|
||||
# $ ./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)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
|
||||
function pack_jbr {
|
||||
|
||||
if [ -z "${bundle_type}" ]; then
|
||||
JBR_BUNDLE=jbr
|
||||
else
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
[ -d ${BASE_DIR}/jbr ] && rm -rf ${BASE_DIR}/jbr
|
||||
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
|
||||
fi
|
||||
JBR_BASE_NAME=${JBR_BUNDLE}-${JBSDK_VERSION}
|
||||
|
||||
JBR=$JBR_BASE_NAME-windows-x64-b$build_number
|
||||
echo Creating $JBR.tar.gz ...
|
||||
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR jbr || do_exit $?
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
RELEASE_NAME=windows-x86_64-server-release
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-b${build_number}
|
||||
case "$bundle_type" in
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
RELEASE_NAME=macosx-x86_64-server-fastdebug
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-fastdebug-b${build_number}
|
||||
;;
|
||||
esac
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JBSDK=$JBRSDK_BASE_NAME-windows-x64-b$build_number
|
||||
BASE_DIR=.
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
[ -f "$JBSDK.tar.gz" ] && rm "$JBSDK.tar.gz"
|
||||
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || do_exit $?
|
||||
fi
|
||||
|
||||
pack_jbr $bundle_type
|
||||
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-windows-test-x64-b$build_number
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
fi
|
||||
@@ -1,42 +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
|
||||
#
|
||||
# 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)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
|
||||
IMAGES_DIR=build/windows-x86-server-release/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JBSDK=$JBRSDK_BASE_NAME-windows-x86-b$build_number
|
||||
BASE_DIR=.
|
||||
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || exit 1
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
|
||||
|
||||
JBR=$JBR_BASE_NAME-windows-x86-b$build_number
|
||||
echo Creating $JBR.tar.gz ...
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR ${JBR_BUNDLE} || exit 1
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-windows-test-x86-b$build_number
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || exit 1
|
||||
116
make/Bundles.gmk
116
make/Bundles.gmk
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2020, 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
|
||||
@@ -125,6 +125,13 @@ define SetupBundleFileBody
|
||||
&& $(TAR) cf - -$(TAR_INCLUDE_PARAM) $$($1_$$d_LIST_FILE) \
|
||||
$(TAR_IGNORE_EXIT_VALUE) ) \
|
||||
| ( $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) && $(TAR) xf - )$$(NEWLINE) )
|
||||
# Rename stripped pdb files
|
||||
ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public)
|
||||
for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.stripped.pdb"`; do \
|
||||
$(ECHO) Renaming $$$${f} to $$$${f%stripped.pdb}pdb $(LOG_INFO); \
|
||||
$(MV) $$$${f} $$$${f%stripped.pdb}pdb; \
|
||||
done
|
||||
endif
|
||||
# Unzip any zipped debuginfo files
|
||||
ifeq ($$($1_UNZIP_DEBUGINFO), true)
|
||||
for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.diz"`; do \
|
||||
@@ -183,7 +190,7 @@ endif
|
||||
|
||||
ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
|
||||
SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.pdb %.map
|
||||
SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.map
|
||||
|
||||
# There may be files with spaces in the names, so use ShellFindFiles
|
||||
# explicitly.
|
||||
@@ -209,6 +216,21 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
endif
|
||||
endif
|
||||
|
||||
# Create special filter rules when dealing with debug symbols on windows
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), )
|
||||
JDK_SYMBOLS_EXCLUDE_PATTERN := %.pdb
|
||||
else
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), public)
|
||||
JDK_SYMBOLS_EXCLUDE_PATTERN := \
|
||||
$(filter-out \
|
||||
%.stripped.pdb, \
|
||||
$(filter %.pdb, $(ALL_JDK_FILES)) \
|
||||
)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
JDK_BUNDLE_FILES := \
|
||||
$(filter-out \
|
||||
$(JDK_SYMBOLS_EXCLUDE_PATTERN) \
|
||||
@@ -218,13 +240,14 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
, \
|
||||
$(ALL_JDK_FILES) \
|
||||
)
|
||||
|
||||
JDK_SYMBOLS_BUNDLE_FILES := \
|
||||
$(filter \
|
||||
$(JDK_SYMBOLS_EXCLUDE_PATTERN) \
|
||||
$(SYMBOLS_EXCLUDE_PATTERN) \
|
||||
, \
|
||||
$(filter-out \
|
||||
$(JDK_IMAGE_HOMEDIR)/demo/% \
|
||||
$(JDK_IMAGE_HOMEDIR)/demo/% %.stripped.pdb \
|
||||
, \
|
||||
$(ALL_JDK_SYMBOLS_FILES) \
|
||||
) \
|
||||
@@ -245,11 +268,97 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
endif
|
||||
endif
|
||||
|
||||
# Create special filter rules when dealing with debug symbols on windows
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), )
|
||||
JRE_SYMBOLS_EXCLUDE_PATTERN := %.pdb
|
||||
else
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), public)
|
||||
JRE_SYMBOLS_EXCLUDE_PATTERN := \
|
||||
$(filter-out \
|
||||
%.stripped.pdb, \
|
||||
$(filter %.pdb, $(ALL_JRE_FILES)) \
|
||||
)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
JRE_BUNDLE_FILES := $(filter-out \
|
||||
$(JRE_SYMBOLS_EXCLUDE_PATTERN) \
|
||||
$(SYMBOLS_EXCLUDE_PATTERN), \
|
||||
$(ALL_JRE_FILES))
|
||||
|
||||
# On Macosx release builds, when there is a code signing certificate available,
|
||||
# the final bundle layout can be signed.
|
||||
SIGN_BUNDLE := false
|
||||
ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release)
|
||||
ifneq ($(CODESIGN), )
|
||||
SIGN_BUNDLE := true
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(SIGN_BUNDLE), true)
|
||||
# Macosx release build and code signing available.
|
||||
|
||||
################################################################################
|
||||
# JDK bundle
|
||||
$(eval $(call SetupCopyFiles, CREATE_JDK_BUNDLE_DIR_SIGNED, \
|
||||
SRC := $(JDK_IMAGE_DIR), \
|
||||
FILES := $(JDK_BUNDLE_FILES), \
|
||||
DEST := $(JDK_MACOSX_BUNDLE_DIR_SIGNED), \
|
||||
))
|
||||
|
||||
JDK_SIGNED_CODE_RESOURCES := \
|
||||
$(JDK_MACOSX_BUNDLE_DIR_SIGNED)/$(JDK_MACOSX_CONTENTS_SUBDIR)/_CodeSignature/CodeResources
|
||||
|
||||
$(JDK_SIGNED_CODE_RESOURCES): $(CREATE_JDK_BUNDLE_DIR_SIGNED)
|
||||
$(call LogWarn, Signing $(JDK_BUNDLE_NAME))
|
||||
$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
|
||||
--timestamp --options runtime --deep --force \
|
||||
$(JDK_MACOSX_BUNDLE_DIR_SIGNED)/$(JDK_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
|
||||
$(TOUCH) $@
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
|
||||
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
|
||||
FILES := \
|
||||
$(CREATE_JDK_BUNDLE_DIR_SIGNED) \
|
||||
$(JDK_SIGNED_CODE_RESOURCES), \
|
||||
BASE_DIRS := $(JDK_MACOSX_BUNDLE_DIR_SIGNED), \
|
||||
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
|
||||
|
||||
################################################################################
|
||||
# JRE bundle
|
||||
$(eval $(call SetupCopyFiles, CREATE_JRE_BUNDLE_DIR_SIGNED, \
|
||||
SRC := $(JRE_IMAGE_DIR), \
|
||||
FILES := $(JRE_BUNDLE_FILES), \
|
||||
DEST := $(JRE_MACOSX_BUNDLE_DIR_SIGNED), \
|
||||
))
|
||||
|
||||
JRE_SIGNED_CODE_RESOURCES := \
|
||||
$(JRE_MACOSX_BUNDLE_DIR_SIGNED)/$(JRE_MACOSX_CONTENTS_SUBDIR)/_CodeSignature/CodeResources
|
||||
|
||||
$(JRE_SIGNED_CODE_RESOURCES): $(CREATE_JRE_BUNDLE_DIR_SIGNED)
|
||||
$(call LogWarn, Signing $(JRE_BUNDLE_NAME))
|
||||
$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
|
||||
--timestamp --options runtime --deep --force \
|
||||
$(JRE_MACOSX_BUNDLE_DIR_SIGNED)/$(JRE_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
|
||||
$(TOUCH) $@
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
|
||||
BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
|
||||
FILES := \
|
||||
$(CREATE_JRE_BUNDLE_DIR_SIGNED) \
|
||||
$(JRE_SIGNED_CODE_RESOURCES), \
|
||||
BASE_DIRS := $(JRE_MACOSX_BUNDLE_DIR_SIGNED), \
|
||||
SUBDIR := $(JRE_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
|
||||
else
|
||||
# Not a Macosx release build or code signing not available.
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
|
||||
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
|
||||
FILES := $(JDK_BUNDLE_FILES), \
|
||||
@@ -268,6 +377,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
))
|
||||
|
||||
LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
|
||||
endif
|
||||
|
||||
ifeq ($(COPY_DEBUG_SYMBOLS), true)
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, 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
|
||||
@@ -94,6 +94,7 @@ COPY_TO_IMAGE := *.html *.txt *.png *.xml README*
|
||||
# EXTRA_MANIFEST_ATTR Extra manifest attribute
|
||||
# SKIP_COMPILATION Skip Java compilation iff true
|
||||
# DISABLE_SJAVAC Passed to SetupJavaCompilation
|
||||
# DISABLED_WARNINGS Additional disabled warnings
|
||||
SetupBuildDemo = $(NamedParamsMacroTemplate)
|
||||
define SetupBuildDemoBody
|
||||
ifeq ($$($1_SRC_DIR), )
|
||||
@@ -135,6 +136,7 @@ define SetupBuildDemoBody
|
||||
EXTRA_MANIFEST_ATTR := $$($1_EXTRA_MANIFEST_ATTR), \
|
||||
SRCZIP := $(SUPPORT_OUTPUTDIR)/demos/image/$$($1_DEMO_SUBDIR)/$1/src.zip, \
|
||||
EXCLUDE_FILES := $$($1_EXCLUDE_FILES), \
|
||||
DISABLED_WARNINGS := $$($1_DISABLED_WARNINGS), \
|
||||
DISABLE_SJAVAC := $$($1_DISABLE_SJAVAC), \
|
||||
))
|
||||
|
||||
@@ -173,35 +175,42 @@ $(BUILD_DEMO_CodePointIM_JAR): $(CODEPOINT_METAINF_SERVICE_FILE)
|
||||
|
||||
$(eval $(call SetupBuildDemo, FileChooserDemo, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, SwingSet2, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
EXTRA_COPY_TO_JAR := .java, \
|
||||
EXTRA_MANIFEST_ATTR := SplashScreen-Image: resources/images/splash.png, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked static serial cast, \
|
||||
DISABLE_SJAVAC := true, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, Font2DTest, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked serial cast, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, J2Ddemo, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
MAIN_CLASS := java2d.J2Ddemo, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked cast, \
|
||||
JAR_NAME := J2Ddemo, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, Metalworks, \
|
||||
DISABLED_WARNINGS := rawtypes unchecked, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, Notepad, \
|
||||
DISABLED_WARNINGS := rawtypes, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, Stylepad, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
DISABLED_WARNINGS := rawtypes unchecked, \
|
||||
EXTRA_SRC_DIR := $(DEMO_SHARE_SRC)/jfc/Notepad, \
|
||||
EXCLUDE_FILES := $(DEMO_SHARE_SRC)/jfc/Notepad/README.txt, \
|
||||
))
|
||||
@@ -211,6 +220,7 @@ $(eval $(call SetupBuildDemo, SampleTree, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, TableExample, \
|
||||
DISABLED_WARNINGS := rawtypes unchecked deprecation, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
))
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2020, 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
|
||||
@@ -77,12 +77,12 @@ define SetupInterimModule
|
||||
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java, \
|
||||
COPY := .gif .png .xml .css .js javax.tools.JavaCompilerTool, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules/$1.interim, \
|
||||
DISABLED_WARNINGS := module, \
|
||||
ADD_JAVAC_FLAGS := --module-path $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules \
|
||||
$$(INTERIM_LANGTOOLS_ADD_EXPORTS) \
|
||||
--patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim \
|
||||
--add-exports java.base/jdk.internal=java.compiler.interim \
|
||||
--add-exports java.base/jdk.internal=jdk.compiler.interim \
|
||||
-Xlint:-module, \
|
||||
--add-exports java.base/jdk.internal=jdk.compiler.interim, \
|
||||
))
|
||||
|
||||
$1_DEPS_INTERIM := $$(addsuffix .interim, $$(filter \
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2018, 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.
|
||||
#
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
|
||||
################################################################################
|
||||
# Generate interim versions of the module-info.java files for the interim
|
||||
# langtools modules. Each interim module has ".interim" added as suffix to the
|
||||
# original module name.
|
||||
|
||||
INTERIM_MODULEINFO_PATTERN := \
|
||||
$(foreach m, $(INTERIM_RMIC_BASE_MODULES), -e 's/$m\([,; ]\)/$m.interim\1/g') \
|
||||
-e '/ToolProvider[,; ]/d'
|
||||
|
||||
$(BUILDTOOLS_OUTPUTDIR)/gensrc/%.interim/module-info.java: \
|
||||
$(TOPDIR)/src/%/share/classes/module-info.java
|
||||
$(call LogInfo, Generating module-info.java for $*.interim)
|
||||
$(call MakeDir, $(@D))
|
||||
$(SED) $(INTERIM_MODULEINFO_PATTERN) $< > $@
|
||||
|
||||
TARGETS += $(patsubst %, $(BUILDTOOLS_OUTPUTDIR)/gensrc/%/module-info.java, \
|
||||
$(INTERIM_RMIC_MODULES))
|
||||
|
||||
################################################################################
|
||||
|
||||
RMIC_PKGS := \
|
||||
sun/rmi/rmic \
|
||||
sun/tools/asm \
|
||||
sun/tools/java \
|
||||
sun/tools/javac \
|
||||
sun/tools/tree \
|
||||
sun/tools/util \
|
||||
#
|
||||
|
||||
$(eval $(call SetupJavaCompilation, BUILD_jdk.rmic.interim, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := $(TOPDIR)/src/jdk.rmic/share/classes, \
|
||||
EXCLUDE_FILES := $(TOPDIR)/src/jdk.rmic/share/classes/module-info.java, \
|
||||
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/jdk.rmic.interim/module-info.java, \
|
||||
INCLUDES := $(RMIC_PKGS), \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_modules/jdk.rmic.interim, \
|
||||
COPY := .properties, \
|
||||
ADD_JAVAC_FLAGS := \
|
||||
--module-path $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_modules \
|
||||
$(INTERIM_RMIC_ADD_EXPORTS), \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_jdk.rmic.interim)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
all: $(TARGETS)
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2020, 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
|
||||
@@ -39,7 +39,7 @@ $(eval $(call IncludeCustomExtension, CompileJavaModules.gmk))
|
||||
# Module specific build settings
|
||||
|
||||
java.base_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference,-accessibility '-Xdoclint/package:java.*,javax.*' -XDstringConcat=inline
|
||||
java.base_COPY += .icu .dat .spp .nrm content-types.properties hijrah-config-islamic-umalqura.properties
|
||||
java.base_COPY += .icu .dat .spp .nrm content-types.properties hijrah-config-Hijrah-umalqura_islamic-umalqura.properties
|
||||
java.base_CLEAN += intrinsic.properties
|
||||
|
||||
java.base_EXCLUDE_FILES += \
|
||||
@@ -80,7 +80,7 @@ java.datatransfer_COPY += flavormap.properties
|
||||
################################################################################
|
||||
|
||||
java.desktop_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference \
|
||||
'-Xdoclint/package:java.*,javax.*' -Xlint:exports \
|
||||
'-Xdoclint/package:java.*,javax.*' \
|
||||
--doclint-format html4
|
||||
java.desktop_COPY += .gif .png .wav .txt .xml .css .pf
|
||||
java.desktop_CLEAN += iio-plugin.properties cursors.properties
|
||||
@@ -245,7 +245,6 @@ java.transaction.xa_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/packag
|
||||
################################################################################
|
||||
|
||||
java.sql_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
|
||||
java.sql_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -270,7 +269,7 @@ java.xml_CLEAN += .properties
|
||||
|
||||
################################################################################
|
||||
|
||||
java.naming_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility '-Xdoclint/package:java.*,javax.*' -Xlint:-exports
|
||||
java.naming_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility '-Xdoclint/package:java.*,javax.*'
|
||||
java.naming_CLEAN += jndiprovider.properties
|
||||
|
||||
################################################################################
|
||||
@@ -304,7 +303,8 @@ jdk.compiler_CLEAN_FILES += $(wildcard \
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.hotspot.agent_ADD_JAVAC_FLAGS += $(DISABLE_WARNINGS),-overrides
|
||||
jdk.hotspot.agent_DISABLED_WARNINGS += deprecation rawtypes serial unchecked \
|
||||
cast static overrides fallthrough
|
||||
jdk.hotspot.agent_COPY += .gif .png sa.js .properties
|
||||
|
||||
################################################################################
|
||||
@@ -341,17 +341,17 @@ jdk.jartool_ADD_JAVAC_FLAGS += -XDstringConcat=inline
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.scripting.nashorn_ADD_JAVAC_FLAGS += $(DISABLE_WARNINGS),-overrides
|
||||
jdk.scripting.nashorn_DISABLED_WARNINGS += removal
|
||||
jdk.scripting.nashorn_COPY := .properties .js
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.scripting.nashorn.shell_ADD_JAVAC_FLAGS += $(DISABLE_WARNINGS),-overrides
|
||||
jdk.scripting.nashorn.shell_DISABLED_WARNINGS += removal
|
||||
jdk.scripting.nashorn.shell_COPY += .js .properties
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.rmic_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
|
||||
jdk.rmic_DISABLED_WARNINGS += deprecation
|
||||
jdk.rmic_CLEAN += .properties
|
||||
|
||||
################################################################################
|
||||
@@ -431,7 +431,7 @@ jdk.internal.jvmstat_COPY += aliasmap
|
||||
# The exports are needed since JVMCI is dynamically exported (see
|
||||
# jdk.vm.ci.services.internal.ReflectionAccessJDK::openJVMCITo).
|
||||
|
||||
jdk.internal.vm.ci_ADD_JAVAC_FLAGS += -parameters -Xlint:-exports -XDstringConcat=inline
|
||||
jdk.internal.vm.ci_ADD_JAVAC_FLAGS += -parameters -XDstringConcat=inline
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -536,13 +536,9 @@ jdk.localedata_EXCLUDE_FILES += sun/text/resources/ext/BreakIteratorRules_th.jav
|
||||
jdk.localedata_KEEP_ALL_TRANSLATIONS := true
|
||||
################################################################################
|
||||
|
||||
# There is an issue in sjavac that triggers a warning in jdk.jfr that isn't
|
||||
# triggered without sjavac.
|
||||
ifeq ($(ENABLE_SJAVAC), yes)
|
||||
jdk.jfr_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
|
||||
endif
|
||||
jdk.jfr_DISABLED_WARNINGS += exports
|
||||
jdk.jfr_COPY := .xsd .xml .dtd
|
||||
jdk.jfr_ADD_JAVAC_FLAGS := -XDstringConcat=inline -Xlint:-exports
|
||||
jdk.jfr_ADD_JAVAC_FLAGS := -XDstringConcat=inline
|
||||
|
||||
################################################################################
|
||||
# If this is an imported module that has prebuilt classes, only compile
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2020, 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
|
||||
@@ -42,6 +42,7 @@ $(eval $(call SetupJavaCompilation,BUILD_JIGSAW_TOOLS, \
|
||||
build/tools/jigsaw, \
|
||||
COPY := .properties .html, \
|
||||
BIN := $(TOOLS_CLASSES_DIR), \
|
||||
DISABLED_WARNINGS := fallthrough, \
|
||||
ADD_JAVAC_FLAGS := \
|
||||
--add-modules jdk.jdeps \
|
||||
--add-exports java.base/jdk.internal.module=ALL-UNNAMED \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, 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
|
||||
@@ -40,7 +40,6 @@ $(eval $(call IncludeCustomExtension, CompileTools.gmk))
|
||||
# Use += to be able to add to this from a custom extension
|
||||
BUILD_TOOLS_SRC_DIRS += \
|
||||
$(TOPDIR)/make/jdk/src/classes \
|
||||
$(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes \
|
||||
$(BUILDTOOLS_OUTPUTDIR)/interim_tzdb_classes \
|
||||
#
|
||||
|
||||
@@ -54,6 +53,7 @@ $(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
|
||||
build/tools/jigsaw \
|
||||
build/tools/depend \
|
||||
, \
|
||||
DISABLED_WARNINGS := unchecked rawtypes deprecation cast, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
|
||||
ADD_JAVAC_FLAGS := \
|
||||
--add-exports java.desktop/sun.awt=ALL-UNNAMED \
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# Copyright (c) 2014, 2020, 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
|
||||
@@ -58,12 +59,58 @@ $(call FillFindCache, \
|
||||
)
|
||||
|
||||
ifneq ($(LIBS_DIR), )
|
||||
JMOD_FLAGS += --libs $(LIBS_DIR)
|
||||
DEPS += $(call FindFiles, $(LIBS_DIR))
|
||||
ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public)
|
||||
# For public debug symbols on Windows, we have to use stripped pdbs and rename them
|
||||
rename_stripped = $(patsubst %.stripped.pdb,%.pdb,$1)
|
||||
LIBS_DIR_FILTERED := $(subst modules_libs,modules_libs_filtered, $(LIBS_DIR))
|
||||
FILES_LIBS := $(filter-out %.pdb, $(call FindFiles, $(LIBS_DIR))) \
|
||||
$(filter %.stripped.pdb, $(call FindFiles, $(LIBS_DIR)))
|
||||
$(eval $(call SetupCopyFiles, COPY_FILTERED_LIBS, \
|
||||
SRC := $(LIBS_DIR), \
|
||||
DEST := $(LIBS_DIR_FILTERED), \
|
||||
FILES := $(FILES_LIBS), \
|
||||
NAME_MACRO := rename_stripped, \
|
||||
))
|
||||
DEPS += $(COPY_FILTERED_LIBS)
|
||||
JMOD_FLAGS += --libs $(LIBS_DIR_FILTERED)
|
||||
else
|
||||
JMOD_FLAGS += --libs $(LIBS_DIR)
|
||||
endif
|
||||
endif
|
||||
ifneq ($(CMDS_DIR), )
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR)
|
||||
DEPS += $(call FindFiles, $(CMDS_DIR))
|
||||
ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public)
|
||||
# For public debug symbols on Windows, we have to use stripped pdbs, rename them
|
||||
# and filter out a few launcher pdbs where there's a lib that goes by the same name
|
||||
rename_stripped = $(patsubst %.stripped.pdb,%.pdb,$1)
|
||||
CMDS_DIR_FILTERED := $(subst modules_cmds,modules_cmds_filtered, $(CMDS_DIR))
|
||||
FILES_CMDS := $(filter-out %.pdb, $(call FindFiles, $(CMDS_DIR))) \
|
||||
$(filter-out %jimage.stripped.pdb %jpackage.stripped.pdb %java.stripped.pdb, \
|
||||
$(filter %.stripped.pdb, $(call FindFiles, $(CMDS_DIR))))
|
||||
$(eval $(call SetupCopyFiles, COPY_FILTERED_CMDS, \
|
||||
SRC := $(CMDS_DIR), \
|
||||
DEST := $(CMDS_DIR_FILTERED), \
|
||||
FILES := $(FILES_CMDS), \
|
||||
NAME_MACRO := rename_stripped, \
|
||||
))
|
||||
DEPS += $(COPY_FILTERED_CMDS)
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR_FILTERED)
|
||||
else ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+full)
|
||||
# For full debug symbols on Windows, we have to filter out a few launcher pdbs
|
||||
# where there's a lib that goes by the same name
|
||||
CMDS_DIR_FILTERED := $(subst modules_cmds,modules_cmds_filtered, $(CMDS_DIR))
|
||||
$(eval $(call SetupCopyFiles, COPY_FILTERED_CMDS, \
|
||||
SRC := $(CMDS_DIR), \
|
||||
DEST := $(CMDS_DIR_FILTERED), \
|
||||
FILES := $(filter-out %jimage.pdb %jpackage.pdb %java.pdb, \
|
||||
$(call FindFiles, $(CMDS_DIR))), \
|
||||
))
|
||||
DEPS += $(COPY_FILTERED_CMDS)
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR_FILTERED)
|
||||
else
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR)
|
||||
endif
|
||||
endif
|
||||
ifneq ($(CONF_DIR), )
|
||||
JMOD_FLAGS += --config $(CONF_DIR)
|
||||
@@ -159,7 +206,15 @@ ifeq ($(INTERIM_JMOD), true)
|
||||
INTERIM_MSG := interim$(SPACE)
|
||||
endif
|
||||
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM,*.pdb,*.map}'
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), )
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.pdb,*.map}'
|
||||
else
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.map}'
|
||||
endif
|
||||
else
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
|
||||
endif
|
||||
|
||||
# Create jmods in the support dir and then move them into place to keep the
|
||||
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1997, 2020, 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
|
||||
@@ -57,10 +57,7 @@ $(eval $(call IncludeCustomExtension, Docs.gmk))
|
||||
################################################################################
|
||||
# Javadoc settings
|
||||
|
||||
# On top of the sources that was used to compile the JDK, we need some
|
||||
# extra java.rmi sources that are used just for javadoc.
|
||||
MODULES_SOURCE_PATH := $(call PathList, $(call GetModuleSrcPath) \
|
||||
$(SUPPORT_OUTPUTDIR)/rmic/* $(TOPDIR)/src/*/share/doc/stub)
|
||||
MODULES_SOURCE_PATH := $(call PathList, $(call GetModuleSrcPath) )
|
||||
|
||||
# URLs
|
||||
JAVADOC_BASE_URL := https://docs.oracle.com/pls/topic/lookup?ctx=javase$(VERSION_NUMBER)&id=homepage
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2020, 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
|
||||
@@ -65,9 +65,17 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
|
||||
$(call MakeDir, $(LINK_OPT_DIR))
|
||||
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $@))
|
||||
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $(JLI_TRACE_FILE)))
|
||||
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.raw \
|
||||
-Duser.language=en -Duser.country=US \
|
||||
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
|
||||
build.tools.classlist.HelloClasslist $(LOG_DEBUG)
|
||||
$(GREP) -v HelloClasslist $@.raw > $(INTERIM_IMAGE_DIR)/lib/classlist
|
||||
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-Xmx128M -Xms128M $(LOG_INFO)
|
||||
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.raw \
|
||||
-Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
|
||||
-Duser.language=en -Duser.country=US \
|
||||
--module-path $(SUPPORT_OUTPUTDIR)/classlist.jar \
|
||||
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
|
||||
build.tools.classlist.HelloClasslist \
|
||||
2> $(LINK_OPT_DIR)/stderr > $(JLI_TRACE_FILE) \
|
||||
@@ -96,6 +104,17 @@ $(eval $(call SetupCopyFiles, COPY_CLASSLIST, \
|
||||
|
||||
TARGETS += $(COPY_CLASSLIST)
|
||||
|
||||
# In case of shipping public debug symbols on windows, there is another temporary
|
||||
# location from where jmods are compiled - need to deploy classlist there, too.
|
||||
ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public)
|
||||
$(eval $(call SetupCopyFiles, COPY_CLASSLIST_TO_FILTERED, \
|
||||
FILES := $(CLASSLIST_FILE), \
|
||||
DEST := $(SUPPORT_OUTPUTDIR)/modules_libs_filtered/java.base, \
|
||||
))
|
||||
|
||||
TARGETS += $(COPY_CLASSLIST_TO_FILTERED)
|
||||
endif
|
||||
|
||||
# Copy the default_jli_trace.txt file into jdk.jlink
|
||||
$(eval $(call SetupCopyFiles, COPY_JLI_TRACE, \
|
||||
FILES := $(JLI_TRACE_FILE), \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2020, 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
|
||||
@@ -45,7 +45,7 @@ help:
|
||||
$(info $(_) make <name>-image # Build just the image for any of: )
|
||||
$(info $(_) # jdk, test, docs, symbols, legacy-jre, static-libs)
|
||||
$(info $(_) make <phase> # Build the specified phase and everything it depends on)
|
||||
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata, rmic))
|
||||
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata))
|
||||
$(info $(_) make *-only # Applies to most targets and disables building the)
|
||||
$(info $(_) # dependencies for that target. This is faster but may)
|
||||
$(info $(_) # result in incorrect build results!)
|
||||
@@ -82,7 +82,7 @@ help:
|
||||
$(info $(_) make <module> # Build <module> and everything it depends on)
|
||||
$(info $(_) make <module>-<phase> # Compile the specified phase for the specified module)
|
||||
$(info $(_) # and everything it depends on)
|
||||
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata, rmic))
|
||||
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata))
|
||||
$(info )
|
||||
$(info Make control variables)
|
||||
$(info $(_) CONF= # Build all configurations (note, assignment is empty))
|
||||
@@ -117,13 +117,14 @@ print-configurations:
|
||||
# We need a dummy rule otherwise make will complain
|
||||
@true
|
||||
|
||||
# This is not really a "help" target, but it is a global target, and those are
|
||||
# all contained in this file.
|
||||
run-test-prebuilt:
|
||||
test-prebuilt:
|
||||
@( cd $(topdir) && \
|
||||
$(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \
|
||||
run-test-prebuilt CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )
|
||||
test-prebuilt CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )
|
||||
|
||||
ALL_GLOBAL_TARGETS := help print-configurations run-test-prebuilt
|
||||
# Alias for backwards compatibility
|
||||
run-test-prebuilt: test-prebuilt
|
||||
|
||||
ALL_GLOBAL_TARGETS := help print-configurations test-prebuilt run-test-prebuilt
|
||||
|
||||
.PHONY: $(ALL_GLOBAL_TARGETS)
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2020, Red Hat Inc.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -23,23 +23,35 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This makefile creates a jdk image overlayed with statically linked core
|
||||
# libraries.
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include RMICompilation.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
RMIC_MAIN_CLASS := -m jdk.rmic.interim/sun.rmi.rmic.Main
|
||||
TARGETS :=
|
||||
|
||||
RMIC := $(JAVA_SMALL) $(INTERIM_RMIC_ARGS) $(RMIC_MAIN_CLASS)
|
||||
$(eval $(call SetupCopyFiles, COPY_JDK_IMG, \
|
||||
SRC := $(JDK_IMAGE_DIR)/, \
|
||||
DEST := $(GRAAL_BUILDER_IMAGE_DIR)/, \
|
||||
FILES := $(call FindFiles, $(JDK_IMAGE_DIR)/), \
|
||||
))
|
||||
TARGETS += $(COPY_JDK_IMG)
|
||||
|
||||
CLASSES_DIR := $(JDK_OUTPUTDIR)/modules
|
||||
# NOTE: If the smart javac dependency management is reintroduced, these classes
|
||||
# risk interfering with the dependency checking. In that case they will need to
|
||||
# be kept separate.
|
||||
STUB_CLASSES_DIR := $(JDK_OUTPUTDIR)/modules
|
||||
RMIC_GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/rmic
|
||||
$(eval $(call SetupCopyFiles, COPY_STATIC_LIBS, \
|
||||
SRC := $(STATIC_LIBS_IMAGE_DIR)/lib, \
|
||||
DEST := $(GRAAL_BUILDER_IMAGE_DIR)/lib, \
|
||||
FILES := $(filter %$(STATIC_LIBRARY_SUFFIX), \
|
||||
$(call FindFiles, $(STATIC_LIBS_IMAGE_DIR)/lib)), \
|
||||
))
|
||||
TARGETS += $(COPY_STATIC_LIBS)
|
||||
|
||||
################################################################################
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2020, 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
|
||||
@@ -208,6 +208,7 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
else
|
||||
LIBS_TARGET_SUBDIR := lib
|
||||
endif
|
||||
CMDS_TARGET_SUBDIR := bin
|
||||
|
||||
# Param 1 - dir to find debuginfo files in
|
||||
FindDebuginfoFiles = \
|
||||
@@ -224,12 +225,15 @@ else
|
||||
# dirs.
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
$(call FillFindCache, \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_cmds $(SUPPORT_OUTPUTDIR)/modules_libs)
|
||||
$(SUPPORT_OUTPUTDIR)/modules_libs $(SUPPORT_OUTPUTDIR)/modules_cmds)
|
||||
FindDebuginfoFiles = \
|
||||
$(if $(wildcard $1), $(call containing, .dSYM/, $(call FindFiles, $1)))
|
||||
endif
|
||||
endif
|
||||
|
||||
FILTERED_PDBS := %jimage.stripped.pdb %jpackage.stripped.pdb %java.stripped.pdb \
|
||||
%jimage.pdb %jpackage.pdb %java.pdb %jimage.map %jpackage.map %java.map
|
||||
|
||||
# Param 1 - either JDK or JRE
|
||||
SetupCopyDebuginfo = \
|
||||
$(foreach m, $(ALL_$1_MODULES), \
|
||||
@@ -240,6 +244,13 @@ SetupCopyDebuginfo = \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_libs/$m), \
|
||||
)) \
|
||||
$(eval $1_TARGETS += $$(COPY_$1_LIBS_DEBUGINFO_$m)) \
|
||||
$(eval $(call SetupCopyFiles, COPY_$1_CMDS_DEBUGINFO_$m, \
|
||||
SRC := $(SUPPORT_OUTPUTDIR)/modules_cmds/$m, \
|
||||
DEST := $($1_IMAGE_DIR)/$(CMDS_TARGET_SUBDIR), \
|
||||
FILES := $(filter-out $(FILTERED_PDBS), $(call FindDebuginfoFiles, \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_cmds/$m)), \
|
||||
)) \
|
||||
$(eval $1_TARGETS += $$(COPY_$1_CMDS_DEBUGINFO_$m)) \
|
||||
)
|
||||
|
||||
# No space before argument to avoid having to put $(strip ) everywhere in
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2020, 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
|
||||
@@ -47,7 +47,7 @@ ifeq ($(HAS_SPEC),)
|
||||
|
||||
# Here are "global" targets, i.e. targets that can be executed without having
|
||||
# a configuration. This will define ALL_GLOBAL_TARGETS.
|
||||
include $(topdir)/make/Help.gmk
|
||||
include $(topdir)/make/Global.gmk
|
||||
|
||||
# Targets provided by Init.gmk.
|
||||
ALL_INIT_TARGETS := print-modules print-targets print-configuration \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, 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
|
||||
@@ -72,12 +72,6 @@ buildtools-langtools:
|
||||
interim-langtools:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimLangtools.gmk)
|
||||
|
||||
interim-rmic:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimRmic.gmk)
|
||||
|
||||
interim-cldrconverter:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimCLDRConverter.gmk)
|
||||
|
||||
interim-tzdb:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimTZDB.gmk)
|
||||
|
||||
@@ -92,7 +86,7 @@ buildtools-hotspot:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileToolsHotspot.gmk)
|
||||
|
||||
ALL_TARGETS += buildtools-langtools interim-langtools \
|
||||
interim-rmic interim-cldrconverter interim-tzdb buildtools-jdk buildtools-modules \
|
||||
interim-tzdb buildtools-jdk buildtools-modules \
|
||||
buildtools-hotspot
|
||||
|
||||
################################################################################
|
||||
@@ -196,16 +190,6 @@ $(foreach m, $(JAVA_MODULES), $(eval $(call DeclareCompileJavaRecipe,$m)))
|
||||
|
||||
ALL_TARGETS += $(JAVA_TARGETS)
|
||||
|
||||
################################################################################
|
||||
# Targets for running rmic.
|
||||
$(eval $(call DeclareRecipesForPhase, RMIC, \
|
||||
TARGET_SUFFIX := rmic, \
|
||||
FILE_PREFIX := Rmic, \
|
||||
MAKE_SUBDIR := rmic, \
|
||||
CHECK_MODULES := $(ALL_MODULES)))
|
||||
|
||||
ALL_TARGETS += $(RMIC_TARGETS)
|
||||
|
||||
################################################################################
|
||||
# Targets for compiling native libraries
|
||||
$(eval $(call DeclareRecipesForPhase, LIBS, \
|
||||
@@ -407,6 +391,9 @@ release-file:
|
||||
exploded-image-optimize:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ExplodedImageOptimize.gmk)
|
||||
|
||||
graal-builder-image:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f GraalBuilderImage.gmk)
|
||||
|
||||
ifeq ($(JCOV_ENABLED), true)
|
||||
jcov-image:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Coverage.gmk jcov-image)
|
||||
@@ -415,7 +402,7 @@ endif
|
||||
ALL_TARGETS += store-source-revision create-source-revision-tracker bootcycle-images zip-security \
|
||||
zip-source jrtfs-jar jdk-image legacy-jre-image \
|
||||
symbols-image static-libs-image mac-jdk-bundle mac-legacy-jre-bundle \
|
||||
release-file exploded-image-optimize jcov-image
|
||||
release-file exploded-image-optimize graal-builder-image jcov-image
|
||||
|
||||
################################################################################
|
||||
# Docs targets
|
||||
@@ -674,7 +661,7 @@ else
|
||||
|
||||
interim-langtools: $(INTERIM_LANGTOOLS_GENSRC_TARGETS)
|
||||
|
||||
buildtools-jdk: interim-langtools interim-cldrconverter interim-tzdb
|
||||
buildtools-jdk: interim-langtools interim-tzdb
|
||||
|
||||
buildtools-hotspot: interim-langtools
|
||||
|
||||
@@ -688,10 +675,6 @@ else
|
||||
|
||||
$(GENDATA_TARGETS): interim-langtools buildtools-jdk
|
||||
|
||||
interim-rmic: interim-langtools
|
||||
|
||||
$(RMIC_TARGETS): interim-langtools interim-rmic
|
||||
|
||||
$(JAVA_TARGETS): interim-langtools
|
||||
|
||||
# Declare dependencies between hotspot-<variant>* targets
|
||||
@@ -732,9 +715,6 @@ else
|
||||
# Declare dependencies between the module meta targets
|
||||
$(foreach m, $(ALL_MODULES), $(eval $m: $(call FindDepsForModule,$m)))
|
||||
|
||||
# Declare dependencies between <module>-rmic to <module>-java
|
||||
$(foreach m, $(RMIC_MODULES), $(eval $m-rmic: $m-java))
|
||||
|
||||
# Declare dependencies from <module>-lib to <module>-java
|
||||
# Skip modules that do not have java source.
|
||||
$(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs: $m-java))
|
||||
@@ -768,7 +748,7 @@ else
|
||||
jdk.internal.vm.compiler-gensrc-moduleinfo: jdk.internal.vm.compiler-gensrc-src
|
||||
jdk.internal.vm.compiler.management-gensrc-moduleinfo: jdk.internal.vm.compiler.management-gensrc-src
|
||||
|
||||
jdk.jdeps-gendata: java rmic
|
||||
jdk.jdeps-gendata: java
|
||||
|
||||
# The ct.sym generation uses all the moduleinfos as input
|
||||
jdk.compiler-gendata: $(GENSRC_MODULEINFO_TARGETS)
|
||||
@@ -790,7 +770,6 @@ else
|
||||
# Declare dependencies from <module>-jmod to all other module targets
|
||||
$(foreach m, $(JAVA_MODULES), $(eval $m_JMOD_DEPS += $m-java))
|
||||
$(foreach m, $(GENDATA_MODULES), $(eval $m_JMOD_DEPS += $m-gendata))
|
||||
$(foreach m, $(RMIC_MODULES), $(eval $m_JMOD_DEPS += $m-rmic))
|
||||
$(foreach m, $(LIBS_MODULES), $(eval $m_JMOD_DEPS += $m-libs))
|
||||
$(foreach m, $(LAUNCHER_MODULES), $(eval $m_JMOD_DEPS += $m-launchers))
|
||||
$(foreach m, $(COPY_MODULES), $(eval $m_JMOD_DEPS += $m-copy))
|
||||
@@ -856,7 +835,7 @@ else
|
||||
zip-security: java.base-java java.security.jgss-java java.security.jgss-libs \
|
||||
$(filter jdk.crypto%, $(JAVA_TARGETS))
|
||||
|
||||
zip-source: gensrc rmic
|
||||
zip-source: gensrc
|
||||
|
||||
jrtfs-jar: interim-langtools
|
||||
|
||||
@@ -886,6 +865,8 @@ else
|
||||
|
||||
static-libs-image: $(STATIC_LIBS_TARGETS)
|
||||
|
||||
graal-builder-image: jdk-image static-libs-image
|
||||
|
||||
mac-jdk-bundle: jdk-image
|
||||
mac-legacy-jre-bundle: legacy-jre-image
|
||||
|
||||
@@ -901,11 +882,11 @@ else
|
||||
|
||||
bootcycle-images: jdk-image
|
||||
|
||||
docs-jdk-api-javadoc: $(GENSRC_TARGETS) rmic
|
||||
docs-jdk-api-javadoc: $(GENSRC_TARGETS)
|
||||
|
||||
docs-javase-api-javadoc: $(GENSRC_TARGETS) rmic
|
||||
docs-javase-api-javadoc: $(GENSRC_TARGETS)
|
||||
|
||||
docs-reference-api-javadoc: $(GENSRC_TARGETS) rmic
|
||||
docs-reference-api-javadoc: $(GENSRC_TARGETS)
|
||||
|
||||
docs-jdk-api-modulegraph: exploded-image buildtools-modules
|
||||
|
||||
@@ -987,7 +968,7 @@ endif
|
||||
|
||||
# If not already set, set the JVM specific tools targets
|
||||
JVM_TOOLS_TARGETS ?= buildtools-hotspot
|
||||
buildtools: buildtools-langtools interim-langtools interim-rmic \
|
||||
buildtools: buildtools-langtools interim-langtools \
|
||||
buildtools-jdk $(JVM_TOOLS_TARGETS)
|
||||
|
||||
# Declare dependencies from hotspot-<variant> targets
|
||||
@@ -1010,8 +991,6 @@ copy: $(ALL_COPY_TARGETS)
|
||||
|
||||
java: $(JAVA_TARGETS)
|
||||
|
||||
rmic: $(RMIC_TARGETS)
|
||||
|
||||
libs: $(LIBS_TARGETS)
|
||||
|
||||
static-libs: $(STATIC_LIBS_TARGETS)
|
||||
@@ -1029,7 +1008,6 @@ jdk.jdwp.agent-gensrc: jdk.jdi-gensrc
|
||||
$(foreach m, $(GENSRC_MODULES), $(eval $m: $m-gensrc))
|
||||
$(foreach m, $(JAVA_MODULES), $(eval $m: $m-java))
|
||||
$(foreach m, $(GENDATA_MODULES), $(eval $m: $m-gendata))
|
||||
$(foreach m, $(RMIC_MODULES), $(eval $m: $m-rmic))
|
||||
$(foreach m, $(LIBS_MODULES), $(eval $m: $m-libs))
|
||||
$(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers))
|
||||
$(foreach m, $(ALL_COPY_MODULES), $(eval $m: $m-copy))
|
||||
@@ -1129,7 +1107,7 @@ all-images: product-images test-image docs-image
|
||||
all-bundles: product-bundles test-bundles docs-bundles static-libs-bundles
|
||||
|
||||
ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-gensrc gensrc gendata \
|
||||
copy java rmic libs static-libs launchers jmods \
|
||||
copy java libs static-libs launchers jmods \
|
||||
jdk.jdwp.agent-gensrc $(ALL_MODULES) demos \
|
||||
exploded-image-base exploded-image \
|
||||
create-buildjdk docs-jdk-api docs-javase-api docs-reference-api docs-jdk \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2020, 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
|
||||
@@ -45,7 +45,7 @@ ifneq ($(TEST_VM_OPTS), )
|
||||
endif
|
||||
|
||||
$(eval $(call ParseKeywordVariable, TEST_OPTS, \
|
||||
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR JCOV, \
|
||||
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR JCOV JCOV_DIFF_CHANGESET, \
|
||||
STRING_KEYWORDS := VM_OPTIONS JAVA_OPTIONS AOT_MODULES, \
|
||||
))
|
||||
|
||||
@@ -701,7 +701,8 @@ define SetupRunMicroTestBody
|
||||
endif
|
||||
|
||||
ifneq ($$(MICRO_VM_OPTIONS)$$(MICRO_JAVA_OPTIONS), )
|
||||
$1_MICRO_VM_OPTIONS := -jvmArgs $$(MICRO_VM_OPTIONS) $$(MICRO_JAVA_OPTIONS)
|
||||
JMH_JVM_ARGS := $$(MICRO_VM_OPTIONS) $$(MICRO_JAVA_OPTIONS)
|
||||
$1_MICRO_VM_OPTIONS := -jvmArgs $(call ShellQuote,$$(JMH_JVM_ARGS))
|
||||
endif
|
||||
|
||||
ifneq ($$(MICRO_ITER), )
|
||||
@@ -1048,7 +1049,7 @@ define SetupRunSpecialTestBody
|
||||
else ifeq ($$($1_TEST_NAME), make)
|
||||
$1_TEST_COMMAND_LINE := \
|
||||
($(CD) $(TOPDIR)/test/make && $(MAKE) $(MAKE_ARGS) -f \
|
||||
TestMake.gmk $$($1_TEST_ARGS))
|
||||
TestMake.gmk $$($1_TEST_ARGS) TEST_SUPPORT_DIR="$$($1_TEST_SUPPORT_DIR)")
|
||||
else
|
||||
$$(error Invalid special test specification: $$($1_TEST_NAME))
|
||||
endif
|
||||
@@ -1072,10 +1073,14 @@ define SetupRunSpecialTestBody
|
||||
$$(call LogWarn, Test report is stored in $$(strip \
|
||||
$$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR))))
|
||||
$$(call LogWarn, Warning: Special test results are not properly parsed!)
|
||||
$$(eval $1_PASSED := 0)
|
||||
$$(eval $1_FAILED := 0)
|
||||
$$(eval $1_PASSED := $$(shell \
|
||||
if [ `$(CAT) $$($1_EXITCODE)` = "0" ]; then $(ECHO) 1; else $(ECHO) 0; fi \
|
||||
))
|
||||
$$(eval $1_FAILED := $$(shell \
|
||||
if [ `$(CAT) $$($1_EXITCODE)` = "0" ]; then $(ECHO) 0; else $(ECHO) 1; fi \
|
||||
))
|
||||
$$(eval $1_ERROR := 0)
|
||||
$$(eval $1_TOTAL := 0)
|
||||
$$(eval $1_TOTAL := 1)
|
||||
|
||||
$1: run-test-$1 parse-test-$1
|
||||
|
||||
@@ -1261,12 +1266,44 @@ ifeq ($(TEST_OPTS_JCOV), true)
|
||||
TARGETS += jcov-do-start-grabber jcov-start-grabber jcov-stop-grabber \
|
||||
jcov-gen-report
|
||||
|
||||
ifneq ($(TEST_OPTS_JCOV_DIFF_CHANGESET), )
|
||||
|
||||
JCOV_SOURCE_DIFF := $(JCOV_OUTPUT_DIR)/source_diff
|
||||
JCOV_DIFF_COVERAGE_REPORT := $(JCOV_OUTPUT_DIR)/diff_coverage_report
|
||||
|
||||
ifneq ($(and $(HG), $(wildcard $(TOPDIR)/.hg)), )
|
||||
DIFF_COMMAND := $(HG) -R $(TOPDIR) diff -r $(TEST_OPTS_JCOV_DIFF_CHANGESET) > $(JCOV_SOURCE_DIFF)
|
||||
else ifneq ($(and $(GIT), $(wildcard $(TOPDIR)/.git)), )
|
||||
DIFF_COMMAND := $(GIT) -C $(TOPDIR) diff $(TEST_OPTS_JCOV_DIFF_CHANGESET) > $(JCOV_SOURCE_DIFF)
|
||||
else
|
||||
$(info Error: Must be either hg or git source tree for diff coverage.)
|
||||
$(error Neither hg nor git source tree.)
|
||||
endif
|
||||
|
||||
jcov-gen-diffcoverage: jcov-stop-grabber
|
||||
$(call LogWarn, Generating diff coverage with changeset $(TEST_OPTS_JCOV_DIFF_CHANGESET) ... )
|
||||
$(DIFF_COMMAND)
|
||||
$(JAVA) -Xmx4g -jar $(JCOV_HOME)/lib/jcov.jar \
|
||||
DiffCoverage -replaceDiff "src/.*/classes/:" -all \
|
||||
$(JCOV_RESULT_FILE) $(JCOV_SOURCE_DIFF) > \
|
||||
$(JCOV_DIFF_COVERAGE_REPORT)
|
||||
|
||||
TARGETS += jcov-gen-diffcoverage
|
||||
|
||||
endif
|
||||
|
||||
# Hook this into the framework at appropriate places
|
||||
pre-run-test: jcov-start-grabber
|
||||
|
||||
post-run-test: jcov-gen-report
|
||||
|
||||
jcov-gen-report: run-all-tests
|
||||
ifneq ($(TEST_OPTS_JCOV_DIFF_CHANGESET), )
|
||||
|
||||
post-run-test: jcov-gen-diffcoverage
|
||||
|
||||
endif
|
||||
|
||||
jcov-stop-grabber: run-all-tests
|
||||
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2017, 2020, 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
|
||||
@@ -336,7 +336,7 @@ SPEC := $(NEW_SPEC)
|
||||
|
||||
default: all
|
||||
|
||||
run-test-prebuilt:
|
||||
test-prebuilt:
|
||||
# Need to make sure the failure logs output dir exists since
|
||||
# ExecuteWithLog is called in RunTests.gmk. The PrepareFailureLogs macro
|
||||
# is unfortunately not available at this point.
|
||||
@@ -351,6 +351,6 @@ run-test-prebuilt:
|
||||
@cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -f make/RunTests.gmk run-test \
|
||||
TEST="$(TEST)"
|
||||
|
||||
all: run-test-prebuilt
|
||||
all: test-prebuilt
|
||||
|
||||
.PHONY: default all
|
||||
.PHONY: default all test-prebuilt
|
||||
|
||||
@@ -106,6 +106,9 @@ TOOL_OSX_TOBIN = $(JAVA_SMALL) -Djava.awt.headless=true -cp $(BUILDTOOLS_OUTPUTD
|
||||
TOOL_CLDRCONVERTER = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
build.tools.cldrconverter.CLDRConverter
|
||||
|
||||
TOOL_INTPOLY = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
build.tools.intpoly.FieldGen
|
||||
|
||||
TOOL_GENERATELSREQUIVMAPS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
build.tools.generatelsrequivmaps.EquivMapsGenerator
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2020, 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
|
||||
@@ -39,18 +39,12 @@ $(eval $(call IncludeCustomExtension, ZipSource.gmk))
|
||||
# Create the directory structure for src.zip using symlinks.
|
||||
# <module>/<package>/<file>.java
|
||||
|
||||
# Find extra source dirs for a module that are not part of normal compilation
|
||||
# but should be included in src.zip.
|
||||
# $1: Module to find dirs for
|
||||
ExtraSrcDirs = \
|
||||
$(wildcard $(SUPPORT_OUTPUTDIR)/rmic/$(strip $1))
|
||||
|
||||
ALL_MODULES := $(FindAllModules)
|
||||
|
||||
# Generate the src dirs in the first make invocation and then call this makefile
|
||||
# again to create src.zip.
|
||||
$(foreach m, $(ALL_MODULES), \
|
||||
$(foreach d, $(call FindModuleSrcDirs, $m) $(call ExtraSrcDirs, $m), \
|
||||
$(foreach d, $(call FindModuleSrcDirs, $m), \
|
||||
$(eval $d_TARGET := $(SRC_ZIP_WORK_DIR)/$(patsubst $(TOPDIR)/%,%,$d)/$m) \
|
||||
$(if $(SRC_GENERATED), , \
|
||||
$(eval $$($d_TARGET): $d ; \
|
||||
|
||||
544
make/autoconf/basic.m4
Normal file
544
make/autoconf/basic.m4
Normal file
@@ -0,0 +1,544 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, 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.
|
||||
#
|
||||
|
||||
m4_include([basic_tools.m4])
|
||||
m4_include([basic_windows.m4])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN_ONCE([BASIC_INIT],
|
||||
[
|
||||
# Save the original command line. This is passed to us by the wrapper configure script.
|
||||
AC_SUBST(CONFIGURE_COMMAND_LINE)
|
||||
# AUTOCONF might be set in the environment by the user. Preserve for "make reconfigure".
|
||||
AC_SUBST(AUTOCONF)
|
||||
# Save the path variable before it gets changed
|
||||
ORIGINAL_PATH="$PATH"
|
||||
AC_SUBST(ORIGINAL_PATH)
|
||||
DATE_WHEN_CONFIGURED=`date`
|
||||
AC_SUBST(DATE_WHEN_CONFIGURED)
|
||||
AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check that there are no unprocessed overridden variables left.
|
||||
# If so, they are an incorrect argument and we will exit with an error.
|
||||
AC_DEFUN([BASIC_CHECK_LEFTOVER_OVERRIDDEN],
|
||||
[
|
||||
if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
|
||||
# Replace the separating ! with spaces before presenting for end user.
|
||||
unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
|
||||
AC_MSG_WARN([The following variables might be unknown to configure: $unknown_variables])
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
|
||||
[
|
||||
# Save the current directory this script was started from
|
||||
CONFIGURE_START_DIR="$PWD"
|
||||
|
||||
# We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
|
||||
# for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
|
||||
# was not available at that time.
|
||||
REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
|
||||
if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
|
||||
ORIGINAL_PATH="$REWRITTEN_PATH"
|
||||
AC_MSG_NOTICE([Rewriting ORIGINAL_PATH to $REWRITTEN_PATH])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
PATH_SEP=";"
|
||||
EXE_SUFFIX=".exe"
|
||||
BASIC_CHECK_PATHS_WINDOWS
|
||||
else
|
||||
PATH_SEP=":"
|
||||
EXE_SUFFIX=""
|
||||
fi
|
||||
AC_SUBST(PATH_SEP)
|
||||
AC_SUBST(EXE_SUFFIX)
|
||||
|
||||
# We get the top-level directory from the supporting wrappers.
|
||||
AC_MSG_CHECKING([for top-level directory])
|
||||
AC_MSG_RESULT([$TOPDIR])
|
||||
AC_SUBST(TOPDIR)
|
||||
AC_SUBST(CONFIGURE_START_DIR)
|
||||
|
||||
# We can only call UTIL_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
|
||||
UTIL_FIXUP_PATH(CONFIGURE_START_DIR)
|
||||
UTIL_FIXUP_PATH(TOPDIR)
|
||||
|
||||
# Locate the directory of this script.
|
||||
AUTOCONF_DIR=$TOPDIR/make/autoconf
|
||||
|
||||
# Setup username (for use in adhoc version strings etc)
|
||||
# Outer [ ] to quote m4.
|
||||
[ USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'` ]
|
||||
AC_SUBST(USERNAME)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Evaluates platform specific overrides for devkit variables.
|
||||
# $1: Name of variable
|
||||
AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE],
|
||||
[
|
||||
if test "x[$]$1" = x; then
|
||||
eval $1="\${$1_${OPENJDK_TARGET_CPU}}"
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
||||
[
|
||||
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
|
||||
[use this devkit for compilers, tools and resources])])
|
||||
|
||||
if test "x$with_devkit" = xyes; then
|
||||
AC_MSG_ERROR([--with-devkit must have a value])
|
||||
elif test "x$with_devkit" != x && test "x$with_devkit" != xno; then
|
||||
UTIL_FIXUP_PATH([with_devkit])
|
||||
DEVKIT_ROOT="$with_devkit"
|
||||
# Check for a meta data info file in the root of the devkit
|
||||
if test -f "$DEVKIT_ROOT/devkit.info"; then
|
||||
. $DEVKIT_ROOT/devkit.info
|
||||
# This potentially sets the following:
|
||||
# A descriptive name of the devkit
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_NAME])
|
||||
# Corresponds to --with-extra-path
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_EXTRA_PATH])
|
||||
# Corresponds to --with-toolchain-path
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_TOOLCHAIN_PATH])
|
||||
# Corresponds to --with-sysroot
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_SYSROOT])
|
||||
|
||||
# Identifies the Visual Studio version in the devkit
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_VERSION])
|
||||
# The Visual Studio include environment variable
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_INCLUDE])
|
||||
# The Visual Studio lib environment variable
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_LIB])
|
||||
# Corresponds to --with-msvcr-dll
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCR_DLL])
|
||||
# Corresponds to --with-msvcp-dll
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL])
|
||||
# Corresponds to --with-ucrt-dll-dir
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_UCRT_DLL_DIR])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for devkit])
|
||||
if test "x$DEVKIT_NAME" != x; then
|
||||
AC_MSG_RESULT([$DEVKIT_NAME in $DEVKIT_ROOT])
|
||||
else
|
||||
AC_MSG_RESULT([$DEVKIT_ROOT])
|
||||
fi
|
||||
|
||||
UTIL_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)
|
||||
|
||||
# Fallback default of just /bin if DEVKIT_PATH is not defined
|
||||
if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
|
||||
DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
|
||||
fi
|
||||
UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],$DEVKIT_TOOLCHAIN_PATH)
|
||||
|
||||
# If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
|
||||
# places for backwards compatiblity.
|
||||
if test "x$DEVKIT_SYSROOT" != x; then
|
||||
SYSROOT="$DEVKIT_SYSROOT"
|
||||
elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
|
||||
SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
|
||||
elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
|
||||
SYSROOT="$DEVKIT_ROOT/$host/sys-root"
|
||||
fi
|
||||
|
||||
if test "x$DEVKIT_ROOT" != x; then
|
||||
DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib"
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64"
|
||||
fi
|
||||
AC_SUBST(DEVKIT_LIB_DIR)
|
||||
fi
|
||||
fi
|
||||
|
||||
# You can force the sysroot if the sysroot encoded into the compiler tools
|
||||
# is not correct.
|
||||
AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
|
||||
[alias for --with-sysroot for backwards compatability])],
|
||||
[SYSROOT=$with_sys_root]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(sysroot, [AS_HELP_STRING([--with-sysroot],
|
||||
[use this directory as sysroot])],
|
||||
[SYSROOT=$with_sysroot]
|
||||
)
|
||||
|
||||
AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
|
||||
[alias for --with-toolchain-path for backwards compatibility])],
|
||||
[UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],$with_tools_dir)]
|
||||
)
|
||||
|
||||
AC_ARG_WITH([toolchain-path], [AS_HELP_STRING([--with-toolchain-path],
|
||||
[prepend these directories when searching for toolchain binaries (compilers etc)])],
|
||||
[UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],$with_toolchain_path)]
|
||||
)
|
||||
|
||||
AC_ARG_WITH([extra-path], [AS_HELP_STRING([--with-extra-path],
|
||||
[prepend these directories to the default path])],
|
||||
[UTIL_PREPEND_TO_PATH([EXTRA_PATH],$with_extra_path)]
|
||||
)
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
|
||||
# If a devkit has been supplied, find xcodebuild in the toolchain_path.
|
||||
# If not, detect if Xcode is installed by running xcodebuild -version
|
||||
# if no Xcode installed, xcodebuild exits with 1
|
||||
# if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
|
||||
if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
|
||||
# We need to use xcodebuild in the toolchain dir provided by the user, this will
|
||||
# fall back on the stub binary in /usr/bin/xcodebuild
|
||||
AC_PATH_PROG([XCODEBUILD], [xcodebuild], [/usr/bin/xcodebuild], [$TOOLCHAIN_PATH])
|
||||
else
|
||||
# this should result in SYSROOT being empty, unless --with-sysroot is provided
|
||||
# when only the command line tools are installed there are no SDKs, so headers
|
||||
# are copied into the system frameworks
|
||||
XCODEBUILD=
|
||||
AC_SUBST(XCODEBUILD)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for sdk name])
|
||||
AC_ARG_WITH([sdk-name], [AS_HELP_STRING([--with-sdk-name],
|
||||
[use the platform SDK of the given name. @<:@macosx@:>@])],
|
||||
[SDKNAME=$with_sdk_name]
|
||||
)
|
||||
AC_MSG_RESULT([$SDKNAME])
|
||||
|
||||
# if toolchain path is specified then don't rely on system headers, they may not compile
|
||||
HAVE_SYSTEM_FRAMEWORK_HEADERS=0
|
||||
test -z "$TOOLCHAIN_PATH" && \
|
||||
HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
|
||||
|
||||
if test -z "$SYSROOT"; then
|
||||
if test -n "$XCODEBUILD"; then
|
||||
# if we don't have system headers, use default SDK name (last resort)
|
||||
if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
|
||||
SDKNAME=${SDKNAME:-macosx}
|
||||
fi
|
||||
|
||||
if test -n "$SDKNAME"; then
|
||||
# Call xcodebuild to determine SYSROOT
|
||||
SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
|
||||
fi
|
||||
else
|
||||
if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
|
||||
AC_MSG_ERROR([No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK])
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# warn user if --with-sdk-name was also set
|
||||
if test -n "$with_sdk_name"; then
|
||||
AC_MSG_WARN([Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
|
||||
# If no system framework headers, then SYSROOT must be set, or we won't build
|
||||
AC_MSG_ERROR([Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments.])
|
||||
fi
|
||||
|
||||
# Perform a basic sanity test
|
||||
if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
|
||||
if test -z "$SYSROOT"; then
|
||||
AC_MSG_ERROR([Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly])
|
||||
else
|
||||
AC_MSG_ERROR([Invalid SDK or SYSROOT path, dependent framework headers not found])
|
||||
fi
|
||||
fi
|
||||
|
||||
# set SDKROOT too, Xcode tools will pick it up
|
||||
SDKROOT="$SYSROOT"
|
||||
AC_SUBST(SDKROOT)
|
||||
fi
|
||||
|
||||
# Prepend the extra path to the global path
|
||||
UTIL_PREPEND_TO_PATH([PATH],$EXTRA_PATH)
|
||||
|
||||
AC_MSG_CHECKING([for sysroot])
|
||||
AC_MSG_RESULT([$SYSROOT])
|
||||
AC_MSG_CHECKING([for toolchain path])
|
||||
AC_MSG_RESULT([$TOOLCHAIN_PATH])
|
||||
AC_MSG_CHECKING([for extra path])
|
||||
AC_MSG_RESULT([$EXTRA_PATH])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
[
|
||||
|
||||
AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
|
||||
[use this as the name of the configuration @<:@generated from important configuration options@:>@])],
|
||||
[ CONF_NAME=${with_conf_name} ])
|
||||
|
||||
# Test from where we are running configure, in or outside of src root.
|
||||
AC_MSG_CHECKING([where to store configuration])
|
||||
if test "x$CONFIGURE_START_DIR" = "x$TOPDIR" \
|
||||
|| test "x$CONFIGURE_START_DIR" = "x$CUSTOM_ROOT" \
|
||||
|| test "x$CONFIGURE_START_DIR" = "x$TOPDIR/make/autoconf" \
|
||||
|| test "x$CONFIGURE_START_DIR" = "x$TOPDIR/make" ; then
|
||||
# We are running configure from the src root.
|
||||
# Create a default ./build/target-variant-debuglevel output root.
|
||||
if test "x${CONF_NAME}" = x; then
|
||||
AC_MSG_RESULT([in default location])
|
||||
CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
|
||||
else
|
||||
AC_MSG_RESULT([in build directory with custom name])
|
||||
fi
|
||||
|
||||
if test "x$CUSTOM_ROOT" != x; then
|
||||
WORKSPACE_ROOT="${CUSTOM_ROOT}"
|
||||
else
|
||||
WORKSPACE_ROOT="${TOPDIR}"
|
||||
fi
|
||||
OUTPUTDIR="${WORKSPACE_ROOT}/build/${CONF_NAME}"
|
||||
$MKDIR -p "$OUTPUTDIR"
|
||||
if test ! -d "$OUTPUTDIR"; then
|
||||
AC_MSG_ERROR([Could not create build directory $OUTPUTDIR])
|
||||
fi
|
||||
else
|
||||
# We are running configure from outside of the src dir.
|
||||
# Then use the current directory as output dir!
|
||||
# If configuration is situated in normal build directory, just use the build
|
||||
# directory name as configuration name, otherwise use the complete path.
|
||||
if test "x${CONF_NAME}" = x; then
|
||||
CONF_NAME=`$ECHO $CONFIGURE_START_DIR | $SED -e "s!^${TOPDIR}/build/!!"`
|
||||
fi
|
||||
OUTPUTDIR="$CONFIGURE_START_DIR"
|
||||
AC_MSG_RESULT([in current directory])
|
||||
|
||||
# WARNING: This might be a bad thing to do. You need to be sure you want to
|
||||
# have a configuration in this directory. Do some sanity checks!
|
||||
|
||||
if test ! -e "$OUTPUTDIR/spec.gmk"; then
|
||||
# If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
|
||||
# other files
|
||||
files_present=`$LS $OUTPUTDIR`
|
||||
# Configure has already touched config.log and confdefs.h in the current dir when this check
|
||||
# is performed.
|
||||
filtered_files=`$ECHO "$files_present" \
|
||||
| $SED -e 's/config.log//g' \
|
||||
-e 's/configure.log//g' \
|
||||
-e 's/confdefs.h//g' \
|
||||
-e 's/configure-support//g' \
|
||||
-e 's/ //g' \
|
||||
| $TR -d '\n'`
|
||||
if test "x$filtered_files" != x; then
|
||||
AC_MSG_NOTICE([Current directory is $CONFIGURE_START_DIR.])
|
||||
AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here])
|
||||
AC_MSG_NOTICE([(as opposed to creating a configuration in <src_root>/build/<conf-name>).])
|
||||
AC_MSG_NOTICE([However, this directory is not empty. This is not allowed, since it could])
|
||||
AC_MSG_NOTICE([seriously mess up just about everything.])
|
||||
AC_MSG_NOTICE([Try 'cd $TOPDIR' and restart configure])
|
||||
AC_MSG_NOTICE([(or create a new empty directory and cd to it).])
|
||||
AC_MSG_ERROR([Will not continue creating configuration in $CONFIGURE_START_DIR])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_MSG_CHECKING([what configuration name to use])
|
||||
AC_MSG_RESULT([$CONF_NAME])
|
||||
|
||||
UTIL_FIXUP_PATH(OUTPUTDIR)
|
||||
|
||||
CONFIGURESUPPORT_OUTPUTDIR="$OUTPUTDIR/configure-support"
|
||||
$MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
|
||||
|
||||
SPEC="$OUTPUTDIR/spec.gmk"
|
||||
AC_SUBST(SPEC)
|
||||
AC_SUBST(CONF_NAME)
|
||||
AC_SUBST(OUTPUTDIR)
|
||||
AC_SUBST(WORKSPACE_ROOT)
|
||||
AC_SUBST(CONFIGURESUPPORT_OUTPUTDIR)
|
||||
|
||||
# The spec.gmk file contains all variables for the make system.
|
||||
AC_CONFIG_FILES([$OUTPUTDIR/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
|
||||
# The bootcycle-spec.gmk file contains support for boot cycle builds.
|
||||
AC_CONFIG_FILES([$OUTPUTDIR/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in])
|
||||
# The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
|
||||
AC_CONFIG_FILES([$OUTPUTDIR/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in])
|
||||
# The compare.sh is used to compare the build output to other builds.
|
||||
AC_CONFIG_FILES([$OUTPUTDIR/compare.sh:$AUTOCONF_DIR/compare.sh.in])
|
||||
# The generated Makefile knows where the spec.gmk is and where the source is.
|
||||
# You can run make from the OUTPUTDIR, or from the top-level Makefile
|
||||
# which will look for generated configurations
|
||||
AC_CONFIG_FILES([$OUTPUTDIR/Makefile:$AUTOCONF_DIR/Makefile.in])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if build directory is on local disk. If not possible to determine,
|
||||
# we prefer to claim it's local.
|
||||
# Argument 1: directory to test
|
||||
# Argument 2: what to do if it is on local disk
|
||||
# Argument 3: what to do otherwise (remote disk or failure)
|
||||
AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
|
||||
[
|
||||
# df -l lists only local disks; if the given directory is not found then
|
||||
# a non-zero exit code is given
|
||||
if test "x$DF" = x; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
# msys does not have df; use Windows "net use" instead.
|
||||
IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
|
||||
if test "x$IS_NETWORK_DISK" = x; then
|
||||
$2
|
||||
else
|
||||
$3
|
||||
fi
|
||||
else
|
||||
# No df here, say it's local
|
||||
$2
|
||||
fi
|
||||
else
|
||||
# JDK-8189619
|
||||
# df on AIX does not understand -l. On modern AIXes it understands "-T local" which
|
||||
# is the same. On older AIXes we just continue to live with a "not local build" warning.
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
DF_LOCAL_ONLY_OPTION='-T local'
|
||||
else
|
||||
DF_LOCAL_ONLY_OPTION='-l'
|
||||
fi
|
||||
if $DF $DF_LOCAL_ONLY_OPTION $1 > /dev/null 2>&1; then
|
||||
$2
|
||||
else
|
||||
# In WSL, local Windows drives are considered remote by df, but we are
|
||||
# required to build into a directory accessible from windows, so consider
|
||||
# them local here.
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
|
||||
if $DF $1 | $GREP -q "^[[A-Z]]:"; then
|
||||
$2
|
||||
else
|
||||
$3
|
||||
fi
|
||||
else
|
||||
$3
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check that source files have basic read permissions set. This might
|
||||
# not be the case in cygwin in certain conditions.
|
||||
AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
file_to_test="$TOPDIR/LICENSE"
|
||||
if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
|
||||
AC_MSG_ERROR([Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin.])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
|
||||
[
|
||||
AC_MSG_CHECKING([if build directory is on local disk])
|
||||
BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUTDIR,
|
||||
[OUTPUT_DIR_IS_LOCAL="yes"],
|
||||
[OUTPUT_DIR_IS_LOCAL="no"])
|
||||
AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL)
|
||||
|
||||
BASIC_CHECK_SRC_PERMS
|
||||
|
||||
# Check if the user has any old-style ALT_ variables set.
|
||||
FOUND_ALT_VARIABLES=`env | grep ^ALT_`
|
||||
|
||||
# Before generating output files, test if they exist. If they do, this is a reconfigure.
|
||||
# Since we can't properly handle the dependencies for this, warn the user about the situation
|
||||
if test -e $OUTPUTDIR/spec.gmk; then
|
||||
IS_RECONFIGURE=yes
|
||||
else
|
||||
IS_RECONFIGURE=no
|
||||
fi
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Default make target
|
||||
#
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_DEFAULT_MAKE_TARGET],
|
||||
[
|
||||
AC_ARG_WITH(default-make-target, [AS_HELP_STRING([--with-default-make-target],
|
||||
[set the default make target @<:@exploded-image@:>@])])
|
||||
if test "x$with_default_make_target" = "x" \
|
||||
|| test "x$with_default_make_target" = "xyes"; then
|
||||
DEFAULT_MAKE_TARGET="exploded-image"
|
||||
elif test "x$with_default_make_target" = "xno"; then
|
||||
AC_MSG_ERROR([--without-default-make-target is not a valid option])
|
||||
else
|
||||
DEFAULT_MAKE_TARGET="$with_default_make_target"
|
||||
fi
|
||||
|
||||
AC_SUBST(DEFAULT_MAKE_TARGET)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Setup the default value for LOG=
|
||||
#
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_DEFAULT_LOG],
|
||||
[
|
||||
AC_ARG_WITH(log, [AS_HELP_STRING([--with-log],
|
||||
[[default vaue for make LOG argument [warn]]])])
|
||||
AC_MSG_CHECKING([for default LOG value])
|
||||
if test "x$with_log" = x; then
|
||||
DEFAULT_LOG=""
|
||||
else
|
||||
# Syntax for valid LOG options is a bit too complex for it to be worth
|
||||
# implementing a test for correctness in configure. Just accept it.
|
||||
DEFAULT_LOG=$with_log
|
||||
fi
|
||||
AC_MSG_RESULT([$DEFAULT_LOG])
|
||||
AC_SUBST(DEFAULT_LOG)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Code to run after AC_OUTPUT
|
||||
AC_DEFUN_ONCE([BASIC_POST_CONFIG_OUTPUT],
|
||||
[
|
||||
# Try to move config.log (generated by autoconf) to the configure-support directory.
|
||||
if test -e ./config.log; then
|
||||
$MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
|
||||
fi
|
||||
|
||||
# Rotate our log file (configure.log)
|
||||
if test -e "$OUTPUTDIR/configure.log.old"; then
|
||||
$RM -f "$OUTPUTDIR/configure.log.old"
|
||||
fi
|
||||
if test -e "$OUTPUTDIR/configure.log"; then
|
||||
$MV -f "$OUTPUTDIR/configure.log" "$OUTPUTDIR/configure.log.old" 2> /dev/null
|
||||
fi
|
||||
|
||||
# Move configure.log from current directory to the build output root
|
||||
if test -e ./configure.log; then
|
||||
$MV -f ./configure.log "$OUTPUTDIR/configure.log" 2> /dev/null
|
||||
fi
|
||||
|
||||
# Make the compare script executable
|
||||
$CHMOD +x $OUTPUTDIR/compare.sh
|
||||
])
|
||||
488
make/autoconf/basic_tools.m4
Normal file
488
make/autoconf/basic_tools.m4
Normal file
@@ -0,0 +1,488 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, 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.
|
||||
#
|
||||
|
||||
###############################################################################
|
||||
# Setup the most fundamental tools that relies on not much else to set up,
|
||||
# but is used by much of the early bootstrap code.
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
[
|
||||
# Start with tools that do not need have cross compilation support
|
||||
# and can be expected to be found in the default PATH. These tools are
|
||||
# used by configure.
|
||||
|
||||
# First are all the simple required tools.
|
||||
UTIL_REQUIRE_PROGS(BASENAME, basename)
|
||||
UTIL_REQUIRE_PROGS(BASH, bash)
|
||||
UTIL_REQUIRE_PROGS(CAT, cat)
|
||||
UTIL_REQUIRE_PROGS(CHMOD, chmod)
|
||||
UTIL_REQUIRE_PROGS(CMP, cmp)
|
||||
UTIL_REQUIRE_PROGS(COMM, comm)
|
||||
UTIL_REQUIRE_PROGS(CP, cp)
|
||||
UTIL_REQUIRE_PROGS(CUT, cut)
|
||||
UTIL_REQUIRE_PROGS(DATE, date)
|
||||
UTIL_REQUIRE_PROGS(DIFF, [gdiff diff])
|
||||
UTIL_REQUIRE_PROGS(DIRNAME, dirname)
|
||||
UTIL_REQUIRE_PROGS(ECHO, echo)
|
||||
UTIL_REQUIRE_PROGS(EXPR, expr)
|
||||
UTIL_REQUIRE_PROGS(FILE, file)
|
||||
UTIL_REQUIRE_PROGS(FIND, find)
|
||||
UTIL_REQUIRE_PROGS(HEAD, head)
|
||||
UTIL_REQUIRE_PROGS(GUNZIP, gunzip)
|
||||
UTIL_REQUIRE_PROGS(GZIP, pigz gzip)
|
||||
UTIL_REQUIRE_PROGS(LN, ln)
|
||||
UTIL_REQUIRE_PROGS(LS, ls)
|
||||
# gmkdir is known to be safe for concurrent invocations with -p flag.
|
||||
UTIL_REQUIRE_PROGS(MKDIR, [gmkdir mkdir])
|
||||
UTIL_REQUIRE_PROGS(MKTEMP, mktemp)
|
||||
UTIL_REQUIRE_PROGS(MV, mv)
|
||||
UTIL_REQUIRE_PROGS(NAWK, [nawk gawk awk])
|
||||
UTIL_REQUIRE_PROGS(PRINTF, printf)
|
||||
UTIL_REQUIRE_PROGS(READLINK, [greadlink readlink])
|
||||
UTIL_REQUIRE_PROGS(RM, rm)
|
||||
UTIL_REQUIRE_PROGS(RMDIR, rmdir)
|
||||
UTIL_REQUIRE_PROGS(SH, sh)
|
||||
UTIL_REQUIRE_PROGS(SORT, sort)
|
||||
UTIL_REQUIRE_PROGS(TAIL, tail)
|
||||
UTIL_REQUIRE_PROGS(TAR, gtar tar)
|
||||
UTIL_REQUIRE_PROGS(TEE, tee)
|
||||
UTIL_REQUIRE_PROGS(TOUCH, touch)
|
||||
UTIL_REQUIRE_PROGS(TR, tr)
|
||||
UTIL_REQUIRE_PROGS(UNAME, uname)
|
||||
UTIL_REQUIRE_PROGS(UNIQ, uniq)
|
||||
UTIL_REQUIRE_PROGS(WC, wc)
|
||||
UTIL_REQUIRE_PROGS(WHICH, which)
|
||||
UTIL_REQUIRE_PROGS(XARGS, xargs)
|
||||
|
||||
# Then required tools that require some special treatment.
|
||||
UTIL_REQUIRE_SPECIAL(AWK, [AC_PROG_AWK])
|
||||
UTIL_REQUIRE_SPECIAL(GREP, [AC_PROG_GREP])
|
||||
UTIL_REQUIRE_SPECIAL(EGREP, [AC_PROG_EGREP])
|
||||
UTIL_REQUIRE_SPECIAL(FGREP, [AC_PROG_FGREP])
|
||||
UTIL_REQUIRE_SPECIAL(SED, [AC_PROG_SED])
|
||||
|
||||
# Always force rm.
|
||||
RM="$RM -f"
|
||||
|
||||
# pwd behaves differently on various platforms and some don't support the -L flag.
|
||||
# Always use the bash builtin pwd to get uniform behavior.
|
||||
THEPWDCMD=pwd
|
||||
|
||||
# These are not required on all platforms
|
||||
UTIL_PATH_PROGS(CYGPATH, cygpath)
|
||||
UTIL_PATH_PROGS(WSLPATH, wslpath)
|
||||
UTIL_PATH_PROGS(DF, df)
|
||||
UTIL_PATH_PROGS(CPIO, [cpio bsdcpio])
|
||||
UTIL_PATH_PROGS(NICE, nice)
|
||||
|
||||
UTIL_PATH_PROGS(LSB_RELEASE, lsb_release)
|
||||
UTIL_PATH_PROGS(CMD, [cmd.exe /mnt/c/Windows/System32/cmd.exe])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if we have found a usable version of make
|
||||
# $1: the path to a potential make binary (or empty)
|
||||
# $2: the description on how we found this
|
||||
AC_DEFUN([BASIC_CHECK_MAKE_VERSION],
|
||||
[
|
||||
MAKE_CANDIDATE="$1"
|
||||
DESCRIPTION="$2"
|
||||
|
||||
# On Cygwin, we require a newer version of make than on other platforms
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
MAKE_VERSION_EXPR="-e 4\."
|
||||
MAKE_REQUIRED_VERSION="4.0"
|
||||
else
|
||||
MAKE_VERSION_EXPR="-e 3\.8[[12]] -e 4\."
|
||||
MAKE_REQUIRED_VERSION="3.81"
|
||||
fi
|
||||
|
||||
if test "x$MAKE_CANDIDATE" != x; then
|
||||
AC_MSG_NOTICE([Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION])
|
||||
MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
|
||||
IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
|
||||
if test "x$IS_GNU_MAKE" = x; then
|
||||
AC_MSG_NOTICE([Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring.])
|
||||
else
|
||||
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
|
||||
if test "x$IS_MODERN_MAKE" = x; then
|
||||
AC_MSG_NOTICE([Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring.])
|
||||
else
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
MAKE_EXPECTED_ENV='cygwin'
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
MAKE_EXPECTED_ENV='msys'
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
|
||||
MAKE_EXPECTED_ENV='x86_64-.*-linux-gnu'
|
||||
else
|
||||
AC_MSG_ERROR([Unknown Windows environment])
|
||||
fi
|
||||
MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
|
||||
IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
|
||||
else
|
||||
# Not relevant for non-Windows
|
||||
IS_MAKE_CORRECT_ENV=true
|
||||
fi
|
||||
if test "x$IS_MAKE_CORRECT_ENV" = x; then
|
||||
AC_MSG_NOTICE([Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring.])
|
||||
else
|
||||
FOUND_MAKE=$MAKE_CANDIDATE
|
||||
UTIL_FIXUP_EXECUTABLE(FOUND_MAKE)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN([BASIC_CHECK_MAKE_OUTPUT_SYNC],
|
||||
[
|
||||
# Check if make supports the output sync option and if so, setup using it.
|
||||
AC_MSG_CHECKING([if make --output-sync is supported])
|
||||
if $MAKE --version -O > /dev/null 2>&1; then
|
||||
OUTPUT_SYNC_SUPPORTED=true
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_MSG_CHECKING([for output-sync value])
|
||||
AC_ARG_WITH([output-sync], [AS_HELP_STRING([--with-output-sync],
|
||||
[set make output sync type if supported by make. @<:@recurse@:>@])],
|
||||
[OUTPUT_SYNC=$with_output_sync])
|
||||
if test "x$OUTPUT_SYNC" = "x"; then
|
||||
OUTPUT_SYNC=none
|
||||
fi
|
||||
AC_MSG_RESULT([$OUTPUT_SYNC])
|
||||
if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
|
||||
AC_MSG_ERROR([Make did not the support the value $OUTPUT_SYNC as output sync type.])
|
||||
fi
|
||||
else
|
||||
OUTPUT_SYNC_SUPPORTED=false
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
AC_SUBST(OUTPUT_SYNC_SUPPORTED)
|
||||
AC_SUBST(OUTPUT_SYNC)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Goes looking for a usable version of GNU make.
|
||||
AC_DEFUN([BASIC_CHECK_GNU_MAKE],
|
||||
[
|
||||
UTIL_SETUP_TOOL([MAKE],
|
||||
[
|
||||
# Try our hardest to locate a correct version of GNU make
|
||||
AC_PATH_PROGS(CHECK_GMAKE, gmake)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_GMAKE", [gmake in PATH])
|
||||
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
AC_PATH_PROGS(CHECK_MAKE, make)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_MAKE", [make in PATH])
|
||||
fi
|
||||
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
if test "x$TOOLCHAIN_PATH" != x; then
|
||||
# We have a toolchain path, check that as well before giving up.
|
||||
OLD_PATH=$PATH
|
||||
PATH=$TOOLCHAIN_PATH:$PATH
|
||||
AC_PATH_PROGS(CHECK_TOOLSDIR_GMAKE, gmake)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_GMAKE", [gmake in tools-dir])
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
AC_PATH_PROGS(CHECK_TOOLSDIR_MAKE, make)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_MAKE", [make in tools-dir])
|
||||
fi
|
||||
PATH=$OLD_PATH
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
AC_MSG_ERROR([Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure.])
|
||||
fi
|
||||
],[
|
||||
# If MAKE was set by user, verify the version
|
||||
BASIC_CHECK_MAKE_VERSION("$MAKE", [user supplied MAKE=$MAKE])
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer.])
|
||||
fi
|
||||
])
|
||||
|
||||
MAKE=$FOUND_MAKE
|
||||
AC_SUBST(MAKE)
|
||||
AC_MSG_NOTICE([Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)])
|
||||
|
||||
BASIC_CHECK_MAKE_OUTPUT_SYNC
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN([BASIC_CHECK_FIND_DELETE],
|
||||
[
|
||||
# Test if find supports -delete
|
||||
AC_MSG_CHECKING([if find supports -delete])
|
||||
FIND_DELETE="-delete"
|
||||
|
||||
DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
|
||||
|
||||
echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
|
||||
|
||||
TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
|
||||
if test -f $DELETEDIR/TestIfFindSupportsDelete; then
|
||||
# No, it does not.
|
||||
$RM $DELETEDIR/TestIfFindSupportsDelete
|
||||
if test "x$OPENJDK_TARGET_OS" = "xaix"; then
|
||||
# AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
|
||||
FIND_DELETE="-print | $XARGS $RM"
|
||||
else
|
||||
FIND_DELETE="-exec $RM \{\} \+"
|
||||
fi
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
$RMDIR $DELETEDIR
|
||||
AC_SUBST(FIND_DELETE)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN([BASIC_CHECK_TAR],
|
||||
[
|
||||
# Test which kind of tar was found
|
||||
if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
|
||||
TAR_TYPE="gnu"
|
||||
elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
|
||||
TAR_TYPE="bsd"
|
||||
elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
|
||||
TAR_TYPE="bsd"
|
||||
elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
|
||||
TAR_TYPE="solaris"
|
||||
elif test "x$OPENJDK_BUILD_OS" = "xaix"; then
|
||||
TAR_TYPE="aix"
|
||||
fi
|
||||
AC_MSG_CHECKING([what type of tar was found])
|
||||
AC_MSG_RESULT([$TAR_TYPE])
|
||||
|
||||
TAR_CREATE_FILE_PARAM=""
|
||||
|
||||
if test "x$TAR_TYPE" = "xgnu"; then
|
||||
TAR_INCLUDE_PARAM="T"
|
||||
TAR_SUPPORTS_TRANSFORM="true"
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
# When using gnu tar for Solaris targets, need to use compatibility mode
|
||||
TAR_CREATE_EXTRA_PARAM="--format=ustar"
|
||||
fi
|
||||
elif test "x$TAR_TYPE" = "aix"; then
|
||||
# -L InputList of aix tar: name of file listing the files and directories
|
||||
# that need to be archived or extracted
|
||||
TAR_INCLUDE_PARAM="L"
|
||||
TAR_SUPPORTS_TRANSFORM="false"
|
||||
else
|
||||
TAR_INCLUDE_PARAM="I"
|
||||
TAR_SUPPORTS_TRANSFORM="false"
|
||||
fi
|
||||
AC_SUBST(TAR_TYPE)
|
||||
AC_SUBST(TAR_CREATE_EXTRA_PARAM)
|
||||
AC_SUBST(TAR_INCLUDE_PARAM)
|
||||
AC_SUBST(TAR_SUPPORTS_TRANSFORM)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN([BASIC_CHECK_GREP],
|
||||
[
|
||||
# Test that grep supports -Fx with a list of pattern which includes null pattern.
|
||||
# This is a problem for the grep resident on AIX.
|
||||
AC_MSG_CHECKING([that grep ($GREP) -Fx handles empty lines in the pattern list correctly])
|
||||
# Multiple subsequent spaces..
|
||||
STACK_SPACES='aaa bbb ccc'
|
||||
# ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
|
||||
# patterns in it.
|
||||
STACK_LIST=${STACK_SPACES// /$'\n'}
|
||||
NEEDLE_SPACES='ccc bbb aaa'
|
||||
NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
|
||||
RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
|
||||
if test "x$RESULT" == "x"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
if test "x$OPENJDK_TARGET_OS" = "xaix"; then
|
||||
ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
|
||||
fi
|
||||
AC_MSG_ERROR([grep does not handle -Fx correctly. ${ADDINFO}])
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
[
|
||||
BASIC_CHECK_GNU_MAKE
|
||||
|
||||
BASIC_CHECK_FIND_DELETE
|
||||
BASIC_CHECK_TAR
|
||||
BASIC_CHECK_GREP
|
||||
BASIC_SETUP_PANDOC
|
||||
|
||||
# These tools might not be installed by default,
|
||||
# need hint on how to install them.
|
||||
UTIL_REQUIRE_PROGS(UNZIP, unzip)
|
||||
# Since zip uses "ZIP" as a environment variable for passing options, we need
|
||||
# to name our variable differently, hence ZIPEXE.
|
||||
UTIL_REQUIRE_PROGS(ZIPEXE, zip)
|
||||
|
||||
# Non-required basic tools
|
||||
|
||||
UTIL_PATH_PROGS(LDD, ldd)
|
||||
if test "x$LDD" = "x"; then
|
||||
# List shared lib dependencies is used for
|
||||
# debug output and checking for forbidden dependencies.
|
||||
# We can build without it.
|
||||
LDD="true"
|
||||
fi
|
||||
UTIL_PATH_PROGS(READELF, [greadelf readelf])
|
||||
UTIL_PATH_PROGS(DOT, dot)
|
||||
UTIL_PATH_PROGS(HG, hg)
|
||||
UTIL_PATH_PROGS(GIT, git)
|
||||
UTIL_PATH_PROGS(STAT, stat)
|
||||
UTIL_PATH_PROGS(TIME, time)
|
||||
UTIL_PATH_PROGS(FLOCK, flock)
|
||||
# Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
|
||||
# be in the user path.
|
||||
UTIL_PATH_PROGS(DTRACE, dtrace, $PATH:/usr/sbin)
|
||||
UTIL_PATH_PROGS(PATCH, [gpatch patch])
|
||||
# Check if it's GNU time
|
||||
IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
|
||||
if test "x$IS_GNU_TIME" != x; then
|
||||
IS_GNU_TIME=yes
|
||||
else
|
||||
IS_GNU_TIME=no
|
||||
fi
|
||||
AC_SUBST(IS_GNU_TIME)
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
UTIL_REQUIRE_PROGS(DSYMUTIL, dsymutil)
|
||||
UTIL_REQUIRE_PROGS(MIG, mig)
|
||||
UTIL_REQUIRE_PROGS(XATTR, xattr)
|
||||
UTIL_PATH_PROGS(CODESIGN, codesign)
|
||||
|
||||
if test "x$CODESIGN" != "x"; then
|
||||
# Check for user provided code signing identity.
|
||||
# If no identity was provided, fall back to "openjdk_codesign".
|
||||
AC_ARG_WITH([macosx-codesign-identity], [AS_HELP_STRING([--with-macosx-codesign-identity],
|
||||
[specify the code signing identity])],
|
||||
[MACOSX_CODESIGN_IDENTITY=$with_macosx_codesign_identity],
|
||||
[MACOSX_CODESIGN_IDENTITY=openjdk_codesign]
|
||||
)
|
||||
|
||||
AC_SUBST(MACOSX_CODESIGN_IDENTITY)
|
||||
|
||||
# Verify that the codesign certificate is present
|
||||
AC_MSG_CHECKING([if codesign certificate is present])
|
||||
$RM codesign-testfile
|
||||
$TOUCH codesign-testfile
|
||||
$CODESIGN -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile 2>&AS_MESSAGE_LOG_FD \
|
||||
>&AS_MESSAGE_LOG_FD || CODESIGN=
|
||||
$RM codesign-testfile
|
||||
if test "x$CODESIGN" = x; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
# Verify that the codesign has --option runtime
|
||||
AC_MSG_CHECKING([if codesign has --option runtime])
|
||||
$RM codesign-testfile
|
||||
$TOUCH codesign-testfile
|
||||
$CODESIGN --option runtime -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile \
|
||||
2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN=
|
||||
$RM codesign-testfile
|
||||
if test "x$CODESIGN" = x; then
|
||||
AC_MSG_ERROR([codesign does not have --option runtime. macOS 10.13.6 and above is required.])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
UTIL_REQUIRE_PROGS(SETFILE, SetFile)
|
||||
elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
UTIL_REQUIRE_PROGS(ELFEDIT, elfedit)
|
||||
fi
|
||||
if ! test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
UTIL_REQUIRE_BUILTIN_PROGS(ULIMIT, ulimit)
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check for support for specific options in bash
|
||||
AC_DEFUN_ONCE([BASIC_CHECK_BASH_OPTIONS],
|
||||
[
|
||||
# Check bash version
|
||||
# Extra [ ] to stop m4 mangling
|
||||
[ BASH_VER=`$BASH --version | $SED -n -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'` ]
|
||||
AC_MSG_CHECKING([bash version])
|
||||
AC_MSG_RESULT([$BASH_VER])
|
||||
|
||||
BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
|
||||
BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
|
||||
if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
|
||||
AC_MSG_ERROR([bash version 3.2 or better is required])
|
||||
fi
|
||||
|
||||
# Test if bash supports pipefail.
|
||||
AC_MSG_CHECKING([if bash supports pipefail])
|
||||
if ${BASH} -c 'set -o pipefail'; then
|
||||
BASH_ARGS="$BASH_ARGS -o pipefail"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if bash supports errexit (-e)])
|
||||
if ${BASH} -e -c 'true'; then
|
||||
BASH_ARGS="$BASH_ARGS -e"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_SUBST(BASH_ARGS)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Setup Pandoc
|
||||
#
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_PANDOC],
|
||||
[
|
||||
UTIL_PATH_PROGS(PANDOC, pandoc)
|
||||
|
||||
PANDOC_MARKDOWN_FLAG="markdown"
|
||||
if test -n "$PANDOC"; then
|
||||
AC_MSG_CHECKING(if the pandoc smart extension needs to be disabled for markdown)
|
||||
if $PANDOC --list-extensions | $GREP -q '\+smart'; then
|
||||
AC_MSG_RESULT([yes])
|
||||
PANDOC_MARKDOWN_FLAG="markdown-smart"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$PANDOC"; then
|
||||
ENABLE_PANDOC="true"
|
||||
else
|
||||
ENABLE_PANDOC="false"
|
||||
fi
|
||||
AC_SUBST(ENABLE_PANDOC)
|
||||
AC_SUBST(PANDOC_MARKDOWN_FLAG)
|
||||
])
|
||||
183
make/autoconf/basic_windows.m4
Normal file
183
make/autoconf/basic_windows.m4
Normal file
@@ -0,0 +1,183 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2016, 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.
|
||||
#
|
||||
|
||||
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
|
||||
AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
|
||||
[
|
||||
SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
|
||||
if test $SRC_ROOT_LENGTH -gt 100; then
|
||||
AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
AC_MSG_CHECKING([cygwin release])
|
||||
CYGWIN_VERSION=`$UNAME -r`
|
||||
AC_MSG_RESULT([$CYGWIN_VERSION])
|
||||
WINDOWS_ENV_VENDOR='cygwin'
|
||||
WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
|
||||
|
||||
CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.[0-6]'`
|
||||
if test "x$CYGWIN_VERSION_OLD" != x; then
|
||||
AC_MSG_NOTICE([Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
if test "x$CYGPATH" = x; then
|
||||
AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
|
||||
fi
|
||||
AC_MSG_CHECKING([cygwin root directory as unix-style path])
|
||||
# The cmd output ends with Windows line endings (CR/LF)
|
||||
cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
|
||||
# Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
|
||||
CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
|
||||
AC_MSG_RESULT([$CYGWIN_ROOT_PATH])
|
||||
WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
|
||||
test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
|
||||
if test "x$test_cygdrive_prefix" = x; then
|
||||
AC_MSG_ERROR([Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c.])
|
||||
fi
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
AC_MSG_CHECKING([msys release])
|
||||
MSYS_VERSION=`$UNAME -r`
|
||||
AC_MSG_RESULT([$MSYS_VERSION])
|
||||
|
||||
WINDOWS_ENV_VENDOR='msys'
|
||||
WINDOWS_ENV_VERSION="$MSYS_VERSION"
|
||||
|
||||
AC_MSG_CHECKING([msys root directory as unix-style path])
|
||||
# The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
|
||||
MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
|
||||
UTIL_REWRITE_AS_UNIX_PATH(MSYS_ROOT_PATH)
|
||||
AC_MSG_RESULT([$MSYS_ROOT_PATH])
|
||||
WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
|
||||
AC_MSG_CHECKING([Windows version])
|
||||
# m4 replaces [ and ] so we use @<:@ and @:>@ instead
|
||||
WINDOWS_VERSION=`$CMD /c ver.exe | $EGREP -o '(@<:@0-9@:>@+\.)+@<:@0-9@:>@+'`
|
||||
AC_MSG_RESULT([$WINDOWS_VERSION])
|
||||
|
||||
AC_MSG_CHECKING([WSL kernel version])
|
||||
WSL_KERNEL_VERSION=`$UNAME -v`
|
||||
AC_MSG_RESULT([$WSL_KERNEL_VERSION])
|
||||
|
||||
AC_MSG_CHECKING([WSL kernel release])
|
||||
WSL_KERNEL_RELEASE=`$UNAME -r`
|
||||
AC_MSG_RESULT([$WSL_KERNEL_RELEASE])
|
||||
|
||||
AC_MSG_CHECKING([WSL distribution])
|
||||
WSL_DISTRIBUTION=`$LSB_RELEASE -d | sed 's/Description:\t//'`
|
||||
AC_MSG_RESULT([$WSL_DISTRIBUTION])
|
||||
|
||||
WINDOWS_ENV_VENDOR='WSL'
|
||||
WINDOWS_ENV_VERSION="$WSL_DISTRIBUTION $WSL_KERNEL_VERSION $WSL_KERNEL_RELEASE (on Windows build $WINDOWS_VERSION)"
|
||||
else
|
||||
AC_MSG_ERROR([Unknown Windows environment. Neither cygwin, msys, nor wsl was detected.])
|
||||
fi
|
||||
|
||||
# Test if windows or unix (cygwin/msys) find is first in path.
|
||||
AC_MSG_CHECKING([what kind of 'find' is first on the PATH])
|
||||
FIND_BINARY_OUTPUT=`find --version 2>&1`
|
||||
if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
|
||||
AC_MSG_RESULT([unix style])
|
||||
elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
|
||||
AC_MSG_RESULT([Windows])
|
||||
AC_MSG_NOTICE([Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools.])
|
||||
AC_MSG_NOTICE([This will not work. Please correct and make sure /usr/bin (or similar) is first in path.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
else
|
||||
AC_MSG_RESULT([unknown])
|
||||
AC_MSG_WARN([It seems that your find utility is non-standard.])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
|
||||
[
|
||||
# When using cygwin or msys, we need a wrapper binary that renames
|
||||
# /cygdrive/c/ arguments into c:/ arguments and peeks into
|
||||
# @files and rewrites these too! This wrapper binary is
|
||||
# called fixpath.
|
||||
FIXPATH=
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
AC_MSG_CHECKING([if fixpath can be created])
|
||||
FIXPATH_SRC="$TOPDIR/make/src/native/fixpath.c"
|
||||
FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
|
||||
FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
|
||||
# Important to keep the .exe suffix on Cygwin for Hotspot makefiles
|
||||
FIXPATH="$FIXPATH_BIN -c"
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
|
||||
# Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
|
||||
# @ was chosen as separator to minimize risk of other tools messing around with it
|
||||
all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" \
|
||||
| tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
|
||||
fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'`
|
||||
FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.wsl; then
|
||||
FIXPATH="$FIXPATH_BIN -w"
|
||||
fi
|
||||
FIXPATH_SRC_W="$FIXPATH_SRC"
|
||||
FIXPATH_BIN_W="$FIXPATH_BIN"
|
||||
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_SRC_W])
|
||||
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_BIN_W])
|
||||
$RM -rf $FIXPATH_BIN $FIXPATH_DIR
|
||||
$MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
|
||||
cd $FIXPATH_DIR
|
||||
$CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
|
||||
cd $CONFIGURE_START_DIR
|
||||
|
||||
if test ! -x $FIXPATH_BIN; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $FIXPATH_DIR/fixpath1.log
|
||||
AC_MSG_ERROR([Could not create $FIXPATH_BIN])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
|
||||
OLD_WSLENV="$WSLENV"
|
||||
WSLENV=`$ECHO $WSLENV | $SED 's/PATH\/l://'`
|
||||
UTIL_APPEND_TO_PATH(WSLENV, "FIXPATH_PATH")
|
||||
export WSLENV
|
||||
export FIXPATH_PATH=$VS_PATH_WINDOWS
|
||||
AC_MSG_NOTICE([FIXPATH_PATH is $FIXPATH_PATH])
|
||||
AC_MSG_NOTICE([Rewriting WSLENV from $OLD_WSLENV to $WSLENV])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if fixpath.exe works])
|
||||
cd $FIXPATH_DIR
|
||||
$FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
|
||||
> $FIXPATH_DIR/fixpath2.log 2>&1
|
||||
cd $CONFIGURE_START_DIR
|
||||
if test ! -x $FIXPATH_DIR/fixpath2.exe; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $FIXPATH_DIR/fixpath2.log
|
||||
AC_MSG_ERROR([fixpath did not work!])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
FIXPATH_DETACH_FLAG="--detach"
|
||||
fi
|
||||
|
||||
AC_SUBST(FIXPATH)
|
||||
AC_SUBST(FIXPATH_DETACH_FLAG)
|
||||
])
|
||||
File diff suppressed because it is too large
Load Diff
@@ -97,7 +97,7 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
|
||||
else
|
||||
# We're done! :-)
|
||||
BOOT_JDK_FOUND=yes
|
||||
BASIC_FIXUP_PATH(BOOT_JDK)
|
||||
UTIL_FIXUP_PATH(BOOT_JDK)
|
||||
AC_MSG_CHECKING([for Boot JDK])
|
||||
AC_MSG_RESULT([$BOOT_JDK])
|
||||
AC_MSG_CHECKING([Boot JDK version])
|
||||
@@ -150,7 +150,7 @@ AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
|
||||
[
|
||||
if test "x$JAVA_HOME" != x; then
|
||||
JAVA_HOME_PROCESSED="$JAVA_HOME"
|
||||
BASIC_FIXUP_PATH(JAVA_HOME_PROCESSED)
|
||||
UTIL_FIXUP_PATH(JAVA_HOME_PROCESSED)
|
||||
if test ! -d "$JAVA_HOME_PROCESSED"; then
|
||||
AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
|
||||
else
|
||||
@@ -177,7 +177,7 @@ AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK],
|
||||
# Lets find the JDK/JRE directory by following symbolic links.
|
||||
# Linux/GNU systems often have links from /usr/bin/java to
|
||||
# /etc/alternatives/java to the real JDK binary.
|
||||
BASIC_REMOVE_SYMBOLIC_LINKS(BINARY)
|
||||
UTIL_REMOVE_SYMBOLIC_LINKS(BINARY)
|
||||
BOOT_JDK=`dirname "$BINARY"`
|
||||
BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
|
||||
if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
|
||||
@@ -241,7 +241,7 @@ AC_DEFUN([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY],
|
||||
[
|
||||
if test "x[$]$1" != x; then
|
||||
VIRTUAL_DIR="[$]$1/Java"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VIRTUAL_DIR)
|
||||
UTIL_REWRITE_AS_UNIX_PATH(VIRTUAL_DIR)
|
||||
BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY($VIRTUAL_DIR)
|
||||
fi
|
||||
])
|
||||
@@ -269,7 +269,7 @@ AC_DEFUN([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS],
|
||||
AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK],
|
||||
[
|
||||
# Use user overridden value if available, otherwise locate tool in the Boot JDK.
|
||||
BASIC_SETUP_TOOL($1,
|
||||
UTIL_SETUP_TOOL($1,
|
||||
[
|
||||
AC_MSG_CHECKING([for $2 in Boot JDK])
|
||||
$1=$BOOT_JDK/bin/$2
|
||||
@@ -362,7 +362,7 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
|
||||
# Try to enable CDS
|
||||
AC_MSG_CHECKING([for local Boot JDK Class Data Sharing (CDS)])
|
||||
BOOT_JDK_CDS_ARCHIVE=$CONFIGURESUPPORT_OUTPUTDIR/classes.jsa
|
||||
ADD_JVM_ARG_IF_OK([-XX:+UnlockDiagnosticVMOptions -XX:-VerifySharedSpaces -XX:SharedArchiveFile=$BOOT_JDK_CDS_ARCHIVE],boot_jdk_cds_args,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-XX:+UnlockDiagnosticVMOptions -XX:-VerifySharedSpaces -XX:SharedArchiveFile=$BOOT_JDK_CDS_ARCHIVE],boot_jdk_cds_args,[$JAVA])
|
||||
|
||||
if test "x$boot_jdk_cds_args" != x; then
|
||||
# Try creating a CDS archive
|
||||
@@ -391,18 +391,18 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
AC_MSG_CHECKING([flags for boot jdk java command] )
|
||||
|
||||
# Force en-US environment
|
||||
ADD_JVM_ARG_IF_OK([-Duser.language=en -Duser.country=US],boot_jdk_jvmargs,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Duser.language=en -Duser.country=US],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
if test "x$BOOTJDK_USE_LOCAL_CDS" = xtrue; then
|
||||
# Use our own CDS archive
|
||||
ADD_JVM_ARG_IF_OK([$boot_jdk_cds_args -Xshare:auto],boot_jdk_jvmargs,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([$boot_jdk_cds_args -Xshare:auto],boot_jdk_jvmargs,[$JAVA])
|
||||
else
|
||||
# Otherwise optimistically use the system-wide one, if one is present
|
||||
ADD_JVM_ARG_IF_OK([-Xshare:auto],boot_jdk_jvmargs,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xshare:auto],boot_jdk_jvmargs,[$JAVA])
|
||||
fi
|
||||
|
||||
# Finally append user provided options to allow them to override.
|
||||
ADD_JVM_ARG_IF_OK([$USER_BOOT_JDK_OPTIONS],boot_jdk_jvmargs,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([$USER_BOOT_JDK_OPTIONS],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
AC_MSG_RESULT([$boot_jdk_jvmargs])
|
||||
|
||||
@@ -413,7 +413,7 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
AC_MSG_CHECKING([flags for boot jdk java command for big workloads])
|
||||
|
||||
# Starting amount of heap memory.
|
||||
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA])
|
||||
BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
|
||||
|
||||
# Maximum amount of heap memory and stack size.
|
||||
@@ -441,8 +441,8 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
STACK_SIZE=$STACK_SIZE_64
|
||||
JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
|
||||
fi
|
||||
ADD_JVM_ARG_IF_OK([-Xmx${JVM_MAX_HEAP}M],boot_jdk_jvmargs_big,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xmx${JVM_MAX_HEAP}M],boot_jdk_jvmargs_big,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA])
|
||||
|
||||
AC_MSG_RESULT([$boot_jdk_jvmargs_big])
|
||||
|
||||
@@ -469,10 +469,10 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
AC_MSG_CHECKING([flags for boot jdk java command for small workloads])
|
||||
|
||||
# Use serial gc for small short lived tools if possible
|
||||
ADD_JVM_ARG_IF_OK([-XX:+UseSerialGC],boot_jdk_jvmargs_small,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xms32M],boot_jdk_jvmargs_small,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xmx512M],boot_jdk_jvmargs_small,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-XX:TieredStopAtLevel=1],boot_jdk_jvmargs_small,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-XX:+UseSerialGC],boot_jdk_jvmargs_small,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xms32M],boot_jdk_jvmargs_small,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xmx512M],boot_jdk_jvmargs_small,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-XX:TieredStopAtLevel=1],boot_jdk_jvmargs_small,[$JAVA])
|
||||
|
||||
AC_MSG_RESULT([$boot_jdk_jvmargs_small])
|
||||
|
||||
@@ -531,7 +531,7 @@ AC_DEFUN([BOOTJDK_CHECK_BUILD_JDK],
|
||||
else
|
||||
# We're done!
|
||||
BUILD_JDK_FOUND=yes
|
||||
BASIC_FIXUP_PATH(BUILD_JDK)
|
||||
UTIL_FIXUP_PATH(BUILD_JDK)
|
||||
AC_MSG_CHECKING([for Build JDK])
|
||||
AC_MSG_RESULT([$BUILD_JDK])
|
||||
AC_MSG_CHECKING([Build JDK version])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, 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
|
||||
@@ -167,36 +167,38 @@ AC_DEFUN_ONCE([BPERF_SETUP_TEST_JOBS],
|
||||
|
||||
AC_DEFUN([BPERF_SETUP_CCACHE],
|
||||
[
|
||||
AC_ARG_ENABLE([ccache],
|
||||
[AS_HELP_STRING([--enable-ccache],
|
||||
[enable using ccache to speed up recompilations @<:@disabled@:>@])])
|
||||
# Check if ccache is available
|
||||
CCACHE_AVAILABLE=true
|
||||
|
||||
CCACHE_STATUS=
|
||||
AC_MSG_CHECKING([is ccache enabled])
|
||||
if test "x$enable_ccache" = xyes; then
|
||||
if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
OLD_PATH="$PATH"
|
||||
if test "x$TOOLCHAIN_PATH" != x; then
|
||||
PATH=$TOOLCHAIN_PATH:$PATH
|
||||
fi
|
||||
BASIC_REQUIRE_PROGS(CCACHE, ccache)
|
||||
UTIL_PATH_PROGS(CCACHE, ccache)
|
||||
PATH="$OLD_PATH"
|
||||
|
||||
AC_MSG_CHECKING([if ccache is available])
|
||||
if test "x$TOOLCHAIN_TYPE" != "xgcc" && test "x$TOOLCHAIN_TYPE" != "xclang"; then
|
||||
AC_MSG_RESULT([no, not supported for toolchain type $TOOLCHAIN_TYPE])
|
||||
CCACHE_AVAILABLE=false
|
||||
elif test "x$CCACHE" = "x"; then
|
||||
AC_MSG_RESULT([no, ccache binary missing or not executable])
|
||||
CCACHE_AVAILABLE=false
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
|
||||
CCACHE_STATUS=""
|
||||
UTIL_ARG_ENABLE(NAME: ccache, DEFAULT: false, AVAILABLE: $CCACHE_AVAILABLE,
|
||||
DESC: [enable using ccache to speed up recompilations],
|
||||
CHECKING_MSG: [if ccache is enabled],
|
||||
IF_ENABLED: [
|
||||
CCACHE_VERSION=[`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`]
|
||||
CCACHE_STATUS="Active ($CCACHE_VERSION)"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_WARN([ccache is not supported with toolchain type $TOOLCHAIN_TYPE])
|
||||
fi
|
||||
elif test "x$enable_ccache" = xno; then
|
||||
AC_MSG_RESULT([no, explicitly disabled])
|
||||
CCACHE_STATUS="Disabled"
|
||||
elif test "x$enable_ccache" = x; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([unknown])
|
||||
AC_MSG_ERROR([--enable-ccache does not accept any parameters])
|
||||
fi
|
||||
],
|
||||
IF_DISABLED: [
|
||||
CCACHE=""
|
||||
])
|
||||
AC_SUBST(CCACHE)
|
||||
|
||||
AC_ARG_WITH([ccache-dir],
|
||||
@@ -284,16 +286,16 @@ AC_DEFUN([BPERF_RUN_ICECC_CREATE_ENV],
|
||||
#
|
||||
AC_DEFUN([BPERF_SETUP_ICECC],
|
||||
[
|
||||
AC_ARG_ENABLE([icecc], [AS_HELP_STRING([--enable-icecc],
|
||||
[enable distribted compilation of native code using icecc/icecream @<:@disabled@:>@])])
|
||||
UTIL_ARG_ENABLE(NAME: icecc, DEFAULT: false, RESULT: ENABLE_ICECC,
|
||||
DESC: [enable distributed compilation of native code using icecc/icecream])
|
||||
|
||||
if test "x${enable_icecc}" = "xyes"; then
|
||||
BASIC_REQUIRE_PROGS(ICECC_CMD, icecc)
|
||||
if test "x$ENABLE_ICECC" = "xtrue"; then
|
||||
UTIL_REQUIRE_PROGS(ICECC_CMD, icecc)
|
||||
old_path="$PATH"
|
||||
|
||||
# Look for icecc-create-env in some known places
|
||||
PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
|
||||
BASIC_REQUIRE_PROGS(ICECC_CREATE_ENV, icecc-create-env)
|
||||
UTIL_REQUIRE_PROGS(ICECC_CREATE_ENV, icecc-create-env)
|
||||
# Use icecc-create-env to create a minimal compilation environment that can
|
||||
# be sent to the other hosts in the icecream cluster.
|
||||
icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
|
||||
@@ -308,7 +310,7 @@ AC_DEFUN([BPERF_SETUP_ICECC],
|
||||
elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
|
||||
# For clang, the icecc compilerwrapper is needed. It usually resides next
|
||||
# to icecc-create-env.
|
||||
BASIC_REQUIRE_PROGS(ICECC_WRAPPER, compilerwrapper)
|
||||
UTIL_REQUIRE_PROGS(ICECC_WRAPPER, compilerwrapper)
|
||||
BPERF_RUN_ICECC_CREATE_ENV([--clang ${CC} ${ICECC_WRAPPER}], ${icecc_create_env_log})
|
||||
else
|
||||
AC_MSG_ERROR([Can only create icecc compiler packages for toolchain types gcc and clang])
|
||||
@@ -349,56 +351,44 @@ AC_DEFUN([BPERF_SETUP_ICECC],
|
||||
else
|
||||
BUILD_ICECC="${ICECC}"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(ICECC)
|
||||
AC_SUBST(BUILD_ICECC)
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Can the C/C++ compiler use precompiled headers?
|
||||
#
|
||||
AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers],
|
||||
[disable using precompiled headers when compiling C++ @<:@enabled@:>@])],
|
||||
[ENABLE_PRECOMPH=${enable_precompiled_headers}], [ENABLE_PRECOMPH=yes])
|
||||
|
||||
USE_PRECOMPILED_HEADER=true
|
||||
AC_MSG_CHECKING([If precompiled header is enabled])
|
||||
if test "x$ENABLE_PRECOMPH" = xno; then
|
||||
AC_MSG_RESULT([no, forced])
|
||||
USE_PRECOMPILED_HEADER=false
|
||||
elif test "x$ICECC" != "x"; then
|
||||
# Are precompiled headers available?
|
||||
PRECOMPILED_HEADERS_AVAILABLE=true
|
||||
AC_MSG_CHECKING([if precompiled headers are available])
|
||||
if test "x$ICECC" != "x"; then
|
||||
AC_MSG_RESULT([no, does not work effectively with icecc])
|
||||
USE_PRECOMPILED_HEADER=false
|
||||
PRECOMPILED_HEADERS_AVAILABLE=false
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
AC_MSG_RESULT([no, does not work with Solaris Studio])
|
||||
USE_PRECOMPILED_HEADER=false
|
||||
PRECOMPILED_HEADERS_AVAILABLE=false
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
AC_MSG_RESULT([no, does not work with xlc])
|
||||
USE_PRECOMPILED_HEADER=false
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
|
||||
if test "x$ENABLE_PRECOMPH" = xyes; then
|
||||
PRECOMPILED_HEADERS_AVAILABLE=false
|
||||
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
# Check that the compiler actually supports precomp headers.
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
AC_MSG_CHECKING([that precompiled headers work])
|
||||
echo "int alfa();" > conftest.h
|
||||
$CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD
|
||||
if test ! -f conftest.hpp.gch; then
|
||||
USE_PRECOMPILED_HEADER=false
|
||||
AC_MSG_RESULT([no])
|
||||
PRECOMPILED_HEADERS_AVAILABLE=false
|
||||
AC_MSG_RESULT([no, gcc fails to compile properly with -x c++-header])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
$RM conftest.h conftest.hpp.gch
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: precompiled-headers, DEFAULT: auto,
|
||||
RESULT: USE_PRECOMPILED_HEADER, AVAILABLE: $PRECOMPILED_HEADERS_AVAILABLE,
|
||||
DESC: [enable using precompiled headers when compiling C++])
|
||||
AC_SUBST(USE_PRECOMPILED_HEADER)
|
||||
])
|
||||
|
||||
@@ -442,29 +432,28 @@ AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
|
||||
if test "$MX_VALUE" -lt "512"; then
|
||||
MX_VALUE=512
|
||||
fi
|
||||
ADD_JVM_ARG_IF_OK([-Xms${MS_VALUE}M -Xmx${MX_VALUE}M],SJAVAC_SERVER_JAVA_FLAGS,[$SJAVAC_SERVER_JAVA])
|
||||
|
||||
JAVAC_SERVER_AVAILABLE=true
|
||||
SJAVAC_MEMORY_OPT="-Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
|
||||
UTIL_ADD_JVM_ARG_IF_OK([$SJAVAC_MEMORY_OPT],SJAVAC_SERVER_JAVA_FLAGS,[$SJAVAC_SERVER_JAVA])
|
||||
if test "x$JVM_ARG_OK" = "xfalse"; then
|
||||
AC_MSG_WARN([Could not set '$SJAVAC_MEMORY_OPT' on bootjdk, disabling sjavac and javac server])
|
||||
JAVAC_SERVER_AVAILABLE=false
|
||||
fi
|
||||
AC_SUBST(SJAVAC_SERVER_JAVA_FLAGS)
|
||||
|
||||
AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
|
||||
[use sjavac to do fast incremental compiles @<:@disabled@:>@])],
|
||||
[ENABLE_SJAVAC="${enableval}"], [ENABLE_SJAVAC="no"])
|
||||
if test "x$JVM_ARG_OK" = "xfalse"; then
|
||||
AC_MSG_WARN([Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac])
|
||||
ENABLE_SJAVAC="no"
|
||||
fi
|
||||
AC_MSG_CHECKING([whether to use sjavac])
|
||||
AC_MSG_RESULT([$ENABLE_SJAVAC])
|
||||
UTIL_ARG_ENABLE(NAME: sjavac, DEFAULT: false, AVAILABLE: $JAVAC_SERVER_AVAILABLE,
|
||||
DESC: [use sjavac to do fast incremental compiles],
|
||||
CHECKING_MSG: [whether to use sjavac],
|
||||
IF_ENABLED: [ ENABLE_SJAVAC="yes" ],
|
||||
IF_DISABLED: [ ENABLE_SJAVAC="no" ])
|
||||
AC_SUBST(ENABLE_SJAVAC)
|
||||
|
||||
AC_ARG_ENABLE([javac-server], [AS_HELP_STRING([--disable-javac-server],
|
||||
[disable javac server @<:@enabled@:>@])],
|
||||
[ENABLE_JAVAC_SERVER="${enableval}"], [ENABLE_JAVAC_SERVER="yes"])
|
||||
if test "x$JVM_ARG_OK" = "xfalse"; then
|
||||
AC_MSG_WARN([Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server])
|
||||
ENABLE_JAVAC_SERVER="no"
|
||||
fi
|
||||
AC_MSG_CHECKING([whether to use javac server])
|
||||
AC_MSG_RESULT([$ENABLE_JAVAC_SERVER])
|
||||
UTIL_ARG_ENABLE(NAME: javac-server, DEFAULT: true, AVAILABLE: $JAVAC_SERVER_AVAILABLE,
|
||||
DESC: [enable javac server],
|
||||
CHECKING_MSG: [whether to use javac server],
|
||||
IF_ENABLED: [ ENABLE_JAVAC_SERVER="yes" ],
|
||||
IF_DISABLED: [ ENABLE_JAVAC_SERVER="no" ])
|
||||
AC_SUBST(ENABLE_JAVAC_SERVER)
|
||||
|
||||
if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2020, 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
|
||||
@@ -96,6 +96,7 @@ BUILD_GTEST := false
|
||||
|
||||
JVM_VARIANTS := server
|
||||
JVM_VARIANT_MAIN := server
|
||||
JVM_FEATURES_server := cds compiler1 compiler2 g1gc serialgc
|
||||
|
||||
# Some users still set EXTRA_*FLAGS on the make command line. Must
|
||||
# make sure to override that when building buildjdk.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, 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
|
||||
@@ -36,10 +36,20 @@ AC_INIT(OpenJDK, openjdk, build-dev@openjdk.java.net,,http://openjdk.java.net)
|
||||
AC_CONFIG_AUX_DIR([$TOPDIR/make/autoconf/build-aux])
|
||||
m4_include([build-aux/pkg.m4])
|
||||
|
||||
AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK])
|
||||
AC_DEFUN_ONCE([CUSTOM_LATE_HOOK])
|
||||
AC_DEFUN_ONCE([CUSTOM_CONFIG_OUTPUT_GENERATED_HOOK])
|
||||
AC_DEFUN_ONCE([CUSTOM_SUMMARY_AND_WARNINGS_HOOK])
|
||||
|
||||
# This line needs to be here, verbatim, after the dummy hook definitions but
|
||||
# before all includes. It is replaced with custom functionality when building
|
||||
# custom sources.
|
||||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
# Include these first...
|
||||
m4_include([basics.m4])
|
||||
m4_include([basics_windows.m4])
|
||||
m4_include([util.m4])
|
||||
# ... then the rest
|
||||
m4_include([basic.m4])
|
||||
m4_include([boot-jdk.m4])
|
||||
m4_include([build-performance.m4])
|
||||
m4_include([flags.m4])
|
||||
@@ -47,21 +57,11 @@ m4_include([help.m4])
|
||||
m4_include([hotspot.m4])
|
||||
m4_include([jdk-options.m4])
|
||||
m4_include([jdk-version.m4])
|
||||
m4_include([jvm-features.m4])
|
||||
m4_include([libraries.m4])
|
||||
m4_include([platform.m4])
|
||||
m4_include([source-dirs.m4])
|
||||
m4_include([toolchain.m4])
|
||||
m4_include([toolchain_windows.m4])
|
||||
|
||||
AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK])
|
||||
AC_DEFUN_ONCE([CUSTOM_LATE_HOOK])
|
||||
AC_DEFUN_ONCE([CUSTOM_CONFIG_OUTPUT_GENERATED_HOOK])
|
||||
AC_DEFUN_ONCE([CUSTOM_SUMMARY_AND_WARNINGS_HOOK])
|
||||
|
||||
# This line needs to be here, verbatim, after all includes and the dummy hook
|
||||
# definitions. It is replaced with custom functionality when building
|
||||
# custom sources.
|
||||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@@ -203,12 +203,6 @@ JDKOPT_SETUP_CODE_COVERAGE
|
||||
# AddressSanitizer
|
||||
JDKOPT_SETUP_ADDRESS_SANITIZER
|
||||
|
||||
# Need toolchain to setup dtrace
|
||||
HOTSPOT_SETUP_DTRACE
|
||||
HOTSPOT_ENABLE_DISABLE_AOT
|
||||
HOTSPOT_ENABLE_DISABLE_CDS
|
||||
HOTSPOT_ENABLE_DISABLE_GTEST
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check dependencies for external and internal libraries.
|
||||
@@ -221,9 +215,17 @@ BASIC_COMPILE_FIXPATH
|
||||
LIB_DETERMINE_DEPENDENCIES
|
||||
LIB_SETUP_LIBRARIES
|
||||
|
||||
# Hotspot setup depends on lib checks.
|
||||
###############################################################################
|
||||
#
|
||||
# Setup hotspot and JVM features (needs toolchain).
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
HOTSPOT_SETUP_JVM_FEATURES
|
||||
JVM_FEATURES_PARSE_OPTIONS
|
||||
JVM_FEATURES_SETUP
|
||||
|
||||
HOTSPOT_ENABLE_DISABLE_GTEST
|
||||
HOTSPOT_SETUP_MISC
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@@ -277,9 +279,6 @@ BASIC_TEST_USABILITY_ISSUES
|
||||
# At the end, call the custom hook. (Dummy macro if no custom sources available)
|
||||
CUSTOM_LATE_HOOK
|
||||
|
||||
# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
|
||||
HOTSPOT_FINALIZE_JVM_FEATURES
|
||||
|
||||
# Did user specify any unknown variables?
|
||||
BASIC_CHECK_LEFTOVER_OVERRIDDEN
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, 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
|
||||
@@ -123,7 +123,7 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
CFLAGS_DEBUG_SYMBOLS="-g1"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
CFLAGS_DEBUG_SYMBOLS="-Z7 -d2Zi+"
|
||||
CFLAGS_DEBUG_SYMBOLS="-Z7"
|
||||
fi
|
||||
|
||||
AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
|
||||
@@ -132,29 +132,17 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
|
||||
|
||||
AC_DEFUN([FLAGS_SETUP_WARNINGS],
|
||||
[
|
||||
AC_ARG_ENABLE([warnings-as-errors], [AS_HELP_STRING([--disable-warnings-as-errors],
|
||||
[do not consider native warnings to be an error @<:@enabled@:>@])])
|
||||
|
||||
# Set default value.
|
||||
if test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
WARNINGS_AS_ERRORS=false
|
||||
if test "x$TOOLCHAIN_TYPE" != xxlc; then
|
||||
WARNINGS_AS_ERRORS_DEFAULT=true
|
||||
else
|
||||
WARNINGS_AS_ERRORS=true
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if native warnings are errors])
|
||||
if test "x$enable_warnings_as_errors" = "xyes"; then
|
||||
AC_MSG_RESULT([yes (explicitly set)])
|
||||
WARNINGS_AS_ERRORS=true
|
||||
elif test "x$enable_warnings_as_errors" = "xno"; then
|
||||
AC_MSG_RESULT([no (explicitly set)])
|
||||
WARNINGS_AS_ERRORS=false
|
||||
elif test "x$enable_warnings_as_errors" = "x"; then
|
||||
AC_MSG_RESULT([${WARNINGS_AS_ERRORS} (default)])
|
||||
else
|
||||
AC_MSG_ERROR([--enable-warnings-as-errors accepts no argument])
|
||||
WARNINGS_AS_ERRORS_DEFAULT=false
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: warnings-as-errors, DEFAULT: $WARNINGS_AS_ERRORS_DEFAULT,
|
||||
RESULT: WARNINGS_AS_ERRORS,
|
||||
DEFAULT_DESC: [auto],
|
||||
DESC: [consider native warnings to be an error])
|
||||
AC_SUBST(WARNINGS_AS_ERRORS)
|
||||
|
||||
case "${TOOLCHAIN_TYPE}" in
|
||||
@@ -532,10 +520,13 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fcheck-new -fstack-protector"
|
||||
TOOLCHAIN_CFLAGS_JDK="-pipe -fstack-protector"
|
||||
# reduce lib size on s390x in link step, this needs also special compile flags
|
||||
# reduce lib size on linux in link step, this needs also special compile flags
|
||||
# do this on s390x also for libjvm (where serviceability agent is not supported)
|
||||
if test "x$ENABLE_LINKTIME_GC" = xtrue; then
|
||||
TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK -ffunction-sections -fdata-sections"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xs390x; then
|
||||
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -ffunction-sections -fdata-sections"
|
||||
TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK -ffunction-sections -fdata-sections"
|
||||
fi
|
||||
fi
|
||||
# technically NOT for CXX (but since this gives *worse* performance, use
|
||||
# no-strict-aliasing everywhere!)
|
||||
@@ -595,8 +586,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
# our toolchains are in a condition to support that. But what we loosely aim for is
|
||||
# C99 level.
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
# This raises the language level for older 4.8 gcc, while lowering it for later
|
||||
# versions. clang and xlclang support the same flag.
|
||||
# Explicitly set C99. clang and xlclang support the same flag.
|
||||
LANGSTD_CFLAGS="-std=c99"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
# We can't turn on -std=c99 without breaking compilation of the splashscreen/png
|
||||
@@ -813,7 +803,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
fi
|
||||
|
||||
$1_CXXSTD_CXXFLAG="-std=gnu++98"
|
||||
FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${$1_CXXSTD_CXXFLAG} -Werror],
|
||||
FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${$1_CXXSTD_CXXFLAG}],
|
||||
PREFIX: $3, IF_FALSE: [$1_CXXSTD_CXXFLAG=""])
|
||||
$1_TOOLCHAIN_CFLAGS_JDK_CXXONLY="${$1_CXXSTD_CXXFLAG}"
|
||||
$1_TOOLCHAIN_CFLAGS_JVM="${$1_TOOLCHAIN_CFLAGS_JVM} ${$1_CXXSTD_CXXFLAG}"
|
||||
@@ -940,10 +930,10 @@ AC_DEFUN([FLAGS_SETUP_GCC6_COMPILER_FLAGS],
|
||||
# Notably, value range propagation now assumes that the this pointer of C++
|
||||
# member functions is non-null.
|
||||
NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror],
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_DELETE_NULL_POINTER_CHECKS_CFLAG],
|
||||
PREFIX: $2, IF_FALSE: [NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""])
|
||||
NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_LIFETIME_DSE_CFLAG -Werror],
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_LIFETIME_DSE_CFLAG],
|
||||
PREFIX: $2, IF_FALSE: [NO_LIFETIME_DSE_CFLAG=""])
|
||||
$1_GCC6_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
|
||||
])
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user