mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-12 04:19:39 +01:00
Compare commits
1823 Commits
jbr-dev-lo
...
jdk-17.0.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f29caa372 | ||
|
|
b31f232f9a | ||
|
|
3197a9b029 | ||
|
|
25178cd7e2 | ||
|
|
bc9d9c0e70 | ||
|
|
a0846b4065 | ||
|
|
811f3a16ec | ||
|
|
be5df12dc8 | ||
|
|
6d8eb49310 | ||
|
|
3e56ecce99 | ||
|
|
b0841a77c8 | ||
|
|
acbd25bb37 | ||
|
|
0698fe3c1b | ||
|
|
4db767bb6b | ||
|
|
6db7aa688a | ||
|
|
0f531dacb8 | ||
|
|
a93cf5f2b9 | ||
|
|
8f65a6dbb9 | ||
|
|
109cc4964d | ||
|
|
de8ec1d6e7 | ||
|
|
ff0ee6ddd4 | ||
|
|
bc78e07d53 | ||
|
|
213d0db77a | ||
|
|
b10ac577b9 | ||
|
|
16843770b5 | ||
|
|
6919ff2cb0 | ||
|
|
3d32a20e89 | ||
|
|
6287df05ce | ||
|
|
6803da9a47 | ||
|
|
0d2cc357dc | ||
|
|
5bf1b9a534 | ||
|
|
c581886c15 | ||
|
|
14779b1f4e | ||
|
|
57d0a7f1b6 | ||
|
|
436d96fd12 | ||
|
|
50aabaa9ca | ||
|
|
861fe74ba2 | ||
|
|
fe17568ea9 | ||
|
|
464a32b0ee | ||
|
|
6033871fdb | ||
|
|
05b2ff4590 | ||
|
|
9c0afc5c44 | ||
|
|
4caa421411 | ||
|
|
b5d3772bcc | ||
|
|
09e688070b | ||
|
|
18ec0087a5 | ||
|
|
536e133ab9 | ||
|
|
7277a75307 | ||
|
|
40526a7f07 | ||
|
|
e0f5fcdedf | ||
|
|
04b95add2f | ||
|
|
c06de01cda | ||
|
|
8894225213 | ||
|
|
7557ec1f79 | ||
|
|
073d1a350e | ||
|
|
2dc22d6a5c | ||
|
|
17b364016f | ||
|
|
39a6b55847 | ||
|
|
9cb01207b3 | ||
|
|
32fda3200c | ||
|
|
6b362e4317 | ||
|
|
879f4c591b | ||
|
|
2913a8dcc5 | ||
|
|
406d6ba392 | ||
|
|
36c364d5b4 | ||
|
|
4a0f0f463e | ||
|
|
f2e837f8b2 | ||
|
|
6cc377db3e | ||
|
|
9b41d41919 | ||
|
|
ed81283d87 | ||
|
|
5cabeef0d7 | ||
|
|
f224212e5f | ||
|
|
e3e7722e14 | ||
|
|
39f944bd33 | ||
|
|
61c73517da | ||
|
|
7610862256 | ||
|
|
1087e3b92e | ||
|
|
bcb1f86d95 | ||
|
|
f655ccd1c7 | ||
|
|
e55bea42d0 | ||
|
|
e7bac4235a | ||
|
|
093f02aadb | ||
|
|
bf7cedabb4 | ||
|
|
398da7ec46 | ||
|
|
1970b639fd | ||
|
|
5b29c6ec93 | ||
|
|
d5a23099f5 | ||
|
|
86561416c8 | ||
|
|
3f5296153a | ||
|
|
efa178650c | ||
|
|
d4467a72e6 | ||
|
|
b9eca2d898 | ||
|
|
6a8497437a | ||
|
|
3a0aff20d9 | ||
|
|
86aca8b260 | ||
|
|
b5e6753a09 | ||
|
|
fafd082046 | ||
|
|
2aaf3c5b01 | ||
|
|
aee7ab6869 | ||
|
|
20fea6c325 | ||
|
|
05f15628b0 | ||
|
|
8c541047b0 | ||
|
|
7dab7e5507 | ||
|
|
725154813f | ||
|
|
6dbd5a68c7 | ||
|
|
fc1d3d3fad | ||
|
|
31bbf9f4a6 | ||
|
|
58c9f6a92b | ||
|
|
547667dff6 | ||
|
|
79aa7b15db | ||
|
|
d8d69f3674 | ||
|
|
1d7b9add26 | ||
|
|
820030a5a9 | ||
|
|
04eb720d03 | ||
|
|
345e370fed | ||
|
|
5ed9696810 | ||
|
|
96adf07356 | ||
|
|
65a02dab92 | ||
|
|
07993bfa88 | ||
|
|
5296357fe2 | ||
|
|
aa8c46ca52 | ||
|
|
b2f16a5926 | ||
|
|
a485033206 | ||
|
|
1ba2d5310a | ||
|
|
b90d917032 | ||
|
|
241c066a28 | ||
|
|
48632e51c7 | ||
|
|
52324b55fb | ||
|
|
ac823d3453 | ||
|
|
da740fa6fa | ||
|
|
790802bdd5 | ||
|
|
394a7562cf | ||
|
|
243e643076 | ||
|
|
e132605161 | ||
|
|
d5cbf22f23 | ||
|
|
bf0606a9b7 | ||
|
|
e6e6bedf7b | ||
|
|
24e91c1e5a | ||
|
|
d964229552 | ||
|
|
3e0e4f0ead | ||
|
|
ee63f83ed7 | ||
|
|
1dee04a76f | ||
|
|
a000b2d6b8 | ||
|
|
f969f811a7 | ||
|
|
ebde2fb7d1 | ||
|
|
9d6f1d716e | ||
|
|
c43c0a4f65 | ||
|
|
a370ca62b3 | ||
|
|
8f10b354c7 | ||
|
|
06b764ce27 | ||
|
|
4554f82c84 | ||
|
|
ba457ab361 | ||
|
|
17f5448c19 | ||
|
|
14e3103d80 | ||
|
|
36c1c0a76a | ||
|
|
0ca8d00f6d | ||
|
|
4cfe4d7b6f | ||
|
|
d21597aec9 | ||
|
|
1fe89116cb | ||
|
|
05e91bb7d4 | ||
|
|
49aab4b7b8 | ||
|
|
ea994ccbd2 | ||
|
|
ccc0690ea4 | ||
|
|
fc9c2decaa | ||
|
|
c2b379fc12 | ||
|
|
37c5061663 | ||
|
|
40b1dafaa3 | ||
|
|
db3b06fd8c | ||
|
|
ef1a9ec02f | ||
|
|
52a66f9125 | ||
|
|
6254bdf886 | ||
|
|
02efaf7386 | ||
|
|
e6c27925d2 | ||
|
|
ff675ccb58 | ||
|
|
9eeb7415d6 | ||
|
|
e91b87e27e | ||
|
|
b0e142e763 | ||
|
|
3aa85f9e25 | ||
|
|
fc037105b4 | ||
|
|
2bf98280c6 | ||
|
|
f8408c7896 | ||
|
|
acbac0d169 | ||
|
|
01cf112cbb | ||
|
|
8bf2cf2d7c | ||
|
|
aeb7cf5039 | ||
|
|
ce1288038d | ||
|
|
22cdf79dce | ||
|
|
12d2d0e904 | ||
|
|
e78fe926ef | ||
|
|
0e67976088 | ||
|
|
dfded6daaa | ||
|
|
13b5fe665c | ||
|
|
0c49bb77f0 | ||
|
|
ae88233d94 | ||
|
|
43dd5ffb10 | ||
|
|
04abba8852 | ||
|
|
28958abd0e | ||
|
|
13a90694f8 | ||
|
|
adc5fe707d | ||
|
|
cb3e4411cd | ||
|
|
a29693789b | ||
|
|
768bed2ccf | ||
|
|
4c3aecba20 | ||
|
|
908cab4123 | ||
|
|
47e4dba6a2 | ||
|
|
ac655ba08e | ||
|
|
0f72c301ea | ||
|
|
1253eb4032 | ||
|
|
f53661b1a9 | ||
|
|
590256ddcb | ||
|
|
8bc5ad105a | ||
|
|
a71545b516 | ||
|
|
ec7f16985a | ||
|
|
59d821177d | ||
|
|
6ba50fcf82 | ||
|
|
7cf28d56a9 | ||
|
|
268a6a5a31 | ||
|
|
ac0b7c9371 | ||
|
|
c6a35f50b3 | ||
|
|
637155e3a6 | ||
|
|
6d61fc116f | ||
|
|
04e337cdb9 | ||
|
|
8a2425d35d | ||
|
|
3b64bdeaba | ||
|
|
cc170c7b17 | ||
|
|
15674a933e | ||
|
|
752494f31e | ||
|
|
c00568255b | ||
|
|
fba6dd8b45 | ||
|
|
c6805e643f | ||
|
|
4baaa110d6 | ||
|
|
bc79161e25 | ||
|
|
b087032f9b | ||
|
|
c118b0e9c8 | ||
|
|
1ad9e6843a | ||
|
|
1cad49bcd9 | ||
|
|
9b054a1faf | ||
|
|
ca049ec2c6 | ||
|
|
fd93a6afd8 | ||
|
|
181a7bb31d | ||
|
|
bf51354029 | ||
|
|
7b967bf66f | ||
|
|
58b479b0c5 | ||
|
|
ae1a3b4b1e | ||
|
|
e618681e9b | ||
|
|
70ea0e6687 | ||
|
|
9c35d59911 | ||
|
|
53caaf5896 | ||
|
|
9bacd0c593 | ||
|
|
a5c97d4ad7 | ||
|
|
c8ee076241 | ||
|
|
a0cda28d03 | ||
|
|
3c1e03b44d | ||
|
|
bf4e6590c6 | ||
|
|
da62b2b37e | ||
|
|
fcd9110e73 | ||
|
|
a6f4cf1aaa | ||
|
|
49ff97cdf7 | ||
|
|
5027f56234 | ||
|
|
d0e0633523 | ||
|
|
fb6d6fef56 | ||
|
|
cf5490b5c9 | ||
|
|
334ec9a0c0 | ||
|
|
d2409a7d0d | ||
|
|
0ce70e3263 | ||
|
|
efe86767af | ||
|
|
036029e610 | ||
|
|
9e26f383d5 | ||
|
|
68d7ac57e5 | ||
|
|
8b309685da | ||
|
|
17084d59f7 | ||
|
|
95a805bbd5 | ||
|
|
a800231f17 | ||
|
|
da75daf547 | ||
|
|
05f1bdb236 | ||
|
|
202117158b | ||
|
|
fab9770b89 | ||
|
|
a248b78a53 | ||
|
|
5bef90fad3 | ||
|
|
1b5825cc60 | ||
|
|
49023f45f3 | ||
|
|
d52e18c92d | ||
|
|
b023d5c1fb | ||
|
|
cb1a54abd4 | ||
|
|
3330f9c2ad | ||
|
|
651ec7d1f4 | ||
|
|
a15041a232 | ||
|
|
beaf5b10c2 | ||
|
|
4ab869e930 | ||
|
|
ceabaee8a6 | ||
|
|
ddd9631f32 | ||
|
|
0ed36894a9 | ||
|
|
2fa09bbc69 | ||
|
|
fe770e32a1 | ||
|
|
38eb0d6c27 | ||
|
|
012a216cbb | ||
|
|
c74eb2bffd | ||
|
|
78c6be2dc0 | ||
|
|
50c34336e4 | ||
|
|
a3f228858e | ||
|
|
7224cbe087 | ||
|
|
83c0805b45 | ||
|
|
b9e4d10ce9 | ||
|
|
c9fac0e3ea | ||
|
|
535c64b658 | ||
|
|
62461a298a | ||
|
|
71f53adab8 | ||
|
|
49a0287c43 | ||
|
|
501a4bf95b | ||
|
|
9a992abfdb | ||
|
|
7b39d48fd3 | ||
|
|
0e98d6a81a | ||
|
|
201ceb7054 | ||
|
|
7fa6bc2f82 | ||
|
|
a7c0ed1a2e | ||
|
|
9fc178bfc2 | ||
|
|
d37977e403 | ||
|
|
4be1ed4940 | ||
|
|
4a9bd23ae6 | ||
|
|
b22bce8f2d | ||
|
|
1a38e26e67 | ||
|
|
4e5f5de2e3 | ||
|
|
5fd778be5a | ||
|
|
651ba865c1 | ||
|
|
f6ad61c06e | ||
|
|
b7d83f4e64 | ||
|
|
fae1628cef | ||
|
|
d1ad596250 | ||
|
|
229288bf09 | ||
|
|
d3c93e7b0c | ||
|
|
1cee8aa903 | ||
|
|
fde708b8ac | ||
|
|
2f9983c95f | ||
|
|
8c2a6bdca2 | ||
|
|
3993301681 | ||
|
|
b3a8ad57e7 | ||
|
|
b3e305e8cb | ||
|
|
46c1434d50 | ||
|
|
0720b24055 | ||
|
|
a34f2d3728 | ||
|
|
ba956c5647 | ||
|
|
62ccb3967b | ||
|
|
ba023c6bf3 | ||
|
|
40b5f15c33 | ||
|
|
eac9a05321 | ||
|
|
0056a6330b | ||
|
|
68c025ba83 | ||
|
|
571f5f5ae0 | ||
|
|
b7be2bd001 | ||
|
|
48d525946d | ||
|
|
b3e16fc287 | ||
|
|
48952282c6 | ||
|
|
c20415b042 | ||
|
|
bca0856b3a | ||
|
|
38b60a2a7c | ||
|
|
0631d3cf5a | ||
|
|
b45eb506e4 | ||
|
|
7d6adf22b2 | ||
|
|
1572e779ea | ||
|
|
48b8fec112 | ||
|
|
cc568204ec | ||
|
|
1d6db4435f | ||
|
|
b5c7a6f7c4 | ||
|
|
127f3eb840 | ||
|
|
044eb4e4cd | ||
|
|
5872c774fb | ||
|
|
7043b63bb1 | ||
|
|
e490cadfb7 | ||
|
|
1032a0f04c | ||
|
|
4780e492f0 | ||
|
|
63da2b0071 | ||
|
|
6e544c20c9 | ||
|
|
772f90a266 | ||
|
|
08e30d0b37 | ||
|
|
f8a84174b6 | ||
|
|
ead308168e | ||
|
|
0db4add5ec | ||
|
|
eceb4808e4 | ||
|
|
ffecc39b3b | ||
|
|
520ae87929 | ||
|
|
3722edcff1 | ||
|
|
2defeb0e04 | ||
|
|
072bdfbb2e | ||
|
|
fea38188a1 | ||
|
|
f2c3f352bb | ||
|
|
2fe42855c4 | ||
|
|
1dc6a38c84 | ||
|
|
c370dec037 | ||
|
|
339b93b86e | ||
|
|
b42793864e | ||
|
|
ad04159cf4 | ||
|
|
d784aaef44 | ||
|
|
02f581522d | ||
|
|
f541d65092 | ||
|
|
cf6c041bd8 | ||
|
|
8278c12cef | ||
|
|
6f11502987 | ||
|
|
8a8cdeb72d | ||
|
|
1e892468f1 | ||
|
|
3e7f840859 | ||
|
|
95f23f7d82 | ||
|
|
7d9a59088f | ||
|
|
88b952a035 | ||
|
|
c95dda4afb | ||
|
|
0ce1205e16 | ||
|
|
3a019fdf5f | ||
|
|
c9bbd558d4 | ||
|
|
013709f626 | ||
|
|
6469c3036b | ||
|
|
26f034879f | ||
|
|
d3c4a14cf3 | ||
|
|
3762bd0a7d | ||
|
|
bd58dd8287 | ||
|
|
1f4fc33d5e | ||
|
|
298fef708d | ||
|
|
a395cf72bd | ||
|
|
09160322d4 | ||
|
|
ef94eb7355 | ||
|
|
0ac93eb773 | ||
|
|
abfa08fb58 | ||
|
|
0aa62ae777 | ||
|
|
6f5fdb33c6 | ||
|
|
9a2743f6a7 | ||
|
|
7be0b5a122 | ||
|
|
aa8a841287 | ||
|
|
61e27b4955 | ||
|
|
43668f9cae | ||
|
|
330105c9d2 | ||
|
|
4be52ee572 | ||
|
|
475ca049f3 | ||
|
|
d667e32988 | ||
|
|
587d5c5885 | ||
|
|
410fa44c19 | ||
|
|
eb76fa33fc | ||
|
|
cfb3a3c5a0 | ||
|
|
5976752ea7 | ||
|
|
82790b03da | ||
|
|
633a763b37 | ||
|
|
c0a3bf14cc | ||
|
|
cec5a0ce48 | ||
|
|
838ca6ad50 | ||
|
|
6042c6b9bb | ||
|
|
219041d77c | ||
|
|
c603f82804 | ||
|
|
e33c871717 | ||
|
|
032f007f48 | ||
|
|
bcdaebfa89 | ||
|
|
70f235d34e | ||
|
|
adeba02e08 | ||
|
|
4565055213 | ||
|
|
2b6f063c5d | ||
|
|
6692c99102 | ||
|
|
0427ff40a3 | ||
|
|
1452ca94ad | ||
|
|
04f32aacb5 | ||
|
|
5cc32a1427 | ||
|
|
9e566a0a57 | ||
|
|
11a53b76cf | ||
|
|
244d1942d2 | ||
|
|
eb95804cfc | ||
|
|
8b0c5b924c | ||
|
|
9729dad09c | ||
|
|
ade0edf8a5 | ||
|
|
6262937f5e | ||
|
|
e770114a85 | ||
|
|
d72709ffc8 | ||
|
|
d8cc8a8e44 | ||
|
|
ddaa77b018 | ||
|
|
98045382c3 | ||
|
|
554f17b0b6 | ||
|
|
c8caf68e3f | ||
|
|
5194b981ac | ||
|
|
e6d369c6d7 | ||
|
|
41c9d7dc57 | ||
|
|
3ff9669b3f | ||
|
|
e0368a2a48 | ||
|
|
0ab310eafb | ||
|
|
e262f64470 | ||
|
|
1da982b4f4 | ||
|
|
d973531cb7 | ||
|
|
d5e0d44e2a | ||
|
|
a11f38a14e | ||
|
|
c9d12d419f | ||
|
|
4634a65347 | ||
|
|
27b75a87df | ||
|
|
31a18b5ee2 | ||
|
|
9fdaa338b7 | ||
|
|
399a52dccb | ||
|
|
60a7cdd875 | ||
|
|
12f32dfd45 | ||
|
|
5515983179 | ||
|
|
57e6d92a6d | ||
|
|
d2fdea71f7 | ||
|
|
d84c61c428 | ||
|
|
0f43f8e409 | ||
|
|
cdaf5e3abf | ||
|
|
a2fb9ae93f | ||
|
|
26b03b5dbe | ||
|
|
da6fca4d78 | ||
|
|
85a655b908 | ||
|
|
87063038cb | ||
|
|
d523936872 | ||
|
|
1f72ba2214 | ||
|
|
3df0e29570 | ||
|
|
8c0c9b4188 | ||
|
|
d98215846e | ||
|
|
5b77b57468 | ||
|
|
a10bb08a4c | ||
|
|
9336fb2f73 | ||
|
|
ae1b055c31 | ||
|
|
b464cc2d92 | ||
|
|
b4a4f6ad55 | ||
|
|
94859b9104 | ||
|
|
44c8733bf6 | ||
|
|
22ad4098aa | ||
|
|
8ed9f83e82 | ||
|
|
aec0884320 | ||
|
|
20f22188e2 | ||
|
|
4c87089a23 | ||
|
|
22df666f11 | ||
|
|
10e16274c4 | ||
|
|
615bf959ff | ||
|
|
1743825077 | ||
|
|
4f5d8470e2 | ||
|
|
c086725698 | ||
|
|
a596d64207 | ||
|
|
4f5326c5e3 | ||
|
|
2f7e673f52 | ||
|
|
4a9774afd9 | ||
|
|
842edfe146 | ||
|
|
174c147ae1 | ||
|
|
c260e8a932 | ||
|
|
14eb228cc5 | ||
|
|
24ac347348 | ||
|
|
512532067e | ||
|
|
5c802851d4 | ||
|
|
1bbe4c2984 | ||
|
|
d0ad871362 | ||
|
|
94b9081b03 | ||
|
|
023f651d77 | ||
|
|
8f4a3a5fca | ||
|
|
3f799528d8 | ||
|
|
112ea1d7be | ||
|
|
a1679751d0 | ||
|
|
7a111ea14a | ||
|
|
728dc4de17 | ||
|
|
1c13d7ef85 | ||
|
|
52103da08c | ||
|
|
32aec436de | ||
|
|
d4d4dbcd36 | ||
|
|
10b7a6d4fe | ||
|
|
8ce7bb4ed8 | ||
|
|
cfedd3f165 | ||
|
|
175bd05959 | ||
|
|
3486bb2f8f | ||
|
|
7d17479dc3 | ||
|
|
b5710c4b14 | ||
|
|
f29ade7e4a | ||
|
|
cd4cc5d69e | ||
|
|
3d18b23132 | ||
|
|
386f7146ff | ||
|
|
574d72fee5 | ||
|
|
b7a0a0abde | ||
|
|
193ccc4e0e | ||
|
|
ccbf2a9bb3 | ||
|
|
7884eabfc9 | ||
|
|
07050b000c | ||
|
|
3df72a359e | ||
|
|
7d183e0c84 | ||
|
|
703a82a343 | ||
|
|
7723bb34e3 | ||
|
|
c29dc160f7 | ||
|
|
6196d93e54 | ||
|
|
3a5bcf0407 | ||
|
|
a00bd13884 | ||
|
|
a61b74e2ad | ||
|
|
18c4c253b3 | ||
|
|
21c52e3d0b | ||
|
|
d38a3432c2 | ||
|
|
ff14ed4af3 | ||
|
|
f2a10fd27b | ||
|
|
092be5071e | ||
|
|
b37d7df487 | ||
|
|
eef3c9605e | ||
|
|
e60939850e | ||
|
|
d5fedc5b5f | ||
|
|
5fa5392a4a | ||
|
|
0698930f1f | ||
|
|
9fd15d5780 | ||
|
|
6a45f75e21 | ||
|
|
aa98d0927a | ||
|
|
97320040d3 | ||
|
|
8194120e81 | ||
|
|
5977ce5adf | ||
|
|
ba2f0b4142 | ||
|
|
26351bf8ac | ||
|
|
b2061e095b | ||
|
|
5b6a428468 | ||
|
|
2e9ef14ee4 | ||
|
|
f65bf06896 | ||
|
|
996c0e9317 | ||
|
|
5de8b9c5a0 | ||
|
|
271d85f1b0 | ||
|
|
4df92e1acc | ||
|
|
5ff0ebd589 | ||
|
|
bf866a449d | ||
|
|
b6f8f4926b | ||
|
|
cb9289ed75 | ||
|
|
120bf27fd1 | ||
|
|
bd2fac8ca4 | ||
|
|
2f99fbba88 | ||
|
|
e2b09254db | ||
|
|
491d80029e | ||
|
|
525b9fc903 | ||
|
|
0071802456 | ||
|
|
7893f14898 | ||
|
|
feb6b3cfd8 | ||
|
|
fe4819b5eb | ||
|
|
2f2b914794 | ||
|
|
486097f159 | ||
|
|
745371d866 | ||
|
|
75ce3744f5 | ||
|
|
39e6ebd252 | ||
|
|
2012a98a72 | ||
|
|
ee0010350c | ||
|
|
974ff6b9f5 | ||
|
|
dbf694e484 | ||
|
|
a2654dedc6 | ||
|
|
f35b541be1 | ||
|
|
c9c8564d7c | ||
|
|
45a68a3f90 | ||
|
|
5eb0943cac | ||
|
|
86112cb089 | ||
|
|
949844080e | ||
|
|
a721e37d4d | ||
|
|
d613b78721 | ||
|
|
94bd53a0fc | ||
|
|
2214630290 | ||
|
|
14e4502451 | ||
|
|
ac7d936c4f | ||
|
|
c8d5f9a7f0 | ||
|
|
58b43636f9 | ||
|
|
96a5e40986 | ||
|
|
4a492945bc | ||
|
|
d4d2e34a1a | ||
|
|
d7a3a9e812 | ||
|
|
b38b6d53b8 | ||
|
|
62eb5ae268 | ||
|
|
eea78cfc12 | ||
|
|
0a6252780a | ||
|
|
ff5418eff8 | ||
|
|
8110660a55 | ||
|
|
e6bb02c842 | ||
|
|
2fbc5cbd35 | ||
|
|
51107abd6b | ||
|
|
6624f714d9 | ||
|
|
ce949baaef | ||
|
|
ca8e16d1ab | ||
|
|
0657a3abe7 | ||
|
|
2d4fec4d5d | ||
|
|
13ecd42bcd | ||
|
|
3d93fdc583 | ||
|
|
29fea3fd34 | ||
|
|
673b5056f8 | ||
|
|
6882bd36ff | ||
|
|
7f4fa239db | ||
|
|
cfc8771e90 | ||
|
|
8f28d66726 | ||
|
|
19ccadf58b | ||
|
|
38f6cbd559 | ||
|
|
a3097d41a1 | ||
|
|
65df81df6f | ||
|
|
14113556ab | ||
|
|
183d43d38c | ||
|
|
ed3b13aadc | ||
|
|
d4a0c18211 | ||
|
|
b513ba290b | ||
|
|
8b83fa089e | ||
|
|
00cab3f062 | ||
|
|
0464eaf90b | ||
|
|
48a853e20c | ||
|
|
60c9b3822f | ||
|
|
009488ee8e | ||
|
|
34d4bae263 | ||
|
|
90cc8ac939 | ||
|
|
9483069f53 | ||
|
|
67f31bb90b | ||
|
|
3bcdb66628 | ||
|
|
beb2ca22c9 | ||
|
|
796628ebdd | ||
|
|
461c6e8522 | ||
|
|
1b988002dc | ||
|
|
14d7e3ce29 | ||
|
|
742556429d | ||
|
|
fa8feb4253 | ||
|
|
4ea55269f4 | ||
|
|
f49ffca28f | ||
|
|
ad9e9f2c8b | ||
|
|
79288de50f | ||
|
|
3461ff3b3a | ||
|
|
e5dd0b4c28 | ||
|
|
f4ef78773f | ||
|
|
36f01165ef | ||
|
|
7c2b227c8d | ||
|
|
152ad7885a | ||
|
|
a67e07a1fb | ||
|
|
a91d9b54f4 | ||
|
|
0c551b6c01 | ||
|
|
6230aa8f96 | ||
|
|
3b48de5629 | ||
|
|
a0ccdbffff | ||
|
|
ae5f2de4fb | ||
|
|
f5c0fc3784 | ||
|
|
114f0c4005 | ||
|
|
ab6f746c72 | ||
|
|
5db0eea962 | ||
|
|
eeb4562e3d | ||
|
|
4efb85f154 | ||
|
|
9cfcae0ab9 | ||
|
|
7d0854b464 | ||
|
|
8a9420ae34 | ||
|
|
b75b932097 | ||
|
|
3be9252e2b | ||
|
|
b37756ea25 | ||
|
|
b8f2a8d423 | ||
|
|
6e07afa205 | ||
|
|
0b39137fc6 | ||
|
|
33bf1aa0a1 | ||
|
|
bdabf8e458 | ||
|
|
690ac7003c | ||
|
|
2bdea0f0a1 | ||
|
|
c59f741276 | ||
|
|
6e40c5c910 | ||
|
|
4b0ec09abc | ||
|
|
8c5cb310e3 | ||
|
|
3880076eba | ||
|
|
027be4971d | ||
|
|
2e5287ba93 | ||
|
|
a5dceb7439 | ||
|
|
e78a58f725 | ||
|
|
6089db0768 | ||
|
|
ba6898b989 | ||
|
|
02414956fe | ||
|
|
c5a9e68a0f | ||
|
|
6bc6980a7d | ||
|
|
baf3b5c33e | ||
|
|
28df1d94e6 | ||
|
|
fec638f382 | ||
|
|
ed29cbb0a4 | ||
|
|
eb1c5cb97a | ||
|
|
2434530e5e | ||
|
|
160dac0587 | ||
|
|
fe980c2e01 | ||
|
|
a800fe4286 | ||
|
|
6f2bbc4670 | ||
|
|
1e209d7dc0 | ||
|
|
46f94adbef | ||
|
|
6f6b0722d7 | ||
|
|
a18e936bee | ||
|
|
b196bc4c7f | ||
|
|
061ddcabbc | ||
|
|
486cffeab4 | ||
|
|
36dd0a71b7 | ||
|
|
02fa363932 | ||
|
|
f0acd72f2d | ||
|
|
cd7da2dfe7 | ||
|
|
13ed26b8c6 | ||
|
|
12576b99fc | ||
|
|
328ea9d0ff | ||
|
|
c4721bc24c | ||
|
|
94618a2fa3 | ||
|
|
e66fd866b8 | ||
|
|
282efe5e1d | ||
|
|
bf7e3bf070 | ||
|
|
00445e86fd | ||
|
|
d3197e7628 | ||
|
|
d13038aa90 | ||
|
|
6d2cddf54b | ||
|
|
b30d962f27 | ||
|
|
2796eca91c | ||
|
|
e3c178d6d8 | ||
|
|
70a51d482a | ||
|
|
3d2d300bcd | ||
|
|
129484da3b | ||
|
|
38fdbd4356 | ||
|
|
e650bdcde0 | ||
|
|
cb294d9ecf | ||
|
|
92571e3465 | ||
|
|
2c988d1842 | ||
|
|
cf0abb8958 | ||
|
|
02fa4be6c4 | ||
|
|
27057f84af | ||
|
|
f74269cdaa | ||
|
|
9168aa252d | ||
|
|
bb31cd9af1 | ||
|
|
b284851543 | ||
|
|
1fe8777f3b | ||
|
|
6bfe87dc43 | ||
|
|
91b5c0a39d | ||
|
|
951fff5462 | ||
|
|
c430a94576 | ||
|
|
5885a8e672 | ||
|
|
53cb0028b5 | ||
|
|
7ac74ca213 | ||
|
|
fb82b73b8f | ||
|
|
64db633e91 | ||
|
|
17982d846d | ||
|
|
016e500457 | ||
|
|
cbfb654958 | ||
|
|
b9749f4178 | ||
|
|
3822bbdb00 | ||
|
|
488e6a355f | ||
|
|
11e8a91619 | ||
|
|
d52a899212 | ||
|
|
a6462223df | ||
|
|
7488823fba | ||
|
|
11dddf15fb | ||
|
|
0b31a9f567 | ||
|
|
27ffd83f6a | ||
|
|
2e12c18f0d | ||
|
|
a747955b7d | ||
|
|
186745e83f | ||
|
|
2a5a30b761 | ||
|
|
cd6f6596ae | ||
|
|
37c9cd1555 | ||
|
|
6fa5281c6b | ||
|
|
25ad9d6ba3 | ||
|
|
98f6737e83 | ||
|
|
3b4649d941 | ||
|
|
d48914256f | ||
|
|
612cca3897 | ||
|
|
689a837f64 | ||
|
|
b6454bccd8 | ||
|
|
c402838c3a | ||
|
|
de4792a374 | ||
|
|
3258b672d4 | ||
|
|
77c1e0a2e7 | ||
|
|
5d9546e1c2 | ||
|
|
f185a190bc | ||
|
|
9d27716f61 | ||
|
|
c406983e47 | ||
|
|
dae14b3540 | ||
|
|
309f794a53 | ||
|
|
cfe1e95501 | ||
|
|
6c53fadb6d | ||
|
|
930be902d0 | ||
|
|
fbaf069d27 | ||
|
|
8457dd23a6 | ||
|
|
9f8e0d7238 | ||
|
|
6a4b6220f8 | ||
|
|
c3aa29f009 | ||
|
|
00f2b3fa8c | ||
|
|
3a57cc6724 | ||
|
|
c2f6e5283e | ||
|
|
dec16ad44f | ||
|
|
89d2c89c83 | ||
|
|
75b7aedf0c | ||
|
|
1ee3e051ad | ||
|
|
c929865666 | ||
|
|
31853fe147 | ||
|
|
bd7766321b | ||
|
|
02215ff8f6 | ||
|
|
aafb815658 | ||
|
|
9120f28d97 | ||
|
|
4f79e18537 | ||
|
|
bebb61224b | ||
|
|
fc6fa1c3fd | ||
|
|
d3b1956c1e | ||
|
|
100c802c6e | ||
|
|
4bab0ebf8c | ||
|
|
d755049a96 | ||
|
|
881ff368ce | ||
|
|
b7ea51fd02 | ||
|
|
a087c51dfa | ||
|
|
528693c991 | ||
|
|
48d1d419b4 | ||
|
|
ccc4732eeb | ||
|
|
c53d022729 | ||
|
|
567bc2ec07 | ||
|
|
a8e7d8f9a6 | ||
|
|
292e6bb71f | ||
|
|
011b96c37e | ||
|
|
882b5f573a | ||
|
|
2e21c87fac | ||
|
|
a391032cc2 | ||
|
|
00074c0f1f | ||
|
|
204e67a7ad | ||
|
|
e64282173d | ||
|
|
0263abac50 | ||
|
|
ad7fab5b19 | ||
|
|
a4642ae202 | ||
|
|
05b94006af | ||
|
|
25b75964eb | ||
|
|
db2010b18d | ||
|
|
3ad144510d | ||
|
|
ab90ac3822 | ||
|
|
363a8ffdaf | ||
|
|
01217e1c6c | ||
|
|
a5e273d8c1 | ||
|
|
1305516689 | ||
|
|
7aeba377f1 | ||
|
|
a6c02bd401 | ||
|
|
d3354af99f | ||
|
|
f73037d9ae | ||
|
|
7f40f16597 | ||
|
|
860464e461 | ||
|
|
9dcec4db4a | ||
|
|
d95c921fc3 | ||
|
|
8be0fc09f0 | ||
|
|
a19a716ba9 | ||
|
|
b0059e1eef | ||
|
|
774213fd32 | ||
|
|
437c634b61 | ||
|
|
180f3d9970 | ||
|
|
23fc8605d3 | ||
|
|
b0af5e5236 | ||
|
|
4c96224b5f | ||
|
|
201dad41d7 | ||
|
|
f044785fa9 | ||
|
|
1675370076 | ||
|
|
0ea78e56d8 | ||
|
|
bbe8c3421c | ||
|
|
42e3184f88 | ||
|
|
831b3b8adf | ||
|
|
25059b286d | ||
|
|
1ae5ba5539 | ||
|
|
2e2e891db8 | ||
|
|
caceaba559 | ||
|
|
dd7ab3d7fc | ||
|
|
3269cec1d4 | ||
|
|
47e478d6de | ||
|
|
d90fd6f811 | ||
|
|
270a4740c8 | ||
|
|
6f0f8429e0 | ||
|
|
68456bb248 | ||
|
|
72603ffc69 | ||
|
|
a2be28daca | ||
|
|
a411085799 | ||
|
|
4403118001 | ||
|
|
b7d808e96b | ||
|
|
c1e544fe0f | ||
|
|
b91c4922e6 | ||
|
|
e0750eb79c | ||
|
|
9f5701896f | ||
|
|
d798aa2a4f | ||
|
|
3b8f43e532 | ||
|
|
f5e1c3f870 | ||
|
|
1584ddc897 | ||
|
|
4d92532956 | ||
|
|
f1d3fa9570 | ||
|
|
50c0080689 | ||
|
|
7975c0ac8a | ||
|
|
6f4c27006d | ||
|
|
4b25717255 | ||
|
|
e4d1d62091 | ||
|
|
4dd34b713f | ||
|
|
29579f4763 | ||
|
|
ed715363c4 | ||
|
|
1f8477537e | ||
|
|
66ccd22e8d | ||
|
|
f0dd322310 | ||
|
|
67ca42c5dd | ||
|
|
83d442665e | ||
|
|
ad1852518f | ||
|
|
cb415a13f8 | ||
|
|
f8d3d4287c | ||
|
|
dd7280fdf9 | ||
|
|
1963985531 | ||
|
|
8563eeccf7 | ||
|
|
cb88133467 | ||
|
|
292d90dc39 | ||
|
|
a081e4ade9 | ||
|
|
aa3d2f76a5 | ||
|
|
84ac0f0de4 | ||
|
|
66cdd6eb36 | ||
|
|
92d617fc7a | ||
|
|
667582d02f | ||
|
|
2da3752e98 | ||
|
|
7023eef9e3 | ||
|
|
0d0e4fbc70 | ||
|
|
3ef9ce6c02 | ||
|
|
e7a37b6192 | ||
|
|
4e45ac97ea | ||
|
|
551b0270ad | ||
|
|
9a4f12d5ce | ||
|
|
d16d4f1f05 | ||
|
|
3013100d5a | ||
|
|
9c9c061a50 | ||
|
|
c2d2dc726a | ||
|
|
2903d59a90 | ||
|
|
d9c81d9562 | ||
|
|
4b1bba808e | ||
|
|
3472ab2be8 | ||
|
|
041924ab32 | ||
|
|
fb86d40220 | ||
|
|
6ed972510c | ||
|
|
18e0dfcbc0 | ||
|
|
4a19cdca9c | ||
|
|
629754e743 | ||
|
|
9a4a6ab14d | ||
|
|
e266ffdc5a | ||
|
|
6850786f90 | ||
|
|
6b5186eec8 | ||
|
|
9439a87f72 | ||
|
|
3e42e25823 | ||
|
|
4330e5fe32 | ||
|
|
b9841d40be | ||
|
|
18d3e4da13 | ||
|
|
6ed20f81b1 | ||
|
|
75e1b08347 | ||
|
|
72f368dcaf | ||
|
|
e158967986 | ||
|
|
fb234acb2b | ||
|
|
f78c4bcfc6 | ||
|
|
461fb320bc | ||
|
|
1fece41790 | ||
|
|
817457e79e | ||
|
|
c94a235861 | ||
|
|
d70f90bd41 | ||
|
|
0355888e01 | ||
|
|
ab81cd02b1 | ||
|
|
676b0973cb | ||
|
|
fc81c86ce9 | ||
|
|
2680e83f5f | ||
|
|
cc91c6e85d | ||
|
|
7c8749311c | ||
|
|
5c1835de0b | ||
|
|
7cef5a5f0a | ||
|
|
f9a6e0c627 | ||
|
|
bbd500f316 | ||
|
|
230cd5ecc8 | ||
|
|
296dc7858c | ||
|
|
b6404c83f4 | ||
|
|
31eefe5e96 | ||
|
|
c735f555c2 | ||
|
|
1b1500a051 | ||
|
|
0e6959de80 | ||
|
|
14f38e198b | ||
|
|
523a4c41a4 | ||
|
|
a95482acf8 | ||
|
|
c464f20f41 | ||
|
|
e5a71d77b7 | ||
|
|
a839a364c8 | ||
|
|
75cfc998eb | ||
|
|
cf2b20fda1 | ||
|
|
70d3583340 | ||
|
|
0955acab54 | ||
|
|
db26df68d8 | ||
|
|
a1da138b45 | ||
|
|
c1e1719722 | ||
|
|
bb7b764410 | ||
|
|
40c7bf253d | ||
|
|
d67ca11f47 | ||
|
|
ae9b334490 | ||
|
|
b751b3c108 | ||
|
|
1cbe38a3f8 | ||
|
|
6793a6a43d | ||
|
|
740e6b1186 | ||
|
|
6f109a4df1 | ||
|
|
11d3c006b4 | ||
|
|
73c292ad0e | ||
|
|
b18783d44f | ||
|
|
90d4233f02 | ||
|
|
2a799c8e18 | ||
|
|
457b7e819a | ||
|
|
8aa099020c | ||
|
|
e8db428302 | ||
|
|
a2c1578386 | ||
|
|
c1a87498ea | ||
|
|
03eb709ea9 | ||
|
|
99eb134cf7 | ||
|
|
1c9ffea06c | ||
|
|
33999a457a | ||
|
|
a0822b0f81 | ||
|
|
c11b74bcf9 | ||
|
|
c390fbcee8 | ||
|
|
e58378a58e | ||
|
|
da9aa234ab | ||
|
|
f11bb8984e | ||
|
|
38b7732c20 | ||
|
|
d19834fe34 | ||
|
|
a61b441176 | ||
|
|
463ce03e29 | ||
|
|
5829a66ce7 | ||
|
|
09e30314eb | ||
|
|
a1533c7209 | ||
|
|
713f9fb132 | ||
|
|
1420a1eb43 | ||
|
|
fcc1cc626b | ||
|
|
d218ce4998 | ||
|
|
7d3a528b47 | ||
|
|
e78f47e595 | ||
|
|
b5e8388258 | ||
|
|
c923449d10 | ||
|
|
efabf452e6 | ||
|
|
83dba0314d | ||
|
|
ba4e609bc3 | ||
|
|
bf6b1d9360 | ||
|
|
e8db346515 | ||
|
|
ac4171142f | ||
|
|
ab2f61e9ca | ||
|
|
06c955a32b | ||
|
|
25f2a52e79 | ||
|
|
1007dedf50 | ||
|
|
0bb751bf29 | ||
|
|
2875e18190 | ||
|
|
6976bb431e | ||
|
|
2c79c3302e | ||
|
|
2aa1fe09a0 | ||
|
|
b9089e7cc7 | ||
|
|
8fb8fe6d03 | ||
|
|
52bbd698c7 | ||
|
|
cdf144edba | ||
|
|
7252649d71 | ||
|
|
f883f5166d | ||
|
|
c9f70519ff | ||
|
|
32a5e5d3e8 | ||
|
|
2d4103a3d9 | ||
|
|
0aff75f678 | ||
|
|
47a269a11a | ||
|
|
37a86ea52d | ||
|
|
91e98b65e5 | ||
|
|
59761fe5fd | ||
|
|
57f64cce1c | ||
|
|
329711d9a4 | ||
|
|
a1a29925ac | ||
|
|
d66b6e175f | ||
|
|
3c34eb1412 | ||
|
|
468ab69747 | ||
|
|
893d586f56 | ||
|
|
789b4a9b30 | ||
|
|
2d6247b52e | ||
|
|
079119abaf | ||
|
|
9c3124a607 | ||
|
|
3127e4caa0 | ||
|
|
e2f6bb8c2e | ||
|
|
bf88ff18ad | ||
|
|
02292c5b61 | ||
|
|
76402bc251 | ||
|
|
2f39462ce7 | ||
|
|
a9c2a50a0a | ||
|
|
0200d64ee3 | ||
|
|
373526a465 | ||
|
|
6eaf579a06 | ||
|
|
9068185db6 | ||
|
|
b46fabf26e | ||
|
|
d89ad1f104 | ||
|
|
ef42dbb7d2 | ||
|
|
7e41d84393 | ||
|
|
66c3529861 | ||
|
|
92bbddeb55 | ||
|
|
b16d03782b | ||
|
|
86ac4ab1d6 | ||
|
|
8d7f26b7ad | ||
|
|
99237145b1 | ||
|
|
7d132f5e5e | ||
|
|
ba6f73330b | ||
|
|
3c123f307b | ||
|
|
13140f91b0 | ||
|
|
1705541ba9 | ||
|
|
d62a116e28 | ||
|
|
18ece9b5c4 | ||
|
|
d4424463c8 | ||
|
|
d6eb2818b8 | ||
|
|
d19ec6f8c6 | ||
|
|
937b55c0db | ||
|
|
a7efccab6d | ||
|
|
9bfb322975 | ||
|
|
a637773e23 | ||
|
|
aafda8cd47 | ||
|
|
bd360ab557 | ||
|
|
ea167d7ce9 | ||
|
|
5c8ce904d1 | ||
|
|
f2329d515f | ||
|
|
049b1baaf5 | ||
|
|
7650afa460 | ||
|
|
a605a3065f | ||
|
|
cbe4973947 | ||
|
|
32148d2643 | ||
|
|
fbe05ec561 | ||
|
|
c3ea7ca00a | ||
|
|
90126f80c3 | ||
|
|
00f201d514 | ||
|
|
2acca94970 | ||
|
|
40dce20d2b | ||
|
|
defd25c98f | ||
|
|
e9557600c5 | ||
|
|
ee7a603dfd | ||
|
|
f67a3a5bda | ||
|
|
60d085e6f7 | ||
|
|
cf2a7abcc5 | ||
|
|
5d1969bde4 | ||
|
|
4f0d711487 | ||
|
|
943c2b31ad | ||
|
|
7b65a39f22 | ||
|
|
35215049b4 | ||
|
|
cd5684ac93 | ||
|
|
24ce3f49c8 | ||
|
|
88216d84a7 | ||
|
|
16f75080e6 | ||
|
|
d4d334886c | ||
|
|
c82e18fe8f | ||
|
|
5edb982271 | ||
|
|
bb8b3c2226 | ||
|
|
3c6aecd395 | ||
|
|
79cce169d4 | ||
|
|
972dcde474 | ||
|
|
535511a85a | ||
|
|
3b5363540a | ||
|
|
fb3ccbcda8 | ||
|
|
e2fa3d36f0 | ||
|
|
08084ea140 | ||
|
|
8197fd4781 | ||
|
|
6dcf10b242 | ||
|
|
863631fa6b | ||
|
|
d5e4f03179 | ||
|
|
feeb4180c8 | ||
|
|
d3dc0cdaf8 | ||
|
|
d41346927d | ||
|
|
f79a4edd69 | ||
|
|
6fb49c330d | ||
|
|
eb076ae137 | ||
|
|
722964b2ab | ||
|
|
1e25ca92ce | ||
|
|
f25a8fc5e1 | ||
|
|
3e7cbd2256 | ||
|
|
97096d8701 | ||
|
|
ba26525e29 | ||
|
|
365e4ced9c | ||
|
|
0d933c9b4f | ||
|
|
673c5850b5 | ||
|
|
11a5bbd65e | ||
|
|
a946f04d2e | ||
|
|
a15455fae6 | ||
|
|
eee17fb7b5 | ||
|
|
f820a3c3da | ||
|
|
a8775f16d7 | ||
|
|
ff1ef50a42 | ||
|
|
e2103de489 | ||
|
|
91e9344624 | ||
|
|
ec2c521ca7 | ||
|
|
b3aa42d1ca | ||
|
|
47723c2027 | ||
|
|
1fc280c2b1 | ||
|
|
3aa5b5100a | ||
|
|
a51a5f03a3 | ||
|
|
2c480b2c2b | ||
|
|
ac19e3e144 | ||
|
|
9ff24faf1f | ||
|
|
dd83c4e72d | ||
|
|
4631f4ac5f | ||
|
|
40173515c1 | ||
|
|
977e773663 | ||
|
|
23b7f7e7b4 | ||
|
|
02a876f0e7 | ||
|
|
47f29a346c | ||
|
|
51e7af2e22 | ||
|
|
8e13d2f3e7 | ||
|
|
6ce19ed585 | ||
|
|
c2a62d74a1 | ||
|
|
9e9c15037a | ||
|
|
90d83a2250 | ||
|
|
fc57ee6d14 | ||
|
|
df5a29caf1 | ||
|
|
66506527eb | ||
|
|
56f0c53c59 | ||
|
|
0c6e662f0a | ||
|
|
9bb8b7fba2 | ||
|
|
5de8b78504 | ||
|
|
f7f0b31648 | ||
|
|
cf55b1b81d | ||
|
|
f6afde2143 | ||
|
|
63fe16098a | ||
|
|
d54675becb | ||
|
|
a59e8cbc0f | ||
|
|
0e5810d121 | ||
|
|
2011c35344 | ||
|
|
ab3dd202d7 | ||
|
|
a7010a2fac | ||
|
|
7833c7d5bf | ||
|
|
8207e69aa0 | ||
|
|
ec1733dac6 | ||
|
|
6cee0184f3 | ||
|
|
87010e737c | ||
|
|
2965051f0d | ||
|
|
a5d00fb089 | ||
|
|
f3916545a4 | ||
|
|
5159ffd487 | ||
|
|
0965996c5c | ||
|
|
bda9cb4469 | ||
|
|
c36c1c2213 | ||
|
|
dba064ae10 | ||
|
|
cd730957d0 | ||
|
|
f7235889bb | ||
|
|
27cbe247e6 | ||
|
|
ff3eec181b | ||
|
|
5d54bf504e | ||
|
|
e459c8cbaa | ||
|
|
0b51fe2bce | ||
|
|
6cacf9afd9 | ||
|
|
c03b95dc59 | ||
|
|
45002c0e67 | ||
|
|
592adc85d1 | ||
|
|
952f9c7159 | ||
|
|
869bb36c58 | ||
|
|
c5815984ae | ||
|
|
cb769c03c1 | ||
|
|
ac8a550f9b | ||
|
|
22a62791ce | ||
|
|
7a5a8abe9e | ||
|
|
d34650ad39 | ||
|
|
3bd78751db | ||
|
|
b23271bd6d | ||
|
|
49cf332a25 | ||
|
|
9378f2633b | ||
|
|
a93e5efee2 | ||
|
|
096c31c796 | ||
|
|
0cc9d30292 | ||
|
|
3d6f3319b6 | ||
|
|
0a1419c592 | ||
|
|
59d39ef601 | ||
|
|
28dcaf3c2e | ||
|
|
6315ce3c59 | ||
|
|
25a418d526 | ||
|
|
55fb592e45 | ||
|
|
17cdd90f33 | ||
|
|
a39960a40e | ||
|
|
7273556e89 | ||
|
|
43ddf82214 | ||
|
|
fe1d8e99fa | ||
|
|
5e93008d16 | ||
|
|
36fc98b071 | ||
|
|
3ca676cd30 | ||
|
|
c7329f3315 | ||
|
|
761e2989e4 | ||
|
|
d3eb0a2daf | ||
|
|
f749fc73c4 | ||
|
|
2137e83dd2 | ||
|
|
69d296d4f8 | ||
|
|
6f644e0d50 | ||
|
|
d1d0b08b9d | ||
|
|
335424492b | ||
|
|
e9658818ec | ||
|
|
e92b2bc0b4 | ||
|
|
84457e5f42 | ||
|
|
78e21539fe | ||
|
|
fc92adc975 | ||
|
|
0130fdcd85 | ||
|
|
4b5b58df93 | ||
|
|
3c279bd42c | ||
|
|
061bf8fc26 | ||
|
|
f652b448b8 | ||
|
|
2e5c4007b2 | ||
|
|
30c263c16b | ||
|
|
2886a4dc0b | ||
|
|
8d7a6e5d4b | ||
|
|
75f87528cc | ||
|
|
9f97c821bd | ||
|
|
68846354bb | ||
|
|
7f684c31a2 | ||
|
|
d716c2b70c | ||
|
|
6c0f9742c3 | ||
|
|
832a570de5 | ||
|
|
a9b245bb06 | ||
|
|
e8b4d824ce | ||
|
|
ab0ade6f37 | ||
|
|
db0b611a18 | ||
|
|
7554d8c1ef | ||
|
|
744d785d59 | ||
|
|
3de6b2cb81 | ||
|
|
3d3533a6ea | ||
|
|
5ea822c6f7 | ||
|
|
e54e3c4209 | ||
|
|
3b5fc8ca6a | ||
|
|
de2e289dce | ||
|
|
4a188e9112 | ||
|
|
ca59b640e3 | ||
|
|
9acabebea7 | ||
|
|
0ccdda46df | ||
|
|
775e81de78 | ||
|
|
bd280503fb | ||
|
|
a471f7a2fa | ||
|
|
ccb5f86643 | ||
|
|
8e6ed88e53 | ||
|
|
7daca99e01 | ||
|
|
256356d4e3 | ||
|
|
8ce6877fcf | ||
|
|
0a538a08e4 | ||
|
|
38f01a7097 | ||
|
|
611a0ea8ed | ||
|
|
dcd98215f2 | ||
|
|
493a78af8c | ||
|
|
f016e603af | ||
|
|
3adb3dd26e | ||
|
|
38fdf4f1d2 | ||
|
|
d30b6e44c3 | ||
|
|
6aa60ac1df | ||
|
|
15f24065e1 | ||
|
|
4a38659524 | ||
|
|
5287dae745 | ||
|
|
d8a22d6287 | ||
|
|
81cd594074 | ||
|
|
9d0bfe1108 | ||
|
|
93234a48ab | ||
|
|
c9ebb93cab | ||
|
|
2cac565b24 | ||
|
|
83f1749b57 | ||
|
|
515d412e3a | ||
|
|
311bb85014 | ||
|
|
79d97c4086 | ||
|
|
13d30463f0 | ||
|
|
66348799ad | ||
|
|
4b3a9e3a32 | ||
|
|
cc4a0b1ebf | ||
|
|
5ea8f4835d | ||
|
|
cb06a20947 | ||
|
|
c0ab12db5d | ||
|
|
2e9b2718d0 | ||
|
|
6f0f42630e | ||
|
|
aa11a93537 | ||
|
|
fbb7f2d1cf | ||
|
|
a6c3b5deee | ||
|
|
e80c9fb5ba | ||
|
|
5406f14a71 | ||
|
|
1e4ec1d1aa | ||
|
|
cd6234dca1 | ||
|
|
a1049e87d6 | ||
|
|
565ec1aa22 | ||
|
|
14a1f2af39 | ||
|
|
670d73ef2f | ||
|
|
d1df469f24 | ||
|
|
2f51d80791 | ||
|
|
e533d7bb54 | ||
|
|
6da0c63f60 | ||
|
|
79ede93c8b | ||
|
|
865d24c802 | ||
|
|
846bf123f8 | ||
|
|
f1d9e37a69 | ||
|
|
63981ab764 | ||
|
|
57e6e61206 | ||
|
|
07eac08b22 | ||
|
|
857163336f | ||
|
|
ed45df2ea7 | ||
|
|
c47e23303b | ||
|
|
9be7550b47 | ||
|
|
d2d734c9eb | ||
|
|
dc7216acab | ||
|
|
6f2bdc013f | ||
|
|
d998761ad3 | ||
|
|
7ffac79187 | ||
|
|
03ef5a9c8c | ||
|
|
562cb4a9d5 | ||
|
|
716eeb06a8 | ||
|
|
01a9e635cc | ||
|
|
66c051a9c3 | ||
|
|
2d69b2d587 | ||
|
|
6aa02d75d9 | ||
|
|
38db4521c6 | ||
|
|
acecce5ab8 | ||
|
|
19201da54c | ||
|
|
55f8d8c6bf | ||
|
|
fdcc3f17a4 | ||
|
|
0e896e7fde | ||
|
|
85f315b656 | ||
|
|
397bf9584b | ||
|
|
687dd87727 | ||
|
|
e4cc0c1d0a | ||
|
|
7326f392ef | ||
|
|
ddc81f2788 | ||
|
|
b7c7b84ef2 | ||
|
|
076941f252 | ||
|
|
f1a8a22f54 | ||
|
|
95573d443b | ||
|
|
63517678c8 | ||
|
|
f9eed140be | ||
|
|
816b5cdb3a | ||
|
|
e5c70af047 | ||
|
|
e8eec1f909 | ||
|
|
9ff9e62e8e | ||
|
|
e7e83d5f1e | ||
|
|
1d11bcd979 | ||
|
|
95726bf738 | ||
|
|
93d8337c05 | ||
|
|
6f3cd6b30c | ||
|
|
7758191d5a | ||
|
|
cc09778008 | ||
|
|
e4425d83ff | ||
|
|
6221d6165f | ||
|
|
24c7fe35d2 | ||
|
|
b2f4dff716 | ||
|
|
c3de885179 | ||
|
|
ff4f5337d8 | ||
|
|
23b4496e6b | ||
|
|
a1036efea5 | ||
|
|
193c7f12a8 | ||
|
|
3e349b4366 | ||
|
|
58a6dae99b | ||
|
|
7aaad161e6 | ||
|
|
16a191c56e | ||
|
|
89a03fef74 | ||
|
|
6bb5494726 | ||
|
|
4eeefb49b1 | ||
|
|
ed48774b07 | ||
|
|
acd939e8ee | ||
|
|
0b52b9d6b2 | ||
|
|
7349d64f8e | ||
|
|
05ad02f8e2 | ||
|
|
143cc644ca | ||
|
|
aadd484d62 | ||
|
|
43ae1796b4 | ||
|
|
7176520d44 | ||
|
|
e829c856b7 | ||
|
|
dc93934a4e | ||
|
|
6c86a4176b | ||
|
|
e160532418 | ||
|
|
6d63a86cd9 | ||
|
|
a3843775fe | ||
|
|
9a2c123ddf | ||
|
|
0ab99ed0dd | ||
|
|
a834b58377 | ||
|
|
23326d5f22 | ||
|
|
00fed20ff4 | ||
|
|
9f3c840ea0 | ||
|
|
4003db8f86 | ||
|
|
229cb350b0 | ||
|
|
de474887ea | ||
|
|
802844ae73 | ||
|
|
f63d56502e | ||
|
|
dc66c34326 | ||
|
|
a0899bfbe1 | ||
|
|
583844a4b2 | ||
|
|
0364737d31 | ||
|
|
25bfea613b | ||
|
|
22f15137e8 | ||
|
|
38bfd62bd4 | ||
|
|
f0fb814cd3 | ||
|
|
08cee6f5cd | ||
|
|
8cf3c0c484 | ||
|
|
127d5cb107 | ||
|
|
ccfe697f23 | ||
|
|
a1dc595517 | ||
|
|
80077e5719 | ||
|
|
c7b9f9eed7 | ||
|
|
15964f0f46 | ||
|
|
e85351d15b | ||
|
|
031c033f31 | ||
|
|
90273f3dca | ||
|
|
844d8bf88c | ||
|
|
facbabb203 | ||
|
|
c89e8ba4a9 | ||
|
|
20f3576cd1 | ||
|
|
0edff7e0f2 | ||
|
|
6bbdfe028e | ||
|
|
ee02c64267 | ||
|
|
6081dcaaa0 | ||
|
|
8cb963440d | ||
|
|
451611ff16 | ||
|
|
61a56e325c | ||
|
|
b0e49bb956 | ||
|
|
8b62d546f8 | ||
|
|
6dbb3d0cba | ||
|
|
efdf41167e | ||
|
|
ddb89c3573 | ||
|
|
01f4883cd5 | ||
|
|
9751b8f05b | ||
|
|
aabc4ba0ee | ||
|
|
e79cb9ce4b | ||
|
|
bbcb0729fa | ||
|
|
47c129db49 | ||
|
|
cbd82dbb6b | ||
|
|
ed7bdf7114 | ||
|
|
e46f05b06f | ||
|
|
54a86bb7cf | ||
|
|
59ecf3c456 | ||
|
|
e6f9d19c87 | ||
|
|
1a159cade8 | ||
|
|
1cc972f34e | ||
|
|
e09f6c9337 | ||
|
|
df332ff6e8 | ||
|
|
b76b89eca5 | ||
|
|
c5a871cde4 | ||
|
|
500ed35c8d | ||
|
|
f3cc4aacd8 | ||
|
|
548d49586b | ||
|
|
9792699a12 | ||
|
|
8571ae43a1 | ||
|
|
4ce49e6e4e | ||
|
|
bf3117fd23 | ||
|
|
f89c59f9d1 | ||
|
|
b70e4998a3 | ||
|
|
aae2ae3cfb | ||
|
|
14e6913ab2 | ||
|
|
d13334d5ee | ||
|
|
ccb20347de | ||
|
|
9ef6d5b26c | ||
|
|
2243fd63a0 | ||
|
|
9b3b88e208 | ||
|
|
e1847fca11 | ||
|
|
9352fa23a3 | ||
|
|
a73ddce8e6 | ||
|
|
b1f8775f6b | ||
|
|
c169cd69d2 | ||
|
|
393547b2a2 | ||
|
|
f886e8589e | ||
|
|
894767d0fe | ||
|
|
09370c3f50 | ||
|
|
328358a4e5 | ||
|
|
5e90da94f4 | ||
|
|
973911e9a5 | ||
|
|
2a4b0425da | ||
|
|
b002cc94cc | ||
|
|
1e9126a627 | ||
|
|
609c919ffc | ||
|
|
e6675c789c | ||
|
|
88d2053798 | ||
|
|
94ec379c3b | ||
|
|
3cc4dc2261 | ||
|
|
9c6178906b | ||
|
|
82788f2fe9 | ||
|
|
d59e97da00 | ||
|
|
b5d40609b7 | ||
|
|
c5446c191d | ||
|
|
32678f7d42 | ||
|
|
58487fb0de | ||
|
|
24903860dd | ||
|
|
268c015925 | ||
|
|
c136c188b5 | ||
|
|
845494aa6e | ||
|
|
de6899b66e | ||
|
|
91dd244f34 | ||
|
|
c26cd97cb7 | ||
|
|
a9981fb0ff | ||
|
|
20afdfdcfe | ||
|
|
cdd4075663 | ||
|
|
2586eb08b1 | ||
|
|
d6d5a9a538 | ||
|
|
a7028380c8 | ||
|
|
592542fb28 | ||
|
|
84f6cb4ae4 | ||
|
|
c4b3d62c7f | ||
|
|
f4a0b13d86 | ||
|
|
fd81865b96 | ||
|
|
962f3937b6 | ||
|
|
7298db5b38 | ||
|
|
6141fccd19 | ||
|
|
5761056e3a | ||
|
|
e4bf9f9014 | ||
|
|
23fa88b18b | ||
|
|
2b393f9263 | ||
|
|
da77acb8f2 | ||
|
|
056eca0c2d | ||
|
|
ff3e90f5cd | ||
|
|
108e1bd1e8 | ||
|
|
dd705127be | ||
|
|
c2d1db9c50 | ||
|
|
f48db899d3 | ||
|
|
b55ec5b402 | ||
|
|
ded4b31601 | ||
|
|
ed4e3dbacd | ||
|
|
4e707bc1fa | ||
|
|
d93500168c | ||
|
|
7add1580b2 | ||
|
|
c4dfa5759c | ||
|
|
926a815f67 | ||
|
|
d46a5ae71e | ||
|
|
6f3ace5653 | ||
|
|
2174f4b4ea | ||
|
|
7b67581a2f | ||
|
|
00f7c45a4c | ||
|
|
227e159de1 | ||
|
|
9d590fc13b | ||
|
|
f2cb3d0f6c | ||
|
|
8cd93192a4 | ||
|
|
0c9807d8b3 | ||
|
|
536d1b6de5 | ||
|
|
4583bb037c | ||
|
|
cb6a08c044 | ||
|
|
73d605bdc6 | ||
|
|
912ae51344 | ||
|
|
74de3ef2a9 | ||
|
|
793d08a74b | ||
|
|
cd1d3e0189 | ||
|
|
3a650aa641 | ||
|
|
bf788eee88 | ||
|
|
92ff652416 | ||
|
|
c2dc88fe56 | ||
|
|
fc8078a09a | ||
|
|
759cbcba6d | ||
|
|
6b74b1ba27 | ||
|
|
da1c0fea12 | ||
|
|
171e90cbf5 | ||
|
|
75240a5872 | ||
|
|
44f32cbabc | ||
|
|
94f41162f4 | ||
|
|
20be766ed9 | ||
|
|
f8ecff4877 | ||
|
|
808356abec | ||
|
|
ec0b85ab5f | ||
|
|
4dff991d7b | ||
|
|
0e847cfb15 | ||
|
|
d9a7fc63f8 | ||
|
|
f7f9a73a1e | ||
|
|
cef269f896 | ||
|
|
9f7de59006 | ||
|
|
6a7542fed0 | ||
|
|
f1c8fa62d3 | ||
|
|
d561554fdf | ||
|
|
c96cfed51d | ||
|
|
f32703f81d | ||
|
|
0ced2aa756 | ||
|
|
ea6e678c95 | ||
|
|
271403bccc | ||
|
|
e1cd6c7813 | ||
|
|
ad0426940b | ||
|
|
f78d4194f1 | ||
|
|
ef65147a06 | ||
|
|
2b3bdce27e | ||
|
|
b300e880c4 | ||
|
|
bc7c0bae73 | ||
|
|
3a0e2b45a7 | ||
|
|
3623ea697d | ||
|
|
07f34a2cf6 | ||
|
|
b935900e1c | ||
|
|
5e04e45271 | ||
|
|
f79ea82331 | ||
|
|
ff6a9382f5 | ||
|
|
9248bd08cf | ||
|
|
671dab6154 | ||
|
|
71a6aae38d | ||
|
|
20d00ebaf7 | ||
|
|
37de147bea | ||
|
|
6efa50333f | ||
|
|
3c57e012b9 | ||
|
|
648f3f6a8f | ||
|
|
9a7046d649 | ||
|
|
bb7c412e25 | ||
|
|
567fdbf4b5 | ||
|
|
7d6c3adef3 | ||
|
|
3c1023c1b9 | ||
|
|
9554fba495 | ||
|
|
f8eb9abe03 | ||
|
|
49ef89b02d | ||
|
|
0a08534703 | ||
|
|
bf920d9492 | ||
|
|
24e5c1a040 | ||
|
|
bb350989c7 | ||
|
|
5211317613 | ||
|
|
704e6b93aa | ||
|
|
e9fd4b9fc4 | ||
|
|
efeb10b5ca | ||
|
|
0c182e7585 | ||
|
|
551354e0d3 | ||
|
|
f0028333d8 | ||
|
|
790d9a9fda | ||
|
|
8a20dfe546 | ||
|
|
66bd0d57ee | ||
|
|
32f026ab74 | ||
|
|
9489ab7b8b | ||
|
|
90341dbccd | ||
|
|
52c3e7dcf1 | ||
|
|
cb7e311dc6 | ||
|
|
4dc0e9e2df | ||
|
|
48aa0ef109 | ||
|
|
757afdc5d4 | ||
|
|
e506cb23cf | ||
|
|
9c213825ae | ||
|
|
f9c7b4f5b0 | ||
|
|
7d799fe4e7 | ||
|
|
5e8b87038b | ||
|
|
eac2c999f2 | ||
|
|
c3bbf5bd28 | ||
|
|
55c8adf6c6 | ||
|
|
2cb686567b | ||
|
|
adcfbd3d19 | ||
|
|
9d2c5ec20d | ||
|
|
db92c1bb5f | ||
|
|
40db0bde4c | ||
|
|
456735f772 | ||
|
|
02ea80a6f0 | ||
|
|
97fa97d64a | ||
|
|
91ad122390 | ||
|
|
b7573f6d5e | ||
|
|
53866eb2af | ||
|
|
9175a8d217 | ||
|
|
84aad735a1 | ||
|
|
a93833d88f | ||
|
|
c38902db6b | ||
|
|
24c7e25910 | ||
|
|
13937b2a4a | ||
|
|
d26ecc330c | ||
|
|
a575f5c090 | ||
|
|
de808a5e92 | ||
|
|
6be8aeb216 | ||
|
|
afede39e0c | ||
|
|
48d6fef3ea | ||
|
|
9b97129e8c | ||
|
|
eb10d4f437 | ||
|
|
fc8f959e6b | ||
|
|
b6003a87e4 | ||
|
|
9b6aa5304c | ||
|
|
de786bbcc1 | ||
|
|
85d98fa322 | ||
|
|
c6812bebdd | ||
|
|
00ffb8f1b9 | ||
|
|
d684356d9d | ||
|
|
da18f64548 | ||
|
|
4fa8b8fd54 | ||
|
|
4fcc43dce7 | ||
|
|
78cb6a1e6c | ||
|
|
da5e349088 | ||
|
|
82d44a79de | ||
|
|
33cd383a96 | ||
|
|
5adbf765a2 | ||
|
|
cf73d51d77 | ||
|
|
b3054c8168 | ||
|
|
040f1053aa | ||
|
|
b24dff5fef | ||
|
|
87b5f1bd82 | ||
|
|
0102000658 | ||
|
|
8f31f0d343 | ||
|
|
4b289d6ab5 | ||
|
|
80dd63d0d7 | ||
|
|
3888c76ac3 |
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -23,19 +23,24 @@
|
|||||||
# questions.
|
# questions.
|
||||||
#
|
#
|
||||||
|
|
||||||
include GensrcCommonJdk.gmk
|
name: 'Config'
|
||||||
include GensrcProperties.gmk
|
description: 'Read JDK Configuration Variables'
|
||||||
include Modules.gmk
|
inputs:
|
||||||
|
var:
|
||||||
|
description: 'The name of the variable to read'
|
||||||
|
required: true
|
||||||
|
outputs:
|
||||||
|
value:
|
||||||
|
description: 'The value of the configuration variable'
|
||||||
|
value: ${{ steps.read-config.outputs.value }}
|
||||||
|
|
||||||
################################################################################
|
runs:
|
||||||
|
using: composite
|
||||||
# Use wildcard so as to avoid getting non-existing directories back
|
steps:
|
||||||
SIMPLESERVER_RESOURCES_DIRS := $(wildcard $(addsuffix /sun/net/httpserver/simpleserver/resources, \
|
- name: 'Read configuration variable from repo'
|
||||||
$(call FindModuleSrcDirs, jdk.httpserver)))
|
id: read-config
|
||||||
|
run: |
|
||||||
$(eval $(call SetupCompileProperties, SIMPLESERVER_PROPERTIES, \
|
# Extract value from configuration file
|
||||||
SRC_DIRS := $(SIMPLESERVER_RESOURCES_DIRS), \
|
value="$(grep -h ${{ inputs.var }}= make/conf/github-actions.conf | cut -d '=' -f 2-)"
|
||||||
CLASS := ListResourceBundle, \
|
echo "value=$value" >> $GITHUB_OUTPUT
|
||||||
))
|
shell: bash
|
||||||
|
|
||||||
TARGETS += $(SIMPLESERVER_PROPERTIES)
|
|
||||||
80
.github/actions/do-build/action.yml
vendored
Normal file
80
.github/actions/do-build/action.yml
vendored
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2022, 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
name: 'Do build'
|
||||||
|
description: 'Build the JDK using make'
|
||||||
|
inputs:
|
||||||
|
make-target:
|
||||||
|
description: 'Make target(s)'
|
||||||
|
required: true
|
||||||
|
platform:
|
||||||
|
description: 'Platform name'
|
||||||
|
required: true
|
||||||
|
debug-suffix:
|
||||||
|
description: 'File name suffix denoting debug level, possibly empty'
|
||||||
|
required: false
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: 'Build'
|
||||||
|
id: build
|
||||||
|
run: >
|
||||||
|
make LOG=info ${{ inputs.make-target }}
|
||||||
|
|| bash ./.github/scripts/gen-build-failure-report.sh "$GITHUB_STEP_SUMMARY"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: 'Check for failure'
|
||||||
|
id: check
|
||||||
|
run: |
|
||||||
|
# Check for failure marker file
|
||||||
|
build_dir="$(ls -d build/*)"
|
||||||
|
if [[ -e $build_dir/build-failure ]]; then
|
||||||
|
# Collect relevant log files
|
||||||
|
mkdir failure-logs
|
||||||
|
cp \
|
||||||
|
$build_dir/spec.gmk \
|
||||||
|
$build_dir/build.log \
|
||||||
|
$build_dir/configure.log \
|
||||||
|
$build_dir/make-support/failure-summary.log \
|
||||||
|
$build_dir/make-support/failure-logs/* \
|
||||||
|
failure-logs/ 2> /dev/null || true
|
||||||
|
echo 'failure=true' >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: 'Upload build logs'
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: failure-logs-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||||
|
path: failure-logs
|
||||||
|
if: steps.check.outputs.failure == 'true'
|
||||||
|
|
||||||
|
# This is the best way I found to abort the job with an error message
|
||||||
|
- name: 'Notify about build failures'
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
with:
|
||||||
|
script: core.setFailed('Build failed. See summary for details.')
|
||||||
|
if: steps.check.outputs.failure == 'true'
|
||||||
109
.github/actions/get-bootjdk/action.yml
vendored
Normal file
109
.github/actions/get-bootjdk/action.yml
vendored
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2022, 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
name: 'Get BootJDK'
|
||||||
|
description: 'Download the BootJDK from cache or source location'
|
||||||
|
inputs:
|
||||||
|
platform:
|
||||||
|
description: 'Platform'
|
||||||
|
required: true
|
||||||
|
outputs:
|
||||||
|
path:
|
||||||
|
description: 'Path to the installed BootJDK'
|
||||||
|
value: ${{ steps.path-name.outputs.path }}
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: 'Determine platform prefix'
|
||||||
|
id: platform-prefix
|
||||||
|
run: |
|
||||||
|
# Convert platform name to upper case
|
||||||
|
platform_prefix="$(echo ${{ inputs.platform }} | tr [a-z-] [A-Z_])"
|
||||||
|
echo "value=$platform_prefix" >> $GITHUB_OUTPUT
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: 'Get URL configuration'
|
||||||
|
id: url
|
||||||
|
uses: ./.github/actions/config
|
||||||
|
with:
|
||||||
|
var: ${{ steps.platform-prefix.outputs.value}}_BOOT_JDK_URL
|
||||||
|
|
||||||
|
- name: 'Get SHA256 configuration'
|
||||||
|
id: sha256
|
||||||
|
uses: ./.github/actions/config
|
||||||
|
with:
|
||||||
|
var: ${{ steps.platform-prefix.outputs.value}}_BOOT_JDK_SHA256
|
||||||
|
|
||||||
|
- name: 'Get file extension configuration'
|
||||||
|
id: ext
|
||||||
|
uses: ./.github/actions/config
|
||||||
|
with:
|
||||||
|
var: ${{ steps.platform-prefix.outputs.value}}_BOOT_JDK_EXT
|
||||||
|
|
||||||
|
- name: 'Check cache for BootJDK'
|
||||||
|
id: get-cached-bootjdk
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: bootjdk/jdk
|
||||||
|
key: boot-jdk-${{ inputs.platform }}-${{ steps.sha256.outputs.value }}
|
||||||
|
|
||||||
|
# macOS is missing sha256sum
|
||||||
|
- name: 'Install sha256sum'
|
||||||
|
run: |
|
||||||
|
# Run Homebrew installation
|
||||||
|
brew install coreutils
|
||||||
|
shell: bash
|
||||||
|
if: steps.get-cached-bootjdk.outputs.cache-hit != 'true' && runner.os == 'macOS'
|
||||||
|
|
||||||
|
- name: 'Download BootJDK'
|
||||||
|
run: |
|
||||||
|
# Download BootJDK and verify checksum
|
||||||
|
mkdir -p bootjdk/jdk
|
||||||
|
mkdir -p bootjdk/unpacked
|
||||||
|
wget --progress=dot:mega -O bootjdk/jdk.${{ steps.ext.outputs.value }} '${{ steps.url.outputs.value }}'
|
||||||
|
echo '${{ steps.sha256.outputs.value }} bootjdk/jdk.${{ steps.ext.outputs.value }}' | sha256sum -c >/dev/null -
|
||||||
|
shell: bash
|
||||||
|
if: steps.get-cached-bootjdk.outputs.cache-hit != 'true'
|
||||||
|
|
||||||
|
- name: 'Unpack BootJDK'
|
||||||
|
run: |
|
||||||
|
# Unpack the BootJDK and move files to a common location
|
||||||
|
if [[ '${{ steps.ext.outputs.value }}' == 'tar.gz' ]]; then
|
||||||
|
tar -xf bootjdk/jdk.${{ steps.ext.outputs.value }} -C bootjdk/unpacked
|
||||||
|
else
|
||||||
|
unzip -q bootjdk/jdk.${{ steps.ext.outputs.value }} -d bootjdk/unpacked
|
||||||
|
fi
|
||||||
|
jdk_root="$(dirname $(find bootjdk/unpacked -name bin -type d))"
|
||||||
|
mv "$jdk_root"/* bootjdk/jdk/
|
||||||
|
shell: bash
|
||||||
|
if: steps.get-cached-bootjdk.outputs.cache-hit != 'true'
|
||||||
|
|
||||||
|
- name: 'Export path to where BootJDK is installed'
|
||||||
|
id: path-name
|
||||||
|
run: |
|
||||||
|
# Export the path
|
||||||
|
echo 'path=bootjdk/jdk' >> $GITHUB_OUTPUT
|
||||||
|
shell: bash
|
||||||
109
.github/actions/get-bundles/action.yml
vendored
Normal file
109
.github/actions/get-bundles/action.yml
vendored
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2022, 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
name: 'Get bundles'
|
||||||
|
description: 'Download resulting JDK bundles'
|
||||||
|
inputs:
|
||||||
|
platform:
|
||||||
|
description: 'Platform name'
|
||||||
|
required: true
|
||||||
|
debug-suffix:
|
||||||
|
description: 'File name suffix denoting debug level, possibly empty'
|
||||||
|
required: false
|
||||||
|
outputs:
|
||||||
|
jdk-path:
|
||||||
|
description: 'Path to the installed JDK bundle'
|
||||||
|
value: ${{ steps.path-name.outputs.jdk }}
|
||||||
|
symbols-path:
|
||||||
|
description: 'Path to the installed symbols bundle'
|
||||||
|
value: ${{ steps.path-name.outputs.symbols }}
|
||||||
|
tests-path:
|
||||||
|
description: 'Path to the installed tests bundle'
|
||||||
|
value: ${{ steps.path-name.outputs.tests }}
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: 'Download bundles artifact'
|
||||||
|
id: download-bundles
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||||
|
path: bundles
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: 'Download bundles artifact (retry)'
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||||
|
path: bundles
|
||||||
|
if: steps.download-bundles.outcome == 'failure'
|
||||||
|
|
||||||
|
- name: 'Unpack bundles'
|
||||||
|
run: |
|
||||||
|
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip ]]; then
|
||||||
|
echo 'Unpacking jdk bundle...'
|
||||||
|
mkdir -p bundles/jdk
|
||||||
|
unzip -q bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip -d bundles/jdk
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
|
||||||
|
echo 'Unpacking jdk bundle...'
|
||||||
|
mkdir -p bundles/jdk
|
||||||
|
tar -xf bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/jdk
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -e bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
|
||||||
|
echo 'Unpacking symbols bundle...'
|
||||||
|
mkdir -p bundles/symbols
|
||||||
|
tar -xf bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/symbols
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -e bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
|
||||||
|
echo 'Unpacking tests bundle...'
|
||||||
|
mkdir -p bundles/tests
|
||||||
|
tar -xf bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/tests
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: 'Export paths to where bundles are installed'
|
||||||
|
id: path-name
|
||||||
|
run: |
|
||||||
|
# Export the paths
|
||||||
|
|
||||||
|
jdk_dir="$GITHUB_WORKSPACE/$(dirname $(find bundles/jdk -name bin -type d))"
|
||||||
|
symbols_dir="$GITHUB_WORKSPACE/$(dirname $(find bundles/symbols -name bin -type d))"
|
||||||
|
tests_dir="$GITHUB_WORKSPACE/bundles/tests"
|
||||||
|
|
||||||
|
if [[ '${{ runner.os }}' == 'Windows' ]]; then
|
||||||
|
jdk_dir="$(cygpath $jdk_dir)"
|
||||||
|
symbols_dir="$(cygpath $symbols_dir)"
|
||||||
|
tests_dir="$(cygpath $tests_dir)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "jdk=$jdk_dir" >> $GITHUB_OUTPUT
|
||||||
|
echo "symbols=$symbols_dir" >> $GITHUB_OUTPUT
|
||||||
|
echo "tests=$tests_dir" >> $GITHUB_OUTPUT
|
||||||
|
shell: bash
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -22,15 +22,33 @@
|
|||||||
# or visit www.oracle.com if you need additional information or have any
|
# or visit www.oracle.com if you need additional information or have any
|
||||||
# questions.
|
# questions.
|
||||||
#
|
#
|
||||||
# ##########################################################
|
|
||||||
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
|
|
||||||
# ##########################################################
|
|
||||||
#
|
|
||||||
class name java/awt/datatransfer/Clipboard
|
|
||||||
header extends java/lang/Object flags 21
|
|
||||||
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
|
|
||||||
|
|
||||||
class name java/awt/datatransfer/DataFlavor
|
name: 'Get GTest'
|
||||||
header extends java/lang/Object implements java/io/Externalizable,java/lang/Cloneable flags 21
|
description: 'Download GTest source'
|
||||||
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
|
outputs:
|
||||||
|
path:
|
||||||
|
description: 'Path to the installed GTest'
|
||||||
|
value: ${{ steps.path-name.outputs.path }}
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: 'Get GTest version configuration'
|
||||||
|
id: version
|
||||||
|
uses: ./.github/actions/config
|
||||||
|
with:
|
||||||
|
var: GTEST_VERSION
|
||||||
|
|
||||||
|
- name: 'Checkout GTest source'
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: google/googletest
|
||||||
|
ref: 'release-${{ steps.version.outputs.value }}'
|
||||||
|
path: gtest
|
||||||
|
|
||||||
|
- name: 'Export path to where GTest is installed'
|
||||||
|
id: path-name
|
||||||
|
run: |
|
||||||
|
# Export the path
|
||||||
|
echo 'path=gtest' >> $GITHUB_OUTPUT
|
||||||
|
shell: bash
|
||||||
72
.github/actions/get-jtreg/action.yml
vendored
Normal file
72
.github/actions/get-jtreg/action.yml
vendored
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2022, 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
name: 'Get JTReg'
|
||||||
|
description: 'Download JTReg from cache or source location'
|
||||||
|
outputs:
|
||||||
|
path:
|
||||||
|
description: 'Path to the installed JTReg'
|
||||||
|
value: ${{ steps.path-name.outputs.path }}
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: 'Get JTReg version configuration'
|
||||||
|
id: version
|
||||||
|
uses: ./.github/actions/config
|
||||||
|
with:
|
||||||
|
var: JTREG_VERSION
|
||||||
|
|
||||||
|
- name: 'Check cache for JTReg'
|
||||||
|
id: get-cached-jtreg
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: jtreg/installed
|
||||||
|
key: jtreg-${{ steps.version.outputs.value }}
|
||||||
|
|
||||||
|
- name: 'Checkout the JTReg source'
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: openjdk/jtreg
|
||||||
|
ref: jtreg-${{ steps.version.outputs.value }}
|
||||||
|
path: jtreg/src
|
||||||
|
if: steps.get-cached-jtreg.outputs.cache-hit != 'true'
|
||||||
|
|
||||||
|
- name: 'Build JTReg'
|
||||||
|
run: |
|
||||||
|
# Build JTReg and move files to the proper locations
|
||||||
|
bash make/build.sh --jdk "$JAVA_HOME_11_X64"
|
||||||
|
mkdir ../installed
|
||||||
|
mv build/images/jtreg/* ../installed
|
||||||
|
working-directory: jtreg/src
|
||||||
|
shell: bash
|
||||||
|
if: steps.get-cached-jtreg.outputs.cache-hit != 'true'
|
||||||
|
|
||||||
|
- name: 'Export path to where JTReg is installed'
|
||||||
|
id: path-name
|
||||||
|
run: |
|
||||||
|
# Export the path
|
||||||
|
echo 'path=jtreg/installed' >> $GITHUB_OUTPUT
|
||||||
|
shell: bash
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -22,10 +22,23 @@
|
|||||||
# or visit www.oracle.com if you need additional information or have any
|
# or visit www.oracle.com if you need additional information or have any
|
||||||
# questions.
|
# questions.
|
||||||
#
|
#
|
||||||
# ##########################################################
|
|
||||||
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
|
|
||||||
# ##########################################################
|
|
||||||
#
|
|
||||||
class name java/lang/instrument/UnmodifiableModuleException
|
|
||||||
header extends java/lang/RuntimeException flags 21
|
|
||||||
|
|
||||||
|
name: 'Get MSYS2'
|
||||||
|
description: 'Download MSYS2 and prepare a Windows host'
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: 'Install MSYS2'
|
||||||
|
uses: msys2/setup-msys2@v2
|
||||||
|
with:
|
||||||
|
install: 'autoconf tar unzip zip make'
|
||||||
|
path-type: minimal
|
||||||
|
location: msys2
|
||||||
|
|
||||||
|
# We can't run bash until this is completed, so stick with pwsh
|
||||||
|
- name: 'Set MSYS2 path'
|
||||||
|
run: |
|
||||||
|
# Prepend msys2/msys64/usr/bin to the PATH
|
||||||
|
echo "$env:GITHUB_WORKSPACE/msys2/msys64/usr/bin" >> $env:GITHUB_PATH
|
||||||
|
shell: pwsh
|
||||||
77
.github/actions/upload-bundles/action.yml
vendored
Normal file
77
.github/actions/upload-bundles/action.yml
vendored
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2022, 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
name: 'Upload bundles'
|
||||||
|
description: 'Upload resulting JDK bundles'
|
||||||
|
inputs:
|
||||||
|
platform:
|
||||||
|
description: 'Platform name'
|
||||||
|
required: true
|
||||||
|
debug-suffix:
|
||||||
|
description: 'File name suffix denoting debug level, possibly empty'
|
||||||
|
required: false
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: 'Determine bundle names'
|
||||||
|
id: bundles
|
||||||
|
run: |
|
||||||
|
# Rename bundles to consistent names
|
||||||
|
jdk_bundle_zip="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.zip 2> /dev/null || true)"
|
||||||
|
jdk_bundle_tar_gz="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||||
|
symbols_bundle="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}-symbols.tar.gz 2> /dev/null || true)"
|
||||||
|
tests_bundle="$(ls build/*/bundles/jdk-*_bin-tests${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||||
|
|
||||||
|
mkdir bundles
|
||||||
|
|
||||||
|
if [[ "$jdk_bundle_zip" != "" ]]; then
|
||||||
|
mv "$jdk_bundle_zip" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip"
|
||||||
|
fi
|
||||||
|
if [[ "$jdk_bundle_tar_gz" != "" ]]; then
|
||||||
|
mv "$jdk_bundle_tar_gz" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||||
|
fi
|
||||||
|
if [[ "$symbols_bundle" != "" ]]; then
|
||||||
|
mv "$symbols_bundle" "bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||||
|
fi
|
||||||
|
if [[ "$tests_bundle" != "" ]]; then
|
||||||
|
mv "$tests_bundle" "bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$symbols_bundle$tests_bundle" != "" ]]; then
|
||||||
|
echo 'bundles-found=true' >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo 'bundles-found=false' >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: 'Upload bundles artifact'
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||||
|
path: bundles
|
||||||
|
retention-days: 1
|
||||||
|
if: steps.bundles.outputs.bundles-found == 'true'
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -22,16 +23,29 @@
|
|||||||
# or visit www.oracle.com if you need additional information or have any
|
# or visit www.oracle.com if you need additional information or have any
|
||||||
# questions.
|
# questions.
|
||||||
#
|
#
|
||||||
# ##########################################################
|
|
||||||
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
|
|
||||||
# ##########################################################
|
|
||||||
#
|
|
||||||
class name jdk/javadoc/doclet/Reporter
|
|
||||||
header extends java/lang/Object flags 601
|
|
||||||
innerclass innerClass javax/tools/Diagnostic$Kind outerClass javax/tools/Diagnostic innerClassName Kind flags 4019
|
|
||||||
method name print descriptor (Ljavax/tools/Diagnostic$Kind;Lcom/sun/source/util/DocTreePath;IIILjava/lang/String;)V flags 1
|
|
||||||
|
|
||||||
class name jdk/javadoc/doclet/StandardDoclet
|
GITHUB_STEP_SUMMARY="$1"
|
||||||
header extends java/lang/Object implements jdk/javadoc/doclet/Doclet flags 21
|
BUILD_DIR="$(ls -d build/*)"
|
||||||
innerclass innerClass jdk/javadoc/doclet/Doclet$Option outerClass jdk/javadoc/doclet/Doclet innerClassName Option flags 609
|
|
||||||
|
|
||||||
|
# Send signal to the do-build action that we failed
|
||||||
|
touch "$BUILD_DIR/build-failure"
|
||||||
|
|
||||||
|
(
|
||||||
|
echo '### :boom: Build failure summary'
|
||||||
|
echo ''
|
||||||
|
echo 'The build failed. Here follows the failure summary from the build.'
|
||||||
|
echo '<details><summary><b>View build failure summary</b></summary>'
|
||||||
|
echo ''
|
||||||
|
echo '```'
|
||||||
|
if [[ -f "$BUILD_DIR/make-support/failure-summary.log" ]]; then
|
||||||
|
cat "$BUILD_DIR/make-support/failure-summary.log"
|
||||||
|
else
|
||||||
|
echo "Failure summary ($BUILD_DIR/make-support/failure-summary.log) not found"
|
||||||
|
fi
|
||||||
|
echo '```'
|
||||||
|
echo '</details>'
|
||||||
|
echo ''
|
||||||
|
|
||||||
|
echo ''
|
||||||
|
echo ':arrow_right: To see the entire test log, click the job in the list to the left. To download logs, see the `failure-logs` [artifact above](#artifacts).'
|
||||||
|
) >> $GITHUB_STEP_SUMMARY
|
||||||
92
.github/scripts/gen-test-results.sh
vendored
Normal file
92
.github/scripts/gen-test-results.sh
vendored
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Copyright (c) 2022, 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
GITHUB_STEP_SUMMARY="$1"
|
||||||
|
|
||||||
|
test_suite_name=$(cat build/run-test-prebuilt/test-support/test-last-ids.txt)
|
||||||
|
results_dir=build/run-test-prebuilt/test-results/$test_suite_name/text
|
||||||
|
report_dir=build/run-test-prebuilt/test-support/$test_suite_name
|
||||||
|
|
||||||
|
failures=$(sed -E -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/newfailures.txt 2> /dev/null || true)
|
||||||
|
errors=$(sed -E -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/other_errors.txt 2> /dev/null || true)
|
||||||
|
|
||||||
|
if [[ "$failures" = "" && "$errors" = "" ]]; then
|
||||||
|
# If we have nothing to report, exit this step now
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "### Test output for failed tests" >> $GITHUB_STEP_SUMMARY
|
||||||
|
for test in $failures $errors; do
|
||||||
|
anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
|
||||||
|
base_path="$(echo "$test" | tr '#' '_')"
|
||||||
|
report_file="$report_dir/$base_path.jtr"
|
||||||
|
hs_err_files=$(ls $report_dir/$base_path/hs_err*.log 2> /dev/null || true)
|
||||||
|
echo "#### <a id="$anchor">$test"
|
||||||
|
|
||||||
|
echo '<details><summary>View test results</summary>'
|
||||||
|
echo ''
|
||||||
|
echo '```'
|
||||||
|
if [[ -f "$report_file" ]]; then
|
||||||
|
cat "$report_file"
|
||||||
|
else
|
||||||
|
echo "Error: Result file $report_file not found"
|
||||||
|
fi
|
||||||
|
echo '```'
|
||||||
|
echo '</details>'
|
||||||
|
echo ''
|
||||||
|
|
||||||
|
if [[ "$hs_err_files" != "" ]]; then
|
||||||
|
echo '<details><summary>View HotSpot error log</summary>'
|
||||||
|
echo ''
|
||||||
|
for hs_err in $hs_err_files; do
|
||||||
|
echo '```'
|
||||||
|
echo "$hs_err:"
|
||||||
|
echo ''
|
||||||
|
cat "$hs_err"
|
||||||
|
echo '```'
|
||||||
|
done
|
||||||
|
|
||||||
|
echo '</details>'
|
||||||
|
echo ''
|
||||||
|
fi
|
||||||
|
|
||||||
|
done >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
|
# With many failures, the summary can easily exceed 1024 kB, the limit set by Github
|
||||||
|
# Trim it down if so.
|
||||||
|
summary_size=$(wc -c < $GITHUB_STEP_SUMMARY)
|
||||||
|
if [[ $summary_size -gt 1000000 ]]; then
|
||||||
|
# Trim to below 1024 kB, and cut off after the last detail group
|
||||||
|
head -c 1000000 $GITHUB_STEP_SUMMARY | tac | sed -n -e '/<\/details>/,$ p' | tac > $GITHUB_STEP_SUMMARY.tmp
|
||||||
|
mv $GITHUB_STEP_SUMMARY.tmp $GITHUB_STEP_SUMMARY
|
||||||
|
(
|
||||||
|
echo ''
|
||||||
|
echo ':x: **WARNING: Summary is too large and has been truncated.**'
|
||||||
|
echo ''
|
||||||
|
) >> $GITHUB_STEP_SUMMARY
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ':arrow_right: To see the entire test log, click the job in the list to the left.' >> $GITHUB_STEP_SUMMARY
|
||||||
70
.github/scripts/gen-test-summary.sh
vendored
Normal file
70
.github/scripts/gen-test-summary.sh
vendored
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Copyright (c) 2022, 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
GITHUB_STEP_SUMMARY="$1"
|
||||||
|
GITHUB_OUTPUT="$2"
|
||||||
|
|
||||||
|
test_suite_name=$(cat build/run-test-prebuilt/test-support/test-last-ids.txt)
|
||||||
|
results_dir=build/run-test-prebuilt/test-results/$test_suite_name/text
|
||||||
|
|
||||||
|
if [[ ! -f build/run-test-prebuilt/make-support/exit-with-error ]]; then
|
||||||
|
# There were no failures, exit now
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
failures=$(sed -E -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/newfailures.txt 2> /dev/null || true)
|
||||||
|
errors=$(sed -E -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/other_errors.txt 2> /dev/null || true)
|
||||||
|
failure_count=$(echo $failures | wc -w || true)
|
||||||
|
error_count=$(echo $errors | wc -w || true)
|
||||||
|
|
||||||
|
if [[ "$failures" = "" && "$errors" = "" ]]; then
|
||||||
|
# We know something went wrong, but not what
|
||||||
|
echo 'error-message=Unspecified test suite failure. Please see log for job for details.' >> $GITHUB_OUTPUT
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo 'failure=true' >> $GITHUB_OUTPUT
|
||||||
|
echo "error-message=Test run reported $failure_count test failure(s) and $error_count error(s). See summary for details." >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
echo '### :boom: Test failures summary' >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
|
if [[ "$failures" != "" ]]; then
|
||||||
|
echo '' >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo 'These tests reported failure:' >> $GITHUB_STEP_SUMMARY
|
||||||
|
for test in $failures; do
|
||||||
|
anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
|
||||||
|
echo "* [$test](#user-content-$anchor)"
|
||||||
|
done >> $GITHUB_STEP_SUMMARY
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$errors" != "" ]]; then
|
||||||
|
echo '' >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo 'These tests reported errors:' >> $GITHUB_STEP_SUMMARY
|
||||||
|
for test in $errors; do
|
||||||
|
anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
|
||||||
|
echo "* [$test](#user-content-$anchor)"
|
||||||
|
done >> $GITHUB_STEP_SUMMARY
|
||||||
|
fi
|
||||||
154
.github/workflows/build-cross-compile.yml
vendored
Normal file
154
.github/workflows/build-cross-compile.yml
vendored
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2022, 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
name: 'Build (cross-compile)'
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
gcc-major-version:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: '10'
|
||||||
|
apt-gcc-version:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: '10.3.0-1ubuntu1~20.04'
|
||||||
|
apt-gcc-cross-suffix:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: 'cross1'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-cross-compile:
|
||||||
|
name: build
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
target-cpu:
|
||||||
|
- aarch64
|
||||||
|
- arm
|
||||||
|
- s390x
|
||||||
|
- ppc64le
|
||||||
|
include:
|
||||||
|
- target-cpu: aarch64
|
||||||
|
debian-arch: arm64
|
||||||
|
gnu-arch: aarch64
|
||||||
|
- target-cpu: arm
|
||||||
|
debian-arch: armhf
|
||||||
|
gnu-arch: arm
|
||||||
|
gnu-abi: eabihf
|
||||||
|
- target-cpu: s390x
|
||||||
|
debian-arch: s390x
|
||||||
|
gnu-arch: s390x
|
||||||
|
- target-cpu: ppc64le
|
||||||
|
debian-arch: ppc64el
|
||||||
|
gnu-arch: powerpc64le
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout the JDK source'
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: 'Get the BootJDK'
|
||||||
|
id: bootjdk
|
||||||
|
uses: ./.github/actions/get-bootjdk
|
||||||
|
with:
|
||||||
|
platform: linux-x64
|
||||||
|
|
||||||
|
# Use linux-x64 JDK bundle as build JDK
|
||||||
|
- name: 'Get build JDK'
|
||||||
|
id: buildjdk
|
||||||
|
uses: ./.github/actions/get-bundles
|
||||||
|
with:
|
||||||
|
platform: linux-x64
|
||||||
|
|
||||||
|
# Upgrading apt to solve libc6 installation bugs, see JDK-8260460.
|
||||||
|
- name: 'Install toolchain and dependencies'
|
||||||
|
run: |
|
||||||
|
# Install dependencies using apt-get
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install --only-upgrade apt
|
||||||
|
sudo apt-get install \
|
||||||
|
gcc-${{ inputs.gcc-major-version }}=${{ inputs.apt-gcc-version }} \
|
||||||
|
g++-${{ inputs.gcc-major-version }}=${{ inputs.apt-gcc-version }} \
|
||||||
|
gcc-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-version }}${{ inputs.apt-gcc-cross-suffix }} \
|
||||||
|
g++-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-version }}${{ inputs.apt-gcc-cross-suffix }} \
|
||||||
|
libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
|
||||||
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.gcc-major-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.gcc-major-version }}
|
||||||
|
|
||||||
|
- name: 'Check cache for sysroot'
|
||||||
|
id: get-cached-sysroot
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: sysroot
|
||||||
|
key: sysroot-${{ matrix.debian-arch }}-${{ hashFiles('./.github/workflows/build-cross-compile.yml') }}
|
||||||
|
|
||||||
|
- name: 'Install sysroot dependencies'
|
||||||
|
run: sudo apt-get install debootstrap qemu-user-static
|
||||||
|
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||||
|
|
||||||
|
- name: 'Create sysroot'
|
||||||
|
run: >
|
||||||
|
sudo qemu-debootstrap
|
||||||
|
--arch=${{ matrix.debian-arch }}
|
||||||
|
--verbose
|
||||||
|
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev
|
||||||
|
--resolve-deps
|
||||||
|
buster
|
||||||
|
sysroot
|
||||||
|
https://httpredir.debian.org/debian/
|
||||||
|
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||||
|
|
||||||
|
- name: 'Prepare sysroot'
|
||||||
|
run: |
|
||||||
|
# Prepare sysroot and remove unused files to minimize cache
|
||||||
|
sudo chroot sysroot symlinks -cr .
|
||||||
|
sudo chown ${USER} -R sysroot
|
||||||
|
rm -rf sysroot/{dev,proc,run,sys}
|
||||||
|
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||||
|
|
||||||
|
- name: 'Configure'
|
||||||
|
run: >
|
||||||
|
bash configure
|
||||||
|
--with-conf-name=linux-${{ matrix.target-cpu }}
|
||||||
|
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
|
||||||
|
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||||
|
--with-zlib=system
|
||||||
|
--enable-debug
|
||||||
|
--disable-precompiled-headers
|
||||||
|
--openjdk-target=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}
|
||||||
|
--with-sysroot=sysroot
|
||||||
|
--with-build-jdk=${{ steps.buildjdk.outputs.jdk-path }}
|
||||||
|
CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-gcc-10
|
||||||
|
CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-g++-10
|
||||||
|
|
||||||
|
- name: 'Build'
|
||||||
|
id: build
|
||||||
|
uses: ./.github/actions/do-build
|
||||||
|
with:
|
||||||
|
make-target: 'hotspot'
|
||||||
|
platform: linux-${{ matrix.target-cpu }}
|
||||||
132
.github/workflows/build-linux.yml
vendored
Normal file
132
.github/workflows/build-linux.yml
vendored
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2022, 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
name: 'Build (linux)'
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
platform:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
extra-conf-options:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
make-target:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: 'product-bundles test-bundles'
|
||||||
|
debug-levels:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: '[ "debug", "release" ]'
|
||||||
|
apt-gcc-version:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
apt-architecture:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
apt-extra-packages:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-linux:
|
||||||
|
name: build
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
debug-level: ${{ fromJSON(inputs.debug-levels) }}
|
||||||
|
include:
|
||||||
|
- debug-level: debug
|
||||||
|
flags: --with-debug-level=fastdebug
|
||||||
|
suffix: -debug
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout the JDK source'
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: 'Get the BootJDK'
|
||||||
|
id: bootjdk
|
||||||
|
uses: ./.github/actions/get-bootjdk
|
||||||
|
with:
|
||||||
|
platform: linux-x64
|
||||||
|
|
||||||
|
- name: 'Get JTReg'
|
||||||
|
id: jtreg
|
||||||
|
uses: ./.github/actions/get-jtreg
|
||||||
|
|
||||||
|
- name: 'Get GTest'
|
||||||
|
id: gtest
|
||||||
|
uses: ./.github/actions/get-gtest
|
||||||
|
|
||||||
|
- name: 'Set architecture'
|
||||||
|
id: arch
|
||||||
|
run: |
|
||||||
|
# Set a proper suffix for packages if using a different architecture
|
||||||
|
if [[ '${{ inputs.apt-architecture }}' != '' ]]; then
|
||||||
|
echo 'suffix=:${{ inputs.apt-architecture }}' >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Upgrading apt to solve libc6 installation bugs, see JDK-8260460.
|
||||||
|
- name: 'Install toolchain and dependencies'
|
||||||
|
run: |
|
||||||
|
# Install dependencies using apt-get
|
||||||
|
if [[ '${{ inputs.apt-architecture }}' != '' ]]; then
|
||||||
|
sudo dpkg --add-architecture ${{ inputs.apt-architecture }}
|
||||||
|
fi
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install --only-upgrade apt
|
||||||
|
sudo apt-get install gcc-${{ inputs.apt-gcc-version }} g++-${{ inputs.apt-gcc-version }} libxrandr-dev${{ steps.arch.outputs.suffix }} libxtst-dev${{ steps.arch.outputs.suffix }} libcups2-dev${{ steps.arch.outputs.suffix }} libasound2-dev${{ steps.arch.outputs.suffix }} ${{ inputs.apt-extra-packages }}
|
||||||
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
|
||||||
|
|
||||||
|
- name: 'Configure'
|
||||||
|
run: >
|
||||||
|
bash configure
|
||||||
|
--with-conf-name=${{ inputs.platform }}
|
||||||
|
${{ matrix.flags }}
|
||||||
|
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
|
||||||
|
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||||
|
--with-jtreg=${{ steps.jtreg.outputs.path }}
|
||||||
|
--with-gtest=${{ steps.gtest.outputs.path }}
|
||||||
|
--enable-jtreg-failure-handler
|
||||||
|
--with-zlib=system
|
||||||
|
${{ inputs.extra-conf-options }}
|
||||||
|
|
||||||
|
- name: 'Build'
|
||||||
|
id: build
|
||||||
|
uses: ./.github/actions/do-build
|
||||||
|
with:
|
||||||
|
make-target: '${{ inputs.make-target }}'
|
||||||
|
platform: ${{ inputs.platform }}
|
||||||
|
debug-suffix: '${{ matrix.suffix }}'
|
||||||
|
|
||||||
|
- name: 'Upload bundles'
|
||||||
|
uses: ./.github/actions/upload-bundles
|
||||||
|
with:
|
||||||
|
platform: ${{ inputs.platform }}
|
||||||
|
debug-suffix: '${{ matrix.suffix }}'
|
||||||
114
.github/workflows/build-macos.yml
vendored
Normal file
114
.github/workflows/build-macos.yml
vendored
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2022, 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
name: 'Build (macos)'
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
platform:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
extra-conf-options:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
make-target:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: 'product-bundles test-bundles'
|
||||||
|
debug-levels:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: '[ "debug", "release" ]'
|
||||||
|
xcode-toolset-version:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-macos:
|
||||||
|
name: build
|
||||||
|
runs-on: macos-11
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
debug-level: ${{ fromJSON(inputs.debug-levels) }}
|
||||||
|
include:
|
||||||
|
- debug-level: debug
|
||||||
|
flags: --with-debug-level=fastdebug
|
||||||
|
suffix: -debug
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout the JDK source'
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: 'Get the BootJDK'
|
||||||
|
id: bootjdk
|
||||||
|
uses: ./.github/actions/get-bootjdk
|
||||||
|
with:
|
||||||
|
platform: macos-x64
|
||||||
|
|
||||||
|
- name: 'Get JTReg'
|
||||||
|
id: jtreg
|
||||||
|
uses: ./.github/actions/get-jtreg
|
||||||
|
|
||||||
|
- name: 'Get GTest'
|
||||||
|
id: gtest
|
||||||
|
uses: ./.github/actions/get-gtest
|
||||||
|
|
||||||
|
- name: 'Install toolchain and dependencies'
|
||||||
|
run: |
|
||||||
|
# Run Homebrew installation and xcode-select
|
||||||
|
brew install make
|
||||||
|
sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-toolset-version }}.app/Contents/Developer
|
||||||
|
# This will make GNU make available as 'make' and not only as 'gmake'
|
||||||
|
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
|
||||||
|
|
||||||
|
- name: 'Configure'
|
||||||
|
run: >
|
||||||
|
bash configure
|
||||||
|
--with-conf-name=${{ inputs.platform }}
|
||||||
|
${{ matrix.flags }}
|
||||||
|
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
|
||||||
|
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||||
|
--with-jtreg=${{ steps.jtreg.outputs.path }}
|
||||||
|
--with-gtest=${{ steps.gtest.outputs.path }}
|
||||||
|
--enable-jtreg-failure-handler
|
||||||
|
--with-zlib=system
|
||||||
|
${{ inputs.extra-conf-options }}
|
||||||
|
|
||||||
|
- name: 'Build'
|
||||||
|
id: build
|
||||||
|
uses: ./.github/actions/do-build
|
||||||
|
with:
|
||||||
|
make-target: '${{ inputs.make-target }}'
|
||||||
|
platform: ${{ inputs.platform }}
|
||||||
|
debug-suffix: '${{ matrix.suffix }}'
|
||||||
|
|
||||||
|
- name: 'Upload bundles'
|
||||||
|
uses: ./.github/actions/upload-bundles
|
||||||
|
with:
|
||||||
|
platform: ${{ inputs.platform }}
|
||||||
|
debug-suffix: '${{ matrix.suffix }}'
|
||||||
145
.github/workflows/build-windows.yml
vendored
Normal file
145
.github/workflows/build-windows.yml
vendored
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2022, 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
name: 'Build (windows)'
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
platform:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
extra-conf-options:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
make-target:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: 'product-bundles test-bundles'
|
||||||
|
debug-levels:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: '[ "debug", "release" ]'
|
||||||
|
msvc-toolset-version:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
msvc-toolset-architecture:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
env:
|
||||||
|
# These are needed to make the MSYS2 bash work properly
|
||||||
|
MSYS2_PATH_TYPE: minimal
|
||||||
|
CHERE_INVOKING: 1
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-windows:
|
||||||
|
name: build
|
||||||
|
runs-on: windows-2019
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
debug-level: ${{ fromJSON(inputs.debug-levels) }}
|
||||||
|
include:
|
||||||
|
- debug-level: debug
|
||||||
|
flags: --with-debug-level=fastdebug
|
||||||
|
suffix: -debug
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout the JDK source'
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: 'Get MSYS2'
|
||||||
|
uses: ./.github/actions/get-msys2
|
||||||
|
|
||||||
|
- name: 'Get the BootJDK'
|
||||||
|
id: bootjdk
|
||||||
|
uses: ./.github/actions/get-bootjdk
|
||||||
|
with:
|
||||||
|
platform: windows-x64
|
||||||
|
|
||||||
|
- name: 'Get JTReg'
|
||||||
|
id: jtreg
|
||||||
|
uses: ./.github/actions/get-jtreg
|
||||||
|
|
||||||
|
- name: 'Get GTest'
|
||||||
|
id: gtest
|
||||||
|
uses: ./.github/actions/get-gtest
|
||||||
|
|
||||||
|
- name: 'Check toolchain installed'
|
||||||
|
id: toolchain-check
|
||||||
|
run: |
|
||||||
|
set +e
|
||||||
|
'/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/vc/auxiliary/build/vcvars64.bat' -vcvars_ver=${{ inputs.msvc-toolset-version }}
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "Toolchain is already installed"
|
||||||
|
echo "toolchain-installed=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "Toolchain is not yet installed"
|
||||||
|
echo "toolchain-installed=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: 'Install toolchain and dependencies'
|
||||||
|
run: |
|
||||||
|
# Run Visual Studio Installer
|
||||||
|
'/c/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe' \
|
||||||
|
modify --quiet --installPath 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise' \
|
||||||
|
--add Microsoft.VisualStudio.Component.VC.${{ inputs.msvc-toolset-version }}.${{ inputs.msvc-toolset-architecture }}
|
||||||
|
if: steps.toolchain-check.outputs.toolchain-installed != 'true'
|
||||||
|
|
||||||
|
- name: 'Configure'
|
||||||
|
run: >
|
||||||
|
bash configure
|
||||||
|
--with-conf-name=${{ inputs.platform }}
|
||||||
|
${{ matrix.flags }}
|
||||||
|
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
|
||||||
|
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||||
|
--with-jtreg=${{ steps.jtreg.outputs.path }}
|
||||||
|
--with-gtest=${{ steps.gtest.outputs.path }}
|
||||||
|
--enable-jtreg-failure-handler
|
||||||
|
--with-msvc-toolset-version=${{ inputs.msvc-toolset-version }}
|
||||||
|
${{ inputs.extra-conf-options }}
|
||||||
|
env:
|
||||||
|
# We need a minimal PATH on Windows
|
||||||
|
# Set PATH to "", so just GITHUB_PATH is included
|
||||||
|
PATH: ''
|
||||||
|
|
||||||
|
- name: 'Build'
|
||||||
|
id: build
|
||||||
|
uses: ./.github/actions/do-build
|
||||||
|
with:
|
||||||
|
make-target: '${{ inputs.make-target }}'
|
||||||
|
platform: ${{ inputs.platform }}
|
||||||
|
debug-suffix: '${{ matrix.suffix }}'
|
||||||
|
|
||||||
|
- name: 'Upload bundles'
|
||||||
|
uses: ./.github/actions/upload-bundles
|
||||||
|
with:
|
||||||
|
platform: ${{ inputs.platform }}
|
||||||
|
debug-suffix: '${{ matrix.suffix }}'
|
||||||
331
.github/workflows/main.yml
vendored
Normal file
331
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,331 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2022, 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
name: 'OpenJDK GHA Sanity Checks'
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- master
|
||||||
|
- pr/*
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
platforms:
|
||||||
|
description: 'Platform(s) to execute on (comma separated, e.g. "linux-x64, macos, aarch64")'
|
||||||
|
required: true
|
||||||
|
default: 'linux-x64, linux-x86, linux-x64-variants, linux-cross-compile, macos-x64, macos-aarch64, windows-x64, windows-aarch64'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
###
|
||||||
|
### Determine platforms to include
|
||||||
|
###
|
||||||
|
|
||||||
|
select:
|
||||||
|
name: 'Select platforms'
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
outputs:
|
||||||
|
linux-x64: ${{ steps.include.outputs.linux-x64 }}
|
||||||
|
linux-x86: ${{ steps.include.outputs.linux-x86 }}
|
||||||
|
linux-x64-variants: ${{ steps.include.outputs.linux-x64-variants }}
|
||||||
|
linux-cross-compile: ${{ steps.include.outputs.linux-cross-compile }}
|
||||||
|
macos-x64: ${{ steps.include.outputs.macos-x64 }}
|
||||||
|
macos-aarch64: ${{ steps.include.outputs.macos-aarch64 }}
|
||||||
|
windows-x64: ${{ steps.include.outputs.windows-x64 }}
|
||||||
|
windows-aarch64: ${{ steps.include.outputs.windows-aarch64 }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# This function must be inlined in main.yml, or we'd be forced to checkout the repo
|
||||||
|
- name: 'Check what jobs to run'
|
||||||
|
id: include
|
||||||
|
run: |
|
||||||
|
# Determine which platform jobs to run
|
||||||
|
|
||||||
|
# Returns 'true' if the input platform list matches any of the platform monikers given as argument,
|
||||||
|
# 'false' otherwise.
|
||||||
|
# arg $1: platform name or names to look for
|
||||||
|
function check_platform() {
|
||||||
|
if [[ '${{ !secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/') }}' == 'false' ]]; then
|
||||||
|
# If JDK_SUBMIT_FILTER is set, and this is not a "submit/" branch, don't run anything
|
||||||
|
echo 'false'
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
|
||||||
|
input='${{ github.event.inputs.platforms }}'
|
||||||
|
elif [[ $GITHUB_EVENT_NAME == push ]]; then
|
||||||
|
input='${{ secrets.JDK_SUBMIT_PLATFORMS }}'
|
||||||
|
else
|
||||||
|
echo 'Internal error in GHA'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
normalized_input="$(echo ,$input, | tr -d ' ')"
|
||||||
|
if [[ "$normalized_input" == ",," ]]; then
|
||||||
|
# For an empty input, assume all platforms should run
|
||||||
|
echo 'true'
|
||||||
|
return
|
||||||
|
else
|
||||||
|
# Check for all acceptable platform names
|
||||||
|
for part in $* ; do
|
||||||
|
if echo "$normalized_input" | grep -q -e ",$part," ; then
|
||||||
|
echo 'true'
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo 'false'
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "linux-x64=$(check_platform linux-x64 linux x64)" >> $GITHUB_OUTPUT
|
||||||
|
echo "linux-x86=$(check_platform linux-x86 linux x86)" >> $GITHUB_OUTPUT
|
||||||
|
echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
|
||||||
|
echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
|
||||||
|
echo "macos-x64=$(check_platform macos-x64 macos x64)" >> $GITHUB_OUTPUT
|
||||||
|
echo "macos-aarch64=$(check_platform macos-aarch64 macos aarch64)" >> $GITHUB_OUTPUT
|
||||||
|
echo "windows-x64=$(check_platform windows-x64 windows x64)" >> $GITHUB_OUTPUT
|
||||||
|
echo "windows-aarch64=$(check_platform windows-aarch64 windows aarch64)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
###
|
||||||
|
### Build jobs
|
||||||
|
###
|
||||||
|
|
||||||
|
build-linux-x64:
|
||||||
|
name: linux-x64
|
||||||
|
needs: select
|
||||||
|
uses: ./.github/workflows/build-linux.yml
|
||||||
|
with:
|
||||||
|
platform: linux-x64
|
||||||
|
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||||
|
# The linux-x64 jdk bundle is used as buildjdk for the cross-compile job
|
||||||
|
if: needs.select.outputs.linux-x64 == 'true' || needs.select.outputs.linux-cross-compile == 'true'
|
||||||
|
|
||||||
|
build-linux-x86:
|
||||||
|
name: linux-x86
|
||||||
|
needs: select
|
||||||
|
uses: ./.github/workflows/build-linux.yml
|
||||||
|
with:
|
||||||
|
platform: linux-x86
|
||||||
|
apt-gcc-version: '10-multilib'
|
||||||
|
apt-architecture: 'i386'
|
||||||
|
# Some multilib libraries do not have proper inter-dependencies, so we have to
|
||||||
|
# install their dependencies manually.
|
||||||
|
apt-extra-packages: 'libfreetype6-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386'
|
||||||
|
extra-conf-options: '--with-target-bits=32'
|
||||||
|
if: needs.select.outputs.linux-x86 == 'true'
|
||||||
|
|
||||||
|
build-linux-x64-hs-nopch:
|
||||||
|
name: linux-x64-hs-nopch
|
||||||
|
needs: select
|
||||||
|
uses: ./.github/workflows/build-linux.yml
|
||||||
|
with:
|
||||||
|
platform: linux-x64
|
||||||
|
make-target: 'hotspot'
|
||||||
|
debug-levels: '[ "debug" ]'
|
||||||
|
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||||
|
extra-conf-options: '--disable-precompiled-headers'
|
||||||
|
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||||
|
|
||||||
|
build-linux-x64-hs-zero:
|
||||||
|
name: linux-x64-hs-zero
|
||||||
|
needs: select
|
||||||
|
uses: ./.github/workflows/build-linux.yml
|
||||||
|
with:
|
||||||
|
platform: linux-x64
|
||||||
|
make-target: 'hotspot'
|
||||||
|
debug-levels: '[ "debug" ]'
|
||||||
|
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||||
|
extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
|
||||||
|
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||||
|
|
||||||
|
build-linux-x64-hs-minimal:
|
||||||
|
name: linux-x64-hs-minimal
|
||||||
|
needs: select
|
||||||
|
uses: ./.github/workflows/build-linux.yml
|
||||||
|
with:
|
||||||
|
platform: linux-x64
|
||||||
|
make-target: 'hotspot'
|
||||||
|
debug-levels: '[ "debug" ]'
|
||||||
|
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||||
|
extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
|
||||||
|
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||||
|
|
||||||
|
build-linux-x64-hs-optimized:
|
||||||
|
name: linux-x64-hs-optimized
|
||||||
|
needs: select
|
||||||
|
uses: ./.github/workflows/build-linux.yml
|
||||||
|
with:
|
||||||
|
platform: linux-x64
|
||||||
|
make-target: 'hotspot'
|
||||||
|
# Technically this is not the "debug" level, but we can't inject a new matrix state for just this job
|
||||||
|
debug-levels: '[ "debug" ]'
|
||||||
|
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||||
|
extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
|
||||||
|
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||||
|
|
||||||
|
build-linux-cross-compile:
|
||||||
|
name: linux-cross-compile
|
||||||
|
needs:
|
||||||
|
- select
|
||||||
|
- build-linux-x64
|
||||||
|
uses: ./.github/workflows/build-cross-compile.yml
|
||||||
|
if: needs.select.outputs.linux-cross-compile == 'true'
|
||||||
|
|
||||||
|
build-macos-x64:
|
||||||
|
name: macos-x64
|
||||||
|
needs: select
|
||||||
|
uses: ./.github/workflows/build-macos.yml
|
||||||
|
with:
|
||||||
|
platform: macos-x64
|
||||||
|
xcode-toolset-version: '11.7'
|
||||||
|
if: needs.select.outputs.macos-x64 == 'true'
|
||||||
|
|
||||||
|
build-macos-aarch64:
|
||||||
|
name: macos-aarch64
|
||||||
|
needs: select
|
||||||
|
uses: ./.github/workflows/build-macos.yml
|
||||||
|
with:
|
||||||
|
platform: macos-aarch64
|
||||||
|
xcode-toolset-version: '12.4'
|
||||||
|
extra-conf-options: '--openjdk-target=aarch64-apple-darwin'
|
||||||
|
if: needs.select.outputs.macos-aarch64 == 'true'
|
||||||
|
|
||||||
|
build-windows-x64:
|
||||||
|
name: windows-x64
|
||||||
|
needs: select
|
||||||
|
uses: ./.github/workflows/build-windows.yml
|
||||||
|
with:
|
||||||
|
platform: windows-x64
|
||||||
|
msvc-toolset-version: '14.29'
|
||||||
|
msvc-toolset-architecture: 'x86.x64'
|
||||||
|
if: needs.select.outputs.windows-x64 == 'true'
|
||||||
|
|
||||||
|
build-windows-aarch64:
|
||||||
|
name: windows-aarch64
|
||||||
|
needs: select
|
||||||
|
uses: ./.github/workflows/build-windows.yml
|
||||||
|
with:
|
||||||
|
platform: windows-aarch64
|
||||||
|
msvc-toolset-version: '14.29'
|
||||||
|
msvc-toolset-architecture: 'arm64'
|
||||||
|
make-target: 'hotspot'
|
||||||
|
extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin'
|
||||||
|
if: needs.select.outputs.windows-aarch64 == 'true'
|
||||||
|
|
||||||
|
###
|
||||||
|
### Test jobs
|
||||||
|
###
|
||||||
|
|
||||||
|
test-linux-x64:
|
||||||
|
name: linux-x64
|
||||||
|
needs:
|
||||||
|
- build-linux-x64
|
||||||
|
uses: ./.github/workflows/test.yml
|
||||||
|
with:
|
||||||
|
platform: linux-x64
|
||||||
|
bootjdk-platform: linux-x64
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
test-linux-x86:
|
||||||
|
name: linux-x86
|
||||||
|
needs:
|
||||||
|
- build-linux-x86
|
||||||
|
uses: ./.github/workflows/test.yml
|
||||||
|
with:
|
||||||
|
platform: linux-x86
|
||||||
|
bootjdk-platform: linux-x64
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
test-macos-x64:
|
||||||
|
name: macos-x64
|
||||||
|
needs:
|
||||||
|
- build-macos-x64
|
||||||
|
uses: ./.github/workflows/test.yml
|
||||||
|
with:
|
||||||
|
platform: macos-x64
|
||||||
|
bootjdk-platform: macos-x64
|
||||||
|
runs-on: macos-11
|
||||||
|
|
||||||
|
test-windows-x64:
|
||||||
|
name: windows-x64
|
||||||
|
needs:
|
||||||
|
- build-windows-x64
|
||||||
|
uses: ./.github/workflows/test.yml
|
||||||
|
with:
|
||||||
|
platform: windows-x64
|
||||||
|
bootjdk-platform: windows-x64
|
||||||
|
runs-on: windows-2019
|
||||||
|
|
||||||
|
# Remove bundles so they are not misconstrued as binary distributions from the JDK project
|
||||||
|
remove-bundles:
|
||||||
|
name: 'Remove bundle artifacts'
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
if: always()
|
||||||
|
needs:
|
||||||
|
- build-linux-x64
|
||||||
|
- build-linux-x86
|
||||||
|
- build-linux-x64-hs-nopch
|
||||||
|
- build-linux-x64-hs-zero
|
||||||
|
- build-linux-x64-hs-minimal
|
||||||
|
- build-linux-x64-hs-optimized
|
||||||
|
- build-linux-cross-compile
|
||||||
|
- build-macos-x64
|
||||||
|
- build-macos-aarch64
|
||||||
|
- build-windows-x64
|
||||||
|
- build-windows-aarch64
|
||||||
|
- test-linux-x64
|
||||||
|
- test-linux-x86
|
||||||
|
- test-macos-x64
|
||||||
|
- test-windows-x64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# Hack to get hold of the api environment variables that are only defined for actions
|
||||||
|
- name: 'Get API configuration'
|
||||||
|
id: api
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
with:
|
||||||
|
script: 'return { url: process.env["ACTIONS_RUNTIME_URL"], token: process.env["ACTIONS_RUNTIME_TOKEN"] }'
|
||||||
|
|
||||||
|
- name: 'Remove bundle artifacts'
|
||||||
|
run: |
|
||||||
|
# Find and remove all bundle artifacts
|
||||||
|
ALL_ARTIFACT_URLS="$(curl -s \
|
||||||
|
-H 'Accept: application/json;api-version=6.0-preview' \
|
||||||
|
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
|
||||||
|
'${{ fromJson(steps.api.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview')"
|
||||||
|
BUNDLE_ARTIFACT_URLS="$(echo "$ALL_ARTIFACT_URLS" | jq -r -c '.value | map(select(.name|startswith("bundles-"))) | .[].url')"
|
||||||
|
for url in $BUNDLE_ARTIFACT_URLS; do
|
||||||
|
echo "Removing $url"
|
||||||
|
curl -s \
|
||||||
|
-H 'Accept: application/json;api-version=6.0-preview' \
|
||||||
|
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
|
||||||
|
-X DELETE "$url" \
|
||||||
|
|| echo "Failed to remove bundle"
|
||||||
|
done
|
||||||
1717
.github/workflows/submit.yml
vendored
1717
.github/workflows/submit.yml
vendored
File diff suppressed because it is too large
Load Diff
205
.github/workflows/test.yml
vendored
Normal file
205
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2022, 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
name: 'Run tests'
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
platform:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
bootjdk-platform:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
runs-on:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
env:
|
||||||
|
# These are needed to make the MSYS2 bash work properly
|
||||||
|
MSYS2_PATH_TYPE: minimal
|
||||||
|
CHERE_INVOKING: 1
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: test
|
||||||
|
runs-on: ${{ inputs.runs-on }}
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
test-name:
|
||||||
|
- 'jdk/tier1 part 1'
|
||||||
|
- 'jdk/tier1 part 2'
|
||||||
|
- 'jdk/tier1 part 3'
|
||||||
|
- 'langtools/tier1'
|
||||||
|
- 'hs/tier1 common'
|
||||||
|
- 'hs/tier1 compiler'
|
||||||
|
- 'hs/tier1 gc'
|
||||||
|
- 'hs/tier1 runtime'
|
||||||
|
- 'hs/tier1 serviceability'
|
||||||
|
|
||||||
|
include:
|
||||||
|
- test-name: 'jdk/tier1 part 1'
|
||||||
|
test-suite: 'test/jdk/:tier1_part1'
|
||||||
|
|
||||||
|
- test-name: 'jdk/tier1 part 2'
|
||||||
|
test-suite: 'test/jdk/:tier1_part2'
|
||||||
|
|
||||||
|
- test-name: 'jdk/tier1 part 3'
|
||||||
|
test-suite: 'test/jdk/:tier1_part3'
|
||||||
|
|
||||||
|
- test-name: 'langtools/tier1'
|
||||||
|
test-suite: 'test/langtools/:tier1'
|
||||||
|
|
||||||
|
- test-name: 'hs/tier1 common'
|
||||||
|
test-suite: 'test/hotspot/jtreg/:tier1_common'
|
||||||
|
debug-suffix: -debug
|
||||||
|
|
||||||
|
- test-name: 'hs/tier1 compiler'
|
||||||
|
test-suite: 'test/hotspot/jtreg/:tier1_compiler'
|
||||||
|
debug-suffix: -debug
|
||||||
|
|
||||||
|
- test-name: 'hs/tier1 gc'
|
||||||
|
test-suite: 'test/hotspot/jtreg/:tier1_gc'
|
||||||
|
debug-suffix: -debug
|
||||||
|
|
||||||
|
- test-name: 'hs/tier1 runtime'
|
||||||
|
test-suite: 'test/hotspot/jtreg/:tier1_runtime'
|
||||||
|
debug-suffix: -debug
|
||||||
|
|
||||||
|
- test-name: 'hs/tier1 serviceability'
|
||||||
|
test-suite: 'test/hotspot/jtreg/:tier1_serviceability'
|
||||||
|
debug-suffix: -debug
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout the JDK source'
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: 'Get MSYS2'
|
||||||
|
uses: ./.github/actions/get-msys2
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
|
||||||
|
- name: 'Get the BootJDK'
|
||||||
|
id: bootjdk
|
||||||
|
uses: ./.github/actions/get-bootjdk
|
||||||
|
with:
|
||||||
|
platform: ${{ inputs.bootjdk-platform }}
|
||||||
|
|
||||||
|
- name: 'Get JTReg'
|
||||||
|
id: jtreg
|
||||||
|
uses: ./.github/actions/get-jtreg
|
||||||
|
|
||||||
|
- name: 'Get bundles'
|
||||||
|
id: bundles
|
||||||
|
uses: ./.github/actions/get-bundles
|
||||||
|
with:
|
||||||
|
platform: ${{ inputs.platform }}
|
||||||
|
debug-suffix: ${{ matrix.debug-suffix }}
|
||||||
|
|
||||||
|
- name: 'Install dependencies'
|
||||||
|
run: |
|
||||||
|
# On macOS we need to install some dependencies for testing
|
||||||
|
brew install make
|
||||||
|
sudo xcode-select --switch /Applications/Xcode_11.7.app/Contents/Developer
|
||||||
|
# This will make GNU make available as 'make' and not only as 'gmake'
|
||||||
|
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
|
||||||
|
- name: 'Set PATH'
|
||||||
|
id: path
|
||||||
|
run: |
|
||||||
|
# We need a minimal PATH on Windows
|
||||||
|
# Set PATH to "", so just GITHUB_PATH is included
|
||||||
|
if [[ '${{ runner.os }}' == 'Windows' ]]; then
|
||||||
|
echo "value=" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "value=$PATH" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: 'Run tests'
|
||||||
|
id: run-tests
|
||||||
|
run: >
|
||||||
|
make test-prebuilt
|
||||||
|
TEST='${{ matrix.test-suite }}'
|
||||||
|
BOOT_JDK=${{ steps.bootjdk.outputs.path }}
|
||||||
|
JT_HOME=${{ steps.jtreg.outputs.path }}
|
||||||
|
JDK_IMAGE_DIR=${{ steps.bundles.outputs.jdk-path }}
|
||||||
|
SYMBOLS_IMAGE_DIR=${{ steps.bundles.outputs.symbols-path }}
|
||||||
|
TEST_IMAGE_DIR=${{ steps.bundles.outputs.tests-path }}
|
||||||
|
JTREG='JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash;VERBOSE=fail,error,time;KEYWORDS=!headful'
|
||||||
|
&& bash ./.github/scripts/gen-test-summary.sh "$GITHUB_STEP_SUMMARY" "$GITHUB_OUTPUT"
|
||||||
|
env:
|
||||||
|
PATH: ${{ steps.path.outputs.value }}
|
||||||
|
|
||||||
|
# This is a separate step, since if the markdown from a step gets bigger than
|
||||||
|
# 1024 kB it is skipped, but then the short summary above is still generated
|
||||||
|
- name: 'Generate test report'
|
||||||
|
run: bash ./.github/scripts/gen-test-results.sh "$GITHUB_STEP_SUMMARY"
|
||||||
|
if: always()
|
||||||
|
|
||||||
|
- name: 'Package test results'
|
||||||
|
id: package
|
||||||
|
run: |
|
||||||
|
# Package test-results and relevant parts of test-support
|
||||||
|
mkdir results
|
||||||
|
|
||||||
|
if [[ -d build/run-test-prebuilt/test-results ]]; then
|
||||||
|
cd build/run-test-prebuilt/test-results/
|
||||||
|
zip -r -9 "$GITHUB_WORKSPACE/results/test-results.zip" .
|
||||||
|
cd $GITHUB_WORKSPACE
|
||||||
|
else
|
||||||
|
echo '::warning ::Missing test-results directory'
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -d build/run-test-prebuilt/test-support ]]; then
|
||||||
|
cd build/run-test-prebuilt/test-support/
|
||||||
|
zip -r -9 "$GITHUB_WORKSPACE/results/test-support.zip" . -i *.jtr -i */hs_err*.log -i */replay*.log
|
||||||
|
cd $GITHUB_WORKSPACE
|
||||||
|
else
|
||||||
|
echo '::warning ::Missing test-support directory'
|
||||||
|
fi
|
||||||
|
|
||||||
|
artifact_name="results-${{ inputs.platform }}-$(echo ${{ matrix.test-name }} | tr '/ ' '__')"
|
||||||
|
echo "artifact-name=$artifact_name" >> $GITHUB_OUTPUT
|
||||||
|
if: always()
|
||||||
|
|
||||||
|
- name: 'Upload test results'
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
path: results
|
||||||
|
name: ${{ steps.package.outputs.artifact-name }}
|
||||||
|
if: always()
|
||||||
|
|
||||||
|
# This is the best way I found to abort the job with an error message
|
||||||
|
- name: 'Notify about test failures'
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
with:
|
||||||
|
script: core.setFailed('${{ steps.run-tests.outputs.error-message }}')
|
||||||
|
if: steps.run-tests.outputs.failure == 'true'
|
||||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -18,5 +18,5 @@ NashornProfile.txt
|
|||||||
/src/utils/LogCompilation/target/
|
/src/utils/LogCompilation/target/
|
||||||
/.project/
|
/.project/
|
||||||
/.settings/
|
/.settings/
|
||||||
*.class
|
/compile_commands.json
|
||||||
.idea/workspace.xml
|
/.cache
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
[general]
|
[general]
|
||||||
project=jdk
|
project=jdk-updates
|
||||||
jbs=JDK
|
jbs=JDK
|
||||||
|
version=17.0.8.1
|
||||||
|
|
||||||
[checks]
|
[checks]
|
||||||
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
|
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
|
||||||
|
|||||||
179
README.md
179
README.md
@@ -1,174 +1,11 @@
|
|||||||
[](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
|
# Welcome to the JDK!
|
||||||
|
|
||||||
# Welcome to JetBrains Runtime!
|
For build instructions please see the
|
||||||
|
[online documentation](https://openjdk.java.net/groups/build/doc/building.html),
|
||||||
|
or either of these files:
|
||||||
|
|
||||||
JetBrains Runtime is a fork of [OpenJDK](https://github.com/openjdk/jdk) available for Windows, Mac OS X, and Linux.
|
- [doc/building.html](doc/building.html) (html version)
|
||||||
It includes a number enhancements in font rendering, HiDPI support, ligatures, performance improvements, and bugfixes.
|
- [doc/building.md](doc/building.md) (markdown version)
|
||||||
|
|
||||||
> **_NOTE_**: This is a **development** branch that is periodically synhronized with
|
See <https://openjdk.java.net/> for more information about
|
||||||
> the [OpenJDK master](https://github.com/openjdk/jdk/tree/master) branch.
|
the OpenJDK Community and the JDK.
|
||||||
>
|
|
||||||
> Release builds are based on these branches:
|
|
||||||
> * [master](https://github.com/JetBrains/JetBrainsRuntime/tree/master) (JDK 11)
|
|
||||||
> * [master17](https://github.com/JetBrains/JetBrainsRuntime/tree/master17) (JDK 17)
|
|
||||||
|
|
||||||
|
|
||||||
## Contents
|
|
||||||
- [Welcome to JetBrains Runtime](#jetbrains-runtime)
|
|
||||||
- [Products Built on JetBrains Runtime](#products-built-on-jetbrains-runtime)
|
|
||||||
- [Getting Sources](#getting-sources)
|
|
||||||
- [macOS, Linux](#macos-linux)
|
|
||||||
- [Windows](#sources-windows)
|
|
||||||
- [Configuring the Build Environment](#configuring-the-build-environment)
|
|
||||||
- [Linux (Docker)](#linux-docker)
|
|
||||||
- [Ubuntu Linux](#ubuntu-linux)
|
|
||||||
- [Windows](#build-windows)
|
|
||||||
- [macOS](#macos)
|
|
||||||
- [Developing](#developing)
|
|
||||||
- [Contributing](#contributing)
|
|
||||||
- [Resources](#resources)
|
|
||||||
|
|
||||||
## Products Built on JetBrains Runtime
|
|
||||||
* [Android Studio](https://developer.android.com/studio). The official IDE for Google's Android operating system.
|
|
||||||
* [CLion](https://www.jetbrains.com/clion/). A cross-platform IDE for C and C++ from JetBrains.
|
|
||||||
* [DataGrip](https://www.jetbrains.com/datagrip/). The IDE for Databases and SQL from JetBrains.
|
|
||||||
* [GoLand](https://www.jetbrains.com/go/). The cross-platform Go IDE from JetBrains.
|
|
||||||
* [IntelliJ IDEA](https://www.jetbrains.com/idea/). The IDE for JVM from JetBrains.
|
|
||||||
* [JProfiler](https://www.ej-technologies.com/products/jprofiler/overview.html). The Java profiler.
|
|
||||||
* [PhpStorm](https://www.jetbrains.com/phpstorm/). The PHP IDE from JetBrains.
|
|
||||||
* [PyCharm](https://www.jetbrains.com/pycharm/). The Python IDE from JetBrains.
|
|
||||||
* [Rider](https://www.jetbrains.com/rider/). The cross-platform .NET IDE from JetBrains.
|
|
||||||
* [RubyMine](https://www.jetbrains.com/ruby/). The Ruby and Rails IDE from JetBrains.
|
|
||||||
* [WebStorm](https://www.jetbrains.com/webstorm/). The JavaScript IDE from JetBrains.
|
|
||||||
* [YourKit](https://www.yourkit.com/). Java and .NET profilers.
|
|
||||||
|
|
||||||
## Getting Sources
|
|
||||||
### macOS, Linux
|
|
||||||
```
|
|
||||||
git config --global core.autocrlf input
|
|
||||||
git clone git@github.com:JetBrains/JetBrainsRuntime.git
|
|
||||||
```
|
|
||||||
|
|
||||||
### Windows
|
|
||||||
<a name="sources-windows"></a>
|
|
||||||
```
|
|
||||||
git config --global core.autocrlf false
|
|
||||||
git clone git@github.com:JetBrains/JetBrainsRuntime.git
|
|
||||||
```
|
|
||||||
|
|
||||||
## Configuring the Build Environment
|
|
||||||
Here are quick per-platform instructions for those who can't wait to get started.
|
|
||||||
Please refer to [OpenJDK build docs](https://openjdk.java.net/groups/build/doc/building.html) for in-depth
|
|
||||||
coverage of all the details.
|
|
||||||
|
|
||||||
> **_TIP:_** To get a preliminary report of what's missing, run `./configure` and check its output.
|
|
||||||
> It would usually have a meaningful advice on how to solve the problem.
|
|
||||||
|
|
||||||
### Linux (Docker)
|
|
||||||
Create a container:
|
|
||||||
```
|
|
||||||
$ cd jb/project/docker
|
|
||||||
$ docker build .
|
|
||||||
...
|
|
||||||
Successfully built 942ea9900054
|
|
||||||
```
|
|
||||||
Run these commands in the new container:
|
|
||||||
```
|
|
||||||
$ docker run -v `pwd`../../../../:/JetBrainsRuntime -it 942ea9900054
|
|
||||||
# cd /JetBrainsRuntime
|
|
||||||
# sh ./configure
|
|
||||||
# make images CONF=linux-x86_64-normal-server-release
|
|
||||||
```
|
|
||||||
|
|
||||||
### Ubuntu Linux
|
|
||||||
Install the necessary tools, libraries, and headers with:
|
|
||||||
```
|
|
||||||
$ sudo apt-get install autoconf make build-essential libx11-dev libxext-dev libxrender-dev libxtst-dev \
|
|
||||||
libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev
|
|
||||||
```
|
|
||||||
Get Java 17 (for instance, [Azul Zulu Builds of OpenJDK 17](https://www.azul.com/downloads/?version=java-17-ea&package=jdk)).
|
|
||||||
|
|
||||||
Then run the following:
|
|
||||||
```
|
|
||||||
$ cd JetBrainsRuntime
|
|
||||||
$ git checkout jbr-dev
|
|
||||||
$ sh ./configure
|
|
||||||
$ make images
|
|
||||||
```
|
|
||||||
This will build the release configuration under `./build/linux-x86_64-server-release/`.
|
|
||||||
|
|
||||||
### Windows
|
|
||||||
<a name="build-windows"></a>
|
|
||||||
Install the following:
|
|
||||||
* [Cygwin x64](http://www.cygwin.com/).
|
|
||||||
Required packages: `autoconf`, `binutils`, `cpio`, `diffutils`, `file`, `gawk`, `gcc-core`, `make`, `m4`, `unzip`, `zip`.
|
|
||||||
Install those together with Cygwin.
|
|
||||||
* [Visual Studio compiler toolset](https://visualstudio.microsoft.com/downloads/).
|
|
||||||
Install with the desktop development kit, which includes Windows SDK and compilers.
|
|
||||||
Visual Studio 2019 is supported by default.
|
|
||||||
* Java 17 (for instance, [Azul Zulu Builds of OpenJDK 17](https://www.azul.com/downloads/?version=java-17-ea&os=windows&architecture=x86-64-bit&package=jdk).
|
|
||||||
If you have problems while configuring, read [Java tips on Cygwin](http://horstmann.com/articles/cygwin-tips.html).
|
|
||||||
|
|
||||||
From the command line:
|
|
||||||
```
|
|
||||||
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
|
|
||||||
"c:\Program_Files\cygwin64\bin\mintty.exe" /bin/bash -l
|
|
||||||
```
|
|
||||||
The first command sets up environment variables, the second starts a Cygwin shell with the proper environment.
|
|
||||||
|
|
||||||
In the Cygwin shell:
|
|
||||||
```
|
|
||||||
$ cd JetBrainsRuntime
|
|
||||||
$ git checkout jbr-dev
|
|
||||||
$ bash configure --with-toolchain-version=2019
|
|
||||||
$ make images
|
|
||||||
```
|
|
||||||
This will build the release configuration under `./build/windows-x86_64-server-release/`.
|
|
||||||
|
|
||||||
### macOS
|
|
||||||
Install the following:
|
|
||||||
* Xcode command line developer tools and `autoconf` via [Homebrew](https://brew.sh/).
|
|
||||||
* Java 17 (for instance, [Azul Zulu Builds of OpenJDK 17](https://www.azul.com/downloads/?version=java-17-ea&package=jdk)).
|
|
||||||
|
|
||||||
From the command line:
|
|
||||||
```
|
|
||||||
$ cd JetBrainsRuntime
|
|
||||||
$ git checkout jbr-dev
|
|
||||||
$ sh ./configure
|
|
||||||
$ make images
|
|
||||||
```
|
|
||||||
This will build the release configuration under `./build/macosx-x86_64-server-release/`.
|
|
||||||
|
|
||||||
## Developing
|
|
||||||
You can use [CLion](https://www.jetbrains.com/clion/) to develop native parts of the JetBrains Runtime and
|
|
||||||
[IntelliJ IDEA](https://www.jetbrains.com/idea/) for the parts written in Java.
|
|
||||||
Both require projects to be created.
|
|
||||||
|
|
||||||
### CLion
|
|
||||||
Run
|
|
||||||
```
|
|
||||||
$ make compile-commands
|
|
||||||
```
|
|
||||||
in the git root and open the resulting `build/.../compile_commands.json` file as a project.
|
|
||||||
Then use `Tools | Compilation Database | Change Project Root` to point to git root of this repository.
|
|
||||||
|
|
||||||
See also this detailed step-by-step tutorial for all platforms:
|
|
||||||
[How to develop OpenJDK with CLion](https://blog.jetbrains.com/clion/2020/03/openjdk-with-clion/).
|
|
||||||
|
|
||||||
### IDEA
|
|
||||||
Run
|
|
||||||
```
|
|
||||||
$ sh ./bin/idea.sh
|
|
||||||
```
|
|
||||||
in the git root to generate project files (add `--help` for options). If you have multiple
|
|
||||||
configurations (for example, `release` and `fastdebug`), supply the `--conf <conf_name>` argument.
|
|
||||||
Then open the git root directory as a project in IDEA.
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
We are happy to receive your pull requests!
|
|
||||||
Before you submit one, please sign our [Contributor License Agreement (CLA)](https://www.jetbrains.com/agreements/cla/).
|
|
||||||
|
|
||||||
## Resources
|
|
||||||
* [JetBrains Runtime on github](https://github.com/JetBrains/JetBrainsRuntime).
|
|
||||||
* [OpenJDK build instructions](https://openjdk.java.net/groups/build/doc/building.html).
|
|
||||||
* [OpenJDK test instructions](https://htmlpreview.github.io/?https://raw.githubusercontent.com/openjdk/jdk/master/doc/building.html#running-tests).
|
|
||||||
|
|||||||
292
bin/idea.sh
292
bin/idea.sh
@@ -25,26 +25,7 @@
|
|||||||
# Shell script for generating an IDEA project from a given list of modules
|
# Shell script for generating an IDEA project from a given list of modules
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: $0 [-h|--help] [-q|--quiet] [-a|--absolute-paths] [-r|--root <path>] [-o|--output <path>] [-c|--conf <conf_name>] [modules...]"
|
echo "usage: $0 [-h|--help] [-v|--verbose] [-o|--output <path>] [modules]+"
|
||||||
echo " -h | --help"
|
|
||||||
echo " -q | --quiet
|
|
||||||
No stdout output"
|
|
||||||
echo " -a | --absolute-paths
|
|
||||||
Use absolute paths to this jdk, so that generated .idea
|
|
||||||
project files can be moved independently of jdk sources"
|
|
||||||
echo " -r | --root <path>
|
|
||||||
Project content root
|
|
||||||
Default: $TOPLEVEL_DIR"
|
|
||||||
echo " -o | --output <path>
|
|
||||||
Where .idea directory with project files will be generated
|
|
||||||
(e.g. using '-o .' will place project files in './.idea')
|
|
||||||
Default: same as --root"
|
|
||||||
echo " -c | --conf <conf_name>
|
|
||||||
make configuration (release, slowdebug etc)"
|
|
||||||
echo " [modules...]
|
|
||||||
Generate project modules for specific java modules
|
|
||||||
(e.g. 'java.base java.desktop')
|
|
||||||
Default: all existing modules (java.* and jdk.*)"
|
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,14 +33,10 @@ SCRIPT_DIR=`dirname $0`
|
|||||||
#assume TOP is the dir from which the script has been called
|
#assume TOP is the dir from which the script has been called
|
||||||
TOP=`pwd`
|
TOP=`pwd`
|
||||||
cd $SCRIPT_DIR; SCRIPT_DIR=`pwd`
|
cd $SCRIPT_DIR; SCRIPT_DIR=`pwd`
|
||||||
if [ "x$TOPLEVEL_DIR" = "x" ] ; then
|
|
||||||
cd .. ; TOPLEVEL_DIR=`pwd`
|
|
||||||
fi
|
|
||||||
cd $TOP;
|
cd $TOP;
|
||||||
|
|
||||||
VERBOSE=true
|
IDEA_OUTPUT=$TOP/.idea
|
||||||
ABSOLUTE_PATHS=false
|
VERBOSE="false"
|
||||||
CONF_ARG=
|
|
||||||
while [ $# -gt 0 ]
|
while [ $# -gt 0 ]
|
||||||
do
|
do
|
||||||
case $1 in
|
case $1 in
|
||||||
@@ -67,26 +44,12 @@ do
|
|||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-q | --quiet )
|
-v | --vebose )
|
||||||
VERBOSE=false
|
VERBOSE="true"
|
||||||
;;
|
|
||||||
|
|
||||||
-a | --absolute-paths )
|
|
||||||
ABSOLUTE_PATHS=true
|
|
||||||
;;
|
|
||||||
|
|
||||||
-r | --root )
|
|
||||||
TOPLEVEL_DIR="$2"
|
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-o | --output )
|
-o | --output )
|
||||||
IDEA_OUTPUT="$2/.idea"
|
IDEA_OUTPUT=$2/.idea
|
||||||
shift
|
|
||||||
;;
|
|
||||||
|
|
||||||
-c | --conf )
|
|
||||||
CONF_ARG="CONF_NAME=$2"
|
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -101,21 +64,20 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "x$IDEA_OUTPUT" = "x" ] ; then
|
mkdir -p $IDEA_OUTPUT || exit 1
|
||||||
IDEA_OUTPUT="$TOPLEVEL_DIR/.idea"
|
cd $IDEA_OUTPUT; IDEA_OUTPUT=`pwd`
|
||||||
|
|
||||||
|
if [ "x$TOPLEVEL_DIR" = "x" ] ; then
|
||||||
|
cd $SCRIPT_DIR/..
|
||||||
|
TOPLEVEL_DIR=`pwd`
|
||||||
|
cd $IDEA_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p $IDEA_OUTPUT || exit 1
|
MAKE_DIR="$SCRIPT_DIR/../make"
|
||||||
cd "$TOP" ; cd $TOPLEVEL_DIR; TOPLEVEL_DIR=`pwd`
|
IDEA_MAKE="$MAKE_DIR/ide/idea/jdk"
|
||||||
cd "$TOP" ; cd $IDEA_OUTPUT; IDEA_OUTPUT=`pwd`
|
|
||||||
cd ..; IDEA_OUTPUT_PARENT=`pwd`
|
|
||||||
cd "$SCRIPT_DIR/.." ; OPENJDK_DIR=`pwd`
|
|
||||||
|
|
||||||
IDEA_MAKE="$OPENJDK_DIR/make/ide/idea/jdk"
|
|
||||||
IDEA_TEMPLATE="$IDEA_MAKE/template"
|
IDEA_TEMPLATE="$IDEA_MAKE/template"
|
||||||
|
|
||||||
cp -rn "$TOPLEVEL_DIR/jb/project/idea-project-files"/* "$IDEA_OUTPUT"
|
cp -r "$IDEA_TEMPLATE"/* "$IDEA_OUTPUT"
|
||||||
cp -rn "$IDEA_TEMPLATE"/* "$IDEA_OUTPUT"
|
|
||||||
|
|
||||||
#override template
|
#override template
|
||||||
if [ -d "$TEMPLATES_OVERRIDE" ] ; then
|
if [ -d "$TEMPLATES_OVERRIDE" ] ; then
|
||||||
@@ -124,31 +86,31 @@ if [ -d "$TEMPLATES_OVERRIDE" ] ; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$VERBOSE" = true ] ; then
|
if [ "$VERBOSE" = "true" ] ; then
|
||||||
echo "Will generate IDEA project files in \"$IDEA_OUTPUT\" for project \"$TOPLEVEL_DIR\""
|
echo "output dir: $IDEA_OUTPUT"
|
||||||
|
echo "idea template dir: $IDEA_TEMPLATE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I "$OPENJDK_DIR" idea TOPLEVEL_DIR="$TOPLEVEL_DIR" \
|
cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I $MAKE_DIR/.. idea MAKEOVERRIDES= OUT=$IDEA_OUTPUT/env.cfg MODULES="$*" || exit 1
|
||||||
MAKEOVERRIDES= IDEA_OUTPUT_PARENT="$IDEA_OUTPUT_PARENT" OUT="$IDEA_OUTPUT/env.cfg" MODULES="$*" $CONF_ARG || exit 1
|
|
||||||
cd $SCRIPT_DIR
|
cd $SCRIPT_DIR
|
||||||
|
|
||||||
. $IDEA_OUTPUT/env.cfg
|
. $IDEA_OUTPUT/env.cfg
|
||||||
|
|
||||||
# Expect MODULES, MODULE_NAMES, RELATIVE_PROJECT_DIR, RELATIVE_BUILD_DIR to be set
|
# Expect MODULE_ROOTS, MODULE_NAMES, BOOT_JDK & SPEC to be set
|
||||||
if [ "xMODULES" = "x" ] ; then
|
if [ "x$MODULE_ROOTS" = "x" ] ; then
|
||||||
echo "FATAL: MODULES is empty" >&2; exit 1
|
echo "FATAL: MODULE_ROOTS is empty" >&2; exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "x$MODULE_NAMES" = "x" ] ; then
|
if [ "x$MODULE_NAMES" = "x" ] ; then
|
||||||
echo "FATAL: MODULE_NAMES is empty" >&2; exit 1
|
echo "FATAL: MODULE_NAMES is empty" >&2; exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "x$RELATIVE_PROJECT_DIR" = "x" ] ; then
|
if [ "x$BOOT_JDK" = "x" ] ; then
|
||||||
echo "FATAL: RELATIVE_PROJECT_DIR is empty" >&2; exit 1
|
echo "FATAL: BOOT_JDK is empty" >&2; exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "x$RELATIVE_BUILD_DIR" = "x" ] ; then
|
if [ "x$SPEC" = "x" ] ; then
|
||||||
echo "FATAL: RELATIVE_BUILD_DIR is empty" >&2; exit 1
|
echo "FATAL: SPEC is empty" >&2; exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$TOPLEVEL_DIR/.hg" ] ; then
|
if [ -d "$TOPLEVEL_DIR/.hg" ] ; then
|
||||||
@@ -159,43 +121,6 @@ if [ -d "$TOPLEVEL_DIR/.git" ] ; then
|
|||||||
VCS_TYPE="Git"
|
VCS_TYPE="Git"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$ABSOLUTE_PATHS" = true ] ; then
|
|
||||||
if [ "x$PATHTOOL" != "x" ]; then
|
|
||||||
PROJECT_DIR="`$PATHTOOL -am $OPENJDK_DIR`"
|
|
||||||
TOPLEVEL_PROJECT_DIR="`$PATHTOOL -am $TOPLEVEL_DIR`"
|
|
||||||
else
|
|
||||||
PROJECT_DIR="$OPENJDK_DIR"
|
|
||||||
TOPLEVEL_PROJECT_DIR="$TOPLEVEL_DIR"
|
|
||||||
fi
|
|
||||||
MODULE_DIR="$PROJECT_DIR"
|
|
||||||
TOPLEVEL_MODULE_DIR="$TOPLEVEL_PROJECT_DIR"
|
|
||||||
cd "$IDEA_OUTPUT_PARENT" && cd "$RELATIVE_BUILD_DIR" && BUILD_DIR="`pwd`"
|
|
||||||
CLION_SCRIPT_TOPDIR="$OPENJDK_DIR"
|
|
||||||
CLION_PROJECT_DIR="$PROJECT_DIR"
|
|
||||||
else
|
|
||||||
if [ "$RELATIVE_PROJECT_DIR" = "." ] ; then
|
|
||||||
PROJECT_DIR=""
|
|
||||||
else
|
|
||||||
PROJECT_DIR="/$RELATIVE_PROJECT_DIR"
|
|
||||||
fi
|
|
||||||
if [ "$RELATIVE_TOPLEVEL_PROJECT_DIR" = "." ] ; then
|
|
||||||
TOPLEVEL_PROJECT_DIR=""
|
|
||||||
else
|
|
||||||
TOPLEVEL_PROJECT_DIR="/$RELATIVE_TOPLEVEL_PROJECT_DIR"
|
|
||||||
fi
|
|
||||||
MODULE_DIR="\$MODULE_DIR\$$PROJECT_DIR"
|
|
||||||
PROJECT_DIR="\$PROJECT_DIR\$$PROJECT_DIR"
|
|
||||||
TOPLEVEL_MODULE_DIR="\$MODULE_DIR\$$TOPLEVEL_PROJECT_DIR"
|
|
||||||
TOPLEVEL_PROJECT_DIR="\$PROJECT_DIR\$$TOPLEVEL_PROJECT_DIR"
|
|
||||||
BUILD_DIR="\$PROJECT_DIR\$/$RELATIVE_BUILD_DIR"
|
|
||||||
CLION_SCRIPT_TOPDIR="$CLION_RELATIVE_PROJECT_DIR"
|
|
||||||
CLION_PROJECT_DIR="\$PROJECT_DIR\$/$CLION_SCRIPT_TOPDIR"
|
|
||||||
fi
|
|
||||||
if [ "$VERBOSE" = true ] ; then
|
|
||||||
echo "Project root: $PROJECT_DIR"
|
|
||||||
echo "Generating IDEA project files..."
|
|
||||||
fi
|
|
||||||
|
|
||||||
### Replace template variables
|
### Replace template variables
|
||||||
|
|
||||||
NUM_REPLACEMENTS=0
|
NUM_REPLACEMENTS=0
|
||||||
@@ -219,106 +144,105 @@ add_replacement() {
|
|||||||
eval TO$NUM_REPLACEMENTS='$2'
|
eval TO$NUM_REPLACEMENTS='$2'
|
||||||
}
|
}
|
||||||
|
|
||||||
add_replacement "###PATHTOOL###" "$PATHTOOL"
|
|
||||||
add_replacement "###CLION_SCRIPT_TOPDIR###" "$CLION_SCRIPT_TOPDIR"
|
|
||||||
add_replacement "###CLION_PROJECT_DIR###" "$CLION_PROJECT_DIR"
|
|
||||||
add_replacement "###PROJECT_DIR###" "$PROJECT_DIR"
|
|
||||||
add_replacement "###MODULE_DIR###" "$MODULE_DIR"
|
|
||||||
add_replacement "###TOPLEVEL_PROJECT_DIR###" "$TOPLEVEL_PROJECT_DIR"
|
|
||||||
add_replacement "###TOPLEVEL_MODULE_DIR###" "$TOPLEVEL_MODULE_DIR"
|
|
||||||
add_replacement "###MODULE_NAMES###" "$MODULE_NAMES"
|
add_replacement "###MODULE_NAMES###" "$MODULE_NAMES"
|
||||||
add_replacement "###VCS_TYPE###" "$VCS_TYPE"
|
add_replacement "###VCS_TYPE###" "$VCS_TYPE"
|
||||||
add_replacement "###BUILD_DIR###" "$BUILD_DIR"
|
SPEC_DIR=`dirname $SPEC`
|
||||||
add_replacement "###RELATIVE_BUILD_DIR###" "$RELATIVE_BUILD_DIR"
|
if [ "x$CYGPATH" != "x" ]; then
|
||||||
if [ "x$PATHTOOL" != "x" ]; then
|
add_replacement "###BUILD_DIR###" "`cygpath -am $SPEC_DIR`"
|
||||||
add_replacement "###BASH_RUNNER_PREFIX###" "\$PROJECT_DIR\$/.idea/bash.bat"
|
add_replacement "###IMAGES_DIR###" "`cygpath -am $SPEC_DIR`/images/jdk"
|
||||||
else
|
add_replacement "###ROOT_DIR###" "`cygpath -am $TOPLEVEL_DIR`"
|
||||||
add_replacement "###BASH_RUNNER_PREFIX###" ""
|
add_replacement "###IDEA_DIR###" "`cygpath -am $IDEA_OUTPUT`"
|
||||||
fi
|
|
||||||
if [ "x$PATHTOOL" != "x" ]; then
|
|
||||||
if [ "x$JT_HOME" = "x" ]; then
|
if [ "x$JT_HOME" = "x" ]; then
|
||||||
add_replacement "###JTREG_HOME###" ""
|
add_replacement "###JTREG_HOME###" ""
|
||||||
else
|
else
|
||||||
add_replacement "###JTREG_HOME###" "`$PATHTOOL -am $JT_HOME`"
|
add_replacement "###JTREG_HOME###" "`cygpath -am $JT_HOME`"
|
||||||
|
fi
|
||||||
|
elif [ "x$WSL_DISTRO_NAME" != "x" ]; then
|
||||||
|
add_replacement "###BUILD_DIR###" "`wslpath -am $SPEC_DIR`"
|
||||||
|
add_replacement "###IMAGES_DIR###" "`wslpath -am $SPEC_DIR`/images/jdk"
|
||||||
|
add_replacement "###ROOT_DIR###" "`wslpath -am $TOPLEVEL_DIR`"
|
||||||
|
add_replacement "###IDEA_DIR###" "`wslpath -am $IDEA_OUTPUT`"
|
||||||
|
if [ "x$JT_HOME" = "x" ]; then
|
||||||
|
add_replacement "###JTREG_HOME###" ""
|
||||||
|
else
|
||||||
|
add_replacement "###JTREG_HOME###" "`wslpath -am $JT_HOME`"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
add_replacement "###BUILD_DIR###" "$SPEC_DIR"
|
||||||
add_replacement "###JTREG_HOME###" "$JT_HOME"
|
add_replacement "###JTREG_HOME###" "$JT_HOME"
|
||||||
|
add_replacement "###IMAGES_DIR###" "$SPEC_DIR/images/jdk"
|
||||||
|
add_replacement "###ROOT_DIR###" "$TOPLEVEL_DIR"
|
||||||
|
add_replacement "###IDEA_DIR###" "$IDEA_OUTPUT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MODULE_IMLS=""
|
SOURCE_PREFIX="<sourceFolder url=\"file://"
|
||||||
TEST_MODULE_DEPENDENCIES=""
|
SOURCE_POSTFIX="\" isTestSource=\"false\" />"
|
||||||
for module in $MODULE_NAMES; do
|
|
||||||
MODULE_IMLS="$MODULE_IMLS<module fileurl=\"file://\$PROJECT_DIR$/.idea/$module.iml\" filepath=\"\$PROJECT_DIR$/.idea/$module.iml\" /> "
|
for root in $MODULE_ROOTS; do
|
||||||
TEST_MODULE_DEPENDENCIES="$TEST_MODULE_DEPENDENCIES<orderEntry type=\"module\" module-name=\"$module\" scope=\"TEST\" /> "
|
if [ "x$CYGPATH" != "x" ]; then
|
||||||
|
root=`cygpath -am $root`
|
||||||
|
elif [ "x$WSL_DISTRO_NAME" != "x" ]; then
|
||||||
|
root=`wslpath -am $root`
|
||||||
|
fi
|
||||||
|
|
||||||
|
VM_CI="jdk.internal.vm.ci/share/classes"
|
||||||
|
VM_COMPILER="src/jdk.internal.vm.compiler/share/classes"
|
||||||
|
if test "${root#*$VM_CI}" != "$root" || test "${root#*$VM_COMPILER}" != "$root"; then
|
||||||
|
for subdir in "$root"/*; do
|
||||||
|
if [ -d "$subdir" ]; then
|
||||||
|
SOURCES=$SOURCES" $SOURCE_PREFIX""$subdir"/src"$SOURCE_POSTFIX"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
SOURCES=$SOURCES" $SOURCE_PREFIX""$root""$SOURCE_POSTFIX"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
add_replacement "###MODULE_IMLS###" "$MODULE_IMLS"
|
|
||||||
add_replacement "###TEST_MODULE_DEPENDENCIES###" "$TEST_MODULE_DEPENDENCIES"
|
add_replacement "###SOURCE_ROOTS###" "$SOURCES"
|
||||||
|
|
||||||
replace_template_dir "$IDEA_OUTPUT"
|
replace_template_dir "$IDEA_OUTPUT"
|
||||||
|
|
||||||
### Generate module project files
|
### Compile the custom Logger
|
||||||
|
|
||||||
if [ "$VERBOSE" = true ] ; then
|
CLASSES=$IDEA_OUTPUT/classes
|
||||||
echo "Generating project modules:"
|
|
||||||
fi
|
|
||||||
(
|
|
||||||
DEFAULT_IFS="$IFS"
|
|
||||||
IFS='#'
|
|
||||||
for value in $MODULES; do
|
|
||||||
(
|
|
||||||
eval "$value"
|
|
||||||
if [ "$VERBOSE" = true ] ; then
|
|
||||||
echo " $module"
|
|
||||||
fi
|
|
||||||
MAIN_SOURCE_DIRS=""
|
|
||||||
CONTENT_ROOTS=""
|
|
||||||
IFS=' '
|
|
||||||
for dir in $moduleSrcDirs; do
|
|
||||||
case $dir in
|
|
||||||
"src/"*) MAIN_SOURCE_DIRS="$MAIN_SOURCE_DIRS <sourceFolder url=\"file://$MODULE_DIR/$dir\" isTestSource=\"false\" />" ;;
|
|
||||||
*"/support/gensrc/$module") ;; # Exclude generated sources to avoid module-info conflicts, see https://youtrack.jetbrains.com/issue/IDEA-185108
|
|
||||||
*) CONTENT_ROOTS="$CONTENT_ROOTS <content url=\"file://$MODULE_DIR/$dir\">\
|
|
||||||
<sourceFolder url=\"file://$MODULE_DIR/$dir\" isTestSource=\"false\" generated=\"true\" /></content>" ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
if [ "x$MAIN_SOURCE_DIRS" != "x" ] ; then
|
|
||||||
CONTENT_ROOTS="<content url=\"file://$MODULE_DIR/src/$module\">$MAIN_SOURCE_DIRS</content>$CONTENT_ROOTS"
|
|
||||||
fi
|
|
||||||
add_replacement "###MODULE_CONTENT_ROOTS###" "$CONTENT_ROOTS"
|
|
||||||
DEPENDENCIES=""
|
|
||||||
for dep in $moduleDependencies; do
|
|
||||||
case $MODULE_NAMES in # Exclude skipped modules from dependencies
|
|
||||||
*"$dep"*) DEPENDENCIES="$DEPENDENCIES<orderEntry type=\"module\" module-name=\"$dep\" /> "
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
add_replacement "###DEPENDENCIES###" "$DEPENDENCIES"
|
|
||||||
cp "$IDEA_OUTPUT/module.iml" "$IDEA_OUTPUT/$module.iml"
|
|
||||||
IFS="$DEFAULT_IFS"
|
|
||||||
replace_template_file "$IDEA_OUTPUT/$module.iml"
|
|
||||||
)
|
|
||||||
done
|
|
||||||
)
|
|
||||||
rm "$IDEA_OUTPUT/module.iml"
|
|
||||||
|
|
||||||
### Create shell script runner for Windows
|
if [ "x$ANT_HOME" = "x" ] ; then
|
||||||
|
# try some common locations, before giving up
|
||||||
|
if [ -f "/usr/share/ant/lib/ant.jar" ] ; then
|
||||||
|
ANT_HOME="/usr/share/ant"
|
||||||
|
elif [ -f "/usr/local/Cellar/ant/1.9.4/libexec/lib/ant.jar" ] ; then
|
||||||
|
ANT_HOME="/usr/local/Cellar/ant/1.9.4/libexec"
|
||||||
|
else
|
||||||
|
echo "FATAL: cannot find ant. Try setting ANT_HOME." >&2; exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
CP=$ANT_HOME/lib/ant.jar
|
||||||
|
rm -rf $CLASSES; mkdir $CLASSES
|
||||||
|
|
||||||
if [ "x$PATHTOOL" != "x" ]; then
|
if [ "x$CYGPATH" != "x" ] ; then ## CYGPATH may be set in env.cfg
|
||||||
echo "@echo off" > "$IDEA_OUTPUT/bash.bat"
|
JAVAC_SOURCE_FILE=`cygpath -am $IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java`
|
||||||
if [ "x$WSL_DISTRO_NAME" != "x" ] ; then
|
JAVAC_SOURCE_PATH=`cygpath -am $IDEA_OUTPUT/src`
|
||||||
echo "wsl -d $WSL_DISTRO_NAME --cd \"%cd%\" -e %*" >> "$IDEA_OUTPUT/bash.bat"
|
JAVAC_CLASSES=`cygpath -am $CLASSES`
|
||||||
else
|
JAVAC_CP=`cygpath -am $CP`
|
||||||
echo "$WINENV_ROOT\bin\bash.exe -l -c \"cd %CD:\=/%/ && %*\"" >> "$IDEA_OUTPUT/bash.bat"
|
JAVAC=javac
|
||||||
fi
|
elif [ "x$WSL_DISTRO_NAME" != "x" ]; then
|
||||||
|
JAVAC_SOURCE_FILE=`realpath --relative-to=./ $IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java`
|
||||||
|
JAVAC_SOURCE_PATH=`realpath --relative-to=./ $IDEA_OUTPUT/src`
|
||||||
|
JAVAC_CLASSES=`realpath --relative-to=./ $CLASSES`
|
||||||
|
ANT_TEMP=`mktemp -d -p ./`
|
||||||
|
cp $ANT_HOME/lib/ant.jar $ANT_TEMP/ant.jar
|
||||||
|
JAVAC_CP=$ANT_TEMP/ant.jar
|
||||||
|
JAVAC=javac.exe
|
||||||
|
else
|
||||||
|
JAVAC_SOURCE_FILE=$IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java
|
||||||
|
JAVAC_SOURCE_PATH=$IDEA_OUTPUT/src
|
||||||
|
JAVAC_CLASSES=$CLASSES
|
||||||
|
JAVAC_CP=$CP
|
||||||
|
JAVAC=javac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
$BOOT_JDK/bin/$JAVAC -d $JAVAC_CLASSES -sourcepath $JAVAC_SOURCE_PATH -cp $JAVAC_CP $JAVAC_SOURCE_FILE
|
||||||
|
|
||||||
|
if [ "x$WSL_DISTRO_NAME" != "x" ]; then
|
||||||
if [ "$VERBOSE" = true ] ; then
|
rm -rf $ANT_TEMP
|
||||||
IDEA_PROJECT_DIR="`dirname $IDEA_OUTPUT`"
|
|
||||||
if [ "x$PATHTOOL" != "x" ]; then
|
|
||||||
IDEA_PROJECT_DIR="`$PATHTOOL -am $IDEA_PROJECT_DIR`"
|
|
||||||
fi
|
|
||||||
echo "
|
|
||||||
Now you can open \"$IDEA_PROJECT_DIR\" as IDEA project
|
|
||||||
You can also run 'bash \"$IDEA_OUTPUT/jdk-clion/update-project.sh\"' to generate Clion project"
|
|
||||||
fi
|
fi
|
||||||
@@ -128,6 +128,15 @@ install_jib() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
# Want to check the filetype using file, to see if we got served a HTML error page.
|
||||||
|
# This is sensitive to the filename containing a specific string, but good enough.
|
||||||
|
file "${installed_jib_script}.gz" | grep "gzip compressed data" > /dev/null
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Warning: ${installed_jib_script}.gz is not a gzip file."
|
||||||
|
echo "If you are behind a proxy you may need to configure exceptions using no_proxy."
|
||||||
|
echo "The download URL was: ${jib_url}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
echo "Extracting JIB bootstrap script"
|
echo "Extracting JIB bootstrap script"
|
||||||
rm -f "${installed_jib_script}"
|
rm -f "${installed_jib_script}"
|
||||||
gunzip "${installed_jib_script}.gz"
|
gunzip "${installed_jib_script}.gz"
|
||||||
|
|||||||
@@ -70,6 +70,9 @@
|
|||||||
<li><a href="#make-control-variables">Make Control Variables</a></li>
|
<li><a href="#make-control-variables">Make Control Variables</a></li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
<li><a href="#running-tests">Running Tests</a></li>
|
<li><a href="#running-tests">Running Tests</a></li>
|
||||||
|
<li><a href="#signing">Signing</a><ul>
|
||||||
|
<li><a href="#macos-1">macOS</a></li>
|
||||||
|
</ul></li>
|
||||||
<li><a href="#cross-compiling">Cross-compiling</a><ul>
|
<li><a href="#cross-compiling">Cross-compiling</a><ul>
|
||||||
<li><a href="#cross-compiling-the-easy-way-with-openjdk-devkits">Cross compiling the easy way with OpenJDK devkits</a></li>
|
<li><a href="#cross-compiling-the-easy-way-with-openjdk-devkits">Cross compiling the easy way with OpenJDK devkits</a></li>
|
||||||
<li><a href="#boot-jdk-and-build-jdk">Boot JDK and Build JDK</a></li>
|
<li><a href="#boot-jdk-and-build-jdk">Boot JDK and Build JDK</a></li>
|
||||||
@@ -96,7 +99,6 @@
|
|||||||
<li><a href="#specific-build-issues">Specific Build Issues</a></li>
|
<li><a href="#specific-build-issues">Specific Build Issues</a></li>
|
||||||
<li><a href="#getting-help">Getting Help</a></li>
|
<li><a href="#getting-help">Getting Help</a></li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
<li><a href="#reproducible-builds">Reproducible Builds</a></li>
|
|
||||||
<li><a href="#hints-and-suggestions-for-advanced-users">Hints and Suggestions for Advanced Users</a><ul>
|
<li><a href="#hints-and-suggestions-for-advanced-users">Hints and Suggestions for Advanced Users</a><ul>
|
||||||
<li><a href="#bash-completion">Bash Completion</a></li>
|
<li><a href="#bash-completion">Bash Completion</a></li>
|
||||||
<li><a href="#using-multiple-configurations">Using Multiple Configurations</a></li>
|
<li><a href="#using-multiple-configurations">Using Multiple Configurations</a></li>
|
||||||
@@ -196,7 +198,7 @@
|
|||||||
<h3 id="windows">Windows</h3>
|
<h3 id="windows">Windows</h3>
|
||||||
<p>Windows XP is not a supported platform, but all newer Windows should be able to build the JDK.</p>
|
<p>Windows XP is not a supported platform, but all newer Windows should be able to build the JDK.</p>
|
||||||
<p>On Windows, it is important that you pay attention to the instructions in the <a href="#special-considerations">Special Considerations</a>.</p>
|
<p>On Windows, it is important that you pay attention to the instructions in the <a href="#special-considerations">Special Considerations</a>.</p>
|
||||||
<p>Windows is the only non-POSIX OS supported by the JDK, and as such, requires some extra care. A POSIX support layer is required to build on Windows. Currently, the only supported such layers are Cygwin and Windows Subsystem for Linux (WSL). (Msys is no longer supported due to a too old bash; msys2 would likely be possible to support in a future version but that would require effort to implement.)</p>
|
<p>Windows is the only non-POSIX OS supported by the JDK, and as such, requires some extra care. A POSIX support layer is required to build on Windows. Currently, the only supported such layers are Cygwin, Windows Subsystem for Linux (WSL), and MSYS2. (MSYS is no longer supported due to an outdated bash; While OpenJDK can be built with MSYS2, support for it is still experimental, so build failures and unusual errors are not uncommon.)</p>
|
||||||
<p>Internally in the build system, all paths are represented as Unix-style paths, e.g. <code>/cygdrive/c/git/jdk/Makefile</code> rather than <code>C:\git\jdk\Makefile</code>. This rule also applies to input to the build system, e.g. in arguments to <code>configure</code>. So, use <code>--with-msvcr-dll=/cygdrive/c/msvcr100.dll</code> rather than <code>--with-msvcr-dll=c:\msvcr100.dll</code>. For details on this conversion, see the section on <a href="#fixpath">Fixpath</a>.</p>
|
<p>Internally in the build system, all paths are represented as Unix-style paths, e.g. <code>/cygdrive/c/git/jdk/Makefile</code> rather than <code>C:\git\jdk\Makefile</code>. This rule also applies to input to the build system, e.g. in arguments to <code>configure</code>. So, use <code>--with-msvcr-dll=/cygdrive/c/msvcr100.dll</code> rather than <code>--with-msvcr-dll=c:\msvcr100.dll</code>. For details on this conversion, see the section on <a href="#fixpath">Fixpath</a>.</p>
|
||||||
<h4 id="cygwin">Cygwin</h4>
|
<h4 id="cygwin">Cygwin</h4>
|
||||||
<p>A functioning <a href="http://www.cygwin.com/">Cygwin</a> environment is required for building the JDK on Windows. If you have a 64-bit OS, we strongly recommend using the 64-bit version of Cygwin.</p>
|
<p>A functioning <a href="http://www.cygwin.com/">Cygwin</a> environment is required for building the JDK on Windows. If you have a 64-bit OS, we strongly recommend using the 64-bit version of Cygwin.</p>
|
||||||
@@ -237,26 +239,26 @@
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="header">
|
<tr class="header">
|
||||||
<th style="text-align: left;">Operating system</th>
|
<th>Operating system</th>
|
||||||
<th style="text-align: left;">Supported toolchain</th>
|
<th>Supported toolchain</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td style="text-align: left;">Linux</td>
|
<td>Linux</td>
|
||||||
<td style="text-align: left;">gcc, clang</td>
|
<td>gcc, clang</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td style="text-align: left;">macOS</td>
|
<td>macOS</td>
|
||||||
<td style="text-align: left;">Apple Xcode (using clang)</td>
|
<td>Apple Xcode (using clang)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td style="text-align: left;">AIX</td>
|
<td>AIX</td>
|
||||||
<td style="text-align: left;">IBM XL C/C++</td>
|
<td>IBM XL C/C++</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td style="text-align: left;">Windows</td>
|
<td>Windows</td>
|
||||||
<td style="text-align: left;">Microsoft Visual Studio</td>
|
<td>Microsoft Visual Studio</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -264,38 +266,42 @@
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="header">
|
<tr class="header">
|
||||||
<th style="text-align: left;">Operating system</th>
|
<th>Operating system</th>
|
||||||
<th style="text-align: left;">Toolchain version</th>
|
<th>Toolchain version</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td style="text-align: left;">Linux</td>
|
<td>Linux</td>
|
||||||
<td style="text-align: left;">gcc 10.2.0</td>
|
<td>gcc 11.2.0</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td style="text-align: left;">macOS</td>
|
<td>macOS</td>
|
||||||
<td style="text-align: left;">Apple Xcode 10.1 (using clang 10.0.0)</td>
|
<td>Apple Xcode 10.1 (using clang 10.0.0)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td style="text-align: left;">Windows</td>
|
<td>Windows</td>
|
||||||
<td style="text-align: left;">Microsoft Visual Studio 2019 update 16.7.2</td>
|
<td>Microsoft Visual Studio 2022 update 17.1.0</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</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>
|
<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>
|
<h3 id="gcc">gcc</h3>
|
||||||
<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 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 10.2 of gcc.</p>
|
<p>The JDK is currently known to be able to compile with at least version 11.2 of gcc.</p>
|
||||||
<p>In general, any version between these two should be usable.</p>
|
<p>In general, any version between these two should be usable.</p>
|
||||||
<h3 id="clang">clang</h3>
|
<h3 id="clang">clang</h3>
|
||||||
<p>The minimum accepted version of clang is 3.5. Older versions will not be accepted by <code>configure</code>.</p>
|
<p>The minimum accepted version of clang is 3.5. Older versions will not be accepted by <code>configure</code>.</p>
|
||||||
<p>To use clang instead of gcc on Linux, use <code>--with-toolchain-type=clang</code>.</p>
|
<p>To use clang instead of gcc on Linux, use <code>--with-toolchain-type=clang</code>.</p>
|
||||||
<h3 id="apple-xcode">Apple Xcode</h3>
|
<h3 id="apple-xcode">Apple Xcode</h3>
|
||||||
<p>The oldest supported version of Xcode is 8.</p>
|
<p>The oldest supported version of Xcode is 8.</p>
|
||||||
<p>You will need the Xcode command lines developers tools to be able to build the JDK. (Actually, <em>only</em> the command lines tools are needed, not the IDE.) The simplest way to install these is to run:</p>
|
<p>You will need the Xcode command line developer tools to be able to build the JDK. (Actually, <em>only</em> the command line tools are needed, not the IDE.) The simplest way to install these is to run:</p>
|
||||||
<pre><code>xcode-select --install</code></pre>
|
<pre><code>xcode-select --install</code></pre>
|
||||||
<p>It is advisable to keep an older version of Xcode for building the JDK when updating Xcode. This <a href="http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html">blog page</a> has good suggestions on managing multiple Xcode versions. To use a specific version of Xcode, use <code>xcode-select -s</code> before running <code>configure</code>, or use <code>--with-toolchain-path</code> to point to the version of Xcode to use, e.g. <code>configure --with-toolchain-path=/Applications/Xcode8.app/Contents/Developer/usr/bin</code></p>
|
<p>When updating Xcode, it is advisable to keep an older version for building the JDK. To use a specific version of Xcode you have multiple options:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Use <code>xcode-select -s</code> before running <code>configure</code>, e.g. <code>xcode-select -s /Applications/Xcode13.1.app</code>. The drawback is that the setting is system wide and you may have to revert it after an OpenJDK build.</li>
|
||||||
|
<li>Use configure option <code>--with-xcode-path</code>, e.g. <code>configure --with-xcode-path=/Applications/Xcode13.1.app</code> This allows using a specific Xcode version for an OpenJDK build, independently of the active Xcode version by <code>xcode-select</code>.</li>
|
||||||
|
</ul>
|
||||||
<p>If you have recently (inadvertently) updated your OS and/or Xcode version, and the JDK can no longer be built, please see the section on <a href="#problems-with-the-build-environment">Problems with the Build Environment</a>, and <a href="#getting-help">Getting Help</a> to find out if there are any recent, non-merged patches available for this update.</p>
|
<p>If you have recently (inadvertently) updated your OS and/or Xcode version, and the JDK can no longer be built, please see the section on <a href="#problems-with-the-build-environment">Problems with the Build Environment</a>, and <a href="#getting-help">Getting Help</a> to find out if there are any recent, non-merged patches available for this update.</p>
|
||||||
<h3 id="microsoft-visual-studio">Microsoft Visual Studio</h3>
|
<h3 id="microsoft-visual-studio">Microsoft Visual Studio</h3>
|
||||||
<p>The minimum accepted version of Visual Studio is 2017. Older versions will not be accepted by <code>configure</code> and will not work. The maximum accepted version of Visual Studio is 2019.</p>
|
<p>The minimum accepted version of Visual Studio is 2017. Older versions will not be accepted by <code>configure</code> and will not work. The maximum accepted version of Visual Studio is 2019.</p>
|
||||||
@@ -507,7 +513,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<h2 id="running-tests">Running Tests</h2>
|
<h2 id="running-tests">Running Tests</h2>
|
||||||
<p>Most of the JDK tests are using the <a href="http://openjdk.java.net/jtreg">JTReg</a> test framework. Make sure that your configuration knows where to find your installation of JTReg. If this is not picked up automatically, use the <code>--with-jtreg=<path to jtreg home></code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc.</p>
|
<p>Most of the JDK tests are using the <a href="http://openjdk.java.net/jtreg">JTReg</a> test framework. Make sure that your configuration knows where to find your installation of JTReg. If this is not picked up automatically, use the <code>--with-jtreg=<path to jtreg home></code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc.</p>
|
||||||
<p>The <a href="https://wiki.openjdk.java.net/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/">here</a>. Download the latest <code>.tar.gz</code> file, unpack it, and point <code>--with-jtreg</code> to the <code>jtreg</code> directory that you just unpacked.</p>
|
<p>The <a href="https://wiki.openjdk.java.net/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://ci.adoptium.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/">here</a>. Download the latest <code>.tar.gz</code> file, unpack it, and point <code>--with-jtreg</code> to the <code>jtreg</code> directory that you just unpacked.</p>
|
||||||
<p>Building of Hotspot Gtest suite requires the source code of Google Test framework. The top directory, which contains both <code>googletest</code> and <code>googlemock</code> directories, should be specified via <code>--with-gtest</code>. The supported version of Google Test is 1.8.1, whose source code can be obtained:</p>
|
<p>Building of Hotspot Gtest suite requires the source code of Google Test framework. The top directory, which contains both <code>googletest</code> and <code>googlemock</code> directories, should be specified via <code>--with-gtest</code>. The supported version of Google Test is 1.8.1, whose source code can be obtained:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>by downloading and unpacking the source bundle from <a href="https://github.com/google/googletest/releases/tag/release-1.8.1">here</a></li>
|
<li>by downloading and unpacking the source bundle from <a href="https://github.com/google/googletest/releases/tag/release-1.8.1">here</a></li>
|
||||||
@@ -516,6 +522,12 @@
|
|||||||
<p>To execute the most basic tests (tier 1), use:</p>
|
<p>To execute the most basic tests (tier 1), use:</p>
|
||||||
<pre><code>make run-test-tier1</code></pre>
|
<pre><code>make run-test-tier1</code></pre>
|
||||||
<p>For more details on how to run tests, please see <strong>Testing the JDK</strong> (<a href="testing.html">html</a>, <a href="testing.md">markdown</a>).</p>
|
<p>For more details on how to run tests, please see <strong>Testing the JDK</strong> (<a href="testing.html">html</a>, <a href="testing.md">markdown</a>).</p>
|
||||||
|
<h2 id="signing">Signing</h2>
|
||||||
|
<h3 id="macos-1">macOS</h3>
|
||||||
|
<p>Modern versions of macOS require applications to be signed and notarizied before distribution. See Apple's documentation for more background on what this means and how it works. To help support this, the JDK build can be configured to automatically sign all native binaries, and the JDK bundle, with all the options needed for successful notarization, as well as all the entitlements required by the JDK. To enable <code>hardened</code> signing, use configure parameter <code>--with-macosx-codesign=hardened</code> and configure the signing identity you wish to use with <code>--with-macosx-codesign-identity=<identity></code>. The identity refers to a signing identity from Apple that needs to be preinstalled on the build host.</p>
|
||||||
|
<p>When not signing for distribution with the hardened option, the JDK build will still attempt to perform <code>adhoc</code> signing to add the special entitlement <code>com.apple.security.get-task-allow</code> to each binary. This entitlement is required to be able to dump core files from a process. Note that adding this entitlement makes the build invalid for notarization, so it is only added when signing in <code>debug</code> mode. To explicitly enable this kind of adhoc signing, use configure parameter <code>--with-macosx-codesign=debug</code>. It will be enabled by default in most cases.</p>
|
||||||
|
<p>It's also possible to completely disable any explicit codesign operations done by the JDK build using the configure parameter <code>--without-macosx-codesign</code>. The exact behavior then depends on the architecture. For macOS on x64, it (at least at the time of this writing) results in completely unsigned binaries that should still work fine for development and debugging purposes. On aarch64, the Xcode linker will apply a default "adhoc" signing, without any entitlements. Such a build does not allow dumping core files.</p>
|
||||||
|
<p>The default mode "auto" will try for <code>hardened</code> signing if the debug level is <code>release</code> and either the default identity or the specified identity is valid. If hardened isn't possible, then <code>debug</code> signing is chosen if it works. If nothing works, the codesign build step is disabled.</p>
|
||||||
<h2 id="cross-compiling">Cross-compiling</h2>
|
<h2 id="cross-compiling">Cross-compiling</h2>
|
||||||
<p>Cross-compiling means using one platform (the <em>build</em> platform) to generate output that can ran on another platform (the <em>target</em> platform).</p>
|
<p>Cross-compiling means using one platform (the <em>build</em> platform) to generate output that can ran on another platform (the <em>target</em> platform).</p>
|
||||||
<p>The typical reason for cross-compiling is that the build is performed on a more powerful desktop computer, but the resulting binaries will be able to run on a different, typically low-performing system. Most of the complications that arise when building for embedded is due to this separation of <em>build</em> and <em>target</em> systems.</p>
|
<p>The typical reason for cross-compiling is that the build is performed on a more powerful desktop computer, but the resulting binaries will be able to run on a different, typically low-performing system. Most of the complications that arise when building for embedded is due to this separation of <em>build</em> and <em>target</em> systems.</p>
|
||||||
@@ -885,32 +897,6 @@ spawn failed</code></pre>
|
|||||||
<h3 id="getting-help">Getting Help</h3>
|
<h3 id="getting-help">Getting Help</h3>
|
||||||
<p>If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to <a href="mailto:build-dev@openjdk.java.net">build-dev@openjdk.java.net</a>. Please include the relevant parts of the configure and/or build log.</p>
|
<p>If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to <a href="mailto:build-dev@openjdk.java.net">build-dev@openjdk.java.net</a>. Please include the relevant parts of the configure and/or build log.</p>
|
||||||
<p>If you need general help or advice about developing for the JDK, you can also contact the Adoption Group. See the section on <a href="#contributing-to-openjdk">Contributing to OpenJDK</a> for more information.</p>
|
<p>If you need general help or advice about developing for the JDK, you can also contact the Adoption Group. See the section on <a href="#contributing-to-openjdk">Contributing to OpenJDK</a> for more information.</p>
|
||||||
<h2 id="reproducible-builds">Reproducible Builds</h2>
|
|
||||||
<p>Build reproducibility is the property of getting exactly the same bits out when building, every time, independent on who builds the product, or where. This is for many reasons a harder goal than it initially appears, but it is an important goal, for security reasons and others. Please see <a href="https://reproducible-builds.org">Reproducible Builds</a> for more information about the background and reasons for reproducible builds.</p>
|
|
||||||
<p>Currently, it is not possible to build OpenJDK fully reproducibly, but getting there is an ongoing effort. There are some things you can do to minimize non-determinism and make a larger part of the build reproducible:</p>
|
|
||||||
<ul>
|
|
||||||
<li>Turn on build system support for reproducible builds</li>
|
|
||||||
</ul>
|
|
||||||
<p>Add the flag <code>--enable-reproducible-build</code> to your <code>configure</code> command line. This will turn on support for reproducible builds where it could otherwise be lacking.</p>
|
|
||||||
<ul>
|
|
||||||
<li>Do not rely on <code>configure</code>'s default adhoc version strings</li>
|
|
||||||
</ul>
|
|
||||||
<p>Default adhoc version strings OPT segment include user name, source directory and timestamp. You can either override just the OPT segment using <code>--with-version-opt=<any fixed string></code>, or you can specify the entire version string using <code>--with-version-string=<your version></code>.</p>
|
|
||||||
<ul>
|
|
||||||
<li>Specify how the build sets <code>SOURCE_DATE_EPOCH</code></li>
|
|
||||||
</ul>
|
|
||||||
<p>The JDK build system will set the <code>SOURCE_DATE_EPOCH</code> environment variable during building, depending on the value of the <code>--with-source-date</code> option for <code>configure</code>. The default value is <code>updated</code>, which means that <code>SOURCE_DATE_EPOCH</code> will be set to the current time each time you are running <code>make</code>.</p>
|
|
||||||
<p>The <a href="https://reproducible-builds.org/docs/source-date-epoch/"><code>SOURCE_DATE_EPOCH</code> environment variable</a> is an industry standard, that many tools, such as gcc, recognize, and use in place of the current time when generating output.</p>
|
|
||||||
<p>For reproducible builds, you need to set this to a fixed value. You can use the special value <code>version</code> which will use the nominal release date for the current JDK version, or a value describing a date, either an epoch based timestamp as an integer, or a valid ISO-8601 date.</p>
|
|
||||||
<p><strong>Hint:</strong> If your build environment already sets <code>SOURCE_DATE_EPOCH</code>, you can propagate this using <code>--with-source-date=$SOURCE_DATE_EPOCH</code>.</p>
|
|
||||||
<ul>
|
|
||||||
<li>Specify a hotspot build time</li>
|
|
||||||
</ul>
|
|
||||||
<p>Set a fixed hotspot build time. This will be included in the hotspot library (<code>libjvm.so</code> or <code>jvm.dll</code>) and defaults to the current time when building hotspot. Use <code>--with-hotspot-build-time=<any fixed string></code> for reproducible builds. It's a string so you don't need to format it specifically, so e.g. <code>n/a</code> will do. Another solution is to use the <code>SOURCE_DATE_EPOCH</code> variable, e.g. <code>--with-hotspot-build-time=$(date --date=@$SOURCE_DATE_EPOCH)</code>.</p>
|
|
||||||
<ul>
|
|
||||||
<li>Copyright year</li>
|
|
||||||
</ul>
|
|
||||||
<p>The copyright year in some generated text files are normally set to the current year. This can be overridden by <code>--with-copyright-year=<year></code>. For fully reproducible builds, this needs to be set to a fixed value.</p>
|
|
||||||
<h2 id="hints-and-suggestions-for-advanced-users">Hints and Suggestions for Advanced Users</h2>
|
<h2 id="hints-and-suggestions-for-advanced-users">Hints and Suggestions for Advanced Users</h2>
|
||||||
<h3 id="bash-completion">Bash Completion</h3>
|
<h3 id="bash-completion">Bash Completion</h3>
|
||||||
<p>The <code>configure</code> and <code>make</code> commands tries to play nice with bash command-line completion (using <code><tab></code> or <code><tab><tab></code>). To use this functionality, make sure you enable completion in your <code>~/.bashrc</code> (see instructions for bash in your operating system).</p>
|
<p>The <code>configure</code> and <code>make</code> commands tries to play nice with bash command-line completion (using <code><tab></code> or <code><tab><tab></code>). To use this functionality, make sure you enable completion in your <code>~/.bashrc</code> (see instructions for bash in your operating system).</p>
|
||||||
|
|||||||
150
doc/building.md
150
doc/building.md
@@ -179,10 +179,10 @@ On Windows, it is important that you pay attention to the instructions in the
|
|||||||
|
|
||||||
Windows is the only non-POSIX OS supported by the JDK, and as such, requires
|
Windows is the only non-POSIX OS supported by the JDK, and as such, requires
|
||||||
some extra care. A POSIX support layer is required to build on Windows.
|
some extra care. A POSIX support layer is required to build on Windows.
|
||||||
Currently, the only supported such layers are Cygwin and Windows Subsystem for
|
Currently, the only supported such layers are Cygwin, Windows Subsystem for
|
||||||
Linux (WSL). (Msys is no longer supported due to a too old bash; msys2 would
|
Linux (WSL), and MSYS2. (MSYS is no longer supported due to an outdated bash;
|
||||||
likely be possible to support in a future version but that would require effort
|
While OpenJDK can be built with MSYS2, support for it is still experimental, so
|
||||||
to implement.)
|
build failures and unusual errors are not uncommon.)
|
||||||
|
|
||||||
Internally in the build system, all paths are represented as Unix-style paths,
|
Internally in the build system, all paths are represented as Unix-style paths,
|
||||||
e.g. `/cygdrive/c/git/jdk/Makefile` rather than `C:\git\jdk\Makefile`. This
|
e.g. `/cygdrive/c/git/jdk/Makefile` rather than `C:\git\jdk\Makefile`. This
|
||||||
@@ -305,12 +305,12 @@ be able to run on the target platform. In theory, toolchain and operating
|
|||||||
system should be independent factors, but in practice there's more or less a
|
system should be independent factors, but in practice there's more or less a
|
||||||
one-to-one correlation between target operating system and toolchain.
|
one-to-one correlation between target operating system and toolchain.
|
||||||
|
|
||||||
Operating system Supported toolchain
|
| Operating system | Supported toolchain |
|
||||||
------------------ -------------------------
|
| ------------------ | ------------------------- |
|
||||||
Linux gcc, clang
|
| Linux | gcc, clang |
|
||||||
macOS Apple Xcode (using clang)
|
| macOS | Apple Xcode (using clang) |
|
||||||
AIX IBM XL C/C++
|
| AIX | IBM XL C/C++ |
|
||||||
Windows Microsoft Visual Studio
|
| Windows | Microsoft Visual Studio |
|
||||||
|
|
||||||
Please see the individual sections on the toolchains for version
|
Please see the individual sections on the toolchains for version
|
||||||
recommendations. As a reference, these versions of the toolchains are used, at
|
recommendations. As a reference, these versions of the toolchains are used, at
|
||||||
@@ -319,11 +319,11 @@ possible to compile the JDK with both older and newer versions, but the closer
|
|||||||
you stay to this list, the more likely you are to compile successfully without
|
you stay to this list, the more likely you are to compile successfully without
|
||||||
issues.
|
issues.
|
||||||
|
|
||||||
Operating system Toolchain version
|
| Operating system | Toolchain version |
|
||||||
------------------ -------------------------------------------------------
|
| ------------------ | ------------------------------------------ |
|
||||||
Linux gcc 10.2.0
|
| Linux | gcc 11.2.0 |
|
||||||
macOS Apple Xcode 10.1 (using clang 10.0.0)
|
| macOS | Apple Xcode 10.1 (using clang 10.0.0) |
|
||||||
Windows Microsoft Visual Studio 2019 update 16.7.2
|
| Windows | Microsoft Visual Studio 2022 update 17.1.0 |
|
||||||
|
|
||||||
All compilers are expected to be able to compile to the C99 language standard,
|
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
|
as some C99 features are used in the source code. Microsoft Visual Studio
|
||||||
@@ -335,7 +335,7 @@ features that it does support.
|
|||||||
The minimum accepted version of gcc is 5.0. 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.
|
by `configure` and are unlikely to work.
|
||||||
|
|
||||||
The JDK is currently known to be able to compile with at least version 10.2 of
|
The JDK is currently known to be able to compile with at least version 11.2 of
|
||||||
gcc.
|
gcc.
|
||||||
|
|
||||||
In general, any version between these two should be usable.
|
In general, any version between these two should be usable.
|
||||||
@@ -351,20 +351,20 @@ To use clang instead of gcc on Linux, use `--with-toolchain-type=clang`.
|
|||||||
|
|
||||||
The oldest supported version of Xcode is 8.
|
The oldest supported version of Xcode is 8.
|
||||||
|
|
||||||
You will need the Xcode command lines developers tools to be able to build
|
You will need the Xcode command line developer tools to be able to build
|
||||||
the JDK. (Actually, *only* the command lines tools are needed, not the IDE.)
|
the JDK. (Actually, *only* the command line tools are needed, not the IDE.)
|
||||||
The simplest way to install these is to run:
|
The simplest way to install these is to run:
|
||||||
```
|
```
|
||||||
xcode-select --install
|
xcode-select --install
|
||||||
```
|
```
|
||||||
|
|
||||||
It is advisable to keep an older version of Xcode for building the JDK when
|
When updating Xcode, it is advisable to keep an older version for building the JDK.
|
||||||
updating Xcode. This [blog page](
|
To use a specific version of Xcode you have multiple options:
|
||||||
http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html) has
|
|
||||||
good suggestions on managing multiple Xcode versions. To use a specific version
|
* Use `xcode-select -s` before running `configure`, e.g. `xcode-select -s /Applications/Xcode13.1.app`. The drawback is that the setting
|
||||||
of Xcode, use `xcode-select -s` before running `configure`, or use
|
is system wide and you may have to revert it after an OpenJDK build.
|
||||||
`--with-toolchain-path` to point to the version of Xcode to use, e.g.
|
* Use configure option `--with-xcode-path`, e.g. `configure --with-xcode-path=/Applications/Xcode13.1.app`
|
||||||
`configure --with-toolchain-path=/Applications/Xcode8.app/Contents/Developer/usr/bin`
|
This allows using a specific Xcode version for an OpenJDK build, independently of the active Xcode version by `xcode-select`.
|
||||||
|
|
||||||
If you have recently (inadvertently) updated your OS and/or Xcode version, and
|
If you have recently (inadvertently) updated your OS and/or Xcode version, and
|
||||||
the JDK can no longer be built, please see the section on [Problems with the
|
the JDK can no longer be built, please see the section on [Problems with the
|
||||||
@@ -848,7 +848,7 @@ containing `lib/jtreg.jar` etc.
|
|||||||
|
|
||||||
The [Adoption Group](https://wiki.openjdk.java.net/display/Adoption) provides
|
The [Adoption Group](https://wiki.openjdk.java.net/display/Adoption) provides
|
||||||
recent builds of jtreg [here](
|
recent builds of jtreg [here](
|
||||||
https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/).
|
https://ci.adoptium.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/).
|
||||||
Download the latest `.tar.gz` file, unpack it, and point `--with-jtreg` to the
|
Download the latest `.tar.gz` file, unpack it, and point `--with-jtreg` to the
|
||||||
`jtreg` directory that you just unpacked.
|
`jtreg` directory that you just unpacked.
|
||||||
|
|
||||||
@@ -868,6 +868,42 @@ make run-test-tier1
|
|||||||
For more details on how to run tests, please see **Testing the JDK**
|
For more details on how to run tests, please see **Testing the JDK**
|
||||||
([html](testing.html), [markdown](testing.md)).
|
([html](testing.html), [markdown](testing.md)).
|
||||||
|
|
||||||
|
## Signing
|
||||||
|
|
||||||
|
### macOS
|
||||||
|
|
||||||
|
Modern versions of macOS require applications to be signed and notarizied before
|
||||||
|
distribution. See Apple's documentation for more background on what this means
|
||||||
|
and how it works. To help support this, the JDK build can be configured to
|
||||||
|
automatically sign all native binaries, and the JDK bundle, with all the options
|
||||||
|
needed for successful notarization, as well as all the entitlements required by
|
||||||
|
the JDK. To enable `hardened` signing, use configure parameter
|
||||||
|
`--with-macosx-codesign=hardened` and configure the signing identity you wish to
|
||||||
|
use with `--with-macosx-codesign-identity=<identity>`. The identity refers to a
|
||||||
|
signing identity from Apple that needs to be preinstalled on the build host.
|
||||||
|
|
||||||
|
When not signing for distribution with the hardened option, the JDK build will
|
||||||
|
still attempt to perform `adhoc` signing to add the special entitlement
|
||||||
|
`com.apple.security.get-task-allow` to each binary. This entitlement is required
|
||||||
|
to be able to dump core files from a process. Note that adding this entitlement
|
||||||
|
makes the build invalid for notarization, so it is only added when signing in
|
||||||
|
`debug` mode. To explicitly enable this kind of adhoc signing, use configure
|
||||||
|
parameter `--with-macosx-codesign=debug`. It will be enabled by default in most
|
||||||
|
cases.
|
||||||
|
|
||||||
|
It's also possible to completely disable any explicit codesign operations done
|
||||||
|
by the JDK build using the configure parameter `--without-macosx-codesign`.
|
||||||
|
The exact behavior then depends on the architecture. For macOS on x64, it (at
|
||||||
|
least at the time of this writing) results in completely unsigned binaries that
|
||||||
|
should still work fine for development and debugging purposes. On aarch64, the
|
||||||
|
Xcode linker will apply a default "adhoc" signing, without any entitlements.
|
||||||
|
Such a build does not allow dumping core files.
|
||||||
|
|
||||||
|
The default mode "auto" will try for `hardened` signing if the debug level is
|
||||||
|
`release` and either the default identity or the specified identity is valid.
|
||||||
|
If hardened isn't possible, then `debug` signing is chosen if it works. If
|
||||||
|
nothing works, the codesign build step is disabled.
|
||||||
|
|
||||||
## Cross-compiling
|
## Cross-compiling
|
||||||
|
|
||||||
Cross-compiling means using one platform (the *build* platform) to generate
|
Cross-compiling means using one platform (the *build* platform) to generate
|
||||||
@@ -1503,68 +1539,6 @@ If you need general help or advice about developing for the JDK, you can also
|
|||||||
contact the Adoption Group. See the section on [Contributing to OpenJDK](
|
contact the Adoption Group. See the section on [Contributing to OpenJDK](
|
||||||
#contributing-to-openjdk) for more information.
|
#contributing-to-openjdk) for more information.
|
||||||
|
|
||||||
## Reproducible Builds
|
|
||||||
|
|
||||||
Build reproducibility is the property of getting exactly the same bits out when
|
|
||||||
building, every time, independent on who builds the product, or where. This is
|
|
||||||
for many reasons a harder goal than it initially appears, but it is an important
|
|
||||||
goal, for security reasons and others. Please see [Reproducible Builds](
|
|
||||||
https://reproducible-builds.org) for more information about the background and
|
|
||||||
reasons for reproducible builds.
|
|
||||||
|
|
||||||
Currently, it is not possible to build OpenJDK fully reproducibly, but getting
|
|
||||||
there is an ongoing effort. There are some things you can do to minimize
|
|
||||||
non-determinism and make a larger part of the build reproducible:
|
|
||||||
|
|
||||||
* Turn on build system support for reproducible builds
|
|
||||||
|
|
||||||
Add the flag `--enable-reproducible-build` to your `configure` command line.
|
|
||||||
This will turn on support for reproducible builds where it could otherwise be
|
|
||||||
lacking.
|
|
||||||
|
|
||||||
* Do not rely on `configure`'s default adhoc version strings
|
|
||||||
|
|
||||||
Default adhoc version strings OPT segment include user name, source directory
|
|
||||||
and timestamp. You can either override just the OPT segment using
|
|
||||||
`--with-version-opt=<any fixed string>`, or you can specify the entire version
|
|
||||||
string using `--with-version-string=<your version>`.
|
|
||||||
|
|
||||||
* Specify how the build sets `SOURCE_DATE_EPOCH`
|
|
||||||
|
|
||||||
The JDK build system will set the `SOURCE_DATE_EPOCH` environment variable
|
|
||||||
during building, depending on the value of the `--with-source-date` option for
|
|
||||||
`configure`. The default value is `updated`, which means that
|
|
||||||
`SOURCE_DATE_EPOCH` will be set to the current time each time you are running
|
|
||||||
`make`.
|
|
||||||
|
|
||||||
The [`SOURCE_DATE_EPOCH` environment variable](
|
|
||||||
https://reproducible-builds.org/docs/source-date-epoch/) is an industry
|
|
||||||
standard, that many tools, such as gcc, recognize, and use in place of the
|
|
||||||
current time when generating output.
|
|
||||||
|
|
||||||
For reproducible builds, you need to set this to a fixed value. You can use the
|
|
||||||
special value `version` which will use the nominal release date for the current
|
|
||||||
JDK version, or a value describing a date, either an epoch based timestamp as an
|
|
||||||
integer, or a valid ISO-8601 date.
|
|
||||||
|
|
||||||
**Hint:** If your build environment already sets `SOURCE_DATE_EPOCH`, you can
|
|
||||||
propagate this using `--with-source-date=$SOURCE_DATE_EPOCH`.
|
|
||||||
|
|
||||||
* Specify a hotspot build time
|
|
||||||
|
|
||||||
Set a fixed hotspot build time. This will be included in the hotspot library
|
|
||||||
(`libjvm.so` or `jvm.dll`) and defaults to the current time when building
|
|
||||||
hotspot. Use `--with-hotspot-build-time=<any fixed string>` for reproducible
|
|
||||||
builds. It's a string so you don't need to format it specifically, so e.g. `n/a`
|
|
||||||
will do. Another solution is to use the `SOURCE_DATE_EPOCH` variable, e.g.
|
|
||||||
`--with-hotspot-build-time=$(date --date=@$SOURCE_DATE_EPOCH)`.
|
|
||||||
|
|
||||||
* Copyright year
|
|
||||||
|
|
||||||
The copyright year in some generated text files are normally set to the current
|
|
||||||
year. This can be overridden by `--with-copyright-year=<year>`. For fully
|
|
||||||
reproducible builds, this needs to be set to a fixed value.
|
|
||||||
|
|
||||||
## Hints and Suggestions for Advanced Users
|
## Hints and Suggestions for Advanced Users
|
||||||
|
|
||||||
### Bash Completion
|
### Bash Completion
|
||||||
|
|||||||
@@ -50,7 +50,6 @@
|
|||||||
<li><a href="#nullptr">nullptr</a></li>
|
<li><a href="#nullptr">nullptr</a></li>
|
||||||
<li><a href="#atomic"><atomic></a></li>
|
<li><a href="#atomic"><atomic></a></li>
|
||||||
<li><a href="#uniform-initialization">Uniform Initialization</a></li>
|
<li><a href="#uniform-initialization">Uniform Initialization</a></li>
|
||||||
<li><a href="#local-function-objects">Local Function Objects</a></li>
|
|
||||||
<li><a href="#additional-permitted-features">Additional Permitted Features</a></li>
|
<li><a href="#additional-permitted-features">Additional Permitted Features</a></li>
|
||||||
<li><a href="#excluded-features">Excluded Features</a></li>
|
<li><a href="#excluded-features">Excluded Features</a></li>
|
||||||
<li><a href="#undecided-features">Undecided Features</a></li>
|
<li><a href="#undecided-features">Undecided Features</a></li>
|
||||||
@@ -195,7 +194,7 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
|
|||||||
<p>Similar discussions for some other projects:</p>
|
<p>Similar discussions for some other projects:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><p><a href="https://google.github.io/styleguide/cppguide.html">Google C++ Style Guide</a> — Currently (2020) targeting C++17.</p></li>
|
<li><p><a href="https://google.github.io/styleguide/cppguide.html">Google C++ Style Guide</a> — Currently (2020) targeting C++17.</p></li>
|
||||||
<li><p><a href="https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++11.md">C++11 and C++14 use in Chromium</a> — Categorizes features as allowed, banned, or to be discussed.</p></li>
|
<li><p><a href="https://chromium-cpp.appspot.com">C++11 and C++14 use in Chromium</a> — Categorizes features as allowed, banned, or to be discussed.</p></li>
|
||||||
<li><p><a href="https://llvm.org/docs/CodingStandards.html">llvm Coding Standards</a> — Currently (2020) targeting C++14.</p></li>
|
<li><p><a href="https://llvm.org/docs/CodingStandards.html">llvm Coding Standards</a> — Currently (2020) targeting C++14.</p></li>
|
||||||
<li><p><a href="https://firefox-source-docs.mozilla.org/code-quality/coding-style/using_cxx_in_firefox_code.html">Using C++ in Mozilla code</a> — C++17 support is required for recent versions (2020).</p></li>
|
<li><p><a href="https://firefox-source-docs.mozilla.org/code-quality/coding-style/using_cxx_in_firefox_code.html">Using C++ in Mozilla code</a> — C++17 support is required for recent versions (2020).</p></li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -255,7 +254,8 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
|
|||||||
<li><p>Function argument deduction. This is always permitted, and indeed encouraged. It is nearly always better to allow the type of a function template argument to be deduced rather than explicitly specified.</p></li>
|
<li><p>Function argument deduction. This is always permitted, and indeed encouraged. It is nearly always better to allow the type of a function template argument to be deduced rather than explicitly specified.</p></li>
|
||||||
<li><p><code>auto</code> variable declarations (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf">n1984</a>)<br> For local variables, this can be used to make the code clearer by eliminating type information that is obvious or irrelevant. Excessive use can make code much harder to understand.</p></li>
|
<li><p><code>auto</code> variable declarations (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf">n1984</a>)<br> For local variables, this can be used to make the code clearer by eliminating type information that is obvious or irrelevant. Excessive use can make code much harder to understand.</p></li>
|
||||||
<li><p>Function return type deduction (<a href="https://isocpp.org/files/papers/N3638.html">n3638</a>)<br> Only use if the function body has a very small number of <code>return</code> statements, and generally relatively little other code.</p></li>
|
<li><p>Function return type deduction (<a href="https://isocpp.org/files/papers/N3638.html">n3638</a>)<br> Only use if the function body has a very small number of <code>return</code> statements, and generally relatively little other code.</p></li>
|
||||||
<li><p>Also see <a href="#lambdaexpressions">lambda expressions</a>.</p></li>
|
<li><p>Generic lambdas. Lambdas are not (yet) permitted.</p></li>
|
||||||
|
<li><p>Lambda init captures. Lambdas are not (yet) permitted.</p></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="expression-sfinae">Expression SFINAE</h3>
|
<h3 id="expression-sfinae">Expression SFINAE</h3>
|
||||||
<p><a href="https://en.cppreference.com/w/cpp/language/sfinae" title="Substitution Failure Is Not An Error">Substitution Failure Is Not An Error</a> (SFINAE) is a template metaprogramming technique that makes use of template parameter substitution failures to make compile-time decisions.</p>
|
<p><a href="https://en.cppreference.com/w/cpp/language/sfinae" title="Substitution Failure Is Not An Error">Substitution Failure Is Not An Error</a> (SFINAE) is a template metaprogramming technique that makes use of template parameter substitution failures to make compile-time decisions.</p>
|
||||||
@@ -288,121 +288,6 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
|
|||||||
<li><a href="https://en.cppreference.com/w/cpp/language/aggregate_initialization">aggregate initialization</a></li>
|
<li><a href="https://en.cppreference.com/w/cpp/language/aggregate_initialization">aggregate initialization</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>Although related, the use of <code>std::initializer_list</code> remains forbidden, as part of the avoidance of the C++ Standard Library in HotSpot code.</p>
|
<p>Although related, the use of <code>std::initializer_list</code> remains forbidden, as part of the avoidance of the C++ Standard Library in HotSpot code.</p>
|
||||||
<h3 id="local-function-objects">Local Function Objects</h3>
|
|
||||||
<ul>
|
|
||||||
<li>Local function objects, including lambda expressions, may be used.</li>
|
|
||||||
<li>Lambda expressions must only be used as a downward value.</li>
|
|
||||||
<li>Prefer <code>[&]</code> as the capture list of a lambda expression.</li>
|
|
||||||
<li>Return type deduction for lambda expressions is permitted, and indeed encouraged.</li>
|
|
||||||
<li>An empty parameter list for a lambda expression may be elided.</li>
|
|
||||||
<li>A lambda expression must not be <code>mutable</code>.</li>
|
|
||||||
<li>Generic lambda expressions are permitted.</li>
|
|
||||||
<li>Lambda expressions should be relatively simple.</li>
|
|
||||||
<li>Anonymous lambda expressions should not overly clutter the enclosing expression.</li>
|
|
||||||
<li>An anonymous lambda expression must not be directly invoked.</li>
|
|
||||||
<li>Bind expressions are forbidden.</li>
|
|
||||||
</ul>
|
|
||||||
<p>Single-use function objects can be defined locally within a function, directly at the point of use. This is an alternative to having a function or function object class defined at class or namespace scope.</p>
|
|
||||||
<p>This usage was somewhat limited by C++03, which does not permit such a class to be used as a template parameter. That restriction was removed by C++11 (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm">n2657</a>). Use of this feature is permitted.</p>
|
|
||||||
<p>Many HotSpot protocols involve "function-like" objects that involve some named member function rather than a call operator. For example, a function that performs some action on all threads might be written as</p>
|
|
||||||
<pre><code>void do_something() {
|
|
||||||
struct DoSomething : public ThreadClosure {
|
|
||||||
virtual void do_thread(Thread* t) {
|
|
||||||
... do something with t ...
|
|
||||||
}
|
|
||||||
} closure;
|
|
||||||
Threads::threads_do(&closure);
|
|
||||||
}</code></pre>
|
|
||||||
<p>HotSpot code has historically usually placed the DoSomething class at namespace (or sometimes class) scope. This separates the function's code from its use, often to the detriment of readability. It requires giving the class a globally unique name (if at namespace scope). It also loses the information that the class is intended for use in exactly one place, and does not have any subclasses. (However, the latter can now be indicated by declaring it <code>final</code>.) Often, for simplicity, a local class will skip things like access control and accessor functions, giving the enclosing function direct access to the implementation and eliminating some boilerplate that might be provided if the class is in some outer (more accessible) scope. On the other hand, if there is a lot of surrounding code in the function body or the local class is of significant size, defining it locally can increase clutter and reduce readability.</p>
|
|
||||||
<p><a name="lambdaexpressions"></a> C++11 added <em>lambda expressions</em> as a new way to write a function object. Simple lambda expressions can be significantly more concise than a function object, eliminating a lot of boiler-plate. On the other hand, a complex lambda expression may not provide much, if any, readability benefit compared to an ordinary function object. Also, while a lambda can encapsulate a call to a "function-like" object, it cannot be used in place of such.</p>
|
|
||||||
<p>A common use for local functions is as one-use <a href="https://en.cppreference.com/w/cpp/language/raii" title="Resource Acquisition Is Initialization">RAII</a> objects. The amount of boilerplate for a function object class (local or not) makes such usage somewhat clumsy and verbose. But with the help of a small amount of supporting utility code, lambdas work particularly well for this use case.</p>
|
|
||||||
<p>Another use for local functions is <a href="https://en.wikipedia.org/wiki/Partial_application" title="Partial Application">partial application</a>. Again here, lambdas are typically much simpler and less verbose than function object classes.</p>
|
|
||||||
<p>Because of these benefits, lambda expressions are permitted in HotSpot code, with some restrictions and usage guidance. An anonymous lambda is one which is passed directly as an argument. A named lambda is the value of a variable, which is its name.</p>
|
|
||||||
<p>Lambda expressions should only be passed downward. In particular, a lambda should not be returned from a function or stored in a global variable, whether directly or as the value of a member of some other object. Lambda capture is syntactically subtle (by design), and propagating a lambda in such ways can easily pass references to captured values to places where they are no longer valid. In particular, members of the enclosing <code>this</code> object are effectively captured by reference, even if the default capture is by-value. For such uses-cases a function object class should be used to make the desired value capturing and propagation explicit.</p>
|
|
||||||
<p>Limiting the capture list to <code>[&]</code> (implicitly capture by reference) is a simplifying restriction that still provides good support for HotSpot usage, while reducing the cases a reader must recognize and understand.</p>
|
|
||||||
<ul>
|
|
||||||
<li><p>Many common lambda uses require reference capture. Not permitting it would substantially reduce the utility of lambdas.</p></li>
|
|
||||||
<li><p>Referential transparency. Implicit reference capture makes variable references in the lambda body have the same meaning they would have in the enclosing code. There isn't a semantic barrier across which the meaning of a variable changes.</p></li>
|
|
||||||
<li><p>Explicit reference capture introduces significant clutter, especially when lambda expressions are relatively small and simple, as they should be in HotSpot code.</p></li>
|
|
||||||
<li><p>There are a number of reasons why by-value capture might be used, but for the most part they don't apply to HotSpot code, given other usage restrictions.</p>
|
|
||||||
<ul>
|
|
||||||
<li><p>A primary use-case for by-value capture is to support escaping uses, where values captured by-reference might become invalid. That use-case doesn't apply if only downward lambdas are used.</p></li>
|
|
||||||
<li><p>By-value capture can also make a lambda-local copy for mutation, which requires making the lambda <code>mutable</code>; see below.</p></li>
|
|
||||||
<li><p>By-value capture might be viewed as an optimization, avoiding any overhead for reference capture of cheap to copy values. But the compiler can often eliminate any such overhead.</p></li>
|
|
||||||
<li><p>By-value capture by a non-<code>mutable</code> lambda makes the captured values const, preventing any modification by the lambda and making the captured value unaffected by modifications to the outer variable. But this only applies to captured auto variables, not member variables, and is inconsistent with referential transparency.</p></li>
|
|
||||||
</ul></li>
|
|
||||||
<li><p>Non-capturing lambdas (with an empty capture list - <code>[]</code>) have limited utility. There are cases where no captures are required (pure functions, for example), but if the function is small and simple then that's obvious anyway.</p></li>
|
|
||||||
<li><p>Capture initializers (a C++14 feature - <a href="https://isocpp.org/files/papers/N3649.html">N3649</a>) are not permitted. Capture initializers inherently increase the complexity of the capture list, and provide little benefit over an additional in-scope local variable.</p></li>
|
|
||||||
</ul>
|
|
||||||
<p>The use of <code>mutable</code> lambda expressions is forbidden because there don't seem to be many, if any, good use-cases for them in HotSpot. A lambda expression needs to be mutable in order to modify a by-value captured value. But with only downward lambdas, such usage seems likely to be rare and complicated. It is better to use a function object class in any such cases that arise, rather than requiring all HotSpot developers to understand this relatively obscure feature.</p>
|
|
||||||
<p>While it is possible to directly invoke an anonymous lambda expression, that feature should not be used, as such a form can be confusing to readers. Instead, name the lambda and call it by name.</p>
|
|
||||||
<p>Some reasons to prefer a named lambda instead of an anonymous lambda are</p>
|
|
||||||
<ul>
|
|
||||||
<li><p>The body contains non-trivial control flow or declarations or other nested constructs.</p></li>
|
|
||||||
<li><p>Its role in an argument list is hard to guess without examining the function declaration. Give it a name that indicates its purpose.</p></li>
|
|
||||||
<li><p>It has an unusual capture list.</p></li>
|
|
||||||
<li><p>It has a complex explicit return type or parameter types.</p></li>
|
|
||||||
</ul>
|
|
||||||
<p>Lambda expressions, and particularly anonymous lambda expressions, should be simple and compact. One-liners are good. Anonymous lambdas should usually be limited to a couple lines of body code. More complex lambdas should be named. A named lambda should not clutter the enclosing function and make it long and complex; do continue to break up large functions via the use of separate helper functions.</p>
|
|
||||||
<p>An anonymous lambda expression should either be a one-liner in a one-line expression, or isolated in its own set of lines. Don't place part of a lambda expression on the same line as other arguments to a function. The body of a multi-line lambda argument should be indented from the start of the capture list, as if that were the start of an ordinary function definition. The body of a multi-line named lambda should be indented one step from the variable's indentation.</p>
|
|
||||||
<p>Some examples:</p>
|
|
||||||
<ol type="1">
|
|
||||||
<li><code>foo([&] { ++counter; });</code></li>
|
|
||||||
<li><code>foo(x, [&] { ++counter; });</code></li>
|
|
||||||
<li><code>foo([&] { if (predicate) ++counter; });</code></li>
|
|
||||||
<li><code>foo([&] { auto tmp = process(x); tmp.f(); return tmp.g(); })</code></li>
|
|
||||||
<li><p>Separate one-line lambda from other arguments:</p>
|
|
||||||
<pre><code>foo(c.begin(), c.end(),
|
|
||||||
[&] (const X& x) { do_something(x); return x.value(); });</code></pre></li>
|
|
||||||
<li><p>Indentation for multi-line lambda:</p>
|
|
||||||
<pre><code>c.do_entries([&] (const X& x) {
|
|
||||||
do_something(x, a);
|
|
||||||
do_something1(x, b);
|
|
||||||
do_something2(x, c);
|
|
||||||
});</code></pre></li>
|
|
||||||
<li><p>Separate multi-line lambda from other arguments:</p>
|
|
||||||
<pre><code>foo(c.begin(), c.end(),
|
|
||||||
[&] (const X& x) {
|
|
||||||
do_something(x, a);
|
|
||||||
do_something1(x, b);
|
|
||||||
do_something2(x, c);
|
|
||||||
});</code></pre></li>
|
|
||||||
<li><p>Multi-line named lambda:</p>
|
|
||||||
<pre><code>auto do_entry = [&] (const X& x) {
|
|
||||||
do_something(x, a);
|
|
||||||
do_something1(x, b);
|
|
||||||
do_something2(x, c);
|
|
||||||
};</code></pre></li>
|
|
||||||
</ol>
|
|
||||||
<p>Item 4, and especially items 6 and 7, are pushing the simplicity limits for anonymous lambdas. Item 6 might be better written using a named lambda:</p>
|
|
||||||
<pre><code>c.do_entries(do_entry);</code></pre>
|
|
||||||
<p>Note that C++11 also added <em>bind expressions</em> as a way to write a function object for partial application, using <code>std::bind</code> and related facilities from the Standard Library. <code>std::bind</code> generalizes and replaces some of the binders from C++03. Bind expressions are not permitted in HotSpot code. They don't provide enough benefit over lambdas or local function classes in the cases where bind expressions are applicable to warrant the introduction of yet another mechanism in this space into HotSpot code.</p>
|
|
||||||
<p>References:</p>
|
|
||||||
<ul>
|
|
||||||
<li>Local and unnamed types as template parameters (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm">n2657</a>)</li>
|
|
||||||
<li>New wording for C++0x lambdas (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2927.pdf">n2927</a>)</li>
|
|
||||||
<li>Generalized lambda capture (init-capture) (<a href="https://isocpp.org/files/papers/N3648.html">N3648</a>)</li>
|
|
||||||
<li>Generic (polymorphic) lambda expressions (<a href="https://isocpp.org/files/papers/N3649.html">N3649</a>)</li>
|
|
||||||
</ul>
|
|
||||||
<p>References from C++17</p>
|
|
||||||
<ul>
|
|
||||||
<li>Wording for constexpr lambda (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0170r1.pdf">p0170r1</a>)</li>
|
|
||||||
<li>Lambda capture of *this by Value (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0018r3.html">p0018r3</a>)</li>
|
|
||||||
</ul>
|
|
||||||
<p>References from C++20</p>
|
|
||||||
<ul>
|
|
||||||
<li>Allow lambda capture [=, this] (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0409r2.html">p0409r2</a>)</li>
|
|
||||||
<li>Familiar template syntax for generic lambdas (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0428r2.pdf">p0428r2</a>)</li>
|
|
||||||
<li>Simplifying implicit lambda capture (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0588r1.html">p0588r1</a>)</li>
|
|
||||||
<li>Default constructible and assignable stateless lambdas (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0624r2.pdf">p0624r2</a>)</li>
|
|
||||||
<li>Lambdas in unevaluated contexts (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0315r4.pdf">p0315r4</a>)</li>
|
|
||||||
<li>Allow pack expansion in lambda init-capture (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0780r2.html">p0780r2</a>) (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2095r0.html">p2095r0</a>)</li>
|
|
||||||
<li>Deprecate implicit capture of this via [=] (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0806r2.html">p0806r2</a>)</li>
|
|
||||||
</ul>
|
|
||||||
<p>References from C++23</p>
|
|
||||||
<ul>
|
|
||||||
<li>Make () more optional for lambdas (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1102r2.html">p1102r2</a>)</li>
|
|
||||||
</ul>
|
|
||||||
<h3 id="additional-permitted-features">Additional Permitted Features</h3>
|
<h3 id="additional-permitted-features">Additional Permitted Features</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><p><code>constexpr</code> (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf">n2235</a>) (<a href="https://isocpp.org/files/papers/N3652.html">n3652</a>)</p></li>
|
<li><p><code>constexpr</code> (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf">n2235</a>) (<a href="https://isocpp.org/files/papers/N3652.html">n3652</a>)</p></li>
|
||||||
@@ -420,6 +305,7 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
|
|||||||
<li><p>Dynamic initialization and destruction with concurrency (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm">n2660</a>)</p></li>
|
<li><p>Dynamic initialization and destruction with concurrency (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm">n2660</a>)</p></li>
|
||||||
<li><p><code>final</code> virtual specifiers for classes and virtual functions (<a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm">n2928</a>), (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm">n3206</a>), (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm">n3272</a>)</p></li>
|
<li><p><code>final</code> virtual specifiers for classes and virtual functions (<a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm">n2928</a>), (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm">n3206</a>), (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm">n3272</a>)</p></li>
|
||||||
<li><p><code>override</code> virtual specifiers for virtual functions (<a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm">n2928</a>), (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm">n3206</a>), (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm">n3272</a>)</p></li>
|
<li><p><code>override</code> virtual specifiers for virtual functions (<a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm">n2928</a>), (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm">n3206</a>), (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm">n3272</a>)</p></li>
|
||||||
|
<li><p>Local and unnamed types as template parameters (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm">n2657</a>)</p></li>
|
||||||
<li><p>Range-based <code>for</code> loops (<a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2930.html">n2930</a>) (<a href="https://en.cppreference.com/w/cpp/language/range-for">range-for</a>)</p></li>
|
<li><p>Range-based <code>for</code> loops (<a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2930.html">n2930</a>) (<a href="https://en.cppreference.com/w/cpp/language/range-for">range-for</a>)</p></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="excluded-features">Excluded Features</h3>
|
<h3 id="excluded-features">Excluded Features</h3>
|
||||||
@@ -451,6 +337,7 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
|
|||||||
<li><p>Member initializers and aggregates (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html">n3653</a>)</p></li>
|
<li><p>Member initializers and aggregates (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html">n3653</a>)</p></li>
|
||||||
<li><p><code>[[noreturn]]</code> attribute (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf">n2761</a>)</p></li>
|
<li><p><code>[[noreturn]]</code> attribute (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf">n2761</a>)</p></li>
|
||||||
<li><p>Rvalue references and move semantics</p></li>
|
<li><p>Rvalue references and move semantics</p></li>
|
||||||
|
<li><p>Lambdas</p></li>
|
||||||
</ul>
|
</ul>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -409,7 +409,7 @@ Similar discussions for some other projects:
|
|||||||
* [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html) —
|
* [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html) —
|
||||||
Currently (2020) targeting C++17.
|
Currently (2020) targeting C++17.
|
||||||
|
|
||||||
* [C++11 and C++14 use in Chromium](https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++11.md) —
|
* [C++11 and C++14 use in Chromium](https://chromium-cpp.appspot.com) —
|
||||||
Categorizes features as allowed, banned, or to be discussed.
|
Categorizes features as allowed, banned, or to be discussed.
|
||||||
|
|
||||||
* [llvm Coding Standards](https://llvm.org/docs/CodingStandards.html) —
|
* [llvm Coding Standards](https://llvm.org/docs/CodingStandards.html) —
|
||||||
@@ -596,7 +596,9 @@ use can make code much harder to understand.
|
|||||||
Only use if the function body has a very small number of `return`
|
Only use if the function body has a very small number of `return`
|
||||||
statements, and generally relatively little other code.
|
statements, and generally relatively little other code.
|
||||||
|
|
||||||
* Also see [lambda expressions](#lambdaexpressions).
|
* Generic lambdas. Lambdas are not (yet) permitted.
|
||||||
|
|
||||||
|
* Lambda init captures. Lambdas are not (yet) permitted.
|
||||||
|
|
||||||
### Expression SFINAE
|
### Expression SFINAE
|
||||||
|
|
||||||
@@ -701,273 +703,6 @@ Some relevant sections from cppreference.com:
|
|||||||
Although related, the use of `std::initializer_list` remains forbidden, as
|
Although related, the use of `std::initializer_list` remains forbidden, as
|
||||||
part of the avoidance of the C++ Standard Library in HotSpot code.
|
part of the avoidance of the C++ Standard Library in HotSpot code.
|
||||||
|
|
||||||
### Local Function Objects
|
|
||||||
|
|
||||||
* Local function objects, including lambda expressions, may be used.
|
|
||||||
* Lambda expressions must only be used as a downward value.
|
|
||||||
* Prefer `[&]` as the capture list of a lambda expression.
|
|
||||||
* Return type deduction for lambda expressions is permitted, and indeed encouraged.
|
|
||||||
* An empty parameter list for a lambda expression may be elided.
|
|
||||||
* A lambda expression must not be `mutable`.
|
|
||||||
* Generic lambda expressions are permitted.
|
|
||||||
* Lambda expressions should be relatively simple.
|
|
||||||
* Anonymous lambda expressions should not overly clutter the enclosing expression.
|
|
||||||
* An anonymous lambda expression must not be directly invoked.
|
|
||||||
* Bind expressions are forbidden.
|
|
||||||
|
|
||||||
Single-use function objects can be defined locally within a function,
|
|
||||||
directly at the point of use. This is an alternative to having a function
|
|
||||||
or function object class defined at class or namespace scope.
|
|
||||||
|
|
||||||
This usage was somewhat limited by C++03, which does not permit such a class
|
|
||||||
to be used as a template parameter. That restriction was removed by C++11
|
|
||||||
([n2657]). Use of this feature is permitted.
|
|
||||||
|
|
||||||
Many HotSpot protocols involve "function-like" objects that involve some
|
|
||||||
named member function rather than a call operator. For example, a function
|
|
||||||
that performs some action on all threads might be written as
|
|
||||||
|
|
||||||
```
|
|
||||||
void do_something() {
|
|
||||||
struct DoSomething : public ThreadClosure {
|
|
||||||
virtual void do_thread(Thread* t) {
|
|
||||||
... do something with t ...
|
|
||||||
}
|
|
||||||
} closure;
|
|
||||||
Threads::threads_do(&closure);
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
HotSpot code has historically usually placed the DoSomething class at
|
|
||||||
namespace (or sometimes class) scope. This separates the function's code
|
|
||||||
from its use, often to the detriment of readability. It requires giving the
|
|
||||||
class a globally unique name (if at namespace scope). It also loses the
|
|
||||||
information that the class is intended for use in exactly one place, and
|
|
||||||
does not have any subclasses. (However, the latter can now be indicated by
|
|
||||||
declaring it `final`.) Often, for simplicity, a local class will skip
|
|
||||||
things like access control and accessor functions, giving the enclosing
|
|
||||||
function direct access to the implementation and eliminating some
|
|
||||||
boilerplate that might be provided if the class is in some outer (more
|
|
||||||
accessible) scope. On the other hand, if there is a lot of surrounding code
|
|
||||||
in the function body or the local class is of significant size, defining it
|
|
||||||
locally can increase clutter and reduce readability.
|
|
||||||
|
|
||||||
<a name="lambdaexpressions"></a>
|
|
||||||
C++11 added _lambda expressions_ as a new way to write a function object.
|
|
||||||
Simple lambda expressions can be significantly more concise than a function
|
|
||||||
object, eliminating a lot of boiler-plate. On the other hand, a complex
|
|
||||||
lambda expression may not provide much, if any, readability benefit compared
|
|
||||||
to an ordinary function object. Also, while a lambda can encapsulate a call
|
|
||||||
to a "function-like" object, it cannot be used in place of such.
|
|
||||||
|
|
||||||
A common use for local functions is as one-use [RAII] objects. The amount
|
|
||||||
of boilerplate for a function object class (local or not) makes such usage
|
|
||||||
somewhat clumsy and verbose. But with the help of a small amount of
|
|
||||||
supporting utility code, lambdas work particularly well for this use case.
|
|
||||||
|
|
||||||
Another use for local functions is [partial application][PARTIALAPP]. Again
|
|
||||||
here, lambdas are typically much simpler and less verbose than function
|
|
||||||
object classes.
|
|
||||||
|
|
||||||
Because of these benefits, lambda expressions are permitted in HotSpot code,
|
|
||||||
with some restrictions and usage guidance. An anonymous lambda is one which
|
|
||||||
is passed directly as an argument. A named lambda is the value of a
|
|
||||||
variable, which is its name.
|
|
||||||
|
|
||||||
Lambda expressions should only be passed downward. In particular, a lambda
|
|
||||||
should not be returned from a function or stored in a global variable,
|
|
||||||
whether directly or as the value of a member of some other object. Lambda
|
|
||||||
capture is syntactically subtle (by design), and propagating a lambda in
|
|
||||||
such ways can easily pass references to captured values to places where they
|
|
||||||
are no longer valid. In particular, members of the enclosing `this` object
|
|
||||||
are effectively captured by reference, even if the default capture is
|
|
||||||
by-value. For such uses-cases a function object class should be used to
|
|
||||||
make the desired value capturing and propagation explicit.
|
|
||||||
|
|
||||||
Limiting the capture list to `[&]` (implicitly capture by reference) is a
|
|
||||||
simplifying restriction that still provides good support for HotSpot usage,
|
|
||||||
while reducing the cases a reader must recognize and understand.
|
|
||||||
|
|
||||||
* Many common lambda uses require reference capture. Not permitting it
|
|
||||||
would substantially reduce the utility of lambdas.
|
|
||||||
|
|
||||||
* Referential transparency. Implicit reference capture makes variable
|
|
||||||
references in the lambda body have the same meaning they would have in the
|
|
||||||
enclosing code. There isn't a semantic barrier across which the meaning of
|
|
||||||
a variable changes.
|
|
||||||
|
|
||||||
* Explicit reference capture introduces significant clutter, especially when
|
|
||||||
lambda expressions are relatively small and simple, as they should be in
|
|
||||||
HotSpot code.
|
|
||||||
|
|
||||||
* There are a number of reasons why by-value capture might be used, but for
|
|
||||||
the most part they don't apply to HotSpot code, given other usage restrictions.
|
|
||||||
|
|
||||||
* A primary use-case for by-value capture is to support escaping uses,
|
|
||||||
where values captured by-reference might become invalid. That use-case
|
|
||||||
doesn't apply if only downward lambdas are used.
|
|
||||||
|
|
||||||
* By-value capture can also make a lambda-local copy for mutation, which
|
|
||||||
requires making the lambda `mutable`; see below.
|
|
||||||
|
|
||||||
* By-value capture might be viewed as an optimization, avoiding any
|
|
||||||
overhead for reference capture of cheap to copy values. But the
|
|
||||||
compiler can often eliminate any such overhead.
|
|
||||||
|
|
||||||
* By-value capture by a non-`mutable` lambda makes the captured values
|
|
||||||
const, preventing any modification by the lambda and making the captured
|
|
||||||
value unaffected by modifications to the outer variable. But this only
|
|
||||||
applies to captured auto variables, not member variables, and is
|
|
||||||
inconsistent with referential transparency.
|
|
||||||
|
|
||||||
* Non-capturing lambdas (with an empty capture list - `[]`) have limited
|
|
||||||
utility. There are cases where no captures are required (pure functions,
|
|
||||||
for example), but if the function is small and simple then that's obvious
|
|
||||||
anyway.
|
|
||||||
|
|
||||||
* Capture initializers (a C++14 feature - [N3649]) are not permitted.
|
|
||||||
Capture initializers inherently increase the complexity of the capture list,
|
|
||||||
and provide little benefit over an additional in-scope local variable.
|
|
||||||
|
|
||||||
The use of `mutable` lambda expressions is forbidden because there don't
|
|
||||||
seem to be many, if any, good use-cases for them in HotSpot. A lambda
|
|
||||||
expression needs to be mutable in order to modify a by-value captured value.
|
|
||||||
But with only downward lambdas, such usage seems likely to be rare and
|
|
||||||
complicated. It is better to use a function object class in any such cases
|
|
||||||
that arise, rather than requiring all HotSpot developers to understand this
|
|
||||||
relatively obscure feature.
|
|
||||||
|
|
||||||
While it is possible to directly invoke an anonymous lambda expression, that
|
|
||||||
feature should not be used, as such a form can be confusing to readers.
|
|
||||||
Instead, name the lambda and call it by name.
|
|
||||||
|
|
||||||
Some reasons to prefer a named lambda instead of an anonymous lambda are
|
|
||||||
|
|
||||||
* The body contains non-trivial control flow or declarations or other nested
|
|
||||||
constructs.
|
|
||||||
|
|
||||||
* Its role in an argument list is hard to guess without examining the
|
|
||||||
function declaration. Give it a name that indicates its purpose.
|
|
||||||
|
|
||||||
* It has an unusual capture list.
|
|
||||||
|
|
||||||
* It has a complex explicit return type or parameter types.
|
|
||||||
|
|
||||||
Lambda expressions, and particularly anonymous lambda expressions, should be
|
|
||||||
simple and compact. One-liners are good. Anonymous lambdas should usually
|
|
||||||
be limited to a couple lines of body code. More complex lambdas should be
|
|
||||||
named. A named lambda should not clutter the enclosing function and make it
|
|
||||||
long and complex; do continue to break up large functions via the use of
|
|
||||||
separate helper functions.
|
|
||||||
|
|
||||||
An anonymous lambda expression should either be a one-liner in a one-line
|
|
||||||
expression, or isolated in its own set of lines. Don't place part of a
|
|
||||||
lambda expression on the same line as other arguments to a function. The
|
|
||||||
body of a multi-line lambda argument should be indented from the start of
|
|
||||||
the capture list, as if that were the start of an ordinary function
|
|
||||||
definition. The body of a multi-line named lambda should be indented one
|
|
||||||
step from the variable's indentation.
|
|
||||||
|
|
||||||
Some examples:
|
|
||||||
|
|
||||||
1. `foo([&] { ++counter; });`
|
|
||||||
2. `foo(x, [&] { ++counter; });`
|
|
||||||
3. `foo([&] { if (predicate) ++counter; });`
|
|
||||||
4. `foo([&] { auto tmp = process(x); tmp.f(); return tmp.g(); })`
|
|
||||||
5. Separate one-line lambda from other arguments:
|
|
||||||
|
|
||||||
```
|
|
||||||
foo(c.begin(), c.end(),
|
|
||||||
[&] (const X& x) { do_something(x); return x.value(); });
|
|
||||||
```
|
|
||||||
6. Indentation for multi-line lambda:
|
|
||||||
|
|
||||||
```
|
|
||||||
c.do_entries([&] (const X& x) {
|
|
||||||
do_something(x, a);
|
|
||||||
do_something1(x, b);
|
|
||||||
do_something2(x, c);
|
|
||||||
});
|
|
||||||
```
|
|
||||||
7. Separate multi-line lambda from other arguments:
|
|
||||||
|
|
||||||
```
|
|
||||||
foo(c.begin(), c.end(),
|
|
||||||
[&] (const X& x) {
|
|
||||||
do_something(x, a);
|
|
||||||
do_something1(x, b);
|
|
||||||
do_something2(x, c);
|
|
||||||
});
|
|
||||||
```
|
|
||||||
8. Multi-line named lambda:
|
|
||||||
|
|
||||||
```
|
|
||||||
auto do_entry = [&] (const X& x) {
|
|
||||||
do_something(x, a);
|
|
||||||
do_something1(x, b);
|
|
||||||
do_something2(x, c);
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
Item 4, and especially items 6 and 7, are pushing the simplicity limits for
|
|
||||||
anonymous lambdas. Item 6 might be better written using a named lambda:
|
|
||||||
```
|
|
||||||
c.do_entries(do_entry);
|
|
||||||
```
|
|
||||||
|
|
||||||
Note that C++11 also added _bind expressions_ as a way to write a function
|
|
||||||
object for partial application, using `std::bind` and related facilities
|
|
||||||
from the Standard Library. `std::bind` generalizes and replaces some of the
|
|
||||||
binders from C++03. Bind expressions are not permitted in HotSpot code.
|
|
||||||
They don't provide enough benefit over lambdas or local function classes in
|
|
||||||
the cases where bind expressions are applicable to warrant the introduction
|
|
||||||
of yet another mechanism in this space into HotSpot code.
|
|
||||||
|
|
||||||
References:
|
|
||||||
|
|
||||||
* Local and unnamed types as template parameters ([n2657])
|
|
||||||
* New wording for C++0x lambdas ([n2927])
|
|
||||||
* Generalized lambda capture (init-capture) ([N3648])
|
|
||||||
* Generic (polymorphic) lambda expressions ([N3649])
|
|
||||||
|
|
||||||
[n2657]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm
|
|
||||||
[n2927]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2927.pdf
|
|
||||||
[N3648]: https://isocpp.org/files/papers/N3648.html
|
|
||||||
[N3649]: https://isocpp.org/files/papers/N3649.html
|
|
||||||
|
|
||||||
References from C++17
|
|
||||||
|
|
||||||
* Wording for constexpr lambda ([p0170r1])
|
|
||||||
* Lambda capture of *this by Value ([p0018r3])
|
|
||||||
|
|
||||||
[p0170r1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0170r1.pdf
|
|
||||||
[p0018r3]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0018r3.html
|
|
||||||
|
|
||||||
References from C++20
|
|
||||||
|
|
||||||
* Allow lambda capture [=, this] ([p0409r2])
|
|
||||||
* Familiar template syntax for generic lambdas ([p0428r2])
|
|
||||||
* Simplifying implicit lambda capture ([p0588r1])
|
|
||||||
* Default constructible and assignable stateless lambdas ([p0624r2])
|
|
||||||
* Lambdas in unevaluated contexts ([p0315r4])
|
|
||||||
* Allow pack expansion in lambda init-capture ([p0780r2]) ([p2095r0])
|
|
||||||
* Deprecate implicit capture of this via [=] ([p0806r2])
|
|
||||||
|
|
||||||
[p0409r2]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0409r2.html
|
|
||||||
[p0428r2]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0428r2.pdf
|
|
||||||
[p0588r1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0588r1.html
|
|
||||||
[p0624r2]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0624r2.pdf
|
|
||||||
[p0315r4]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0315r4.pdf
|
|
||||||
[p0780r2]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0780r2.html
|
|
||||||
[p2095r0]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2095r0.html
|
|
||||||
[p0806r2]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0806r2.html
|
|
||||||
|
|
||||||
References from C++23
|
|
||||||
|
|
||||||
* Make () more optional for lambdas ([p1102r2])
|
|
||||||
|
|
||||||
[p1102r2]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1102r2.html
|
|
||||||
|
|
||||||
### Additional Permitted Features
|
### Additional Permitted Features
|
||||||
|
|
||||||
* `constexpr`
|
* `constexpr`
|
||||||
@@ -1022,6 +757,9 @@ References from C++23
|
|||||||
([n3206](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm)),
|
([n3206](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm)),
|
||||||
([n3272](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm))
|
([n3272](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm))
|
||||||
|
|
||||||
|
* Local and unnamed types as template parameters
|
||||||
|
([n2657](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm))
|
||||||
|
|
||||||
* Range-based `for` loops
|
* Range-based `for` loops
|
||||||
([n2930](http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2930.html))
|
([n2930](http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2930.html))
|
||||||
([range-for](https://en.cppreference.com/w/cpp/language/range-for))
|
([range-for](https://en.cppreference.com/w/cpp/language/range-for))
|
||||||
@@ -1099,6 +837,9 @@ features that have not yet been discussed.
|
|||||||
|
|
||||||
* Rvalue references and move semantics
|
* Rvalue references and move semantics
|
||||||
|
|
||||||
|
* Lambdas
|
||||||
|
|
||||||
|
|
||||||
[ADL]: https://en.cppreference.com/w/cpp/language/adl
|
[ADL]: https://en.cppreference.com/w/cpp/language/adl
|
||||||
"Argument Dependent Lookup"
|
"Argument Dependent Lookup"
|
||||||
|
|
||||||
@@ -1113,6 +854,3 @@ features that have not yet been discussed.
|
|||||||
|
|
||||||
[SFINAE]: https://en.cppreference.com/w/cpp/language/sfinae
|
[SFINAE]: https://en.cppreference.com/w/cpp/language/sfinae
|
||||||
"Substitution Failure Is Not An Error"
|
"Substitution Failure Is Not An Error"
|
||||||
|
|
||||||
[PARTIALAPP]: https://en.wikipedia.org/wiki/Partial_application
|
|
||||||
"Partial Application"
|
|
||||||
|
|||||||
@@ -193,9 +193,9 @@ TEST FAILURE</code></pre>
|
|||||||
<h4 id="aot_modules-1">AOT_MODULES</h4>
|
<h4 id="aot_modules-1">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>
|
<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>
|
||||||
<h4 id="retry_count">RETRY_COUNT</h4>
|
<h4 id="retry_count">RETRY_COUNT</h4>
|
||||||
<p>Retry failed tests up to a set number of times. Defaults to 0.</p>
|
<p>Retry failed tests up to a set number of times, until they pass. This allows to pass the tests with intermittent failures. Defaults to 0.</p>
|
||||||
<h4 id="repeat_count">REPEAT_COUNT</h4>
|
<h4 id="repeat_count">REPEAT_COUNT</h4>
|
||||||
<p>Repeat the tests for a set number of times. Defaults to 0.</p>
|
<p>Repeat the tests up to a set number of times, stopping at first failure. This helps to reproduce intermittent test failures. Defaults to 0.</p>
|
||||||
<h3 id="gtest-keywords">Gtest keywords</h3>
|
<h3 id="gtest-keywords">Gtest keywords</h3>
|
||||||
<h4 id="repeat">REPEAT</h4>
|
<h4 id="repeat">REPEAT</h4>
|
||||||
<p>The number of times to repeat the tests (<code>--gtest_repeat</code>).</p>
|
<p>The number of times to repeat the tests (<code>--gtest_repeat</code>).</p>
|
||||||
@@ -231,7 +231,7 @@ TEST FAILURE</code></pre>
|
|||||||
JTREG="JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu
|
JTREG="JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu
|
||||||
-Djdk.test.docker.image.version=latest"</code></pre>
|
-Djdk.test.docker.image.version=latest"</code></pre>
|
||||||
<h3 id="non-us-locale">Non-US locale</h3>
|
<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 or MacOS, setting <code>JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"</code> helps for most, but not all test cases.</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.</p>
|
||||||
<p>For example:</p>
|
<p>For example:</p>
|
||||||
<pre><code>$ export LANG="en_US" && make test TEST=...
|
<pre><code>$ export LANG="en_US" && make test TEST=...
|
||||||
$ make test JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US" TEST=...</code></pre>
|
$ make test JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US" TEST=...</code></pre>
|
||||||
@@ -242,14 +242,39 @@ $ make test JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US" TE
|
|||||||
JTREG="JAVA_OPTIONS=-Dtest.nss.lib.paths=/path/to/your/latest/NSS-libs"</code></pre>
|
JTREG="JAVA_OPTIONS=-Dtest.nss.lib.paths=/path/to/your/latest/NSS-libs"</code></pre>
|
||||||
<p>For more notes about the PKCS11 tests, please refer to test/jdk/sun/security/pkcs11/README.</p>
|
<p>For more notes about the PKCS11 tests, please refer to test/jdk/sun/security/pkcs11/README.</p>
|
||||||
<h3 id="client-ui-tests">Client UI Tests</h3>
|
<h3 id="client-ui-tests">Client UI Tests</h3>
|
||||||
|
<h4 id="system-key-shortcuts">System key shortcuts</h4>
|
||||||
<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>
|
<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>
|
<h5 id="macos">MacOS</h5>
|
||||||
<p>Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts; select or deselect desired shortcut.</p>
|
<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>
|
<h5 id="linux">Linux</h5>
|
||||||
<p>Open the Activities overview and start typing Settings; Choose Settings, click Devices, then click Keyboard; set or override desired shortcut.</p>
|
<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>
|
<h5 id="windows">Windows</h5>
|
||||||
<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>
|
<p>Note: restart is required to make the settings take effect.</p>
|
||||||
|
<h4 id="robot-api">Robot API</h4>
|
||||||
|
<p>Most automated Client UI tests use <code>Robot</code> API to control
|
||||||
|
the UI. Usually, the default operating system settings need to be
|
||||||
|
adjusted for Robot to work correctly. The detailed steps how to access
|
||||||
|
and update these settings for different platforms are provided
|
||||||
|
below.</p>
|
||||||
|
<h5 id="macos-1">macOS</h5>
|
||||||
|
<p><code>Robot</code> is not permitted to control your Mac by default
|
||||||
|
since macOS 10.15. To allow it, choose Apple menu -> System Settings,
|
||||||
|
click Privacy & Security; then click Accessibility and ensure the
|
||||||
|
following apps are allowed to control your computer: <em>Java</em> and
|
||||||
|
<em>Terminal</em>. If the tests are run from an IDE, the IDE should be
|
||||||
|
granted this permission too.</p>
|
||||||
|
<h5 id="windows-1">Windows</h5>
|
||||||
|
<p>On Windows if Cygwin terminal is used to run the tests, there is a
|
||||||
|
delay in focus transfer. Usually it causes automated UI test failure. To
|
||||||
|
disable the delay, type <code>regedit</code> in the Search and then
|
||||||
|
select Registry Editor; navigate to the following key:
|
||||||
|
<code>HKEY_CURRENT_USER\Control Panel\Desktop</code>; make sure the
|
||||||
|
<code>ForegroundLockTimeout</code> value is set to 0.</p>
|
||||||
|
<p>Additional information about Client UI tests configuration for
|
||||||
|
various operating systems can be obtained at <a
|
||||||
|
href="https://wiki.openjdk.org/display/ClientLibs/Automated+client+GUI+testing+system+set+up+requirements">Automated
|
||||||
|
client GUI testing system set up requirements</a></p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -419,11 +419,15 @@ modules. If multiple modules are specified, they should be separated by space
|
|||||||
|
|
||||||
#### RETRY_COUNT
|
#### RETRY_COUNT
|
||||||
|
|
||||||
Retry failed tests up to a set number of times. Defaults to 0.
|
Retry failed tests up to a set number of times, until they pass.
|
||||||
|
This allows to pass the tests with intermittent failures.
|
||||||
|
Defaults to 0.
|
||||||
|
|
||||||
#### REPEAT_COUNT
|
#### REPEAT_COUNT
|
||||||
|
|
||||||
Repeat the tests for a set number of times. Defaults to 0.
|
Repeat the tests up to a set number of times, stopping at first failure.
|
||||||
|
This helps to reproduce intermittent test failures.
|
||||||
|
Defaults to 0.
|
||||||
|
|
||||||
### Gtest keywords
|
### Gtest keywords
|
||||||
|
|
||||||
@@ -510,7 +514,7 @@ $ make test TEST="jtreg:test/hotspot/jtreg/containers/docker" \
|
|||||||
|
|
||||||
If your locale is non-US, some tests are likely to fail. To work around this
|
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 `LANG="en_US"`
|
you can set the locale to US. On Unix platforms simply setting `LANG="en_US"`
|
||||||
in the environment before running tests should work. On Windows or MacOS, setting
|
in the environment before running tests should work. On Windows, setting
|
||||||
`JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"` helps for most, but
|
`JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"` helps for most, but
|
||||||
not all test cases.
|
not all test cases.
|
||||||
|
|
||||||
@@ -542,12 +546,14 @@ test/jdk/sun/security/pkcs11/README.
|
|||||||
|
|
||||||
### Client UI Tests
|
### Client UI Tests
|
||||||
|
|
||||||
|
#### System key shortcuts
|
||||||
|
|
||||||
Some Client UI tests use key sequences which may be reserved by the operating
|
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
|
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
|
disable system key shortcuts prior testing. The steps to access and disable
|
||||||
system key shortcuts for various platforms are provided below.
|
system key shortcuts for various platforms are provided below.
|
||||||
|
|
||||||
#### MacOS
|
##### macOS
|
||||||
|
|
||||||
Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts;
|
Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts;
|
||||||
select or deselect desired shortcut.
|
select or deselect desired shortcut.
|
||||||
@@ -560,12 +566,12 @@ test correctly the default global key shortcut should be disabled using the
|
|||||||
steps described above, and then deselect "Turn keyboard access on or off"
|
steps described above, and then deselect "Turn keyboard access on or off"
|
||||||
option which is responsible for `CTRL + F1` combination.
|
option which is responsible for `CTRL + F1` combination.
|
||||||
|
|
||||||
#### Linux
|
##### Linux
|
||||||
|
|
||||||
Open the Activities overview and start typing Settings; Choose Settings, click
|
Open the Activities overview and start typing Settings; Choose Settings, click
|
||||||
Devices, then click Keyboard; set or override desired shortcut.
|
Devices, then click Keyboard; set or override desired shortcut.
|
||||||
|
|
||||||
#### Windows
|
##### Windows
|
||||||
|
|
||||||
Type `gpedit` in the Search and then click Edit group policy; navigate to User
|
Type `gpedit` in the Search and then click Edit group policy; navigate to User
|
||||||
Configuration -> Administrative Templates -> Windows Components -> File
|
Configuration -> Administrative Templates -> Windows Components -> File
|
||||||
@@ -574,6 +580,33 @@ double click on it; enable or disable hotkeys.
|
|||||||
|
|
||||||
Note: restart is required to make the settings take effect.
|
Note: restart is required to make the settings take effect.
|
||||||
|
|
||||||
|
#### Robot API
|
||||||
|
|
||||||
|
Most automated Client UI tests use `Robot` API to control the UI. Usually,
|
||||||
|
the default operating system settings need to be adjusted for Robot
|
||||||
|
to work correctly. The detailed steps how to access and update these settings
|
||||||
|
for different platforms are provided below.
|
||||||
|
|
||||||
|
##### macOS
|
||||||
|
|
||||||
|
`Robot` is not permitted to control your Mac by default since
|
||||||
|
macOS 10.15. To allow it, choose Apple menu -> System Settings, click
|
||||||
|
Privacy & Security; then click Accessibility and ensure the following apps are
|
||||||
|
allowed to control your computer: *Java* and *Terminal*. If the tests are run
|
||||||
|
from an IDE, the IDE should be granted this permission too.
|
||||||
|
|
||||||
|
##### Windows
|
||||||
|
|
||||||
|
On Windows if Cygwin terminal is used to run the tests, there is a delay in
|
||||||
|
focus transfer. Usually it causes automated UI test failure. To disable the
|
||||||
|
delay, type `regedit` in the Search and then select Registry Editor; navigate
|
||||||
|
to the following key: `HKEY_CURRENT_USER\Control Panel\Desktop`; make sure
|
||||||
|
the `ForegroundLockTimeout` value is set to 0.
|
||||||
|
|
||||||
|
Additional information about Client UI tests configuration for various operating
|
||||||
|
systems can be obtained at [Automated client GUI testing system set up
|
||||||
|
requirements](https://wiki.openjdk.org/display/ClientLibs/Automated+client+GUI+testing+system+set+up+requirements)
|
||||||
|
|
||||||
---
|
---
|
||||||
# Override some definitions in the global css file that are not optimal for
|
# Override some definitions in the global css file that are not optimal for
|
||||||
# this document.
|
# this document.
|
||||||
|
|||||||
230
jb/jdkdiff.py
230
jb/jdkdiff.py
@@ -1,230 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import math
|
|
||||||
import os.path
|
|
||||||
import sys
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
|
|
||||||
def fatal(msg):
|
|
||||||
sys.stderr.write(f"[fatal] {msg}\n")
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
|
|
||||||
def verbose(options, *msg):
|
|
||||||
if options.verbose:
|
|
||||||
sys.stdout.write(f"[verbose] ")
|
|
||||||
sys.stdout.write(*msg)
|
|
||||||
sys.stdout.write('\n')
|
|
||||||
|
|
||||||
|
|
||||||
def first_line(str):
|
|
||||||
return "" if not str else str.splitlines()[0]
|
|
||||||
|
|
||||||
|
|
||||||
class Options:
|
|
||||||
def __init__(self):
|
|
||||||
ap = argparse.ArgumentParser(description="Show bugfixes differences between JBR and OpenJDK git repos",
|
|
||||||
epilog="Example: %(prog)s --jdk ./jdk11u/ --jbr ./JetBrainsRuntime/ --path src/hotspot --limit 200")
|
|
||||||
ap.add_argument('--jdk', dest='jdkpath', help='path to OpenJDK git repo', required=True)
|
|
||||||
ap.add_argument('--jbr', dest='jbrpath', help='path to JBR git repo', required=True)
|
|
||||||
ap.add_argument('--path', dest='path', help='limit to changes in this path (relative to git root)')
|
|
||||||
ap.add_argument('--limit', dest='limit', help='limit to this many log entries in --jdk repo', type=int, default=-1)
|
|
||||||
ap.add_argument('-o', dest="output_dir", help="save patches to this directory (created if necessary)")
|
|
||||||
ap.add_argument('-v', dest='verbose', help="verbose output", default=False, action='store_true')
|
|
||||||
args = ap.parse_args()
|
|
||||||
|
|
||||||
if not os.path.isdir(args.jdkpath):
|
|
||||||
fatal(f"{args.jdkpath} not a directory")
|
|
||||||
|
|
||||||
if not os.path.isdir(args.jbrpath):
|
|
||||||
fatal(f"{args.jbrpath} not a directory")
|
|
||||||
|
|
||||||
if not git_is_available():
|
|
||||||
fatal("can't run git commands; make sure git is in PATH")
|
|
||||||
|
|
||||||
self.jdkpath = args.jdkpath
|
|
||||||
self.jbrpath = args.jbrpath
|
|
||||||
self.path = args.path
|
|
||||||
self.limit = args.limit
|
|
||||||
self.output_dir = args.output_dir
|
|
||||||
self.verbose = args.verbose
|
|
||||||
|
|
||||||
|
|
||||||
class GitRepo:
|
|
||||||
def __init__(self, rootpath):
|
|
||||||
self.rootpath = rootpath
|
|
||||||
|
|
||||||
def run_git_cmd(self, git_args):
|
|
||||||
args = ["git", "-C", self.rootpath]
|
|
||||||
args.extend(git_args)
|
|
||||||
# print(f"Runnig git cmd '{' '.join(args)}'")
|
|
||||||
p = subprocess.run(args, capture_output=True, text=True)
|
|
||||||
if p.returncode != 0:
|
|
||||||
fatal(f"git returned non-zero code in {self.rootpath} ({first_line(p.stderr)})")
|
|
||||||
return p.stdout
|
|
||||||
|
|
||||||
def save_git_cmd(self, fname, git_args):
|
|
||||||
args = ["git", "-C", self.rootpath]
|
|
||||||
args.extend(git_args)
|
|
||||||
# print(f"Runnig git cmd '{' '.join(args)}'")
|
|
||||||
with open(fname, "w") as stdout_file:
|
|
||||||
p = subprocess.run(args, stdout=stdout_file)
|
|
||||||
if p.returncode != 0:
|
|
||||||
fatal(f"git returned non-zero code in {self.rootpath} ({first_line(p.stderr)})")
|
|
||||||
|
|
||||||
def current_branch(self):
|
|
||||||
branch_name = self.run_git_cmd(["branch", "--show-current"]).strip()
|
|
||||||
return branch_name
|
|
||||||
|
|
||||||
def log(self, path=None, limit=None):
|
|
||||||
cmds = ["log", "--no-decorate"]
|
|
||||||
if limit:
|
|
||||||
cmds.extend(["-n", str(limit)])
|
|
||||||
if path:
|
|
||||||
cmds.append(path)
|
|
||||||
full_log = self.run_git_cmd(cmds)
|
|
||||||
return full_log
|
|
||||||
|
|
||||||
|
|
||||||
class Commit:
|
|
||||||
def __init__(self, lines):
|
|
||||||
self.sha = lines[0].split()[1]
|
|
||||||
self.message = ""
|
|
||||||
self.bugid = None
|
|
||||||
|
|
||||||
# Commit message starts after one blank line
|
|
||||||
read_message = False
|
|
||||||
for l in lines:
|
|
||||||
if read_message:
|
|
||||||
self.message += l + "\n"
|
|
||||||
if not read_message and l == "":
|
|
||||||
read_message = True
|
|
||||||
|
|
||||||
if self.message and self.message != "" and ":" in self.message:
|
|
||||||
maybe_bugid = self.message.split(":")[0].strip()
|
|
||||||
if 10 >= len(maybe_bugid) >= 4:
|
|
||||||
self.bugid = maybe_bugid
|
|
||||||
|
|
||||||
|
|
||||||
class History:
|
|
||||||
def __init__(self, log):
|
|
||||||
log_itr = iter(log.splitlines())
|
|
||||||
self.commits = []
|
|
||||||
commit_lines = []
|
|
||||||
for line in log_itr:
|
|
||||||
if line.startswith("commit ") and len(commit_lines) > 0:
|
|
||||||
commit = Commit(commit_lines)
|
|
||||||
self.commits.append(commit)
|
|
||||||
commit_lines = []
|
|
||||||
commit_lines.append(line)
|
|
||||||
|
|
||||||
if len(commit_lines) > 0:
|
|
||||||
commit = Commit(commit_lines)
|
|
||||||
self.commits.append(commit)
|
|
||||||
|
|
||||||
def contains(self, str):
|
|
||||||
return any(str in commit.message for commit in self.commits)
|
|
||||||
|
|
||||||
def size(self):
|
|
||||||
return len(self.commits)
|
|
||||||
|
|
||||||
|
|
||||||
def print_explanation(options, jdk, jbr):
|
|
||||||
verbose(options, f"Reading history from '{jdk.rootpath}' on branch '{jdk.current_branch()}'")
|
|
||||||
if options.path:
|
|
||||||
verbose(options, f"\t(only under '{options.path}')")
|
|
||||||
verbose(options, f"Searching for same fixes in '{jbr.rootpath}' on branch '{jbr.current_branch()}'")
|
|
||||||
|
|
||||||
|
|
||||||
def git_is_available():
|
|
||||||
p = None
|
|
||||||
try:
|
|
||||||
p = subprocess.run(["git", "--help"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
return p is not None and p.returncode == 0
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
check_python_min_requirements()
|
|
||||||
|
|
||||||
options = Options()
|
|
||||||
|
|
||||||
jdk = GitRepo(options.jdkpath)
|
|
||||||
jbr = GitRepo(options.jbrpath)
|
|
||||||
|
|
||||||
print_explanation(options, jdk, jbr)
|
|
||||||
|
|
||||||
commits_to_save = []
|
|
||||||
try:
|
|
||||||
jdk_log = jdk.log(options.path, options.limit)
|
|
||||||
jdk_history = History(jdk_log)
|
|
||||||
|
|
||||||
jbr_log = jbr.log(options.path)
|
|
||||||
jbr_history = History(jbr_log)
|
|
||||||
|
|
||||||
verbose(options, f"Read {jdk_history.size()} commits in JDK, {jbr_history.size()} in JBR")
|
|
||||||
|
|
||||||
for c in jdk_history.commits:
|
|
||||||
if c.bugid:
|
|
||||||
verbose(options, f"Looking for bugfix for {c.bugid}")
|
|
||||||
if not jbr_history.contains(c.bugid):
|
|
||||||
commits_to_save.append(c)
|
|
||||||
print(f"[note] Fix for {c.bugid} not found in JBR ({jbr.rootpath})")
|
|
||||||
print(f" commit {c.sha}")
|
|
||||||
print(f" {first_line(c.message).strip()}")
|
|
||||||
except KeyboardInterrupt:
|
|
||||||
fatal("Interrupted")
|
|
||||||
|
|
||||||
if len(commits_to_save) > 0 and options.output_dir:
|
|
||||||
print()
|
|
||||||
if not os.path.exists(options.output_dir):
|
|
||||||
verbose(options, f"Creating output directory {options.output_dir}")
|
|
||||||
os.makedirs(options.output_dir)
|
|
||||||
nzeroes = len(str(len(commits_to_save)))
|
|
||||||
for i, c in enumerate(reversed(commits_to_save)):
|
|
||||||
fname = os.path.join(options.output_dir, f"{str(i).zfill(nzeroes)}-{c.bugid}.patch")
|
|
||||||
print(f"[note] {c.bugid} saved as {fname}")
|
|
||||||
fname = os.path.abspath(fname)
|
|
||||||
jdk.save_git_cmd(fname, ["format-patch", "-1", c.sha, "--stdout"])
|
|
||||||
|
|
||||||
script_fname = os.path.join(options.output_dir, "apply.sh")
|
|
||||||
with open(script_fname, "w") as script_file:
|
|
||||||
print(apply_script_code.format(os.path.abspath(jbr.rootpath), os.path.abspath(options.output_dir)),
|
|
||||||
file=script_file)
|
|
||||||
print(f"[note] Execute 'bash {script_fname}' to apply patches to {jbr.rootpath}")
|
|
||||||
|
|
||||||
|
|
||||||
def check_python_min_requirements():
|
|
||||||
if sys.version_info < (3, 6):
|
|
||||||
fatal("Minimum version 3.6 is required to run this script")
|
|
||||||
|
|
||||||
|
|
||||||
apply_script_code = """
|
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
GITROOT={0}
|
|
||||||
PATCHROOT={1}
|
|
||||||
|
|
||||||
cd $PATCHROOT || exit 1
|
|
||||||
PATCHES=$(find $PATCHROOT -name '*.patch' | sort -n)
|
|
||||||
|
|
||||||
for P in $PATCHES; do
|
|
||||||
git -C $GITROOT am $P
|
|
||||||
if [ $? != 0 ]; then
|
|
||||||
mv "$P" "$P.failed"
|
|
||||||
echo "[ERROR] Patch $P did not apply cleanly. Try applying it manually."
|
|
||||||
echo "[NOTE] Execute this script to apply the remaining patches."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
mv "$P" "$P.done"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "[NOTE] Done applying patches; check $PATCHROOT for .patch and .patch.failed to see if all have been applied."
|
|
||||||
"""
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
# jetbrains/runtime:jbr15env
|
|
||||||
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 16
|
|
||||||
RUN wget https://cdn.azul.com/zulu/bin/zulu17.28.13-ca-jdk17.0.0-linux_x64.tar.gz \
|
|
||||||
-O - | tar xz -C /
|
|
||||||
RUN mv /zulu17.28.13-ca-jdk17.0.0-linux_x64 /jdk17.0.0
|
|
||||||
ENV PATH /opt/rh/devtoolset-8/root/usr/bin:$PATH
|
|
||||||
RUN mkdir .git
|
|
||||||
RUN git config user.email "teamcity@jetbrains.com"
|
|
||||||
RUN git config user.name "builduser"
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
# NOTE: This Dockerfile is meant to be used from the mkdocker_aarch64.sh script.
|
|
||||||
|
|
||||||
# Pull a concrete version of Linux that does NOT recieve updates after it's
|
|
||||||
# been created. This is so that the image is as stable as possible to make
|
|
||||||
# image creation reproducible.
|
|
||||||
# NB: this also means there may be no security-related fixes there, need to
|
|
||||||
# move the version to the next manually.
|
|
||||||
FROM arm64v8/ubuntu:focal-20211006
|
|
||||||
|
|
||||||
# Install the necessary build tools
|
|
||||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
|
||||||
export DEBCONF_NONINTERACTIVE_SEEN=true && \
|
|
||||||
echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections; \
|
|
||||||
echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections; \
|
|
||||||
apt-get update -qy && \
|
|
||||||
apt-get install -qy \
|
|
||||||
autoconf \
|
|
||||||
build-essential \
|
|
||||||
bzip2 \
|
|
||||||
file \
|
|
||||||
g++-10=10.3.0-1ubuntu1~20.04 \
|
|
||||||
gcc-10=10.3.0-1ubuntu1~20.04 \
|
|
||||||
git \
|
|
||||||
libasound2-dev \
|
|
||||||
libcups2-dev \
|
|
||||||
libfontconfig1-dev \
|
|
||||||
libx11-dev \
|
|
||||||
libxext-dev \
|
|
||||||
libxrandr-dev \
|
|
||||||
libxrender-dev \
|
|
||||||
libxt-dev \
|
|
||||||
libxtst-dev \
|
|
||||||
make \
|
|
||||||
tar \
|
|
||||||
unzip \
|
|
||||||
zip && \
|
|
||||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 && \
|
|
||||||
apt-get clean -qy && \
|
|
||||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
||||||
|
|
||||||
# Set up boot JDK for building
|
|
||||||
COPY boot_jdk.tar.gz /jdk17/
|
|
||||||
RUN cd /jdk17 && tar --strip-components=1 -xzf boot_jdk.tar.gz && rm /jdk17/boot_jdk.tar.gz
|
|
||||||
ENV BOOT_JDK=/jdk17
|
|
||||||
|
|
||||||
RUN git config --global user.email "teamcity@jetbrains.com" && \
|
|
||||||
git config --global user.name "builduser"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
FROM i386/ubuntu:xenial
|
|
||||||
|
|
||||||
RUN linux32 apt-get update && apt-get install -y --no-install-recommends apt-utils
|
|
||||||
COPY jbrsdk-11.0.5-b1 /jbrsdk-11.0.5-b1
|
|
||||||
RUN linux32 apt-get -y install file build-essential zip unzip 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
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
#!/bin/bash -x
|
|
||||||
|
|
||||||
# This script creates a Docker image suitable for building AArch64 variant
|
|
||||||
# of the JetBrains Runtime "dev" version.
|
|
||||||
|
|
||||||
BOOT_JDK_REMOTE_FILE=zulu17.30.15-ca-jdk17.0.1-linux_aarch64.tar.gz
|
|
||||||
BOOT_JDK_SHA=4d9c9116eb0cdd2d7fb220d6d27059f4bf1b7e95cc93d5512bd8ce3791af86c7
|
|
||||||
BOOT_JDK_LOCAL_FILE=boot_jdk.tar.gz
|
|
||||||
|
|
||||||
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
|
|
||||||
# Obtain "boot JDK" from outside of the container.
|
|
||||||
wget -nc https://cdn.azul.com/zulu/bin/${BOOT_JDK_REMOTE_FILE} -O $BOOT_JDK_LOCAL_FILE
|
|
||||||
else
|
|
||||||
echo "boot JDK \"$BOOT_JDK_LOCAL_FILE\" present, skipping download"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Verify that what we've downloaded can be trusted.
|
|
||||||
sha256sum -c - <<EOF
|
|
||||||
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
|
|
||||||
EOF
|
|
||||||
|
|
||||||
docker build -t jbrdevenv_arm64v8 -f Dockerfile.aarch64 .
|
|
||||||
|
|
||||||
# NB: the resulting container can (and should) be used without the network
|
|
||||||
# connection (--network none) during build in order to reduce the chance
|
|
||||||
# of build contamination.
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<component name="CopyrightManager">
|
|
||||||
<copyright>
|
|
||||||
<option name="notice" value="Copyright &#36;originalComment.match("Copyright (\d+)", 1, "-")&#36;today.year JetBrains s.r.o. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. This code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 only, as published by the Free Software Foundation. This code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version 2 for more details (a copy is included in the LICENSE file that accompanied this code). You should have received a copy of the GNU General Public License version 2 along with this work; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or visit www.oracle.com if you need additional information or have any questions." />
|
|
||||||
<option name="keyword" value="Copyright" />
|
|
||||||
<option name="allowReplaceKeyword" value="JetBrains" />
|
|
||||||
<option name="myName" value="JetBrains" />
|
|
||||||
<option name="myLocal" value="true" />
|
|
||||||
</copyright>
|
|
||||||
</component>
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
<component name="CopyrightManager">
|
|
||||||
<settings default="JetBrains" />
|
|
||||||
</component>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
JetBrainsRuntime
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<component name="CopyrightManager">
|
|
||||||
<copyright>
|
|
||||||
<option name="notice" value="Copyright 2000-&#36;today.year JetBrains s.r.o. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License." />
|
|
||||||
<option name="keyword" value="Copyright" />
|
|
||||||
<option name="allowReplaceKeyword" value="JetBrains" />
|
|
||||||
<option name="myName" value="JetBrains" />
|
|
||||||
<option name="myLocal" value="true" />
|
|
||||||
</copyright>
|
|
||||||
</component>
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
<component name="CopyrightManager">
|
|
||||||
<settings default="JetBrains" />
|
|
||||||
</component>
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="IssueNavigationConfiguration">
|
|
||||||
<option name="links">
|
|
||||||
<list>
|
|
||||||
<IssueNavigationLink>
|
|
||||||
<option name="issueRegexp" value="(?:^|\s|\p{Punct})([A-Z]+\-\d+)(?=$|\s|\p{Punct})" />
|
|
||||||
<option name="linkRegexp" value="https://youtrack.jetbrains.com/issue/$1" />
|
|
||||||
</IssueNavigationLink>
|
|
||||||
<IssueNavigationLink>
|
|
||||||
<option name="issueRegexp" value="(?:^|\s|\p{Punct})(?:JDK-)?(\d{7})(?=$|\s|\p{Punct})" />
|
|
||||||
<option name="linkRegexp" value="https://bugs.openjdk.java.net/browse/JDK-$1" />
|
|
||||||
</IssueNavigationLink>
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="JAVA_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
||||||
<exclude-output />
|
|
||||||
<content url="file://$MODULE_DIR$/src/jetbrains.api">
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/jetbrains.api/src" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/jetbrains.api/templates" isTestSource="false" />
|
|
||||||
</content>
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
||||||
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/jdk.iml" filepath="$PROJECT_DIR$/.idea/jdk.iml" />
|
|
||||||
###MODULE_IMLS###
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/jetbrains.api.iml" filepath="$PROJECT_DIR$/.idea/jetbrains.api.iml" />
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/test.iml" filepath="$PROJECT_DIR$/.idea/test.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="IssueNavigationConfiguration">
|
|
||||||
<option name="links">
|
|
||||||
<list>
|
|
||||||
<IssueNavigationLink>
|
|
||||||
<option name="issueRegexp" value="(?:^|\s|\p{Punct})([A-Z]+\-\d+)(?=$|\s|\p{Punct})" />
|
|
||||||
<option name="linkRegexp" value="https://youtrack.jetbrains.com/issue/$1" />
|
|
||||||
</IssueNavigationLink>
|
|
||||||
<IssueNavigationLink>
|
|
||||||
<option name="issueRegexp" value="(?:^|\s|\p{Punct})(?:JDK-)?(\d{7})(?=$|\s|\p{Punct})" />
|
|
||||||
<option name="linkRegexp" value="https://bugs.openjdk.java.net/browse/JDK-$1" />
|
|
||||||
</IssueNavigationLink>
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
@@ -1,135 +0,0 @@
|
|||||||
apply plugin: 'java'
|
|
||||||
import org.gradle.internal.os.OperatingSystem
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
def test_jvm = {
|
|
||||||
if (project.hasProperty('jbsdkhome')) {
|
|
||||||
file(jbsdkhome + (OperatingSystem.current().isWindows()?"/bin/java.exe" : "/bin/java")).absolutePath
|
|
||||||
} else {
|
|
||||||
if (OperatingSystem.current().isMacOsX()) {
|
|
||||||
file('../../../build/macosx-x86_64-normal-server-release/images/jdk-bundle/jdk-11.0.4.jdk/Contents/Home/bin/java').absolutePath
|
|
||||||
} else if (OperatingSystem.current().isLinux()) {
|
|
||||||
file('../../../build/linux-x86_64-normal-server-release/images/jdk/bin/java').absolutePath
|
|
||||||
} else {
|
|
||||||
file('../../../build/windows-x86_64-normal-server-release/images/jdk/bin/java.exe').absolutePath
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
testCompile('junit:junit:4.12'){
|
|
||||||
exclude group: 'org.hamcrest'
|
|
||||||
}
|
|
||||||
testCompile 'org.hamcrest:hamcrest-library:1.3'
|
|
||||||
testCompile 'net.java.dev.jna:jna:4.4.0'
|
|
||||||
testCompile 'com.twelvemonkeys.imageio:imageio-tiff:3.3.2'
|
|
||||||
testCompile 'org.apache.commons:commons-lang3:3.0'
|
|
||||||
}
|
|
||||||
|
|
||||||
def jdk_modules = ["java.base", "java.logging", "java.prefs",
|
|
||||||
"java.se.ee", "java.sql", "java.datatransfer",
|
|
||||||
"java.management", "java.rmi", "java.security.jgss",
|
|
||||||
"java.sql.rowset", "java.desktop", "java.management.rmi",
|
|
||||||
"java.scripting", "java.security.sasl", "java.transaction",
|
|
||||||
"java.instrument", "java.naming", "java.se",
|
|
||||||
"java.smartcardio", "java.xml.crypto"]
|
|
||||||
|
|
||||||
def jdk_class_dirs = []
|
|
||||||
|
|
||||||
jdk_modules.collect(jdk_class_dirs) {
|
|
||||||
new File("../../../src/" + it + "/share/classes")
|
|
||||||
}
|
|
||||||
|
|
||||||
if (OperatingSystem.current().isMacOsX())
|
|
||||||
jdk_modules.collect(jdk_class_dirs) {
|
|
||||||
"../../../src/" + it + "/macosx/classes"
|
|
||||||
}
|
|
||||||
else if (OperatingSystem.current().isLinux()) {
|
|
||||||
jdk_modules.collect(jdk_class_dirs) {
|
|
||||||
"../../../src/" + it + "/solaris/classes"
|
|
||||||
}
|
|
||||||
jdk_modules.collect(jdk_class_dirs) {
|
|
||||||
"../../../src/" + it + "/unix/classes"
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
jdk_modules.collect(jdk_class_dirs) {
|
|
||||||
"../../../src/" + it + "/windows/classes"
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets.main.java.srcDirs = jdk_class_dirs
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
test {
|
|
||||||
java {
|
|
||||||
srcDir "../../../test/jdk/jbu"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
test.dependsOn.clear()
|
|
||||||
|
|
||||||
test.dependsOn tasks.compileTestJava
|
|
||||||
|
|
||||||
test {
|
|
||||||
systemProperty "jb.java2d.metal", "true"
|
|
||||||
systemProperty "testdata", file('../../../test/jdk/jbu/testdata').absolutePath
|
|
||||||
|
|
||||||
// Generate golden images for DroidFontTest and MixedTextTest
|
|
||||||
// systemProperty "gentestdata", ""
|
|
||||||
|
|
||||||
// Enable Java2D logging (https://confluence.jetbrains.com/display/JRE/Java2D+Rendering+Logging)
|
|
||||||
// systemProperty "sun.java2d.trace", "log"
|
|
||||||
// systemProperty "sun.java2d.trace", "log,pimpl"
|
|
||||||
|
|
||||||
outputs.upToDateWhen { false }
|
|
||||||
executable = test_jvm()
|
|
||||||
|
|
||||||
// Enable async/dtrace profiler
|
|
||||||
jvmArgs "-XX:+PreserveFramePointer"
|
|
||||||
// Enable native J2D logging (only in debug build)
|
|
||||||
// Can be turned on for J2D by adding "#define DEBUG 1" into jdk/src/share/native/sun/java2d/Trace.h
|
|
||||||
|
|
||||||
// environment 'J2D_TRACE_LEVEL', '4'
|
|
||||||
}
|
|
||||||
|
|
||||||
def buildDir = project.buildscript.sourceFile.parentFile.parentFile.parentFile.parentFile
|
|
||||||
|
|
||||||
def make_cmd = "make"
|
|
||||||
if (OperatingSystem.current().isWindows()) {
|
|
||||||
def cyg_make_cmd = new File("c:/cygwin64/bin/make.exe")
|
|
||||||
if (cyg_make_cmd.exists()) make_cmd = cyg_make_cmd.absolutePath
|
|
||||||
}
|
|
||||||
def test_run = false
|
|
||||||
task make_images {
|
|
||||||
doLast {
|
|
||||||
if (!test_run) {
|
|
||||||
def pb = new ProcessBuilder().command(make_cmd.toString(), "-C", buildDir.absolutePath, "images")
|
|
||||||
def proc = pb.redirectErrorStream(true).start()
|
|
||||||
proc.inputStream.eachLine { println it }
|
|
||||||
assert proc.waitFor() == 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task make_clean {
|
|
||||||
doLast {
|
|
||||||
def pb = new ProcessBuilder().command(make_cmd.toString(), "-C", buildDir.absolutePath, "clean")
|
|
||||||
def proc = pb.redirectErrorStream(true).start()
|
|
||||||
proc.inputStream.eachLine { println it }
|
|
||||||
assert proc.waitFor() == 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task run_test {
|
|
||||||
doLast {
|
|
||||||
test_run = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.cleanTest.dependsOn tasks.run_test
|
|
||||||
classes.dependsOn.clear()
|
|
||||||
classes.dependsOn tasks.make_images
|
|
||||||
tasks.cleanClasses.dependsOn tasks.make_clean
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# $1 - Boot JDK
|
|
||||||
# $2 - JBR part of API version
|
|
||||||
|
|
||||||
cd "`dirname "$0"`/../../../../.."
|
|
||||||
PWD="`pwd`"
|
|
||||||
CONF="$PWD/build/jbr-api.conf"
|
|
||||||
./configure --with-debug-level=release --with-boot-jdk=$1 || exit $?
|
|
||||||
make jbr-api CONF=release MAKEOVERRIDES= "JBR_API_CONF_FILE=$CONF" JBR_API_JBR_VERSION=$2 || exit $?
|
|
||||||
. $CONF || exit $?
|
|
||||||
echo "##teamcity[buildNumber '$VERSION']"
|
|
||||||
cp "$JAR" ./jbr-api-${VERSION}.jar || exit $?
|
|
||||||
cp "$SOURCES_JAR" ./jbr-api-${VERSION}-sources.jar || exit $?
|
|
||||||
echo "##teamcity[publishArtifacts '$PWD/jbr-api-${VERSION}.jar']"
|
|
||||||
echo "##teamcity[publishArtifacts '$PWD/jbr-api-${VERSION}-sources.jar']"
|
|
||||||
@@ -1,95 +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
|
|
||||||
do_reset_dcevm=0
|
|
||||||
HEAD_REVISION=0
|
|
||||||
|
|
||||||
OS_NAME=$(uname -s)
|
|
||||||
# Enable reproducible builds
|
|
||||||
TZ=UTC
|
|
||||||
export TZ
|
|
||||||
SOURCE_DATE_EPOCH="$(git log -1 --pretty=%ct)"
|
|
||||||
export SOURCE_DATE_EPOCH
|
|
||||||
|
|
||||||
case "$OS_NAME" in
|
|
||||||
Linux)
|
|
||||||
COPYRIGHT_YEAR="$(date --utc --date=@$SOURCE_DATE_EPOCH +%Y)"
|
|
||||||
BUILD_TIME="$(date --utc --date=@$SOURCE_DATE_EPOCH +%F)"
|
|
||||||
REPRODUCIBLE_TAR_OPTS="--mtime=@$SOURCE_DATE_EPOCH --owner=0 --group=0 --numeric-owner --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime"
|
|
||||||
;;
|
|
||||||
Darwin)
|
|
||||||
COPYRIGHT_YEAR="$(date -u -r $SOURCE_DATE_EPOCH +%Y)"
|
|
||||||
BUILD_TIME="$(date -u -r $SOURCE_DATE_EPOCH +%F)"
|
|
||||||
TOUCH_TIME="$(date -u -r $SOURCE_DATE_EPOCH +%Y%m%d%H%M.%S)"
|
|
||||||
REPRODUCIBLE_TAR_OPTS="--uid 0 --gid 0 --numeric-owner"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# TODO: Windows
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
REPRODUCIBLE_BUILD_OPTS="--enable-reproducible-build
|
|
||||||
--with-source-date=$SOURCE_DATE_EPOCH
|
|
||||||
--with-hotspot-build-time=$BUILD_TIME
|
|
||||||
--with-copyright-year=$COPYRIGHT_YEAR
|
|
||||||
--with-native-debug-symbols=none
|
|
||||||
--with-build-user=builduser"
|
|
||||||
|
|
||||||
function do_exit() {
|
|
||||||
exit_code=$1
|
|
||||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD modules.list src/java.desktop/share/classes/module-info.java
|
|
||||||
if [ $do_reset_dcevm -eq 1 ]; then
|
|
||||||
[ ! -z $HEAD_REVISION ] && git reset --hard $HEAD_REVISION
|
|
||||||
fi
|
|
||||||
exit "$exit_code"
|
|
||||||
}
|
|
||||||
|
|
||||||
function update_jsdk_mods() {
|
|
||||||
__jsdk=$1
|
|
||||||
__jcef_mods=$2
|
|
||||||
__orig_jsdk_mods=$3
|
|
||||||
__updated_jsdk_mods=$4
|
|
||||||
|
|
||||||
# re-create java.desktop.jmod with updated module-info.class
|
|
||||||
tmp=.java.desktop.$$.tmp
|
|
||||||
mkdir "$tmp" || exit $?
|
|
||||||
"$__jsdk"/bin/jmod extract --dir "$tmp" "$__orig_jsdk_mods"/java.desktop.jmod || exit $?
|
|
||||||
"$__jsdk"/bin/javac \
|
|
||||||
--patch-module java.desktop="$__orig_jsdk_mods"/java.desktop.jmod \
|
|
||||||
--module-path "$__jcef_mods" -d "$tmp"/classes src/java.desktop/share/classes/module-info.java || exit $?
|
|
||||||
"$__jsdk"/bin/jmod \
|
|
||||||
create --class-path "$tmp"/classes --config "$tmp"/conf --header-files "$tmp"/include --legal-notice "$tmp"/legal --libs "$tmp"/lib \
|
|
||||||
java.desktop.jmod || exit $?
|
|
||||||
mv java.desktop.jmod "$__updated_jsdk_mods" || exit $?
|
|
||||||
rm -rf "$tmp"
|
|
||||||
|
|
||||||
# re-create java.base.jmod with updated hashes
|
|
||||||
tmp=.java.base.$$.tmp
|
|
||||||
mkdir "$tmp" || exit $?
|
|
||||||
hash_modules=$("$JSDK"/bin/jmod describe "$__orig_jsdk_mods"/java.base.jmod | grep hashes | awk '{print $2}' | tr '\n' '|' | sed s/\|$//) || exit $?
|
|
||||||
"$__jsdk"/bin/jmod extract --dir "$tmp" "$__orig_jsdk_mods"/java.base.jmod || exit $?
|
|
||||||
rm "$__updated_jsdk_mods"/java.base.jmod || exit $? # temp exclude from path
|
|
||||||
"$__jsdk"/bin/jmod \
|
|
||||||
create --module-path "$__updated_jsdk_mods" --hash-modules "$hash_modules" \
|
|
||||||
--class-path "$tmp"/classes --cmds "$tmp"/bin --config "$tmp"/conf --header-files "$tmp"/include --legal-notice "$tmp"/legal --libs "$tmp"/lib \
|
|
||||||
java.base.jmod || exit $?
|
|
||||||
mv java.base.jmod "$__updated_jsdk_mods" || exit $?
|
|
||||||
rm -rf "$tmp"
|
|
||||||
}
|
|
||||||
|
|
||||||
function get_mods_list() {
|
|
||||||
__mods=$1
|
|
||||||
echo $(ls $__mods) | sed s/\.jmod/,/g | sed s/,$//g | sed s/' '//g
|
|
||||||
}
|
|
||||||
|
|
||||||
function copy_jmods() {
|
|
||||||
__mods_list=$1
|
|
||||||
__jmods_from=$2
|
|
||||||
__jmods_to=$3
|
|
||||||
|
|
||||||
mkdir -p $__jmods_to
|
|
||||||
|
|
||||||
echo "${__mods_list}," | while read -d, mod; do cp $__jmods_from/$mod.jmod $__jmods_to/; done
|
|
||||||
}
|
|
||||||
@@ -1,87 +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/scripts/common.sh
|
|
||||||
|
|
||||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
|
||||||
|
|
||||||
sh configure \
|
|
||||||
--with-debug-level=release \
|
|
||||||
--with-vendor-name="${VENDOR_NAME}" \
|
|
||||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
|
||||||
--with-jvm-features=shenandoahgc \
|
|
||||||
--with-version-pre= \
|
|
||||||
--with-version-build="${JDK_BUILD_NUMBER}" \
|
|
||||||
--with-version-opt=b${build_number} \
|
|
||||||
--with-boot-jdk=${BOOT_JDK} \
|
|
||||||
--enable-cds=yes \
|
|
||||||
$REPRODUCIBLE_BUILD_OPTS \
|
|
||||||
|| 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
|
|
||||||
|
|
||||||
# NB: --sort=name requires tar1.28
|
|
||||||
tar $REPRODUCIBLE_TAR_OPTS --sort=name -pcf $JBSDK.tar \
|
|
||||||
--exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
|
|
||||||
-C $BASE_DIR ${JBRSDK_BUNDLE} || exit $?
|
|
||||||
touch -c -d @$SOURCE_DATE_EPOCH $JBRSDK.tar
|
|
||||||
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 $REPRODUCIBLE_TAR_OPTS --sort=name -pcf $JBR.tar -C $BASE_DIR ${JBR_BUNDLE} || exit $?
|
|
||||||
touch -c -d @$SOURCE_DATE_EPOCH $JBR.tar
|
|
||||||
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,162 +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:
|
|
||||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
|
||||||
# By default JCEF binaries should be located in ./jcef_linux_x64
|
|
||||||
|
|
||||||
while getopts ":i?" o; do
|
|
||||||
case "${o}" in
|
|
||||||
i)
|
|
||||||
i="incremental build"
|
|
||||||
INC_BUILD=1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
shift $((OPTIND-1))
|
|
||||||
|
|
||||||
JBSDK_VERSION=$1
|
|
||||||
JDK_BUILD_NUMBER=$2
|
|
||||||
build_number=$3
|
|
||||||
bundle_type=$4
|
|
||||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
|
||||||
JCEF_PATH=${JCEF_PATH:=./jcef_linux_x64}
|
|
||||||
|
|
||||||
source jb/project/tools/common/scripts/common.sh
|
|
||||||
|
|
||||||
function do_configure {
|
|
||||||
sh configure \
|
|
||||||
$WITH_DEBUG_LEVEL \
|
|
||||||
--with-vendor-name="$VENDOR_NAME" \
|
|
||||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
|
||||||
--with-jvm-features=shenandoahgc \
|
|
||||||
--with-version-pre= \
|
|
||||||
--with-version-build="$JDK_BUILD_NUMBER" \
|
|
||||||
--with-version-opt=b"$build_number" \
|
|
||||||
--with-boot-jdk="$BOOT_JDK" \
|
|
||||||
--enable-cds=yes \
|
|
||||||
$REPRODUCIBLE_BUILD_OPTS \
|
|
||||||
|| do_exit $?
|
|
||||||
}
|
|
||||||
|
|
||||||
function create_image_bundle {
|
|
||||||
__bundle_name=$1
|
|
||||||
__arch_name=$2
|
|
||||||
__modules_path=$3
|
|
||||||
__modules=$4
|
|
||||||
|
|
||||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
|
||||||
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-x64-${fastdebug_infix}b${build_number}
|
|
||||||
|
|
||||||
echo Running jlink....
|
|
||||||
[ -d "$IMAGES_DIR"/"$__arch_name" ] && rm -rf "${IMAGES_DIR:?}"/"$__arch_name"
|
|
||||||
$JSDK/bin/jlink \
|
|
||||||
--module-path "$__modules_path" --no-man-pages --compress=2 \
|
|
||||||
--add-modules "$__modules" --output "$IMAGES_DIR"/"$__arch_name"
|
|
||||||
|
|
||||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$IMAGES_DIR"/"$__arch_name"/release
|
|
||||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
|
||||||
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__arch_name"/release > release
|
|
||||||
mv release "$IMAGES_DIR"/"$__arch_name"/release
|
|
||||||
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__arch_name"/jmods
|
|
||||||
fi
|
|
||||||
|
|
||||||
# jmod does not preserve file permissions (JDK-8173610)
|
|
||||||
[ -f "$IMAGES_DIR"/"$__arch_name"/lib/jcef_helper ] && chmod a+x "$IMAGES_DIR"/"$__arch_name"/lib/jcef_helper
|
|
||||||
|
|
||||||
echo Creating "$JBR".tar.gz ...
|
|
||||||
|
|
||||||
(cd "$IMAGES_DIR" &&
|
|
||||||
find "$__arch_name" -print0 | LC_ALL=C sort -z | \
|
|
||||||
tar $REPRODUCIBLE_TAR_OPTS \
|
|
||||||
--no-recursion --null -T - -cf "$JBR".tar) || do_exit $?
|
|
||||||
mv "$IMAGES_DIR"/"$JBR".tar ./"$JBR".tar
|
|
||||||
[ -f "$JBR".tar.gz ] && rm "$JBR.tar.gz"
|
|
||||||
touch -c -d "@$SOURCE_DATE_EPOCH" "$JBR".tar
|
|
||||||
gzip "$JBR".tar || do_exit $?
|
|
||||||
rm -rf "${IMAGES_DIR:?}"/"$__arch_name"
|
|
||||||
}
|
|
||||||
|
|
||||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
|
||||||
RELEASE_NAME=linux-x86_64-server-release
|
|
||||||
|
|
||||||
case "$bundle_type" in
|
|
||||||
"jcef")
|
|
||||||
do_reset_changes=0
|
|
||||||
;;
|
|
||||||
"dcevm")
|
|
||||||
HEAD_REVISION=$(git rev-parse HEAD)
|
|
||||||
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
|
|
||||||
do_reset_dcevm=0
|
|
||||||
do_reset_changes=0
|
|
||||||
;;
|
|
||||||
"nomod" | "")
|
|
||||||
bundle_type=""
|
|
||||||
;;
|
|
||||||
"fd")
|
|
||||||
do_reset_changes=0
|
|
||||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
|
||||||
RELEASE_NAME=linux-x86_64-server-fastdebug
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -z "$INC_BUILD" ]; then
|
|
||||||
do_configure || do_exit $?
|
|
||||||
make clean CONF=$RELEASE_NAME || do_exit $?
|
|
||||||
fi
|
|
||||||
make images CONF=$RELEASE_NAME || do_exit $?
|
|
||||||
|
|
||||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
|
||||||
JSDK=$IMAGES_DIR/jdk
|
|
||||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
|
||||||
JBRSDK_BUNDLE=jbrsdk
|
|
||||||
|
|
||||||
echo Fixing permissions
|
|
||||||
chmod -R a+r $JSDK
|
|
||||||
|
|
||||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
|
|
||||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
|
||||||
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
|
|
||||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
|
||||||
|
|
||||||
jbr_name_postfix="_${bundle_type}"
|
|
||||||
[ "$bundle_type" != "fd" ] && jbrsdk_name_postfix="_${bundle_type}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# create runtime image bundle
|
|
||||||
modules=$(xargs < modules.list | sed s/" "//g) || do_exit $?
|
|
||||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
|
||||||
|
|
||||||
# create sdk image bundle
|
|
||||||
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
|
||||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
|
||||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
|
||||||
fi
|
|
||||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?
|
|
||||||
|
|
||||||
if [ -z "$bundle_type" ]; then
|
|
||||||
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-linux-test-x64-b${build_number}
|
|
||||||
echo Creating "$JBRSDK_TEST" ...
|
|
||||||
make test-image CONF=$RELEASE_NAME || do_exit $?
|
|
||||||
tar -pcf "$JBRSDK_TEST".tar -C $IMAGES_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,80 +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/scripts/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 \
|
|
||||||
--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,200 +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:
|
|
||||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
|
||||||
# By default JCEF binaries should be located in ./jcef_mac
|
|
||||||
|
|
||||||
while getopts ":i?" o; do
|
|
||||||
case "${o}" in
|
|
||||||
i)
|
|
||||||
i="incremental build"
|
|
||||||
INC_BUILD=1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
shift $((OPTIND-1))
|
|
||||||
|
|
||||||
JBSDK_VERSION=$1
|
|
||||||
JDK_BUILD_NUMBER=$2
|
|
||||||
build_number=$3
|
|
||||||
bundle_type=$4
|
|
||||||
architecture=$5 # aarch64 or x64
|
|
||||||
enable_aot=$6 # temporary param for building test jre with aot under aarch64
|
|
||||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
|
||||||
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=./modular-sdk}"
|
|
||||||
JCEF_PATH=${JCEF_PATH:=./jcef_mac}
|
|
||||||
architecture=${architecture:=x64}
|
|
||||||
BOOT_JDK=${BOOT_JDK:=$(/usr/libexec/java_home -v 16)}
|
|
||||||
|
|
||||||
source jb/project/tools/common/scripts/common.sh
|
|
||||||
|
|
||||||
function do_configure {
|
|
||||||
if [[ "${architecture}" == *aarch64* ]]; then
|
|
||||||
sh configure \
|
|
||||||
$WITH_DEBUG_LEVEL \
|
|
||||||
--with-vendor-name="${VENDOR_NAME}" \
|
|
||||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
|
||||||
--with-macosx-bundle-name-base=${VENDOR_VERSION_STRING} \
|
|
||||||
--with-macosx-bundle-id-base="com.jetbrains.jbr" \
|
|
||||||
--with-jvm-features=shenandoahgc \
|
|
||||||
--with-version-pre= \
|
|
||||||
--with-version-build="${JDK_BUILD_NUMBER}" \
|
|
||||||
--with-version-opt=b"${build_number}" \
|
|
||||||
--with-boot-jdk="$BOOT_JDK" \
|
|
||||||
--disable-hotspot-gtest --disable-javac-server --disable-full-docs --disable-manpages \
|
|
||||||
--enable-cds=no \
|
|
||||||
--with-extra-cflags="-F$(pwd)/Frameworks" \
|
|
||||||
--with-extra-cxxflags="-F$(pwd)/Frameworks" \
|
|
||||||
--with-extra-ldflags="-F$(pwd)/Frameworks" \
|
|
||||||
$REPRODUCIBLE_BUILD_OPTS \
|
|
||||||
|| do_exit $?
|
|
||||||
else
|
|
||||||
sh configure \
|
|
||||||
$WITH_DEBUG_LEVEL \
|
|
||||||
--with-vendor-name="$VENDOR_NAME" \
|
|
||||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
|
||||||
--with-macosx-bundle-name-base=${VENDOR_VERSION_STRING} \
|
|
||||||
--with-macosx-bundle-id-base="com.jetbrains.jbr" \
|
|
||||||
--with-jvm-features=shenandoahgc \
|
|
||||||
--with-version-pre= \
|
|
||||||
--with-version-build="$JDK_BUILD_NUMBER" \
|
|
||||||
--with-version-opt=b"$build_number" \
|
|
||||||
--with-boot-jdk="$BOOT_JDK" \
|
|
||||||
--enable-cds=yes \
|
|
||||||
$REPRODUCIBLE_BUILD_OPTS \
|
|
||||||
|| do_exit $?
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function create_image_bundle {
|
|
||||||
__bundle_name=$1
|
|
||||||
__arch_name=$2
|
|
||||||
__modules_path=$3
|
|
||||||
__modules=$4
|
|
||||||
|
|
||||||
tmp=.bundle.$$.tmp
|
|
||||||
mkdir "$tmp" || do_exit $?
|
|
||||||
|
|
||||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
|
||||||
JBR=${__bundle_name}-${JBSDK_VERSION}-osx-${architecture}-${fastdebug_infix}b${build_number}
|
|
||||||
|
|
||||||
JRE_CONTENTS=$tmp/$__arch_name/Contents
|
|
||||||
mkdir -p "$JRE_CONTENTS" || do_exit $?
|
|
||||||
|
|
||||||
echo Running jlink...
|
|
||||||
"$JSDK"/bin/jlink \
|
|
||||||
--module-path "$__modules_path" --no-man-pages --compress=2 \
|
|
||||||
--add-modules "$__modules" --output "$JRE_CONTENTS/Home" || do_exit $?
|
|
||||||
|
|
||||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$JRE_CONTENTS/Home/release"
|
|
||||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
|
||||||
sed 's/JBR/JBRSDK/g' $JRE_CONTENTS/Home/release > release
|
|
||||||
mv release $JRE_CONTENTS/Home/release
|
|
||||||
copy_jmods "$__modules" "$__modules_path" "$JRE_CONTENTS"/Home/jmods
|
|
||||||
fi
|
|
||||||
|
|
||||||
cp -R "$JSDK"/../MacOS "$JRE_CONTENTS"
|
|
||||||
cp "$JSDK"/../Info.plist "$JRE_CONTENTS"
|
|
||||||
|
|
||||||
[ -n "$bundle_type" ] && (cp -a $JCEF_PATH/Frameworks "$JRE_CONTENTS" || do_exit $?)
|
|
||||||
|
|
||||||
echo Creating "$JBR".tar.gz ...
|
|
||||||
# Normalize timestamp
|
|
||||||
find "$tmp"/"$__arch_name" -print0 | xargs -0 touch -c -h -t "$TOUCH_TIME"
|
|
||||||
|
|
||||||
(cd "$tmp" &&
|
|
||||||
find "$__arch_name" -print0 | LC_ALL=C sort -z | \
|
|
||||||
COPYFILE_DISABLE=1 tar $REPRODUCIBLE_TAR_OPTS --no-recursion --null -T - \
|
|
||||||
-czf "$JBR".tar.gz --exclude='*.dSYM' --exclude='man') || do_exit $?
|
|
||||||
mv "$tmp"/"$JBR".tar.gz "$JBR".tar.gz
|
|
||||||
rm -rf "$tmp"
|
|
||||||
}
|
|
||||||
|
|
||||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
|
||||||
CONF_ARCHITECTURE=x86_64
|
|
||||||
if [[ "${architecture}" == *aarch64* ]]; then
|
|
||||||
CONF_ARCHITECTURE=aarch64
|
|
||||||
fi
|
|
||||||
RELEASE_NAME=macosx-${CONF_ARCHITECTURE}-server-release
|
|
||||||
|
|
||||||
case "$bundle_type" in
|
|
||||||
"jcef")
|
|
||||||
do_reset_changes=0
|
|
||||||
;;
|
|
||||||
"dcevm")
|
|
||||||
HEAD_REVISION=$(git rev-parse HEAD)
|
|
||||||
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
|
|
||||||
do_reset_dcevm=0
|
|
||||||
do_reset_changes=0
|
|
||||||
;;
|
|
||||||
"nomod" | "")
|
|
||||||
bundle_type=""
|
|
||||||
;;
|
|
||||||
"fd")
|
|
||||||
do_reset_changes=0
|
|
||||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
|
||||||
RELEASE_NAME=macosx-${CONF_ARCHITECTURE}-server-fastdebug
|
|
||||||
JBSDK=macosx-${architecture}-server-release
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -z "$INC_BUILD" ]; then
|
|
||||||
do_configure || do_exit $?
|
|
||||||
make clean CONF=$RELEASE_NAME || do_exit $?
|
|
||||||
fi
|
|
||||||
make images CONF=$RELEASE_NAME || do_exit $?
|
|
||||||
|
|
||||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
|
||||||
|
|
||||||
major_version=$(echo "$JBSDK_VERSION_WITH_DOTS" | awk -F "." '{print $1}')
|
|
||||||
minor_version=$(echo "$JBSDK_VERSION_WITH_DOTS" | awk -F "." '{print $3}')
|
|
||||||
[ -z "$minor_version" -o "$minor_version" = "0" ] && version_dir=$major_version || version_dir=$JBSDK_VERSION_WITH_DOTS
|
|
||||||
JSDK=$IMAGES_DIR/jdk-bundle/jdk-$version_dir.jdk/Contents/Home
|
|
||||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
|
||||||
JBRSDK_BUNDLE=jbrsdk
|
|
||||||
|
|
||||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
|
|
||||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
|
||||||
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
|
||||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
|
||||||
|
|
||||||
jbr_name_postfix="_${bundle_type}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# create runtime image bundle
|
|
||||||
modules=$(xargs < modules.list | sed s/" "//g) || do_exit $?
|
|
||||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
|
||||||
|
|
||||||
# create sdk image bundle
|
|
||||||
modules=$(cat "$JSDK"/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
|
||||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
|
||||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
|
||||||
fi
|
|
||||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
|
||||||
|
|
||||||
if [ -z "$bundle_type" ]; then
|
|
||||||
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-osx-test-${architecture}-b${build_number}
|
|
||||||
echo Creating "$JBRSDK_TEST" ...
|
|
||||||
make test-image CONF=$RELEASE_NAME || do_exit $?
|
|
||||||
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
|
|
||||||
COPYFILE_DISABLE=1 tar -pczf "$JBRSDK_TEST".tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
|
||||||
fi
|
|
||||||
|
|
||||||
do_exit 0
|
|
||||||
@@ -1,118 +0,0 @@
|
|||||||
#!/bin/bash -x
|
|
||||||
|
|
||||||
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" "$file"
|
|
||||||
|
|
||||||
log "Notarizing $APP_NAME..."
|
|
||||||
rm -rf "altool.init.out" "altool.check.out"
|
|
||||||
altool-upload "$APP_NAME"
|
|
||||||
|
|
||||||
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,111 +0,0 @@
|
|||||||
#!/bin/bash -x
|
|
||||||
|
|
||||||
APPLICATION_PATH=$1
|
|
||||||
APP_NAME=$2
|
|
||||||
BUNDLE_ID=$3
|
|
||||||
JB_DEVELOPER_CERT=$4
|
|
||||||
JB_INSTALLER_CERT=$5
|
|
||||||
|
|
||||||
if [[ -z "$APPLICATION_PATH" ]] || [[ -z "$JB_DEVELOPER_CERT" ]]; then
|
|
||||||
echo "Usage: $0 AppDirectory CertificateID"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [[ ! -d "$APPLICATION_PATH" ]]; then
|
|
||||||
echo "AppDirectory '$APPLICATION_PATH' 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 "$APPLICATION_PATH" -name '*.cstemp' -exec rm '{}' \;
|
|
||||||
|
|
||||||
log "Signing libraries and executables..."
|
|
||||||
# -perm +111 searches for executables
|
|
||||||
for f in \
|
|
||||||
"Contents/Home/lib" "Contents/MacOS" \
|
|
||||||
"Contents/Home/Frameworks" \
|
|
||||||
"Contents/Frameworks"; do
|
|
||||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
|
||||||
find "$APPLICATION_PATH/$f" \
|
|
||||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -name "*.node" -o -perm +111 \) \
|
|
||||||
-exec codesign --timestamp \
|
|
||||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime --force \
|
|
||||||
--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 "$APPLICATION_PATH" -name '*.jar' \
|
|
||||||
-exec sh -c "set -u; unzip -l \"\$0\" | grep -q -e '\.dylib\$' -e '\.jnilib\$' -e '\.so\$' -e '\.tbd\$' -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 "*.tbd" -o -name "jattach" \) \
|
|
||||||
-exec codesign --timestamp \
|
|
||||||
--force \
|
|
||||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
|
||||||
--entitlements entitlements.xml {} \;
|
|
||||||
|
|
||||||
(cd jarfolder; zip -q -r -o -0 ../jar.jar .)
|
|
||||||
mv jar.jar "$file"
|
|
||||||
done
|
|
||||||
|
|
||||||
rm -rf jarfolder jar.jar
|
|
||||||
|
|
||||||
log "Signing other files..."
|
|
||||||
for f in \
|
|
||||||
"Contents/Home/bin"; do
|
|
||||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
|
||||||
find "$APPLICATION_PATH/$f" \
|
|
||||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -perm +111 \) \
|
|
||||||
-exec codesign --timestamp \
|
|
||||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime --force \
|
|
||||||
--entitlements entitlements.xml {} \;
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
#log "Signing executable..."
|
|
||||||
#codesign --timestamp \
|
|
||||||
# -v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
|
||||||
# --force \
|
|
||||||
# --entitlements entitlements.xml "$APPLICATION_PATH/Contents/MacOS/idea"
|
|
||||||
|
|
||||||
log "Signing whole app..."
|
|
||||||
codesign --timestamp \
|
|
||||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
|
||||||
--force \
|
|
||||||
--entitlements entitlements.xml "$APPLICATION_PATH"
|
|
||||||
|
|
||||||
BUILD_NAME=$(echo $APPLICATION_PATH | awk -F"/" '{ print $2 }')
|
|
||||||
|
|
||||||
log "Creating $APP_NAME.pkg..."
|
|
||||||
rm -rf "$APP_NAME.pkg"
|
|
||||||
pkgbuild --identifier $BUNDLE_ID --sign "$JB_INSTALLER_CERT" --root $APPLICATION_PATH \
|
|
||||||
--install-location /Library/Java/JavaVirtualMachines/${BUILD_NAME} ${APP_NAME}.pkg
|
|
||||||
|
|
||||||
#log "Signing whole app..."
|
|
||||||
#codesign --timestamp \
|
|
||||||
# -v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
|
||||||
# --force \
|
|
||||||
# --entitlements entitlements.xml $APP_NAME.pkg
|
|
||||||
|
|
||||||
log "Verifying java is not broken"
|
|
||||||
find "$APPLICATION_PATH" \
|
|
||||||
-type f -name 'java' -perm +111 -exec {} -version \;
|
|
||||||
@@ -1,138 +0,0 @@
|
|||||||
#!/bin/bash -x
|
|
||||||
|
|
||||||
#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
|
|
||||||
JB_INSTALLER_CERT=$6
|
|
||||||
NOTARIZE=$7
|
|
||||||
BUNDLE_ID=$8
|
|
||||||
|
|
||||||
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
|
|
||||||
BUILD_NAME="$(ls "$EXPLODED")"
|
|
||||||
#sed -i '' s/BNDL/APPL/ $EXPLODED/$BUILD_NAME/Contents/Info.plist
|
|
||||||
rm -f $EXPLODED/$BUILD_NAME/Contents/CodeResources
|
|
||||||
rm "$INPUT_FILE"
|
|
||||||
if test -d $EXPLODED/$BUILD_NAME/Contents/Home/jmods; then
|
|
||||||
mv $EXPLODED/$BUILD_NAME/Contents/Home/jmods $BACKUP_JMODS
|
|
||||||
fi
|
|
||||||
|
|
||||||
log "$INPUT_FILE extracted and removed"
|
|
||||||
|
|
||||||
APP_NAME=$(echo ${INPUT_FILE} | awk -F".tar" '{ print $1 }')
|
|
||||||
APPLICATION_PATH=$(sed "s/osx-//" <<< "$EXPLODED/$APP_NAME")
|
|
||||||
mv $EXPLODED/$BUILD_NAME $APPLICATION_PATH
|
|
||||||
|
|
||||||
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" "$APP_NAME" "$BUNDLE_ID" "$CODESIGN_STRING" "$JB_INSTALLER_CERT"
|
|
||||||
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"
|
|
||||||
spctl -a -v $APPLICATION_PATH
|
|
||||||
((attempt += limit))
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [ "$NOTARIZE" = "yes" ]; then
|
|
||||||
log "Notarizing..."
|
|
||||||
# shellcheck disable=SC1090
|
|
||||||
source "$HOME/.notarize_token"
|
|
||||||
# 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.pkg" "$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 $APPLICATION_PATH/Contents/Home
|
|
||||||
fi
|
|
||||||
mv $APPLICATION_PATH $EXPLODED/$BUILD_NAME
|
|
||||||
|
|
||||||
tar -pczvf $INPUT_FILE --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 054f21d1ee0..d9a121f0273 100644
|
|
||||||
--- modules.list
|
|
||||||
+++ modules.list
|
|
||||||
@@ -49,4 +49,7 @@ jdk.unsupported,
|
|
||||||
jdk.xml.dom,
|
|
||||||
jdk.zipfs,
|
|
||||||
jdk.hotspot.agent,
|
|
||||||
-jdk.jcmd
|
|
||||||
+jdk.jcmd,
|
|
||||||
+jcef,
|
|
||||||
+gluegen.rt,
|
|
||||||
+jogl.all
|
|
||||||
diff --git src/java.desktop/share/classes/module-info.java src/java.desktop/share/classes/module-info.java
|
|
||||||
index 897647ee368..781d1809493 100644
|
|
||||||
--- src/java.desktop/share/classes/module-info.java
|
|
||||||
+++ src/java.desktop/share/classes/module-info.java
|
|
||||||
@@ -116,7 +116,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
File diff suppressed because it is too large
Load Diff
@@ -1,29 +0,0 @@
|
|||||||
From 960dafbeeba190911955c208b611fecc15d66738 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Wed, 11 Mar 2020 14:19:34 +0100
|
|
||||||
Subject: [PATCH 03/34] 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 994fc8a3bc8..3be3a09ef8f 100644
|
|
||||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
|
||||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
|
||||||
@@ -953,7 +953,10 @@ bool InstanceKlass::link_class_impl(TRAPS) {
|
|
||||||
|
|
||||||
if (!is_linked()) {
|
|
||||||
if (!is_rewritten()) {
|
|
||||||
- {
|
|
||||||
+ // (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 (!AllowEnhancedClassRedefinition || !newest_version()->is_redefining()) {
|
|
||||||
bool verify_ok = verify_code(THREAD);
|
|
||||||
if (!verify_ok) {
|
|
||||||
return false;
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,240 +0,0 @@
|
|||||||
From 39df5f163d4a0f1fd6b92313a5570808f19d5e20 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Sun, 4 Oct 2020 21:12:12 +0200
|
|
||||||
Subject: [PATCH 05/34] Support for Lambda class redefinition
|
|
||||||
|
|
||||||
---
|
|
||||||
.../share/classfile/classLoaderData.cpp | 9 +++
|
|
||||||
.../share/classfile/classLoaderData.hpp | 2 +-
|
|
||||||
.../share/classfile/systemDictionary.cpp | 12 +++-
|
|
||||||
.../share/classfile/systemDictionary.hpp | 1 +
|
|
||||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 65 +++++++++++++++++--
|
|
||||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 1 +
|
|
||||||
.../share/prims/resolvedMethodTable.cpp | 2 +
|
|
||||||
src/hotspot/share/prims/unsafe.cpp | 1 +
|
|
||||||
8 files changed, 83 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
|
|
||||||
index 0cd90bb8c27..4d64c6b454a 100644
|
|
||||||
--- a/src/hotspot/share/classfile/classLoaderData.cpp
|
|
||||||
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
|
|
||||||
@@ -593,6 +593,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 ba2393f8dd0..e2ae0a77351 100644
|
|
||||||
--- a/src/hotspot/share/classfile/classLoaderData.hpp
|
|
||||||
+++ b/src/hotspot/share/classfile/classLoaderData.hpp
|
|
||||||
@@ -181,7 +181,7 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
|
||||||
bool has_accumulated_modified_oops() { return _accumulated_modified_oops; }
|
|
||||||
oop holder_no_keepalive() const;
|
|
||||||
oop holder_phantom() const;
|
|
||||||
-
|
|
||||||
+ void exchange_holders(ClassLoaderData* cld);
|
|
||||||
private:
|
|
||||||
void unload();
|
|
||||||
bool keep_alive() const { return _keep_alive > 0; }
|
|
||||||
diff --git a/src/hotspot/share/classfile/systemDictionary.cpp b/src/hotspot/share/classfile/systemDictionary.cpp
|
|
||||||
index bd0cae7cb9b..8f2b46add4d 100644
|
|
||||||
--- a/src/hotspot/share/classfile/systemDictionary.cpp
|
|
||||||
+++ b/src/hotspot/share/classfile/systemDictionary.cpp
|
|
||||||
@@ -1062,10 +1062,14 @@ InstanceKlass* SystemDictionary::parse_stream(Symbol* class_name,
|
|
||||||
Handle class_loader,
|
|
||||||
ClassFileStream* st,
|
|
||||||
const ClassLoadInfo& cl_info,
|
|
||||||
+ InstanceKlass* old_klass,
|
|
||||||
TRAPS) {
|
|
||||||
|
|
||||||
EventClassLoad class_load_start_event;
|
|
||||||
ClassLoaderData* loader_data;
|
|
||||||
+
|
|
||||||
+ bool is_redefining = (old_klass != NULL);
|
|
||||||
+
|
|
||||||
bool is_unsafe_anon_class = cl_info.unsafe_anonymous_host() != NULL;
|
|
||||||
|
|
||||||
// - for unsafe anonymous class: create a new CLD whith a class holder that uses
|
|
||||||
@@ -1094,8 +1098,12 @@ InstanceKlass* SystemDictionary::parse_stream(Symbol* class_name,
|
|
||||||
class_name,
|
|
||||||
loader_data,
|
|
||||||
cl_info,
|
|
||||||
- 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 ((cl_info.is_hidden() || is_unsafe_anon_class) && k != NULL) {
|
|
||||||
// Hidden classes that are not strong and unsafe anonymous classes must update
|
|
||||||
@@ -1998,7 +2006,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 4547449dbec..931e655d631 100644
|
|
||||||
--- a/src/hotspot/share/classfile/systemDictionary.hpp
|
|
||||||
+++ b/src/hotspot/share/classfile/systemDictionary.hpp
|
|
||||||
@@ -329,6 +329,7 @@ public:
|
|
||||||
Handle class_loader,
|
|
||||||
ClassFileStream* st,
|
|
||||||
const ClassLoadInfo& cl_info,
|
|
||||||
+ InstanceKlass* old_klass,
|
|
||||||
TRAPS);
|
|
||||||
|
|
||||||
// Resolve from stream (called by jni_DefineClass and JVM_DefineClass)
|
|
||||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
index 92ce6c27b8a..8b765623dcd 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
@@ -494,6 +494,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;
|
|
||||||
@@ -756,12 +758,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();
|
|
||||||
|
|
||||||
@@ -1442,6 +1466,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];
|
|
||||||
@@ -1979,7 +2027,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 60b62c3170a..d8a11b51fe9 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
|
||||||
@@ -116,6 +116,7 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
|
||||||
void rollback();
|
|
||||||
static void mark_as_scavengable(nmethod* nm);
|
|
||||||
static void unpatch_bytecode(Method* method);
|
|
||||||
+ 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 122bb8c186b..81b3aa96564 100644
|
|
||||||
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
|
||||||
@@ -414,6 +414,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 72d81ec9d6c..027afa3fabd 100644
|
|
||||||
--- a/src/hotspot/share/prims/unsafe.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/unsafe.cpp
|
|
||||||
@@ -865,6 +865,7 @@ Unsafe_DefineAnonymousClass_impl(JNIEnv *env,
|
|
||||||
host_loader,
|
|
||||||
&st,
|
|
||||||
cl_info,
|
|
||||||
+ NULL,
|
|
||||||
CHECK_NULL);
|
|
||||||
if (anonk == NULL) {
|
|
||||||
return NULL;
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,135 +0,0 @@
|
|||||||
From 5af1daedc86b5fec0f222cbdda3afbdf518985ea Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Sat, 23 May 2020 10:02:15 +0200
|
|
||||||
Subject: [PATCH 06/34] Fix "no original bytecode found" error if method with
|
|
||||||
bkp is missing
|
|
||||||
|
|
||||||
Sometimes IDE can deploy class with erroneous method, such method has
|
|
||||||
n 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 ed3cc3eb6a2..504e59caf51 100644
|
|
||||||
--- a/src/hotspot/share/interpreter/interpreterRuntime.cpp
|
|
||||||
+++ b/src/hotspot/share/interpreter/interpreterRuntime.cpp
|
|
||||||
@@ -814,7 +814,7 @@ JRT_END
|
|
||||||
// Invokes
|
|
||||||
|
|
||||||
JRT_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);
|
|
||||||
JRT_END
|
|
||||||
|
|
||||||
JRT_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 516f2bb8f2f..1c88511a5fc 100644
|
|
||||||
--- a/src/hotspot/share/oops/method.cpp
|
|
||||||
+++ b/src/hotspot/share/oops/method.cpp
|
|
||||||
@@ -1853,14 +1853,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);
|
|
||||||
}
|
|
||||||
@@ -2006,7 +2006,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;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -2015,7 +2015,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 83ed2d9c3c1..4d4cc6dc012 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 8b765623dcd..a859b8e1162 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
@@ -1362,14 +1362,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.23.0
|
|
||||||
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
From 19d2274a5dff6e6b31474252b45e5e7484f0180b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Sun, 24 May 2020 12:07:42 +0200
|
|
||||||
Subject: [PATCH 07/34] 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 81b3aa96564..caf03ffe56d 100644
|
|
||||||
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
|
||||||
@@ -404,25 +404,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.23.0
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,50 +0,0 @@
|
|||||||
From ca47ab5a0a6ce8e2644736f323a335a957311af9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Sat, 13 Jun 2020 18:50:59 +0200
|
|
||||||
Subject: [PATCH 09/34] Change log level in advanced redefinition
|
|
||||||
|
|
||||||
- Change log level for "Comparing different class ver.." to debug
|
|
||||||
- Fix adjust_method_entries_dcevm logging levels and severity
|
|
||||||
---
|
|
||||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 2 +-
|
|
||||||
src/hotspot/share/prims/resolvedMethodTable.cpp | 4 ++--
|
|
||||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
index 6c9eb40ecf5..b09ba554e07 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
@@ -916,7 +916,7 @@ jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
|
|
||||||
// Calculated the difference between new and old class (field change, method change, supertype change, ...).
|
|
||||||
int VM_EnhancedRedefineClasses::calculate_redefinition_flags(InstanceKlass* new_class) {
|
|
||||||
int result = Klass::NoRedefinition;
|
|
||||||
- log_info(redefine, class, load)("Comparing different class versions of class %s",new_class->name()->as_C_string());
|
|
||||||
+ log_debug(redefine, class, load)("Comparing different class versions of class %s",new_class->name()->as_C_string());
|
|
||||||
|
|
||||||
assert(new_class->old_version() != NULL, "must have old version");
|
|
||||||
InstanceKlass* the_class = InstanceKlass::cast(new_class->old_version());
|
|
||||||
diff --git a/src/hotspot/share/prims/resolvedMethodTable.cpp b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
|
||||||
index caf03ffe56d..eb9fcda44f3 100644
|
|
||||||
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
|
||||||
@@ -413,7 +413,7 @@ void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed)
|
|
||||||
} else {
|
|
||||||
newer_method = newer_klass->method_with_idnum(old_method->orig_method_idnum());
|
|
||||||
|
|
||||||
- log_info(redefine, class, load, exceptions)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
|
|
||||||
+ log_debug(redefine, class, update)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
|
|
||||||
|
|
||||||
assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
|
|
||||||
assert(newer_method != NULL, "method_with_idnum() should not be NULL");
|
|
||||||
@@ -433,7 +433,7 @@ void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed)
|
|
||||||
|
|
||||||
ResourceMark rm;
|
|
||||||
if (!(*trace_name_printed)) {
|
|
||||||
- log_info(redefine, class, update)("adjust: name=%s", old_method->method_holder()->external_name());
|
|
||||||
+ log_debug(redefine, class, update)("adjust: name=%s", old_method->method_holder()->external_name());
|
|
||||||
*trace_name_printed = true;
|
|
||||||
}
|
|
||||||
log_debug(redefine, class, update, constantpool)
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
From 7e236beee0375656d1955fc1168143c1639fb7f1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Tue, 6 Oct 2020 22:15:31 +0200
|
|
||||||
Subject: [PATCH 10/34] AllowEnhancedClassRedefinition is false (disabled) by
|
|
||||||
default
|
|
||||||
|
|
||||||
---
|
|
||||||
src/hotspot/share/runtime/globals.hpp | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp
|
|
||||||
index 5b367704800..2710c6ea0e5 100644
|
|
||||||
--- a/src/hotspot/share/runtime/globals.hpp
|
|
||||||
+++ b/src/hotspot/share/runtime/globals.hpp
|
|
||||||
@@ -2466,7 +2466,7 @@ const size_t minimumSymbolTableSize = 1024;
|
|
||||||
diagnostic(bool, DeoptimizeNMethodBarriersALot, false, \
|
|
||||||
"Make nmethod barriers deoptimise a lot.") \
|
|
||||||
\
|
|
||||||
- product(bool, AllowEnhancedClassRedefinition, true, \
|
|
||||||
+ product(bool, AllowEnhancedClassRedefinition, false, \
|
|
||||||
"Allow enhanced class redefinition beyond swapping method " \
|
|
||||||
"bodies") \
|
|
||||||
\
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,25 +0,0 @@
|
|||||||
From d56e73885111b386771f564ec6beb305338993df Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Mon, 19 Oct 2020 20:00:04 +0200
|
|
||||||
Subject: [PATCH 12/34] Set HOTSPOT_VM_DISTRO=Dynamic Code Evolution
|
|
||||||
|
|
||||||
---
|
|
||||||
make/autoconf/version-numbers | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/make/autoconf/version-numbers b/make/autoconf/version-numbers
|
|
||||||
index aabdc5bed20..df8025a2e84 100644
|
|
||||||
--- a/make/autoconf/version-numbers
|
|
||||||
+++ b/make/autoconf/version-numbers
|
|
||||||
@@ -45,7 +45,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"
|
|
||||||
VENDOR_URL=https://openjdk.java.net/
|
|
||||||
VENDOR_URL_BUG=https://bugreport.java.com/bugreport/
|
|
||||||
VENDOR_URL_VM_BUG=https://bugreport.java.com/bugreport/crash.jsp
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
From 7ebad43ed45805b0a3736c510f708ff17697ba7e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Sun, 11 Oct 2020 10:43:28 +0200
|
|
||||||
Subject: [PATCH 13/34] Fix G1 nmethod registration
|
|
||||||
|
|
||||||
---
|
|
||||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 19 ++++++++++++++++---
|
|
||||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 3 ++-
|
|
||||||
2 files changed, 18 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
index b09ba554e07..718426f2819 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
@@ -216,7 +216,14 @@ void VM_EnhancedRedefineClasses::mark_as_scavengable(nmethod* nm) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-void VM_EnhancedRedefineClasses::mark_as_scavengable_g1(nmethod* nm) {
|
|
||||||
+void VM_EnhancedRedefineClasses::unregister_nmethod_g1(nmethod* nm) {
|
|
||||||
+ // It should work not only for G1 but also for another GCs, but this way is safer now
|
|
||||||
+ if (!nm->is_zombie() && !nm->is_unloaded()) {
|
|
||||||
+ Universe::heap()->unregister_nmethod(nm);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void VM_EnhancedRedefineClasses::register_nmethod_g1(nmethod* nm) {
|
|
||||||
// It should work not only for G1 but also for another GCs, but this way is safer now
|
|
||||||
if (!nm->is_zombie() && !nm->is_unloaded()) {
|
|
||||||
Universe::heap()->register_nmethod(nm);
|
|
||||||
@@ -521,8 +528,9 @@ void VM_EnhancedRedefineClasses::doit() {
|
|
||||||
// For now, mark all nmethod's as scavengable that are not scavengable already
|
|
||||||
if (ScavengeRootsInCode) {
|
|
||||||
if (UseG1GC) {
|
|
||||||
- // this should work also for other GCs
|
|
||||||
- CodeCache::nmethods_do(mark_as_scavengable_g1);
|
|
||||||
+ // G1 holds references to nmethods in regions based on oops values. Since oops in nmethod can be changed in ChangePointers* closures
|
|
||||||
+ // we unregister nmethods from G1 heap, then closures are processed (oops are changed) and finally we register nmethod to G1 again
|
|
||||||
+ CodeCache::nmethods_do(unregister_nmethod_g1);
|
|
||||||
} else {
|
|
||||||
CodeCache::nmethods_do(mark_as_scavengable);
|
|
||||||
}
|
|
||||||
@@ -545,6 +553,11 @@ void VM_EnhancedRedefineClasses::doit() {
|
|
||||||
|
|
||||||
Universe::root_oops_do(&oopClosureNoBarrier);
|
|
||||||
|
|
||||||
+ if (UseG1GC) {
|
|
||||||
+ // this should work also for other GCs
|
|
||||||
+ CodeCache::nmethods_do(register_nmethod_g1);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
}
|
|
||||||
log_trace(redefine, class, obsolete, metadata)("After updating instances");
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
|
||||||
index 9755944d70b..4c0412d343d 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
|
||||||
@@ -116,7 +116,8 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
|
||||||
|
|
||||||
void rollback();
|
|
||||||
static void mark_as_scavengable(nmethod* nm);
|
|
||||||
- static void mark_as_scavengable_g1(nmethod* nm);
|
|
||||||
+ static void unregister_nmethod_g1(nmethod* nm);
|
|
||||||
+ static void register_nmethod_g1(nmethod* nm);
|
|
||||||
static void unpatch_bytecode(Method* method);
|
|
||||||
static void fix_invoke_method(Method* method);
|
|
||||||
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
From 5c7e5f245f79d7e8575461dab0c356ed74c8e9a3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Thu, 22 Oct 2020 20:15:20 +0200
|
|
||||||
Subject: [PATCH 14/34] Initialize method's _new_version/_old_version to NULL
|
|
||||||
|
|
||||||
---
|
|
||||||
src/hotspot/share/oops/method.cpp | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/oops/method.cpp b/src/hotspot/share/oops/method.cpp
|
|
||||||
index 1c88511a5fc..ce940cf10a9 100644
|
|
||||||
--- a/src/hotspot/share/oops/method.cpp
|
|
||||||
+++ b/src/hotspot/share/oops/method.cpp
|
|
||||||
@@ -91,7 +91,8 @@ Method* Method::allocate(ClassLoaderData* loader_data,
|
|
||||||
return new (loader_data, size, MetaspaceObj::MethodType, THREAD) Method(cm, access_flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
-Method::Method(ConstMethod* xconst, AccessFlags access_flags) {
|
|
||||||
+Method::Method(ConstMethod* xconst, AccessFlags access_flags) : _new_version(NULL),
|
|
||||||
+ _old_version(NULL) {
|
|
||||||
NoSafepointVerifier no_safepoint;
|
|
||||||
set_constMethod(xconst);
|
|
||||||
set_access_flags(access_flags);
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,193 +0,0 @@
|
|||||||
From 6ffac6e5064ec6633fdbeb8520333dca00bc6a62 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Fri, 23 Oct 2020 10:20:26 +0200
|
|
||||||
Subject: [PATCH 15/34] Clear dcevm code separation
|
|
||||||
|
|
||||||
---
|
|
||||||
src/hotspot/share/classfile/systemDictionary.cpp | 4 ++--
|
|
||||||
src/hotspot/share/gc/serial/genMarkSweep.cpp | 8 +++++---
|
|
||||||
src/hotspot/share/interpreter/linkResolver.cpp | 16 +++++++++++-----
|
|
||||||
.../instrumentation/jfrEventClassTransformer.cpp | 2 +-
|
|
||||||
src/hotspot/share/oops/instanceKlass.cpp | 10 ++++++----
|
|
||||||
src/hotspot/share/oops/method.cpp | 2 +-
|
|
||||||
.../share/prims/jvmtiGetLoadedClasses.cpp | 2 +-
|
|
||||||
src/hotspot/share/runtime/reflection.cpp | 2 +-
|
|
||||||
8 files changed, 28 insertions(+), 18 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/classfile/systemDictionary.cpp b/src/hotspot/share/classfile/systemDictionary.cpp
|
|
||||||
index 8f2b46add4d..9ac6ec96cb5 100644
|
|
||||||
--- a/src/hotspot/share/classfile/systemDictionary.cpp
|
|
||||||
+++ b/src/hotspot/share/classfile/systemDictionary.cpp
|
|
||||||
@@ -1241,7 +1241,7 @@ InstanceKlass* SystemDictionary::resolve_from_stream(Symbol* class_name,
|
|
||||||
MutexLocker mu(THREAD, SystemDictionary_lock);
|
|
||||||
|
|
||||||
Klass* check = find_class(h_name, k->class_loader_data());
|
|
||||||
- assert((check == k && !k->is_redefining()) || (k->is_redefining() && check == k->old_version()), "should be present in the dictionary");
|
|
||||||
+ assert(check == k && !k->is_redefining() || k->is_redefining() && check == k->old_version(), "should be present in the dictionary");
|
|
||||||
} );
|
|
||||||
|
|
||||||
return k;
|
|
||||||
@@ -2290,7 +2290,7 @@ void SystemDictionary::check_constraints(unsigned int d_hash,
|
|
||||||
// also hold array classes.
|
|
||||||
|
|
||||||
assert(check->is_instance_klass(), "noninstance in systemdictionary");
|
|
||||||
- if ((defining == true) || ((k != check) && k->old_version() != check)) {
|
|
||||||
+ if ((defining == true) || (k != check && (!AllowEnhancedClassRedefinition || k->old_version() != check))) {
|
|
||||||
throwException = true;
|
|
||||||
ss.print("loader %s", loader_data->loader_name_and_id());
|
|
||||||
ss.print(" attempted duplicate %s definition for %s. (%s)",
|
|
||||||
diff --git a/src/hotspot/share/gc/serial/genMarkSweep.cpp b/src/hotspot/share/gc/serial/genMarkSweep.cpp
|
|
||||||
index 1d13c647452..548df01e557 100644
|
|
||||||
--- a/src/hotspot/share/gc/serial/genMarkSweep.cpp
|
|
||||||
+++ b/src/hotspot/share/gc/serial/genMarkSweep.cpp
|
|
||||||
@@ -334,7 +334,9 @@ void GenMarkSweep::mark_sweep_phase4() {
|
|
||||||
|
|
||||||
GenCompactClosure blk;
|
|
||||||
gch->generation_iterate(&blk, true);
|
|
||||||
- DcevmSharedGC::copy_rescued_objects_back(MarkSweep::_rescued_oops, true);
|
|
||||||
- DcevmSharedGC::clear_rescued_objects_resource(MarkSweep::_rescued_oops);
|
|
||||||
- MarkSweep::_rescued_oops = NULL;
|
|
||||||
+ if (AllowEnhancedClassRedefinition) {
|
|
||||||
+ DcevmSharedGC::copy_rescued_objects_back(MarkSweep::_rescued_oops, true);
|
|
||||||
+ DcevmSharedGC::clear_rescued_objects_resource(MarkSweep::_rescued_oops);
|
|
||||||
+ MarkSweep::_rescued_oops = NULL;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
diff --git a/src/hotspot/share/interpreter/linkResolver.cpp b/src/hotspot/share/interpreter/linkResolver.cpp
|
|
||||||
index b6e9e0a308d..b2f24ddbeda 100644
|
|
||||||
--- a/src/hotspot/share/interpreter/linkResolver.cpp
|
|
||||||
+++ b/src/hotspot/share/interpreter/linkResolver.cpp
|
|
||||||
@@ -282,9 +282,14 @@ void LinkResolver::check_klass_accessibility(Klass* ref_klass, Klass* sel_klass,
|
|
||||||
if (!base_klass->is_instance_klass()) {
|
|
||||||
return; // no relevant check to do
|
|
||||||
}
|
|
||||||
-
|
|
||||||
- Reflection::VerifyClassAccessResults vca_result =
|
|
||||||
- Reflection::verify_class_access(ref_klass->newest_version(), InstanceKlass::cast(base_klass->newest_version()), true);
|
|
||||||
+ Klass* refKlassNewest = ref_klass;
|
|
||||||
+ Klass* baseKlassNewest = base_klass;
|
|
||||||
+ if (AllowEnhancedClassRedefinition) {
|
|
||||||
+ refKlassNewest = ref_klass->newest_version();
|
|
||||||
+ baseKlassNewest = base_klass->newest_version();
|
|
||||||
+ }
|
|
||||||
+ Reflection::VerifyClassAccessResults vca_result =
|
|
||||||
+ Reflection::verify_class_access(refKlassNewest, InstanceKlass::cast(baseKlassNewest), true);
|
|
||||||
if (vca_result != Reflection::ACCESS_OK) {
|
|
||||||
ResourceMark rm(THREAD);
|
|
||||||
char* msg = Reflection::verify_class_access_msg(ref_klass,
|
|
||||||
@@ -566,7 +571,8 @@ void LinkResolver::check_method_accessability(Klass* ref_klass,
|
|
||||||
// We'll check for the method name first, as that's most likely
|
|
||||||
// to be false (so we'll short-circuit out of these tests).
|
|
||||||
if (sel_method->name() == vmSymbols::clone_name() &&
|
|
||||||
- sel_klass->newest_version() == SystemDictionary::Object_klass()->newest_version() &&
|
|
||||||
+ ( !AllowEnhancedClassRedefinition && sel_klass == SystemDictionary::Object_klass() ||
|
|
||||||
+ AllowEnhancedClassRedefinition && sel_klass->newest_version() == SystemDictionary::Object_klass()->newest_version()) &&
|
|
||||||
resolved_klass->is_array_klass()) {
|
|
||||||
// We need to change "protected" to "public".
|
|
||||||
assert(flags.is_protected(), "clone not protected?");
|
|
||||||
@@ -1011,7 +1017,7 @@ void LinkResolver::resolve_field(fieldDescriptor& fd,
|
|
||||||
// or by the <init> method (in case of an instance field).
|
|
||||||
if (is_put && fd.access_flags().is_final()) {
|
|
||||||
|
|
||||||
- if (sel_klass != current_klass && sel_klass != current_klass->active_version()) {
|
|
||||||
+ if (sel_klass != current_klass && (!AllowEnhancedClassRedefinition || sel_klass != current_klass->active_version())) {
|
|
||||||
ResourceMark rm(THREAD);
|
|
||||||
stringStream ss;
|
|
||||||
ss.print("Update to %s final field %s.%s attempted from a different class (%s) than the field's declaring class",
|
|
||||||
diff --git a/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp b/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp
|
|
||||||
index 96fc139bea3..f7284197c5a 100644
|
|
||||||
--- a/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp
|
|
||||||
+++ b/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp
|
|
||||||
@@ -1471,7 +1471,7 @@ static InstanceKlass* create_new_instance_klass(InstanceKlass* ik, ClassFileStre
|
|
||||||
cld,
|
|
||||||
&cl_info,
|
|
||||||
ClassFileParser::INTERNAL, // internal visibility
|
|
||||||
- false,
|
|
||||||
+ false,
|
|
||||||
THREAD);
|
|
||||||
if (HAS_PENDING_EXCEPTION) {
|
|
||||||
log_pending_exception(PENDING_EXCEPTION);
|
|
||||||
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
|
||||||
index 3be3a09ef8f..f8e60941046 100644
|
|
||||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
|
||||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
|
||||||
@@ -199,7 +199,9 @@ bool InstanceKlass::has_nest_member(InstanceKlass* k, TRAPS) const {
|
|
||||||
// able to perform that loading but we can't exclude the compiler threads from
|
|
||||||
// executing this logic. But it should actually be impossible to trigger loading here.
|
|
||||||
Klass* k2 = _constants->klass_at(cp_index, THREAD);
|
|
||||||
- k2 = k2->newest_version();
|
|
||||||
+ if (AllowEnhancedClassRedefinition) {
|
|
||||||
+ k2 = k2->newest_version();
|
|
||||||
+ }
|
|
||||||
assert(!HAS_PENDING_EXCEPTION || PENDING_EXCEPTION->is_a(SystemDictionary::VirtualMachineError_klass()),
|
|
||||||
"Exceptions should not be possible here");
|
|
||||||
if (k2 == k) {
|
|
||||||
@@ -1003,7 +1005,7 @@ bool InstanceKlass::link_class_impl(TRAPS) {
|
|
||||||
#endif
|
|
||||||
set_init_state(linked);
|
|
||||||
// (DCEVM) Must check for old version in order to prevent infinite loops.
|
|
||||||
- if (JvmtiExport::should_post_class_prepare() && old_version() == NULL /* JVMTI deadlock otherwise */) {
|
|
||||||
+ if (JvmtiExport::should_post_class_prepare() && (!AllowEnhancedClassRedefinition || old_version() == NULL) /* JVMTI deadlock otherwise */) {
|
|
||||||
Thread *thread = THREAD;
|
|
||||||
assert(thread->is_Java_thread(), "thread->is_Java_thread()");
|
|
||||||
JvmtiExport::post_class_prepare((JavaThread *) thread, this);
|
|
||||||
@@ -1084,7 +1086,7 @@ void InstanceKlass::initialize_impl(TRAPS) {
|
|
||||||
// we might end up throwing IE from link/symbol resolution sites
|
|
||||||
// that aren't expected to throw. This would wreak havoc. See 6320309.
|
|
||||||
while ((is_being_initialized() && !is_reentrant_initialization(jt))
|
|
||||||
- || (old_version() != NULL && InstanceKlass::cast(old_version())->is_being_initialized())) {
|
|
||||||
+ || (AllowEnhancedClassRedefinition && old_version() != NULL && InstanceKlass::cast(old_version())->is_being_initialized())) {
|
|
||||||
wait = true;
|
|
||||||
jt->set_class_to_be_initialized(this);
|
|
||||||
ol.wait_uninterruptibly(jt);
|
|
||||||
@@ -3782,7 +3784,7 @@ void InstanceKlass::verify_on(outputStream* st) {
|
|
||||||
|
|
||||||
guarantee(sib->is_klass(), "should be klass");
|
|
||||||
// TODO: (DCEVM) explain
|
|
||||||
- guarantee(sib->super() == super || super->newest_version() == SystemDictionary::Object_klass(), "siblings should have same superklass");
|
|
||||||
+ guarantee(sib->super() == super || AllowEnhancedClassRedefinition && super->newest_version() == SystemDictionary::Object_klass(), "siblings should have same superklass");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Verify local interfaces
|
|
||||||
diff --git a/src/hotspot/share/oops/method.cpp b/src/hotspot/share/oops/method.cpp
|
|
||||||
index ce940cf10a9..2d8e5b0256b 100644
|
|
||||||
--- a/src/hotspot/share/oops/method.cpp
|
|
||||||
+++ b/src/hotspot/share/oops/method.cpp
|
|
||||||
@@ -2208,7 +2208,7 @@ void Method::ensure_jmethod_ids(ClassLoaderData* loader_data, int capacity) {
|
|
||||||
// Add a method id to the jmethod_ids
|
|
||||||
jmethodID Method::make_jmethod_id(ClassLoaderData* loader_data, Method* m) {
|
|
||||||
// FIXME: (DCEVM) ???
|
|
||||||
- if (m != m->newest_version()) {
|
|
||||||
+ if (AllowEnhancedClassRedefinition && m != m->newest_version()) {
|
|
||||||
m = m->newest_version();
|
|
||||||
}
|
|
||||||
ClassLoaderData* cld = loader_data;
|
|
||||||
diff --git a/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp b/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
|
|
||||||
index 1c7677f270f..6c12ee64a6e 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
|
|
||||||
@@ -75,7 +75,7 @@ public:
|
|
||||||
// the new version (SystemDictionary stores only new versions). But the LoadedClassesClosure's functionality was
|
|
||||||
// changed in java8 where jvmtiLoadedClasses collects all classes from all classloaders, therefore we
|
|
||||||
// must use new versions only.
|
|
||||||
- if (k->new_version()==NULL) {
|
|
||||||
+ if (AllowEnhancedClassRedefinition && k->new_version()==NULL) {
|
|
||||||
_classStack.push((jclass) _env->jni_reference(Handle(_cur_thread, k->java_mirror())));
|
|
||||||
if (_dictionary_walk) {
|
|
||||||
// Collect array classes this way when walking the dictionary (because array classes are
|
|
||||||
diff --git a/src/hotspot/share/runtime/reflection.cpp b/src/hotspot/share/runtime/reflection.cpp
|
|
||||||
index 0e7722dba7d..d67457f02ac 100644
|
|
||||||
--- a/src/hotspot/share/runtime/reflection.cpp
|
|
||||||
+++ b/src/hotspot/share/runtime/reflection.cpp
|
|
||||||
@@ -628,7 +628,7 @@ bool Reflection::verify_member_access(const Klass* current_class,
|
|
||||||
TRAPS) {
|
|
||||||
|
|
||||||
// (DCEVM) Decide accessibility based on active version
|
|
||||||
- if (current_class != NULL) {
|
|
||||||
+ if (AllowEnhancedClassRedefinition && current_class != NULL) {
|
|
||||||
current_class = current_class->active_version();
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
From dc675de6ac42819b8536827ea450fcad13a97448 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Wed, 11 Nov 2020 18:45:15 +0100
|
|
||||||
Subject: [PATCH 16/34] Fix LoadedClassesClosure - fixes problems with remote
|
|
||||||
debugging
|
|
||||||
|
|
||||||
---
|
|
||||||
src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp b/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
|
|
||||||
index 6c12ee64a6e..2a469555dbd 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
|
|
||||||
@@ -75,7 +75,7 @@ public:
|
|
||||||
// the new version (SystemDictionary stores only new versions). But the LoadedClassesClosure's functionality was
|
|
||||||
// changed in java8 where jvmtiLoadedClasses collects all classes from all classloaders, therefore we
|
|
||||||
// must use new versions only.
|
|
||||||
- if (AllowEnhancedClassRedefinition && k->new_version()==NULL) {
|
|
||||||
+ if (!AllowEnhancedClassRedefinition || k->new_version()==NULL) {
|
|
||||||
_classStack.push((jclass) _env->jni_reference(Handle(_cur_thread, k->java_mirror())));
|
|
||||||
if (_dictionary_walk) {
|
|
||||||
// Collect array classes this way when walking the dictionary (because array classes are
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,183 +0,0 @@
|
|||||||
From 1d682efa88c716e1849163d5abff3a3367581d16 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Mon, 16 Nov 2020 21:11:19 +0100
|
|
||||||
Subject: [PATCH 18/34] pre dcevm15 - fix GC spaces originally in removed CMS
|
|
||||||
patch
|
|
||||||
|
|
||||||
---
|
|
||||||
src/hotspot/share/gc/shared/space.cpp | 16 ++++++++--------
|
|
||||||
src/hotspot/share/gc/shared/space.hpp | 6 +++---
|
|
||||||
src/hotspot/share/gc/shared/space.inline.hpp | 14 ++++++++------
|
|
||||||
.../share/prims/jvmtiEnhancedRedefineClasses.cpp | 6 ++----
|
|
||||||
4 files changed, 21 insertions(+), 21 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/gc/shared/space.cpp b/src/hotspot/share/gc/shared/space.cpp
|
|
||||||
index 875a6dc854f..9772c32c42e 100644
|
|
||||||
--- a/src/hotspot/share/gc/shared/space.cpp
|
|
||||||
+++ b/src/hotspot/share/gc/shared/space.cpp
|
|
||||||
@@ -375,11 +375,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 (cast_from_oop<HeapWord*>(q) != compact_top || (size_t)q->size() != size) {
|
|
||||||
+ if (force_forward || cast_from_oop<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 {
|
|
||||||
@@ -501,7 +501,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");
|
|
||||||
@@ -824,14 +824,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) {
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -845,7 +845,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.
|
|
||||||
@@ -861,11 +861,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 c9bfc365f0f..f7648995454 100644
|
|
||||||
--- a/src/hotspot/share/gc/shared/space.hpp
|
|
||||||
+++ b/src/hotspot/share/gc/shared/space.hpp
|
|
||||||
@@ -405,7 +405,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
|
|
||||||
@@ -436,11 +436,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 5a93e93471b..fa645423685 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.
|
|
||||||
@@ -362,8 +365,7 @@ inline void CompactibleSpace::scan_and_compact(SpaceType* space, bool redefiniti
|
|
||||||
Prefetch::write(compaction_top, copy_interval);
|
|
||||||
|
|
||||||
// copy object and reinit its mark
|
|
||||||
- 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 718426f2819..1da6661dd3e 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
@@ -431,13 +431,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);
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,942 +0,0 @@
|
|||||||
From 297f564f6af79fb824f5b4e9119f1d3d0c827fb0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Mon, 16 Nov 2020 20:20:12 +0100
|
|
||||||
Subject: [PATCH 19/34] dcevm15 - fix java15 patch compilation issues
|
|
||||||
|
|
||||||
---
|
|
||||||
.../share/classfile/classFileParser.hpp | 8 +-
|
|
||||||
.../share/classfile/classLoaderData.cpp | 2 +-
|
|
||||||
src/hotspot/share/classfile/dictionary.hpp | 10 +-
|
|
||||||
src/hotspot/share/classfile/javaClasses.hpp | 2 +
|
|
||||||
.../share/gc/g1/g1FullGCCompactTask.cpp | 4 +-
|
|
||||||
.../share/gc/g1/g1FullGCCompactionPoint.cpp | 8 +-
|
|
||||||
.../share/gc/g1/g1FullGCPrepareTask.cpp | 4 +-
|
|
||||||
src/hotspot/share/gc/shared/dcevmSharedGC.cpp | 14 +-
|
|
||||||
src/hotspot/share/gc/shared/dcevmSharedGC.hpp | 2 +-
|
|
||||||
src/hotspot/share/gc/shared/gcConfig.cpp | 2 +-
|
|
||||||
src/hotspot/share/gc/shared/space.cpp | 4 +-
|
|
||||||
.../share/interpreter/linkResolver.cpp | 2 +-
|
|
||||||
src/hotspot/share/oops/instanceKlass.cpp | 17 ++-
|
|
||||||
src/hotspot/share/oops/instanceKlass.hpp | 1 +
|
|
||||||
src/hotspot/share/oops/klass.cpp | 8 +-
|
|
||||||
src/hotspot/share/prims/jvm.cpp | 2 +
|
|
||||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 129 +++++++++---------
|
|
||||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 14 +-
|
|
||||||
src/hotspot/share/prims/jvmtiEnv.cpp | 11 +-
|
|
||||||
.../share/prims/jvmtiRedefineClasses.cpp | 1 +
|
|
||||||
src/hotspot/share/prims/methodHandles.hpp | 3 +
|
|
||||||
src/hotspot/share/runtime/arguments.cpp | 22 +--
|
|
||||||
src/hotspot/share/runtime/mutexLocker.cpp | 2 +-
|
|
||||||
23 files changed, 159 insertions(+), 113 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/classfile/classFileParser.hpp b/src/hotspot/share/classfile/classFileParser.hpp
|
|
||||||
index e5761e61767..0d266b9047e 100644
|
|
||||||
--- a/src/hotspot/share/classfile/classFileParser.hpp
|
|
||||||
+++ b/src/hotspot/share/classfile/classFileParser.hpp
|
|
||||||
@@ -150,9 +150,6 @@ class ClassFileParser {
|
|
||||||
const intArray* _method_ordering;
|
|
||||||
GrowableArray<Method*>* _all_mirandas;
|
|
||||||
|
|
||||||
- // Enhanced class redefinition
|
|
||||||
- const bool _pick_newest;
|
|
||||||
-
|
|
||||||
enum { fixed_buffer_size = 128 };
|
|
||||||
u_char _linenumbertable_buffer[fixed_buffer_size];
|
|
||||||
|
|
||||||
@@ -206,6 +203,9 @@ class ClassFileParser {
|
|
||||||
bool _has_vanilla_constructor;
|
|
||||||
int _max_bootstrap_specifier_index; // detects BSS values
|
|
||||||
|
|
||||||
+ // (DCEVM) Enhanced class redefinition
|
|
||||||
+ const bool _pick_newest;
|
|
||||||
+
|
|
||||||
void parse_stream(const ClassFileStream* const stream, TRAPS);
|
|
||||||
|
|
||||||
void mangle_hidden_class_name(InstanceKlass* const ik);
|
|
||||||
@@ -582,7 +582,7 @@ class ClassFileParser {
|
|
||||||
ClassLoaderData* loader_data() const { return _loader_data; }
|
|
||||||
const Symbol* class_name() const { return _class_name; }
|
|
||||||
const InstanceKlass* super_klass() const { return _super_klass; }
|
|
||||||
- Array<Klass*>* local_interfaces() const { return _local_interfaces; }
|
|
||||||
+ Array<InstanceKlass*>* local_interfaces() const { return _local_interfaces; }
|
|
||||||
|
|
||||||
ReferenceType reference_type() const { return _rt; }
|
|
||||||
AccessFlags access_flags() const { return _access_flags; }
|
|
||||||
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
|
|
||||||
index 4d64c6b454a..aadcd50ef4a 100644
|
|
||||||
--- a/src/hotspot/share/classfile/classLoaderData.cpp
|
|
||||||
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
|
|
||||||
@@ -597,7 +597,7 @@ 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;
|
|
||||||
+ WeakHandle<vm_weak_data> exchange = _holder;
|
|
||||||
_holder = cld->_holder;
|
|
||||||
cld->_holder = exchange;
|
|
||||||
}
|
|
||||||
diff --git a/src/hotspot/share/classfile/dictionary.hpp b/src/hotspot/share/classfile/dictionary.hpp
|
|
||||||
index 114a983e783..a50f4ff84d2 100644
|
|
||||||
--- a/src/hotspot/share/classfile/dictionary.hpp
|
|
||||||
+++ b/src/hotspot/share/classfile/dictionary.hpp
|
|
||||||
@@ -84,6 +84,11 @@ public:
|
|
||||||
void print_on(outputStream* st) const;
|
|
||||||
void verify();
|
|
||||||
|
|
||||||
+ // (DCEVM) Enhanced class redefinition
|
|
||||||
+ bool update_klass(unsigned int hash, Symbol* name, ClassLoaderData* loader_data, InstanceKlass* k, InstanceKlass* old_klass);
|
|
||||||
+
|
|
||||||
+ void rollback_redefinition();
|
|
||||||
+
|
|
||||||
private:
|
|
||||||
DictionaryEntry* new_entry(unsigned int hash, InstanceKlass* klass);
|
|
||||||
|
|
||||||
@@ -106,11 +111,6 @@ public:
|
|
||||||
|
|
||||||
void free_entry(DictionaryEntry* entry);
|
|
||||||
|
|
||||||
- // Enhanced class redefinition
|
|
||||||
- bool update_klass(unsigned int hash, Symbol* name, ClassLoaderData* loader_data, InstanceKlass* k, InstanceKlass* old_klass);
|
|
||||||
-
|
|
||||||
- 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/javaClasses.hpp b/src/hotspot/share/classfile/javaClasses.hpp
|
|
||||||
index a68c5139151..9abf2e1d105 100644
|
|
||||||
--- a/src/hotspot/share/classfile/javaClasses.hpp
|
|
||||||
+++ b/src/hotspot/share/classfile/javaClasses.hpp
|
|
||||||
@@ -255,7 +255,9 @@ class java_lang_Class : AllStatic {
|
|
||||||
static void set_init_lock(oop java_class, oop init_lock);
|
|
||||||
static void set_protection_domain(oop java_class, oop protection_domain);
|
|
||||||
static void set_class_loader(oop java_class, oop class_loader);
|
|
||||||
+ public: // DCEVM
|
|
||||||
static void set_component_mirror(oop java_class, oop comp_mirror);
|
|
||||||
+ private:
|
|
||||||
static void initialize_mirror_fields(Klass* k, Handle mirror, Handle protection_domain,
|
|
||||||
Handle classData, TRAPS);
|
|
||||||
static void initialize_mirror_fields(Klass* k, Handle mirror, Handle protection_domain, TRAPS);
|
|
||||||
diff --git a/src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp b/src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp
|
|
||||||
index f70f4606dc8..a22ed48560d 100644
|
|
||||||
--- a/src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp
|
|
||||||
+++ b/src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp
|
|
||||||
@@ -157,14 +157,14 @@ void G1FullGCCompactTask::serial_compaction_dcevm() {
|
|
||||||
|
|
||||||
size_t G1FullGCCompactTask::G1CompactRegionClosureDcevm::apply(oop obj) {
|
|
||||||
size_t size = obj->size();
|
|
||||||
- HeapWord* destination = (HeapWord*)obj->forwardee();
|
|
||||||
+ HeapWord* destination = cast_from_oop<HeapWord*>(obj->forwardee());
|
|
||||||
if (destination == NULL) {
|
|
||||||
// Object not moving
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
|
|
||||||
// copy object and reinit its mark
|
|
||||||
- HeapWord* obj_addr = (HeapWord*) obj;
|
|
||||||
+ HeapWord* obj_addr = cast_from_oop<HeapWord*>(obj);
|
|
||||||
|
|
||||||
if (!_rescue_oops_it->at_end() && **_rescue_oops_it == obj_addr) {
|
|
||||||
++(*_rescue_oops_it);
|
|
||||||
diff --git a/src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp b/src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp
|
|
||||||
index 1e49571c999..755935a2c91 100644
|
|
||||||
--- a/src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp
|
|
||||||
+++ b/src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp
|
|
||||||
@@ -174,7 +174,7 @@ void G1FullGCCompactionPoint::forward_dcevm(oop object, size_t size, bool force_
|
|
||||||
assert(_current_region != NULL, "Must have been initialized");
|
|
||||||
|
|
||||||
// Store a forwarding pointer if the object should be moved.
|
|
||||||
- if ((HeapWord*)object != _compaction_top || force_forward) {
|
|
||||||
+ if (cast_from_oop<HeapWord*>(object) != _compaction_top || force_forward) {
|
|
||||||
object->forward_to(oop(_compaction_top));
|
|
||||||
} else {
|
|
||||||
if (object->forwardee() != NULL) {
|
|
||||||
@@ -188,11 +188,11 @@ void G1FullGCCompactionPoint::forward_dcevm(oop object, size_t size, bool force_
|
|
||||||
} else {
|
|
||||||
// Make sure object has the correct mark-word set or that it will be
|
|
||||||
// fixed when restoring the preserved marks.
|
|
||||||
- assert(object->mark_raw() == markOopDesc::prototype_for_object(object) || // Correct mark
|
|
||||||
- object->mark_raw()->must_be_preserved(object) || // Will be restored by PreservedMarksSet
|
|
||||||
+ assert(object->mark_raw() == markWord::prototype_for_klass(object->klass()) || // Correct mark
|
|
||||||
+ object->mark_must_be_preserved() || // Will be restored by PreservedMarksSet
|
|
||||||
(UseBiasedLocking && object->has_bias_pattern_raw()), // Will be restored by BiasedLocking
|
|
||||||
"should have correct prototype obj: " PTR_FORMAT " mark: " PTR_FORMAT " prototype: " PTR_FORMAT,
|
|
||||||
- p2i(object), p2i(object->mark_raw()), p2i(markOopDesc::prototype_for_object(object)));
|
|
||||||
+ p2i(object), object->mark_raw().value(), markWord::prototype_for_klass(object->klass()).value());
|
|
||||||
}
|
|
||||||
assert(object->forwardee() == NULL, "should be forwarded to NULL");
|
|
||||||
}
|
|
||||||
diff --git a/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp b/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp
|
|
||||||
index a45681b60cf..2f06b9617e4 100644
|
|
||||||
--- a/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp
|
|
||||||
+++ b/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp
|
|
||||||
@@ -269,7 +269,7 @@ size_t G1FullGCPrepareTask::G1PrepareCompactLiveClosureDcevm::apply(oop object)
|
|
||||||
HeapWord* compact_top = _cp->forward_compact_top(forward_size);
|
|
||||||
|
|
||||||
if (compact_top == NULL || must_rescue(object, oop(compact_top))) {
|
|
||||||
- _cp->rescued_oops()->append((HeapWord*)object);
|
|
||||||
+ _cp->rescued_oops()->append(cast_from_oop<HeapWord*>(object));
|
|
||||||
} else {
|
|
||||||
_cp->forward_dcevm(object, forward_size, (size != forward_size));
|
|
||||||
}
|
|
||||||
@@ -295,7 +295,7 @@ bool G1FullGCPrepareTask::G1PrepareCompactLiveClosureDcevm::must_rescue(oop old_
|
|
||||||
int new_size = old_obj->size_given_klass(oop(old_obj)->klass()->new_version());
|
|
||||||
int original_size = old_obj->size();
|
|
||||||
|
|
||||||
- bool overlap = ((HeapWord*)old_obj + original_size < (HeapWord*)new_obj + new_size);
|
|
||||||
+ bool overlap = (cast_from_oop<HeapWord*>(old_obj) + original_size < cast_from_oop<HeapWord*>(new_obj) + new_size);
|
|
||||||
|
|
||||||
return overlap;
|
|
||||||
}
|
|
||||||
diff --git a/src/hotspot/share/gc/shared/dcevmSharedGC.cpp b/src/hotspot/share/gc/shared/dcevmSharedGC.cpp
|
|
||||||
index 803e645f843..3dee097f1d3 100644
|
|
||||||
--- a/src/hotspot/share/gc/shared/dcevmSharedGC.cpp
|
|
||||||
+++ b/src/hotspot/share/gc/shared/dcevmSharedGC.cpp
|
|
||||||
@@ -58,10 +58,10 @@ void DcevmSharedGC::copy_rescued_objects_back(GrowableArray<HeapWord*>* rescued_
|
|
||||||
DcevmSharedGC::update_fields(rescued_obj, new_obj);
|
|
||||||
} else {
|
|
||||||
rescued_obj->set_klass(new_klass);
|
|
||||||
- Copy::aligned_disjoint_words((HeapWord*)rescued_obj, (HeapWord*)new_obj, size);
|
|
||||||
+ Copy::aligned_disjoint_words(cast_from_oop<HeapWord*>(rescued_obj), cast_from_oop<HeapWord*>(new_obj), size);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
- Copy::aligned_disjoint_words((HeapWord*)rescued_obj, (HeapWord*)new_obj, size);
|
|
||||||
+ Copy::aligned_disjoint_words(cast_from_oop<HeapWord*>(rescued_obj), cast_from_oop<HeapWord*>(new_obj), size);
|
|
||||||
}
|
|
||||||
|
|
||||||
new_obj->init_mark_raw();
|
|
||||||
@@ -111,11 +111,11 @@ void DcevmSharedGC::update_fields(oop q, oop new_location) {
|
|
||||||
|
|
||||||
// Save object somewhere, there is an overlap in fields
|
|
||||||
if (new_klass_oop->is_copying_backwards()) {
|
|
||||||
- if (((HeapWord *)q >= (HeapWord *)new_location && (HeapWord *)q < (HeapWord *)new_location + new_size) ||
|
|
||||||
- ((HeapWord *)new_location >= (HeapWord *)q && (HeapWord *)new_location < (HeapWord *)q + size)) {
|
|
||||||
+ if ((cast_from_oop<HeapWord*>(q) >= cast_from_oop<HeapWord*>(new_location) && cast_from_oop<HeapWord*>(q) < cast_from_oop<HeapWord*>(new_location) + new_size) ||
|
|
||||||
+ (cast_from_oop<HeapWord*>(new_location) >= cast_from_oop<HeapWord*>(q) && cast_from_oop<HeapWord*>(new_location) < cast_from_oop<HeapWord*>(q) + size)) {
|
|
||||||
tmp = NEW_RESOURCE_ARRAY(HeapWord, size);
|
|
||||||
q = (oop) tmp;
|
|
||||||
- Copy::aligned_disjoint_words((HeapWord*)tmp_obj, (HeapWord*)q, size);
|
|
||||||
+ Copy::aligned_disjoint_words(cast_from_oop<HeapWord*>(tmp_obj), cast_from_oop<HeapWord*>(q), size);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -131,13 +131,13 @@ void DcevmSharedGC::update_fields(oop q, oop new_location) {
|
|
||||||
|
|
||||||
void DcevmSharedGC::update_fields(oop new_location, oop tmp_obj, int *cur) {
|
|
||||||
assert(cur != NULL, "just checking");
|
|
||||||
- char* to = (char*)(HeapWord*)new_location;
|
|
||||||
+ char* to = (char*)cast_from_oop<HeapWord*>(new_location);
|
|
||||||
while (*cur != 0) {
|
|
||||||
int size = *cur;
|
|
||||||
if (size > 0) {
|
|
||||||
cur++;
|
|
||||||
int offset = *cur;
|
|
||||||
- HeapWord* from = (HeapWord*)(((char *)(HeapWord*)tmp_obj) + offset);
|
|
||||||
+ HeapWord* from = (HeapWord*)(((char *)cast_from_oop<HeapWord*>(tmp_obj)) + offset);
|
|
||||||
if (size == HeapWordSize) {
|
|
||||||
*((HeapWord*)to) = *from;
|
|
||||||
} else if (size == HeapWordSize * 2) {
|
|
||||||
diff --git a/src/hotspot/share/gc/shared/dcevmSharedGC.hpp b/src/hotspot/share/gc/shared/dcevmSharedGC.hpp
|
|
||||||
index e2ef0171fb2..a4e27e00280 100644
|
|
||||||
--- a/src/hotspot/share/gc/shared/dcevmSharedGC.hpp
|
|
||||||
+++ b/src/hotspot/share/gc/shared/dcevmSharedGC.hpp
|
|
||||||
@@ -29,7 +29,7 @@
|
|
||||||
#include "gc/shared/genOopClosures.hpp"
|
|
||||||
#include "gc/shared/taskqueue.hpp"
|
|
||||||
#include "memory/iterator.hpp"
|
|
||||||
-#include "oops/markOop.hpp"
|
|
||||||
+#include "oops/markWord.hpp"
|
|
||||||
#include "oops/oop.hpp"
|
|
||||||
#include "runtime/timer.hpp"
|
|
||||||
#include "utilities/growableArray.hpp"
|
|
||||||
diff --git a/src/hotspot/share/gc/shared/gcConfig.cpp b/src/hotspot/share/gc/shared/gcConfig.cpp
|
|
||||||
index f01d64d1434..5c1a09390f1 100644
|
|
||||||
--- a/src/hotspot/share/gc/shared/gcConfig.cpp
|
|
||||||
+++ b/src/hotspot/share/gc/shared/gcConfig.cpp
|
|
||||||
@@ -100,7 +100,7 @@ void GCConfig::fail_if_non_included_gc_is_selected() {
|
|
||||||
void GCConfig::select_gc_ergonomically() {
|
|
||||||
if (AllowEnhancedClassRedefinition && !UseG1GC) {
|
|
||||||
// Enhanced class redefinition only supports serial GC at the moment
|
|
||||||
- FLAG_SET_ERGO(bool, UseSerialGC, true);
|
|
||||||
+ FLAG_SET_ERGO(UseSerialGC, true);
|
|
||||||
} else if (os::is_server_class_machine()) {
|
|
||||||
#if INCLUDE_G1GC
|
|
||||||
FLAG_SET_ERGO_IF_DEFAULT(UseG1GC, true);
|
|
||||||
diff --git a/src/hotspot/share/gc/shared/space.cpp b/src/hotspot/share/gc/shared/space.cpp
|
|
||||||
index 9772c32c42e..e8e3d7884c2 100644
|
|
||||||
--- a/src/hotspot/share/gc/shared/space.cpp
|
|
||||||
+++ b/src/hotspot/share/gc/shared/space.cpp
|
|
||||||
@@ -440,7 +440,7 @@ int CompactibleSpace::space_index(oop obj) {
|
|
||||||
index++;
|
|
||||||
}
|
|
||||||
|
|
||||||
- tty->print_cr("could not compute space_index for %08xh", (HeapWord*)obj);
|
|
||||||
+ tty->print_cr("could not compute space_index for %08xh", cast_from_oop<HeapWord*>(obj));
|
|
||||||
index = 0;
|
|
||||||
|
|
||||||
Generation* gen = heap->old_gen();
|
|
||||||
@@ -485,7 +485,7 @@ bool CompactibleSpace::must_rescue(oop old_obj, oop new_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);
|
|
||||||
+ bool overlap = (cast_from_oop<HeapWord*>(old_obj) + original_size < cast_from_oop<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.
|
|
||||||
diff --git a/src/hotspot/share/interpreter/linkResolver.cpp b/src/hotspot/share/interpreter/linkResolver.cpp
|
|
||||||
index b2f24ddbeda..9daeeb70b34 100644
|
|
||||||
--- a/src/hotspot/share/interpreter/linkResolver.cpp
|
|
||||||
+++ b/src/hotspot/share/interpreter/linkResolver.cpp
|
|
||||||
@@ -1031,7 +1031,7 @@ void LinkResolver::resolve_field(fieldDescriptor& fd,
|
|
||||||
assert(m != 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()->name() == vmSymbols::ha_class_initializer_name()));
|
|
||||||
+ !(m->is_static_initializer() || m->name() == vmSymbols::ha_class_initializer_name()));
|
|
||||||
bool is_initialized_instance_final_update = ((byte == Bytecodes::_putfield || byte == Bytecodes::_nofast_putfield) &&
|
|
||||||
!fd.is_static() &&
|
|
||||||
!m->is_object_initializer());
|
|
||||||
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
|
||||||
index f8e60941046..5e40d78a87e 100644
|
|
||||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
|
||||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
|
||||||
@@ -1316,7 +1316,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();
|
|
||||||
+ Klass* volatile* addr = adr_implementor();
|
|
||||||
assert(addr != NULL, "null addr");
|
|
||||||
if (addr != NULL) {
|
|
||||||
*addr = NULL;
|
|
||||||
@@ -1659,6 +1659,21 @@ void InstanceKlass::methods_do(void f(Method* method)) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+void InstanceKlass::methods_do(void f(Method* method, TRAPS), TRAPS) {
|
|
||||||
+ // Methods aren't stable until they are loaded. This can be read outside
|
|
||||||
+ // a lock through the ClassLoaderData for profiling
|
|
||||||
+ if (!is_loaded()) {
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ int len = methods()->length();
|
|
||||||
+ for (int index = 0; index < len; index++) {
|
|
||||||
+ Method* m = methods()->at(index);
|
|
||||||
+ assert(m->is_method(), "must be method");
|
|
||||||
+ f(m, CHECK);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
// (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) {
|
|
||||||
diff --git a/src/hotspot/share/oops/instanceKlass.hpp b/src/hotspot/share/oops/instanceKlass.hpp
|
|
||||||
index 6ead9426728..b56d42cb177 100644
|
|
||||||
--- a/src/hotspot/share/oops/instanceKlass.hpp
|
|
||||||
+++ b/src/hotspot/share/oops/instanceKlass.hpp
|
|
||||||
@@ -1069,6 +1069,7 @@ public:
|
|
||||||
void clear_update_information();
|
|
||||||
|
|
||||||
void methods_do(void f(Method* method));
|
|
||||||
+ void methods_do(void f(Method* method, TRAPS), TRAPS);
|
|
||||||
void array_klasses_do(void f(Klass* k));
|
|
||||||
void array_klasses_do(void f(Klass* k, TRAPS), TRAPS);
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/oops/klass.cpp b/src/hotspot/share/oops/klass.cpp
|
|
||||||
index 352d8f84631..88f5ec9ba4a 100644
|
|
||||||
--- a/src/hotspot/share/oops/klass.cpp
|
|
||||||
+++ b/src/hotspot/share/oops/klass.cpp
|
|
||||||
@@ -200,13 +200,13 @@ void* Klass::operator new(size_t size, ClassLoaderData* loader_data, size_t word
|
|
||||||
Klass::Klass(KlassID id) : _id(id),
|
|
||||||
_java_mirror(NULL),
|
|
||||||
_prototype_header(markWord::prototype()),
|
|
||||||
- _shared_class_path_index(-1),
|
|
||||||
- _new_version(NULL),
|
|
||||||
_old_version(NULL),
|
|
||||||
+ _new_version(NULL),
|
|
||||||
+ _redefinition_flags(Klass::NoRedefinition),
|
|
||||||
_is_redefining(false),
|
|
||||||
+ _update_information(NULL),
|
|
||||||
_is_copying_backwards(false),
|
|
||||||
- _redefinition_flags(Klass::NoRedefinition),
|
|
||||||
- _update_information(NULL) {
|
|
||||||
+ _shared_class_path_index(-1) {
|
|
||||||
CDS_ONLY(_shared_class_flags = 0;)
|
|
||||||
CDS_JAVA_HEAP_ONLY(_archived_mirror = 0;)
|
|
||||||
_primary_supers[0] = this;
|
|
||||||
diff --git a/src/hotspot/share/prims/jvm.cpp b/src/hotspot/share/prims/jvm.cpp
|
|
||||||
index 333b65ccfc1..13bcac352fb 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvm.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvm.cpp
|
|
||||||
@@ -1054,6 +1054,7 @@ static jclass jvm_lookup_define_class(JNIEnv *env, jclass lookup, const char *na
|
|
||||||
class_loader,
|
|
||||||
protection_domain,
|
|
||||||
&st,
|
|
||||||
+ NULL,
|
|
||||||
CHECK_NULL);
|
|
||||||
|
|
||||||
if (log_is_enabled(Debug, class, resolve) && defined_k != NULL) {
|
|
||||||
@@ -1074,6 +1075,7 @@ static jclass jvm_lookup_define_class(JNIEnv *env, jclass lookup, const char *na
|
|
||||||
class_loader,
|
|
||||||
&st,
|
|
||||||
cl_info,
|
|
||||||
+ NULL,
|
|
||||||
CHECK_NULL);
|
|
||||||
if (defined_k == NULL) {
|
|
||||||
THROW_MSG_0(vmSymbols::java_lang_Error(), "Failure to define a hidden class");
|
|
||||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
index 1da6661dd3e..619e3988e3a 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
@@ -24,11 +24,14 @@
|
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
|
||||||
#include "aot/aotLoader.hpp"
|
|
||||||
+#include "classfile/classFileParser.hpp"
|
|
||||||
#include "classfile/classFileStream.hpp"
|
|
||||||
#include "classfile/metadataOnStackMark.hpp"
|
|
||||||
#include "classfile/systemDictionary.hpp"
|
|
||||||
#include "classfile/verifier.hpp"
|
|
||||||
#include "classfile/dictionary.hpp"
|
|
||||||
+#include "classfile/classLoaderDataGraph.hpp"
|
|
||||||
+#include "interpreter/linkResolver.hpp"
|
|
||||||
#include "interpreter/oopMapCache.hpp"
|
|
||||||
#include "interpreter/rewriter.hpp"
|
|
||||||
#include "logging/logStream.hpp"
|
|
||||||
@@ -37,17 +40,22 @@
|
|
||||||
#include "memory/resourceArea.hpp"
|
|
||||||
#include "memory/iterator.inline.hpp"
|
|
||||||
#include "oops/fieldStreams.hpp"
|
|
||||||
+#include "oops/fieldStreams.inline.hpp"
|
|
||||||
#include "oops/klassVtable.hpp"
|
|
||||||
#include "oops/oop.inline.hpp"
|
|
||||||
#include "oops/constantPool.inline.hpp"
|
|
||||||
+#include "oops/metadata.hpp"
|
|
||||||
+#include "oops/methodData.hpp"
|
|
||||||
#include "prims/jvmtiImpl.hpp"
|
|
||||||
#include "prims/jvmtiClassFileReconstituter.hpp"
|
|
||||||
#include "prims/jvmtiEnhancedRedefineClasses.hpp"
|
|
||||||
#include "prims/methodComparator.hpp"
|
|
||||||
#include "prims/resolvedMethodTable.hpp"
|
|
||||||
+#include "prims/methodHandles.hpp"
|
|
||||||
#include "runtime/deoptimization.hpp"
|
|
||||||
#include "runtime/jniHandles.inline.hpp"
|
|
||||||
#include "runtime/relocator.hpp"
|
|
||||||
+#include "runtime/fieldDescriptor.hpp"
|
|
||||||
#include "runtime/fieldDescriptor.inline.hpp"
|
|
||||||
#include "utilities/bitMap.inline.hpp"
|
|
||||||
#include "prims/jvmtiThreadState.inline.hpp"
|
|
||||||
@@ -55,6 +63,8 @@
|
|
||||||
#include "oops/constantPool.inline.hpp"
|
|
||||||
#include "gc/g1/g1CollectedHeap.hpp"
|
|
||||||
#include "gc/shared/dcevmSharedGC.hpp"
|
|
||||||
+#include "gc/shared/scavengableNMethods.hpp"
|
|
||||||
+#include "ci/ciObjectFactory.hpp"
|
|
||||||
|
|
||||||
Array<Method*>* VM_EnhancedRedefineClasses::_old_methods = NULL;
|
|
||||||
Array<Method*>* VM_EnhancedRedefineClasses::_new_methods = NULL;
|
|
||||||
@@ -66,6 +76,7 @@ int VM_EnhancedRedefineClasses::_matching_methods_length = 0;
|
|
||||||
int VM_EnhancedRedefineClasses::_deleted_methods_length = 0;
|
|
||||||
int VM_EnhancedRedefineClasses::_added_methods_length = 0;
|
|
||||||
Klass* VM_EnhancedRedefineClasses::_the_class_oop = NULL;
|
|
||||||
+u8 VM_EnhancedRedefineClasses::_id_counter = 0;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Create new instance of enhanced class redefiner.
|
|
||||||
@@ -88,6 +99,7 @@ VM_EnhancedRedefineClasses::VM_EnhancedRedefineClasses(jint class_count, const j
|
|
||||||
_class_load_kind = class_load_kind;
|
|
||||||
_res = JVMTI_ERROR_NONE;
|
|
||||||
_any_class_has_resolved_methods = false;
|
|
||||||
+ _id = next_id();
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline InstanceKlass* get_ik(jclass def) {
|
|
||||||
@@ -211,9 +223,7 @@ class FieldCopier : public FieldClosure {
|
|
||||||
|
|
||||||
// TODO: review...
|
|
||||||
void VM_EnhancedRedefineClasses::mark_as_scavengable(nmethod* nm) {
|
|
||||||
- if (!nm->on_scavenge_root_list()) {
|
|
||||||
- CodeCache::add_scavenge_root_nmethod(nm);
|
|
||||||
- }
|
|
||||||
+ ScavengableNMethods::register_nmethod(nm);
|
|
||||||
}
|
|
||||||
|
|
||||||
void VM_EnhancedRedefineClasses::unregister_nmethod_g1(nmethod* nm) {
|
|
||||||
@@ -414,7 +424,7 @@ public:
|
|
||||||
_tmp_obj_size = size;
|
|
||||||
_tmp_obj = (oop)resource_allocate_bytes(size * HeapWordSize);
|
|
||||||
}
|
|
||||||
- Copy::aligned_disjoint_words((HeapWord*)o, (HeapWord*)_tmp_obj, size);
|
|
||||||
+ Copy::aligned_disjoint_words(cast_from_oop<HeapWord*>(o), cast_from_oop<HeapWord*>(_tmp_obj), size);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void do_object(oop obj) {
|
|
||||||
@@ -505,9 +515,6 @@ void VM_EnhancedRedefineClasses::doit() {
|
|
||||||
ClearCpoolCacheAndUnpatch clear_cpool_cache(thread);
|
|
||||||
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;
|
|
||||||
@@ -564,8 +571,8 @@ void VM_EnhancedRedefineClasses::doit() {
|
|
||||||
InstanceKlass* old = InstanceKlass::cast(cur->old_version());
|
|
||||||
|
|
||||||
// Swap marks to have same hashcodes
|
|
||||||
- markOop cur_mark = cur->prototype_header();
|
|
||||||
- markOop old_mark = old->prototype_header();
|
|
||||||
+ markWord cur_mark = cur->prototype_header();
|
|
||||||
+ markWord old_mark = old->prototype_header();
|
|
||||||
cur->set_prototype_header(old_mark);
|
|
||||||
old->set_prototype_header(cur_mark);
|
|
||||||
|
|
||||||
@@ -579,14 +586,14 @@ void VM_EnhancedRedefineClasses::doit() {
|
|
||||||
// Revert pool holder for old version of klass (it was updated by one of ours closure!)
|
|
||||||
old->constants()->set_pool_holder(old);
|
|
||||||
|
|
||||||
- Klass* array_klasses = old->array_klasses();
|
|
||||||
+ ObjArrayKlass* array_klasses = old->array_klasses();
|
|
||||||
if (array_klasses != NULL) {
|
|
||||||
assert(cur->array_klasses() == NULL, "just checking");
|
|
||||||
|
|
||||||
// Transfer the array classes, otherwise we might get cast exceptions when casting array types.
|
|
||||||
// Also, set array klasses element klass.
|
|
||||||
cur->set_array_klasses(array_klasses);
|
|
||||||
- ObjArrayKlass::cast(array_klasses)->set_element_klass(cur);
|
|
||||||
+ array_klasses->set_element_klass(cur);
|
|
||||||
java_lang_Class::release_set_array_klass(cur->java_mirror(), array_klasses);
|
|
||||||
java_lang_Class::set_component_mirror(array_klasses->java_mirror(), cur->java_mirror());
|
|
||||||
}
|
|
||||||
@@ -641,11 +648,15 @@ void VM_EnhancedRedefineClasses::doit() {
|
|
||||||
//ClassLoaderDataGraph::classes_do(&clean_weak_method_links);
|
|
||||||
|
|
||||||
// Disable any dependent concurrent compilations
|
|
||||||
- SystemDictionary::notice_modification();
|
|
||||||
+ // SystemDictionary::notice_modification();
|
|
||||||
+
|
|
||||||
+ JvmtiExport::increment_redefinition_count();
|
|
||||||
|
|
||||||
// Set flag indicating that some invariants are no longer true.
|
|
||||||
// See jvmtiExport.hpp for detailed explanation.
|
|
||||||
- JvmtiExport::set_has_redefined_a_class();
|
|
||||||
+
|
|
||||||
+ // dcevm15: handled by _redefinition_count
|
|
||||||
+ // JvmtiExport::set_has_redefined_a_class();
|
|
||||||
|
|
||||||
#ifdef PRODUCT
|
|
||||||
if (log_is_enabled(Trace, redefine, class, obsolete, metadata)) {
|
|
||||||
@@ -718,7 +729,7 @@ bool VM_EnhancedRedefineClasses::is_modifiable_class(oop klass_mirror) {
|
|
||||||
}
|
|
||||||
|
|
||||||
// Cannot redefine or retransform an anonymous class.
|
|
||||||
- if (InstanceKlass::cast(k)->is_anonymous()) {
|
|
||||||
+ if (InstanceKlass::cast(k)->is_unsafe_anonymous()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
@@ -804,22 +815,30 @@ jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
|
|
||||||
|
|
||||||
InstanceKlass* k;
|
|
||||||
|
|
||||||
- if (InstanceKlass::cast(the_class)->is_anonymous()) {
|
|
||||||
- const InstanceKlass* host_class = the_class->host_klass();
|
|
||||||
+ if (InstanceKlass::cast(the_class)->is_unsafe_anonymous()) {
|
|
||||||
+ const InstanceKlass* host_class = the_class->unsafe_anonymous_host();
|
|
||||||
|
|
||||||
// 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();
|
|
||||||
+ while (host_class != NULL && host_class->is_unsafe_anonymous()) {
|
|
||||||
+ host_class = host_class->unsafe_anonymous_host();
|
|
||||||
}
|
|
||||||
|
|
||||||
+ ClassLoadInfo cl_info(protection_domain,
|
|
||||||
+ host_class,
|
|
||||||
+ NULL, // dynamic_nest_host
|
|
||||||
+ NULL, // cp_patches
|
|
||||||
+ Handle(), // classData
|
|
||||||
+ false, // is_hidden
|
|
||||||
+ false, // is_strong_hidden
|
|
||||||
+ true); // FIXME: check if correct. can_access_vm_annotations
|
|
||||||
+
|
|
||||||
k = SystemDictionary::parse_stream(the_class_sym,
|
|
||||||
the_class_loader,
|
|
||||||
- protection_domain,
|
|
||||||
&st,
|
|
||||||
- host_class,
|
|
||||||
+ cl_info,
|
|
||||||
the_class,
|
|
||||||
- NULL,
|
|
||||||
THREAD);
|
|
||||||
+
|
|
||||||
k->class_loader_data()->exchange_holders(the_class->class_loader_data());
|
|
||||||
the_class->class_loader_data()->inc_keep_alive();
|
|
||||||
} else {
|
|
||||||
@@ -966,7 +985,7 @@ int VM_EnhancedRedefineClasses::calculate_redefinition_flags(InstanceKlass* new_
|
|
||||||
// Check interfaces
|
|
||||||
|
|
||||||
// Interfaces removed?
|
|
||||||
- Array<Klass*>* old_interfaces = the_class->transitive_interfaces();
|
|
||||||
+ Array<InstanceKlass*>* old_interfaces = the_class->transitive_interfaces();
|
|
||||||
for (i = 0; i < old_interfaces->length(); i++) {
|
|
||||||
InstanceKlass* old_interface = InstanceKlass::cast(old_interfaces->at(i));
|
|
||||||
if (!new_class->implements_interface_any_version(old_interface)) {
|
|
||||||
@@ -976,7 +995,7 @@ int VM_EnhancedRedefineClasses::calculate_redefinition_flags(InstanceKlass* new_
|
|
||||||
}
|
|
||||||
|
|
||||||
// Interfaces added?
|
|
||||||
- Array<Klass*>* new_interfaces = new_class->transitive_interfaces();
|
|
||||||
+ Array<InstanceKlass*>* new_interfaces = new_class->transitive_interfaces();
|
|
||||||
for (i = 0; i<new_interfaces->length(); i++) {
|
|
||||||
if (!the_class->implements_interface_any_version(new_interfaces->at(i))) {
|
|
||||||
result = result | Klass::ModifyClass;
|
|
||||||
@@ -1389,8 +1408,8 @@ void VM_EnhancedRedefineClasses::rollback() {
|
|
||||||
// Rewrite faster byte-codes back to their slower equivalent. Undoes rewriting happening in templateTable_xxx.cpp
|
|
||||||
// The reason is that once we zero cpool caches, we need to re-resolve all entries again. Faster bytecodes do not
|
|
||||||
// do that, they assume that cache entry is resolved already.
|
|
||||||
-void VM_EnhancedRedefineClasses::unpatch_bytecode(Method* method) {
|
|
||||||
- RawBytecodeStream bcs(method);
|
|
||||||
+void VM_EnhancedRedefineClasses::unpatch_bytecode(Method* method, TRAPS) {
|
|
||||||
+ RawBytecodeStream bcs(methodHandle(THREAD, method));
|
|
||||||
Bytecodes::Code code;
|
|
||||||
Bytecodes::Code java_code;
|
|
||||||
while (!bcs.is_last_bytecode()) {
|
|
||||||
@@ -1454,11 +1473,11 @@ void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
|
|
||||||
HandleMark hm(_thread);
|
|
||||||
InstanceKlass *ik = InstanceKlass::cast(k);
|
|
||||||
|
|
||||||
- constantPoolHandle other_cp = constantPoolHandle(ik->constants());
|
|
||||||
+ constantPoolHandle other_cp = constantPoolHandle(_thread, 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) {
|
|
||||||
- ik->set_host_klass(InstanceKlass::cast(ik->host_klass()->newest_version()));
|
|
||||||
+ if (ik->is_unsafe_anonymous() && ik->unsafe_anonymous_host()->new_version() != NULL) {
|
|
||||||
+ ik->set_unsafe_anonymous_host(InstanceKlass::cast(ik->unsafe_anonymous_host()->newest_version()));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update implementor if there is only one, in this case implementor() can reference old class
|
|
||||||
@@ -1492,7 +1511,18 @@ void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
|
|
||||||
|
|
||||||
// If bytecode rewriting is enabled, we also need to unpatch bytecode to force resolution of zeroed entries
|
|
||||||
if (RewriteBytecodes) {
|
|
||||||
- ik->methods_do(unpatch_bytecode);
|
|
||||||
+ ik->methods_do(unpatch_bytecode, _thread);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+u8 VM_EnhancedRedefineClasses::next_id() {
|
|
||||||
+ while (true) {
|
|
||||||
+ u8 id = _id_counter;
|
|
||||||
+ u8 next_id = id + 1;
|
|
||||||
+ u8 result = Atomic::cmpxchg(&_id_counter, id, next_id);
|
|
||||||
+ if (result == id) {
|
|
||||||
+ return next_id;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1512,31 +1542,8 @@ 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() {
|
|
||||||
+void VM_EnhancedRedefineClasses::update_jmethod_ids(TRAPS) {
|
|
||||||
for (int j = 0; j < _matching_methods_length; ++j) {
|
|
||||||
Method* old_method = _matching_old_methods[j];
|
|
||||||
jmethodID jmid = old_method->find_jmethod_id_or_null();
|
|
||||||
@@ -1547,10 +1554,10 @@ void VM_EnhancedRedefineClasses::update_jmethod_ids() {
|
|
||||||
|
|
||||||
if (jmid != NULL) {
|
|
||||||
// There is a jmethodID, change it to point to the new method
|
|
||||||
- methodHandle new_method_h(_matching_new_methods[j]);
|
|
||||||
+ methodHandle new_method_h(THREAD, _matching_new_methods[j]);
|
|
||||||
|
|
||||||
if (old_method->new_version() == NULL) {
|
|
||||||
- methodHandle old_method_h(_matching_old_methods[j]);
|
|
||||||
+ methodHandle old_method_h(THREAD, _matching_old_methods[j]);
|
|
||||||
jmethodID new_jmethod_id = Method::make_jmethod_id(old_method_h->method_holder()->class_loader_data(), old_method_h());
|
|
||||||
bool result = InstanceKlass::cast(old_method_h->method_holder())->update_jmethod_id(old_method_h(), new_jmethod_id);
|
|
||||||
} else {
|
|
||||||
@@ -1887,7 +1894,7 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
|
||||||
|
|
||||||
// track number of methods that are EMCP for add_previous_version() call below
|
|
||||||
check_methods_and_mark_as_obsolete();
|
|
||||||
- update_jmethod_ids();
|
|
||||||
+ update_jmethod_ids(THREAD);
|
|
||||||
|
|
||||||
_any_class_has_resolved_methods = the_class->has_resolved_methods() || _any_class_has_resolved_methods;
|
|
||||||
|
|
||||||
@@ -2119,12 +2126,12 @@ jvmtiError VM_EnhancedRedefineClasses::do_topological_class_sorting(TRAPS) {
|
|
||||||
|
|
||||||
Handle protection_domain(THREAD, klass->protection_domain());
|
|
||||||
|
|
||||||
+ ClassLoadInfo cl_info(protection_domain);
|
|
||||||
+
|
|
||||||
ClassFileParser parser(&st,
|
|
||||||
klass->name(),
|
|
||||||
klass->class_loader_data(),
|
|
||||||
- protection_domain,
|
|
||||||
- NULL, // host_klass
|
|
||||||
- NULL, // cp_patches
|
|
||||||
+ &cl_info,
|
|
||||||
ClassFileParser::INTERNAL, // publicity level
|
|
||||||
true,
|
|
||||||
THREAD);
|
|
||||||
@@ -2134,7 +2141,7 @@ jvmtiError VM_EnhancedRedefineClasses::do_topological_class_sorting(TRAPS) {
|
|
||||||
links.append(KlassPair(super_klass, klass));
|
|
||||||
}
|
|
||||||
|
|
||||||
- Array<Klass*>* local_interfaces = parser.local_interfaces();
|
|
||||||
+ Array<InstanceKlass*>* local_interfaces = parser.local_interfaces();
|
|
||||||
for (int j = 0; j < local_interfaces->length(); j++) {
|
|
||||||
Klass* iface = local_interfaces->at(j);
|
|
||||||
if (iface != NULL && _affected_klasses->contains(iface)) {
|
|
||||||
@@ -2157,7 +2164,7 @@ jvmtiError VM_EnhancedRedefineClasses::do_topological_class_sorting(TRAPS) {
|
|
||||||
links.append(KlassPair(super_klass, klass));
|
|
||||||
}
|
|
||||||
|
|
||||||
- Array<Klass*>* local_interfaces = klass->local_interfaces();
|
|
||||||
+ Array<InstanceKlass*>* local_interfaces = klass->local_interfaces();
|
|
||||||
for (int j = 0; j < local_interfaces->length(); j++) {
|
|
||||||
Klass* interfaceKlass = local_interfaces->at(j);
|
|
||||||
if (_affected_klasses->contains(interfaceKlass)) {
|
|
||||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
|
||||||
index 4c0412d343d..0066088b3b0 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
|
||||||
@@ -32,7 +32,7 @@
|
|
||||||
#include "memory/resourceArea.hpp"
|
|
||||||
#include "oops/objArrayKlass.hpp"
|
|
||||||
#include "oops/objArrayOop.hpp"
|
|
||||||
-#include "gc/shared/vmGCOperations.hpp"
|
|
||||||
+#include "gc/shared/gcVMOperations.hpp"
|
|
||||||
#include "../../../java.base/unix/native/include/jni_md.h"
|
|
||||||
|
|
||||||
//
|
|
||||||
@@ -59,6 +59,7 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
|
||||||
static int _deleted_methods_length;
|
|
||||||
static int _added_methods_length;
|
|
||||||
static Klass* _the_class_oop;
|
|
||||||
+ static u8 _id_counter;
|
|
||||||
|
|
||||||
// The instance fields are used to pass information from
|
|
||||||
// doit_prologue() to doit() and doit_epilogue().
|
|
||||||
@@ -91,6 +92,9 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
|
||||||
elapsedTimer _timer_heap_iterate;
|
|
||||||
elapsedTimer _timer_heap_full_gc;
|
|
||||||
|
|
||||||
+ // Redefinition id used by JFR
|
|
||||||
+ u8 _id;
|
|
||||||
+
|
|
||||||
// These routines are roughly in call order unless otherwise noted.
|
|
||||||
|
|
||||||
// Load and link new classes (either redefined or affected by redefinition - subclass, ...)
|
|
||||||
@@ -118,15 +122,14 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
|
||||||
static void mark_as_scavengable(nmethod* nm);
|
|
||||||
static void unregister_nmethod_g1(nmethod* nm);
|
|
||||||
static void register_nmethod_g1(nmethod* nm);
|
|
||||||
- static void unpatch_bytecode(Method* method);
|
|
||||||
- static void fix_invoke_method(Method* method);
|
|
||||||
+ static void unpatch_bytecode(Method* method, TRAPS);
|
|
||||||
|
|
||||||
// Figure out which new methods match old methods in name and signature,
|
|
||||||
// which methods have been added, and which are no longer present
|
|
||||||
void compute_added_deleted_matching_methods();
|
|
||||||
|
|
||||||
// Change jmethodIDs to point to the new methods
|
|
||||||
- void update_jmethod_ids();
|
|
||||||
+ void update_jmethod_ids(TRAPS);
|
|
||||||
|
|
||||||
// marking methods as old and/or obsolete
|
|
||||||
void check_methods_and_mark_as_obsolete();
|
|
||||||
@@ -141,6 +144,8 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
|
||||||
|
|
||||||
void flush_dependent_code(InstanceKlass* k_h, TRAPS);
|
|
||||||
|
|
||||||
+ u8 next_id();
|
|
||||||
+
|
|
||||||
static void check_class(InstanceKlass* k_oop, TRAPS);
|
|
||||||
|
|
||||||
static void dump_methods();
|
|
||||||
@@ -181,6 +186,7 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
|
||||||
|
|
||||||
bool allow_nested_vm_operations() const { return true; }
|
|
||||||
jvmtiError check_error() { return _res; }
|
|
||||||
+ u8 id() { return _id; }
|
|
||||||
|
|
||||||
// Modifiable test must be shared between IsModifiableClass query
|
|
||||||
// and redefine implementation
|
|
||||||
diff --git a/src/hotspot/share/prims/jvmtiEnv.cpp b/src/hotspot/share/prims/jvmtiEnv.cpp
|
|
||||||
index b6838ac034d..fba0f48abd7 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiEnv.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiEnv.cpp
|
|
||||||
@@ -456,20 +456,23 @@ JvmtiEnv::RetransformClasses(jint class_count, const jclass* classes) {
|
|
||||||
|
|
||||||
EventRetransformClasses event;
|
|
||||||
jvmtiError error;
|
|
||||||
+ u8 op_id;
|
|
||||||
|
|
||||||
if (AllowEnhancedClassRedefinition) {
|
|
||||||
MutexLocker sd_mutex(EnhancedRedefineClasses_lock);
|
|
||||||
VM_EnhancedRedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_retransform);
|
|
||||||
VMThread::execute(&op);
|
|
||||||
+ op_id = op.id();
|
|
||||||
error = (op.check_error());
|
|
||||||
} else {
|
|
||||||
VM_RedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_retransform);
|
|
||||||
VMThread::execute(&op);
|
|
||||||
+ op_id = op.id();
|
|
||||||
error = op.check_error();
|
|
||||||
}
|
|
||||||
if (error == JVMTI_ERROR_NONE) {
|
|
||||||
event.set_classCount(class_count);
|
|
||||||
- event.set_redefinitionId(op.id());
|
|
||||||
+ event.set_redefinitionId(op_id);
|
|
||||||
event.commit();
|
|
||||||
}
|
|
||||||
return error;
|
|
||||||
@@ -484,19 +487,23 @@ JvmtiEnv::RedefineClasses(jint class_count, const jvmtiClassDefinition* class_de
|
|
||||||
EventRedefineClasses event;
|
|
||||||
jvmtiError error;
|
|
||||||
|
|
||||||
+ u8 op_id;
|
|
||||||
+
|
|
||||||
if (AllowEnhancedClassRedefinition) {
|
|
||||||
MutexLocker sd_mutex(EnhancedRedefineClasses_lock);
|
|
||||||
VM_EnhancedRedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_redefine);
|
|
||||||
VMThread::execute(&op);
|
|
||||||
+ op_id = op.id();
|
|
||||||
error = (op.check_error());
|
|
||||||
} else {
|
|
||||||
VM_RedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_redefine);
|
|
||||||
VMThread::execute(&op);
|
|
||||||
+ op_id = op.id();
|
|
||||||
error = op.check_error();
|
|
||||||
}
|
|
||||||
if (error == JVMTI_ERROR_NONE) {
|
|
||||||
event.set_classCount(class_count);
|
|
||||||
- event.set_redefinitionId(op.id());
|
|
||||||
+ event.set_redefinitionId(op_id);
|
|
||||||
event.commit();
|
|
||||||
}
|
|
||||||
return error;
|
|
||||||
diff --git a/src/hotspot/share/prims/jvmtiRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiRedefineClasses.cpp
|
|
||||||
index a7840848e10..346eac7c431 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiRedefineClasses.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiRedefineClasses.cpp
|
|
||||||
@@ -1271,6 +1271,7 @@ jvmtiError VM_RedefineClasses::load_new_class_versions(TRAPS) {
|
|
||||||
the_class_loader,
|
|
||||||
&st,
|
|
||||||
cl_info,
|
|
||||||
+ NULL,
|
|
||||||
THREAD);
|
|
||||||
// Clear class_being_redefined just to be sure.
|
|
||||||
state->clear_class_being_redefined();
|
|
||||||
diff --git a/src/hotspot/share/prims/methodHandles.hpp b/src/hotspot/share/prims/methodHandles.hpp
|
|
||||||
index 54f36202a5f..917d31efd77 100644
|
|
||||||
--- a/src/hotspot/share/prims/methodHandles.hpp
|
|
||||||
+++ b/src/hotspot/share/prims/methodHandles.hpp
|
|
||||||
@@ -180,6 +180,9 @@ public:
|
|
||||||
assert(ref_kind_is_valid(ref_kind), "");
|
|
||||||
return (ref_kind & 1) != 0;
|
|
||||||
}
|
|
||||||
+ static bool ref_kind_is_static(int ref_kind) {
|
|
||||||
+ return !ref_kind_has_receiver(ref_kind) && (ref_kind != JVM_REF_newInvokeSpecial);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
static int ref_kind_to_flags(int ref_kind);
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
|
||||||
index d05a2893498..3a92b8869dc 100644
|
|
||||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
|
||||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
|
||||||
@@ -2128,13 +2128,15 @@ bool Arguments::check_gc_consistency() {
|
|
||||||
// of collectors.
|
|
||||||
uint i = 0;
|
|
||||||
if (UseSerialGC) i++;
|
|
||||||
- if (UseConcMarkSweepGC) i++;
|
|
||||||
- if (UseParallelGC || UseParallelOldGC) i++;
|
|
||||||
+ if (UseParallelGC) i++;
|
|
||||||
if (UseG1GC) i++;
|
|
||||||
+ if (UseEpsilonGC) i++;
|
|
||||||
+ if (UseZGC) i++;
|
|
||||||
+ if (UseShenandoahGC) i++;
|
|
||||||
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 && !UseG1GC) && i >= 1) {
|
|
||||||
+ if (!UseSerialGC && !UseG1GC && i >= 1) {
|
|
||||||
jio_fprintf(defaultStream::error_stream(),
|
|
||||||
"Must use the Serial or G1 GC with enhanced class redefinition.\n");
|
|
||||||
return false;
|
|
||||||
@@ -4494,18 +4496,18 @@ void Arguments::setup_hotswap_agent() {
|
|
||||||
|
|
||||||
// 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++);
|
|
||||||
+ create_numbered_module_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++);
|
|
||||||
+ create_numbered_module_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++);
|
|
||||||
+ create_numbered_module_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++);
|
|
||||||
+ create_numbered_module_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++);
|
|
||||||
+ create_numbered_module_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++);
|
|
||||||
+ create_numbered_module_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++);
|
|
||||||
+ create_numbered_module_property("jdk.module.addopens", "java.desktop/com.sun.beans.util=ALL-UNNAMED", addopens_count++);
|
|
||||||
|
|
||||||
}
|
|
||||||
diff --git a/src/hotspot/share/runtime/mutexLocker.cpp b/src/hotspot/share/runtime/mutexLocker.cpp
|
|
||||||
index 6f982072909..14a3ed730fe 100644
|
|
||||||
--- a/src/hotspot/share/runtime/mutexLocker.cpp
|
|
||||||
+++ b/src/hotspot/share/runtime/mutexLocker.cpp
|
|
||||||
@@ -287,7 +287,7 @@ void mutex_init() {
|
|
||||||
def(InitCompleted_lock , PaddedMonitor, leaf, true, _safepoint_check_never);
|
|
||||||
def(VtableStubs_lock , PaddedMutex , nonleaf, true, _safepoint_check_never);
|
|
||||||
def(Notify_lock , PaddedMonitor, nonleaf, true, _safepoint_check_always);
|
|
||||||
- def(EnhancedRedefineClasses_lock , PaddedMutex , nonleaf+7, false, Monitor::_safepoint_check_always); // for ensuring that class redefinition is not done in parallel
|
|
||||||
+ def(EnhancedRedefineClasses_lock , PaddedMutex , nonleaf+7, false, _safepoint_check_always); // for ensuring that class redefinition is not done in parallel
|
|
||||||
def(JNICritical_lock , PaddedMonitor, nonleaf, true, _safepoint_check_always); // used for JNI critical regions
|
|
||||||
def(AdapterHandlerLibrary_lock , PaddedMutex , nonleaf, true, _safepoint_check_always);
|
|
||||||
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
From 336cab4f72c6e642e3077ea8d1a4860de33f5a4d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Tue, 17 Nov 2020 17:40:24 +0100
|
|
||||||
Subject: [PATCH 20/34] dcevm15 - G1 fixes
|
|
||||||
|
|
||||||
---
|
|
||||||
src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp b/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp
|
|
||||||
index 2f06b9617e4..476728a5d26 100644
|
|
||||||
--- a/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp
|
|
||||||
+++ b/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp
|
|
||||||
@@ -240,7 +240,7 @@ void G1FullGCPrepareTask::prepare_serial_compaction_dcevm() {
|
|
||||||
|
|
||||||
// collect remaining, not forwarded rescued oops using serial compact point
|
|
||||||
while (cp->last_rescued_oop() < cp->rescued_oops()->length()) {
|
|
||||||
- HeapRegion* hr = G1CollectedHeap::heap()->new_region(HeapRegion::GrainBytes / HeapWordSize, false, true);
|
|
||||||
+ HeapRegion* hr = G1CollectedHeap::heap()->new_region(HeapRegion::GrainBytes / HeapWordSize, HeapRegionType::Eden, true, G1NUMA::AnyNodeIndex);
|
|
||||||
if (hr == NULL) {
|
|
||||||
vm_exit_out_of_memory(0, OOM_MMAP_ERROR, "G1 - not enough of free regions after redefinition.");
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,133 +0,0 @@
|
|||||||
From cea4e2cca3c37233c728be7235f8f9d8be136cb5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Tue, 17 Nov 2020 18:52:57 +0100
|
|
||||||
Subject: [PATCH 21/34] dcevm15 - Fix flush dependent code
|
|
||||||
|
|
||||||
---
|
|
||||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 57 +++++++------------
|
|
||||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 4 +-
|
|
||||||
2 files changed, 25 insertions(+), 36 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
index 619e3988e3a..efaf11e1666 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
@@ -508,7 +508,7 @@ 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) {
|
|
||||||
- flush_dependent_code(NULL, thread);
|
|
||||||
+ flush_dependent_code(thread);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Adjust constantpool caches for all classes that reference methods of the evolved class.
|
|
||||||
@@ -647,17 +647,8 @@ void VM_EnhancedRedefineClasses::doit() {
|
|
||||||
//MethodDataCleaner clean_weak_method_links;
|
|
||||||
//ClassLoaderDataGraph::classes_do(&clean_weak_method_links);
|
|
||||||
|
|
||||||
- // Disable any dependent concurrent compilations
|
|
||||||
- // SystemDictionary::notice_modification();
|
|
||||||
-
|
|
||||||
JvmtiExport::increment_redefinition_count();
|
|
||||||
|
|
||||||
- // Set flag indicating that some invariants are no longer true.
|
|
||||||
- // See jvmtiExport.hpp for detailed explanation.
|
|
||||||
-
|
|
||||||
- // dcevm15: handled by _redefinition_count
|
|
||||||
- // JvmtiExport::set_has_redefined_a_class();
|
|
||||||
-
|
|
||||||
#ifdef PRODUCT
|
|
||||||
if (log_is_enabled(Trace, redefine, class, obsolete, metadata)) {
|
|
||||||
#endif
|
|
||||||
@@ -1746,6 +1737,18 @@ void VM_EnhancedRedefineClasses::transfer_old_native_function_registrations(Inst
|
|
||||||
transfer.transfer_registrations(_matching_old_methods, _matching_methods_length);
|
|
||||||
}
|
|
||||||
|
|
||||||
+// First step is to walk the code cache for each class redefined and mark
|
|
||||||
+// dependent methods. Wait until all classes are processed to deoptimize everything.
|
|
||||||
+void VM_EnhancedRedefineClasses::mark_dependent_code(InstanceKlass* ik) {
|
|
||||||
+ assert_locked_or_safepoint(Compile_lock);
|
|
||||||
+
|
|
||||||
+ // All dependencies have been recorded from startup or this is a second or
|
|
||||||
+ // subsequent use of RedefineClasses
|
|
||||||
+ if (0 && JvmtiExport::all_dependencies_are_recorded()) {
|
|
||||||
+ CodeCache::mark_for_evol_deoptimization(ik);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
// DCEVM - it always deoptimizes everything! (because it is very difficult to find only correct dependencies)
|
|
||||||
// Deoptimize all compiled code that depends on this class.
|
|
||||||
//
|
|
||||||
@@ -1762,33 +1765,21 @@ void VM_EnhancedRedefineClasses::transfer_old_native_function_registrations(Inst
|
|
||||||
// subsequent calls to RedefineClasses need only throw away code
|
|
||||||
// that depends on the class.
|
|
||||||
//
|
|
||||||
-void VM_EnhancedRedefineClasses::flush_dependent_code(InstanceKlass* k_h, TRAPS) {
|
|
||||||
+void VM_EnhancedRedefineClasses::flush_dependent_code(TRAPS) {
|
|
||||||
assert_locked_or_safepoint(Compile_lock);
|
|
||||||
|
|
||||||
// All dependencies have been recorded from startup or this is a second or
|
|
||||||
// subsequent use of RedefineClasses
|
|
||||||
// FIXME: for now, deoptimize all!
|
|
||||||
- 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();
|
|
||||||
+ if (0 && JvmtiExport::all_dependencies_are_recorded()) {
|
|
||||||
+ int deopt = CodeCache::mark_dependents_for_evol_deoptimization();
|
|
||||||
+ log_debug(redefine, class, nmethod)("Marked %d dependent nmethods for deopt", deopt);
|
|
||||||
+ if (deopt != 0) {
|
|
||||||
+ CodeCache::flush_evol_dependents();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
- CodeCache::mark_all_nmethods_for_deoptimization();
|
|
||||||
-
|
|
||||||
- ResourceMark rm(THREAD);
|
|
||||||
- DeoptimizationMarker dm;
|
|
||||||
-
|
|
||||||
- // Deoptimize all activations depending on marked nmethods
|
|
||||||
- Deoptimization::deoptimize_dependents();
|
|
||||||
-
|
|
||||||
- // Make the dependent methods not entrant
|
|
||||||
- CodeCache::make_marked_nmethods_not_entrant();
|
|
||||||
-
|
|
||||||
- // From now on we know that the dependency information is complete
|
|
||||||
+ CodeCache::mark_all_nmethods_for_evol_deoptimization();
|
|
||||||
+ CodeCache::flush_evol_dependents();
|
|
||||||
JvmtiExport::set_all_dependencies_are_recorded(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1881,11 +1872,7 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
|
||||||
JvmtiBreakpoints& jvmti_breakpoints = JvmtiCurrentBreakpoints::get_jvmti_breakpoints();
|
|
||||||
jvmti_breakpoints.clearall_in_class_at_safepoint(the_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);
|
|
||||||
-// }
|
|
||||||
+ mark_dependent_code(the_class);
|
|
||||||
|
|
||||||
_old_methods = the_class->methods();
|
|
||||||
_new_methods = new_class->methods();
|
|
||||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
|
||||||
index 0066088b3b0..bd5e7d153be 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
|
||||||
@@ -142,7 +142,9 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
|
||||||
// and in all direct and indirect subclasses.
|
|
||||||
void increment_class_counter(InstanceKlass *ik, TRAPS);
|
|
||||||
|
|
||||||
- void flush_dependent_code(InstanceKlass* k_h, TRAPS);
|
|
||||||
+ void mark_dependent_code(InstanceKlass* ik);
|
|
||||||
+
|
|
||||||
+ void flush_dependent_code(TRAPS);
|
|
||||||
|
|
||||||
u8 next_id();
|
|
||||||
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,211 +0,0 @@
|
|||||||
From 4f88dcec830d39452f69d1117729469fdb768a8f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Sun, 22 Nov 2020 12:05:26 +0100
|
|
||||||
Subject: [PATCH 22/34] dcevm15 - fix ResolvedMethodTable
|
|
||||||
|
|
||||||
---
|
|
||||||
src/hotspot/share/classfile/javaClasses.cpp | 5 -
|
|
||||||
src/hotspot/share/classfile/javaClasses.hpp | 1 -
|
|
||||||
.../share/prims/resolvedMethodTable.cpp | 139 +++++++++++-------
|
|
||||||
3 files changed, 84 insertions(+), 61 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/classfile/javaClasses.cpp b/src/hotspot/share/classfile/javaClasses.cpp
|
|
||||||
index 9b086a241f7..9a627786d0f 100644
|
|
||||||
--- a/src/hotspot/share/classfile/javaClasses.cpp
|
|
||||||
+++ b/src/hotspot/share/classfile/javaClasses.cpp
|
|
||||||
@@ -3996,11 +3996,6 @@ void java_lang_invoke_ResolvedMethodName::set_vmholder(oop resolved_method, oop
|
|
||||||
resolved_method->obj_field_put(_vmholder_offset, holder);
|
|
||||||
}
|
|
||||||
|
|
||||||
-void java_lang_invoke_ResolvedMethodName::set_vmholder_offset(oop resolved_method, Method* m) {
|
|
||||||
- assert(is_instance(resolved_method), "wrong type");
|
|
||||||
- resolved_method->obj_field_put(_vmholder_offset, m->method_holder()->java_mirror());
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
oop java_lang_invoke_ResolvedMethodName::find_resolved_method(const methodHandle& m, TRAPS) {
|
|
||||||
const Method* method = m();
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/classfile/javaClasses.hpp b/src/hotspot/share/classfile/javaClasses.hpp
|
|
||||||
index 9abf2e1d105..8f5993b7225 100644
|
|
||||||
--- a/src/hotspot/share/classfile/javaClasses.hpp
|
|
||||||
+++ b/src/hotspot/share/classfile/javaClasses.hpp
|
|
||||||
@@ -1107,7 +1107,6 @@ class java_lang_invoke_ResolvedMethodName : AllStatic {
|
|
||||||
|
|
||||||
static Method* vmtarget(oop resolved_method);
|
|
||||||
static void set_vmtarget(oop resolved_method, Method* method);
|
|
||||||
- static void set_vmholder_offset(oop resolved_method, Method* method);
|
|
||||||
|
|
||||||
static void set_vmholder(oop resolved_method, oop holder);
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/prims/resolvedMethodTable.cpp b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
|
||||||
index eb9fcda44f3..d0f1667b967 100644
|
|
||||||
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
|
||||||
@@ -375,6 +375,67 @@ public:
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
+class AdjustMethodEntriesDcevm : public StackObj {
|
|
||||||
+ bool* _trace_name_printed;
|
|
||||||
+ GrowableArray<oop>* _oops_to_add;
|
|
||||||
+public:
|
|
||||||
+ AdjustMethodEntriesDcevm(GrowableArray<oop>* oops_to_add, bool* trace_name_printed) : _trace_name_printed(trace_name_printed), _oops_to_add(oops_to_add) {};
|
|
||||||
+ bool operator()(WeakHandle<vm_resolved_method_table_data>* entry) {
|
|
||||||
+ oop mem_name = entry->peek();
|
|
||||||
+ if (mem_name == NULL) {
|
|
||||||
+ // Removed
|
|
||||||
+ return true;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ Method* old_method = (Method*)java_lang_invoke_ResolvedMethodName::vmtarget(mem_name);
|
|
||||||
+
|
|
||||||
+ 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()) {
|
|
||||||
+ newer_method = Universe::throw_no_such_method_error();
|
|
||||||
+ } else {
|
|
||||||
+ newer_method = newer_klass->method_with_idnum(old_method->orig_method_idnum());
|
|
||||||
+
|
|
||||||
+ log_debug(redefine, class, update)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
|
|
||||||
+
|
|
||||||
+ assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
|
|
||||||
+ assert(newer_method != NULL, "method_with_idnum() should not be NULL");
|
|
||||||
+ assert(old_method != newer_method, "sanity check");
|
|
||||||
+
|
|
||||||
+ Thread* thread = Thread::current();
|
|
||||||
+ ResolvedMethodTableLookup lookup(thread, method_hash(newer_method), newer_method);
|
|
||||||
+ ResolvedMethodGet rmg(thread, newer_method);
|
|
||||||
+
|
|
||||||
+ if (_local_table->get(thread, lookup, rmg)) {
|
|
||||||
+ // old method was already adjusted if new method exists in _the_table
|
|
||||||
+ return true;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ java_lang_invoke_ResolvedMethodName::set_vmtarget(mem_name, newer_method);
|
|
||||||
+ java_lang_invoke_ResolvedMethodName::set_vmholder(mem_name, newer_method->method_holder()->java_mirror());
|
|
||||||
+
|
|
||||||
+ newer_klass->set_has_resolved_methods();
|
|
||||||
+ _oops_to_add->append(mem_name);
|
|
||||||
+
|
|
||||||
+ ResourceMark rm;
|
|
||||||
+ if (!(*_trace_name_printed)) {
|
|
||||||
+ log_debug(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)",
|
|
||||||
+ newer_method->name()->as_C_string(), newer_method->signature()->as_C_string());
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return true;
|
|
||||||
+ }
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
// 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");
|
|
||||||
@@ -382,73 +443,41 @@ void ResolvedMethodTable::adjust_method_entries(bool * trace_name_printed) {
|
|
||||||
AdjustMethodEntries adjust(trace_name_printed);
|
|
||||||
_local_table->do_safepoint_scan(adjust);
|
|
||||||
}
|
|
||||||
-#endif // INCLUDE_JVMTI
|
|
||||||
|
|
||||||
-// (DCEVM) It is called at safepoint only for RedefineClasses
|
|
||||||
+// 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>();
|
|
||||||
-
|
|
||||||
- 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()) {
|
|
||||||
-
|
|
||||||
- InstanceKlass* newer_klass = InstanceKlass::cast(old_method->method_holder()->new_version());
|
|
||||||
- Method* newer_method;
|
|
||||||
-
|
|
||||||
- // Method* new_method;
|
|
||||||
- if (old_method->is_deleted()) {
|
|
||||||
- newer_method = Universe::throw_no_such_method_error();
|
|
||||||
- } else {
|
|
||||||
- newer_method = newer_klass->method_with_idnum(old_method->orig_method_idnum());
|
|
||||||
-
|
|
||||||
- log_debug(redefine, class, update)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
|
|
||||||
-
|
|
||||||
- assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
|
|
||||||
- assert(newer_method != NULL, "method_with_idnum() should not be NULL");
|
|
||||||
- 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;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ GrowableArray<oop> oops_to_add(0);
|
|
||||||
+ AdjustMethodEntriesDcevm adjust(&oops_to_add, trace_name_printed);
|
|
||||||
+ _local_table->do_safepoint_scan(adjust);
|
|
||||||
+ Thread* thread = Thread::current();
|
|
||||||
+ for (int i = 0; i < oops_to_add.length(); i++) {
|
|
||||||
+ oop mem_name = oops_to_add.at(i);
|
|
||||||
+ Method* method = (Method*)java_lang_invoke_ResolvedMethodName::vmtarget(mem_name);
|
|
||||||
|
|
||||||
- java_lang_invoke_ResolvedMethodName::set_vmtarget(mem_name, newer_method);
|
|
||||||
- java_lang_invoke_ResolvedMethodName::set_vmholder_offset(mem_name, newer_method);
|
|
||||||
+ // The hash table takes ownership of the WeakHandle, even if it's not inserted.
|
|
||||||
|
|
||||||
- newer_klass->set_has_resolved_methods();
|
|
||||||
- oops_to_add->append(mem_name);
|
|
||||||
+ ResolvedMethodTableLookup lookup(thread, method_hash(method), method);
|
|
||||||
+ ResolvedMethodGet rmg(thread, method);
|
|
||||||
|
|
||||||
- ResourceMark rm;
|
|
||||||
- if (!(*trace_name_printed)) {
|
|
||||||
- log_debug(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)",
|
|
||||||
- newer_method->name()->as_C_string(), newer_method->signature()->as_C_string());
|
|
||||||
+ while (true) {
|
|
||||||
+ if (_local_table->get(thread, lookup, rmg)) {
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ WeakHandle<vm_resolved_method_table_data> wh = WeakHandle<vm_resolved_method_table_data>::create(Handle(thread, mem_name));
|
|
||||||
+ // The hash table takes ownership of the WeakHandle, even if it's not inserted.
|
|
||||||
+ if (_local_table->insert(thread, lookup, wh)) {
|
|
||||||
+ log_insert(method);
|
|
||||||
+ wh.resolve();
|
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
- }
|
|
||||||
- for (int i = 0; i < oops_to_add->length(); i++) {
|
|
||||||
- oop mem_name = oops_to_add->at(i);
|
|
||||||
- Method* method = (Method*)java_lang_invoke_ResolvedMethodName::vmtarget(mem_name);
|
|
||||||
- _the_table->basic_add(method, Handle(Thread::current(), mem_name));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+#endif // INCLUDE_JVMTI
|
|
||||||
+
|
|
||||||
// Verification
|
|
||||||
class VerifyResolvedMethod : StackObj {
|
|
||||||
public:
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
From 5379e56465d3d3930ec7ea91b1c64db2cdf70170 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Sun, 22 Nov 2020 12:05:50 +0100
|
|
||||||
Subject: [PATCH 23/34] dcevm15 - fix Universe::root_oops_do
|
|
||||||
|
|
||||||
---
|
|
||||||
src/hotspot/share/memory/universe.cpp | 38 +++++++++------------------
|
|
||||||
1 file changed, 12 insertions(+), 26 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/memory/universe.cpp b/src/hotspot/share/memory/universe.cpp
|
|
||||||
index f6e4253b5a5..8dad437bd51 100644
|
|
||||||
--- a/src/hotspot/share/memory/universe.cpp
|
|
||||||
+++ b/src/hotspot/share/memory/universe.cpp
|
|
||||||
@@ -39,6 +39,7 @@
|
|
||||||
#include "gc/shared/gcConfig.hpp"
|
|
||||||
#include "gc/shared/gcLogPrecious.hpp"
|
|
||||||
#include "gc/shared/gcTraceTime.inline.hpp"
|
|
||||||
+#include "gc/shared/weakProcessor.hpp"
|
|
||||||
#include "interpreter/interpreter.hpp"
|
|
||||||
#include "logging/log.hpp"
|
|
||||||
#include "logging/logStream.hpp"
|
|
||||||
@@ -75,6 +76,7 @@
|
|
||||||
#include "runtime/thread.inline.hpp"
|
|
||||||
#include "runtime/timerTrace.hpp"
|
|
||||||
#include "runtime/vmOperations.hpp"
|
|
||||||
+#include "services/management.hpp"
|
|
||||||
#include "services/memoryService.hpp"
|
|
||||||
#include "utilities/align.hpp"
|
|
||||||
#include "utilities/copy.hpp"
|
|
||||||
@@ -180,45 +182,29 @@ void Universe::basic_type_classes_do(KlassClosure *closure) {
|
|
||||||
|
|
||||||
// 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 {
|
|
||||||
- public:
|
|
||||||
- void do_object(oop p) { ShouldNotReachHere(); }
|
|
||||||
- bool do_object_b(oop p) { return true; }
|
|
||||||
- };
|
|
||||||
- AlwaysTrueClosure always_true;
|
|
||||||
-
|
|
||||||
Universe::oops_do(oopClosure);
|
|
||||||
// ReferenceProcessor::oops_do(oopClosure); (tw) check why no longer there
|
|
||||||
JNIHandles::oops_do(oopClosure); // Global (strong) JNI handles
|
|
||||||
Threads::oops_do(oopClosure, NULL);
|
|
||||||
ObjectSynchronizer::oops_do(oopClosure);
|
|
||||||
- // TODO: review, flat profiler was removed in j10
|
|
||||||
- // FlatProfiler::oops_do(oopClosure);
|
|
||||||
- JvmtiExport::oops_do(oopClosure);
|
|
||||||
+ // (DCEVM) TODO: Check if this is correct?
|
|
||||||
+ Management::oops_do(oopClosure);
|
|
||||||
+ OopStorageSet::vm_global()->oops_do(oopClosure);
|
|
||||||
+ CLDToOopClosure cld_closure(oopClosure, ClassLoaderData::_claim_none);
|
|
||||||
+ ClassLoaderDataGraph::cld_do(&cld_closure);
|
|
||||||
|
|
||||||
// Now adjust pointers in remaining weak roots. (All of which should
|
|
||||||
// have been cleared if they pointed to non-surviving objects.)
|
|
||||||
// Global (weak) JNI handles
|
|
||||||
- JNIHandles::weak_oops_do(&always_true, oopClosure);
|
|
||||||
+ WeakProcessor::oops_do(oopClosure);
|
|
||||||
|
|
||||||
CodeBlobToOopClosure blobClosure(oopClosure, CodeBlobToOopClosure::FixRelocations);
|
|
||||||
CodeCache::blobs_do(&blobClosure);
|
|
||||||
- StringTable::oops_do(oopClosure);
|
|
||||||
+ AOT_ONLY(AOTLoader::oops_do(oopClosure);)
|
|
||||||
+ // StringTable::oops_do was removed in j15
|
|
||||||
+ // StringTable::oops_do(oopClosure);
|
|
||||||
|
|
||||||
- // (DCEVM) TODO: Check if this is correct?
|
|
||||||
- //CodeCache::scavenge_root_nmethods_oops_do(oopClosure);
|
|
||||||
- //Management::oops_do(oopClosure);
|
|
||||||
- //ref_processor()->weak_oops_do(&oopClosure);
|
|
||||||
- //PSScavenge::reference_processor()->weak_oops_do(&oopClosure);
|
|
||||||
-
|
|
||||||
-#if INCLUDE_AOT
|
|
||||||
- if (UseAOT) {
|
|
||||||
- AOTLoader::oops_do(oopClosure);
|
|
||||||
- }
|
|
||||||
-#endif
|
|
||||||
- // SO_AllClasses
|
|
||||||
- SystemDictionary::oops_do(oopClosure);
|
|
||||||
+ // PSScavenge::reference_processor()->weak_oops_do(oopClosure);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Universe::oops_do(OopClosure* f) {
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
From c6ea68e66d37d70739f7b0ee74131322b4526a68 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Sun, 22 Nov 2020 12:03:32 +0100
|
|
||||||
Subject: [PATCH 24/34] Cleanup dcevm comments
|
|
||||||
|
|
||||||
---
|
|
||||||
src/hotspot/share/classfile/classLoaderDataGraph.hpp | 2 +-
|
|
||||||
src/hotspot/share/classfile/systemDictionary.hpp | 2 +-
|
|
||||||
src/hotspot/share/gc/shared/gcConfig.cpp | 2 +-
|
|
||||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp | 2 +-
|
|
||||||
4 files changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/classfile/classLoaderDataGraph.hpp b/src/hotspot/share/classfile/classLoaderDataGraph.hpp
|
|
||||||
index f380aa3fa34..8ce94cccb47 100644
|
|
||||||
--- a/src/hotspot/share/classfile/classLoaderDataGraph.hpp
|
|
||||||
+++ b/src/hotspot/share/classfile/classLoaderDataGraph.hpp
|
|
||||||
@@ -104,7 +104,7 @@ class ClassLoaderDataGraph : public AllStatic {
|
|
||||||
|
|
||||||
static void dictionary_classes_do(KlassClosure* klass_closure);
|
|
||||||
|
|
||||||
- // Enhanced class redefinition
|
|
||||||
+ // (DCEVM) Enhanced class redefinition
|
|
||||||
static void rollback_redefinition();
|
|
||||||
|
|
||||||
// VM_CounterDecay iteration support
|
|
||||||
diff --git a/src/hotspot/share/classfile/systemDictionary.hpp b/src/hotspot/share/classfile/systemDictionary.hpp
|
|
||||||
index 931e655d631..1019dbd0d04 100644
|
|
||||||
--- a/src/hotspot/share/classfile/systemDictionary.hpp
|
|
||||||
+++ b/src/hotspot/share/classfile/systemDictionary.hpp
|
|
||||||
@@ -455,7 +455,7 @@ public:
|
|
||||||
static bool is_well_known_klass(Symbol* class_name);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
- // Enhanced class redefinition
|
|
||||||
+ // (DCEVM) Enhanced class redefinition
|
|
||||||
static void remove_from_hierarchy(InstanceKlass* k);
|
|
||||||
static void update_constraints_after_redefinition();
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/gc/shared/gcConfig.cpp b/src/hotspot/share/gc/shared/gcConfig.cpp
|
|
||||||
index 5c1a09390f1..23fbf715378 100644
|
|
||||||
--- a/src/hotspot/share/gc/shared/gcConfig.cpp
|
|
||||||
+++ b/src/hotspot/share/gc/shared/gcConfig.cpp
|
|
||||||
@@ -99,7 +99,7 @@ void GCConfig::fail_if_non_included_gc_is_selected() {
|
|
||||||
|
|
||||||
void GCConfig::select_gc_ergonomically() {
|
|
||||||
if (AllowEnhancedClassRedefinition && !UseG1GC) {
|
|
||||||
- // Enhanced class redefinition only supports serial GC at the moment
|
|
||||||
+ // (DCEVM) Enhanced class redefinition only supports serial GC at the moment
|
|
||||||
FLAG_SET_ERGO(UseSerialGC, true);
|
|
||||||
} else if (os::is_server_class_machine()) {
|
|
||||||
#if INCLUDE_G1GC
|
|
||||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
|
||||||
index bd5e7d153be..5de375fb888 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
|
||||||
@@ -78,7 +78,7 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
|
||||||
// have any entries.
|
|
||||||
bool _any_class_has_resolved_methods;
|
|
||||||
|
|
||||||
- // Enhanced class redefinition, affected klasses contain all classes which should be redefined
|
|
||||||
+ // (DCEVM) Enhanced class redefinition, affected klasses contain all classes which should be redefined
|
|
||||||
// either because of redefine, class hierarchy or interface change
|
|
||||||
GrowableArray<Klass*>* _affected_klasses;
|
|
||||||
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
From 507d97966c7145d0ae2533459cc504c7b0d6d5b6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Sun, 22 Nov 2020 18:49:05 +0100
|
|
||||||
Subject: [PATCH 25/34] Fix cpCache in not AllowEnhancedClassRedefinition mode
|
|
||||||
|
|
||||||
---
|
|
||||||
src/hotspot/share/oops/cpCache.hpp | 8 +++++---
|
|
||||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/oops/cpCache.hpp b/src/hotspot/share/oops/cpCache.hpp
|
|
||||||
index 121a13b1dda..64dcf6223f5 100644
|
|
||||||
--- a/src/hotspot/share/oops/cpCache.hpp
|
|
||||||
+++ b/src/hotspot/share/oops/cpCache.hpp
|
|
||||||
@@ -148,13 +148,13 @@ class ConstantPoolCacheEntry {
|
|
||||||
void set_bytecode_2(Bytecodes::Code code);
|
|
||||||
void set_f1(Metadata* f1) {
|
|
||||||
Metadata* existing_f1 = _f1; // read once
|
|
||||||
- //assert(existing_f1 == NULL || existing_f1 == f1, "illegal field change");
|
|
||||||
+ assert(AllowEnhancedClassRedefinition || existing_f1 == NULL || existing_f1 == f1, "illegal field change");
|
|
||||||
_f1 = f1;
|
|
||||||
}
|
|
||||||
void release_set_f1(Metadata* f1);
|
|
||||||
void set_f2(intx f2) {
|
|
||||||
intx existing_f2 = _f2; // read once
|
|
||||||
- //assert(existing_f2 == 0 || existing_f2 == f2, "illegal field change");
|
|
||||||
+ assert(AllowEnhancedClassRedefinition || existing_f2 == 0 || existing_f2 == f2, "illegal field change");
|
|
||||||
_f2 = f2;
|
|
||||||
}
|
|
||||||
void set_f2_as_vfinal_method(Method* f2) {
|
|
||||||
@@ -215,7 +215,9 @@ class ConstantPoolCacheEntry {
|
|
||||||
void initialize_resolved_reference_index(int ref_index) {
|
|
||||||
assert(_f2 == 0, "set once"); // note: ref_index might be zero also
|
|
||||||
_f2 = ref_index;
|
|
||||||
- _flags = 1 << is_resolved_ref_shift;
|
|
||||||
+ if (AllowEnhancedClassRedefinition) {
|
|
||||||
+ _flags = 1 << is_resolved_ref_shift;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_field( // sets entry to resolved field state
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
From b516b615c20fafa2094dfb9f4cb08245b26418d0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Sun, 22 Nov 2020 19:51:46 +0100
|
|
||||||
Subject: [PATCH 26/34] dcevm15 - add ClassLoaderDataGraph_lock on
|
|
||||||
ClassLoaderDataGraph::classes_do
|
|
||||||
|
|
||||||
ClassLoaderDataGraph::classes_do need safepoint or lock,
|
|
||||||
find_sorted_affected_classes is not in safepoint therefore it must be
|
|
||||||
locked
|
|
||||||
---
|
|
||||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 5 ++++-
|
|
||||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
index efaf11e1666..197e1c0029f 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
@@ -2063,7 +2063,10 @@ jvmtiError VM_EnhancedRedefineClasses::find_sorted_affected_classes(TRAPS) {
|
|
||||||
AffectedKlassClosure closure(_affected_klasses);
|
|
||||||
// Updated in j10, from original SystemDictionary::classes_do
|
|
||||||
|
|
||||||
- ClassLoaderDataGraph::classes_do(&closure);
|
|
||||||
+ {
|
|
||||||
+ MutexLocker mcld(ClassLoaderDataGraph_lock);
|
|
||||||
+ ClassLoaderDataGraph::classes_do(&closure);
|
|
||||||
+ }
|
|
||||||
//ClassLoaderDataGraph::dictionary_classes_do(&closure);
|
|
||||||
|
|
||||||
log_trace(redefine, class, load)("%d classes affected", _affected_klasses->length());
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
From c6498946006879314bdc6218ee72da5d9c88f237 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Sat, 28 Nov 2020 19:29:42 +0100
|
|
||||||
Subject: [PATCH 27/34] dcevm15 - check if has_nestmate_access_to has newest
|
|
||||||
host class
|
|
||||||
|
|
||||||
---
|
|
||||||
src/hotspot/share/oops/instanceKlass.cpp | 5 +++++
|
|
||||||
1 file changed, 5 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
|
||||||
index 5e40d78a87e..1d9623f2446 100644
|
|
||||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
|
||||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
|
||||||
@@ -445,6 +445,11 @@ bool InstanceKlass::has_nestmate_access_to(InstanceKlass* k, TRAPS) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (AllowEnhancedClassRedefinition) {
|
|
||||||
+ // TODO: (DCEVM) check if it correct. It fix problems with lambdas (hidden)
|
|
||||||
+ cur_host = InstanceKlass::cast(cur_host->newest_version());
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
Klass* k_nest_host = k->nest_host(CHECK_false);
|
|
||||||
if (k_nest_host == NULL) {
|
|
||||||
return false;
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
From 86c27155386c1c40642c99c63a242d1f5d8601a5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Sat, 28 Nov 2020 19:31:08 +0100
|
|
||||||
Subject: [PATCH 28/34] Remove unused fieldType
|
|
||||||
|
|
||||||
---
|
|
||||||
src/hotspot/share/classfile/vmSymbols.hpp | 1 -
|
|
||||||
1 file changed, 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/classfile/vmSymbols.hpp b/src/hotspot/share/classfile/vmSymbols.hpp
|
|
||||||
index 6a3b234b222..eb06684a288 100644
|
|
||||||
--- a/src/hotspot/share/classfile/vmSymbols.hpp
|
|
||||||
+++ b/src/hotspot/share/classfile/vmSymbols.hpp
|
|
||||||
@@ -465,7 +465,6 @@
|
|
||||||
template(static_offset_name, "staticOffset") \
|
|
||||||
template(static_base_name, "staticBase") \
|
|
||||||
template(field_offset_name, "fieldOffset") \
|
|
||||||
- template(field_type_name, "fieldType") \
|
|
||||||
\
|
|
||||||
/* name symbols needed by intrinsics */ \
|
|
||||||
\
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
From 025d0d2903963fb79f83cf0d90418783d3ef6813 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Sun, 29 Nov 2020 17:18:16 +0100
|
|
||||||
Subject: [PATCH 29/34] mark_as_scavengable only alive methods
|
|
||||||
|
|
||||||
---
|
|
||||||
.../share/prims/jvmtiEnhancedRedefineClasses.cpp | 14 ++++++++------
|
|
||||||
1 file changed, 8 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
index 197e1c0029f..e00fac1f693 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
@@ -223,19 +223,21 @@ class FieldCopier : public FieldClosure {
|
|
||||||
|
|
||||||
// TODO: review...
|
|
||||||
void VM_EnhancedRedefineClasses::mark_as_scavengable(nmethod* nm) {
|
|
||||||
- ScavengableNMethods::register_nmethod(nm);
|
|
||||||
+ if (nm->is_alive()) {
|
|
||||||
+ ScavengableNMethods::register_nmethod(nm);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
void VM_EnhancedRedefineClasses::unregister_nmethod_g1(nmethod* nm) {
|
|
||||||
// It should work not only for G1 but also for another GCs, but this way is safer now
|
|
||||||
- if (!nm->is_zombie() && !nm->is_unloaded()) {
|
|
||||||
+ if (nm->is_alive()) {
|
|
||||||
Universe::heap()->unregister_nmethod(nm);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void VM_EnhancedRedefineClasses::register_nmethod_g1(nmethod* nm) {
|
|
||||||
// It should work not only for G1 but also for another GCs, but this way is safer now
|
|
||||||
- if (!nm->is_zombie() && !nm->is_unloaded()) {
|
|
||||||
+ if (nm->is_alive()) {
|
|
||||||
Universe::heap()->register_nmethod(nm);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -511,9 +513,9 @@ void VM_EnhancedRedefineClasses::doit() {
|
|
||||||
flush_dependent_code(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);
|
|
||||||
+ // 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) {
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
From 27aabfefe7d799545049bb81ba19d4ed2ff6379c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Sun, 29 Nov 2020 17:20:11 +0100
|
|
||||||
Subject: [PATCH 30/34] dcevm15 - lock on
|
|
||||||
ClassLoaderDataGraph::rollback_redefinition
|
|
||||||
|
|
||||||
rollback is not in safepoint, therefore must be locked
|
|
||||||
---
|
|
||||||
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 e00fac1f693..db5fb1c472b 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
@@ -1382,7 +1382,9 @@ 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.
|
|
||||||
void VM_EnhancedRedefineClasses::rollback() {
|
|
||||||
log_info(redefine, class, load)("Rolling back redefinition, result=%d", _res);
|
|
||||||
+ ClassLoaderDataGraph_lock->lock();
|
|
||||||
ClassLoaderDataGraph::rollback_redefinition();
|
|
||||||
+ ClassLoaderDataGraph_lock->unlock();
|
|
||||||
|
|
||||||
for (int i = 0; i < _new_classes->length(); i++) {
|
|
||||||
SystemDictionary::remove_from_hierarchy(_new_classes->at(i));
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
From 9b405cb642d5935c39c8dbd522ea2fdecfc29ef3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Sun, 29 Nov 2020 19:59:50 +0100
|
|
||||||
Subject: [PATCH 31/34] ResourceMark in G1IterateObjectClosureTask fixing
|
|
||||||
memory leaks
|
|
||||||
|
|
||||||
G1IterateObjectClosureTask is used only in redefinition full GC run
|
|
||||||
---
|
|
||||||
src/hotspot/share/gc/g1/g1CollectedHeap.cpp | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp
|
|
||||||
index a29d2dddc2d..2af6df6c1e4 100644
|
|
||||||
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp
|
|
||||||
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp
|
|
||||||
@@ -2362,6 +2362,9 @@ class G1IterateObjectClosureTask : public AbstractGangTask {
|
|
||||||
_cl(cl), _g1h(g1h), _hrclaimer(g1h->workers()->active_workers()) { }
|
|
||||||
|
|
||||||
virtual void work(uint worker_id) {
|
|
||||||
+ Thread *thread = Thread::current();
|
|
||||||
+ HandleMark hm(thread); // make sure any handles created are deleted
|
|
||||||
+ ResourceMark rm(thread);
|
|
||||||
IterateObjectClosureRegionClosure blk(_cl);
|
|
||||||
_g1h->heap_region_par_iterate_from_worker_offset(&blk, &_hrclaimer, worker_id);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
From 40fe40884d4efc50864bb3f2dd88f0a2e7122d5a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Sun, 29 Nov 2020 20:05:03 +0100
|
|
||||||
Subject: [PATCH 32/34] dcevm15 - fix hidded classes
|
|
||||||
|
|
||||||
---
|
|
||||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 41 ++++++++++++++-----
|
|
||||||
1 file changed, 30 insertions(+), 11 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
index db5fb1c472b..590f7fdfafe 100644
|
|
||||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
|
||||||
@@ -722,7 +722,8 @@ bool VM_EnhancedRedefineClasses::is_modifiable_class(oop klass_mirror) {
|
|
||||||
}
|
|
||||||
|
|
||||||
// Cannot redefine or retransform an anonymous class.
|
|
||||||
- if (InstanceKlass::cast(k)->is_unsafe_anonymous()) {
|
|
||||||
+ // TODO: check if is correct in j15
|
|
||||||
+ if (InstanceKlass::cast(k)->is_unsafe_anonymous() || InstanceKlass::cast(k)->is_hidden()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
@@ -808,21 +809,27 @@ jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
|
|
||||||
|
|
||||||
InstanceKlass* k;
|
|
||||||
|
|
||||||
- if (InstanceKlass::cast(the_class)->is_unsafe_anonymous()) {
|
|
||||||
- const InstanceKlass* host_class = the_class->unsafe_anonymous_host();
|
|
||||||
+ if (the_class->is_unsafe_anonymous() || the_class->is_hidden()) {
|
|
||||||
+ InstanceKlass* dynamic_host_class = NULL;
|
|
||||||
+ InstanceKlass* unsafe_anonymous_host = NULL;
|
|
||||||
|
|
||||||
- // Make sure it's the real host class, not another anonymous class.
|
|
||||||
- while (host_class != NULL && host_class->is_unsafe_anonymous()) {
|
|
||||||
- host_class = host_class->unsafe_anonymous_host();
|
|
||||||
+ if (the_class->is_hidden()) {
|
|
||||||
+ log_debug(redefine, class, load)("loading hidden class %s", the_class->name()->as_C_string());
|
|
||||||
+ dynamic_host_class = the_class->nest_host(THREAD);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (the_class->is_unsafe_anonymous()) {
|
|
||||||
+ log_debug(redefine, class, load)("loading usafe anonymous %s", the_class->name()->as_C_string());
|
|
||||||
+ unsafe_anonymous_host = the_class->unsafe_anonymous_host();
|
|
||||||
}
|
|
||||||
|
|
||||||
ClassLoadInfo cl_info(protection_domain,
|
|
||||||
- host_class,
|
|
||||||
- NULL, // dynamic_nest_host
|
|
||||||
+ unsafe_anonymous_host,
|
|
||||||
NULL, // cp_patches
|
|
||||||
+ dynamic_host_class, // dynamic_nest_host
|
|
||||||
Handle(), // classData
|
|
||||||
- false, // is_hidden
|
|
||||||
- false, // is_strong_hidden
|
|
||||||
+ the_class->is_hidden(), // is_hidden
|
|
||||||
+ !the_class->is_non_strong_hidden(), // is_strong_hidden
|
|
||||||
true); // FIXME: check if correct. can_access_vm_annotations
|
|
||||||
|
|
||||||
k = SystemDictionary::parse_stream(the_class_sym,
|
|
||||||
@@ -833,7 +840,17 @@ jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
|
|
||||||
THREAD);
|
|
||||||
|
|
||||||
k->class_loader_data()->exchange_holders(the_class->class_loader_data());
|
|
||||||
- the_class->class_loader_data()->inc_keep_alive();
|
|
||||||
+
|
|
||||||
+ if (the_class->is_hidden()) {
|
|
||||||
+ // from jvm_lookup_define_class() (jvm.cpp):
|
|
||||||
+ // The hidden class loader data has been artificially been kept alive to
|
|
||||||
+ // this point. The mirror and any instances of this class have to keep
|
|
||||||
+ // it alive afterwards.
|
|
||||||
+ the_class->class_loader_data()->dec_keep_alive();
|
|
||||||
+ } else {
|
|
||||||
+ the_class->class_loader_data()->inc_keep_alive();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
} else {
|
|
||||||
k = SystemDictionary::resolve_from_stream(the_class_sym,
|
|
||||||
the_class_loader,
|
|
||||||
@@ -1475,6 +1492,8 @@ void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
|
|
||||||
ik->set_unsafe_anonymous_host(InstanceKlass::cast(ik->unsafe_anonymous_host()->newest_version()));
|
|
||||||
}
|
|
||||||
|
|
||||||
+ // FIXME: check new nest_host for hidden
|
|
||||||
+
|
|
||||||
// Update implementor if there is only one, in this case implementor() can reference old class
|
|
||||||
if (ik->is_interface()) {
|
|
||||||
Klass* implKlass = ik->implementor();
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
From 29920b076b4ad96d85adbce0a1d947e5022ba3ad Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Sun, 29 Nov 2020 20:08:57 +0100
|
|
||||||
Subject: [PATCH 33/34] dcevm15 - DON'T clear F2 in CP cache after indy
|
|
||||||
unevolving
|
|
||||||
|
|
||||||
It's not clear why it was cleared in dcevm7-11
|
|
||||||
---
|
|
||||||
src/hotspot/share/oops/cpCache.cpp | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/oops/cpCache.cpp b/src/hotspot/share/oops/cpCache.cpp
|
|
||||||
index 79a38dbeff0..650e6fab42d 100644
|
|
||||||
--- a/src/hotspot/share/oops/cpCache.cpp
|
|
||||||
+++ b/src/hotspot/share/oops/cpCache.cpp
|
|
||||||
@@ -650,7 +650,7 @@ void ConstantPoolCacheEntry::clear_entry() {
|
|
||||||
|
|
||||||
if (clearData) {
|
|
||||||
if (!is_resolved_reference()) {
|
|
||||||
- _f2 = 0;
|
|
||||||
+ // _f2 = 0;
|
|
||||||
}
|
|
||||||
// FIXME: (DCEVM) we want to clear flags, but parameter size is actually used
|
|
||||||
// after we return from the method, before entry is re-initialized. So let's
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
From 1f13b20ab5553182680045b7d7324ff92da7e7f0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
||||||
Date: Sun, 29 Nov 2020 21:28:06 +0100
|
|
||||||
Subject: [PATCH 34/34] dcevm15 - fix Universe::root_oops_do
|
|
||||||
|
|
||||||
Removed ClassLoaderDataGraph::cld_do was cause of crashes due multiple
|
|
||||||
oop patching. ClassLoaderDataGraph::cld_do replaced in dcevm15
|
|
||||||
previously used and removed SystemDictionary:oops_do
|
|
||||||
---
|
|
||||||
src/hotspot/share/memory/universe.cpp | 11 ++++++++---
|
|
||||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/hotspot/share/memory/universe.cpp b/src/hotspot/share/memory/universe.cpp
|
|
||||||
index 8dad437bd51..0199962a684 100644
|
|
||||||
--- a/src/hotspot/share/memory/universe.cpp
|
|
||||||
+++ b/src/hotspot/share/memory/universe.cpp
|
|
||||||
@@ -190,21 +190,26 @@ void Universe::root_oops_do(OopClosure *oopClosure) {
|
|
||||||
// (DCEVM) TODO: Check if this is correct?
|
|
||||||
Management::oops_do(oopClosure);
|
|
||||||
OopStorageSet::vm_global()->oops_do(oopClosure);
|
|
||||||
- CLDToOopClosure cld_closure(oopClosure, ClassLoaderData::_claim_none);
|
|
||||||
- ClassLoaderDataGraph::cld_do(&cld_closure);
|
|
||||||
+ // CLDToOopClosure cld_closure(oopClosure, ClassLoaderData::_claim_none);
|
|
||||||
+ // ClassLoaderDataGraph::cld_do(&cld_closure);
|
|
||||||
|
|
||||||
// Now adjust pointers in remaining weak roots. (All of which should
|
|
||||||
// have been cleared if they pointed to non-surviving objects.)
|
|
||||||
// Global (weak) JNI handles
|
|
||||||
WeakProcessor::oops_do(oopClosure);
|
|
||||||
|
|
||||||
+ JvmtiExport::oops_do(oopClosure);
|
|
||||||
+
|
|
||||||
CodeBlobToOopClosure blobClosure(oopClosure, CodeBlobToOopClosure::FixRelocations);
|
|
||||||
CodeCache::blobs_do(&blobClosure);
|
|
||||||
+
|
|
||||||
AOT_ONLY(AOTLoader::oops_do(oopClosure);)
|
|
||||||
+
|
|
||||||
// StringTable::oops_do was removed in j15
|
|
||||||
// StringTable::oops_do(oopClosure);
|
|
||||||
|
|
||||||
- // PSScavenge::reference_processor()->weak_oops_do(oopClosure);
|
|
||||||
+ // OopStorageSet::vm_global()->oops_do(oopClosure);
|
|
||||||
+
|
|
||||||
}
|
|
||||||
|
|
||||||
void Universe::oops_do(OopClosure* f) {
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
@@ -1,147 +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:
|
|
||||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
|
||||||
# By default JCEF binaries should be located in ./jcef_win_x64
|
|
||||||
|
|
||||||
while getopts ":i?" o; do
|
|
||||||
case "${o}" in
|
|
||||||
i)
|
|
||||||
i="incremental build"
|
|
||||||
INC_BUILD=1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
shift $((OPTIND-1))
|
|
||||||
|
|
||||||
JBSDK_VERSION=$1
|
|
||||||
JDK_BUILD_NUMBER=$2
|
|
||||||
build_number=$3
|
|
||||||
bundle_type=$4
|
|
||||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
|
||||||
WORK_DIR=$(pwd)
|
|
||||||
JCEF_PATH=${JCEF_PATH:=$WORK_DIR/jcef_win_x64}
|
|
||||||
|
|
||||||
source jb/project/tools/common/scripts/common.sh
|
|
||||||
|
|
||||||
function do_configure {
|
|
||||||
sh ./configure \
|
|
||||||
$WITH_DEBUG_LEVEL \
|
|
||||||
--with-vendor-name="$VENDOR_NAME" \
|
|
||||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
|
||||||
--with-jvm-features=shenandoahgc \
|
|
||||||
--with-version-pre= \
|
|
||||||
--with-version-build=$JDK_BUILD_NUMBER \
|
|
||||||
--with-version-opt=b${build_number} \
|
|
||||||
--with-toolchain-version=$TOOLCHAIN_VERSION \
|
|
||||||
--with-boot-jdk=$BOOT_JDK \
|
|
||||||
--disable-ccache \
|
|
||||||
--enable-cds=yes || do_exit $?
|
|
||||||
}
|
|
||||||
|
|
||||||
function create_image_bundle {
|
|
||||||
__bundle_name=$1
|
|
||||||
__arch_name=$2
|
|
||||||
__modules_path=$3
|
|
||||||
__modules=$4
|
|
||||||
|
|
||||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
|
||||||
|
|
||||||
echo Running jlink ...
|
|
||||||
${JSDK}/bin/jlink \
|
|
||||||
--module-path $__modules_path --no-man-pages --compress=2 \
|
|
||||||
--add-modules $__modules --output $__arch_name || do_exit $?
|
|
||||||
|
|
||||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> $__arch_name/release
|
|
||||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
|
||||||
sed 's/JBR/JBRSDK/g' $__arch_name/release > release
|
|
||||||
mv release $__arch_name/release
|
|
||||||
copy_jmods "$__modules" "$__modules_path" "$__arch_name"/jmods
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
|
||||||
RELEASE_NAME=windows-x86_64-server-release
|
|
||||||
|
|
||||||
case "$bundle_type" in
|
|
||||||
"jcef")
|
|
||||||
do_reset_changes=0
|
|
||||||
;;
|
|
||||||
"dcevm")
|
|
||||||
HEAD_REVISION=$(git rev-parse HEAD)
|
|
||||||
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
|
|
||||||
do_reset_dcevm=0
|
|
||||||
do_reset_changes=0
|
|
||||||
;;
|
|
||||||
"nomod" | "")
|
|
||||||
bundle_type=""
|
|
||||||
;;
|
|
||||||
"fd")
|
|
||||||
do_reset_changes=0
|
|
||||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
|
||||||
RELEASE_NAME=windows-x86_64-server-fastdebug
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -z "$INC_BUILD" ]; then
|
|
||||||
do_configure || do_exit $?
|
|
||||||
if [ -z "$bundle_type" ]; 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
|
|
||||||
else
|
|
||||||
if [ -z "$bundle_type" ]; then
|
|
||||||
make LOG=info CONF=$RELEASE_NAME images test-image || do_exit $?
|
|
||||||
else
|
|
||||||
make LOG=info CONF=$RELEASE_NAME images || do_exit $?
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
|
||||||
JSDK=$IMAGES_DIR/jdk
|
|
||||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
|
||||||
JBRSDK_BUNDLE=jbrsdk
|
|
||||||
|
|
||||||
where cygpath
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
JCEF_PATH="$(cygpath -w $JCEF_PATH | sed 's/\\/\//g')"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
|
|
||||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
|
||||||
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
|
||||||
cp $JCEF_PATH/jmods/* ${JSDK_MODS_DIR} # $JSDK/jmods is not unchanged
|
|
||||||
|
|
||||||
jbr_name_postfix="_${bundle_type}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# create runtime image bundle
|
|
||||||
modules=$(xargs < modules.list | sed s/" "//g) || do_exit $?
|
|
||||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
|
||||||
|
|
||||||
# create sdk image bundle
|
|
||||||
modules=$(cat ${JSDK}/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\r//g | sed s/\\n//g)
|
|
||||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
|
||||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
|
||||||
fi
|
|
||||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
|
||||||
|
|
||||||
do_exit 0
|
|
||||||
@@ -1,62 +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/scripts/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 \
|
|
||||||
--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,58 +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)
|
|
||||||
#
|
|
||||||
|
|
||||||
source jb/project/tools/common/scripts/common.sh
|
|
||||||
|
|
||||||
JBSDK_VERSION=$1
|
|
||||||
JDK_BUILD_NUMBER=$2
|
|
||||||
build_number=$3
|
|
||||||
bundle_type=$4
|
|
||||||
|
|
||||||
function pack_jbr {
|
|
||||||
__bundle_name=$1
|
|
||||||
__arch_name=$2
|
|
||||||
|
|
||||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
|
||||||
JBR=${__bundle_name}-${JBSDK_VERSION}-windows-x64-${fastdebug_infix}b${build_number}
|
|
||||||
|
|
||||||
echo Creating $JBR.tar.gz ...
|
|
||||||
|
|
||||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__arch_name || do_exit $?
|
|
||||||
}
|
|
||||||
|
|
||||||
[ "$bundle_type" == "nomod" ] && bundle_type=""
|
|
||||||
|
|
||||||
JBRSDK_BUNDLE=jbrsdk
|
|
||||||
RELEASE_NAME=windows-x86_64-server-release
|
|
||||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
|
||||||
BASE_DIR=.
|
|
||||||
|
|
||||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
|
|
||||||
jbr_name_postfix="_${bundle_type}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
pack_jbr jbr${jbr_name_postfix} jbr
|
|
||||||
pack_jbr jbrsdk${jbr_name_postfix} jbrsdk
|
|
||||||
|
|
||||||
if [ -z "$bundle_type" ]; then
|
|
||||||
JBRSDK_TEST=$JBRSDK_BUNDLE-$JBSDK_VERSION-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
|
|
||||||
@@ -278,16 +278,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
|||||||
$(SYMBOLS_EXCLUDE_PATTERN), \
|
$(SYMBOLS_EXCLUDE_PATTERN), \
|
||||||
$(ALL_JRE_FILES))
|
$(ALL_JRE_FILES))
|
||||||
|
|
||||||
# On Macosx release builds, when there is a code signing certificate available,
|
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
|
||||||
# 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.
|
# Macosx release build and code signing available.
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|||||||
@@ -71,11 +71,11 @@ define SetupInterimModule
|
|||||||
SRC := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim \
|
SRC := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim \
|
||||||
$$(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$1) \
|
$$(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$1) \
|
||||||
$(TOPDIR)/src/$1/share/classes, \
|
$(TOPDIR)/src/$1/share/classes, \
|
||||||
EXCLUDES := sun javax/tools/snippet-files, \
|
EXCLUDES := sun, \
|
||||||
EXCLUDE_FILES := $(TOPDIR)/src/$1/share/classes/module-info.java \
|
EXCLUDE_FILES := $(TOPDIR)/src/$1/share/classes/module-info.java \
|
||||||
Standard.java, \
|
Standard.java, \
|
||||||
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java, \
|
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java, \
|
||||||
COPY := .gif .png .xml .css .svg .js .js.template .txt javax.tools.JavaCompilerTool, \
|
COPY := .gif .png .xml .css .js .js.template .txt javax.tools.JavaCompilerTool, \
|
||||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules/$1.interim, \
|
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules/$1.interim, \
|
||||||
DISABLED_WARNINGS := module options, \
|
DISABLED_WARNINGS := module options, \
|
||||||
JAVAC_FLAGS := \
|
JAVAC_FLAGS := \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2014, 2021, 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.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -196,11 +196,6 @@ else # not java.base
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Set main class of jdk.httpserver module
|
|
||||||
ifeq ($(MODULE), jdk.httpserver)
|
|
||||||
JMOD_FLAGS += --main-class sun.net.httpserver.simpleserver.Main
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Changes to the jmod tool itself should also trigger a rebuild of all jmods.
|
# Changes to the jmod tool itself should also trigger a rebuild of all jmods.
|
||||||
# The variable JMOD_CMD could contain an environment variable assignment before
|
# The variable JMOD_CMD could contain an environment variable assignment before
|
||||||
# the actual command. Filter that out using wildcard before adding to DEPS.
|
# the actual command. Filter that out using wildcard before adding to DEPS.
|
||||||
@@ -226,6 +221,13 @@ else
|
|||||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
|
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# For reproducible builds specify the jmod --date using SOURCE_DATE in ISO-8601
|
||||||
|
ifeq ($(ENABLE_REPRODUCIBLE_BUILD), true)
|
||||||
|
JMOD_SOURCE_DATE := --date $(SOURCE_DATE_ISO_8601)
|
||||||
|
else
|
||||||
|
JMOD_SOURCE_DATE :=
|
||||||
|
endif
|
||||||
|
|
||||||
# Create jmods in the support dir and then move them into place to keep the
|
# 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.
|
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
|
||||||
$(eval $(call SetupExecute, create_$(JMOD_FILE), \
|
$(eval $(call SetupExecute, create_$(JMOD_FILE), \
|
||||||
@@ -237,6 +239,7 @@ $(eval $(call SetupExecute, create_$(JMOD_FILE), \
|
|||||||
COMMAND := $(JMOD) create --module-version $(VERSION_SHORT) \
|
COMMAND := $(JMOD) create --module-version $(VERSION_SHORT) \
|
||||||
--target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \
|
--target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \
|
||||||
--module-path $(JMODS_DIR) $(JMOD_FLAGS) \
|
--module-path $(JMODS_DIR) $(JMOD_FLAGS) \
|
||||||
|
$(JMOD_SOURCE_DATE) \
|
||||||
$(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \
|
$(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \
|
||||||
POST_COMMAND := $(MV) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE) $(JMODS_DIR)/$(JMOD_FILE), \
|
POST_COMMAND := $(MV) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE) $(JMODS_DIR)/$(JMOD_FILE), \
|
||||||
))
|
))
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2016, 2021, 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.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -88,10 +88,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
|
|||||||
$(CAT) $(LINK_OPT_DIR)/stderr $(JLI_TRACE_FILE) ; \
|
$(CAT) $(LINK_OPT_DIR)/stderr $(JLI_TRACE_FILE) ; \
|
||||||
exit $$exitcode \
|
exit $$exitcode \
|
||||||
)
|
)
|
||||||
$(GREP) -v HelloClasslist $@.raw.2 > $@.raw.3
|
$(GREP) -v HelloClasslist $@.raw.2 > $@
|
||||||
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java \
|
|
||||||
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
|
|
||||||
build.tools.classlist.SortClasslist $@.raw.3 > $@
|
|
||||||
|
|
||||||
# The jli trace is created by the same recipe as classlist. By declaring these
|
# The jli trace is created by the same recipe as classlist. By declaring these
|
||||||
# dependencies, make will correctly rebuild both jli trace and classlist
|
# dependencies, make will correctly rebuild both jli trace and classlist
|
||||||
|
|||||||
146
make/Hsdis.gmk
146
make/Hsdis.gmk
@@ -1,146 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2020, 2021, 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 JdkNativeCompilation.gmk
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# This makefile compiles and installs the hsdis library
|
|
||||||
#
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
HSDIS_OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/hsdis
|
|
||||||
|
|
||||||
ifeq ($(call isTargetOs, windows), true)
|
|
||||||
INSTALLED_HSDIS_DIR := $(JDK_OUTPUTDIR)/bin
|
|
||||||
|
|
||||||
# On windows, we need to "fake" a completely different toolchain using gcc
|
|
||||||
# instead of the normal microsoft toolchain. This is quite hacky...
|
|
||||||
|
|
||||||
MINGW_BASE := x86_64-w64-mingw32
|
|
||||||
|
|
||||||
MINGW_SYSROOT = $(shell $(MINGW_BASE)-gcc -print-sysroot)
|
|
||||||
ifeq ($(wildcard $(MINGW_SYSROOT)), )
|
|
||||||
# Use fallback path
|
|
||||||
MINGW_SYSROOT := /usr/$(MINGW_BASE)
|
|
||||||
ifeq ($(wildcard $(MINGW_SYSROOT)), )
|
|
||||||
$(error mingw sysroot not found)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(eval $(call DefineNativeToolchain, TOOLCHAIN_MINGW, \
|
|
||||||
CC := $(MINGW_BASE)-gcc, \
|
|
||||||
LD := $(MINGW_BASE)-ld, \
|
|
||||||
OBJCOPY := $(MINGW_BASE)-objcopy, \
|
|
||||||
RC := $(RC), \
|
|
||||||
SYSROOT_CFLAGS := --sysroot=$(MINGW_SYSROOT), \
|
|
||||||
SYSROOT_LDFLAGS := --sysroot=$(MINGW_SYSROOT), \
|
|
||||||
))
|
|
||||||
|
|
||||||
MINGW_SYSROOT_LIB_PATH := $(MINGW_SYSROOT)/mingw/lib
|
|
||||||
ifeq ($(wildcard $(MINGW_SYSROOT_LIB_PATH)), )
|
|
||||||
# Try without mingw
|
|
||||||
MINGW_SYSROOT_LIB_PATH := $(MINGW_SYSROOT)/lib
|
|
||||||
ifeq ($(wildcard $(MINGW_SYSROOT_LIB_PATH)), )
|
|
||||||
$(error mingw sysroot lib path not found)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
MINGW_VERSION = $(shell $(MINGW_BASE)-gcc -v 2>&1 | $(GREP) "gcc version" | $(CUT) -d " " -f 3)
|
|
||||||
MINGW_GCC_LIB_PATH := /usr/lib/gcc/$(MINGW_BASE)/$(MINGW_VERSION)
|
|
||||||
ifeq ($(wildcard $(MINGW_GCC_LIB_PATH)), )
|
|
||||||
# Try using only major version number
|
|
||||||
MINGW_VERSION_MAJOR := $(firstword $(subst ., , $(MINGW_VERSION)))
|
|
||||||
MINGW_GCC_LIB_PATH := /usr/lib/gcc/$(MINGW_BASE)/$(MINGW_VERSION_MAJOR)
|
|
||||||
ifeq ($(wildcard $(MINGW_GCC_LIB_PATH)), )
|
|
||||||
$(error mingw gcc lib path not found)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
TOOLCHAIN_TYPE := gcc
|
|
||||||
OPENJDK_TARGET_OS := linux
|
|
||||||
CC_OUT_OPTION := -o$(SPACE)
|
|
||||||
LD_OUT_OPTION := -o$(SPACE)
|
|
||||||
GENDEPS_FLAGS := -MMD -MF
|
|
||||||
CFLAGS_DEBUG_SYMBOLS := -g
|
|
||||||
DISABLED_WARNINGS :=
|
|
||||||
DISABLE_WARNING_PREFIX := -Wno-
|
|
||||||
CFLAGS_WARNINGS_ARE_ERRORS := -Werror
|
|
||||||
SHARED_LIBRARY_FLAGS := -shared
|
|
||||||
|
|
||||||
HSDIS_TOOLCHAIN := TOOLCHAIN_MINGW
|
|
||||||
HSDIS_TOOLCHAIN_CFLAGS :=
|
|
||||||
HSDIS_TOOLCHAIN_LDFLAGS := -L$(MINGW_GCC_LIB_PATH) -L$(MINGW_SYSROOT_LIB_PATH)
|
|
||||||
MINGW_DLLCRT := $(MINGW_SYSROOT_LIB_PATH)/dllcrt2.o
|
|
||||||
HSDIS_TOOLCHAIN_LIBS := $(MINGW_DLLCRT) -lmingw32 -lgcc -lgcc_eh -lmoldname \
|
|
||||||
-lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32
|
|
||||||
else
|
|
||||||
INSTALLED_HSDIS_DIR := $(JDK_OUTPUTDIR)/lib
|
|
||||||
|
|
||||||
HSDIS_TOOLCHAIN := TOOLCHAIN_DEFAULT
|
|
||||||
HSDIS_TOOLCHAIN_CFLAGS := $(CFLAGS_JDKLIB)
|
|
||||||
HSDIS_TOOLCHAIN_LDFLAGS := $(LDFLAGS_JDKLIB)
|
|
||||||
HSDIS_TOOLCHAIN_LIBS := -ldl
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
$(eval $(call SetupJdkLibrary, BUILD_HSDIS, \
|
|
||||||
NAME := hsdis, \
|
|
||||||
SRC := $(TOPDIR)/src/utils/hsdis, \
|
|
||||||
TOOLCHAIN := $(HSDIS_TOOLCHAIN), \
|
|
||||||
OUTPUT_DIR := $(HSDIS_OUTPUT_DIR), \
|
|
||||||
OBJECT_DIR := $(HSDIS_OUTPUT_DIR), \
|
|
||||||
DISABLED_WARNINGS_gcc := undef format-nonliteral sign-compare, \
|
|
||||||
DISABLED_WARNINGS_clang := undef format-nonliteral, \
|
|
||||||
CFLAGS := $(HSDIS_TOOLCHAIN_CFLAGS) $(HSDIS_CFLAGS), \
|
|
||||||
LDFLAGS := $(HSDIS_TOOLCHAIN_LDFLAGS) $(SHARED_LIBRARY_FLAGS), \
|
|
||||||
LIBS := $(HSDIS_LIBS) $(HSDIS_TOOLCHAIN_LIBS), \
|
|
||||||
))
|
|
||||||
|
|
||||||
build: $(BUILD_HSDIS)
|
|
||||||
|
|
||||||
TARGETS += build
|
|
||||||
|
|
||||||
INSTALLED_HSDIS_NAME := hsdis-$(OPENJDK_TARGET_CPU_LEGACY_LIB)$(SHARED_LIBRARY_SUFFIX)
|
|
||||||
|
|
||||||
INSTALLED_HSDIS := $(INSTALLED_HSDIS_DIR)/$(INSTALLED_HSDIS_NAME)
|
|
||||||
|
|
||||||
$(INSTALLED_HSDIS): $(BUILD_HSDIS_TARGET)
|
|
||||||
$(call LogWarn, NOTE: The resulting build might not be redistributable. Seek legal advice before distibuting.)
|
|
||||||
$(install-file)
|
|
||||||
|
|
||||||
|
|
||||||
install: $(INSTALLED_HSDIS)
|
|
||||||
|
|
||||||
TARGETS += install
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
all: $(TARGETS)
|
|
||||||
|
|
||||||
.PHONY: all default build install
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -313,6 +313,15 @@ else # $(HAS_SPEC)=true
|
|||||||
SOURCE_DATE := $$(shell $$(DATE) +"%s")
|
SOURCE_DATE := $$(shell $$(DATE) +"%s")
|
||||||
endif
|
endif
|
||||||
export SOURCE_DATE_EPOCH := $$(SOURCE_DATE)
|
export SOURCE_DATE_EPOCH := $$(SOURCE_DATE)
|
||||||
|
ifeq ($$(IS_GNU_DATE), yes)
|
||||||
|
export SOURCE_DATE_ISO_8601 := $$(shell $$(DATE) --utc \
|
||||||
|
--date="@$$(SOURCE_DATE_EPOCH)" \
|
||||||
|
+"%Y-%m-%dT%H:%M:%SZ" 2> /dev/null)
|
||||||
|
else
|
||||||
|
export SOURCE_DATE_ISO_8601 := $$(shell $$(DATE) -u \
|
||||||
|
-j -f "%s" "$$(SOURCE_DATE_EPOCH)" \
|
||||||
|
+"%Y-%m-%dT%H:%M:%SZ" 2> /dev/null)
|
||||||
|
endif
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Parse COMPARE_BUILD into COMPARE_BUILD_*
|
# Parse COMPARE_BUILD into COMPARE_BUILD_*
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user