mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-07 09:59:37 +01:00
Compare commits
1244 Commits
swing-touc
...
1108
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54bb49caeb | ||
|
|
9c0afe3a7d | ||
|
|
6dd334f9f0 | ||
|
|
96dd8fcf48 | ||
|
|
9b960dd02a | ||
|
|
6b7d5fd58c | ||
|
|
ebcdeb7d80 | ||
|
|
67870df19e | ||
|
|
afd19dbefd | ||
|
|
a55097289b | ||
|
|
8de39b80cd | ||
|
|
0f038754e5 | ||
|
|
4aa278e4a0 | ||
|
|
e3562ecc99 | ||
|
|
b62d47da9c | ||
|
|
e748f39e20 | ||
|
|
428ade4fd8 | ||
|
|
e28ff71e97 | ||
|
|
f826eb992e | ||
|
|
ba3f14c83a | ||
|
|
82a3601748 | ||
|
|
eeab5252e6 | ||
|
|
838bbedd1a | ||
|
|
0e4ad056dd | ||
|
|
89163e73d0 | ||
|
|
665ebc5d47 | ||
|
|
32b1c35305 | ||
|
|
55c7be5fe9 | ||
|
|
5017e2e385 | ||
|
|
492c217125 | ||
|
|
269c9580fb | ||
|
|
5f691bb788 | ||
|
|
bcdd2242ef | ||
|
|
faee138574 | ||
|
|
fb69e212ba | ||
|
|
d8cc648a18 | ||
|
|
15d2b6217d | ||
|
|
b92f4a73b4 | ||
|
|
5f0e3bcd37 | ||
|
|
e6f336ae8b | ||
|
|
7c0f78edf1 | ||
|
|
a2ba1bd211 | ||
|
|
c95adeb8f2 | ||
|
|
c30306f779 | ||
|
|
ad8ac1f3bc | ||
|
|
63719b57ed | ||
|
|
0f775c6d66 | ||
|
|
523d80cafd | ||
|
|
ca48245ee3 | ||
|
|
fd6991529e | ||
|
|
1e04518d5c | ||
|
|
5953202a7e | ||
|
|
e333be38f4 | ||
|
|
c1bca14fd3 | ||
|
|
57bbddf071 | ||
|
|
9f930e3748 | ||
|
|
64f610b58e | ||
|
|
ed52fde57d | ||
|
|
f517bb3380 | ||
|
|
7beb75ccec | ||
|
|
f8ff966477 | ||
|
|
c9a79afe07 | ||
|
|
2834f4adb0 | ||
|
|
6d10730d00 | ||
|
|
abf2d7d74c | ||
|
|
be2bbc2f48 | ||
|
|
dbf75d0e56 | ||
|
|
60118a409e | ||
|
|
a08aa25531 | ||
|
|
ce61762e04 | ||
|
|
1c244b7bc0 | ||
|
|
b8b35ffb01 | ||
|
|
24418db7cd | ||
|
|
93c5a7b606 | ||
|
|
c61033caba | ||
|
|
b04998a70a | ||
|
|
5e281062c3 | ||
|
|
784be32b7e | ||
|
|
783a80c6c6 | ||
|
|
9796449910 | ||
|
|
381d62cc37 | ||
|
|
11ad64ffa3 | ||
|
|
1d0182f137 | ||
|
|
d1d9055e51 | ||
|
|
3767fcae50 | ||
|
|
1aa7603700 | ||
|
|
628e62978b | ||
|
|
8949ef0d15 | ||
|
|
75d8c71dd8 | ||
|
|
d931e3ceb9 | ||
|
|
01d727e6a3 | ||
|
|
e7ac29729c | ||
|
|
bb6e1641db | ||
|
|
703ed01dd0 | ||
|
|
77eaa99d36 | ||
|
|
b6fbcf5b0c | ||
|
|
aaa8cec640 | ||
|
|
ad409b4370 | ||
|
|
eab96a58e3 | ||
|
|
345329a74c | ||
|
|
60ce8b7256 | ||
|
|
db4eb3fbc2 | ||
|
|
109422a2de | ||
|
|
a6f33217c4 | ||
|
|
7cd6ae51b8 | ||
|
|
504dcf5a5e | ||
|
|
54219be493 | ||
|
|
d252dbfe54 | ||
|
|
130f7b7ae8 | ||
|
|
c21000efc0 | ||
|
|
d8e5df1778 | ||
|
|
1995bf0bf3 | ||
|
|
e6126eeab5 | ||
|
|
3cf320fe7b | ||
|
|
2d6da4f86b | ||
|
|
089ca96153 | ||
|
|
3f3902cb8e | ||
|
|
a16dc710c3 | ||
|
|
dec592bc63 | ||
|
|
e88af15954 | ||
|
|
3923f17212 | ||
|
|
6508bfc82b | ||
|
|
983b6a9135 | ||
|
|
9f4d3c61d1 | ||
|
|
308aa701d3 | ||
|
|
6c147f3202 | ||
|
|
0eb6d3d068 | ||
|
|
8f175ec887 | ||
|
|
850fb572dc | ||
|
|
7df7269780 | ||
|
|
96adcfc0e6 | ||
|
|
1415d66d15 | ||
|
|
4dd1c56feb | ||
|
|
2ee02a5ed7 | ||
|
|
329ff5ce0b | ||
|
|
759f8d8557 | ||
|
|
a56d0c87a9 | ||
|
|
13be5a2e39 | ||
|
|
73035bd402 | ||
|
|
1bd454ad99 | ||
|
|
928ed232a4 | ||
|
|
ab62dfba6a | ||
|
|
37e74b13fc | ||
|
|
27ffdd6fe9 | ||
|
|
da80c80707 | ||
|
|
3e853f2f4c | ||
|
|
b28939a548 | ||
|
|
820fbcbdf6 | ||
|
|
fef8cb45fe | ||
|
|
1c6eb891ef | ||
|
|
ebef5bf7ec | ||
|
|
db9fc47477 | ||
|
|
52cbb297dc | ||
|
|
6c2bd656f1 | ||
|
|
31a0a57dee | ||
|
|
88c971be72 | ||
|
|
085bed455d | ||
|
|
9349638970 | ||
|
|
49aec1efde | ||
|
|
6409588457 | ||
|
|
41e1a5d6c1 | ||
|
|
3862142d01 | ||
|
|
07be678e25 | ||
|
|
c72af0cee5 | ||
|
|
5df643d04e | ||
|
|
0bc8232032 | ||
|
|
cde7b3f860 | ||
|
|
ea60706eff | ||
|
|
a15ef6ed59 | ||
|
|
224a2c43f7 | ||
|
|
6dc5e764b0 | ||
|
|
a9dbc61644 | ||
|
|
5229cca547 | ||
|
|
7ea0f008de | ||
|
|
4cf5e2f0b0 | ||
|
|
80e71249e3 | ||
|
|
d7b4371ce4 | ||
|
|
a49cdc263a | ||
|
|
c1e0caa438 | ||
|
|
d7224e65e9 | ||
|
|
4288e6c1d2 | ||
|
|
1745ce9ad6 | ||
|
|
7855f376bd | ||
|
|
e6bbc1dabb | ||
|
|
66a2ce65ca | ||
|
|
96da61ce76 | ||
|
|
ae119ccb19 | ||
|
|
19b7a1709e | ||
|
|
0c7166bc86 | ||
|
|
a82e688e2e | ||
|
|
68f1581b9d | ||
|
|
415291c6f8 | ||
|
|
85190f9fe4 | ||
|
|
818e27b601 | ||
|
|
7703e1a727 | ||
|
|
2bad2cacb1 | ||
|
|
174dd44035 | ||
|
|
7ac4d6f69d | ||
|
|
c6efef034d | ||
|
|
46f0f52488 | ||
|
|
1ff85bf395 | ||
|
|
bcfce6efc6 | ||
|
|
646bafff37 | ||
|
|
3ebc9196f5 | ||
|
|
bcd9451b67 | ||
|
|
4677d5e443 | ||
|
|
66489f122b | ||
|
|
7f485ee001 | ||
|
|
df7acd9d39 | ||
|
|
9d01f76bfb | ||
|
|
d9a329ec3c | ||
|
|
50f9a84298 | ||
|
|
d297222ef2 | ||
|
|
ee10f53b5f | ||
|
|
7821feec6e | ||
|
|
5eb2fbf2b8 | ||
|
|
7978a32526 | ||
|
|
372e5ca453 | ||
|
|
e90174abd2 | ||
|
|
ca2aee9530 | ||
|
|
ce5a3f39a5 | ||
|
|
af0ae4cc4f | ||
|
|
a9e8caa182 | ||
|
|
c74cf2f0c2 | ||
|
|
db7fe94ad2 | ||
|
|
b39b452039 | ||
|
|
5527b818e4 | ||
|
|
abc6293c34 | ||
|
|
b5ca899872 | ||
|
|
8e086d5477 | ||
|
|
667fc27658 | ||
|
|
7c9b7e03a6 | ||
|
|
b3e9e81328 | ||
|
|
337fbe0dae | ||
|
|
fd746c33e9 | ||
|
|
243d3e0f1c | ||
|
|
825ff00812 | ||
|
|
46d0403e15 | ||
|
|
47d297b9a3 | ||
|
|
099270a5c9 | ||
|
|
1aa0a01c91 | ||
|
|
2bc1d98b06 | ||
|
|
d614975eff | ||
|
|
6528621eb0 | ||
|
|
f005c8ea62 | ||
|
|
d82123f824 | ||
|
|
571d28dbe5 | ||
|
|
7f53812d25 | ||
|
|
db88072d37 | ||
|
|
cf7e7e90c2 | ||
|
|
b8d31fd8c2 | ||
|
|
31f6a8aa3d | ||
|
|
4445de16a5 | ||
|
|
09b0950a9b | ||
|
|
8cfa3cc5f0 | ||
|
|
24b0efc7fd | ||
|
|
71558692bd | ||
|
|
dcd4e16ba0 | ||
|
|
b226b22d45 | ||
|
|
3c2c83194d | ||
|
|
680cf862d6 | ||
|
|
791ac89003 | ||
|
|
4d70ec1f6d | ||
|
|
e2321b4c98 | ||
|
|
d8722777b3 | ||
|
|
860983aad9 | ||
|
|
969116c611 | ||
|
|
e0751412e2 | ||
|
|
3f2396a35e | ||
|
|
28719e7e95 | ||
|
|
639ce8fc97 | ||
|
|
78012defd0 | ||
|
|
afa4131515 | ||
|
|
b3cc2766f5 | ||
|
|
f0b35bada3 | ||
|
|
3a38d8b0e8 | ||
|
|
9efb5e21cb | ||
|
|
640f5c214c | ||
|
|
76d4e3642d | ||
|
|
c1996d3095 | ||
|
|
5795534d86 | ||
|
|
d5b5fef68c | ||
|
|
cd230124b9 | ||
|
|
1aaadd93da | ||
|
|
8173be0201 | ||
|
|
4e27f3d26a | ||
|
|
cd7889a0f4 | ||
|
|
5c27fbd8ed | ||
|
|
287c328461 | ||
|
|
1a29c437f0 | ||
|
|
d6810fe3e3 | ||
|
|
00f9d0541a | ||
|
|
e0ecc0cfdd | ||
|
|
08f26a7609 | ||
|
|
cf1912ea68 | ||
|
|
ec79841749 | ||
|
|
af050b51b6 | ||
|
|
417326f95a | ||
|
|
aa50bd3e06 | ||
|
|
a01809a2cc | ||
|
|
2afbe66adb | ||
|
|
5ab4e8db10 | ||
|
|
90ffebae8f | ||
|
|
624adb11d7 | ||
|
|
4a23523d3c | ||
|
|
4f325f13c3 | ||
|
|
adf17e859b | ||
|
|
a8ed449621 | ||
|
|
2f85950163 | ||
|
|
62797397b9 | ||
|
|
c9ec72480b | ||
|
|
7d1af5ee29 | ||
|
|
38b5a08a5f | ||
|
|
ea49ade0eb | ||
|
|
4b7f2de1e7 | ||
|
|
af7a0ffc10 | ||
|
|
a16e91349f | ||
|
|
d5309df76b | ||
|
|
3d7b891e62 | ||
|
|
41fa83f047 | ||
|
|
68fd5cc6fe | ||
|
|
ee82fd98e0 | ||
|
|
558933de80 | ||
|
|
6a0d07d930 | ||
|
|
4b9738b5bb | ||
|
|
cbf10d28a8 | ||
|
|
5408d888a3 | ||
|
|
0fa3f55081 | ||
|
|
50afb69bf3 | ||
|
|
6d14e4b5e8 | ||
|
|
09c5c519d8 | ||
|
|
3afadfa003 | ||
|
|
78d8e40ca3 | ||
|
|
52bf44e728 | ||
|
|
7c59939116 | ||
|
|
0a8e30c717 | ||
|
|
36cf6f0975 | ||
|
|
a0d4441b62 | ||
|
|
ca1df1b168 | ||
|
|
fa8f258c90 | ||
|
|
c9db1cc0f1 | ||
|
|
627d7976ac | ||
|
|
52a169c393 | ||
|
|
d9785fb625 | ||
|
|
7854cd4495 | ||
|
|
ddd9ac0ee9 | ||
|
|
d1b4b2438f | ||
|
|
68790e7c79 | ||
|
|
70fdf7b6e6 | ||
|
|
3673a71f12 | ||
|
|
53ada30aa3 | ||
|
|
4dfc03e500 | ||
|
|
0596d0ab64 | ||
|
|
2265a2a470 | ||
|
|
4035179d26 | ||
|
|
d975743a91 | ||
|
|
fea4cc4922 | ||
|
|
712acec624 | ||
|
|
2752a7ef6f | ||
|
|
013381892c | ||
|
|
9841bda9ff | ||
|
|
2a892925b9 | ||
|
|
adff077c30 | ||
|
|
ba9def2d45 | ||
|
|
09c6c67640 | ||
|
|
776e4e44a1 | ||
|
|
af72873ce3 | ||
|
|
4bc44c7ab8 | ||
|
|
31e065dee2 | ||
|
|
80606e79de | ||
|
|
d62f8663e4 | ||
|
|
5dd532c468 | ||
|
|
88767d1951 | ||
|
|
cdfa6a995a | ||
|
|
6c76c6b994 | ||
|
|
3b52f2b30e | ||
|
|
8de16a2732 | ||
|
|
34cd1b08f2 | ||
|
|
9357e9872c | ||
|
|
a57ed60b88 | ||
|
|
3f5ee10c34 | ||
|
|
4f17e1b965 | ||
|
|
ab97d74692 | ||
|
|
e30a309f92 | ||
|
|
703d77a927 | ||
|
|
2f1d317d87 | ||
|
|
f7b4c42e1d | ||
|
|
21af1eba85 | ||
|
|
72b0add80c | ||
|
|
67b174dc8c | ||
|
|
a41a59a57b | ||
|
|
9c8cffee50 | ||
|
|
d9ff151211 | ||
|
|
0917d89523 | ||
|
|
71e2a8d8ad | ||
|
|
7d5ac56b6c | ||
|
|
2ca834c18e | ||
|
|
78bd1bbeae | ||
|
|
82e6ed7c0b | ||
|
|
4c6aa2945a | ||
|
|
dc85bb1eab | ||
|
|
89c80c157c | ||
|
|
b8e86892f2 | ||
|
|
5d97e2253c | ||
|
|
9c3912fe1f | ||
|
|
c1d644a004 | ||
|
|
87ad6ac3a0 | ||
|
|
f016970f5a | ||
|
|
71dbebd5f5 | ||
|
|
ff2936c6fb | ||
|
|
8a789e04e9 | ||
|
|
eaed7de6bb | ||
|
|
803ee2f2b5 | ||
|
|
356121b18f | ||
|
|
8bd8d2d132 | ||
|
|
9adf77a512 | ||
|
|
73b45fb899 | ||
|
|
66381f0dec | ||
|
|
87525d1d2a | ||
|
|
81d2156fb1 | ||
|
|
916e68b5b4 | ||
|
|
5016db518a | ||
|
|
9154a8faef | ||
|
|
764ac0decb | ||
|
|
fe293f0126 | ||
|
|
2620c62848 | ||
|
|
c0c0a96cf4 | ||
|
|
1af5dd4aae | ||
|
|
15c4ce1d3e | ||
|
|
be6895a20b | ||
|
|
a367f18492 | ||
|
|
dc24658b31 | ||
|
|
a80d45eb31 | ||
|
|
404ff84565 | ||
|
|
2dea81a904 | ||
|
|
6974131eec | ||
|
|
33a8c95d39 | ||
|
|
5ef4cceb33 | ||
|
|
c64faba66e | ||
|
|
c0fd2daf5c | ||
|
|
2d164c9914 | ||
|
|
9f91fe91f5 | ||
|
|
caf366f6f3 | ||
|
|
12a9361f7c | ||
|
|
8904e07b7d | ||
|
|
bf1b017af4 | ||
|
|
e67b5fb257 | ||
|
|
7e7b5ccd13 | ||
|
|
28b0dbf18c | ||
|
|
9de2d941ef | ||
|
|
e9fa7a0882 | ||
|
|
4f60efebe2 | ||
|
|
cfc3e87f2a | ||
|
|
4c42f75021 | ||
|
|
79260bc482 | ||
|
|
e03fb4aac0 | ||
|
|
c5ec83e083 | ||
|
|
264802cf4b | ||
|
|
16ca839ed3 | ||
|
|
afb3303db5 | ||
|
|
9f77b65a52 | ||
|
|
08f9ba66f9 | ||
|
|
39c879f9ad | ||
|
|
aef29fa705 | ||
|
|
ab073976c4 | ||
|
|
2491078e1f | ||
|
|
59bcae0bff | ||
|
|
fc8d9c87d4 | ||
|
|
127a2deddf | ||
|
|
efc504f504 | ||
|
|
25d3c699eb | ||
|
|
f4227faf12 | ||
|
|
a5adc725df | ||
|
|
bfab6a9364 | ||
|
|
38f396900c | ||
|
|
861f73c393 | ||
|
|
561a7b8def | ||
|
|
cf3a605a0e | ||
|
|
7b9a7df27a | ||
|
|
eb40ba199b | ||
|
|
f0385f01ec | ||
|
|
ff7d7bd43c | ||
|
|
82f7e549ff | ||
|
|
f8cb5e054b | ||
|
|
6ef9435c21 | ||
|
|
375a012a26 | ||
|
|
6511ecfac4 | ||
|
|
723af168a0 | ||
|
|
54565c619d | ||
|
|
8c42f06815 | ||
|
|
7569fd0bcd | ||
|
|
e10b2a467e | ||
|
|
6f5abe0185 | ||
|
|
80333614e2 | ||
|
|
a8dd501fb2 | ||
|
|
68231ced3f | ||
|
|
a1729c30d9 | ||
|
|
dde28c2dad | ||
|
|
0dd7e6f7a8 | ||
|
|
0ee4046adb | ||
|
|
efb4f9926a | ||
|
|
89bac530b9 | ||
|
|
3b2d324d98 | ||
|
|
0f41a5b833 | ||
|
|
c2835d836c | ||
|
|
caf1c6347a | ||
|
|
b0443eb9c0 | ||
|
|
058208e16d | ||
|
|
b6f3bd8c8c | ||
|
|
acf804d20a | ||
|
|
718e099e9d | ||
|
|
4af7092f83 | ||
|
|
2ff44a1671 | ||
|
|
2990aa1964 | ||
|
|
add8cde7e9 | ||
|
|
b59e5fc306 | ||
|
|
59c0a7b335 | ||
|
|
a2cfc31f4a | ||
|
|
0061c1a8b5 | ||
|
|
33addafe05 | ||
|
|
b696b0ffca | ||
|
|
2d9d8009c4 | ||
|
|
11f4f1f151 | ||
|
|
e943bb77d0 | ||
|
|
fb9bc7adfb | ||
|
|
560520877f | ||
|
|
d805574217 | ||
|
|
62490c7387 | ||
|
|
2008716692 | ||
|
|
ffb415143a | ||
|
|
4606544b93 | ||
|
|
2f9060fff7 | ||
|
|
47a59d4cf7 | ||
|
|
d620f89726 | ||
|
|
0d5f4a45b6 | ||
|
|
33e207b792 | ||
|
|
de3d9de26f | ||
|
|
cea6bd5d0b | ||
|
|
5cebbb80d6 | ||
|
|
a5c225b3d4 | ||
|
|
9075bfc468 | ||
|
|
5aa2bdef67 | ||
|
|
a0cfda673b | ||
|
|
5a37107d90 | ||
|
|
e86c694176 | ||
|
|
5eb55ccb7d | ||
|
|
3be33c24eb | ||
|
|
5e6ea5b7d3 | ||
|
|
b170657293 | ||
|
|
46c2608228 | ||
|
|
62b96e3966 | ||
|
|
b2680a62ad | ||
|
|
bae72e3a96 | ||
|
|
bf43810d56 | ||
|
|
25a8702317 | ||
|
|
5fe3b55ef8 | ||
|
|
2447ee6729 | ||
|
|
97901fa909 | ||
|
|
245ea71185 | ||
|
|
c80dff1f12 | ||
|
|
48fc7bfe4c | ||
|
|
5569f3aeb6 | ||
|
|
cc4ac7ee85 | ||
|
|
0909fce097 | ||
|
|
c38ea39bbe | ||
|
|
81883294d8 | ||
|
|
fa8d9029fe | ||
|
|
a4bb2f47aa | ||
|
|
a9b9328252 | ||
|
|
8d3941cbcb | ||
|
|
96ac35d699 | ||
|
|
698ab6fe15 | ||
|
|
60fbf81d2b | ||
|
|
17346b61bb | ||
|
|
72434a30ed | ||
|
|
98c20f5872 | ||
|
|
f79d1b57f0 | ||
|
|
9159f89dfa | ||
|
|
97de942a66 | ||
|
|
213614590f | ||
|
|
40d00cb735 | ||
|
|
fd3a23d87d | ||
|
|
3585476b88 | ||
|
|
bb0883fc21 | ||
|
|
92362fa6b9 | ||
|
|
74e3269b24 | ||
|
|
91050d029e | ||
|
|
3635eebb17 | ||
|
|
1ea18f7c0f | ||
|
|
2a0a212f9a | ||
|
|
3904664dce | ||
|
|
3d730556e2 | ||
|
|
009810646c | ||
|
|
dc255c55b4 | ||
|
|
dd6f224327 | ||
|
|
3722df0853 | ||
|
|
6a6b32f053 | ||
|
|
86ca482b0b | ||
|
|
42be50924e | ||
|
|
e04fef9581 | ||
|
|
f60adac49c | ||
|
|
04f5ec40c3 | ||
|
|
edf377c204 | ||
|
|
22d64101b6 | ||
|
|
7fe46f7666 | ||
|
|
353624f1c2 | ||
|
|
2a5f45c567 | ||
|
|
1cb3bc25c6 | ||
|
|
5d20ec30d7 | ||
|
|
9773c4b786 | ||
|
|
a25a446f84 | ||
|
|
94ff4c8db5 | ||
|
|
60dcdc3edb | ||
|
|
fabb0ef729 | ||
|
|
1afb13bb99 | ||
|
|
a27e1b1ee6 | ||
|
|
338c006e28 | ||
|
|
4f15cc2fa6 | ||
|
|
405eec558f | ||
|
|
e73b9b0174 | ||
|
|
14a6a74c55 | ||
|
|
622562faa3 | ||
|
|
a27bb38f53 | ||
|
|
c94c48de71 | ||
|
|
1ddd82e7ae | ||
|
|
13eb920830 | ||
|
|
55d001ae88 | ||
|
|
c6a2df3514 | ||
|
|
c690686d1d | ||
|
|
7c9a9f0c42 | ||
|
|
e8ec00f9b4 | ||
|
|
226b019ca3 | ||
|
|
5697bbd861 | ||
|
|
d78caa00d9 | ||
|
|
0fa3015ff5 | ||
|
|
0b6789c231 | ||
|
|
6d44395f78 | ||
|
|
4f2b1cc1b0 | ||
|
|
a7fd30518f | ||
|
|
32b14163ec | ||
|
|
f25c10dcc6 | ||
|
|
2156f7d402 | ||
|
|
957aea8d3e | ||
|
|
bd6ce25302 | ||
|
|
f2cf0fd440 | ||
|
|
a08b065749 | ||
|
|
a297314933 | ||
|
|
dcbbe655f5 | ||
|
|
ab2fd95872 | ||
|
|
5f8f31cf0c | ||
|
|
cf1112a1cb | ||
|
|
b40236cf49 | ||
|
|
3db26f1f66 | ||
|
|
728400c64e | ||
|
|
20d7648a39 | ||
|
|
ef40e4826d | ||
|
|
c335c741c4 | ||
|
|
8e3868bb4d | ||
|
|
45ed9508af | ||
|
|
932e46f1bd | ||
|
|
96ce5882f4 | ||
|
|
999e4853c4 | ||
|
|
fc1c7db7bd | ||
|
|
0157853f41 | ||
|
|
ef3e5297c6 | ||
|
|
96c4302c11 | ||
|
|
5c5c5b56dd | ||
|
|
07fb6c6451 | ||
|
|
a488ed3a63 | ||
|
|
0815e38add | ||
|
|
93e146a9e2 | ||
|
|
523d7bc43d | ||
|
|
1991df3d93 | ||
|
|
a6080be8fb | ||
|
|
3b0b45c877 | ||
|
|
e2635baada | ||
|
|
afbee165de | ||
|
|
b7d07956af | ||
|
|
99639a817f | ||
|
|
9ac6ebb845 | ||
|
|
cba51c4f2e | ||
|
|
208cc1efeb | ||
|
|
2f159022be | ||
|
|
f63195b311 | ||
|
|
fcf76b8dd5 | ||
|
|
db73257689 | ||
|
|
98d37bf202 | ||
|
|
b11198ba11 | ||
|
|
f2d5ae698a | ||
|
|
38c89a5c53 | ||
|
|
8056459611 | ||
|
|
41c4cca03f | ||
|
|
72821c3537 | ||
|
|
645795502d | ||
|
|
fc04378e18 | ||
|
|
d0b371bf3d | ||
|
|
d30ad7f4d5 | ||
|
|
d2222b8e44 | ||
|
|
8260840c79 | ||
|
|
6380c6732a | ||
|
|
71c55d22f9 | ||
|
|
4196fb6da5 | ||
|
|
fc0984d4a5 | ||
|
|
9f4f55fb95 | ||
|
|
2aa05bc998 | ||
|
|
5807c3e00d | ||
|
|
e7199d3e90 | ||
|
|
f3eb61391b | ||
|
|
4a3ba95063 | ||
|
|
e311789396 | ||
|
|
f57bc13d47 | ||
|
|
4d0b9d556d | ||
|
|
a883c43f16 | ||
|
|
abce4f395c | ||
|
|
5bd967a0b2 | ||
|
|
bcb6da2141 | ||
|
|
8462373f69 | ||
|
|
2d8d999aae | ||
|
|
0200bb9844 | ||
|
|
bb3a29fd7a | ||
|
|
7c3815fff5 | ||
|
|
03b7dc9398 | ||
|
|
b84647c145 | ||
|
|
899fe1c183 | ||
|
|
030088a20f | ||
|
|
cf2ffdb4ac | ||
|
|
808948cdb5 | ||
|
|
d4f542f35a | ||
|
|
9a87eb6a46 | ||
|
|
44068174b7 | ||
|
|
3f7790cec7 | ||
|
|
a23921e59e | ||
|
|
7ff24343bc | ||
|
|
890d41ea0d | ||
|
|
cbfc1b3323 | ||
|
|
428026ceed | ||
|
|
aa63381f2c | ||
|
|
1c2ee43220 | ||
|
|
fd68e7b85b | ||
|
|
a8de4a9d70 | ||
|
|
366377f740 | ||
|
|
cca96f8bfd | ||
|
|
897c6aa15e | ||
|
|
5db557a43e | ||
|
|
332bfe57e9 | ||
|
|
92cd17a819 | ||
|
|
01ca066b12 | ||
|
|
433d15d740 | ||
|
|
64b5b301ac | ||
|
|
278ed4e5c6 | ||
|
|
12a46a64f2 | ||
|
|
be42f1e20d | ||
|
|
eebeef97c8 | ||
|
|
f22f82c584 | ||
|
|
7c694806dd | ||
|
|
d3c297850e | ||
|
|
1a7d83d7ba | ||
|
|
350dfc1510 | ||
|
|
f3e2dc643b | ||
|
|
070697d518 | ||
|
|
355740f62e | ||
|
|
748b0a69a8 | ||
|
|
b7ff38e669 | ||
|
|
085c9feeca | ||
|
|
5fca02ea0c | ||
|
|
d8725e27d4 | ||
|
|
4b9df72b42 | ||
|
|
1aa4f75e8a | ||
|
|
2315f46feb | ||
|
|
b641992810 | ||
|
|
f583b1716c | ||
|
|
9b9a4287ff | ||
|
|
5dc0f41370 | ||
|
|
1558ec7ee9 | ||
|
|
4e4eae71f5 | ||
|
|
892277da5f | ||
|
|
852c29fd21 | ||
|
|
d59ff38178 | ||
|
|
52c1608601 | ||
|
|
5c708d5291 | ||
|
|
a2a1c58ba5 | ||
|
|
0db347ed3b | ||
|
|
d7e378c704 | ||
|
|
179fcd7bba | ||
|
|
7357529794 | ||
|
|
d15790b1a2 | ||
|
|
41b4a291da | ||
|
|
ecc31f2ca7 | ||
|
|
6d237ac653 | ||
|
|
5b549c8bbb | ||
|
|
e87ef42ad5 | ||
|
|
3da9c3e04d | ||
|
|
191513bdd5 | ||
|
|
15cf6fc02a | ||
|
|
0eecd137b1 | ||
|
|
0c64716eb5 | ||
|
|
d314e22a0f | ||
|
|
3a4d69f5f3 | ||
|
|
b7f392bebf | ||
|
|
cdfbf233ee | ||
|
|
ba7a4a4703 | ||
|
|
3b67eefd91 | ||
|
|
9ed054c277 | ||
|
|
93500e1787 | ||
|
|
467c36ad0a | ||
|
|
5f805555b8 | ||
|
|
b3cd894715 | ||
|
|
a37852ce5b | ||
|
|
4ef91e7719 | ||
|
|
56a2bd226c | ||
|
|
5c84c58d2e | ||
|
|
d88c26b3b6 | ||
|
|
84a3c800c9 | ||
|
|
e26685d09a | ||
|
|
cf8960ff4d | ||
|
|
1f716d6c8d | ||
|
|
b4a552301a | ||
|
|
33c882ecb9 | ||
|
|
dd1334a352 | ||
|
|
bab3f47f70 | ||
|
|
d0c367b31f | ||
|
|
e875bf72c9 | ||
|
|
3c55329056 | ||
|
|
a3e3c23cb1 | ||
|
|
fa961d1769 | ||
|
|
44cf597dc9 | ||
|
|
2e3d5300bd | ||
|
|
cb80ce396b | ||
|
|
900ae19a31 | ||
|
|
72f742d99b | ||
|
|
d7dbec973c | ||
|
|
266309ea51 | ||
|
|
9dfc4da688 | ||
|
|
7f134e331a | ||
|
|
87f9c8a005 | ||
|
|
d4faba8e34 | ||
|
|
727cb87c4d | ||
|
|
9d568c7811 | ||
|
|
529a188b8b | ||
|
|
02fad83ca3 | ||
|
|
41578a40b5 | ||
|
|
231315cd11 | ||
|
|
4e1f5a43b3 | ||
|
|
45aae6f25c | ||
|
|
9d0b715ddf | ||
|
|
ff2e915371 | ||
|
|
f2ee9a2e2a | ||
|
|
b51254a975 | ||
|
|
6003abc15f | ||
|
|
b6583d0a71 | ||
|
|
d75142e9dc | ||
|
|
ec88122f13 | ||
|
|
59be7ec370 | ||
|
|
57ff1dba25 | ||
|
|
f5fb718c86 | ||
|
|
d1b5e75f13 | ||
|
|
b9d3ad70d7 | ||
|
|
cb653e6a5d | ||
|
|
1c6c53eb2c | ||
|
|
6d8d933e97 | ||
|
|
0dc2c5ca69 | ||
|
|
586e2845dd | ||
|
|
fdca477148 | ||
|
|
49895b3e2f | ||
|
|
5301d56ae2 | ||
|
|
1eff1948a5 | ||
|
|
547aa5d178 | ||
|
|
0babe0f639 | ||
|
|
8b027c4fbf | ||
|
|
b46e74fe6f | ||
|
|
a855f3b835 | ||
|
|
10d38be7e7 | ||
|
|
08d1926f8b | ||
|
|
bbdc159762 | ||
|
|
bba297b4a4 | ||
|
|
671af4a48c | ||
|
|
27e287978d | ||
|
|
7d79c451ab | ||
|
|
f45f84d7ed | ||
|
|
06b0d02208 | ||
|
|
bc09aadadb | ||
|
|
dda7f3d871 | ||
|
|
7f025f4e16 | ||
|
|
1e904db3b0 | ||
|
|
c013b03300 | ||
|
|
08aa0852b7 | ||
|
|
23f2c1c42d | ||
|
|
53744bf65f | ||
|
|
430fdb17a8 | ||
|
|
b37fdd89bf | ||
|
|
e57bae4f66 | ||
|
|
0587074d61 | ||
|
|
a6e441828a | ||
|
|
cbb148dff4 | ||
|
|
1f4ab12fbb | ||
|
|
0f895bf1b2 | ||
|
|
05af375909 | ||
|
|
92606f2c7f | ||
|
|
2d587b3728 | ||
|
|
48468b08d0 | ||
|
|
31b590c16c | ||
|
|
78bdb2e198 | ||
|
|
c64c10cbf0 | ||
|
|
ae91e1d7f1 | ||
|
|
ca2209dd48 | ||
|
|
354855edc2 | ||
|
|
98087b0773 | ||
|
|
3dfb0aa16a | ||
|
|
18b9bf5b0b | ||
|
|
6f4a13e46f | ||
|
|
eacfb7f301 | ||
|
|
42a8da52d1 | ||
|
|
e8c2761f5b | ||
|
|
0c911b6ffe | ||
|
|
06086f4a7e | ||
|
|
0330cab60b | ||
|
|
a4b373e631 | ||
|
|
1f6b342856 | ||
|
|
175a0b3a13 | ||
|
|
b31a41fb2f | ||
|
|
5e77712607 | ||
|
|
95131842f1 | ||
|
|
1d8cd6505e | ||
|
|
dde8100af9 | ||
|
|
1a8361f8d1 | ||
|
|
4b21be5814 | ||
|
|
cde27e425b | ||
|
|
71e46c4318 | ||
|
|
ef559ffd56 | ||
|
|
71336b75f0 | ||
|
|
2aa28b4ed4 | ||
|
|
c5a210aaaf | ||
|
|
43013180d6 | ||
|
|
fbc4b4c665 | ||
|
|
b5bba8ea40 | ||
|
|
f8aab69542 | ||
|
|
bd0b23b658 | ||
|
|
879773164f | ||
|
|
0e71f74d71 | ||
|
|
d4ec5a832c | ||
|
|
27b2606b4d | ||
|
|
e650919a59 | ||
|
|
12191c9bce | ||
|
|
9084b24162 | ||
|
|
7411ddf127 | ||
|
|
102d54732b | ||
|
|
276971e4fa | ||
|
|
7f6d996caf | ||
|
|
d5ee71294d | ||
|
|
9901421af3 | ||
|
|
8cc97c6045 | ||
|
|
3f47742f62 | ||
|
|
ed4ae15cf8 | ||
|
|
0ab0134dd5 | ||
|
|
14f0820ea4 | ||
|
|
1158496e83 | ||
|
|
24e6cfae03 | ||
|
|
61d09e90db | ||
|
|
19ef68d422 | ||
|
|
c000469738 | ||
|
|
58c295fe50 | ||
|
|
c9b31e318f | ||
|
|
bae167a609 | ||
|
|
1f3187a64e | ||
|
|
a84c3e58fd | ||
|
|
451349a83a | ||
|
|
1191071c97 | ||
|
|
845abd8827 | ||
|
|
5c10bb898c | ||
|
|
fc58e2f9f5 | ||
|
|
a05e19384d | ||
|
|
96071d26df | ||
|
|
30fc90d18b | ||
|
|
8066115162 | ||
|
|
84efcadaef | ||
|
|
f549b9e6e1 | ||
|
|
a639457de2 | ||
|
|
ee06dfa001 | ||
|
|
50a2759494 | ||
|
|
fa52b57aaf | ||
|
|
6e93c2ff06 | ||
|
|
934b08f5cd | ||
|
|
cf808f7f30 | ||
|
|
073273e07b | ||
|
|
8830a96a5b | ||
|
|
3a638115eb | ||
|
|
e30e3208ea | ||
|
|
5d41473916 | ||
|
|
41f9b781b3 | ||
|
|
0b4e78a254 | ||
|
|
d36b532d81 | ||
|
|
84d66f3db3 | ||
|
|
4c3a88527b | ||
|
|
1613d1c3d6 | ||
|
|
d88f30eb3d | ||
|
|
d1a6f6e0cb | ||
|
|
5a67563b9c | ||
|
|
632ecffb12 | ||
|
|
2d8557b92e | ||
|
|
a2d358d896 | ||
|
|
06f2989b91 | ||
|
|
b3a8ec4cd6 | ||
|
|
a01f2b150a | ||
|
|
e7de300e73 | ||
|
|
8ed35599f3 | ||
|
|
32fdadd613 | ||
|
|
abd2afe1f5 | ||
|
|
789cde0a48 | ||
|
|
4a716e2bd5 | ||
|
|
3426afe277 | ||
|
|
2c2a107579 | ||
|
|
0e5f9c8398 | ||
|
|
e01762e302 | ||
|
|
7e6d43f2e0 | ||
|
|
4feb1771cd | ||
|
|
ad589e3b4c | ||
|
|
b19e4e7e32 | ||
|
|
31b44bf445 | ||
|
|
faa4d7370d | ||
|
|
8104d8dd82 | ||
|
|
5b11fae577 | ||
|
|
1b1ee81b21 | ||
|
|
87efc9126a | ||
|
|
d7c34d2bcc | ||
|
|
a7cf6a8277 | ||
|
|
8e94d9247e | ||
|
|
e76ae699d3 | ||
|
|
5a324e6eae | ||
|
|
10e4cc830d | ||
|
|
59ae671635 | ||
|
|
980886ace9 | ||
|
|
74e6b1d499 | ||
|
|
171853966e | ||
|
|
9082655773 | ||
|
|
b46b385c97 | ||
|
|
c415d45310 | ||
|
|
5c26690e26 | ||
|
|
9f4825e253 | ||
|
|
32ac71c499 | ||
|
|
101cd5996c | ||
|
|
0359fc6005 | ||
|
|
1064cda1bd | ||
|
|
33465f55e9 | ||
|
|
0e0762b050 | ||
|
|
262666e870 | ||
|
|
88be2910ce | ||
|
|
c75fb10878 | ||
|
|
20ed2bda8e | ||
|
|
0300ab165a | ||
|
|
8fe3161d7e | ||
|
|
610d83566b | ||
|
|
620deb17d4 | ||
|
|
c781a9f263 | ||
|
|
ff3df98fdf | ||
|
|
976cf67f3f | ||
|
|
cd2cea1e6f | ||
|
|
49820156ad | ||
|
|
cafadfe2fc | ||
|
|
0bd132ffb4 | ||
|
|
09c387dd3a | ||
|
|
b6284527df | ||
|
|
1fa5608196 | ||
|
|
f83757e077 | ||
|
|
7ba305cd72 | ||
|
|
fd33162fc5 | ||
|
|
7194705ba6 | ||
|
|
1bef94548a | ||
|
|
e6ceb0fe6a | ||
|
|
2f52b1143b | ||
|
|
d4798270c1 | ||
|
|
e6ecc6977e | ||
|
|
54594a3a5a | ||
|
|
c9ae2287e7 | ||
|
|
6a0075a0d9 | ||
|
|
131c15e84a | ||
|
|
139cef3f71 | ||
|
|
29dcde44a9 | ||
|
|
0be3a3d510 | ||
|
|
41f7f7ec92 | ||
|
|
194ff2a76c | ||
|
|
6c6ebdfe5c | ||
|
|
6153b10950 | ||
|
|
530914ca89 | ||
|
|
e5113d0e43 | ||
|
|
0d8c2743b8 | ||
|
|
be9046a53e | ||
|
|
e65e644a0f | ||
|
|
f8d10b4428 | ||
|
|
c775ddc60a | ||
|
|
4aef972c9f | ||
|
|
0c2b9693a2 | ||
|
|
e1391531d8 | ||
|
|
d6b010d653 | ||
|
|
eaf5d37349 | ||
|
|
5c230b3b50 | ||
|
|
2adb57d11e | ||
|
|
47f5eccb68 | ||
|
|
e80dcbc58d | ||
|
|
7864dbf77b | ||
|
|
57add311ce | ||
|
|
ccdec15cf8 | ||
|
|
78a3117309 | ||
|
|
934b31bb1f | ||
|
|
7dfb4e1422 | ||
|
|
849ccb0f71 | ||
|
|
23635b2c44 | ||
|
|
0da8b2e292 | ||
|
|
fd962940f0 | ||
|
|
d44fd1fc25 | ||
|
|
c6e27a2803 | ||
|
|
f8d3ac276a | ||
|
|
2963e93679 | ||
|
|
e8f49f1c08 | ||
|
|
27ebcae325 | ||
|
|
eff0d1b71b | ||
|
|
56c966e762 | ||
|
|
63e4311f2e | ||
|
|
ae26ba75f9 | ||
|
|
8b929de8d4 | ||
|
|
5839e78f3e | ||
|
|
549fdb70a7 | ||
|
|
07d0133874 | ||
|
|
61a4546299 | ||
|
|
f90998904e | ||
|
|
72b5b8fe0b | ||
|
|
1e549d3f92 | ||
|
|
b1a2d8708a | ||
|
|
f1c036af5f | ||
|
|
ac5e1d600c | ||
|
|
a6d9a208f2 | ||
|
|
4e995ce9d1 | ||
|
|
9dee330c79 | ||
|
|
fdc03195eb | ||
|
|
67ed8faeec | ||
|
|
536200abd3 | ||
|
|
37fa50ad95 | ||
|
|
9c5d154d85 | ||
|
|
1dbb83d6ec | ||
|
|
896fe14e07 | ||
|
|
3574794cea | ||
|
|
ba91288a28 | ||
|
|
ed44eb9758 | ||
|
|
5f32cecaf1 | ||
|
|
cca764cceb | ||
|
|
fd530693a7 | ||
|
|
ed6fba57ee | ||
|
|
d0b47d84dd | ||
|
|
23bcfb1622 | ||
|
|
b8fca4849f | ||
|
|
f3610a5923 | ||
|
|
aa0e1862af | ||
|
|
cae492bf2c | ||
|
|
9ce169d3f0 | ||
|
|
958579aa25 | ||
|
|
1d9f47e5b1 | ||
|
|
c3d8700c8c | ||
|
|
f5d33c65a9 | ||
|
|
8b940e1571 | ||
|
|
b39decf7e5 | ||
|
|
8064329207 | ||
|
|
9af589e612 | ||
|
|
2edd846525 | ||
|
|
4f861ec281 | ||
|
|
b698664672 | ||
|
|
9acfc97d0a | ||
|
|
9ee5c461a3 | ||
|
|
afc75a9be5 | ||
|
|
4c3cd262eb | ||
|
|
d58f2786e0 | ||
|
|
07f40b07fe | ||
|
|
05fa67b8aa | ||
|
|
bb0a118507 | ||
|
|
b440240952 | ||
|
|
f593eedf20 | ||
|
|
38ca7f71fa | ||
|
|
00b69ecc81 | ||
|
|
d7590fb32f | ||
|
|
c61023ee9d | ||
|
|
f47afca78a | ||
|
|
d9ddb3e20b | ||
|
|
6f692c140d | ||
|
|
905d073f20 | ||
|
|
64a8947f2c | ||
|
|
9257edcd56 | ||
|
|
a04e50c329 | ||
|
|
84bfbbb5c9 | ||
|
|
c16692d216 | ||
|
|
63803b0322 | ||
|
|
58d18a3f0e | ||
|
|
d988aa4291 | ||
|
|
cf1d91b771 | ||
|
|
ed6dd0063c | ||
|
|
2485fd3607 | ||
|
|
4e678448cc | ||
|
|
e47b5a7cce | ||
|
|
11525a9f35 | ||
|
|
cb6a1b8ab4 | ||
|
|
6b97023215 | ||
|
|
d5af21716b | ||
|
|
069a255c6b | ||
|
|
8d20f0cbcf | ||
|
|
cb086a6016 | ||
|
|
3c65b74093 | ||
|
|
7892c95c0b | ||
|
|
8865a01155 | ||
|
|
2b7bea7f17 | ||
|
|
481b87fbfa | ||
|
|
292eb6d30b | ||
|
|
0183200122 | ||
|
|
25c9571a16 | ||
|
|
f2cef3852a | ||
|
|
2699b817ca | ||
|
|
ba1180e7a8 | ||
|
|
eefbab5cbd | ||
|
|
be146bff04 | ||
|
|
820f0b9976 | ||
|
|
12d30d9e28 | ||
|
|
bd821c49f8 | ||
|
|
882499cc66 | ||
|
|
9bfe5d8b56 | ||
|
|
a0ac78c60f | ||
|
|
5d6fcc8939 | ||
|
|
4b9128c444 | ||
|
|
d448321ce9 | ||
|
|
680dadbbe8 | ||
|
|
6c0d706cd9 | ||
|
|
fe75742083 | ||
|
|
ba595302f4 | ||
|
|
7de747cf61 | ||
|
|
539b211b99 | ||
|
|
e776046f66 | ||
|
|
837953074c | ||
|
|
45cb20c9e8 | ||
|
|
426d5f0163 | ||
|
|
e8927ecf51 | ||
|
|
14d9cd0813 | ||
|
|
63841c1861 | ||
|
|
d514f7a982 | ||
|
|
1e9497ddc3 | ||
|
|
dcea5e874d | ||
|
|
7354925566 | ||
|
|
3368768244 | ||
|
|
bd56abc4c3 | ||
|
|
7be5045cbb |
33
.hgtags
33
.hgtags
@@ -565,3 +565,36 @@ deaef57bf366fdab908b97a9760d0fa6e273abcd jdk-11.0.5+6
|
||||
ee7128cf507a670ae84841b202a7a06711608359 jdk-11.0.5+9
|
||||
6385eb06af947d8ec5fd51a4733bc8187efb88b5 jdk-11.0.5+10
|
||||
6385eb06af947d8ec5fd51a4733bc8187efb88b5 jdk-11.0.5-ga
|
||||
6eb89e59a06a2f83f7fe0399da4bf4ca638d46f3 jdk-11.0.6+1
|
||||
8d3e0c2c009815cae59ad3c9bf9e4b1f090efc8b jdk-11.0.6+2
|
||||
f8b2e95a1d41585a757729ed28ce35d43aba1b3f jdk-11.0.6+3
|
||||
577a1fc440666e3c0724e07f6a8d736b2c7905cf jdk-11.0.6+4
|
||||
bfce7426e091127450a70b7d07941c0f9e02d347 jdk-11.0.6+5
|
||||
aa260c24480a2bd7d21ad1c863e6fe9a3973011e jdk-11.0.6+6
|
||||
42500af9232ed5b2990ff618a1e92ef6ccc0b9af jdk-11.0.6+7
|
||||
0c54fb645a7388cb7e3d587b4df75a2edd7826e2 jdk-11.0.6+8
|
||||
1859de77ee6cd7e10ac0b9e71027d9f974a6e481 jdk-11.0.6+9
|
||||
837b7afec083aaddeef0a6c3e6501b2200eaf1d4 jdk-11.0.6+10
|
||||
837b7afec083aaddeef0a6c3e6501b2200eaf1d4 jdk-11.0.6-ga
|
||||
8cdfd6139b1efc9064b10f24a82848b1bb4a0550 jdk-11.0.7+1
|
||||
15cc1c8a63718c394e9cd1f35d735bb74a850084 jdk-11.0.7+2
|
||||
f2d8162261ae3c1e50eb0667b3c9669caa67c652 jdk-11.0.7+3
|
||||
d3d1f7f67de13fd5c227424b9ddc514c0ca32aff jdk-11.0.7+4
|
||||
f03574cfc0d728ca7b5146ca22c707717f9f899f jdk-11.0.7+5
|
||||
17d2e0c27889a00a3df7de9bcea0e8caf0d1771a jdk-11.0.7+6
|
||||
f56b853d452bd339e3f4360cf4be42cc90f9284c jdk-11.0.7+7
|
||||
3c570d183ab2afc0b204a8e980be69e7fbe761ef jdk-11.0.7+8
|
||||
7201cd0c64776aa574d252b03a4c92b25d0a7d7f jdk-11.0.7+9
|
||||
44ce940b344b9f240be4807f5b8f06e178e3aecd jdk-11.0.7+10
|
||||
44ce940b344b9f240be4807f5b8f06e178e3aecd jdk-11.0.7-ga
|
||||
2eb415c82056bdc308d23ee6761f422de46dc5e5 jdk-11.0.8+1
|
||||
88eaa453331e9aeca979d58509538ebb74831ce4 jdk-11.0.8+2
|
||||
2c0c9cfe2a4e1340f7db106e2220dbd0d5b86092 jdk-11.0.8+3
|
||||
aa6c93b4f1acf4166d74d0252b35c53ad71d8540 jdk-11.0.8+4
|
||||
8df1a601187c0b4cb9e525075bd7b85ee3d72595 jdk-11.0.8+5
|
||||
e42c6d1a1993c720a4643140190bb1ba6f1bbf9f jdk-11.0.8+6
|
||||
46d4984bb3c6dd1b0f5135505b77921d23c69841 jdk-11.0.8+7
|
||||
40b646e9d8fbb2d70992b61e4f4b08ca5652c907 jdk-11.0.8+8
|
||||
59f8565ee5e224697a9e09ee2c557836733bc579 jdk-11.0.8+9
|
||||
0b0d55cb09b29360ab254edeef32a3b386e9713e jdk-11.0.8+10
|
||||
0b0d55cb09b29360ab254edeef32a3b386e9713e jdk-11.0.8-ga
|
||||
|
||||
14
.idea/vcs.xml
generated
14
.idea/vcs.xml
generated
@@ -1,5 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="IssueNavigationConfiguration">
|
||||
<option name="links">
|
||||
<list>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="[A-Z]+\-\d+" />
|
||||
<option name="linkRegexp" value="http://youtrack.jetbrains.com/issue/$0" />
|
||||
</IssueNavigationLink>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="(\d+)\:" />
|
||||
<option name="linkRegexp" value="https://bugs.openjdk.java.net/browse/JDK-$1" />
|
||||
</IssueNavigationLink>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
|Windows-x64 |macOS |Linux-x64 |
|
||||
|-------------|-------------|-------------|
|
||||
|<a href="https://bintray.com/jetbrains/intellij-jdk/openjdk9-windows-x64/_latestVersion"> <img src="https://api.bintray.com/packages/jetbrains/intellij-jdk/openjdk9-windows-x64/images/download.svg"/></a>|<a href="https://bintray.com/jetbrains/intellij-jdk/openjdk9-osx-x64/_latestVersion"> <img src="https://api.bintray.com/packages/jetbrains/intellij-jdk/openjdk9-osx-x64/images/download.svg"/></a>|<a href="https://bintray.com/jetbrains/intellij-jdk/openjdk9-linux-x64/_latestVersion"><img src="https://api.bintray.com/packages/jetbrains/intellij-jdk/openjdk9-linux-x64/images/download.svg"/></a>|
|
||||
|[  ](https://bintray.com/jetbrains/intellij-jdk/openjdk11-windows-x64/_latestVersion)|[  ](https://bintray.com/jetbrains/intellij-jdk/openjdk11-osx-x64/_latestVersion)|[  ](https://bintray.com/jetbrains/intellij-jdk/openjdk11-linux-x64/_latestVersion)|
|
||||
|
||||
|
||||
# How JetBrains Runtime is organised
|
||||
@@ -75,7 +75,7 @@ First command will set env vars, the second will run cygwin shell with proper en
|
||||
In cygwin shell
|
||||
```
|
||||
cd JetBrainsRuntime
|
||||
./configure --disable-warnings-as-errors
|
||||
bash configure --enable-option-checking=fatal --with-toolchain-version=2015 --with-boot-jdk="/cygdrive/c/Program Files/Java/jdk-11.0.5" --disable-warnings-as-errors
|
||||
make images
|
||||
```
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">Windows</td>
|
||||
<td style="text-align: left;">Microsoft Visual Studio 2017 update 15.5.5</td>
|
||||
<td style="text-align: left;">Microsoft Visual Studio 2017 update 15.9.16</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -369,10 +369,10 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
|
||||
<p>On Linux you can also get a JDK from the Linux distribution. On apt-based distros (like Debian and Ubuntu), <code>sudo apt-get install openjdk-<VERSION>-jdk</code> is typically enough to install a JDK <VERSION>. On rpm-based distros (like Fedora and Red Hat), try <code>sudo yum install java-<VERSION>-openjdk-devel</code>.</p>
|
||||
<h2 id="external-library-requirements">External Library Requirements</h2>
|
||||
<p>Different platforms require different external libraries. In general, libraries are not optional - that is, they are either required or not used.</p>
|
||||
<p>If a required library is not detected by <code>configure</code>, you need to provide the path to it. There are two forms of the <code>configure</code> arguments to point to an external library: <code>--with-<LIB>=<path></code> or <code>--with-<LIB>-include=<path to include> --with-<LIB>-lib=<path to lib></code>. The first variant is more concise, but require the include files an library files to reside in a default hierarchy under this directory. In most cases, it works fine.</p>
|
||||
<p>If a required library is not detected by <code>configure</code>, you need to provide the path to it. There are two forms of the <code>configure</code> arguments to point to an external library: <code>--with-<LIB>=<path></code> or <code>--with-<LIB>-include=<path to include> --with-<LIB>-lib=<path to lib></code>. The first variant is more concise, but require the include files and library files to reside in a default hierarchy under this directory. In most cases, it works fine.</p>
|
||||
<p>As a fallback, the second version allows you to point to the include directory and the lib directory separately.</p>
|
||||
<h3 id="freetype">FreeType</h3>
|
||||
<p>FreeType2 from <a href="http://www.freetype.org/">The FreeType Project</a> is not required on any platform. The exception is on Unix-based platforms when configuring such that the build artifacts will reference a system installed library, rather than bundling the JDK’s own copy.</p>
|
||||
<p>FreeType2 from <a href="http://www.freetype.org/">The FreeType Project</a> is not required on any platform. The exception is on Unix-based platforms when configuring such that the build artifacts will reference a system installed library, rather than bundling the JDK's own copy.</p>
|
||||
<ul>
|
||||
<li>To install on an apt-based Linux, try running <code>sudo apt-get install libfreetype6-dev</code>.</li>
|
||||
<li>To install on an rpm-based Linux, try running <code>sudo yum install freetype-devel</code>.</li>
|
||||
@@ -433,7 +433,7 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
|
||||
<p>To build the JDK, you need a "configuration", which consists of a directory where to store the build output, coupled with information about the platform, the specific build machine, and choices that affect how the JDK is built.</p>
|
||||
<p>The configuration is created by the <code>configure</code> script. The basic invocation of the <code>configure</code> script looks like this:</p>
|
||||
<pre><code>bash configure [options]</code></pre>
|
||||
<p>This will create an output directory containing the configuration and setup an area for the build result. This directory typically looks like <code>build/linux-x64-normal-server-release</code>, but the actual name depends on your specific configuration. (It can also be set directly, see <a href="#using-multiple-configurations">Using Multiple Configurations</a>). This directory is referred to as <code>$BUILD</code> in this documentation.</p>
|
||||
<p>This will create an output directory containing the configuration and setup an area for the build result. This directory typically looks like <code>build/linux-x64-server-release</code>, but the actual name depends on your specific configuration. (It can also be set directly, see <a href="#using-multiple-configurations">Using Multiple Configurations</a>). This directory is referred to as <code>$BUILD</code> in this documentation.</p>
|
||||
<p><code>configure</code> will try to figure out what system you are running on and where all necessary build components are. If you have all prerequisites for building installed, it should find everything. If it fails to detect any component automatically, it will exit and inform you about the problem.</p>
|
||||
<p>Some command line examples:</p>
|
||||
<ul>
|
||||
|
||||
@@ -293,7 +293,7 @@ issues.
|
||||
Linux gcc 7.3.0
|
||||
macOS Apple Xcode 9.4 (using clang 9.1.0)
|
||||
Solaris Oracle Solaris Studio 12.4 (with compiler version 5.13)
|
||||
Windows Microsoft Visual Studio 2017 update 15.5.5
|
||||
Windows Microsoft Visual Studio 2017 update 15.9.16
|
||||
|
||||
### gcc
|
||||
|
||||
@@ -436,8 +436,8 @@ If a required library is not detected by `configure`, you need to provide the
|
||||
path to it. There are two forms of the `configure` arguments to point to an
|
||||
external library: `--with-<LIB>=<path>` or `--with-<LIB>-include=<path to
|
||||
include> --with-<LIB>-lib=<path to lib>`. The first variant is more concise,
|
||||
but require the include files an library files to reside in a default hierarchy
|
||||
under this directory. In most cases, it works fine.
|
||||
but require the include files and library files to reside in a default
|
||||
hierarchy under this directory. In most cases, it works fine.
|
||||
|
||||
As a fallback, the second version allows you to point to the include directory
|
||||
and the lib directory separately.
|
||||
@@ -447,7 +447,7 @@ and the lib directory separately.
|
||||
FreeType2 from [The FreeType Project](http://www.freetype.org/) is not required
|
||||
on any platform. The exception is on Unix-based platforms when configuring such
|
||||
that the build artifacts will reference a system installed library,
|
||||
rather than bundling the JDK’s own copy.
|
||||
rather than bundling the JDK's own copy.
|
||||
|
||||
* To install on an apt-based Linux, try running `sudo apt-get install
|
||||
libfreetype6-dev`.
|
||||
@@ -586,8 +586,8 @@ bash configure [options]
|
||||
|
||||
This will create an output directory containing the configuration and setup an
|
||||
area for the build result. This directory typically looks like
|
||||
`build/linux-x64-normal-server-release`, but the actual name depends on your
|
||||
specific configuration. (It can also be set directly, see [Using Multiple
|
||||
`build/linux-x64-server-release`, but the actual name depends on your specific
|
||||
configuration. (It can also be set directly, see [Using Multiple
|
||||
Configurations](#using-multiple-configurations)). This directory is referred to
|
||||
as `$BUILD` in this documentation.
|
||||
|
||||
|
||||
54
doc/ide.html
Normal file
54
doc/ide.html
Normal file
@@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<title>IDE support in the JDK</title>
|
||||
<style type="text/css">
|
||||
code{white-space: pre-wrap;}
|
||||
span.smallcaps{font-variant: small-caps;}
|
||||
span.underline{text-decoration: underline;}
|
||||
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<header id="title-block-header">
|
||||
<h1 class="title">IDE support in the JDK</h1>
|
||||
</header>
|
||||
<nav id="TOC">
|
||||
<ul>
|
||||
<li><a href="#introduction">Introduction</a><ul>
|
||||
<li><a href="#ide-support-for-native-code">IDE support for native code</a></li>
|
||||
<li><a href="#ide-support-for-java-code">IDE support for Java code</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<h2 id="introduction">Introduction</h2>
|
||||
<p>When you are familiar with building and testing the JDK, you may want to configure an IDE to work with the source code. The instructions differ a bit depending on whether you are interested in working with the native (C/C++) or the Java code.</p>
|
||||
<h3 id="ide-support-for-native-code">IDE support for native code</h3>
|
||||
<p>There are a few ways to generate IDE configuration for the native sources, depending on which IDE to use.</p>
|
||||
<h4 id="visual-studio-code">Visual Studio Code</h4>
|
||||
<p>The make system can generate a <a href="https://code.visualstudio.com">Visual Studio Code</a> workspace that has C/C++ source indexing configured correctly, as well as launcher targets for tests and the Java launcher. After configuring, a workspace for the configuration can be generated using:</p>
|
||||
<pre class="shell"><code>make vscode-project</code></pre>
|
||||
<p>This creates a file called <code>jdk.code-workspace</code> in the build output folder. The full location will be printed after the workspace has been generated. To use it, choose <code>File -> Open Workspace...</code> in Visual Studio Code.</p>
|
||||
<h5 id="alternative-indexers">Alternative indexers</h5>
|
||||
<p>The main <code>vscode-project</code> target configures the default C++ support in Visual Studio Code. There are also other source indexers that can be installed, that may provide additional features. It's currently possible to generate configuration for two such indexers, <a href="https://clang.llvm.org/extra/clangd/">clangd</a> and <a href="https://github.com/Andersbakken/rtags">rtags</a>. These can be configured by appending the name of the indexer to the make target, such as:</p>
|
||||
<pre class="shell"><code>make vscode-project-clangd</code></pre>
|
||||
<p>Additional instructions for configuring the given indexer will be displayed after the workspace has been generated.</p>
|
||||
<h4 id="visual-studio">Visual Studio</h4>
|
||||
<p>This section is a work in progress.</p>
|
||||
<pre class="shell"><code>make ide-project</code></pre>
|
||||
<h4 id="compilation-database">Compilation Database</h4>
|
||||
<p>The make system can generate generic native code indexing support in the form of a <a href="https://clang.llvm.org/docs/JSONCompilationDatabase.html">Compilation Database</a> that can be used by many different IDEs and source code indexers.</p>
|
||||
<pre class="shell"><code>make compile-commands</code></pre>
|
||||
<p>It's also possible to generate the Compilation Database for the HotSpot source code only, which is a bit faster as it includes less information.</p>
|
||||
<pre class="shell"><code>make compile-commands-hotspot</code></pre>
|
||||
<h3 id="ide-support-for-java-code">IDE support for Java code</h3>
|
||||
<p>This section is a work in progress.</p>
|
||||
</body>
|
||||
</html>
|
||||
73
doc/ide.md
Normal file
73
doc/ide.md
Normal file
@@ -0,0 +1,73 @@
|
||||
% IDE support in the JDK
|
||||
|
||||
## Introduction
|
||||
|
||||
When you are familiar with building and testing the JDK, you may want to
|
||||
configure an IDE to work with the source code. The instructions differ a bit
|
||||
depending on whether you are interested in working with the native (C/C++) or
|
||||
the Java code.
|
||||
|
||||
### IDE support for native code
|
||||
|
||||
There are a few ways to generate IDE configuration for the native sources,
|
||||
depending on which IDE to use.
|
||||
|
||||
#### Visual Studio Code
|
||||
|
||||
The make system can generate a [Visual Studio Code](https://code.visualstudio.com)
|
||||
workspace that has C/C++ source indexing configured correctly, as well as
|
||||
launcher targets for tests and the Java launcher. After configuring, a workspace
|
||||
for the configuration can be generated using:
|
||||
|
||||
```shell
|
||||
make vscode-project
|
||||
```
|
||||
|
||||
This creates a file called `jdk.code-workspace` in the build output folder. The
|
||||
full location will be printed after the workspace has been generated. To use it,
|
||||
choose `File -> Open Workspace...` in Visual Studio Code.
|
||||
|
||||
##### Alternative indexers
|
||||
|
||||
The main `vscode-project` target configures the default C++ support in Visual
|
||||
Studio Code. There are also other source indexers that can be installed, that
|
||||
may provide additional features. It's currently possible to generate
|
||||
configuration for two such indexers, [clangd](https://clang.llvm.org/extra/clangd/)
|
||||
and [rtags](https://github.com/Andersbakken/rtags). These can be configured by
|
||||
appending the name of the indexer to the make target, such as:
|
||||
|
||||
```shell
|
||||
make vscode-project-clangd
|
||||
```
|
||||
|
||||
Additional instructions for configuring the given indexer will be displayed
|
||||
after the workspace has been generated.
|
||||
|
||||
#### Visual Studio
|
||||
|
||||
This section is a work in progress.
|
||||
|
||||
```shell
|
||||
make ide-project
|
||||
```
|
||||
|
||||
#### Compilation Database
|
||||
|
||||
The make system can generate generic native code indexing support in the form of
|
||||
a [Compilation Database](https://clang.llvm.org/docs/JSONCompilationDatabase.html)
|
||||
that can be used by many different IDEs and source code indexers.
|
||||
|
||||
```shell
|
||||
make compile-commands
|
||||
```
|
||||
|
||||
It's also possible to generate the Compilation Database for the HotSpot source
|
||||
code only, which is a bit faster as it includes less information.
|
||||
|
||||
```shell
|
||||
make compile-commands-hotspot
|
||||
```
|
||||
|
||||
### IDE support for Java code
|
||||
|
||||
This section is a work in progress.
|
||||
@@ -11,14 +11,14 @@
|
||||
span.underline{text-decoration: underline;}
|
||||
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css">
|
||||
<link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<style type="text/css">pre, code, tt { color: #1d6ae5; }</style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<header id="title-block-header">
|
||||
<h1 class="title">Testing the JDK</h1>
|
||||
</header>
|
||||
<nav id="TOC">
|
||||
@@ -32,11 +32,13 @@
|
||||
</ul></li>
|
||||
<li><a href="#test-results-and-summary">Test results and summary</a></li>
|
||||
<li><a href="#test-suite-control">Test suite control</a><ul>
|
||||
<li><a href="#general-keywords-test_opts">General keywords (TEST_OPTS)</a></li>
|
||||
<li><a href="#jtreg-keywords">JTReg keywords</a></li>
|
||||
<li><a href="#gtest-keywords">Gtest keywords</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#notes-for-specific-tests">Notes for Specific Tests</a><ul>
|
||||
<li><a href="#docker-tests">Docker Tests</a></li>
|
||||
<li><a href="#client-ui-tests">Client UI Tests</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -89,11 +91,24 @@ TEST FAILURE</code></pre>
|
||||
<p>To separate multiple keyword=value pairs, use <code>;</code> (semicolon). Since the shell normally eats <code>;</code>, the recommended usage is to write the assignment inside qoutes, e.g. <code>JTREG="...;..."</code>. This will also make sure spaces are preserved, as in <code>JTREG="VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"</code>.</p>
|
||||
<p>(Other ways are possible, e.g. using backslash: <code>JTREG=JOBS=1\;TIMEOUT=8</code>. Also, as a special technique, the string <code>%20</code> will be replaced with space for certain options, e.g. <code>JTREG=VM_OPTIONS=-XshowSettings%20-Xlog:gc+ref=debug</code>. This can be useful if you have layers of scripts and have trouble getting proper quoting of command line arguments through.)</p>
|
||||
<p>As far as possible, the names of the keywords have been standardized between test suites.</p>
|
||||
<h3 id="jtreg-keywords">JTReg keywords</h3>
|
||||
<h3 id="general-keywords-test_opts">General keywords (TEST_OPTS)</h3>
|
||||
<p>Some keywords are valid across different test suites. If you want to run tests from multiple test suites, or just don’t want to care which test suite specific control variable to use, then you can use the general TEST_OPTS control variable.</p>
|
||||
<p>There are also some keywords that applies globally to the test runner system, not to any specific test suites. These are also available as TEST_OPTS keywords.</p>
|
||||
<h4 id="jobs">JOBS</h4>
|
||||
<p>Currently only applies to JTReg.</p>
|
||||
<h4 id="timeout_factor">TIMEOUT_FACTOR</h4>
|
||||
<p>Currently only applies to JTReg.</p>
|
||||
<h4 id="vm_options">VM_OPTIONS</h4>
|
||||
<p>Applies to JTReg, GTest and Micro.</p>
|
||||
<h4 id="java_options">JAVA_OPTIONS</h4>
|
||||
<p>Applies to JTReg, GTest and Micro.</p>
|
||||
<h4 id="aot_modules">AOT_MODULES</h4>
|
||||
<p>Applies to JTReg and GTest.</p>
|
||||
<h3 id="jtreg-keywords">JTReg keywords</h3>
|
||||
<h4 id="jobs-1">JOBS</h4>
|
||||
<p>The test concurrency (<code>-concurrency</code>).</p>
|
||||
<p>Defaults to TEST_JOBS (if set by <code>--with-test-jobs=</code>), otherwise it defaults to JOBS, except for Hotspot, where the default is <em>number of CPU cores/2</em>, but never more than 12.</p>
|
||||
<h4 id="timeout">TIMEOUT</h4>
|
||||
<h4 id="timeout_factor-1">TIMEOUT_FACTOR</h4>
|
||||
<p>The timeout factor (<code>-timeoutFactor</code>).</p>
|
||||
<p>Defaults to 4.</p>
|
||||
<h4 id="test_mode">TEST_MODE</h4>
|
||||
@@ -112,13 +127,21 @@ TEST FAILURE</code></pre>
|
||||
<p>Limit memory consumption (<code>-Xmx</code> and <code>-vmoption:-Xmx</code>, or none).</p>
|
||||
<p>Limit memory consumption for JTReg test framework and VM under test. Set to 0 to disable the limits.</p>
|
||||
<p>Defaults to 512m, except for hotspot, where it defaults to 0 (no limit).</p>
|
||||
<h4 id="keywords">KEYWORDS</h4>
|
||||
<p>JTReg kewords sent to JTReg using <code>-k</code>. Please be careful in making sure that spaces and special characters (like <code>!</code>) are properly quoted. To avoid some issues, the special value <code>%20</code> can be used instead of space.</p>
|
||||
<h4 id="extra_problem_lists">EXTRA_PROBLEM_LISTS</h4>
|
||||
<p>Use additional problem lists file or files, in addition to the default ProblemList.txt located at the JTReg test roots.</p>
|
||||
<p>If multiple file names are specified, they should be separated by space (or, to help avoid quoting issues, the special value <code>%20</code>).</p>
|
||||
<p>The file names should be either absolute, or relative to the JTReg test root of the tests to be run.</p>
|
||||
<h4 id="options">OPTIONS</h4>
|
||||
<p>Additional options to the JTReg test framework.</p>
|
||||
<p>Use <code>JTREG="OPTIONS=--help all"</code> to see all available JTReg options.</p>
|
||||
<h4 id="java_options">JAVA_OPTIONS</h4>
|
||||
<h4 id="java_options-1">JAVA_OPTIONS</h4>
|
||||
<p>Additional Java options to JTReg (<code>-javaoption</code>).</p>
|
||||
<h4 id="vm_options">VM_OPTIONS</h4>
|
||||
<h4 id="vm_options-1">VM_OPTIONS</h4>
|
||||
<p>Additional VM options to JTReg (<code>-vmoption</code>).</p>
|
||||
<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>
|
||||
<h3 id="gtest-keywords">Gtest keywords</h3>
|
||||
<h4 id="repeat">REPEAT</h4>
|
||||
<p>The number of times to repeat the tests (<code>--gtest_repeat</code>).</p>
|
||||
@@ -126,11 +149,23 @@ TEST FAILURE</code></pre>
|
||||
<h4 id="options-1">OPTIONS</h4>
|
||||
<p>Additional options to the Gtest test framework.</p>
|
||||
<p>Use <code>GTEST="OPTIONS=--help"</code> to see all available Gtest options.</p>
|
||||
<h4 id="aot_modules-2">AOT_MODULES</h4>
|
||||
<p>Generate AOT modules before testing for the specified module, or set of modules. If multiple modules are specified, they should be separated by space (or, to help avoid quoting issues, the special value <code>%20</code>).</p>
|
||||
<h2 id="notes-for-specific-tests">Notes for Specific Tests</h2>
|
||||
<h3 id="docker-tests">Docker Tests</h3>
|
||||
<p>Docker tests with default parameters may fail on systems with glibc versions not compatible with the one used in the default docker image (e.g., Oracle Linux 7.6 for x86). For example, they pass on Ubuntu 16.04 but fail on Ubuntu 18.04 if run like this on x86:</p>
|
||||
<pre><code>$ make run-test TEST="jtreg:test/hotspot/jtreg/containers/docker"</code></pre>
|
||||
<p>To run these tests correctly, additional parameters for the correct docker image are required on Ubuntu 18.04 by using <code>JAVA_OPTIONS</code>.</p>
|
||||
<pre><code>$ make run-test TEST="jtreg:test/hotspot/jtreg/containers/docker" JTREG="JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu -Djdk.test.docker.image.version=latest"</code></pre>
|
||||
<h3 id="client-ui-tests">Client UI Tests</h3>
|
||||
<p>Some Client UI tests use key sequences which may be reserved by the operating system. Usually that causes the test failure. So it is highly recommended to disable system key shortcuts prior testing. The steps to access and disable system key shortcuts for various platforms are provided below.</p>
|
||||
<h4 id="macos">MacOS</h4>
|
||||
<p>Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts; select or deselect desired shortcut.</p>
|
||||
<p>For example, test/jdk/javax/swing/TooltipManager/JMenuItemToolTipKeyBindingsTest/JMenuItemToolTipKeyBindingsTest.java fails on MacOS because it uses <code>CTRL + F1</code> key sequence to show or hide tooltip message but the key combination is reserved by the operating system. To run the test correctly the default global key shortcut should be disabled using the steps described above, and then deselect “Turn keyboard access on or off” option which is responsible for <code>CTRL + F1</code> combination.</p>
|
||||
<h4 id="linux">Linux</h4>
|
||||
<p>Open the Activities overview and start typing Settings; Choose Settings, click Devices, then click Keyboard; set or override desired shortcut.</p>
|
||||
<h4 id="windows">Windows</h4>
|
||||
<p>Type <code>gpedit</code> in the Search and then click Edit group policy; navigate to User Configuration -> Administrative Templates -> Windows Components -> File Explorer; in the right-side pane look for “Turn off Windows key hotkeys” and double click on it; enable or disable hotkeys.</p>
|
||||
<p>Note: restart is required to make the settings take effect.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -162,6 +162,35 @@ proper quoting of command line arguments through.)
|
||||
As far as possible, the names of the keywords have been standardized between
|
||||
test suites.
|
||||
|
||||
### General keywords (TEST_OPTS)
|
||||
|
||||
Some keywords are valid across different test suites. If you want to run
|
||||
tests from multiple test suites, or just don't want to care which test suite specific
|
||||
control variable to use, then you can use the general TEST_OPTS control variable.
|
||||
|
||||
There are also some keywords that applies globally to the test runner system,
|
||||
not to any specific test suites. These are also available as TEST_OPTS keywords.
|
||||
|
||||
#### JOBS
|
||||
|
||||
Currently only applies to JTReg.
|
||||
|
||||
#### TIMEOUT_FACTOR
|
||||
|
||||
Currently only applies to JTReg.
|
||||
|
||||
#### VM_OPTIONS
|
||||
|
||||
Applies to JTReg, GTest and Micro.
|
||||
|
||||
#### JAVA_OPTIONS
|
||||
|
||||
Applies to JTReg, GTest and Micro.
|
||||
|
||||
#### AOT_MODULES
|
||||
|
||||
Applies to JTReg and GTest.
|
||||
|
||||
### JTReg keywords
|
||||
|
||||
#### JOBS
|
||||
@@ -171,7 +200,7 @@ Defaults to TEST_JOBS (if set by `--with-test-jobs=`), otherwise it defaults to
|
||||
JOBS, except for Hotspot, where the default is *number of CPU cores/2*, but
|
||||
never more than 12.
|
||||
|
||||
#### TIMEOUT
|
||||
#### TIMEOUT_FACTOR
|
||||
The timeout factor (`-timeoutFactor`).
|
||||
|
||||
Defaults to 4.
|
||||
@@ -205,6 +234,24 @@ to disable the limits.
|
||||
|
||||
Defaults to 512m, except for hotspot, where it defaults to 0 (no limit).
|
||||
|
||||
#### KEYWORDS
|
||||
|
||||
JTReg kewords sent to JTReg using `-k`. Please be careful in making sure that
|
||||
spaces and special characters (like `!`) are properly quoted. To avoid some
|
||||
issues, the special value `%20` can be used instead of space.
|
||||
|
||||
#### EXTRA_PROBLEM_LISTS
|
||||
|
||||
Use additional problem lists file or files, in addition to the default
|
||||
ProblemList.txt located at the JTReg test roots.
|
||||
|
||||
If multiple file names are specified, they should be separated by space (or, to
|
||||
help avoid quoting issues, the special value `%20`).
|
||||
|
||||
The file names should be either absolute, or relative to the JTReg test root of
|
||||
the tests to be run.
|
||||
|
||||
|
||||
#### OPTIONS
|
||||
Additional options to the JTReg test framework.
|
||||
|
||||
@@ -216,6 +263,12 @@ Additional Java options to JTReg (`-javaoption`).
|
||||
#### VM_OPTIONS
|
||||
Additional VM options to JTReg (`-vmoption`).
|
||||
|
||||
#### AOT_MODULES
|
||||
|
||||
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 `%20`).
|
||||
|
||||
### Gtest keywords
|
||||
|
||||
#### REPEAT
|
||||
@@ -230,6 +283,12 @@ Additional options to the Gtest test framework.
|
||||
|
||||
Use `GTEST="OPTIONS=--help"` to see all available Gtest options.
|
||||
|
||||
#### AOT_MODULES
|
||||
|
||||
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 `%20`).
|
||||
|
||||
## Notes for Specific Tests
|
||||
|
||||
### Docker Tests
|
||||
@@ -245,6 +304,35 @@ required on Ubuntu 18.04 by using `JAVA_OPTIONS`.
|
||||
|
||||
$ make run-test TEST="jtreg:test/hotspot/jtreg/containers/docker" JTREG="JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu -Djdk.test.docker.image.version=latest"
|
||||
|
||||
### Client UI Tests
|
||||
|
||||
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.
|
||||
|
||||
#### MacOS
|
||||
Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts;
|
||||
select or deselect desired shortcut.
|
||||
|
||||
For example, test/jdk/javax/swing/TooltipManager/JMenuItemToolTipKeyBindingsTest/JMenuItemToolTipKeyBindingsTest.java fails
|
||||
on MacOS because it uses `CTRL + F1` 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 `CTRL + F1` combination.
|
||||
|
||||
#### Linux
|
||||
Open the Activities overview and start typing Settings; Choose Settings, click Devices,
|
||||
then click Keyboard; set or override desired shortcut.
|
||||
|
||||
#### Windows
|
||||
Type `gpedit` 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.
|
||||
|
||||
Note: restart is required to make the settings take effect.
|
||||
|
||||
---
|
||||
# Override some definitions in the global css file that are not optimal for
|
||||
# this document.
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
# jetbrains/runtime:jbr11env
|
||||
# jetbrains/runtime:jbr11dev8env
|
||||
FROM centos:7
|
||||
|
||||
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
|
||||
RUN yum -y install centos-release-scl
|
||||
RUN yum -y install devtoolset-8
|
||||
RUN yum -y install zip bzip2 unzip tar wget make autoconf automake libtool alsa-devel cups-devel xorg-x11-devel libjpeg62-devel giflib-devel freetype-devel file which libXtst-devel libXt-devel libXrender-devel alsa-lib-devel fontconfig-devel libXrandr-devel libXi-devel git
|
||||
# Install Java 11
|
||||
RUN wget https://bintray.com/jetbrains/intellij-jbr/download_file?file_path=jbrsdk-11_0_3-linux-x64-b360.2.tar.gz \
|
||||
-O - | tar xz -C /
|
||||
ENV JAVA_HOME /jbrsdk
|
||||
ENV PATH $JAVA_HOME/bin:$PATH
|
||||
ENV PATH $JAVA_HOME/bin:/opt/rh/devtoolset-8/root/usr/bin:$PATH
|
||||
RUN mkdir .git
|
||||
RUN git config user.email "builduser@jetbrains.com"
|
||||
RUN git config user.name "builduser"
|
||||
|
||||
@@ -495,7 +495,6 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/cpu/aarch64/vtableStubs_aarch64.cpp
|
||||
../../../src/hotspot/cpu/aarch64/relocInfo_aarch64.hpp
|
||||
../../../src/hotspot/cpu/aarch64/vm_version_aarch64.hpp
|
||||
../../../src/hotspot/cpu/aarch64/cpustate_aarch64.hpp
|
||||
../../../src/hotspot/cpu/aarch64/immediate_aarch64.cpp
|
||||
../../../src/hotspot/cpu/aarch64/vmreg_aarch64.cpp
|
||||
../../../src/hotspot/cpu/aarch64/jniFastGetField_aarch64.cpp
|
||||
@@ -520,7 +519,6 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.hpp
|
||||
../../../src/hotspot/cpu/aarch64/templateTable_aarch64.cpp
|
||||
../../../src/hotspot/cpu/aarch64/vmStructs_aarch64.hpp
|
||||
../../../src/hotspot/cpu/aarch64/decode_aarch64.hpp
|
||||
../../../src/hotspot/cpu/aarch64/c1_CodeStubs_aarch64.cpp
|
||||
../../../src/hotspot/cpu/aarch64/nativeInst_aarch64.hpp
|
||||
../../../src/hotspot/cpu/aarch64/codeBuffer_aarch64.hpp
|
||||
@@ -529,7 +527,6 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/cpu/aarch64/assembler_aarch64.cpp
|
||||
../../../src/hotspot/cpu/aarch64/register_aarch64.cpp
|
||||
../../../src/hotspot/cpu/aarch64/vm_version_ext_aarch64.cpp
|
||||
../../../src/hotspot/cpu/aarch64/aarch64_call.cpp
|
||||
../../../src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp
|
||||
../../../src/hotspot/cpu/aarch64/bytecodes_aarch64.hpp
|
||||
../../../src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.hpp
|
||||
@@ -1175,13 +1172,11 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/share/jfr/recorder/stringpool/jfrStringPoolBuffer.hpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.cpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.hpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrChunkSizeNotifier.hpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrChunkState.hpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrRepository.cpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrChunkState.cpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrRepository.hpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.hpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrChunkSizeNotifier.cpp
|
||||
../../../src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp
|
||||
../../../src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointBlob.hpp
|
||||
../../../src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointWriter.cpp
|
||||
@@ -1254,7 +1249,6 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleDescription.hpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.hpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/leakProfiler.hpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/emitEventOperation.hpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/sampling/objectSample.hpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/sampling/objectSampler.hpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/sampling/sampleList.cpp
|
||||
@@ -1270,7 +1264,6 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/share/jfr/leakprofiler/utilities/rootType.hpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/utilities/unifiedOop.hpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/startOperation.hpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/emitEventOperation.cpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/chains/edgeUtils.cpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/chains/rootSetClosure.cpp
|
||||
../../../src/hotspot/share/jfr/leakprofiler/chains/edge.hpp
|
||||
@@ -1481,7 +1474,6 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/share/runtime/basicLock.hpp
|
||||
../../../src/hotspot/share/runtime/compilationPolicy.cpp
|
||||
../../../src/hotspot/share/runtime/java.hpp
|
||||
../../../src/hotspot/share/runtime/simpleThresholdPolicy.cpp
|
||||
../../../src/hotspot/share/runtime/objectMonitor.inline.hpp
|
||||
../../../src/hotspot/share/runtime/mutexLocker.cpp
|
||||
../../../src/hotspot/share/runtime/serviceThread.cpp
|
||||
@@ -1524,7 +1516,6 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/share/runtime/compilationPolicy.hpp
|
||||
../../../src/hotspot/share/runtime/basicLock.cpp
|
||||
../../../src/hotspot/share/runtime/java.cpp
|
||||
../../../src/hotspot/share/runtime/simpleThresholdPolicy.hpp
|
||||
../../../src/hotspot/share/runtime/perfData.inline.hpp
|
||||
../../../src/hotspot/share/runtime/statSampler.hpp
|
||||
../../../src/hotspot/share/runtime/vm_operations.cpp
|
||||
@@ -1557,7 +1548,6 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/share/runtime/handshake.hpp
|
||||
../../../src/hotspot/share/runtime/thread.inline.hpp
|
||||
../../../src/hotspot/share/runtime/perfMemory.hpp
|
||||
../../../src/hotspot/share/runtime/simpleThresholdPolicy.inline.hpp
|
||||
../../../src/hotspot/share/runtime/javaCalls.cpp
|
||||
../../../src/hotspot/share/runtime/reflection.cpp
|
||||
../../../src/hotspot/share/runtime/icache.cpp
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
set(CMAKE_CXX_STANDARD 98)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE -D_REENTRANT -DVM_LITTLE_ENDIAN -D_LP64 -DTARGET_ARCH_x86 ")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DINCLUDE_SUFFIX_CPU=_x86 -DAMD64 -DHOTSPOT_LIB_ARCH='amd64' -DCOMPILER1 -DCOMPILER2")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFT2_BUILD_LIBRARY")
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTARGET_COMPILER_gcc")
|
||||
@@ -16,15 +17,55 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_ALLBSD_SOURCE -DTARGET_OS_FAMILY_bsd")
|
||||
endif ()
|
||||
|
||||
if ("${CMAKE_SYSTEM_NAME}" MATCHES "CYGWIN") #not shure about TARGET_COMPILER
|
||||
if ("${CMAKE_SYSTEM_NAME}" MATCHES "CYGWIN") #not sure about TARGET_COMPILER
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTARGET_COMPILER_visCPP -DWIN64 -D_WINDOWS -DTARGET_OS_FAMILY_windows")
|
||||
endif ()
|
||||
|
||||
add_custom_target(configure
|
||||
COMMAND bash configure
|
||||
COMMAND bash configure --disable-warnings-as-errors
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../)
|
||||
|
||||
add_custom_target(build_images
|
||||
COMMAND make COMPILER_WARNINGS_FATAL=false images
|
||||
add_custom_target(configure_debug
|
||||
COMMAND bash configure --disable-warnings-as-errors --enable-debug
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../)
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(JDK_RELEASE_TARGET "linux-x86_64-normal-server-release")
|
||||
set(JDK_DEBUG_TARGET "linux-x86_64-normal-server-fastdebug")
|
||||
endif ()
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(JDK_RELEASE_TARGET "macosx-x86_64-normal-server-release")
|
||||
set(JDK_DEBUG_TARGET "macosx-x86_64-normal-server-fastdebug")
|
||||
add_compile_definitions(MACOSX)
|
||||
endif ()
|
||||
|
||||
add_custom_target(build
|
||||
COMMAND make CONF=${JDK_RELEASE_TARGET}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../
|
||||
DEPENDS ${SOURCE_FILES})
|
||||
DEPENDS ${SOURCE_FILES})
|
||||
|
||||
add_custom_target(build_images
|
||||
COMMAND make images CONF=${JDK_RELEASE_TARGET}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../
|
||||
DEPENDS ${SOURCE_FILES})
|
||||
|
||||
add_custom_target(build_debug
|
||||
COMMAND make CONF=${JDK_DEBUG_TARGET}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../
|
||||
DEPENDS ${SOURCE_FILES})
|
||||
|
||||
add_custom_target(build_images_debug
|
||||
COMMAND make images CONF=${JDK_DEBUG_TARGET}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../
|
||||
DEPENDS ${SOURCE_FILES})
|
||||
|
||||
add_custom_target(make_clean
|
||||
COMMAND make clean CONF=${JDK_RELEASE_TARGET}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../
|
||||
DEPENDS ${SOURCE_FILES})
|
||||
|
||||
add_custom_target(make_clean_debug
|
||||
COMMAND make clean CONF=${JDK_DEBUG_TARGET}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../
|
||||
DEPENDS ${SOURCE_FILES})
|
||||
|
||||
@@ -6,6 +6,7 @@ include(../java-common.cmake)
|
||||
include_directories(
|
||||
../../../src/java.base/share/native/include
|
||||
../../../src/java.base/share/native/libjava
|
||||
../../../src/java.base/share/native/libzip/zlib
|
||||
../../../src/java.desktop/share/native/common
|
||||
../../../src/java.desktop/share/native/common/awt/debug
|
||||
../../../src/java.desktop/share/native/common/font
|
||||
@@ -58,6 +59,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux"
|
||||
../../../src/java.desktop/unix/native/common/font
|
||||
../../../src/java.desktop/unix/native/common/java2d/opengl
|
||||
../../../src/java.desktop/unix/native/common/java2d/opengl/J2D_GL
|
||||
../../../src/java.desktop/unix/native/common/java2d/x11
|
||||
../../../src/java.desktop/unix/native/common
|
||||
../../../src/java.desktop/unix/native/include
|
||||
../../../src/java.desktop/unix/native/libawt/java2d
|
||||
@@ -1026,7 +1028,10 @@ set(SOURCE_FILES
|
||||
../../../src/jdk.jdwp.agent/share/native/include/jdwpTransport.h
|
||||
../../../src/hotspot/share/include/jmm.h
|
||||
../../../src/java.base/share/native/include/jni.h
|
||||
../../../src/java.base/share/native/include/jvmticmlr.h)
|
||||
../../../src/java.base/share/native/include/jvmticmlr.h
|
||||
../../../src/java.base/share/native/libzip/zlib/zutil.c
|
||||
../../../src/java.base/share/native/libzip/zlib/inflate.c)
|
||||
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(SOURCE_FILES
|
||||
@@ -1088,7 +1093,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
../../../src/java.desktop/macosx/native/libawt_lwawt/awt/CFileDialog.h
|
||||
../../../src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.h
|
||||
../../../src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.h
|
||||
../../../src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsConfig.m
|
||||
../../../src/java.desktop/macosx/native/libawt_lwawt/awt/CDesktopPeer.m
|
||||
../../../src/java.desktop/macosx/native/libawt_lwawt/awt/PrintModel.h
|
||||
../../../src/java.desktop/macosx/native/libawt_lwawt/awt/CTrayIcon.m
|
||||
@@ -1342,7 +1346,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux"
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/multi_font.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/multiVis.h
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/awt_Event.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/robot_common.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/awt_util.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/list.h
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.h
|
||||
@@ -1355,10 +1358,10 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux"
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/canvas.h
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/awt_AWTEvent.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/multi_font.h
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/robot_common.h
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/sun_awt_X11_GtkFileDialogPeer.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/awt/awt_InputMethod.c
|
||||
../../../src/java.desktop/unix/native/libawt_xawt/java2d/x11/XRBackendNative.c
|
||||
../../../src/java.desktop/unix/native/libfontmanager/X11FontScaler.c
|
||||
../../../src/java.desktop/unix/native/libfontmanager/X11TextRenderer.c
|
||||
../../../src/java.desktop/unix/native/libsplashscreen/splashscreen_config.h
|
||||
|
||||
3
jb/project/tools/common.sh
Normal file
3
jb/project/tools/common.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
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}"
|
||||
10
jb/project/tools/linux/scripts/mkbundles_x64.sh
Executable file
10
jb/project/tools/linux/scripts/mkbundles_x64.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
script_dir=jb/project/tools/linux/scripts
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jcef" || exit $?
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx" || exit $?
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "dcevm" || exit $?
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx_jcef" || exit $?
|
||||
86
jb/project/tools/linux/scripts/mkimages_aarch64.sh
Executable file
86
jb/project/tools/linux/scripts/mkimages_aarch64.sh
Executable file
@@ -0,0 +1,86 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
--with-debug-level=release \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-import-modules=./modular-sdk \
|
||||
--with-boot-jdk=amazon-corretto-11.0.5.10.1-linux-aarch64 \
|
||||
--enable-cds=yes || exit $?
|
||||
make clean CONF=linux-aarch64-normal-server-release || exit $?
|
||||
make images CONF=linux-aarch64-normal-server-release test-image || exit $?
|
||||
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-aarch64-b${build_number}
|
||||
BASE_DIR=build/linux-aarch64-normal-server-release/images
|
||||
JSDK=${BASE_DIR}/jdk
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
|
||||
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
||||
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/release > release
|
||||
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/release
|
||||
|
||||
tar -pcf $JBSDK.tar \
|
||||
--exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
|
||||
-C $BASE_DIR ${JBRSDK_BUNDLE} || exit $?
|
||||
gzip $JBSDK.tar || exit $?
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
rm -rf $BASE_DIR/$JBR_BUNDLE
|
||||
|
||||
JBR=$JBR_BASE_NAME-linux-aarch64-b$build_number
|
||||
grep -v javafx modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules.list.aarch64
|
||||
echo Running jlink....
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules.list.aarch64 | sed s/" "//g | sed s/,$//g) \
|
||||
--output ${BASE_DIR}/${JBR_BUNDLE} || exit $?
|
||||
|
||||
echo Modifying release info ...
|
||||
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${BASE_DIR}/${JBR_BUNDLE}/release
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
tar -pcf $JBR.tar -C $BASE_DIR ${JBR_BUNDLE} || exit $?
|
||||
gzip $JBR.tar || exit $?
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-aarch64-b$build_number
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' test || exit $?
|
||||
gzip $JBRSDK_TEST.tar || exit $?
|
||||
147
jb/project/tools/linux/scripts/mkimages_x64.sh
Executable file
147
jb/project/tools/linux/scripts/mkimages_x64.sh
Executable file
@@ -0,0 +1,147 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
|
||||
# By default imported modules should be located in ./jcef_linux_x64
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=./modular-sdk}"
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_linux_x64}
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
function create_jbr {
|
||||
|
||||
case "$1" in
|
||||
"${bundle_type}_lw")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}_lw-${JBSDK_VERSION}
|
||||
grep -v "jdk.compiler\|jdk.hotspot.agent" modules.list > modules_tmp.list
|
||||
;;
|
||||
"jfx" | "jcef" | "dcevm" | "nomod")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
|
||||
cat modules.list > modules_tmp.list
|
||||
;;
|
||||
"jfx_jcef")
|
||||
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
|
||||
cat modules.list > modules_tmp.list
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && exit 1
|
||||
;;
|
||||
esac
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
|
||||
JBR=$JBR_BASE_NAME-linux-x64-b$build_number
|
||||
|
||||
echo Running jlink....
|
||||
$JSDK/bin/jlink \
|
||||
--module-path $JSDK/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output $BASE_DIR/$JBR_BUNDLE
|
||||
|
||||
if [[ "$bundle_type" == *jcef* ]] || [[ "$bundle_type" == *dcevm* ]]; then
|
||||
cp -R $BASE_DIR/$JBR_BUNDLE $BASE_DIR/jbr
|
||||
cp -R ${JCEF_PATH}/* $BASE_DIR/$JBR_BUNDLE/lib || exit $?
|
||||
fi
|
||||
grep -v "^JAVA_VERSION" $JSDK/release | grep -v "^MODULES" >> $BASE_DIR/$JBR_BUNDLE/release
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
rm -rf ${BASE_DIR}/jbr
|
||||
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
|
||||
tar -pcf $JBR.tar -C $BASE_DIR jbr || exit $?
|
||||
gzip $JBR.tar || exit $?
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=linux-x86_64-normal-server-release
|
||||
git checkout -- modules.list src/java.desktop/share/classes/module-info.java
|
||||
case "$bundle_type" in
|
||||
"jfx")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
|
||||
;;
|
||||
"jcef")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
|
||||
;;
|
||||
"dcevm")
|
||||
git am jb/project/tools/patches/dcevm/*.patch
|
||||
;;
|
||||
"nomod")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
|
||||
WITH_IMPORT_MODULES=""
|
||||
;;
|
||||
esac
|
||||
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--enable-cds=yes || exit $?
|
||||
|
||||
make images CONF=$RELEASE_NAME || exit $?
|
||||
|
||||
JSDK=build/$RELEASE_NAME/images/jdk
|
||||
JBSDK=$JBRSDK_BASE_NAME-linux-x64-b$build_number
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
BASE_DIR=build/$RELEASE_NAME/images
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
|
||||
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
||||
|
||||
if [[ "$bundle_type" == *jcef* ]] || [[ "$bundle_type" == *dcevm* ]]; then
|
||||
cp -R ${JCEF_PATH}/* $BASE_DIR/$JBRSDK_BUNDLE/lib || exit $?
|
||||
fi
|
||||
if [ "$bundle_type" == "jfx_jcef" ]; then
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/release > release
|
||||
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/release
|
||||
|
||||
tar -pcf $JBSDK.tar --exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
|
||||
-C $BASE_DIR $JBRSDK_BUNDLE || exit $?
|
||||
gzip $JBSDK.tar || exit $?
|
||||
fi
|
||||
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
create_jbr ${bundle_type}
|
||||
|
||||
if [ "$bundle_type" == "jfx_jcef" ]; then
|
||||
make test-image || exit $?
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-x64-b$build_number
|
||||
|
||||
echo Creating $JBSDK_TEST.tar.gz ...
|
||||
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' test || exit $?
|
||||
gzip $JBRSDK_TEST.tar || exit $?
|
||||
fi
|
||||
90
jb/project/tools/linux/scripts/mkimages_x64_fd.sh
Executable file
90
jb/project/tools/linux/scripts/mkimages_x64_fd.sh
Executable file
@@ -0,0 +1,90 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
|
||||
# By default imported modules should be located in ./jcef_linux_x64
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=./modular-sdk}"
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_linux_x64}
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-import-modules=./modular-sdk \
|
||||
--enable-cds=yes || exit $?
|
||||
make clean CONF=linux-x86_64-normal-server-fastdebug || exit $?
|
||||
make images CONF=linux-x86_64-normal-server-fastdebug || exit $?
|
||||
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-x64-fastdebug-b${build_number}
|
||||
BASE_DIR=build/linux-x86_64-normal-server-fastdebug/images
|
||||
JSDK=${BASE_DIR}/jdk
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
|
||||
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
||||
cp -R jcef_linux_x64/* $BASE_DIR/$JBRSDK_BUNDLE/lib || exit $?
|
||||
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/release > release
|
||||
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/release
|
||||
|
||||
tar -pcf $JBSDK.tar \
|
||||
--exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
|
||||
-C $BASE_DIR ${JBRSDK_BUNDLE} || exit $?
|
||||
gzip $JBSDK.tar || exit $?
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
rm -rf $BASE_DIR/$JBR_BUNDLE
|
||||
|
||||
JBR=$JBR_BASE_NAME-linux-x64-fastdebug-b$build_number
|
||||
echo Running jlink....
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules.list | sed s/" "//g | sed s/,$//g) \
|
||||
--output ${BASE_DIR}/${JBR_BUNDLE} || exit $?
|
||||
cp -R jcef_linux_x64/* $BASE_DIR/$JBR_BUNDLE/lib || exit $?
|
||||
|
||||
echo Modifying release info ...
|
||||
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${BASE_DIR}/${JBR_BUNDLE}/release
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
tar -czf $JBR.tar -C $BASE_DIR ${JBR_BUNDLE} || exit $?
|
||||
gzip $JBR.tar || exit $?
|
||||
82
jb/project/tools/linux/scripts/mkimages_x86.sh
Executable file
82
jb/project/tools/linux/scripts/mkimages_x86.sh
Executable file
@@ -0,0 +1,82 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
|
||||
linux32 bash configure \
|
||||
--disable-warnings-as-errors \
|
||||
--with-debug-level=release \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-version-pre= \
|
||||
--with-version-build=$JDK_BUILD_NUMBER \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-boot-jdk=/jbrsdk-11.0.5-b1 \
|
||||
--enable-cds=yes || exit $?
|
||||
make clean CONF=linux-x86-normal-server-release || exit $?
|
||||
make images CONF=linux-x86-normal-server-release test-image || exit $?
|
||||
|
||||
JBSDK=${JBRSDK_BASE_NAME}-linux-x86-b${build_number}
|
||||
BASE_DIR=build/linux-x86-normal-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 $?
|
||||
10
jb/project/tools/mac/scripts/mkbundles.sh
Executable file
10
jb/project/tools/mac/scripts/mkbundles.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
script_dir=jb/project/tools/mac/scripts
|
||||
${script_dir}/mkimages.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jcef" || exit $?
|
||||
${script_dir}/mkimages.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx" || exit $?
|
||||
${script_dir}/mkimages.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "dcevm" || exit $?
|
||||
${script_dir}/mkimages.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx_jcef" || exit $?
|
||||
153
jb/project/tools/mac/scripts/mkimages.sh
Executable file
153
jb/project/tools/mac/scripts/mkimages.sh
Executable file
@@ -0,0 +1,153 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
|
||||
# By default imported modules should be located in ./jcef_mac
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=./modular-sdk}"
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_mac}
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
function create_jbr {
|
||||
|
||||
case "$1" in
|
||||
"${bundle_type}_lw")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}_lw-${JBSDK_VERSION}
|
||||
grep -v "jdk.compiler\|jdk.hotspot.agent" modules.list > modules_tmp.list
|
||||
;;
|
||||
"jfx" | "jcef" | "dcevm" | "nomod")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
|
||||
cat modules.list > modules_tmp.list
|
||||
;;
|
||||
"jfx_jcef")
|
||||
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
|
||||
cat modules.list > modules_tmp.list
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && exit 1
|
||||
;;
|
||||
esac
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
|
||||
JRE_CONTENTS=${BASE_DIR}/${JBR_BUNDLE}/Contents
|
||||
JRE_HOME=${JRE_CONTENTS}/Home
|
||||
if [ -d "${JRE_CONTENTS}" ]; then
|
||||
rm -rf ${JRE_CONTENTS}
|
||||
fi
|
||||
mkdir -p ${JRE_CONTENTS}
|
||||
|
||||
JBR=${JBR_BASE_NAME}-osx-x64-b${build_number}
|
||||
|
||||
${BASE_DIR}/$JBRSDK_BUNDLE/Contents/Home/bin/jlink \
|
||||
--module-path ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output ${JRE_HOME} || exit $?
|
||||
grep -v "^JAVA_VERSION" ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release | grep -v "^MODULES" >> ${JRE_HOME}/release
|
||||
cp -R ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/MacOS ${JRE_CONTENTS}
|
||||
cp ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Info.plist ${JRE_CONTENTS}
|
||||
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]]; then
|
||||
rm -rf ${JRE_CONTENTS}/Frameworks || exit $?
|
||||
cp -a ${JCEF_PATH}/Frameworks ${JRE_CONTENTS} || exit $?
|
||||
fi
|
||||
|
||||
echo Creating ${JBR}.tar.gz ...
|
||||
rm -rf ${BASE_DIR}/jbr
|
||||
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
|
||||
COPYFILE_DISABLE=1 tar -pczf ${JBR}.tar.gz --exclude='*.dSYM' --exclude='man' -C ${BASE_DIR} jbr || exit $?
|
||||
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=macosx-x86_64-normal-server-release
|
||||
git checkout -- modules.list src/java.desktop/share/classes/module-info.java
|
||||
case "$bundle_type" in
|
||||
"jfx")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
|
||||
;;
|
||||
"jcef")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
|
||||
;;
|
||||
"dcevm")
|
||||
git am jb/project/tools/patches/dcevm/*.patch
|
||||
;;
|
||||
"nomod")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
|
||||
WITH_IMPORT_MODULES=""
|
||||
;;
|
||||
esac
|
||||
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--with-boot-jdk=`/usr/libexec/java_home -v 11` \
|
||||
--enable-cds=yes || exit $?
|
||||
|
||||
make clean images CONF=$RELEASE_NAME || exit $?
|
||||
|
||||
JSDK=build/$RELEASE_NAME/images/jdk-bundle
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-b${build_number}
|
||||
|
||||
BASE_DIR=jre
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf $BASE_DIR
|
||||
mkdir $BASE_DIR || exit $?
|
||||
cp -a $JSDK/jdk-$JBSDK_VERSION_WITH_DOTS.jdk $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
||||
|
||||
if [[ "$bundle_type" == *jcef* ]] || [[ "$bundle_type" == *dcevm* ]]; then
|
||||
cp -a ${JCEF_PATH}/Frameworks $BASE_DIR/$JBRSDK_BUNDLE/Contents/
|
||||
fi
|
||||
if [ "$bundle_type" == "jfx_jcef" ]; then
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release > release
|
||||
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release
|
||||
COPYFILE_DISABLE=1 tar -pczf $JBSDK.tar.gz -C $BASE_DIR \
|
||||
--exclude='._*' --exclude='.DS_Store' --exclude='*~' \
|
||||
--exclude='Home/demo' --exclude='Home/man' --exclude='Home/sample' \
|
||||
$JBRSDK_BUNDLE || exit $?
|
||||
fi
|
||||
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
create_jbr "${bundle_type}" || exit $?
|
||||
|
||||
if [ "$bundle_type" == "jfx_jcef" ]; then
|
||||
make test-image || exit $?
|
||||
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-osx-test-x64-b$build_number
|
||||
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
COPYFILE_DISABLE=1 tar -pczf $JBRSDK_TEST.tar.gz -C build/macosx-x86_64-normal-server-release/images \
|
||||
--exclude='test/jdk/demos' test || exit $?
|
||||
fi
|
||||
99
jb/project/tools/mac/scripts/mkimages_fd.sh
Executable file
99
jb/project/tools/mac/scripts/mkimages_fd.sh
Executable file
@@ -0,0 +1,99 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
|
||||
# By default imported modules should be located in ./jcef_mac
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
|
||||
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=./modular-sdk}"
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_mac}
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
|
||||
sh configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--with-boot-jdk=`/usr/libexec/java_home -v 11` \
|
||||
--enable-cds=yes || exit $?
|
||||
make clean CONF=macosx-x86_64-normal-server-fastdebug || exit $?
|
||||
make images CONF=macosx-x86_64-normal-server-fastdebug || exit $?
|
||||
|
||||
JSDK=build/macosx-x86_64-normal-server-fastdebug/images/jdk-bundle
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-fastdebug-b${build_number}
|
||||
|
||||
BASE_DIR=jre
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf $BASE_DIR
|
||||
mkdir $BASE_DIR || exit $?
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
cp -a $JSDK/jdk-$JBSDK_VERSION_WITH_DOTS.jdk $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
||||
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
cp -a ${JCEF_PATH}/Frameworks $BASE_DIR/$JBRSDK_BUNDLE/Contents/
|
||||
|
||||
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release > release
|
||||
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release
|
||||
|
||||
COPYFILE_DISABLE=1 \
|
||||
tar -pczf ${JBSDK}.tar.gz -C ${BASE_DIR} \
|
||||
--exclude='._*' --exclude='.DS_Store' --exclude='*~' \
|
||||
--exclude='Home/demo' --exclude='Home/man' --exclude='Home/sample' \
|
||||
${JBRSDK_BUNDLE} || exit $?
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
JRE_CONTENTS=$BASE_DIR/$JBR_BUNDLE/Contents
|
||||
JRE_HOME=$JRE_CONTENTS/Home
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
|
||||
mkdir -p $JRE_CONTENTS
|
||||
|
||||
if [ -d "$JRE_HOME" ]; then
|
||||
rm -rf $JRE_HOME
|
||||
fi
|
||||
|
||||
JBR=${JBR_BASE_NAME}-osx-x64-fastdebug-b${build_number}
|
||||
|
||||
$BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/bin/jlink \
|
||||
--module-path $BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules.list | sed s/" "//g) --output $JRE_HOME || exit $?
|
||||
grep -v "^JAVA_VERSION" $BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/release | grep -v "^MODULES" >> $JRE_HOME/release
|
||||
cp -R $BASE_DIR/$JBRSDK_BUNDLE/Contents/MacOS $JRE_CONTENTS
|
||||
cp $BASE_DIR/$JBRSDK_BUNDLE/Contents/Info.plist $JRE_CONTENTS
|
||||
cp -a ${JCEF_PATH}/Frameworks ${JRE_CONTENTS} || exit $?
|
||||
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
COPYFILE_DISABLE=1 tar -pczf $JBR.tar.gz --exclude='*.dSYM' --exclude='man' -C $BASE_DIR $JBR_BUNDLE || exit $?
|
||||
@@ -26,7 +26,8 @@ log "Signing libraries and executables..."
|
||||
# -perm +111 searches for executables
|
||||
for f in \
|
||||
"Contents/Home/bin" \
|
||||
"Contents/Home/lib"; do
|
||||
"Contents/Home/lib" \
|
||||
"Contents/Frameworks"; do
|
||||
if [ -d "$APP_DIRECTORY/$f" ]; then
|
||||
find "$APP_DIRECTORY/$f" \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -perm +111 \) \
|
||||
|
||||
@@ -37,14 +37,7 @@ BUILD_NAME="$(ls "$EXPLODED")"
|
||||
if test -d $EXPLODED/$BUILD_NAME/Contents/Home/jmods; then
|
||||
mv $EXPLODED/$BUILD_NAME/Contents/Home/jmods $BACKUP_JMODS
|
||||
fi
|
||||
if test -d $EXPLODED/$BUILD_NAME/Contents/Home/Frameworks; then
|
||||
mv $EXPLODED/$BUILD_NAME/Contents/Home/Frameworks $BACKUP_JMODS
|
||||
fi
|
||||
if test -f $EXPLODED/$BUILD_NAME/Contents/MacOS/libjli.dylib; then
|
||||
mv $EXPLODED/$BUILD_NAME/Contents/MacOS/libjli.dylib $BACKUP_JMODS
|
||||
fi
|
||||
|
||||
#log "$INPUT_FILE unzipped and removed"
|
||||
log "$INPUT_FILE extracted and removed"
|
||||
|
||||
APPLICATION_PATH="$EXPLODED/$BUILD_NAME"
|
||||
@@ -128,15 +121,9 @@ log "Zipping $BUILD_NAME to $INPUT_FILE ..."
|
||||
(
|
||||
#cd "$EXPLODED"
|
||||
#ditto -c -k --sequesterRsrc --keepParent "$BUILD_NAME" "../$INPUT_FILE"
|
||||
if test ! -z $(ls $BACKUP_JMODS/libjli.dylib); then
|
||||
mv $BACKUP_JMODS/libjli.dylib $EXPLODED/$BUILD_NAME/Contents/MacOS
|
||||
fi
|
||||
if test -d $BACKUP_JMODS/jmods; then
|
||||
mv $BACKUP_JMODS/jmods $EXPLODED/$BUILD_NAME/Contents/Home
|
||||
fi
|
||||
if test -d $BACKUP_JMODS/Frameworks; then
|
||||
mv $BACKUP_JMODS/Frameworks $EXPLODED/$BUILD_NAME/Contents/Home
|
||||
fi
|
||||
|
||||
COPYFILE_DISABLE=1 tar -pczf $INPUT_FILE --exclude='*.dSYM' --exclude='man' -C $EXPLODED $BUILD_NAME
|
||||
log "Finished zipping"
|
||||
|
||||
5066
jb/project/tools/patches/dcevm/0001-Apply-basic-dcevm11-patch.patch
Normal file
5066
jb/project/tools/patches/dcevm/0001-Apply-basic-dcevm11-patch.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,26 @@
|
||||
From a4b2a34a6c9d477ce339bece718abe992cdd5002 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Wed, 14 Nov 2018 21:18:22 +0100
|
||||
Subject: [PATCH 02/50] We need to set classRedefinitionCount on new class, not
|
||||
old class.
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 83c0952de37..83cf0be090b 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -1904,7 +1904,7 @@ void VM_EnhancedRedefineClasses::increment_class_counter(InstanceKlass *ik, TRAP
|
||||
oop class_mirror = ik->java_mirror();
|
||||
Klass* class_oop = java_lang_Class::as_Klass(class_mirror);
|
||||
int new_count = java_lang_Class::classRedefinedCount(class_mirror) + 1;
|
||||
- java_lang_Class::set_classRedefinedCount(class_mirror, new_count);
|
||||
+ java_lang_Class::set_classRedefinedCount(ik->new_version()->java_mirror(), new_count);
|
||||
|
||||
if (class_oop != _the_class_oop) {
|
||||
// _the_class_oop count is printed at end of redefine_single_class()
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From e5c0b2d69ab024ec0469f5c105f13f889b598815 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Wed, 14 Nov 2018 21:22:01 +0100
|
||||
Subject: [PATCH 03/50] Fix crashes in MetadataOnStackMark::~MetadataOnSta
|
||||
|
||||
MetadataOnStackMark shoukld not remove dcevm stuff. It was added
|
||||
accidentaly in dcevm9,
|
||||
and never was part of doit() in previous versions.
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 83cf0be090b..61af07d0f86 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -470,7 +470,9 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
|
||||
// Mark methods seen on stack and everywhere else so old methods are not
|
||||
// cleaned up if they're on the stack.
|
||||
- MetadataOnStackMark md_on_stack(true);
|
||||
+
|
||||
+ // FIXME: fails in enhanced redefinition
|
||||
+ // MetadataOnStackMark md_on_stack(true);
|
||||
HandleMark hm(thread); // make sure any handles created are deleted
|
||||
// before the stack walk again.
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From 360fbbd15357fb3cb19abc6ffb40320efadce616 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Mon, 3 Dec 2018 19:34:53 +0100
|
||||
Subject: [PATCH 04/50] Fix problem with nested members
|
||||
|
||||
Reported at : https://stackoverflow.com/questions/53370380/hotswapagent-incompatibleclasschangeerror-type-headerpanel1-is-not-a-nest-mem
|
||||
---
|
||||
src/hotspot/share/oops/instanceKlass.cpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
index 8a262bc3735..9b6ba7e9304 100644
|
||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
@@ -178,6 +178,7 @@ bool InstanceKlass::has_nest_member(InstanceKlass* k, TRAPS) const {
|
||||
}
|
||||
|
||||
Klass* k2 = _constants->klass_at(cp_index, CHECK_false);
|
||||
+ k2 = k2->newest_version();
|
||||
if (k2 == k) {
|
||||
log_trace(class, nestmates)("- class is listed as a nest member");
|
||||
return true;
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
26
jb/project/tools/patches/dcevm/0005-Use-init_mark_raw.patch
Normal file
26
jb/project/tools/patches/dcevm/0005-Use-init_mark_raw.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
From 4e2aef4c3b201e9639acdd39aa9e7ecdc9fb6a86 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Mon, 10 Dec 2018 20:12:07 +0100
|
||||
Subject: [PATCH 05/50] Use init_mark_raw()
|
||||
|
||||
method changed since j8 - it used init_mark()
|
||||
---
|
||||
src/hotspot/share/gc/shared/space.inline.hpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/gc/shared/space.inline.hpp b/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
index 4394eff00c5..75d7e685edf 100644
|
||||
--- a/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
+++ b/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
@@ -371,7 +371,7 @@ inline void CompactibleSpace::scan_and_compact(SpaceType* space, bool redefiniti
|
||||
} else {
|
||||
MarkSweep::update_fields(oop(cur_obj), oop(compaction_top));
|
||||
}
|
||||
- oop(compaction_top)->init_mark();
|
||||
+ oop(compaction_top)->init_mark_raw();
|
||||
assert(oop(compaction_top)->klass() != NULL, "should have a class");
|
||||
|
||||
debug_only(prev_obj = cur_obj);
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
25
jb/project/tools/patches/dcevm/0006-Fix-methodHandles.patch
Normal file
25
jb/project/tools/patches/dcevm/0006-Fix-methodHandles.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From 15194627b2573f109aef2cacc6ebfb600d0a20f0 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Thu, 13 Dec 2018 20:51:09 +0100
|
||||
Subject: [PATCH 06/50] Fix methodHandles
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 61af07d0f86..1c7595787a1 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -248,7 +248,7 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
int ref_kind = (flags >> REFERENCE_KIND_SHIFT) & REFERENCE_KIND_MASK;
|
||||
if (MethodHandles::ref_kind_is_method(ref_kind)) {
|
||||
Method* m = (Method*) java_lang_invoke_MemberName::vmtarget(obj);
|
||||
- if (m != NULL && m->method_holder()->new_version() != NULL) {
|
||||
+ if (m != NULL && m->method_holder()->is_redefining()) {
|
||||
// Let's try to re-resolve method
|
||||
InstanceKlass* newest = InstanceKlass::cast(m->method_holder()->newest_version());
|
||||
Method* new_method = newest->find_method(m->name(), m->signature());
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
58
jb/project/tools/patches/dcevm/0007-Fix-field-method.patch
Normal file
58
jb/project/tools/patches/dcevm/0007-Fix-field-method.patch
Normal file
@@ -0,0 +1,58 @@
|
||||
From 23a83be457df96d519db8de59a49dd65731efcc4 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 15 Dec 2018 18:23:30 +0100
|
||||
Subject: [PATCH 07/50] Fix field method
|
||||
|
||||
---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 19 ++++++++++++-------
|
||||
1 file changed, 12 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 1c7595787a1..a3b65b273e5 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -264,21 +264,26 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
}
|
||||
}
|
||||
} else if (MethodHandles::ref_kind_is_field(ref_kind)) {
|
||||
- Klass* k = (Klass*) java_lang_invoke_MemberName::vmtarget(obj);
|
||||
+ oop clazz = java_lang_invoke_MemberName::clazz(obj);
|
||||
+ if (clazz == NULL) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ Klass* k = java_lang_Class::as_Klass(clazz);
|
||||
if (k == NULL) {
|
||||
return false; // Was cleared before, this MemberName is invalid.
|
||||
}
|
||||
|
||||
- if (k != NULL && k->new_version() != NULL) {
|
||||
+ if (k->is_redefining()) {
|
||||
// Let's try to re-resolve field
|
||||
+ InstanceKlass* old = InstanceKlass::cast(k->old_version());
|
||||
fieldDescriptor fd;
|
||||
int offset = java_lang_invoke_MemberName::vmindex(obj);
|
||||
bool is_static = MethodHandles::ref_kind_is_static(ref_kind);
|
||||
- InstanceKlass* ik = InstanceKlass::cast(k);
|
||||
- if (ik->find_local_field_from_offset(offset, is_static, &fd)) {
|
||||
- InstanceKlass* newest = InstanceKlass::cast(k->newest_version());
|
||||
+ InstanceKlass* ik_old = InstanceKlass::cast(old);
|
||||
+ if (ik_old->find_local_field_from_offset(offset, is_static, &fd)) {
|
||||
+ InstanceKlass* ik_new = InstanceKlass::cast(k->newest_version());
|
||||
fieldDescriptor fd_new;
|
||||
- if (newest->find_local_field(fd.name(), fd.signature(), &fd_new)) {
|
||||
+ if (ik_new->find_local_field(fd.name(), fd.signature(), &fd_new)) {
|
||||
Handle objHandle(Thread::current(), obj); // TODO : review thread
|
||||
MethodHandles::init_field_MemberName(objHandle, fd_new, MethodHandles::ref_kind_is_setter(ref_kind));
|
||||
} else {
|
||||
@@ -288,7 +293,7 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
// Eventually, we probably want to replace them with something more meaningful,
|
||||
// like instance throwing NoSuchFieldError or DMH that will resort to dynamic
|
||||
// field resolution (with possibility of type conversion)
|
||||
- java_lang_invoke_MemberName::set_method(obj, NULL);
|
||||
+ java_lang_invoke_MemberName::set_clazz(obj, NULL);
|
||||
java_lang_invoke_MemberName::set_vmindex(obj, 0);
|
||||
return false;
|
||||
}
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
From 1fe56253f7e63d69f9a12963316889c5e87111eb Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 15 Dec 2018 20:16:37 +0100
|
||||
Subject: [PATCH 08/50] Fix nonstatic field handles
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index a3b65b273e5..c64d6bb1bb5 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -337,6 +337,7 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
if (obj == NULL) {
|
||||
return;
|
||||
}
|
||||
+ bool oop_updated = false;
|
||||
if (obj->is_instance() && InstanceKlass::cast(obj->klass())->is_mirror_instance_klass()) {
|
||||
Klass* klass = java_lang_Class::as_Klass(obj);
|
||||
if (klass != NULL && klass->is_instance_klass()) {
|
||||
@@ -344,13 +345,17 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
if (klass->new_version() != NULL) {
|
||||
obj = InstanceKlass::cast(klass->new_version())->java_mirror();
|
||||
S::oop_store(p, obj);
|
||||
+ oop_updated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+
|
||||
// JSR 292 support, uptade java.lang.invoke.MemberName instances
|
||||
if (java_lang_invoke_MemberName::is_instance(obj)) {
|
||||
- update_member_name(obj);
|
||||
+ if (oop_updated) {
|
||||
+ update_member_name(obj);
|
||||
+ }
|
||||
} else if (java_lang_invoke_DirectMethodHandle::is_instance(obj)) {
|
||||
if (!update_direct_method_handle(obj)) {
|
||||
// DMH is no longer valid, replace it with null reference.
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,488 @@
|
||||
From cbe52ffcde1851f2c3527825f37145428aeedc67 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Wed, 12 Dec 2018 19:38:28 +0100
|
||||
Subject: [PATCH 09/50] Support for Concurrent Mark Sweep (CMS) collector
|
||||
|
||||
---
|
||||
.../share/gc/cms/compactibleFreeListSpace.cpp | 139 ++++++++++++------
|
||||
.../share/gc/cms/compactibleFreeListSpace.hpp | 5 +-
|
||||
.../gc/cms/concurrentMarkSweepThread.cpp | 10 +-
|
||||
src/hotspot/share/gc/serial/markSweep.cpp | 2 +-
|
||||
src/hotspot/share/gc/shared/gcConfig.cpp | 2 +-
|
||||
src/hotspot/share/gc/shared/space.cpp | 16 +-
|
||||
src/hotspot/share/gc/shared/space.hpp | 6 +-
|
||||
src/hotspot/share/gc/shared/space.inline.hpp | 16 +-
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 12 +-
|
||||
src/hotspot/share/runtime/arguments.cpp | 6 +-
|
||||
10 files changed, 135 insertions(+), 79 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/gc/cms/compactibleFreeListSpace.cpp b/src/hotspot/share/gc/cms/compactibleFreeListSpace.cpp
|
||||
index a93f764f1b9..efaa09473a9 100644
|
||||
--- a/src/hotspot/share/gc/cms/compactibleFreeListSpace.cpp
|
||||
+++ b/src/hotspot/share/gc/cms/compactibleFreeListSpace.cpp
|
||||
@@ -376,55 +376,58 @@ CompactibleFreeListSpace::CompactibleFreeListSpace(BlockOffsetSharedArray* bs, M
|
||||
_used_stable = 0;
|
||||
}
|
||||
|
||||
+#define forward_compact_top_DEFN() \
|
||||
+ assert(this == cp->space, "'this' should be current compaction space."); \
|
||||
+ size_t compaction_max_size = pointer_delta(end(), compact_top); \
|
||||
+ assert(adjustObjectSize(size) == cp->space->adjust_object_size_v(size), \
|
||||
+ "virtual adjustObjectSize_v() method is not correct"); \
|
||||
+ size_t adjusted_size = adjustObjectSize(size); \
|
||||
+ assert(compaction_max_size >= MinChunkSize || compaction_max_size == 0, \
|
||||
+ "no small fragments allowed"); \
|
||||
+ assert(minimum_free_block_size() == MinChunkSize, \
|
||||
+ "for de-virtualized reference below"); \
|
||||
+ /* Can't leave a nonzero size, residual fragment smaller than MinChunkSize */ \
|
||||
+ if (adjusted_size + MinChunkSize > compaction_max_size && \
|
||||
+ adjusted_size != compaction_max_size) { \
|
||||
+ do { \
|
||||
+ /* switch to next compaction space*/ \
|
||||
+ cp->space->set_compaction_top(compact_top); \
|
||||
+ cp->space = cp->space->next_compaction_space(); \
|
||||
+ if (cp->space == NULL) { \
|
||||
+ cp->gen = CMSHeap::heap()->young_gen(); \
|
||||
+ assert(cp->gen != NULL, "compaction must succeed"); \
|
||||
+ cp->space = cp->gen->first_compaction_space(); \
|
||||
+ assert(cp->space != NULL, "generation must have a first compaction space"); \
|
||||
+ } \
|
||||
+ compact_top = cp->space->bottom(); \
|
||||
+ cp->space->set_compaction_top(compact_top); \
|
||||
+ /* The correct adjusted_size may not be the same as that for this method */ \
|
||||
+ /* (i.e., cp->space may no longer be "this" so adjust the size again. */ \
|
||||
+ /* Use the virtual method which is not used above to save the virtual */ \
|
||||
+ /* dispatch. */ \
|
||||
+ adjusted_size = cp->space->adjust_object_size_v(size); \
|
||||
+ compaction_max_size = pointer_delta(cp->space->end(), compact_top); \
|
||||
+ assert(cp->space->minimum_free_block_size() == 0, "just checking"); \
|
||||
+ } while (adjusted_size > compaction_max_size); \
|
||||
+ }
|
||||
+
|
||||
+
|
||||
HeapWord* CompactibleFreeListSpace::forward_compact_top(size_t size,
|
||||
CompactPoint* cp, HeapWord* compact_top) {
|
||||
- ShouldNotReachHere();
|
||||
- return NULL;
|
||||
+ forward_compact_top_DEFN()
|
||||
+ return compact_top;
|
||||
}
|
||||
|
||||
// Like CompactibleSpace forward() but always calls cross_threshold() to
|
||||
// update the block offset table. Removed initialize_threshold call because
|
||||
// CFLS does not use a block offset array for contiguous spaces.
|
||||
HeapWord* CompactibleFreeListSpace::forward(oop q, size_t size,
|
||||
- CompactPoint* cp, HeapWord* compact_top) {
|
||||
- // q is alive
|
||||
- // First check if we should switch compaction space
|
||||
- assert(this == cp->space, "'this' should be current compaction space.");
|
||||
- size_t compaction_max_size = pointer_delta(end(), compact_top);
|
||||
- assert(adjustObjectSize(size) == cp->space->adjust_object_size_v(size),
|
||||
- "virtual adjustObjectSize_v() method is not correct");
|
||||
- size_t adjusted_size = adjustObjectSize(size);
|
||||
- assert(compaction_max_size >= MinChunkSize || compaction_max_size == 0,
|
||||
- "no small fragments allowed");
|
||||
- assert(minimum_free_block_size() == MinChunkSize,
|
||||
- "for de-virtualized reference below");
|
||||
- // Can't leave a nonzero size, residual fragment smaller than MinChunkSize
|
||||
- if (adjusted_size + MinChunkSize > compaction_max_size &&
|
||||
- adjusted_size != compaction_max_size) {
|
||||
- do {
|
||||
- // switch to next compaction space
|
||||
- cp->space->set_compaction_top(compact_top);
|
||||
- cp->space = cp->space->next_compaction_space();
|
||||
- if (cp->space == NULL) {
|
||||
- cp->gen = CMSHeap::heap()->young_gen();
|
||||
- assert(cp->gen != NULL, "compaction must succeed");
|
||||
- cp->space = cp->gen->first_compaction_space();
|
||||
- assert(cp->space != NULL, "generation must have a first compaction space");
|
||||
- }
|
||||
- compact_top = cp->space->bottom();
|
||||
- cp->space->set_compaction_top(compact_top);
|
||||
- // The correct adjusted_size may not be the same as that for this method
|
||||
- // (i.e., cp->space may no longer be "this" so adjust the size again.
|
||||
- // Use the virtual method which is not used above to save the virtual
|
||||
- // dispatch.
|
||||
- adjusted_size = cp->space->adjust_object_size_v(size);
|
||||
- compaction_max_size = pointer_delta(cp->space->end(), compact_top);
|
||||
- assert(cp->space->minimum_free_block_size() == 0, "just checking");
|
||||
- } while (adjusted_size > compaction_max_size);
|
||||
- }
|
||||
+ CompactPoint* cp, HeapWord* compact_top, bool force_forward) {
|
||||
+ forward_compact_top_DEFN()
|
||||
|
||||
// store the forwarding pointer into the mark word
|
||||
- if ((HeapWord*)q != compact_top) {
|
||||
+ // the size of object changed for: new_version() != NULL
|
||||
+ if (force_forward || (HeapWord*)q != compact_top || q->klass()->new_version() != NULL) {
|
||||
q->forward_to(oop(compact_top));
|
||||
assert(q->is_gc_marked(), "encoding the pointer should preserve the mark");
|
||||
} else {
|
||||
@@ -2196,13 +2199,60 @@ CompactibleFreeListSpace::refillLinearAllocBlock(LinearAllocBlock* blk) {
|
||||
|
||||
// Support for compaction
|
||||
void CompactibleFreeListSpace::prepare_for_compaction(CompactPoint* cp) {
|
||||
- scan_and_forward(this, cp, false);
|
||||
- // of the free lists doesn't work after.
|
||||
+ if (!Universe::is_redefining_gc_run()) {
|
||||
+ scan_and_forward(this, cp, false);
|
||||
+ } else {
|
||||
+ // Redefinition run
|
||||
+ scan_and_forward(this, cp, true);
|
||||
+ }
|
||||
// Prepare_for_compaction() uses the space between live objects
|
||||
// so that later phase can skip dead space quickly. So verification
|
||||
// of the free lists doesn't work after.
|
||||
}
|
||||
|
||||
+bool CompactibleFreeListSpace::must_rescue(oop old_obj, oop new_obj) {
|
||||
+ // Only redefined objects can have the need to be rescued.
|
||||
+ if (oop(old_obj)->klass()->new_version() == NULL) return false;
|
||||
+
|
||||
+ int new_size = adjustObjectSize(old_obj->size_given_klass(oop(old_obj)->klass()->new_version()));
|
||||
+ int original_size = adjustObjectSize(old_obj->size());
|
||||
+
|
||||
+ Generation* tenured_gen = CMSHeap::heap()->old_gen();
|
||||
+ bool old_in_tenured = tenured_gen->is_in_reserved(old_obj);
|
||||
+ bool new_in_tenured = tenured_gen->is_in_reserved(new_obj);
|
||||
+ if (old_in_tenured == new_in_tenured) {
|
||||
+ // Rescue if object may overlap with a higher memory address.
|
||||
+ bool overlap = ((HeapWord*)old_obj + original_size < (HeapWord*)new_obj + new_size);
|
||||
+ if (old_in_tenured) {
|
||||
+ // Old and new address are in same space, so just compare the address.
|
||||
+ // Must rescue if object moves towards the top of the space.
|
||||
+ assert(space_index(old_obj) == space_index(new_obj), "old_obj and new_obj must be in same space");
|
||||
+ } else {
|
||||
+ // In the new generation, eden is located before the from space, so a
|
||||
+ // simple pointer comparison is sufficient.
|
||||
+ assert(CMSHeap::heap()->young_gen()->is_in_reserved(old_obj), "old_obj must be in DefNewGeneration");
|
||||
+ assert(CMSHeap::heap()->young_gen()->is_in_reserved(new_obj), "new_obj must be in DefNewGeneration");
|
||||
+ assert(overlap == (space_index(old_obj) < space_index(new_obj)), "slow and fast computation must yield same result");
|
||||
+ }
|
||||
+ return overlap;
|
||||
+
|
||||
+ } else {
|
||||
+ assert(space_index(old_obj) != space_index(new_obj), "old_obj and new_obj must be in different spaces");
|
||||
+ if (new_in_tenured) {
|
||||
+ // Must never rescue when moving from the new into the old generation.
|
||||
+ assert(CMSHeap::heap()->young_gen()->is_in_reserved(old_obj), "old_obj must be in DefNewGeneration");
|
||||
+ assert(space_index(old_obj) > space_index(new_obj), "must be");
|
||||
+ return false;
|
||||
+
|
||||
+ } else /* if (tenured_gen->is_in_reserved(old_obj)) */ {
|
||||
+ // Must always rescue when moving from the old into the new generation.
|
||||
+ assert(CMSHeap::heap()->young_gen()->is_in_reserved(new_obj), "new_obj must be in DefNewGeneration");
|
||||
+ assert(space_index(old_obj) < space_index(new_obj), "must be");
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void CompactibleFreeListSpace::adjust_pointers() {
|
||||
// In other versions of adjust_pointers(), a bail out
|
||||
// based on the amount of live data in the generation
|
||||
@@ -2215,7 +2265,12 @@ void CompactibleFreeListSpace::adjust_pointers() {
|
||||
}
|
||||
|
||||
void CompactibleFreeListSpace::compact() {
|
||||
- scan_and_compact(this, false);
|
||||
+ if(!Universe::is_redefining_gc_run()) {
|
||||
+ scan_and_compact(this, false);
|
||||
+ } else {
|
||||
+ // Redefinition run
|
||||
+ scan_and_compact(this, true);
|
||||
+ }
|
||||
}
|
||||
|
||||
// Fragmentation metric = 1 - [sum of (fbs**2) / (sum of fbs)**2]
|
||||
diff --git a/src/hotspot/share/gc/cms/compactibleFreeListSpace.hpp b/src/hotspot/share/gc/cms/compactibleFreeListSpace.hpp
|
||||
index 9fd2ea58320..d29b81f6fca 100644
|
||||
--- a/src/hotspot/share/gc/cms/compactibleFreeListSpace.hpp
|
||||
+++ b/src/hotspot/share/gc/cms/compactibleFreeListSpace.hpp
|
||||
@@ -201,7 +201,7 @@ class CompactibleFreeListSpace: public CompactibleSpace {
|
||||
// Support for compacting cms
|
||||
HeapWord* cross_threshold(HeapWord* start, HeapWord* end);
|
||||
HeapWord* forward_compact_top(size_t size, CompactPoint* cp, HeapWord* compact_top);
|
||||
- HeapWord* forward(oop q, size_t size, CompactPoint* cp, HeapWord* compact_top);
|
||||
+ HeapWord* forward(oop q, size_t size, CompactPoint* cp, HeapWord* compact_top, bool force_forward);
|
||||
|
||||
// Initialization helpers.
|
||||
void initializeIndexedFreeListArray();
|
||||
@@ -576,6 +576,9 @@ class CompactibleFreeListSpace: public CompactibleSpace {
|
||||
|
||||
// Support for compaction.
|
||||
void prepare_for_compaction(CompactPoint* cp);
|
||||
+
|
||||
+ bool must_rescue(oop old_obj, oop new_obj);
|
||||
+
|
||||
void adjust_pointers();
|
||||
void compact();
|
||||
// Reset the space to reflect the fact that a compaction of the
|
||||
diff --git a/src/hotspot/share/gc/cms/concurrentMarkSweepThread.cpp b/src/hotspot/share/gc/cms/concurrentMarkSweepThread.cpp
|
||||
index 3ada5755875..b6e930922d7 100644
|
||||
--- a/src/hotspot/share/gc/cms/concurrentMarkSweepThread.cpp
|
||||
+++ b/src/hotspot/share/gc/cms/concurrentMarkSweepThread.cpp
|
||||
@@ -78,10 +78,12 @@ void ConcurrentMarkSweepThread::run_service() {
|
||||
while (!should_terminate()) {
|
||||
sleepBeforeNextCycle();
|
||||
if (should_terminate()) break;
|
||||
- GCIdMark gc_id_mark;
|
||||
- GCCause::Cause cause = _collector->_full_gc_requested ?
|
||||
- _collector->_full_gc_cause : GCCause::_cms_concurrent_mark;
|
||||
- _collector->collect_in_background(cause);
|
||||
+ if (!Universe::is_redefining_gc_run()) {
|
||||
+ GCIdMark gc_id_mark;
|
||||
+ GCCause::Cause cause = _collector->_full_gc_requested ?
|
||||
+ _collector->_full_gc_cause : GCCause::_cms_concurrent_mark;
|
||||
+ _collector->collect_in_background(cause);
|
||||
+ }
|
||||
}
|
||||
|
||||
// Check that the state of any protocol for synchronization
|
||||
diff --git a/src/hotspot/share/gc/serial/markSweep.cpp b/src/hotspot/share/gc/serial/markSweep.cpp
|
||||
index d0ff86c8215..b4ed59f020c 100644
|
||||
--- a/src/hotspot/share/gc/serial/markSweep.cpp
|
||||
+++ b/src/hotspot/share/gc/serial/markSweep.cpp
|
||||
@@ -247,7 +247,7 @@ void MarkSweep::copy_rescued_objects_back() {
|
||||
|
||||
FREE_RESOURCE_ARRAY(HeapWord, rescued_ptr, size);
|
||||
|
||||
- new_obj->init_mark();
|
||||
+ new_obj->init_mark_raw();
|
||||
assert(oopDesc::is_oop(new_obj), "must be a valid oop");
|
||||
}
|
||||
_rescued_oops->clear();
|
||||
diff --git a/src/hotspot/share/gc/shared/gcConfig.cpp b/src/hotspot/share/gc/shared/gcConfig.cpp
|
||||
index 8aac2b39e1e..39364a64cb2 100644
|
||||
--- a/src/hotspot/share/gc/shared/gcConfig.cpp
|
||||
+++ b/src/hotspot/share/gc/shared/gcConfig.cpp
|
||||
@@ -101,7 +101,7 @@ void GCConfig::fail_if_unsupported_gc_is_selected() {
|
||||
}
|
||||
|
||||
void GCConfig::select_gc_ergonomically() {
|
||||
- if (AllowEnhancedClassRedefinition) {
|
||||
+ if (AllowEnhancedClassRedefinition && !UseConcMarkSweepGC) {
|
||||
// Enhanced class redefinition only supports serial GC at the moment
|
||||
FLAG_SET_ERGO(bool, UseSerialGC, true);
|
||||
} else if (os::is_server_class_machine()) {
|
||||
diff --git a/src/hotspot/share/gc/shared/space.cpp b/src/hotspot/share/gc/shared/space.cpp
|
||||
index 763abc91a39..947dff8ae0c 100644
|
||||
--- a/src/hotspot/share/gc/shared/space.cpp
|
||||
+++ b/src/hotspot/share/gc/shared/space.cpp
|
||||
@@ -388,11 +388,11 @@ HeapWord* CompactibleSpace::forward_compact_top(size_t size, CompactPoint* cp, H
|
||||
}
|
||||
|
||||
HeapWord* CompactibleSpace::forward(oop q, size_t size,
|
||||
- CompactPoint* cp, HeapWord* compact_top) {
|
||||
+ CompactPoint* cp, HeapWord* compact_top, bool force_forward) {
|
||||
compact_top = forward_compact_top(size, cp, compact_top);
|
||||
|
||||
// store the forwarding pointer into the mark word
|
||||
- if ((HeapWord*)q != compact_top || (size_t)q->size() != size) {
|
||||
+ if (force_forward || (HeapWord*)q != compact_top || (size_t)q->size() != size) {
|
||||
q->forward_to(oop(compact_top));
|
||||
assert(q->is_gc_marked(), "encoding the pointer should preserve the mark");
|
||||
} else {
|
||||
@@ -514,7 +514,7 @@ bool CompactibleSpace::must_rescue(oop old_obj, oop new_obj) {
|
||||
|
||||
} else {
|
||||
assert(space_index(old_obj) != space_index(new_obj), "old_obj and new_obj must be in different spaces");
|
||||
- if (tenured_gen->is_in_reserved(new_obj)) {
|
||||
+ if (new_in_tenured) {
|
||||
// Must never rescue when moving from the new into the old generation.
|
||||
assert(GenCollectedHeap::heap()->young_gen()->is_in_reserved(old_obj), "old_obj must be in DefNewGeneration");
|
||||
assert(space_index(old_obj) > space_index(new_obj), "must be");
|
||||
@@ -858,14 +858,14 @@ void OffsetTableContigSpace::verify() const {
|
||||
// Compute the forward sizes and leave out objects whose position could
|
||||
// possibly overlap other objects.
|
||||
HeapWord* CompactibleSpace::forward_with_rescue(HeapWord* q, size_t size,
|
||||
- CompactPoint* cp, HeapWord* compact_top) {
|
||||
+ CompactPoint* cp, HeapWord* compact_top, bool force_forward) {
|
||||
size_t forward_size = size;
|
||||
|
||||
// (DCEVM) There is a new version of the class of q => different size
|
||||
if (oop(q)->klass()->new_version() != NULL && oop(q)->klass()->new_version()->update_information() != NULL) {
|
||||
|
||||
size_t new_size = oop(q)->size_given_klass(oop(q)->klass()->new_version());
|
||||
- assert(size != new_size, "instances without changed size have to be updated prior to GC run");
|
||||
+ // assert(size != new_size, "instances without changed size have to be updated prior to GC run");
|
||||
forward_size = new_size;
|
||||
}
|
||||
|
||||
@@ -879,7 +879,7 @@ HeapWord* CompactibleSpace::forward_with_rescue(HeapWord* q, size_t size,
|
||||
return compact_top;
|
||||
}
|
||||
|
||||
- return forward(oop(q), forward_size, cp, compact_top);
|
||||
+ return forward(oop(q), forward_size, cp, compact_top, force_forward);
|
||||
}
|
||||
|
||||
// Compute the forwarding addresses for the objects that need to be rescued.
|
||||
@@ -895,11 +895,11 @@ HeapWord* CompactibleSpace::forward_rescued(CompactPoint* cp, HeapWord* compact_
|
||||
// (DCEVM) There is a new version of the class of q => different size
|
||||
if (oop(q)->klass()->new_version() != NULL) {
|
||||
size_t new_size = oop(q)->size_given_klass(oop(q)->klass()->new_version());
|
||||
- assert(size != new_size, "instances without changed size have to be updated prior to GC run");
|
||||
+ // assert(size != new_size, "instances without changed size have to be updated prior to GC run");
|
||||
size = new_size;
|
||||
}
|
||||
|
||||
- compact_top = cp->space->forward(oop(q), size, cp, compact_top);
|
||||
+ compact_top = cp->space->forward(oop(q), size, cp, compact_top, true);
|
||||
assert(compact_top <= end(), "must not write over end of space!");
|
||||
}
|
||||
MarkSweep::_rescued_oops->clear();
|
||||
diff --git a/src/hotspot/share/gc/shared/space.hpp b/src/hotspot/share/gc/shared/space.hpp
|
||||
index 8eb5669fb79..901c89d8a30 100644
|
||||
--- a/src/hotspot/share/gc/shared/space.hpp
|
||||
+++ b/src/hotspot/share/gc/shared/space.hpp
|
||||
@@ -421,7 +421,7 @@ public:
|
||||
virtual void prepare_for_compaction(CompactPoint* cp) = 0;
|
||||
// MarkSweep support phase3
|
||||
DEBUG_ONLY(int space_index(oop obj));
|
||||
- bool must_rescue(oop old_obj, oop new_obj);
|
||||
+ virtual bool must_rescue(oop old_obj, oop new_obj);
|
||||
HeapWord* rescue(HeapWord* old_obj);
|
||||
virtual void adjust_pointers();
|
||||
// MarkSweep support phase4
|
||||
@@ -452,11 +452,11 @@ public:
|
||||
// function of the then-current compaction space, and updates "cp->threshold
|
||||
// accordingly".
|
||||
virtual HeapWord* forward(oop q, size_t size, CompactPoint* cp,
|
||||
- HeapWord* compact_top);
|
||||
+ HeapWord* compact_top, bool force_forward);
|
||||
// (DCEVM) same as forwad, but can rescue objects. Invoked only during
|
||||
// redefinition runs
|
||||
HeapWord* forward_with_rescue(HeapWord* q, size_t size, CompactPoint* cp,
|
||||
- HeapWord* compact_top);
|
||||
+ HeapWord* compact_top, bool force_forward);
|
||||
|
||||
HeapWord* forward_rescued(CompactPoint* cp, HeapWord* compact_top);
|
||||
|
||||
diff --git a/src/hotspot/share/gc/shared/space.inline.hpp b/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
index 75d7e685edf..26e56ae6f7e 100644
|
||||
--- a/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
+++ b/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
@@ -163,6 +163,8 @@ inline void CompactibleSpace::scan_and_forward(SpaceType* space, CompactPoint* c
|
||||
HeapWord* cur_obj = space->bottom();
|
||||
HeapWord* scan_limit = space->scan_limit();
|
||||
|
||||
+ bool force_forward = false;
|
||||
+
|
||||
while (cur_obj < scan_limit) {
|
||||
assert(!space->scanned_block_is_obj(cur_obj) ||
|
||||
oop(cur_obj)->mark_raw()->is_marked() || oop(cur_obj)->mark_raw()->is_unlocked() ||
|
||||
@@ -174,14 +176,15 @@ inline void CompactibleSpace::scan_and_forward(SpaceType* space, CompactPoint* c
|
||||
size_t size = space->scanned_block_size(cur_obj);
|
||||
|
||||
if (redefinition_run) {
|
||||
- compact_top = cp->space->forward_with_rescue(cur_obj, size, cp, compact_top);
|
||||
+ compact_top = cp->space->forward_with_rescue(cur_obj, size, cp, compact_top, force_forward);
|
||||
if (first_dead == NULL && oop(cur_obj)->is_gc_marked()) {
|
||||
/* Was moved (otherwise, forward would reset mark),
|
||||
set first_dead to here */
|
||||
first_dead = cur_obj;
|
||||
+ force_forward = true;
|
||||
}
|
||||
} else {
|
||||
- compact_top = cp->space->forward(oop(cur_obj), size, cp, compact_top);
|
||||
+ compact_top = cp->space->forward(oop(cur_obj), size, cp, compact_top, false);
|
||||
}
|
||||
|
||||
cur_obj += size;
|
||||
@@ -197,9 +200,9 @@ inline void CompactibleSpace::scan_and_forward(SpaceType* space, CompactPoint* c
|
||||
|
||||
// see if we might want to pretend this object is alive so that
|
||||
// we don't have to compact quite as often.
|
||||
- if (cur_obj == compact_top && dead_spacer.insert_deadspace(cur_obj, end)) {
|
||||
+ if (!redefinition_run && cur_obj == compact_top && dead_spacer.insert_deadspace(cur_obj, end)) {
|
||||
oop obj = oop(cur_obj);
|
||||
- compact_top = cp->space->forward(obj, obj->size(), cp, compact_top);
|
||||
+ compact_top = cp->space->forward(obj, obj->size(), cp, compact_top, force_forward);
|
||||
end_of_live = end;
|
||||
} else {
|
||||
// otherwise, it really is a free region.
|
||||
@@ -351,7 +354,7 @@ inline void CompactibleSpace::scan_and_compact(SpaceType* space, bool redefiniti
|
||||
HeapWord* compaction_top = (HeapWord*)oop(cur_obj)->forwardee();
|
||||
|
||||
if (redefinition_run && space->must_rescue(oop(cur_obj), oop(cur_obj)->forwardee())) {
|
||||
- space->rescue(cur_obj);
|
||||
+ space->rescue(cur_obj);
|
||||
debug_only(Copy::fill_to_words(cur_obj, size, 0));
|
||||
cur_obj += size;
|
||||
continue;
|
||||
@@ -361,8 +364,7 @@ inline void CompactibleSpace::scan_and_compact(SpaceType* space, bool redefiniti
|
||||
Prefetch::write(compaction_top, copy_interval);
|
||||
|
||||
// copy object and reinit its mark
|
||||
- assert(cur_obj != compaction_top || oop(cur_obj)->klass()->new_version() != NULL,
|
||||
- "everything in this pass should be moving");
|
||||
+ assert(redefinition_run || cur_obj != compaction_top, "everything in this pass should be moving");
|
||||
if (redefinition_run && oop(cur_obj)->klass()->new_version() != NULL) {
|
||||
Klass* new_version = oop(cur_obj)->klass()->new_version();
|
||||
if (new_version->update_information() == NULL) {
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index c64d6bb1bb5..9b8678a53fb 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -52,6 +52,7 @@
|
||||
#include "prims/jvmtiThreadState.inline.hpp"
|
||||
#include "utilities/events.hpp"
|
||||
#include "oops/constantPool.inline.hpp"
|
||||
+#include "gc/cms/cmsHeap.hpp"
|
||||
|
||||
Array<Method*>* VM_EnhancedRedefineClasses::_old_methods = NULL;
|
||||
Array<Method*>* VM_EnhancedRedefineClasses::_new_methods = NULL;
|
||||
@@ -420,13 +421,11 @@ public:
|
||||
Klass* new_klass = obj->klass()->new_version();
|
||||
|
||||
if (new_klass->update_information() != NULL) {
|
||||
- int size_diff = obj->size() - obj->size_given_klass(new_klass);
|
||||
-
|
||||
- // Either new size is bigger or gap is to small to be filled
|
||||
- if (size_diff < 0 || (size_diff > 0 && (size_t) size_diff < CollectedHeap::min_fill_size())) {
|
||||
+ if (obj->size() - obj->size_given_klass(new_klass) != 0) {
|
||||
// We need an instance update => set back to old klass
|
||||
_needs_instance_update = true;
|
||||
} else {
|
||||
+ // Either new size is bigger or gap is to small to be filled
|
||||
oop src = obj;
|
||||
if (new_klass->is_copying_backwards()) {
|
||||
copy_to_tmp(obj);
|
||||
@@ -436,11 +435,6 @@ public:
|
||||
// FIXME: instance updates...
|
||||
//guarantee(false, "instance updates!");
|
||||
MarkSweep::update_fields(obj, src, new_klass->update_information());
|
||||
-
|
||||
- if (size_diff > 0) {
|
||||
- HeapWord* dead_space = ((HeapWord *)obj) + obj->size();
|
||||
- CollectedHeap::fill_with_object(dead_space, size_diff);
|
||||
- }
|
||||
}
|
||||
} else {
|
||||
obj->set_klass(obj->klass()->new_version());
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index ca57b524593..2ca6dde069d 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -2047,14 +2047,14 @@ bool Arguments::check_gc_consistency() {
|
||||
if (AllowEnhancedClassRedefinition) {
|
||||
// Must use serial GC. This limitation applies because the instance size changing GC modifications
|
||||
// are only built into the mark and compact algorithm.
|
||||
- if (!UseSerialGC && i >= 1) {
|
||||
+ if ((!UseSerialGC && !UseConcMarkSweepGC) && i >= 1) {
|
||||
jio_fprintf(defaultStream::error_stream(),
|
||||
- "Must use the serial GC with enhanced class redefinition\n");
|
||||
+ "Must use the serial or concurrent mark sweep GC with enhanced class redefinition.\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
- if (i > 1) {
|
||||
+ if (i > 2) {
|
||||
jio_fprintf(defaultStream::error_stream(),
|
||||
"Conflicting collector combinations in option list; "
|
||||
"please refer to the release notes for the combinations "
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
257
jb/project/tools/patches/dcevm/0010-Code-cleanup.patch
Normal file
257
jb/project/tools/patches/dcevm/0010-Code-cleanup.patch
Normal file
@@ -0,0 +1,257 @@
|
||||
From 11d10158d77512795b1b8ab8378620b95b67f175 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 29 Dec 2018 13:22:29 +0100
|
||||
Subject: [PATCH 10/50] Code cleanup
|
||||
|
||||
---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 125 ++++++------------
|
||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 3 -
|
||||
2 files changed, 40 insertions(+), 88 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 9b8678a53fb..0aa1ac4ff80 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "memory/metaspaceShared.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "memory/iterator.inline.hpp"
|
||||
-#include "gc/serial/markSweep.hpp" // FIXME: other GC?
|
||||
+#include "gc/serial/markSweep.hpp"
|
||||
#include "oops/fieldStreams.hpp"
|
||||
#include "oops/klassVtable.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
@@ -485,7 +485,9 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
}
|
||||
|
||||
// Deoptimize all compiled code that depends on this class (do only once, because it clears whole cache)
|
||||
- flush_dependent_code(NULL, thread);
|
||||
+ //if (_max_redefinition_flags > Klass::ModifyClass) {
|
||||
+ flush_dependent_code(NULL, thread);
|
||||
+ //}
|
||||
|
||||
// JSR-292 support
|
||||
if (_any_class_has_resolved_methods) {
|
||||
@@ -593,17 +595,28 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
// See jvmtiExport.hpp for detailed explanation.
|
||||
JvmtiExport::set_has_redefined_a_class();
|
||||
|
||||
- // check_class() is optionally called for product bits, but is
|
||||
- // always called for non-product bits.
|
||||
#ifdef PRODUCT
|
||||
if (log_is_enabled(Trace, redefine, class, obsolete, metadata)) {
|
||||
#endif
|
||||
- log_trace(redefine, class, obsolete, metadata)("calling check_class");
|
||||
- CheckClass check_class(thread);
|
||||
- ClassLoaderDataGraph::classes_do(&check_class);
|
||||
+ for (int i=0; i<_affected_klasses->length(); i++) {
|
||||
+ Klass* the_class = _affected_klasses->at(i);
|
||||
+ assert(the_class->new_version() != NULL, "Must have been redefined");
|
||||
+ Klass* new_version = the_class->new_version();
|
||||
+ assert(new_version->new_version() == NULL, "Must be newest version");
|
||||
+
|
||||
+ if (!(new_version->super() == NULL || new_version->super()->new_version() == NULL)) {
|
||||
+ new_version->print();
|
||||
+ new_version->super()->print();
|
||||
+ }
|
||||
+ assert(new_version->super() == NULL || new_version->super()->new_version() == NULL, "Super class must be newest version");
|
||||
+ }
|
||||
+ log_trace(redefine, class, obsolete, metadata)("calling check_class");
|
||||
+ CheckClass check_class(thread);
|
||||
+ ClassLoaderDataGraph::classes_do(&check_class);
|
||||
#ifdef PRODUCT
|
||||
}
|
||||
#endif
|
||||
+
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1279,24 +1292,23 @@ void VM_EnhancedRedefineClasses::calculate_instance_update_information(Klass* ne
|
||||
GrowableArray<int> result = cl.finish();
|
||||
ik->store_update_information(result);
|
||||
ik->set_copying_backwards(cl.does_copy_backwards());
|
||||
-/* TODO logging
|
||||
- if (RC_TRACE_ENABLED(0x00000001)) {
|
||||
- RC_TRACE(0x00000001, ("Instance update information for %s:", new_version->name()->as_C_string()));
|
||||
+ if (log_is_enabled(Trace, redefine, class, obsolete, metadata)) {
|
||||
+ log_trace(redefine, class, obsolete, metadata)("Instance update information for %s:", new_version->name()->as_C_string());
|
||||
if (cl.does_copy_backwards()) {
|
||||
- RC_TRACE(0x00000001, ("\tDoes copy backwards!"));
|
||||
+ log_trace(redefine, class, obsolete, metadata)("\tDoes copy backwards!");
|
||||
}
|
||||
for (int i=0; i<result.length(); i++) {
|
||||
int curNum = result.at(i);
|
||||
if (curNum < 0) {
|
||||
- RC_TRACE(0x00000001, ("\t%d CLEAN", curNum));
|
||||
+ log_trace(redefine, class, obsolete, metadata)("\t%d CLEAN", curNum);
|
||||
} else if (curNum > 0) {
|
||||
- RC_TRACE(0x00000001, ("\t%d COPY from %d", curNum, result.at(i + 1)));
|
||||
+ log_trace(redefine, class, obsolete, metadata)("\t%d COPY from %d", curNum, result.at(i + 1));
|
||||
i++;
|
||||
} else {
|
||||
- RC_TRACE(0x00000001, ("\tEND"));
|
||||
+ log_trace(redefine, class, obsolete, metadata)("\tEND");
|
||||
}
|
||||
}
|
||||
- }*/
|
||||
+ }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1813,6 +1825,7 @@ void VM_EnhancedRedefineClasses::compute_added_deleted_matching_methods() {
|
||||
/**
|
||||
FIXME - swap_annotations is never called, check that annotations work
|
||||
*/
|
||||
+// TODO : delete it
|
||||
void VM_EnhancedRedefineClasses::swap_annotations(InstanceKlass* the_class,
|
||||
InstanceKlass* new_class) {
|
||||
// FIXME - probably original implementation only
|
||||
@@ -1822,7 +1835,6 @@ void VM_EnhancedRedefineClasses::swap_annotations(InstanceKlass* the_class,
|
||||
new_class->set_annotations(old_annotations);
|
||||
}
|
||||
|
||||
-
|
||||
// Install the redefinition of a class:
|
||||
// - house keeping (flushing breakpoints and caches, deoptimizing
|
||||
// dependent compiled code)
|
||||
@@ -1853,7 +1865,9 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
|
||||
// DCEVM Deoptimization is always for whole java world, call only once after all classes are redefined
|
||||
// Deoptimize all compiled code that depends on this class
|
||||
- // flush_dependent_code(the_class, THREAD);
|
||||
+ //if (_max_redefinition_flags <= Klass::ModifyClass) {
|
||||
+ //flush_dependent_code(the_class, THREAD);
|
||||
+ //}
|
||||
|
||||
_old_methods = the_class->methods();
|
||||
_new_methods = new_class->methods();
|
||||
@@ -1928,64 +1942,15 @@ void VM_EnhancedRedefineClasses::increment_class_counter(InstanceKlass *ik, TRAP
|
||||
}
|
||||
}
|
||||
|
||||
-// FIXME - class check is currently disabled
|
||||
void VM_EnhancedRedefineClasses::CheckClass::do_klass(Klass* k) {
|
||||
- return;
|
||||
- bool no_old_methods = true; // be optimistic
|
||||
-
|
||||
- // Both array and instance classes have vtables.
|
||||
- // a vtable should never contain old or obsolete methods
|
||||
- ResourceMark rm(_thread);
|
||||
- if (k->vtable_length() > 0 &&
|
||||
- !k->vtable().check_no_old_or_obsolete_entries()) {
|
||||
- if (log_is_enabled(Trace, redefine, class, obsolete, metadata)) {
|
||||
- log_trace(redefine, class, obsolete, metadata)
|
||||
- ("klassVtable::check_no_old_or_obsolete_entries failure -- OLD or OBSOLETE method found -- class: %s",
|
||||
- k->signature_name());
|
||||
- k->vtable().dump_vtable();
|
||||
- }
|
||||
- no_old_methods = false;
|
||||
- }
|
||||
-
|
||||
- if (k->is_instance_klass()) {
|
||||
- HandleMark hm(_thread);
|
||||
- InstanceKlass *ik = InstanceKlass::cast(k);
|
||||
+ HandleMark hm(_thread);
|
||||
+ InstanceKlass *ik = (InstanceKlass *) k;
|
||||
+ assert(ik->new_version() == NULL, "must be latest version in system dictionary");
|
||||
|
||||
- // an itable should never contain old or obsolete methods
|
||||
- if (ik->itable_length() > 0 &&
|
||||
- !ik->itable().check_no_old_or_obsolete_entries()) {
|
||||
- if (log_is_enabled(Trace, redefine, class, obsolete, metadata)) {
|
||||
- log_trace(redefine, class, obsolete, metadata)
|
||||
- ("klassItable::check_no_old_or_obsolete_entries failure -- OLD or OBSOLETE method found -- class: %s",
|
||||
- ik->signature_name());
|
||||
- ik->itable().dump_itable();
|
||||
- }
|
||||
- no_old_methods = false;
|
||||
- }
|
||||
-
|
||||
- // the constant pool cache should never contain non-deleted old or obsolete methods
|
||||
- if (ik->constants() != NULL &&
|
||||
- ik->constants()->cache() != NULL &&
|
||||
- !ik->constants()->cache()->check_no_old_or_obsolete_entries()) {
|
||||
- if (log_is_enabled(Trace, redefine, class, obsolete, metadata)) {
|
||||
- log_trace(redefine, class, obsolete, metadata)
|
||||
- ("cp-cache::check_no_old_or_obsolete_entries failure -- OLD or OBSOLETE method found -- class: %s",
|
||||
- ik->signature_name());
|
||||
- ik->constants()->cache()->dump_cache();
|
||||
- }
|
||||
- no_old_methods = false;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // print and fail guarantee if old methods are found.
|
||||
- if (!no_old_methods) {
|
||||
- if (log_is_enabled(Trace, redefine, class, obsolete, metadata)) {
|
||||
- dump_methods();
|
||||
- } else {
|
||||
- log_trace(redefine, class)("Use the '-Xlog:redefine+class*:' option "
|
||||
- "to see more info about the following guarantee() failure.");
|
||||
- }
|
||||
- guarantee(false, "OLD and/or OBSOLETE method(s) found");
|
||||
+ if (ik->vtable_length() > 0) {
|
||||
+ ResourceMark rm(_thread);
|
||||
+ assert(ik->vtable().check_no_old_or_obsolete_entries(), "old method found");
|
||||
+ ik->vtable().verify(tty, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2051,15 +2016,6 @@ void VM_EnhancedRedefineClasses::dump_methods() {
|
||||
}
|
||||
}
|
||||
|
||||
-// TODO - is it called anywhere?
|
||||
-void VM_EnhancedRedefineClasses::print_on_error(outputStream* st) const {
|
||||
- VM_Operation::print_on_error(st);
|
||||
- if (_the_class_oop != NULL) {
|
||||
- ResourceMark rm;
|
||||
- st->print_cr(", redefining class %s", _the_class_oop->external_name());
|
||||
- }
|
||||
-}
|
||||
-
|
||||
/**
|
||||
Helper class to traverse all loaded classes and figure out if the class is affected by redefinition.
|
||||
*/
|
||||
@@ -2093,7 +2049,7 @@ class AffectedKlassClosure : public KlassClosure {
|
||||
log_trace(redefine, class, load)("found affected class: %s", klass->name()->as_C_string());
|
||||
klass->set_redefinition_flag(Klass::MarkedAsAffected);
|
||||
_affected_klasses->append(klass);
|
||||
- return;
|
||||
+ return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2125,7 +2081,7 @@ jvmtiError VM_EnhancedRedefineClasses::find_sorted_affected_classes(TRAPS) {
|
||||
|
||||
// Find classes not directly redefined, but affected by a redefinition (because one of its supertypes is redefined)
|
||||
AffectedKlassClosure closure(_affected_klasses);
|
||||
- // TODO: j10 - review chancge from SystemDictionary::classes_do(&closure);
|
||||
+ // Updated in j10, from original SystemDictionary::classes_do
|
||||
ClassLoaderDataGraph::dictionary_classes_do(&closure);
|
||||
log_trace(redefine, class, load)("%d classes affected", _affected_klasses->length());
|
||||
|
||||
@@ -2160,7 +2116,6 @@ static bool match_second(void* value, KlassPair elem) {
|
||||
For each class to be redefined parse the bytecode and figure out the superclass and all interfaces.
|
||||
First newly introduced classes (_class_defs) are scanned and then affected classed (_affected_klasses).
|
||||
Affected flag is cleared (clear_redefinition_flag(Klass::MarkedAsAffected))
|
||||
-
|
||||
For each dependency create a KlassPair instance. Finnaly, affected classes (_affected_klasses) are sorted according to pairs.
|
||||
|
||||
TODO - the class file is potentionally parsed multiple times - introduce a cache?
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index b712d69a193..37e63a1810f 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -195,8 +195,5 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
// Modifiable test must be shared between IsModifiableClass query
|
||||
// and redefine implementation
|
||||
static bool is_modifiable_class(oop klass_mirror);
|
||||
-
|
||||
- // Error printing
|
||||
- void print_on_error(outputStream* st) const;
|
||||
};
|
||||
#endif // SHARE_VM_PRIMS_JVMTIREDEFINECLASSES2_HPP
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
118
jb/project/tools/patches/dcevm/0011-Fix-check_class.patch
Normal file
118
jb/project/tools/patches/dcevm/0011-Fix-check_class.patch
Normal file
@@ -0,0 +1,118 @@
|
||||
From 1765f4c1b2e8958b458fa17d329be98ad025069c Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 29 Dec 2018 16:05:25 +0100
|
||||
Subject: [PATCH 11/50] Fix check_class
|
||||
|
||||
---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 39 +++++++------------
|
||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 5 +--
|
||||
2 files changed, 16 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 0aa1ac4ff80..c08b3e82b2e 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -1,4 +1,4 @@
|
||||
-/*
|
||||
+ /*
|
||||
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "classfile/metadataOnStackMark.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "classfile/verifier.hpp"
|
||||
+#include "classfile/dictionary.hpp"
|
||||
#include "interpreter/oopMapCache.hpp"
|
||||
#include "interpreter/rewriter.hpp"
|
||||
#include "logging/logStream.hpp"
|
||||
@@ -611,8 +612,7 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
assert(new_version->super() == NULL || new_version->super()->new_version() == NULL, "Super class must be newest version");
|
||||
}
|
||||
log_trace(redefine, class, obsolete, metadata)("calling check_class");
|
||||
- CheckClass check_class(thread);
|
||||
- ClassLoaderDataGraph::classes_do(&check_class);
|
||||
+ ClassLoaderData::the_null_class_loader_data()->dictionary()->classes_do(check_class, thread);
|
||||
#ifdef PRODUCT
|
||||
}
|
||||
#endif
|
||||
@@ -1822,19 +1822,6 @@ void VM_EnhancedRedefineClasses::compute_added_deleted_matching_methods() {
|
||||
assert(_matching_methods_length + _added_methods_length == _new_methods->length(), "sanity");
|
||||
}
|
||||
|
||||
-/**
|
||||
- FIXME - swap_annotations is never called, check that annotations work
|
||||
-*/
|
||||
-// TODO : delete it
|
||||
-void VM_EnhancedRedefineClasses::swap_annotations(InstanceKlass* the_class,
|
||||
- InstanceKlass* new_class) {
|
||||
- // FIXME - probably original implementation only
|
||||
- // Swap annotation fields values
|
||||
- Annotations* old_annotations = the_class->annotations();
|
||||
- the_class->set_annotations(new_class->annotations());
|
||||
- new_class->set_annotations(old_annotations);
|
||||
-}
|
||||
-
|
||||
// Install the redefinition of a class:
|
||||
// - house keeping (flushing breakpoints and caches, deoptimizing
|
||||
// dependent compiled code)
|
||||
@@ -1942,15 +1929,17 @@ void VM_EnhancedRedefineClasses::increment_class_counter(InstanceKlass *ik, TRAP
|
||||
}
|
||||
}
|
||||
|
||||
-void VM_EnhancedRedefineClasses::CheckClass::do_klass(Klass* k) {
|
||||
- HandleMark hm(_thread);
|
||||
- InstanceKlass *ik = (InstanceKlass *) k;
|
||||
- assert(ik->new_version() == NULL, "must be latest version in system dictionary");
|
||||
+void VM_EnhancedRedefineClasses::check_class(InstanceKlass* ik, TRAPS) {
|
||||
+ if (ik->is_instance_klass() && ik->old_version() != NULL) {
|
||||
+ HandleMark hm(THREAD);
|
||||
+
|
||||
+ assert(ik->new_version() == NULL, "must be latest version in system dictionary");
|
||||
|
||||
- if (ik->vtable_length() > 0) {
|
||||
- ResourceMark rm(_thread);
|
||||
- assert(ik->vtable().check_no_old_or_obsolete_entries(), "old method found");
|
||||
- ik->vtable().verify(tty, true);
|
||||
+ if (ik->vtable_length() > 0) {
|
||||
+ ResourceMark rm(THREAD);
|
||||
+ assert(ik->vtable().check_no_old_or_obsolete_entries(), "old method found");
|
||||
+ ik->vtable().verify(tty, true);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2017,7 +2006,7 @@ void VM_EnhancedRedefineClasses::dump_methods() {
|
||||
}
|
||||
|
||||
/**
|
||||
- Helper class to traverse all loaded classes and figure out if the class is affected by redefinition.
|
||||
+ Helper class to traverse all loaded classes and figure out if the class is affected by redefinition.
|
||||
*/
|
||||
class AffectedKlassClosure : public KlassClosure {
|
||||
private:
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index 37e63a1810f..5b3ebc13661 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -144,15 +144,14 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
// Install the redefinition of a class
|
||||
void redefine_single_class(InstanceKlass* new_class_oop, TRAPS);
|
||||
|
||||
- void swap_annotations(InstanceKlass* new_class,
|
||||
- InstanceKlass* scratch_class);
|
||||
-
|
||||
// Increment the classRedefinedCount field in the specific InstanceKlass
|
||||
// and in all direct and indirect subclasses.
|
||||
void increment_class_counter(InstanceKlass *ik, TRAPS);
|
||||
|
||||
void flush_dependent_code(InstanceKlass* k_h, TRAPS);
|
||||
|
||||
+ static void check_class(InstanceKlass* k_oop, TRAPS);
|
||||
+
|
||||
static void dump_methods();
|
||||
|
||||
// Check that there are no old or obsolete methods
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
From 0851d437a65dc9ac6d8355b54689d36e77e104b3 Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 29 Dec 2018 17:58:39 +0100
|
||||
Subject: [PATCH 12/50] Fix force_forward in dead space
|
||||
|
||||
---
|
||||
src/hotspot/share/gc/shared/space.inline.hpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/hotspot/share/gc/shared/space.inline.hpp b/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
index 26e56ae6f7e..8c255d6d428 100644
|
||||
--- a/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
+++ b/src/hotspot/share/gc/shared/space.inline.hpp
|
||||
@@ -213,6 +213,7 @@ inline void CompactibleSpace::scan_and_forward(SpaceType* space, CompactPoint* c
|
||||
// see if this is the first dead region.
|
||||
if (first_dead == NULL) {
|
||||
first_dead = cur_obj;
|
||||
+ force_forward = true;
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
25
jb/project/tools/patches/dcevm/0013-Cleanup.patch
Normal file
25
jb/project/tools/patches/dcevm/0013-Cleanup.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From 35aba247d8a3e25f5d19403ba5f293bfdaf6539c Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 1 Mar 2019 18:45:13 +0100
|
||||
Subject: [PATCH 13/50] Cleanup
|
||||
|
||||
---
|
||||
src/hotspot/share/gc/shared/space.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/gc/shared/space.cpp b/src/hotspot/share/gc/shared/space.cpp
|
||||
index 947dff8ae0c..56b144b46f1 100644
|
||||
--- a/src/hotspot/share/gc/shared/space.cpp
|
||||
+++ b/src/hotspot/share/gc/shared/space.cpp
|
||||
@@ -862,7 +862,7 @@ HeapWord* CompactibleSpace::forward_with_rescue(HeapWord* q, size_t size,
|
||||
size_t forward_size = size;
|
||||
|
||||
// (DCEVM) There is a new version of the class of q => different size
|
||||
- if (oop(q)->klass()->new_version() != NULL && oop(q)->klass()->new_version()->update_information() != NULL) {
|
||||
+ if (oop(q)->klass()->new_version() != NULL) {
|
||||
|
||||
size_t new_size = oop(q)->size_given_klass(oop(q)->klass()->new_version());
|
||||
// assert(size != new_size, "instances without changed size have to be updated prior to GC run");
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
From 26a5079eb61a2e23328fbd8ca59ffc2ab6b6193b Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 29 Dec 2018 17:38:27 +0100
|
||||
Subject: [PATCH 14/50] Add codecache flush optimization, but just flush all
|
||||
cache.
|
||||
|
||||
Redefined class can define a new method that overrides
|
||||
method in superclass which is already used in codecache for
|
||||
optimized non-virtual calls, etc...
|
||||
---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 18 ++++++++++++------
|
||||
1 file changed, 12 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index c08b3e82b2e..4ca638548dc 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -486,9 +486,9 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
}
|
||||
|
||||
// Deoptimize all compiled code that depends on this class (do only once, because it clears whole cache)
|
||||
- //if (_max_redefinition_flags > Klass::ModifyClass) {
|
||||
+ // if (_max_redefinition_flags > Klass::ModifyClass) {
|
||||
flush_dependent_code(NULL, thread);
|
||||
- //}
|
||||
+ // }
|
||||
|
||||
// JSR-292 support
|
||||
if (_any_class_has_resolved_methods) {
|
||||
@@ -1736,8 +1736,14 @@ void VM_EnhancedRedefineClasses::flush_dependent_code(InstanceKlass* k_h, TRAPS)
|
||||
// All dependencies have been recorded from startup or this is a second or
|
||||
// subsequent use of RedefineClasses
|
||||
// FIXME: for now, deoptimize all!
|
||||
- if (0 && JvmtiExport::all_dependencies_are_recorded()) {
|
||||
+ if (0 && k_h != NULL && JvmtiExport::all_dependencies_are_recorded()) {
|
||||
CodeCache::flush_evol_dependents_on(k_h);
|
||||
+ Klass* superCl = k_h->super();
|
||||
+ // Deoptimize super classes since redefined class can has a new method override
|
||||
+ while (superCl != NULL && !superCl->is_redefining()) {
|
||||
+ CodeCache::flush_evol_dependents_on(InstanceKlass::cast(superCl));
|
||||
+ superCl = superCl->super();
|
||||
+ }
|
||||
} else {
|
||||
CodeCache::mark_all_nmethods_for_deoptimization();
|
||||
|
||||
@@ -1852,9 +1858,9 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
|
||||
// DCEVM Deoptimization is always for whole java world, call only once after all classes are redefined
|
||||
// Deoptimize all compiled code that depends on this class
|
||||
- //if (_max_redefinition_flags <= Klass::ModifyClass) {
|
||||
- //flush_dependent_code(the_class, THREAD);
|
||||
- //}
|
||||
+// if (_max_redefinition_flags <= Klass::ModifyClass) {
|
||||
+// flush_dependent_code(the_class, THREAD);
|
||||
+// }
|
||||
|
||||
_old_methods = the_class->methods();
|
||||
_new_methods = new_class->methods();
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,484 @@
|
||||
From 24a60477aef7098ea23ab50a573332957741ea7b Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Wed, 14 Nov 2018 21:20:08 +0100
|
||||
Subject: [PATCH 15/50] HotswapAgent integration
|
||||
|
||||
It include:
|
||||
|
||||
- option to compile DCEVM only version with -DDCEVM_ONLY added
|
||||
to CFLAGS (bash configure --with-extra-cflags="-DDCEVM_ONLY"), by
|
||||
default compilation goes with HotswapAgent
|
||||
|
||||
Add --add-opens for necessary modules/packages
|
||||
- java.base/java.lang - for reflection access to Proxy.proxyCache
|
||||
- java.base/jdk.internal.loader - for access proxyCache class
|
||||
- java.desktop/java.beans - for reflection access to Introspector
|
||||
|
||||
- be quiet if HotswapAgent is not found in lib/, it is compatible with
|
||||
old DCEVM
|
||||
- disable hotswapagent for -Xshare:dump
|
||||
- disable HotswapAgent in jvm tools
|
||||
---
|
||||
make/launcher/Launcher-java.rmi.gmk | 2 +
|
||||
make/launcher/Launcher-java.scripting.gmk | 3 +-
|
||||
make/launcher/Launcher-java.security.jgss.gmk | 3 +
|
||||
make/launcher/Launcher-jdk.aot.gmk | 2 +
|
||||
make/launcher/Launcher-jdk.compiler.gmk | 5 +-
|
||||
make/launcher/Launcher-jdk.hotspot.agent.gmk | 1 +
|
||||
make/launcher/Launcher-jdk.jartool.gmk | 2 +
|
||||
make/launcher/Launcher-jdk.javadoc.gmk | 3 +-
|
||||
make/launcher/Launcher-jdk.jcmd.gmk | 13 +++-
|
||||
make/launcher/Launcher-jdk.jconsole.gmk | 3 +-
|
||||
make/launcher/Launcher-jdk.jdeps.gmk | 3 +
|
||||
make/launcher/Launcher-jdk.jdi.gmk | 1 +
|
||||
make/launcher/Launcher-jdk.jlink.gmk | 5 +-
|
||||
make/launcher/Launcher-jdk.jshell.gmk | 1 +
|
||||
make/launcher/Launcher-jdk.jstatd.gmk | 1 +
|
||||
make/launcher/Launcher-jdk.pack.gmk | 1 +
|
||||
make/launcher/Launcher-jdk.rmic.gmk | 1 +
|
||||
.../Launcher-jdk.scripting.nashorn.shell.gmk | 3 +-
|
||||
src/hotspot/share/runtime/arguments.cpp | 59 +++++++++++++++++++
|
||||
src/hotspot/share/runtime/arguments.hpp | 3 +
|
||||
src/hotspot/share/runtime/globals.hpp | 12 +++-
|
||||
21 files changed, 117 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/make/launcher/Launcher-java.rmi.gmk b/make/launcher/Launcher-java.rmi.gmk
|
||||
index a69a90bcc81..07046232275 100644
|
||||
--- a/make/launcher/Launcher-java.rmi.gmk
|
||||
+++ b/make/launcher/Launcher-java.rmi.gmk
|
||||
@@ -27,8 +27,10 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, rmid, \
|
||||
MAIN_CLASS := sun.rmi.server.Activation, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, rmiregistry, \
|
||||
MAIN_CLASS := sun.rmi.registry.RegistryImpl, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-java.scripting.gmk b/make/launcher/Launcher-java.scripting.gmk
|
||||
index 057d2bf3aca..cf100e20789 100644
|
||||
--- a/make/launcher/Launcher-java.scripting.gmk
|
||||
+++ b/make/launcher/Launcher-java.scripting.gmk
|
||||
@@ -27,5 +27,6 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jrunscript, \
|
||||
MAIN_CLASS := com.sun.tools.script.shell.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-java.security.jgss.gmk b/make/launcher/Launcher-java.security.jgss.gmk
|
||||
index 7411e1a21c4..2b856bfccb4 100644
|
||||
--- a/make/launcher/Launcher-java.security.jgss.gmk
|
||||
+++ b/make/launcher/Launcher-java.security.jgss.gmk
|
||||
@@ -28,13 +28,16 @@ include LauncherCommon.gmk
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$(eval $(call SetupBuildLauncher, kinit, \
|
||||
MAIN_CLASS := sun.security.krb5.internal.tools.Kinit, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, klist, \
|
||||
MAIN_CLASS := sun.security.krb5.internal.tools.Klist, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, ktab, \
|
||||
MAIN_CLASS := sun.security.krb5.internal.tools.Ktab, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
endif
|
||||
diff --git a/make/launcher/Launcher-jdk.aot.gmk b/make/launcher/Launcher-jdk.aot.gmk
|
||||
index 10717a5e1c5..2c52c31a555 100644
|
||||
--- a/make/launcher/Launcher-jdk.aot.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.aot.gmk
|
||||
@@ -31,6 +31,7 @@ include LauncherCommon.gmk
|
||||
$(eval $(call SetupBuildLauncher, jaotc, \
|
||||
MAIN_CLASS := jdk.tools.jaotc.Main, \
|
||||
EXTRA_JAVA_ARGS := -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI \
|
||||
+ -XX:+DisableHotswapAgent \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.aarch64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.amd64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
@@ -40,6 +41,7 @@ $(eval $(call SetupBuildLauncher, jaotc, \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
, \
|
||||
JAVA_ARGS := --add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
+ -XX:+DisableHotswapAgent \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=$(call CommaList, jdk.internal.vm.compiler jdk.aot) \
|
||||
diff --git a/make/launcher/Launcher-jdk.compiler.gmk b/make/launcher/Launcher-jdk.compiler.gmk
|
||||
index f71c37adf74..744969546de 100644
|
||||
--- a/make/launcher/Launcher-jdk.compiler.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.compiler.gmk
|
||||
@@ -27,12 +27,14 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, javac, \
|
||||
MAIN_CLASS := com.sun.tools.javac.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, serialver, \
|
||||
MAIN_CLASS := sun.tools.serialver.SerialVer, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
@@ -41,6 +43,7 @@ ifeq ($(ENABLE_SJAVAC), yes)
|
||||
# into any real images
|
||||
$(eval $(call SetupBuildLauncher, sjavac, \
|
||||
MAIN_CLASS := com.sun.tools.sjavac.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
OUTPUT_DIR := $(JDK_OUTPUTDIR)/bin, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.hotspot.agent.gmk b/make/launcher/Launcher-jdk.hotspot.agent.gmk
|
||||
index 76da3600368..9f12b05b172 100644
|
||||
--- a/make/launcher/Launcher-jdk.hotspot.agent.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.hotspot.agent.gmk
|
||||
@@ -27,5 +27,6 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jhsdb, \
|
||||
MAIN_CLASS := sun.jvm.hotspot.SALauncher, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
MACOSX_PRIVILEGED := true, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jartool.gmk b/make/launcher/Launcher-jdk.jartool.gmk
|
||||
index f74e82bfdae..647d82b65b1 100644
|
||||
--- a/make/launcher/Launcher-jdk.jartool.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jartool.gmk
|
||||
@@ -27,8 +27,10 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jar, \
|
||||
MAIN_CLASS := sun.tools.jar.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jarsigner, \
|
||||
MAIN_CLASS := sun.security.tools.jarsigner.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.javadoc.gmk b/make/launcher/Launcher-jdk.javadoc.gmk
|
||||
index 889028a2b17..c3d2093be04 100644
|
||||
--- a/make/launcher/Launcher-jdk.javadoc.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.javadoc.gmk
|
||||
@@ -27,6 +27,7 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, javadoc, \
|
||||
MAIN_CLASS := jdk.javadoc.internal.tool.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jcmd.gmk b/make/launcher/Launcher-jdk.jcmd.gmk
|
||||
index 7117fa78059..761a52d8466 100644
|
||||
--- a/make/launcher/Launcher-jdk.jcmd.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jcmd.gmk
|
||||
@@ -30,6 +30,7 @@ $(eval $(call SetupBuildLauncher, jinfo, \
|
||||
JAVA_ARGS := \
|
||||
-Dsun.jvm.hotspot.debugger.useProcDebugger \
|
||||
-Dsun.jvm.hotspot.debugger.useWindbgDebugger, \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
MACOSX_PRIVILEGED := true, \
|
||||
))
|
||||
|
||||
@@ -37,28 +38,36 @@ $(eval $(call SetupBuildLauncher, jmap, \
|
||||
MAIN_CLASS := sun.tools.jmap.JMap, \
|
||||
JAVA_ARGS := \
|
||||
-Dsun.jvm.hotspot.debugger.useProcDebugger \
|
||||
- -Dsun.jvm.hotspot.debugger.useWindbgDebugger, \
|
||||
+ -Dsun.jvm.hotspot.debugger.useWindbgDebugger \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
MACOSX_PRIVILEGED := true, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jps, \
|
||||
MAIN_CLASS := sun.tools.jps.Jps, \
|
||||
+ JAVA_ARGS := \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jstack, \
|
||||
MAIN_CLASS := sun.tools.jstack.JStack, \
|
||||
JAVA_ARGS := \
|
||||
-Dsun.jvm.hotspot.debugger.useProcDebugger \
|
||||
- -Dsun.jvm.hotspot.debugger.useWindbgDebugger, \
|
||||
+ -Dsun.jvm.hotspot.debugger.useWindbgDebugger \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
MACOSX_PRIVILEGED := true, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jstat, \
|
||||
MAIN_CLASS := sun.tools.jstat.Jstat, \
|
||||
+ JAVA_ARGS := \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jcmd, \
|
||||
MAIN_CLASS := sun.tools.jcmd.JCmd, \
|
||||
+ JAVA_ARGS := \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
diff --git a/make/launcher/Launcher-jdk.jconsole.gmk b/make/launcher/Launcher-jdk.jconsole.gmk
|
||||
index 6205ae63d16..5ca6a0c123b 100644
|
||||
--- a/make/launcher/Launcher-jdk.jconsole.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jconsole.gmk
|
||||
@@ -28,7 +28,8 @@ include LauncherCommon.gmk
|
||||
$(eval $(call SetupBuildLauncher, jconsole, \
|
||||
MAIN_CLASS := sun.tools.jconsole.JConsole, \
|
||||
JAVA_ARGS := --add-opens java.base/java.io=jdk.jconsole \
|
||||
- -Djconsole.showOutputViewer, \
|
||||
+ -Djconsole.showOutputViewer \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
CFLAGS_windows := -DJAVAW, \
|
||||
LIBS_windows := user32.lib, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jdeps.gmk b/make/launcher/Launcher-jdk.jdeps.gmk
|
||||
index 217523c48cc..5448278dae7 100644
|
||||
--- a/make/launcher/Launcher-jdk.jdeps.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jdeps.gmk
|
||||
@@ -27,15 +27,18 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, javap, \
|
||||
MAIN_CLASS := com.sun.tools.javap.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jdeps, \
|
||||
MAIN_CLASS := com.sun.tools.jdeps.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jdeprscan, \
|
||||
MAIN_CLASS := com.sun.tools.jdeprscan.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jdi.gmk b/make/launcher/Launcher-jdk.jdi.gmk
|
||||
index fcce98cf430..27bd448e3ae 100644
|
||||
--- a/make/launcher/Launcher-jdk.jdi.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jdi.gmk
|
||||
@@ -27,4 +27,5 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jdb, \
|
||||
MAIN_CLASS := com.sun.tools.example.debug.tty.TTY, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jlink.gmk b/make/launcher/Launcher-jdk.jlink.gmk
|
||||
index df2173996d7..9e61edeb2c8 100644
|
||||
--- a/make/launcher/Launcher-jdk.jlink.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jlink.gmk
|
||||
@@ -27,18 +27,21 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jimage,\
|
||||
MAIN_CLASS := jdk.tools.jimage.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DENABLE_ARG_FILES, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jlink,\
|
||||
MAIN_CLASS := jdk.tools.jlink.internal.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DENABLE_ARG_FILES \
|
||||
-DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jmod,\
|
||||
MAIN_CLASS := jdk.tools.jmod.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DENABLE_ARG_FILES \
|
||||
-DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jshell.gmk b/make/launcher/Launcher-jdk.jshell.gmk
|
||||
index 349eb88e9eb..7287f8f998a 100644
|
||||
--- a/make/launcher/Launcher-jdk.jshell.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jshell.gmk
|
||||
@@ -27,5 +27,6 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jshell, \
|
||||
MAIN_CLASS := jdk.internal.jshell.tool.JShellToolProvider, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.jstatd.gmk b/make/launcher/Launcher-jdk.jstatd.gmk
|
||||
index e9286d63094..e1657910c67 100644
|
||||
--- a/make/launcher/Launcher-jdk.jstatd.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.jstatd.gmk
|
||||
@@ -27,6 +27,7 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jstatd, \
|
||||
MAIN_CLASS := sun.tools.jstatd.Jstatd, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
diff --git a/make/launcher/Launcher-jdk.pack.gmk b/make/launcher/Launcher-jdk.pack.gmk
|
||||
index a93fd2a9017..64bbbb7c949 100644
|
||||
--- a/make/launcher/Launcher-jdk.pack.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.pack.gmk
|
||||
@@ -28,6 +28,7 @@ include LauncherCommon.gmk
|
||||
$(eval $(call SetupBuildLauncher, pack200, \
|
||||
MAIN_MODULE := java.base, \
|
||||
MAIN_CLASS := com.sun.java.util.jar.pack.Driver, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
################################################################################
|
||||
diff --git a/make/launcher/Launcher-jdk.rmic.gmk b/make/launcher/Launcher-jdk.rmic.gmk
|
||||
index d60c3d9b60b..b8a55900b0e 100644
|
||||
--- a/make/launcher/Launcher-jdk.rmic.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.rmic.gmk
|
||||
@@ -27,5 +27,6 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, rmic, \
|
||||
MAIN_CLASS := sun.rmi.rmic.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||
))
|
||||
diff --git a/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk b/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk
|
||||
index 82311e69fd6..bd39f8595b2 100644
|
||||
--- a/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk
|
||||
+++ b/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk
|
||||
@@ -27,6 +27,7 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call SetupBuildLauncher, jjs, \
|
||||
MAIN_CLASS := jdk.nashorn.tools.jjs.Main, \
|
||||
- JAVA_ARGS := --add-modules ALL-DEFAULT, \
|
||||
+ JAVA_ARGS := --add-modules ALL-DEFAULT \
|
||||
+ -XX:+DisableHotswapAgent, \
|
||||
CFLAGS := -DENABLE_ARG_FILES, \
|
||||
))
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index 2ca6dde069d..c75bb5d8f49 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -3937,6 +3937,8 @@ jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) {
|
||||
// Set object alignment values.
|
||||
set_object_alignment();
|
||||
|
||||
+ setup_hotswap_agent();
|
||||
+
|
||||
#if !INCLUDE_CDS
|
||||
if (DumpSharedSpaces || RequireSharedSpaces) {
|
||||
jio_fprintf(defaultStream::error_stream(),
|
||||
@@ -4270,3 +4272,60 @@ bool Arguments::copy_expand_pid(const char* src, size_t srclen,
|
||||
*b = '\0';
|
||||
return (p == src_end); // return false if not all of the source was copied
|
||||
}
|
||||
+
|
||||
+void Arguments::setup_hotswap_agent() {
|
||||
+
|
||||
+ if (DumpSharedSpaces)
|
||||
+ return;
|
||||
+
|
||||
+ if (!AllowEnhancedClassRedefinition)
|
||||
+ return;
|
||||
+
|
||||
+ // Set HotswapAgent
|
||||
+ if (!DisableHotswapAgent) {
|
||||
+
|
||||
+ char ext_path_str[JVM_MAXPATHLEN];
|
||||
+
|
||||
+ os::jvm_path(ext_path_str, sizeof(ext_path_str));
|
||||
+ for (int i = 0; i < 3; i++) {
|
||||
+ char *end = strrchr(ext_path_str, *os::file_separator());
|
||||
+ if (end != NULL) *end = '\0';
|
||||
+ }
|
||||
+ size_t ext_path_length = strlen(ext_path_str);
|
||||
+ if (ext_path_length >= 3) {
|
||||
+ if (strcmp(ext_path_str + ext_path_length - 3, "lib") != 0) {
|
||||
+ if (ext_path_length < JVM_MAXPATHLEN - 4) {
|
||||
+ jio_snprintf(ext_path_str + ext_path_length, sizeof(ext_path_str) - ext_path_length, "%slib", os::file_separator());
|
||||
+ ext_path_length += 4;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if (ext_path_length < JVM_MAXPATHLEN - 10) {
|
||||
+ jio_snprintf(ext_path_str + ext_path_length, sizeof(ext_path_str) - ext_path_length,
|
||||
+ "%shotswap%shotswap-agent.jar", os::file_separator(), os::file_separator());
|
||||
+ }
|
||||
+
|
||||
+ int fd = ::open(ext_path_str, O_RDONLY);
|
||||
+ if (fd >= 0) {
|
||||
+ os::close(fd);
|
||||
+ size_t length = strlen(ext_path_str) + 1;
|
||||
+ char *options = NEW_C_HEAP_ARRAY(char, length, mtArguments);
|
||||
+ jio_snprintf(options, length, "%s", ext_path_str);
|
||||
+ add_init_agent("instrument", ext_path_str, false);
|
||||
+ jio_fprintf(defaultStream::output_stream(), "Starting HotswapAgent '%s'\n", ext_path_str);
|
||||
+ }
|
||||
+// else
|
||||
+// {
|
||||
+// jio_fprintf(defaultStream::error_stream(), "HotswapAgent not found on path:'%s'\n", ext_path_str);
|
||||
+// }
|
||||
+ }
|
||||
+
|
||||
+ // TODO: open it only for org.hotswap.agent module
|
||||
+ // Use to access java.lang.reflect.Proxy/proxyCache
|
||||
+ create_numbered_property("jdk.module.addopens", "java.base/java.lang=ALL-UNNAMED", addopens_count++);
|
||||
+ // Class of field java.lang.reflect.Proxy/proxyCache
|
||||
+ create_numbered_property("jdk.module.addopens", "java.base/jdk.internal.loader=ALL-UNNAMED", addopens_count++);
|
||||
+ // java.beans.Introspector access
|
||||
+ create_numbered_property("jdk.module.addopens", "java.desktop/java.beans=ALL-UNNAMED", addopens_count++);
|
||||
+
|
||||
+}
|
||||
diff --git a/src/hotspot/share/runtime/arguments.hpp b/src/hotspot/share/runtime/arguments.hpp
|
||||
index 46450cce5c9..3dc5b3d4bae 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.hpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.hpp
|
||||
@@ -506,6 +506,9 @@ class Arguments : AllStatic {
|
||||
|
||||
static size_t conservative_max_heap_alignment() { return _conservative_max_heap_alignment; }
|
||||
|
||||
+ // Initialize HotswapAgent
|
||||
+ static void setup_hotswap_agent();
|
||||
+
|
||||
// Return the maximum size a heap with compressed oops can take
|
||||
static size_t max_heap_for_compressed_oops();
|
||||
|
||||
diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp
|
||||
index f3cf08fffb6..5f6c7b8e388 100644
|
||||
--- a/src/hotspot/share/runtime/globals.hpp
|
||||
+++ b/src/hotspot/share/runtime/globals.hpp
|
||||
@@ -32,6 +32,12 @@
|
||||
|
||||
#include <float.h> // for DBL_MAX
|
||||
|
||||
+#ifdef DCEVM_ONLY
|
||||
+#define DISABLED_HOTSWAP_AGENT true
|
||||
+#else
|
||||
+#define DISABLED_HOTSWAP_AGENT false
|
||||
+#endif
|
||||
+
|
||||
// The larger HeapWordSize for 64bit requires larger heaps
|
||||
// for the same application running in 64bit. See bug 4967770.
|
||||
// The minimum alignment to a heap word size is done. Other
|
||||
@@ -2675,8 +2681,10 @@ define_pd_global(uint64_t,MaxRAM, 1ULL*G);
|
||||
\
|
||||
product(bool, AllowEnhancedClassRedefinition, true, \
|
||||
"Allow enhanced class redefinition beyond swapping method " \
|
||||
- "bodies")
|
||||
-
|
||||
+ "bodies") \
|
||||
+ \
|
||||
+ product(bool, DisableHotswapAgent, DISABLED_HOTSWAP_AGENT, \
|
||||
+ "Disable integrated Hotswap Agent (HotswapVM only)")
|
||||
#define VM_FLAGS(develop, \
|
||||
develop_pd, \
|
||||
product, \
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From dc397b652d9810f6f261070afbb8519f1c2964ee Mon Sep 17 00:00:00 2001
|
||||
From: skybber <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 16 Dec 2018 09:55:31 +0100
|
||||
Subject: [PATCH 16/50] Add dcevm distro name
|
||||
|
||||
---
|
||||
make/autoconf/version-numbers | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/make/autoconf/version-numbers b/make/autoconf/version-numbers
|
||||
index b5a23138213..5c0a3242c80 100644
|
||||
--- a/make/autoconf/version-numbers
|
||||
+++ b/make/autoconf/version-numbers
|
||||
@@ -43,7 +43,7 @@ PRODUCT_NAME=OpenJDK
|
||||
PRODUCT_SUFFIX="Runtime Environment"
|
||||
JDK_RC_PLATFORM_NAME=Platform
|
||||
COMPANY_NAME=N/A
|
||||
-HOTSPOT_VM_DISTRO="OpenJDK"
|
||||
+HOTSPOT_VM_DISTRO="Dynamic Code Evolution"
|
||||
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.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
From 987645d54a6682f28a733731965d6b377e892974 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Tue, 19 Nov 2019 19:58:27 +0100
|
||||
Subject: [PATCH 17/50] java.desktop/com.sun.beans=ALL-UNNAMED
|
||||
|
||||
---
|
||||
src/hotspot/share/runtime/arguments.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index c75bb5d8f49..ba6e78d6daa 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -4327,5 +4327,7 @@ void Arguments::setup_hotswap_agent() {
|
||||
create_numbered_property("jdk.module.addopens", "java.base/jdk.internal.loader=ALL-UNNAMED", addopens_count++);
|
||||
// java.beans.Introspector access
|
||||
create_numbered_property("jdk.module.addopens", "java.desktop/java.beans=ALL-UNNAMED", addopens_count++);
|
||||
+ // java.beans.Introspector access
|
||||
+ create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans=ALL-UNNAMED", addopens_count++);
|
||||
|
||||
}
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
From 60569257636a2d0b31b04ab2638d81f840d75e58 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Tue, 19 Nov 2019 21:07:59 +0100
|
||||
Subject: [PATCH 18/50] increment_class_counter() using orig dcevm code
|
||||
|
||||
Probably it is cause of SISEGV on:
|
||||
_
|
||||
VM_EnhancedRedefineClasses::redefine_single_class->java_mirror()
|
||||
---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 39 ++++++-------------
|
||||
1 file changed, 12 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 4ca638548dc..efb9e806508 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -1146,9 +1146,9 @@ int VM_EnhancedRedefineClasses::calculate_redefinition_flags(InstanceKlass* new_
|
||||
}
|
||||
|
||||
|
||||
-/**
|
||||
+/**
|
||||
Searches for the class bytecode of the given class and returns it as a byte array.
|
||||
-
|
||||
+
|
||||
@param the_class definition of a class, either existing class or new_class
|
||||
@param class_bytes - if the class is redefined, it contains new class definition, otherwise just original class bytecode.
|
||||
@param class_byte_count - size of class_bytes
|
||||
@@ -1460,7 +1460,7 @@ void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
|
||||
//
|
||||
// ik->itable()->adjust_method_entries(the_class, &trace_name_printed);
|
||||
// }
|
||||
-
|
||||
+
|
||||
constantPoolHandle other_cp = constantPoolHandle(ik->constants());
|
||||
|
||||
// Update host klass of anonymous classes (for example, produced by lambdas) to newest version.
|
||||
@@ -1764,7 +1764,7 @@ void VM_EnhancedRedefineClasses::flush_dependent_code(InstanceKlass* k_h, TRAPS)
|
||||
/**
|
||||
Compare _old_methods and _new_methods arrays and store the result into
|
||||
_matching_old_methods, _matching_new_methods, _added_methods, _deleted_methods
|
||||
-
|
||||
+
|
||||
Setup _old_methods and _new_methods before the call - it should be called for one class only!
|
||||
*/
|
||||
void VM_EnhancedRedefineClasses::compute_added_deleted_matching_methods() {
|
||||
@@ -1898,13 +1898,13 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
ResourceMark rm(THREAD);
|
||||
// increment the classRedefinedCount field in the_class and in any
|
||||
// direct and indirect subclasses of the_class
|
||||
- increment_class_counter(the_class, THREAD);
|
||||
+ increment_class_counter(new_class, THREAD);
|
||||
log_info(redefine, class, load)
|
||||
("redefined name=%s, count=%d (avail_mem=" UINT64_FORMAT "K)",
|
||||
- the_class->external_name(), java_lang_Class::classRedefinedCount(the_class->java_mirror()), os::available_memory() >> 10);
|
||||
+ new_class->external_name(), java_lang_Class::classRedefinedCount(new_class->java_mirror()), os::available_memory() >> 10);
|
||||
Events::log_redefinition(THREAD, "redefined class name=%s, count=%d",
|
||||
- the_class->external_name(),
|
||||
- java_lang_Class::classRedefinedCount(the_class->java_mirror()));
|
||||
+ new_class->external_name(),
|
||||
+ java_lang_Class::classRedefinedCount(new_class->java_mirror()));
|
||||
|
||||
}
|
||||
_timer_rsc_phase2.stop();
|
||||
@@ -1914,25 +1914,10 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
// Increment the classRedefinedCount field in the specific InstanceKlass
|
||||
// and in all direct and indirect subclasses.
|
||||
void VM_EnhancedRedefineClasses::increment_class_counter(InstanceKlass *ik, TRAPS) {
|
||||
- oop class_mirror = ik->java_mirror();
|
||||
+ oop class_mirror = ik->old_version()->java_mirror();
|
||||
Klass* class_oop = java_lang_Class::as_Klass(class_mirror);
|
||||
int new_count = java_lang_Class::classRedefinedCount(class_mirror) + 1;
|
||||
- java_lang_Class::set_classRedefinedCount(ik->new_version()->java_mirror(), new_count);
|
||||
-
|
||||
- if (class_oop != _the_class_oop) {
|
||||
- // _the_class_oop count is printed at end of redefine_single_class()
|
||||
- log_debug(redefine, class, subclass)("updated count in subclass=%s to %d", ik->external_name(), new_count);
|
||||
- }
|
||||
-
|
||||
- for (Klass *subk = ik->subklass(); subk != NULL;
|
||||
- subk = subk->next_sibling()) {
|
||||
- if (subk->is_instance_klass()) {
|
||||
- // Only update instanceKlasses
|
||||
- InstanceKlass *subik = InstanceKlass::cast(subk);
|
||||
- // recursively do subclasses of the current subclass
|
||||
- increment_class_counter(subik, THREAD);
|
||||
- }
|
||||
- }
|
||||
+ java_lang_Class::set_classRedefinedCount(ik->java_mirror(), new_count);
|
||||
}
|
||||
|
||||
void VM_EnhancedRedefineClasses::check_class(InstanceKlass* ik, TRAPS) {
|
||||
@@ -2063,7 +2048,7 @@ class AffectedKlassClosure : public KlassClosure {
|
||||
|
||||
/**
|
||||
Find all affected classes by current redefinition (either because of redefine, class hierarchy or interface change).
|
||||
- Affected classes are stored in _affected_klasses and parent classes always precedes child class.
|
||||
+ Affected classes are stored in _affected_klasses and parent classes always precedes child class.
|
||||
*/
|
||||
jvmtiError VM_EnhancedRedefineClasses::find_sorted_affected_classes(TRAPS) {
|
||||
for (int i = 0; i < _class_count; i++) {
|
||||
@@ -2112,7 +2097,7 @@ static bool match_second(void* value, KlassPair elem) {
|
||||
First newly introduced classes (_class_defs) are scanned and then affected classed (_affected_klasses).
|
||||
Affected flag is cleared (clear_redefinition_flag(Klass::MarkedAsAffected))
|
||||
For each dependency create a KlassPair instance. Finnaly, affected classes (_affected_klasses) are sorted according to pairs.
|
||||
-
|
||||
+
|
||||
TODO - the class file is potentionally parsed multiple times - introduce a cache?
|
||||
*/
|
||||
jvmtiError VM_EnhancedRedefineClasses::do_topological_class_sorting(TRAPS) {
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From 41d2963b54490601e22cf5309ed73f78566d35ae Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Thu, 21 Nov 2019 19:30:07 +0100
|
||||
Subject: [PATCH 19/50] Allow 11715ha class initializer calls
|
||||
|
||||
---
|
||||
src/hotspot/share/classfile/vmSymbols.hpp | 1 +
|
||||
src/hotspot/share/interpreter/linkResolver.cpp | 2 +-
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/vmSymbols.hpp b/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
index e2bac31b27f..6eeda3b8f68 100644
|
||||
--- a/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
+++ b/src/hotspot/share/classfile/vmSymbols.hpp
|
||||
@@ -340,6 +340,7 @@
|
||||
/* common method and field names */ \
|
||||
template(object_initializer_name, "<init>") \
|
||||
template(class_initializer_name, "<clinit>") \
|
||||
+ template(ha_class_initializer_name, "$$ha$clinit") \
|
||||
template(println_name, "println") \
|
||||
template(printStackTrace_name, "printStackTrace") \
|
||||
template(main_name, "main") \
|
||||
diff --git a/src/hotspot/share/interpreter/linkResolver.cpp b/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
index b9ccdee8cca..cb76d2ef50c 100644
|
||||
--- a/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
+++ b/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
@@ -1009,7 +1009,7 @@ void LinkResolver::resolve_field(fieldDescriptor& fd,
|
||||
assert(!m.is_null(), "information about the current method must be available for 'put' bytecodes");
|
||||
bool is_initialized_static_final_update = (byte == Bytecodes::_putstatic &&
|
||||
fd.is_static() &&
|
||||
- !m()->is_static_initializer());
|
||||
+ !(m()->is_static_initializer() || m()->name() == vmSymbols::ha_class_initializer_name()));
|
||||
bool is_initialized_instance_final_update = ((byte == Bytecodes::_putfield || byte == Bytecodes::_nofast_putfield) &&
|
||||
!fd.is_static() &&
|
||||
!m->is_object_initializer());
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
From 09799f079ef1148248ca60c917205003d2a565b3 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Tue, 26 Nov 2019 22:13:07 +0100
|
||||
Subject: [PATCH 20/50] Disable HA in keytool
|
||||
|
||||
---
|
||||
make/launcher/Launcher-java.base.gmk | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/make/launcher/Launcher-java.base.gmk b/make/launcher/Launcher-java.base.gmk
|
||||
index 5ee4530004b..88c1a14b2aa 100644
|
||||
--- a/make/launcher/Launcher-java.base.gmk
|
||||
+++ b/make/launcher/Launcher-java.base.gmk
|
||||
@@ -63,6 +63,7 @@ endif
|
||||
|
||||
$(eval $(call SetupBuildLauncher, keytool, \
|
||||
MAIN_CLASS := sun.security.tools.keytool.Main, \
|
||||
+ JAVA_ARGS := -XX:+DisableHotswapAgent, \
|
||||
))
|
||||
|
||||
################################################################################
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
From e1d8f42f428d7d18f09f1a7098f56fdce808c3fe Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Thu, 28 Nov 2019 18:53:11 +0100
|
||||
Subject: [PATCH 21/50] Open jdk module to access ClassInfo.CACHE
|
||||
|
||||
---
|
||||
src/hotspot/share/runtime/arguments.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index ba6e78d6daa..0081f688120 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -4329,5 +4329,7 @@ void Arguments::setup_hotswap_agent() {
|
||||
create_numbered_property("jdk.module.addopens", "java.desktop/java.beans=ALL-UNNAMED", addopens_count++);
|
||||
// java.beans.Introspector access
|
||||
create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans=ALL-UNNAMED", addopens_count++);
|
||||
+ // com.sun.beans.introspect.ClassInfo access
|
||||
+ create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans.introspect=ALL-UNNAMED", addopens_count++);
|
||||
|
||||
}
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From 8b7323c57ee07c03a02ba951ce6d453ec4cc1a54 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 8 Dec 2019 17:55:01 +0100
|
||||
Subject: [PATCH 22/50] Open java.base/java.io module
|
||||
|
||||
---
|
||||
src/hotspot/share/runtime/arguments.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index 0081f688120..0cdd8c88315 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -4325,6 +4325,8 @@ void Arguments::setup_hotswap_agent() {
|
||||
create_numbered_property("jdk.module.addopens", "java.base/java.lang=ALL-UNNAMED", addopens_count++);
|
||||
// Class of field java.lang.reflect.Proxy/proxyCache
|
||||
create_numbered_property("jdk.module.addopens", "java.base/jdk.internal.loader=ALL-UNNAMED", addopens_count++);
|
||||
+ // Use to access java.io.Reader, java.io.InputStream, java.io.FileInputStream
|
||||
+ create_numbered_property("jdk.module.addopens", "java.base/java.io=ALL-UNNAMED", addopens_count++);
|
||||
// java.beans.Introspector access
|
||||
create_numbered_property("jdk.module.addopens", "java.desktop/java.beans=ALL-UNNAMED", addopens_count++);
|
||||
// java.beans.Introspector access
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
From 14c82a29cbf8254f8da626753ea34086d38e71b4 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@mailprofiler.com>
|
||||
Date: Fri, 6 Mar 2020 09:28:24 +0100
|
||||
Subject: [PATCH 23/50] Fix fieldDescriptor.inline.hpp
|
||||
|
||||
---
|
||||
.../share/prims/jvmtiEnhancedRedefineClasses.cpp | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index efb9e806508..a404fd3f016 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -49,6 +49,7 @@
|
||||
#include "runtime/deoptimization.hpp"
|
||||
#include "runtime/jniHandles.inline.hpp"
|
||||
#include "runtime/relocator.hpp"
|
||||
+#include "runtime/fieldDescriptor.inline.hpp"
|
||||
#include "utilities/bitMap.inline.hpp"
|
||||
#include "prims/jvmtiThreadState.inline.hpp"
|
||||
#include "utilities/events.hpp"
|
||||
@@ -490,6 +491,11 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
flush_dependent_code(NULL, thread);
|
||||
// }
|
||||
|
||||
+ // Adjust constantpool caches for all classes that reference methods of the evolved class.
|
||||
+ ClearCpoolCacheAndUnpatch clear_cpool_cache(thread);
|
||||
+ ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
|
||||
+
|
||||
+
|
||||
// JSR-292 support
|
||||
if (_any_class_has_resolved_methods) {
|
||||
bool trace_name_printed = false;
|
||||
@@ -1890,9 +1896,6 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
}
|
||||
*/
|
||||
|
||||
- // Adjust constantpool caches for all classes that reference methods of the evolved class.
|
||||
- ClearCpoolCacheAndUnpatch clear_cpool_cache(THREAD);
|
||||
- ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
|
||||
|
||||
{
|
||||
ResourceMark rm(THREAD);
|
||||
@@ -1905,7 +1908,6 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
Events::log_redefinition(THREAD, "redefined class name=%s, count=%d",
|
||||
new_class->external_name(),
|
||||
java_lang_Class::classRedefinedCount(new_class->java_mirror()));
|
||||
-
|
||||
}
|
||||
_timer_rsc_phase2.stop();
|
||||
} // end redefine_single_class()
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From 5a56f2278c0a79f4a26f369a55f4c1c4dab2621e Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@mailprofiler.com>
|
||||
Date: Fri, 6 Mar 2020 15:46:51 +0100
|
||||
Subject: [PATCH 24/50] Fix clear_cpool_cache
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 8 +++-----
|
||||
1 file changed, 3 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index a404fd3f016..1f5a67f8866 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -491,11 +491,6 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
flush_dependent_code(NULL, thread);
|
||||
// }
|
||||
|
||||
- // Adjust constantpool caches for all classes that reference methods of the evolved class.
|
||||
- ClearCpoolCacheAndUnpatch clear_cpool_cache(thread);
|
||||
- ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
|
||||
-
|
||||
-
|
||||
// JSR-292 support
|
||||
if (_any_class_has_resolved_methods) {
|
||||
bool trace_name_printed = false;
|
||||
@@ -1896,6 +1891,9 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
}
|
||||
*/
|
||||
|
||||
+ // Adjust constantpool caches for all classes that reference methods of the evolved class.
|
||||
+ ClearCpoolCacheAndUnpatch clear_cpool_cache(THREAD);
|
||||
+ ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
|
||||
|
||||
{
|
||||
ResourceMark rm(THREAD);
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
From c1aafaafaf15780d6bca1312162d551da4f63036 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@mailprofiler.com>
|
||||
Date: Mon, 9 Mar 2020 09:54:04 +0100
|
||||
Subject: [PATCH 25/50] Refactor ClearCpoolCacheAndUnpatch
|
||||
|
||||
Call it after redefinition of all classes
|
||||
---
|
||||
make/common/MakeBase.gmk | 4 +-
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 98 ++++---------------
|
||||
2 files changed, 21 insertions(+), 81 deletions(-)
|
||||
|
||||
diff --git a/make/common/MakeBase.gmk b/make/common/MakeBase.gmk
|
||||
index a040effe83a..c33a7d52ddb 100644
|
||||
--- a/make/common/MakeBase.gmk
|
||||
+++ b/make/common/MakeBase.gmk
|
||||
@@ -1044,7 +1044,9 @@ DependOnVariableHelper = \
|
||||
$(info NewVariable $1: >$(strip $($1))<) \
|
||||
$(info OldVariable $1: >$(strip $($1_old))<)) \
|
||||
$(call WriteFile, $1_old:=$(call DoubleDollar,$(call EscapeHash,$($1))), \
|
||||
- $($1_filename))) \
|
||||
+ $($1_filename)) \
|
||||
+ $(eval $($1_filename): ) \
|
||||
+ ) \
|
||||
$($1_filename) \
|
||||
)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 1f5a67f8866..24fb76b6de4 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -491,6 +491,11 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
flush_dependent_code(NULL, thread);
|
||||
// }
|
||||
|
||||
+ // Adjust constantpool caches for all classes that reference methods of the evolved class.
|
||||
+ ClearCpoolCacheAndUnpatch clear_cpool_cache(thread);
|
||||
+ ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
|
||||
+
|
||||
+
|
||||
// JSR-292 support
|
||||
if (_any_class_has_resolved_methods) {
|
||||
bool trace_name_printed = false;
|
||||
@@ -1383,86 +1388,23 @@ void VM_EnhancedRedefineClasses::unpatch_bytecode(Method* method) {
|
||||
}
|
||||
}
|
||||
|
||||
-// Unevolving classes may point to methods of the_class directly
|
||||
+// Unevolving classes may point to old methods directly
|
||||
// from their constant pool caches, itables, and/or vtables. We
|
||||
-// use the ClassLoaderDataGraph::classes_do() facility and this helper
|
||||
-// to fix up these pointers.
|
||||
-// Adjust cpools and vtables closure
|
||||
+// use the SystemDictionary::classes_do() facility and this helper
|
||||
+// to fix up these pointers. Additional field offsets and vtable indices
|
||||
+// in the constant pool cache entries are fixed.
|
||||
+//
|
||||
+// Note: We currently don't support updating the vtable in
|
||||
+// arrayKlassOops. See Open Issues in jvmtiRedefineClasses.hpp.
|
||||
void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
|
||||
- // This is a very busy routine. We don't want too much tracing
|
||||
- // printed out.
|
||||
- bool trace_name_printed = false;
|
||||
- InstanceKlass *the_class = InstanceKlass::cast(_the_class_oop);
|
||||
-
|
||||
- // If the class being redefined is java.lang.Object, we need to fix all
|
||||
- // array class vtables also
|
||||
- if (k->is_array_klass() && _the_class_oop == SystemDictionary::Object_klass()) {
|
||||
- k->vtable().adjust_method_entries(the_class, &trace_name_printed);
|
||||
- } else if (k->is_instance_klass()) {
|
||||
- HandleMark hm(_thread);
|
||||
- InstanceKlass *ik = InstanceKlass::cast(k);
|
||||
+ if (!k->is_instance_klass()) {
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
- // HotSpot specific optimization! HotSpot does not currently
|
||||
- // support delegation from the bootstrap class loader to a
|
||||
- // user-defined class loader. This means that if the bootstrap
|
||||
- // class loader is the initiating class loader, then it will also
|
||||
- // be the defining class loader. This also means that classes
|
||||
- // loaded by the bootstrap class loader cannot refer to classes
|
||||
- // loaded by a user-defined class loader. Note: a user-defined
|
||||
- // class loader can delegate to the bootstrap class loader.
|
||||
- //
|
||||
- // If the current class being redefined has a user-defined class
|
||||
- // loader as its defining class loader, then we can skip all
|
||||
- // classes loaded by the bootstrap class loader.
|
||||
- bool is_user_defined =
|
||||
- InstanceKlass::cast(_the_class_oop)->class_loader() != NULL;
|
||||
- if (is_user_defined && ik->class_loader() == NULL) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- // Fix the vtable embedded in the_class and subclasses of the_class,
|
||||
- // if one exists. We discard scratch_class and we don't keep an
|
||||
- // InstanceKlass around to hold obsolete methods so we don't have
|
||||
- // any other InstanceKlass embedded vtables to update. The vtable
|
||||
- // holds the Method*s for virtual (but not final) methods.
|
||||
- // Default methods, or concrete methods in interfaces are stored
|
||||
- // in the vtable, so if an interface changes we need to check
|
||||
- // adjust_method_entries() for every InstanceKlass, which will also
|
||||
- // adjust the default method vtable indices.
|
||||
- // We also need to adjust any default method entries that are
|
||||
- // not yet in the vtable, because the vtable setup is in progress.
|
||||
- // This must be done after we adjust the default_methods and
|
||||
- // default_vtable_indices for methods already in the vtable.
|
||||
- // If redefining Unsafe, walk all the vtables looking for entries.
|
||||
-// FIXME - code from standard redefine - if needed, it should switch to new_class
|
||||
-// if (ik->vtable_length() > 0 && (_the_class_oop->is_interface()
|
||||
-// || _the_class_oop == SystemDictionary::internal_Unsafe_klass()
|
||||
-// || ik->is_subtype_of(_the_class_oop))) {
|
||||
-// // ik->vtable() creates a wrapper object; rm cleans it up
|
||||
-// ResourceMark rm(_thread);
|
||||
-//
|
||||
-// ik->vtable()->adjust_method_entries(the_class, &trace_name_printed);
|
||||
-// ik->adjust_default_methods(the_class, &trace_name_printed);
|
||||
-// }
|
||||
-
|
||||
- // If the current class has an itable and we are either redefining an
|
||||
- // interface or if the current class is a subclass of the_class, then
|
||||
- // we potentially have to fix the itable. If we are redefining an
|
||||
- // interface, then we have to call adjust_method_entries() for
|
||||
- // every InstanceKlass that has an itable since there isn't a
|
||||
- // subclass relationship between an interface and an InstanceKlass.
|
||||
- // If redefining Unsafe, walk all the itables looking for entries.
|
||||
-// FIXME - code from standard redefine - if needed, it should switch to new_class
|
||||
-// if (ik->itable_length() > 0 && (_the_class_oop->is_interface()
|
||||
-// || _the_class_oop == SystemDictionary::internal_Unsafe_klass()
|
||||
-// || ik->is_subclass_of(_the_class_oop))) {
|
||||
-// // ik->itable() creates a wrapper object; rm cleans it up
|
||||
-// ResourceMark rm(_thread);
|
||||
-//
|
||||
-// ik->itable()->adjust_method_entries(the_class, &trace_name_printed);
|
||||
-// }
|
||||
+ HandleMark hm(_thread);
|
||||
+ InstanceKlass *ik = InstanceKlass::cast(k);
|
||||
|
||||
- constantPoolHandle other_cp = constantPoolHandle(ik->constants());
|
||||
+ constantPoolHandle other_cp = constantPoolHandle(ik->constants());
|
||||
|
||||
// Update host klass of anonymous classes (for example, produced by lambdas) to newest version.
|
||||
if (ik->is_anonymous() && ik->host_klass()->new_version() != NULL) {
|
||||
@@ -1491,7 +1433,6 @@ void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
|
||||
if (RewriteBytecodes) {
|
||||
ik->methods_do(unpatch_bytecode);
|
||||
}
|
||||
- }
|
||||
}
|
||||
|
||||
// Clean method data for this class
|
||||
@@ -1891,9 +1832,6 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
}
|
||||
*/
|
||||
|
||||
- // Adjust constantpool caches for all classes that reference methods of the evolved class.
|
||||
- ClearCpoolCacheAndUnpatch clear_cpool_cache(THREAD);
|
||||
- ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
|
||||
|
||||
{
|
||||
ResourceMark rm(THREAD);
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From d6a3286b9b57df4c09d859e38833f2e3dc1574d9 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <vladimir.dvorak@mailprofiler.com>
|
||||
Date: Wed, 11 Mar 2020 14:19:34 +0100
|
||||
Subject: [PATCH 26/50] Fix class cast exception on redefinition of class A,
|
||||
that is superclass of B that has anonymous class C
|
||||
|
||||
---
|
||||
src/hotspot/share/oops/instanceKlass.cpp | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
index 9b6ba7e9304..8cbd4b8edf2 100644
|
||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
@@ -788,7 +788,10 @@ bool InstanceKlass::link_class_impl(bool throw_verifyerror, TRAPS) {
|
||||
|
||||
if (!is_linked()) {
|
||||
if (!is_rewritten()) {
|
||||
- {
|
||||
+ // In cases, if class A is being redefined and class B->A (B is extended from A) and B is host class of anonymous class C
|
||||
+ // then second redefinition fails with cannot cast klass exception. So we currently turn off bytecode verification
|
||||
+ // on redefinition.
|
||||
+ if (!newest_version()->is_redefining()) {
|
||||
bool verify_ok = verify_code(throw_verifyerror, THREAD);
|
||||
if (!verify_ok) {
|
||||
return false;
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
From a4ab453f532839ea3b09027736bb6e74d288bf1d Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 10 Apr 2020 23:28:07 +0200
|
||||
Subject: [PATCH 27/50] Update klass reference in Klass.implementor()
|
||||
|
||||
If interface X is removed from class Y then old reference to Y could be
|
||||
stored in X.implementor()
|
||||
---
|
||||
.../share/prims/jvmtiEnhancedRedefineClasses.cpp | 12 ++++++++++++
|
||||
.../share/prims/jvmtiEnhancedRedefineClasses.hpp | 11 -----------
|
||||
2 files changed, 12 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 24fb76b6de4..f6d2d3a40fe 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -1411,6 +1411,18 @@ void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
|
||||
ik->set_host_klass(InstanceKlass::cast(ik->host_klass()->newest_version()));
|
||||
}
|
||||
|
||||
+ // Update implementor if there is only one, in this case implementor() can reference old class
|
||||
+ if (ik->is_interface()) {
|
||||
+ Klass* implKlass = ik->implementor();
|
||||
+ if (implKlass != NULL && implKlass != ik && implKlass->new_version() != NULL) {
|
||||
+ InstanceKlass* newest_impl = InstanceKlass::cast(implKlass->newest_version());
|
||||
+ ik->init_implementor();
|
||||
+ if (newest_impl->implements_interface(ik)) {
|
||||
+ ik->add_implementor(newest_impl);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
for (int i = 0; i < other_cp->length(); i++) {
|
||||
if (other_cp->tag_at(i).is_klass()) {
|
||||
Klass* klass = other_cp->resolved_klass_at(i);
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index 5b3ebc13661..2d114635ee5 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -69,17 +69,6 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
// RetransformClasses. Indicate which.
|
||||
JvmtiClassLoadKind _class_load_kind;
|
||||
|
||||
- // _index_map_count is just an optimization for knowing if
|
||||
- // _index_map_p contains any entries.
|
||||
- int _index_map_count;
|
||||
- intArray * _index_map_p;
|
||||
-
|
||||
- // _operands_index_map_count is just an optimization for knowing if
|
||||
- // _operands_index_map_p contains any entries.
|
||||
- int _operands_cur_length;
|
||||
- int _operands_index_map_count;
|
||||
- intArray * _operands_index_map_p;
|
||||
-
|
||||
GrowableArray<InstanceKlass*>* _new_classes;
|
||||
jvmtiError _res;
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
From 015c9c88e63f2dde4b8b2a09d2832a8c2a3caf25 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 10 Apr 2020 23:30:21 +0200
|
||||
Subject: [PATCH 28/50] Fix DirectMethodHandle accessors klasses
|
||||
|
||||
---
|
||||
src/hotspot/share/classfile/javaClasses.cpp | 28 +++++++++++++++------
|
||||
src/hotspot/share/classfile/javaClasses.hpp | 4 +++
|
||||
2 files changed, 24 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/javaClasses.cpp b/src/hotspot/share/classfile/javaClasses.cpp
|
||||
index a89443d22ea..ea0588e5388 100644
|
||||
--- a/src/hotspot/share/classfile/javaClasses.cpp
|
||||
+++ b/src/hotspot/share/classfile/javaClasses.cpp
|
||||
@@ -3641,14 +3641,20 @@ void java_lang_invoke_DirectMethodHandle_StaticAccessor::set_static_offset(oop d
|
||||
dmh->long_field_put(_static_offset_offset, static_offset);
|
||||
}
|
||||
|
||||
+#define DIRECTMETHODHANDLE_STATIC_ACCESSOR_FIELDS_DO(macro) \
|
||||
+ macro(_static_offset_offset, k, vmSymbols::static_offset_name(), long_signature, false)
|
||||
|
||||
void java_lang_invoke_DirectMethodHandle_StaticAccessor::compute_offsets() {
|
||||
- Klass* klass_oop = SystemDictionary::DirectMethodHandle_StaticAccessor_klass();
|
||||
- if (klass_oop != NULL) {
|
||||
- compute_offset(_static_offset_offset, InstanceKlass::cast(klass_oop), vmSymbols::static_offset_name(), vmSymbols::long_signature());
|
||||
- }
|
||||
+ InstanceKlass* k = SystemDictionary::DirectMethodHandle_StaticAccessor_klass();
|
||||
+ DIRECTMETHODHANDLE_STATIC_ACCESSOR_FIELDS_DO(FIELD_COMPUTE_OFFSET);
|
||||
}
|
||||
|
||||
+#if INCLUDE_CDS
|
||||
+void java_lang_invoke_DirectMethodHandle_StaticAccessor::serialize_offsets(SerializeClosure* f) {
|
||||
+ DIRECTMETHODHANDLE_STATIC_ACCESSOR_FIELDS_DO(FIELD_SERIALIZE_OFFSET);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
// Support for java_lang_invoke_DirectMethodHandle$Accessor
|
||||
|
||||
int java_lang_invoke_DirectMethodHandle_Accessor::_field_offset_offset;
|
||||
@@ -3663,14 +3669,20 @@ void java_lang_invoke_DirectMethodHandle_Accessor::set_field_offset(oop dmh, int
|
||||
dmh->int_field_put(_field_offset_offset, field_offset);
|
||||
}
|
||||
|
||||
+#define DIRECTMETHODHANDLE_ACCESSOR_FIELDS_DO(macro) \
|
||||
+ macro(_field_offset_offset, k, vmSymbols::field_offset_name(), int_signature, false)
|
||||
|
||||
void java_lang_invoke_DirectMethodHandle_Accessor::compute_offsets() {
|
||||
- Klass* klass_oop = SystemDictionary::DirectMethodHandle_Accessor_klass();
|
||||
- if (klass_oop != NULL) {
|
||||
- compute_offset(_field_offset_offset, InstanceKlass::cast(klass_oop), vmSymbols::field_offset_name(), vmSymbols::int_signature());
|
||||
- }
|
||||
+ InstanceKlass* k = SystemDictionary::DirectMethodHandle_Accessor_klass();
|
||||
+ DIRECTMETHODHANDLE_ACCESSOR_FIELDS_DO(FIELD_COMPUTE_OFFSET);
|
||||
}
|
||||
|
||||
+#if INCLUDE_CDS
|
||||
+void java_lang_invoke_DirectMethodHandle_Accessor::serialize_offsets(SerializeClosure* f) {
|
||||
+ DIRECTMETHODHANDLE_ACCESSOR_FIELDS_DO(FIELD_SERIALIZE_OFFSET);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
// Support for java_lang_invoke_MethodHandle
|
||||
|
||||
int java_lang_invoke_MethodHandle::_type_offset;
|
||||
diff --git a/src/hotspot/share/classfile/javaClasses.hpp b/src/hotspot/share/classfile/javaClasses.hpp
|
||||
index ceb1670df5d..55f9fa62e2b 100644
|
||||
--- a/src/hotspot/share/classfile/javaClasses.hpp
|
||||
+++ b/src/hotspot/share/classfile/javaClasses.hpp
|
||||
@@ -67,6 +67,8 @@
|
||||
f(java_lang_invoke_LambdaForm) \
|
||||
f(java_lang_invoke_MethodType) \
|
||||
f(java_lang_invoke_CallSite) \
|
||||
+ f(java_lang_invoke_DirectMethodHandle_StaticAccessor) \
|
||||
+ f(java_lang_invoke_DirectMethodHandle_Accessor) \
|
||||
f(java_lang_invoke_MethodHandleNatives_CallSiteContext) \
|
||||
f(java_security_AccessControlContext) \
|
||||
f(java_lang_reflect_AccessibleObject) \
|
||||
@@ -1077,6 +1079,7 @@ class java_lang_invoke_DirectMethodHandle_StaticAccessor: AllStatic {
|
||||
static bool is_instance(oop obj) {
|
||||
return obj != NULL && is_subclass(obj->klass());
|
||||
}
|
||||
+ static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
|
||||
};
|
||||
|
||||
// Interface to java.lang.invoke.DirectMethodHandle$Accessor objects
|
||||
@@ -1101,6 +1104,7 @@ class java_lang_invoke_DirectMethodHandle_Accessor: AllStatic {
|
||||
static bool is_instance(oop obj) {
|
||||
return obj != NULL && is_subclass(obj->klass());
|
||||
}
|
||||
+ static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
|
||||
};
|
||||
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
From 14005f6176420c16fa1d152c78a3dacd26ecb647 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 11 Apr 2020 12:07:43 +0200
|
||||
Subject: [PATCH 29/50] cleanup direct method handles code
|
||||
|
||||
---
|
||||
src/hotspot/share/classfile/javaClasses.hpp | 10 ++++------
|
||||
src/hotspot/share/classfile/javaClasses.inline.hpp | 8 ++++++++
|
||||
2 files changed, 12 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/javaClasses.hpp b/src/hotspot/share/classfile/javaClasses.hpp
|
||||
index 55f9fa62e2b..da004d1b307 100644
|
||||
--- a/src/hotspot/share/classfile/javaClasses.hpp
|
||||
+++ b/src/hotspot/share/classfile/javaClasses.hpp
|
||||
@@ -1076,9 +1076,8 @@ class java_lang_invoke_DirectMethodHandle_StaticAccessor: AllStatic {
|
||||
static bool is_subclass(Klass* klass) {
|
||||
return klass->is_subclass_of(SystemDictionary::DirectMethodHandle_StaticAccessor_klass());
|
||||
}
|
||||
- static bool is_instance(oop obj) {
|
||||
- return obj != NULL && is_subclass(obj->klass());
|
||||
- }
|
||||
+ static bool is_instance(oop obj);
|
||||
+
|
||||
static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
|
||||
};
|
||||
|
||||
@@ -1101,9 +1100,8 @@ class java_lang_invoke_DirectMethodHandle_Accessor: AllStatic {
|
||||
static bool is_subclass(Klass* klass) {
|
||||
return klass->is_subclass_of(SystemDictionary::DirectMethodHandle_Accessor_klass());
|
||||
}
|
||||
- static bool is_instance(oop obj) {
|
||||
- return obj != NULL && is_subclass(obj->klass());
|
||||
- }
|
||||
+ static bool is_instance(oop obj);
|
||||
+
|
||||
static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
|
||||
};
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/javaClasses.inline.hpp b/src/hotspot/share/classfile/javaClasses.inline.hpp
|
||||
index 6c5787f4b70..ba9cffa8c62 100644
|
||||
--- a/src/hotspot/share/classfile/javaClasses.inline.hpp
|
||||
+++ b/src/hotspot/share/classfile/javaClasses.inline.hpp
|
||||
@@ -175,6 +175,14 @@ inline bool java_lang_invoke_DirectMethodHandle::is_instance(oop obj) {
|
||||
return obj != NULL && is_subclass(obj->klass());
|
||||
}
|
||||
|
||||
+inline bool java_lang_invoke_DirectMethodHandle_StaticAccessor::is_instance(oop obj) {
|
||||
+ return obj != NULL && is_subclass(obj->klass());
|
||||
+}
|
||||
+
|
||||
+inline bool java_lang_invoke_DirectMethodHandle_Accessor::is_instance(oop obj) {
|
||||
+ return obj != NULL && is_subclass(obj->klass());
|
||||
+}
|
||||
+
|
||||
inline bool java_lang_Module::is_instance(oop obj) {
|
||||
return obj != NULL && obj->klass() == SystemDictionary::Module_klass();
|
||||
}
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
From 990ffe4111fe73c3a183f8d35402cbf9e81bd587 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 11 Apr 2020 17:52:13 +0200
|
||||
Subject: [PATCH 30/50] Add init_implementor_from_redefine, that skips compiler
|
||||
lock assert
|
||||
|
||||
---
|
||||
src/hotspot/share/oops/instanceKlass.cpp | 10 +++++++++-
|
||||
src/hotspot/share/oops/instanceKlass.hpp | 1 +
|
||||
.../share/prims/jvmtiEnhancedRedefineClasses.cpp | 2 +-
|
||||
3 files changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
index 8cbd4b8edf2..c04bdf5abfc 100644
|
||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
@@ -789,7 +789,7 @@ bool InstanceKlass::link_class_impl(bool throw_verifyerror, TRAPS) {
|
||||
if (!is_linked()) {
|
||||
if (!is_rewritten()) {
|
||||
// In cases, if class A is being redefined and class B->A (B is extended from A) and B is host class of anonymous class C
|
||||
- // then second redefinition fails with cannot cast klass exception. So we currently turn off bytecode verification
|
||||
+ // then second redefinition fails with cannot cast klass exception. So we currently turn off bytecode verification
|
||||
// on redefinition.
|
||||
if (!newest_version()->is_redefining()) {
|
||||
bool verify_ok = verify_code(throw_verifyerror, THREAD);
|
||||
@@ -1139,6 +1139,14 @@ void InstanceKlass::init_implementor() {
|
||||
}
|
||||
}
|
||||
|
||||
+void InstanceKlass::init_implementor_from_redefine() {
|
||||
+ assert(is_interface(), "not interface");
|
||||
+ Klass** addr = adr_implementor();
|
||||
+ assert(addr != NULL, "null addr");
|
||||
+ if (addr != NULL) {
|
||||
+ *addr = NULL;
|
||||
+ }
|
||||
+}
|
||||
|
||||
void InstanceKlass::process_interfaces(Thread *thread) {
|
||||
// link this class into the implementors list of every interface it implements
|
||||
diff --git a/src/hotspot/share/oops/instanceKlass.hpp b/src/hotspot/share/oops/instanceKlass.hpp
|
||||
index 2cc98b636f1..e8107a39813 100644
|
||||
--- a/src/hotspot/share/oops/instanceKlass.hpp
|
||||
+++ b/src/hotspot/share/oops/instanceKlass.hpp
|
||||
@@ -1020,6 +1020,7 @@ public:
|
||||
int nof_implementors() const;
|
||||
void add_implementor(Klass* k); // k is a new class that implements this interface
|
||||
void init_implementor(); // initialize
|
||||
+ void init_implementor_from_redefine(); // initialize
|
||||
|
||||
// link this class into the implementors list of every interface it implements
|
||||
void process_interfaces(Thread *thread);
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index f6d2d3a40fe..aac9ba0911f 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -1416,7 +1416,7 @@ void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
|
||||
Klass* implKlass = ik->implementor();
|
||||
if (implKlass != NULL && implKlass != ik && implKlass->new_version() != NULL) {
|
||||
InstanceKlass* newest_impl = InstanceKlass::cast(implKlass->newest_version());
|
||||
- ik->init_implementor();
|
||||
+ ik->init_implementor_from_redefine();
|
||||
if (newest_impl->implements_interface(ik)) {
|
||||
ik->add_implementor(newest_impl);
|
||||
}
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
From 9dcddc7c2573c34579161e3ad1240b029dda1e96 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Mon, 13 Apr 2020 20:59:35 +0200
|
||||
Subject: [PATCH 31/50] not nullable oop_store_not_null() method+handle NULL in
|
||||
mem_name in dmh
|
||||
|
||||
---
|
||||
.../share/prims/jvmtiEnhancedRedefineClasses.cpp | 16 ++++++++++------
|
||||
1 file changed, 10 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index aac9ba0911f..8d861ef43c9 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -225,13 +225,15 @@ void VM_EnhancedRedefineClasses::mark_as_scavengable(nmethod* nm) {
|
||||
// TODO comment
|
||||
struct StoreBarrier {
|
||||
// TODO: j10 review change ::oop_store -> HeapAccess<>::oop_store
|
||||
- template <class T> static void oop_store(T* p, oop v) { HeapAccess<>::oop_store(p, v); }
|
||||
+ template <class T> static void oop_store_not_null(T* p, oop v) { HeapAccess<IS_NOT_NULL>::oop_store(p, v); }
|
||||
+ template <class T> static void oop_store(T* p) { HeapAccess<>::oop_store(p, oop(NULL)); }
|
||||
};
|
||||
|
||||
|
||||
// TODO comment
|
||||
struct StoreNoBarrier {
|
||||
- template <class T> static void oop_store(T* p, oop v) { RawAccess<IS_NOT_NULL>::oop_store(p, v); }
|
||||
+ template <class T> static void oop_store_not_null(T* p, oop v) { RawAccess<IS_NOT_NULL>::oop_store(p, v); }
|
||||
+ template <class T> static void oop_store(T* p) { RawAccess<>::oop_store(p, oop(NULL)); }
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -309,6 +311,9 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
bool update_direct_method_handle(oop obj) {
|
||||
// Always update member name first.
|
||||
oop mem_name = java_lang_invoke_DirectMethodHandle::member(obj);
|
||||
+ if (mem_name == NULL) {
|
||||
+ return true;
|
||||
+ }
|
||||
if (!update_member_name(mem_name)) {
|
||||
return false;
|
||||
}
|
||||
@@ -347,7 +352,7 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
assert(obj == InstanceKlass::cast(klass)->java_mirror(), "just checking");
|
||||
if (klass->new_version() != NULL) {
|
||||
obj = InstanceKlass::cast(klass->new_version())->java_mirror();
|
||||
- S::oop_store(p, obj);
|
||||
+ S::oop_store_not_null(p, obj);
|
||||
oop_updated = true;
|
||||
}
|
||||
}
|
||||
@@ -363,7 +368,7 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
if (!update_direct_method_handle(obj)) {
|
||||
// DMH is no longer valid, replace it with null reference.
|
||||
// See note above. We probably want to replace this with something more meaningful.
|
||||
- S::oop_store(p, NULL);
|
||||
+ S::oop_store(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1430,8 +1435,7 @@ void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
|
||||
// Constant pool entry points to redefined class -- update to the new version
|
||||
other_cp->klass_at_put(i, klass->newest_version());
|
||||
}
|
||||
- klass = other_cp->resolved_klass_at(i);
|
||||
- assert(klass->new_version() == NULL, "Must be new klass!");
|
||||
+ assert(other_cp->resolved_klass_at(i)->new_version() == NULL, "Must be new klass!");
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 800b44f545c7b99026d203690def30ec4b9ed08e Mon Sep 17 00:00:00 2001
|
||||
From: Artem Khvastunov <artem.khvastunov@jetbrains.com>
|
||||
Date: Tue, 14 Apr 2020 19:11:35 +0200
|
||||
Subject: [PATCH 32/50] add jvmtiEnhancedRedefineClasses.* to CMakeLists.txt
|
||||
|
||||
---
|
||||
jb/project/hotspot-cmake/CMakeLists.txt | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/jb/project/hotspot-cmake/CMakeLists.txt b/jb/project/hotspot-cmake/CMakeLists.txt
|
||||
index 8b552c27206..6516e39058f 100644
|
||||
--- a/jb/project/hotspot-cmake/CMakeLists.txt
|
||||
+++ b/jb/project/hotspot-cmake/CMakeLists.txt
|
||||
@@ -1663,6 +1663,7 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/share/prims/jvmtiGetLoadedClasses.hpp
|
||||
../../../src/hotspot/share/prims/jvmtiAgentThread.hpp
|
||||
../../../src/hotspot/share/prims/jvmtiCodeBlobEvents.cpp
|
||||
+../../../src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
../../../src/hotspot/share/prims/stackwalk.cpp
|
||||
../../../src/hotspot/share/prims/privilegedStack.hpp
|
||||
../../../src/hotspot/share/prims/jvmtiUtil.hpp
|
||||
@@ -1684,6 +1685,7 @@ set(SOURCE_FILES
|
||||
../../../src/hotspot/share/prims/stackwalk.hpp
|
||||
../../../src/hotspot/share/prims/privilegedStack.cpp
|
||||
../../../src/hotspot/share/prims/jvmtiCodeBlobEvents.hpp
|
||||
+../../../src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
../../../src/hotspot/share/prims/jvmtiUtil.cpp
|
||||
../../../src/hotspot/share/prims/jvmtiEnvBase.cpp
|
||||
../../../src/hotspot/share/prims/methodHandles.cpp
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From e009b4fcc48e9719b5b896f7f3838fbc7c579ba7 Mon Sep 17 00:00:00 2001
|
||||
From: Artem Khvastunov <artem.khvastunov@jetbrains.com>
|
||||
Date: Sun, 19 Apr 2020 11:36:12 +0200
|
||||
Subject: [PATCH 33/50] migrate DCEVM to 11.0.7
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index 2d114635ee5..6cabdca9c27 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "oops/objArrayKlass.hpp"
|
||||
#include "oops/objArrayOop.hpp"
|
||||
-#include "runtime/vm_operations.hpp"
|
||||
+#include "runtime/vmOperations.hpp"
|
||||
#include "gc/shared/vmGCOperations.hpp"
|
||||
#include "../../../java.base/unix/native/include/jni_md.h"
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 5653e2a5f05a9693f934b0f9c4d9286c01576807 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 8 May 2020 21:07:50 +0200
|
||||
Subject: [PATCH 34/50] Fix 11.0.7 compilation issues
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index 6cabdca9c27..ed44f0e27ce 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -16,6 +16,8 @@
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
+ *
|
||||
+ *
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
@@ -30,7 +32,6 @@
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "oops/objArrayKlass.hpp"
|
||||
#include "oops/objArrayOop.hpp"
|
||||
-#include "runtime/vmOperations.hpp"
|
||||
#include "gc/shared/vmGCOperations.hpp"
|
||||
#include "../../../java.base/unix/native/include/jni_md.h"
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 0b9b021f889ec001d579d192f1bd9a7a43f63871 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 9 May 2020 10:08:17 +0200
|
||||
Subject: [PATCH 35/50] Use INCLUDE_CDS condition on "UseSharedSpaces" block
|
||||
from master
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 8d861ef43c9..660bf3a2e97 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -467,6 +467,7 @@ public:
|
||||
void VM_EnhancedRedefineClasses::doit() {
|
||||
Thread *thread = Thread::current();
|
||||
|
||||
+#if INCLUDE_CDS
|
||||
if (UseSharedSpaces) {
|
||||
// Sharing is enabled so we remap the shared readonly space to
|
||||
// shared readwrite, private just in case we need to redefine
|
||||
@@ -478,6 +479,7 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
// Mark methods seen on stack and everywhere else so old methods are not
|
||||
// cleaned up if they're on the stack.
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
From 9f4b84339b55187b742682bd84fdb0e6e121917c Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 16 May 2020 15:11:40 +0200
|
||||
Subject: [PATCH 36/50] Access com.sun.beans.util - HotswapAgent patch
|
||||
|
||||
---
|
||||
src/hotspot/share/runtime/arguments.cpp | 2 ++
|
||||
.../sun/beans/introspect/package-info.java | 26 +++++++++++++++++++
|
||||
.../classes/com/sun/beans/package-info.java | 26 +++++++++++++++++++
|
||||
.../com/sun/beans/util/package-info.java | 26 +++++++++++++++++++
|
||||
.../share/classes/module-info.java | 3 +++
|
||||
5 files changed, 83 insertions(+)
|
||||
create mode 100644 src/java.desktop/share/classes/com/sun/beans/introspect/package-info.java
|
||||
create mode 100644 src/java.desktop/share/classes/com/sun/beans/package-info.java
|
||||
create mode 100644 src/java.desktop/share/classes/com/sun/beans/util/package-info.java
|
||||
|
||||
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
|
||||
index 0cdd8c88315..72580b384dd 100644
|
||||
--- a/src/hotspot/share/runtime/arguments.cpp
|
||||
+++ b/src/hotspot/share/runtime/arguments.cpp
|
||||
@@ -4333,5 +4333,7 @@ void Arguments::setup_hotswap_agent() {
|
||||
create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans=ALL-UNNAMED", addopens_count++);
|
||||
// com.sun.beans.introspect.ClassInfo access
|
||||
create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans.introspect=ALL-UNNAMED", addopens_count++);
|
||||
+ // com.sun.beans.introspect.util.Cache access
|
||||
+ create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans.util=ALL-UNNAMED", addopens_count++);
|
||||
|
||||
}
|
||||
diff --git a/src/java.desktop/share/classes/com/sun/beans/introspect/package-info.java b/src/java.desktop/share/classes/com/sun/beans/introspect/package-info.java
|
||||
new file mode 100644
|
||||
index 00000000000..6636e4dd62a
|
||||
--- /dev/null
|
||||
+++ b/src/java.desktop/share/classes/com/sun/beans/introspect/package-info.java
|
||||
@@ -0,0 +1,26 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
+ *
|
||||
+ * This code is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License version 2 only, as
|
||||
+ * published by the Free Software Foundation. Oracle designates this
|
||||
+ * particular file as subject to the "Classpath" exception as provided
|
||||
+ * by Oracle in the LICENSE file that accompanied this code.
|
||||
+ *
|
||||
+ * This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
+ * version 2 for more details (a copy is included in the LICENSE file that
|
||||
+ * accompanied this code).
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License version
|
||||
+ * 2 along with this work; if not, write to the Free Software Foundation,
|
||||
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+ *
|
||||
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
+ * or visit www.oracle.com if you need additional information or have any
|
||||
+ * questions.
|
||||
+ */
|
||||
+
|
||||
+package com.sun.beans.introspect;
|
||||
diff --git a/src/java.desktop/share/classes/com/sun/beans/package-info.java b/src/java.desktop/share/classes/com/sun/beans/package-info.java
|
||||
new file mode 100644
|
||||
index 00000000000..5c097eeaa53
|
||||
--- /dev/null
|
||||
+++ b/src/java.desktop/share/classes/com/sun/beans/package-info.java
|
||||
@@ -0,0 +1,26 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
+ *
|
||||
+ * This code is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License version 2 only, as
|
||||
+ * published by the Free Software Foundation. Oracle designates this
|
||||
+ * particular file as subject to the "Classpath" exception as provided
|
||||
+ * by Oracle in the LICENSE file that accompanied this code.
|
||||
+ *
|
||||
+ * This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
+ * version 2 for more details (a copy is included in the LICENSE file that
|
||||
+ * accompanied this code).
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License version
|
||||
+ * 2 along with this work; if not, write to the Free Software Foundation,
|
||||
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+ *
|
||||
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
+ * or visit www.oracle.com if you need additional information or have any
|
||||
+ * questions.
|
||||
+ */
|
||||
+
|
||||
+package com.sun.beans;
|
||||
diff --git a/src/java.desktop/share/classes/com/sun/beans/util/package-info.java b/src/java.desktop/share/classes/com/sun/beans/util/package-info.java
|
||||
new file mode 100644
|
||||
index 00000000000..2d5d735ffa8
|
||||
--- /dev/null
|
||||
+++ b/src/java.desktop/share/classes/com/sun/beans/util/package-info.java
|
||||
@@ -0,0 +1,26 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
+ *
|
||||
+ * This code is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License version 2 only, as
|
||||
+ * published by the Free Software Foundation. Oracle designates this
|
||||
+ * particular file as subject to the "Classpath" exception as provided
|
||||
+ * by Oracle in the LICENSE file that accompanied this code.
|
||||
+ *
|
||||
+ * This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
+ * version 2 for more details (a copy is included in the LICENSE file that
|
||||
+ * accompanied this code).
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License version
|
||||
+ * 2 along with this work; if not, write to the Free Software Foundation,
|
||||
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+ *
|
||||
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
+ * or visit www.oracle.com if you need additional information or have any
|
||||
+ * questions.
|
||||
+ */
|
||||
+
|
||||
+package com.sun.beans.util;
|
||||
diff --git a/src/java.desktop/share/classes/module-info.java b/src/java.desktop/share/classes/module-info.java
|
||||
index f9cf021311f..e61ba7572cf 100644
|
||||
--- a/src/java.desktop/share/classes/module-info.java
|
||||
+++ b/src/java.desktop/share/classes/module-info.java
|
||||
@@ -104,6 +104,9 @@ module java.desktop {
|
||||
exports javax.swing.text.rtf;
|
||||
exports javax.swing.tree;
|
||||
exports javax.swing.undo;
|
||||
+ exports com.sun.beans;
|
||||
+ exports com.sun.beans.introspect;
|
||||
+ exports com.sun.beans.util;
|
||||
|
||||
// qualified exports may be inserted at build time
|
||||
// see make/GensrcModuleInfo.gmk
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From 9a662b1367860920095efe79116ef9a2d53fc2c6 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 17 May 2020 12:19:18 +0200
|
||||
Subject: [PATCH 37/50] Skip verifier only in AllowEnhancedClassRedefinition
|
||||
|
||||
---
|
||||
src/hotspot/share/oops/instanceKlass.cpp | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
index c04bdf5abfc..e14aaee21c4 100644
|
||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
@@ -788,10 +788,10 @@ bool InstanceKlass::link_class_impl(bool throw_verifyerror, TRAPS) {
|
||||
|
||||
if (!is_linked()) {
|
||||
if (!is_rewritten()) {
|
||||
- // In cases, if class A is being redefined and class B->A (B is extended from A) and B is host class of anonymous class C
|
||||
+ // (DCEVM): If class A is being redefined and class B->A (B is extended from A) and B is host class of anonymous class C
|
||||
// then second redefinition fails with cannot cast klass exception. So we currently turn off bytecode verification
|
||||
// on redefinition.
|
||||
- if (!newest_version()->is_redefining()) {
|
||||
+ if (!AllowEnhancedClassRedefinition || !newest_version()->is_redefining()) {
|
||||
bool verify_ok = verify_code(throw_verifyerror, THREAD);
|
||||
if (!verify_ok) {
|
||||
return false;
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
From a58ed678218bfb80af164cfe98cdf4a3ab74a682 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 17 May 2020 18:18:52 +0200
|
||||
Subject: [PATCH 38/50] Use original code for adjust_method_entries in standard
|
||||
redefinition
|
||||
|
||||
---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 2 +-
|
||||
.../share/prims/resolvedMethodTable.cpp | 46 ++++++++++++++++++-
|
||||
.../share/prims/resolvedMethodTable.hpp | 1 +
|
||||
3 files changed, 47 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 660bf3a2e97..0ca675e8ee6 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -506,7 +506,7 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
// JSR-292 support
|
||||
if (_any_class_has_resolved_methods) {
|
||||
bool trace_name_printed = false;
|
||||
- ResolvedMethodTable::adjust_method_entries(&trace_name_printed);
|
||||
+ ResolvedMethodTable::adjust_method_entries_dcevm(&trace_name_printed);
|
||||
}
|
||||
|
||||
ChangePointersOopClosure<StoreNoBarrier> oopClosureNoBarrier;
|
||||
diff --git a/src/hotspot/share/prims/resolvedMethodTable.cpp b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
index a9057893368..af2ec48c2e1 100644
|
||||
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
@@ -197,8 +197,52 @@ void ResolvedMethodTable::print() {
|
||||
#endif // PRODUCT
|
||||
|
||||
#if INCLUDE_JVMTI
|
||||
-// It is called at safepoint only for RedefineClasses
|
||||
+
|
||||
void ResolvedMethodTable::adjust_method_entries(bool * trace_name_printed) {
|
||||
+ assert(SafepointSynchronize::is_at_safepoint(), "only called at safepoint");
|
||||
+ // For each entry in RMT, change to new method
|
||||
+ for (int i = 0; i < _the_table->table_size(); ++i) {
|
||||
+ for (ResolvedMethodEntry* entry = _the_table->bucket(i);
|
||||
+ entry != NULL;
|
||||
+ entry = entry->next()) {
|
||||
+
|
||||
+ oop mem_name = entry->object_no_keepalive();
|
||||
+ // except ones removed
|
||||
+ if (mem_name == NULL) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ Method* old_method = (Method*)java_lang_invoke_ResolvedMethodName::vmtarget(mem_name);
|
||||
+
|
||||
+ if (old_method->is_old()) {
|
||||
+
|
||||
+ Method* new_method;
|
||||
+ if (old_method->is_deleted()) {
|
||||
+ new_method = Universe::throw_no_such_method_error();
|
||||
+ } else {
|
||||
+ InstanceKlass* holder = old_method->method_holder();
|
||||
+ new_method = holder->method_with_idnum(old_method->orig_method_idnum());
|
||||
+ assert(holder == new_method->method_holder(), "call after swapping redefined guts");
|
||||
+ assert(new_method != NULL, "method_with_idnum() should not be NULL");
|
||||
+ assert(old_method != new_method, "sanity check");
|
||||
+ }
|
||||
+
|
||||
+ java_lang_invoke_ResolvedMethodName::set_vmtarget(mem_name, new_method);
|
||||
+
|
||||
+ ResourceMark rm;
|
||||
+ if (!(*trace_name_printed)) {
|
||||
+ log_info(redefine, class, update)("adjust: name=%s", old_method->method_holder()->external_name());
|
||||
+ *trace_name_printed = true;
|
||||
+ }
|
||||
+ log_debug(redefine, class, update, constantpool)
|
||||
+ ("ResolvedMethod method update: %s(%s)",
|
||||
+ new_method->name()->as_C_string(), new_method->signature()->as_C_string());
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+// (DCEVM) It is called at safepoint only for RedefineClasses
|
||||
+void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed) {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "only called at safepoint");
|
||||
// For each entry in RMT, change to new method
|
||||
GrowableArray<oop>* oops_to_add = new GrowableArray<oop>();
|
||||
diff --git a/src/hotspot/share/prims/resolvedMethodTable.hpp b/src/hotspot/share/prims/resolvedMethodTable.hpp
|
||||
index 841ae4ae585..543d4ffa485 100644
|
||||
--- a/src/hotspot/share/prims/resolvedMethodTable.hpp
|
||||
+++ b/src/hotspot/share/prims/resolvedMethodTable.hpp
|
||||
@@ -93,6 +93,7 @@ public:
|
||||
#if INCLUDE_JVMTI
|
||||
// It is called at safepoint only for RedefineClasses
|
||||
static void adjust_method_entries(bool * trace_name_printed);
|
||||
+ static void adjust_method_entries_dcevm(bool * trace_name_printed);
|
||||
#endif // INCLUDE_JVMTI
|
||||
|
||||
// Cleanup cleared entries
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
From c1e814f2f7d4f2b37abd667d0bec516474f2a119 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Tue, 19 May 2020 09:41:36 +0200
|
||||
Subject: [PATCH 39/50] Revert code for !AllowEnhancedClassRedefinition
|
||||
|
||||
---
|
||||
.../share/classfile/classLoaderData.cpp | 23 ++++++++++---------
|
||||
1 file changed, 12 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
index 25103fff2c0..f5b877b432b 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
@@ -1387,12 +1387,13 @@ bool ClassLoaderDataGraph::do_unloading(bool clean_previous_versions) {
|
||||
// Klassesoto delete.
|
||||
|
||||
// FIXME: dcevm - block asserts in MetadataOnStackMark
|
||||
- /*
|
||||
- bool walk_all_metadata = clean_previous_versions &&
|
||||
- JvmtiExport::has_redefined_a_class() &&
|
||||
- InstanceKlass::has_previous_versions_and_reset();
|
||||
- MetadataOnStackMark md_on_stack(walk_all_metadata);
|
||||
- */
|
||||
+ bool walk_all_metadata = false;
|
||||
+ if (!AllowEnhancedClassRedefinition) {
|
||||
+ walk_all_metadata = clean_previous_versions &&
|
||||
+ JvmtiExport::has_redefined_a_class() &&
|
||||
+ InstanceKlass::has_previous_versions_and_reset();
|
||||
+ MetadataOnStackMark md_on_stack(walk_all_metadata);
|
||||
+ }
|
||||
|
||||
// Save previous _unloading pointer for CMS which may add to unloading list before
|
||||
// purging and we don't want to rewalk the previously unloaded class loader data.
|
||||
@@ -1402,12 +1403,12 @@ bool ClassLoaderDataGraph::do_unloading(bool clean_previous_versions) {
|
||||
while (data != NULL) {
|
||||
if (data->is_alive()) {
|
||||
// clean metaspace
|
||||
- /*
|
||||
- if (walk_all_metadata) {
|
||||
- data->classes_do(InstanceKlass::purge_previous_versions);
|
||||
+ if (!AllowEnhancedClassRedefinition) {
|
||||
+ if (walk_all_metadata) {
|
||||
+ data->classes_do(InstanceKlass::purge_previous_versions);
|
||||
+ }
|
||||
+ data->free_deallocate_list();
|
||||
}
|
||||
- data->free_deallocate_list();
|
||||
- */
|
||||
prev = data;
|
||||
data = data->next();
|
||||
loaders_processed++;
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
278
jb/project/tools/patches/dcevm/0040-Code-cleanup.patch
Normal file
278
jb/project/tools/patches/dcevm/0040-Code-cleanup.patch
Normal file
@@ -0,0 +1,278 @@
|
||||
From 5b36c4798869c5cd4d65f7765a8447b9cf09d76b Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Tue, 19 May 2020 09:29:39 +0200
|
||||
Subject: [PATCH 40/50] Code cleanup
|
||||
|
||||
---
|
||||
src/hotspot/share/classfile/classFileParser.cpp | 4 +++-
|
||||
src/hotspot/share/classfile/classFileParser.hpp | 2 +-
|
||||
src/hotspot/share/classfile/classLoaderData.cpp | 2 ++
|
||||
src/hotspot/share/classfile/dictionary.cpp | 4 ++++
|
||||
src/hotspot/share/classfile/dictionary.hpp | 1 +
|
||||
src/hotspot/share/classfile/loaderConstraints.cpp | 3 ++-
|
||||
src/hotspot/share/classfile/systemDictionary.cpp | 8 +++++---
|
||||
src/hotspot/share/interpreter/linkResolver.cpp | 1 +
|
||||
src/hotspot/share/memory/universe.cpp | 4 ++--
|
||||
src/hotspot/share/oops/instanceKlass.cpp | 13 ++++++++-----
|
||||
10 files changed, 29 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/classFileParser.cpp b/src/hotspot/share/classfile/classFileParser.cpp
|
||||
index ea150df9104..c2cd35da4e6 100644
|
||||
--- a/src/hotspot/share/classfile/classFileParser.cpp
|
||||
+++ b/src/hotspot/share/classfile/classFileParser.cpp
|
||||
@@ -954,6 +954,7 @@ void ClassFileParser::parse_interfaces(const ClassFileStream* const stream,
|
||||
CHECK);
|
||||
}
|
||||
|
||||
+ // (DCEVM) pick newest
|
||||
interf = (Klass *) maybe_newest(interf);
|
||||
|
||||
if (!interf->is_interface()) {
|
||||
@@ -3749,6 +3750,7 @@ const InstanceKlass* ClassFileParser::parse_super_class(ConstantPool* const cp,
|
||||
// However, make sure it is not an array type.
|
||||
bool is_array = false;
|
||||
if (cp->tag_at(super_class_index).is_klass()) {
|
||||
+ // (DCEVM) pick newest
|
||||
super_klass = InstanceKlass::cast(maybe_newest(cp->resolved_klass_at(super_class_index)));
|
||||
if (need_verify)
|
||||
is_array = super_klass->is_array_klass();
|
||||
@@ -4417,7 +4419,7 @@ void ClassFileParser::set_precomputed_flags(InstanceKlass* ik) {
|
||||
if (!_has_empty_finalizer) {
|
||||
if (_has_finalizer ||
|
||||
(super != NULL && super->has_finalizer())) {
|
||||
- // FIXME - condition from previous DCEVM version, however after reload new finelize() method is not active
|
||||
+ // FIXME - (DCEVM) this is condition from previous DCEVM version, however after reload a new finalize() method is not active
|
||||
if (ik->old_version() == NULL || ik->old_version()->has_finalizer()) {
|
||||
ik->set_has_finalizer();
|
||||
}
|
||||
diff --git a/src/hotspot/share/classfile/classFileParser.hpp b/src/hotspot/share/classfile/classFileParser.hpp
|
||||
index 3db14b678f3..93ed54d8f70 100644
|
||||
--- a/src/hotspot/share/classfile/classFileParser.hpp
|
||||
+++ b/src/hotspot/share/classfile/classFileParser.hpp
|
||||
@@ -499,7 +499,7 @@ class ClassFileParser {
|
||||
FieldLayoutInfo* info,
|
||||
TRAPS);
|
||||
|
||||
- // Enhanced class redefinition
|
||||
+ // (DCEVM) Enhanced class redefinition
|
||||
inline const Klass* maybe_newest(const Klass* klass) const { return klass != NULL && _pick_newest ? klass->newest_version() : klass; }
|
||||
|
||||
public:
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
index f5b877b432b..ab2615da0ed 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
@@ -1242,6 +1242,7 @@ void ClassLoaderDataGraph::dictionary_classes_do(void f(InstanceKlass*)) {
|
||||
}
|
||||
}
|
||||
|
||||
+// (DCEVM) - iterate over dict classes
|
||||
void ClassLoaderDataGraph::dictionary_classes_do(KlassClosure* klass_closure) {
|
||||
FOR_ALL_DICTIONARY(cld) {
|
||||
cld->dictionary()->classes_do(klass_closure);
|
||||
@@ -1257,6 +1258,7 @@ void ClassLoaderDataGraph::dictionary_classes_do(void f(InstanceKlass*, TRAPS),
|
||||
}
|
||||
}
|
||||
|
||||
+// (DCEVM) rollback redefined classes
|
||||
void ClassLoaderDataGraph::rollback_redefinition() {
|
||||
FOR_ALL_DICTIONARY(cld) {
|
||||
cld->dictionary()->rollback_redefinition();
|
||||
diff --git a/src/hotspot/share/classfile/dictionary.cpp b/src/hotspot/share/classfile/dictionary.cpp
|
||||
index 118730f1b83..dda5188c370 100644
|
||||
--- a/src/hotspot/share/classfile/dictionary.cpp
|
||||
+++ b/src/hotspot/share/classfile/dictionary.cpp
|
||||
@@ -245,6 +245,8 @@ void Dictionary::classes_do(void f(InstanceKlass*)) {
|
||||
}
|
||||
}
|
||||
|
||||
+
|
||||
+// (DCEVM) iterate over dict entry
|
||||
void Dictionary::classes_do(KlassClosure* closure) {
|
||||
for (int index = 0; index < table_size(); index++) {
|
||||
for (DictionaryEntry* probe = bucket(index);
|
||||
@@ -342,6 +344,7 @@ DictionaryEntry* Dictionary::get_entry(int index, unsigned int hash,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+// (DCEVM) replace old_class by new class in dictionary
|
||||
bool Dictionary::update_klass(unsigned int hash, Symbol* name, ClassLoaderData* loader_data, InstanceKlass* k, InstanceKlass* old_klass) {
|
||||
// There are several entries for the same class in the dictionary: One extra entry for each parent classloader of the classloader of the class.
|
||||
bool found = false;
|
||||
@@ -356,6 +359,7 @@ bool Dictionary::update_klass(unsigned int hash, Symbol* name, ClassLoaderData*
|
||||
return found;
|
||||
}
|
||||
|
||||
+// (DCEVM) rollback redefinition
|
||||
void Dictionary::rollback_redefinition() {
|
||||
for (int index = 0; index < table_size(); index++) {
|
||||
for (DictionaryEntry* entry = bucket(index);
|
||||
diff --git a/src/hotspot/share/classfile/dictionary.hpp b/src/hotspot/share/classfile/dictionary.hpp
|
||||
index fd4b134d7a7..5eaa741d500 100644
|
||||
--- a/src/hotspot/share/classfile/dictionary.hpp
|
||||
+++ b/src/hotspot/share/classfile/dictionary.hpp
|
||||
@@ -119,6 +119,7 @@ public:
|
||||
|
||||
void rollback_redefinition();
|
||||
|
||||
+ // (DCEVM) return old class if redefining in AllowEnhancedClassRedefinition, otherwise return "k"
|
||||
static InstanceKlass* old_if_redefined(InstanceKlass* k) {
|
||||
return (k != NULL && k->is_redefining()) ? ((InstanceKlass* )k->old_version()) : k;
|
||||
}
|
||||
diff --git a/src/hotspot/share/classfile/loaderConstraints.cpp b/src/hotspot/share/classfile/loaderConstraints.cpp
|
||||
index e4a23e8a27c..bca73b5e0dc 100644
|
||||
--- a/src/hotspot/share/classfile/loaderConstraints.cpp
|
||||
+++ b/src/hotspot/share/classfile/loaderConstraints.cpp
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
- * published by the Free Software Foundation.
|
||||
+ * published by the Free Software Foundation) replace old_class by new class in dictionary.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
@@ -87,6 +87,7 @@ LoaderConstraintEntry** LoaderConstraintTable::find_loader_constraint(
|
||||
return pp;
|
||||
}
|
||||
|
||||
+// (DCEVM) update constraint entries to new classes, called from dcevm redefinition code only
|
||||
void LoaderConstraintTable::update_after_redefinition() {
|
||||
for (int index = 0; index < table_size(); index++) {
|
||||
LoaderConstraintEntry** p = bucket_addr(index);
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.cpp b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
index 9dbd6cc9c12..e70865109dd 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
@@ -876,7 +876,8 @@ Klass* SystemDictionary::resolve_instance_class_or_null(Symbol* name,
|
||||
ClassLoaderData* loader_data = k->class_loader_data();
|
||||
MutexLocker mu(SystemDictionary_lock, THREAD);
|
||||
Klass* kk = find_class(name, loader_data);
|
||||
- // FIXME: (kk == k() && !k->is_redefining()) || (k->is_redefining() && kk == k->old_version())
|
||||
+ // FIXME: (DCEVM)
|
||||
+ // assert(kk == k() && !k->is_redefining()) || (k->is_redefining() && kk == k->old_version())
|
||||
assert(kk == k, "should be present in dictionary");
|
||||
}
|
||||
#endif
|
||||
@@ -1083,7 +1084,7 @@ InstanceKlass* SystemDictionary::resolve_from_stream(Symbol* class_name,
|
||||
InstanceKlass* k = NULL;
|
||||
|
||||
#if INCLUDE_CDS
|
||||
- // FIXME: what to do during redefinition?
|
||||
+ // FIXME: (DCEVM) what to do during redefinition?
|
||||
if (!DumpSharedSpaces) {
|
||||
k = SystemDictionaryShared::lookup_from_stream(class_name,
|
||||
class_loader,
|
||||
@@ -1836,7 +1837,7 @@ void SystemDictionary::add_to_hierarchy(InstanceKlass* k, TRAPS) {
|
||||
CodeCache::flush_dependents_on(k);
|
||||
}
|
||||
|
||||
-// Enhanced class redefinition
|
||||
+// (DCEVM) - remove from klass hierarchy
|
||||
void SystemDictionary::remove_from_hierarchy(InstanceKlass* k) {
|
||||
assert(k != NULL, "just checking");
|
||||
|
||||
@@ -1844,6 +1845,7 @@ void SystemDictionary::remove_from_hierarchy(InstanceKlass* k) {
|
||||
k->remove_from_sibling_list();
|
||||
}
|
||||
|
||||
+// (DCEVM)
|
||||
void SystemDictionary::update_constraints_after_redefinition() {
|
||||
constraints()->update_after_redefinition();
|
||||
}
|
||||
diff --git a/src/hotspot/share/interpreter/linkResolver.cpp b/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
index cb76d2ef50c..9dc184d02f5 100644
|
||||
--- a/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
+++ b/src/hotspot/share/interpreter/linkResolver.cpp
|
||||
@@ -1384,6 +1384,7 @@ void LinkResolver::runtime_resolve_virtual_method(CallInfo& result,
|
||||
assert(resolved_method->can_be_statically_bound(), "cannot override this method");
|
||||
selected_method = resolved_method;
|
||||
} else {
|
||||
+ // TODO: (DCEVM) explain
|
||||
assert(recv_klass->is_subtype_of(resolved_method->method_holder()), "receiver and resolved method holder are inconsistent");
|
||||
selected_method = methodHandle(THREAD, recv_klass->method_at_vtable(vtable_index));
|
||||
}
|
||||
diff --git a/src/hotspot/share/memory/universe.cpp b/src/hotspot/share/memory/universe.cpp
|
||||
index 7ecb950b231..d0a6d665aa0 100644
|
||||
--- a/src/hotspot/share/memory/universe.cpp
|
||||
+++ b/src/hotspot/share/memory/universe.cpp
|
||||
@@ -176,7 +176,7 @@ void Universe::basic_type_classes_do(void f(Klass*)) {
|
||||
f(doubleArrayKlassObj());
|
||||
}
|
||||
|
||||
-// FIXME: This method should iterate all pointers that are not within heap objects.
|
||||
+// FIXME: (DCEVM) This method should iterate all pointers that are not within heap objects.
|
||||
void Universe::root_oops_do(OopClosure *oopClosure) {
|
||||
|
||||
class AlwaysTrueClosure: public BoolObjectClosure {
|
||||
@@ -203,7 +203,7 @@ void Universe::root_oops_do(OopClosure *oopClosure) {
|
||||
CodeBlobToOopClosure blobClosure(oopClosure, CodeBlobToOopClosure::FixRelocations);
|
||||
CodeCache::blobs_do(&blobClosure);
|
||||
StringTable::oops_do(oopClosure);
|
||||
-
|
||||
+
|
||||
// (DCEVM) TODO: Check if this is correct?
|
||||
//CodeCache::scavenge_root_nmethods_oops_do(oopClosure);
|
||||
//Management::oops_do(oopClosure);
|
||||
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
index e14aaee21c4..c860371d2fc 100644
|
||||
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
||||
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
||||
@@ -1139,6 +1139,7 @@ void InstanceKlass::init_implementor() {
|
||||
}
|
||||
}
|
||||
|
||||
+// (DCEVM) - init_implementor() for dcevm
|
||||
void InstanceKlass::init_implementor_from_redefine() {
|
||||
assert(is_interface(), "not interface");
|
||||
Klass** addr = adr_implementor();
|
||||
@@ -1209,6 +1210,8 @@ bool InstanceKlass::implements_interface(Klass* k) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
+
|
||||
+// (DCEVM)
|
||||
bool InstanceKlass::implements_interface_any_version(Klass* k) const {
|
||||
k = k->newest_version();
|
||||
if (this->newest_version() == k) return true;
|
||||
@@ -1491,10 +1494,8 @@ void InstanceKlass::methods_do(void f(Method* method)) {
|
||||
}
|
||||
}
|
||||
|
||||
-/**
|
||||
- Update information contains mapping of fields from old class to the new class.
|
||||
- Info is stored on HEAP, you need to call clear_update_information to free the space.
|
||||
-*/
|
||||
+// (DCEVM) Update information contains mapping of fields from old class to the new class.
|
||||
+// Info is stored on HEAP, you need to call clear_update_information to free the space.
|
||||
void InstanceKlass::store_update_information(GrowableArray<int> &values) {
|
||||
int *arr = NEW_C_HEAP_ARRAY(int, values.length(), mtClass);
|
||||
for (int i = 0; i < values.length(); i++) {
|
||||
@@ -2162,6 +2163,7 @@ void InstanceKlass::add_dependent_nmethod(nmethod* nm) {
|
||||
dependencies().add_dependent_nmethod(nm);
|
||||
}
|
||||
|
||||
+// DCEVM - update jmethod ids
|
||||
bool InstanceKlass::update_jmethod_id(Method* method, jmethodID newMethodID) {
|
||||
size_t idnum = (size_t)method->method_idnum();
|
||||
jmethodID* jmeths = methods_jmethod_ids_acquire();
|
||||
@@ -2177,7 +2179,7 @@ bool InstanceKlass::update_jmethod_id(Method* method, jmethodID newMethodID) {
|
||||
|
||||
void InstanceKlass::remove_dependent_nmethod(nmethod* nm, bool delete_immediately) {
|
||||
dependencies().remove_dependent_nmethod(nm, delete_immediately);
|
||||
- // (DCEVM) Hack as dependencies get wrong version of Klass*
|
||||
+ // FIXME: (DCEVM) Hack as dependencies get wrong version of Klass*
|
||||
// if (this->old_version() != NULL) {
|
||||
// InstanceKlass::cast(this->old_version())->remove_dependent_nmethod(nm, true);
|
||||
// return;
|
||||
@@ -3594,6 +3596,7 @@ void InstanceKlass::verify_on(outputStream* st) {
|
||||
}
|
||||
|
||||
guarantee(sib->is_klass(), "should be klass");
|
||||
+ // TODO: (DCEVM) explain
|
||||
guarantee(sib->super() == super || super->newest_version() == SystemDictionary::Object_klass(), "siblings should have same superklass");
|
||||
}
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
From 71f35c41b569f72a1674ccd57118c4fe76ba3d68 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Tue, 19 May 2020 10:31:15 +0200
|
||||
Subject: [PATCH 41/50] Activate cpCache definition asserts for !dcevm
|
||||
|
||||
---
|
||||
src/hotspot/share/oops/cpCache.cpp | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/oops/cpCache.cpp b/src/hotspot/share/oops/cpCache.cpp
|
||||
index 47040d51f0c..4318df227d1 100644
|
||||
--- a/src/hotspot/share/oops/cpCache.cpp
|
||||
+++ b/src/hotspot/share/oops/cpCache.cpp
|
||||
@@ -436,8 +436,7 @@ void ConstantPoolCacheEntry::set_method_handle_common(const constantPoolHandle&
|
||||
if (has_appendix) {
|
||||
const int appendix_index = f2_as_index() + _indy_resolved_references_appendix_offset;
|
||||
assert(appendix_index >= 0 && appendix_index < resolved_references->length(), "oob");
|
||||
- // FIXME (DCEVM) relaxing for now...
|
||||
- //assert(resolved_references->obj_at(appendix_index) == NULL, "init just once");
|
||||
+ assert(AllowEnhancedClassRedefinition || resolved_references->obj_at(appendix_index) == NULL, "init just once");
|
||||
resolved_references->obj_at_put(appendix_index, appendix());
|
||||
}
|
||||
|
||||
@@ -445,8 +444,7 @@ void ConstantPoolCacheEntry::set_method_handle_common(const constantPoolHandle&
|
||||
if (has_method_type) {
|
||||
const int method_type_index = f2_as_index() + _indy_resolved_references_method_type_offset;
|
||||
assert(method_type_index >= 0 && method_type_index < resolved_references->length(), "oob");
|
||||
- // FIXME (DCEVM) relaxing for now...
|
||||
- //assert(resolved_references->obj_at(method_type_index) == NULL, "init just once");
|
||||
+ assert(AllowEnhancedClassRedefinition || resolved_references->obj_at(method_type_index) == NULL, "init just once");
|
||||
resolved_references->obj_at_put(method_type_index, method_type());
|
||||
}
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From 961018a29ddb7eba96aca7fbc385f3c4f29e3a03 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Tue, 19 May 2020 10:54:38 +0200
|
||||
Subject: [PATCH 42/50] iterate old method version only in dcevm
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiImpl.cpp | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiImpl.cpp b/src/hotspot/share/prims/jvmtiImpl.cpp
|
||||
index 2a92ece916e..d2044541d38 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiImpl.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiImpl.cpp
|
||||
@@ -294,8 +294,10 @@ void JvmtiBreakpoint::each_method_version_do(method_action meth_act) {
|
||||
Symbol* m_signature = _method->signature();
|
||||
|
||||
// (DCEVM) Go through old versions of method
|
||||
- for (Method* m = _method->old_version(); m != NULL; m = m->old_version()) {
|
||||
- (m->*meth_act)(_bci);
|
||||
+ if (AllowEnhancedClassRedefinition) {
|
||||
+ for (Method* m = _method->old_version(); m != NULL; m = m->old_version()) {
|
||||
+ (m->*meth_act)(_bci);
|
||||
+ }
|
||||
}
|
||||
|
||||
// search previous versions if they exist
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,258 @@
|
||||
From 2ab70b495c43c4699ad402a714710566400de99d Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 22 May 2020 21:23:01 +0200
|
||||
Subject: [PATCH 43/50] Support for Lambda class redefinition
|
||||
|
||||
---
|
||||
.../share/classfile/classLoaderData.cpp | 9 +++
|
||||
.../share/classfile/classLoaderData.hpp | 1 +
|
||||
.../share/classfile/systemDictionary.cpp | 12 +++-
|
||||
.../share/classfile/systemDictionary.hpp | 2 +
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 65 +++++++++++++++++--
|
||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 1 +
|
||||
.../share/prims/resolvedMethodTable.cpp | 4 +-
|
||||
src/hotspot/share/prims/unsafe.cpp | 1 +
|
||||
8 files changed, 85 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
index ab2615da0ed..1bc67adf5a7 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
|
||||
@@ -663,6 +663,15 @@ Dictionary* ClassLoaderData::create_dictionary() {
|
||||
return new Dictionary(this, size, resizable);
|
||||
}
|
||||
|
||||
+void ClassLoaderData::exchange_holders(ClassLoaderData* cld) {
|
||||
+ oop holder_oop = _holder.peek();
|
||||
+ _holder.replace(cld->_holder.peek());
|
||||
+ cld->_holder.replace(holder_oop);
|
||||
+ WeakHandle<vm_class_loader_data> exchange = _holder;
|
||||
+ _holder = cld->_holder;
|
||||
+ cld->_holder = exchange;
|
||||
+}
|
||||
+
|
||||
// Tell the GC to keep this klass alive while iterating ClassLoaderDataGraph
|
||||
oop ClassLoaderData::holder_phantom() const {
|
||||
// A klass that was previously considered dead can be looked up in the
|
||||
diff --git a/src/hotspot/share/classfile/classLoaderData.hpp b/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
index 7e357929971..00a84610b43 100644
|
||||
--- a/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
+++ b/src/hotspot/share/classfile/classLoaderData.hpp
|
||||
@@ -292,6 +292,7 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
||||
void accumulate_modified_oops() { if (has_modified_oops()) _accumulated_modified_oops = true; }
|
||||
void clear_accumulated_modified_oops() { _accumulated_modified_oops = false; }
|
||||
bool has_accumulated_modified_oops() { return _accumulated_modified_oops; }
|
||||
+ void exchange_holders(ClassLoaderData* cld);
|
||||
private:
|
||||
|
||||
void unload();
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.cpp b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
index e70865109dd..cc9f1fa7831 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionary.cpp
|
||||
@@ -971,12 +971,16 @@ InstanceKlass* SystemDictionary::parse_stream(Symbol* class_name,
|
||||
Handle protection_domain,
|
||||
ClassFileStream* st,
|
||||
const InstanceKlass* host_klass,
|
||||
+ InstanceKlass* old_klass,
|
||||
GrowableArray<Handle>* cp_patches,
|
||||
TRAPS) {
|
||||
|
||||
EventClassLoad class_load_start_event;
|
||||
|
||||
ClassLoaderData* loader_data;
|
||||
+
|
||||
+ bool is_redefining = (old_klass != NULL);
|
||||
+
|
||||
if (host_klass != NULL) {
|
||||
// Create a new CLD for anonymous class, that uses the same class loader
|
||||
// as the host_klass
|
||||
@@ -1000,8 +1004,12 @@ InstanceKlass* SystemDictionary::parse_stream(Symbol* class_name,
|
||||
protection_domain,
|
||||
host_klass,
|
||||
cp_patches,
|
||||
- false, // pick_newest
|
||||
+ is_redefining, // pick_newest
|
||||
CHECK_NULL);
|
||||
+ if (is_redefining && k != NULL) {
|
||||
+ k->set_redefining(true);
|
||||
+ k->set_old_version(old_klass);
|
||||
+ }
|
||||
|
||||
if (host_klass != NULL && k != NULL) {
|
||||
// Anonymous classes must update ClassLoaderData holder (was host_klass loader)
|
||||
@@ -1845,7 +1853,7 @@ void SystemDictionary::remove_from_hierarchy(InstanceKlass* k) {
|
||||
k->remove_from_sibling_list();
|
||||
}
|
||||
|
||||
-// (DCEVM)
|
||||
+// (DCEVM)
|
||||
void SystemDictionary::update_constraints_after_redefinition() {
|
||||
constraints()->update_after_redefinition();
|
||||
}
|
||||
diff --git a/src/hotspot/share/classfile/systemDictionary.hpp b/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
index 717f34ce9a0..dc111846c12 100644
|
||||
--- a/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
+++ b/src/hotspot/share/classfile/systemDictionary.hpp
|
||||
@@ -301,6 +301,7 @@ public:
|
||||
protection_domain,
|
||||
st,
|
||||
NULL, // host klass
|
||||
+ NULL, // old class
|
||||
NULL, // cp_patches
|
||||
THREAD);
|
||||
}
|
||||
@@ -309,6 +310,7 @@ public:
|
||||
Handle protection_domain,
|
||||
ClassFileStream* st,
|
||||
const InstanceKlass* host_klass,
|
||||
+ InstanceKlass* old_klass,
|
||||
GrowableArray<Handle>* cp_patches,
|
||||
TRAPS);
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 0ca675e8ee6..08fe42d5c28 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -503,6 +503,8 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
|
||||
|
||||
|
||||
+ // SystemDictionary::methods_do(fix_invoke_method);
|
||||
+
|
||||
// JSR-292 support
|
||||
if (_any_class_has_resolved_methods) {
|
||||
bool trace_name_printed = false;
|
||||
@@ -774,12 +776,34 @@ jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
|
||||
// load hook event.
|
||||
state->set_class_being_redefined(the_class, _class_load_kind);
|
||||
|
||||
- InstanceKlass* k = SystemDictionary::resolve_from_stream(the_class_sym,
|
||||
- the_class_loader,
|
||||
- protection_domain,
|
||||
- &st,
|
||||
- the_class,
|
||||
- THREAD);
|
||||
+ InstanceKlass* k;
|
||||
+
|
||||
+ if (InstanceKlass::cast(the_class)->is_anonymous()) {
|
||||
+ const InstanceKlass* host_class = the_class->host_klass();
|
||||
+
|
||||
+ // Make sure it's the real host class, not another anonymous class.
|
||||
+ while (host_class != NULL && host_class->is_anonymous()) {
|
||||
+ host_class = host_class->host_klass();
|
||||
+ }
|
||||
+
|
||||
+ k = SystemDictionary::parse_stream(the_class_sym,
|
||||
+ the_class_loader,
|
||||
+ protection_domain,
|
||||
+ &st,
|
||||
+ host_class,
|
||||
+ the_class,
|
||||
+ NULL,
|
||||
+ THREAD);
|
||||
+ k->class_loader_data()->exchange_holders(the_class->class_loader_data());
|
||||
+ the_class->class_loader_data()->inc_keep_alive();
|
||||
+ } else {
|
||||
+ k = SystemDictionary::resolve_from_stream(the_class_sym,
|
||||
+ the_class_loader,
|
||||
+ protection_domain,
|
||||
+ &st,
|
||||
+ the_class,
|
||||
+ THREAD);
|
||||
+ }
|
||||
// Clear class_being_redefined just to be sure.
|
||||
state->clear_class_being_redefined();
|
||||
|
||||
@@ -1469,6 +1493,30 @@ void VM_EnhancedRedefineClasses::MethodDataCleaner::do_klass(Klass* k) {
|
||||
}
|
||||
}
|
||||
|
||||
+void VM_EnhancedRedefineClasses::fix_invoke_method(Method* method) {
|
||||
+
|
||||
+ constantPoolHandle other_cp = constantPoolHandle(method->constants());
|
||||
+
|
||||
+ for (int i = 0; i < other_cp->length(); i++) {
|
||||
+ if (other_cp->tag_at(i).is_klass()) {
|
||||
+ Klass* klass = other_cp->resolved_klass_at(i);
|
||||
+ if (klass->new_version() != NULL) {
|
||||
+ // Constant pool entry points to redefined class -- update to the new version
|
||||
+ other_cp->klass_at_put(i, klass->newest_version());
|
||||
+ }
|
||||
+ assert(other_cp->resolved_klass_at(i)->new_version() == NULL, "Must be new klass!");
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ ConstantPoolCache* cp_cache = other_cp->cache();
|
||||
+ if (cp_cache != NULL) {
|
||||
+ cp_cache->clear_entries();
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
+
|
||||
+
|
||||
+
|
||||
void VM_EnhancedRedefineClasses::update_jmethod_ids() {
|
||||
for (int j = 0; j < _matching_methods_length; ++j) {
|
||||
Method* old_method = _matching_old_methods[j];
|
||||
@@ -2018,7 +2066,10 @@ jvmtiError VM_EnhancedRedefineClasses::find_sorted_affected_classes(TRAPS) {
|
||||
// Find classes not directly redefined, but affected by a redefinition (because one of its supertypes is redefined)
|
||||
AffectedKlassClosure closure(_affected_klasses);
|
||||
// Updated in j10, from original SystemDictionary::classes_do
|
||||
- ClassLoaderDataGraph::dictionary_classes_do(&closure);
|
||||
+
|
||||
+ ClassLoaderDataGraph::classes_do(&closure);
|
||||
+ //ClassLoaderDataGraph::dictionary_classes_do(&closure);
|
||||
+
|
||||
log_trace(redefine, class, load)("%d classes affected", _affected_klasses->length());
|
||||
|
||||
// Sort the affected klasses such that a supertype is always on a smaller array index than its subtype.
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index ed44f0e27ce..7e2afd49650 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -119,6 +119,7 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
void rollback();
|
||||
static void mark_as_scavengable(nmethod* nm);
|
||||
static void unpatch_bytecode(Method* method);
|
||||
+ static void fix_invoke_method(Method* method);
|
||||
|
||||
// Figure out which new methods match old methods in name and signature,
|
||||
// which methods have been added, and which are no longer present
|
||||
diff --git a/src/hotspot/share/prims/resolvedMethodTable.cpp b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
index af2ec48c2e1..7741328979f 100644
|
||||
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
@@ -200,7 +200,7 @@ void ResolvedMethodTable::print() {
|
||||
|
||||
void ResolvedMethodTable::adjust_method_entries(bool * trace_name_printed) {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "only called at safepoint");
|
||||
- // For each entry in RMT, change to new method
|
||||
+ // For each entry in RMT, change to new methodadjust_method_entries_dcevm
|
||||
for (int i = 0; i < _the_table->table_size(); ++i) {
|
||||
for (ResolvedMethodEntry* entry = _the_table->bucket(i);
|
||||
entry != NULL;
|
||||
@@ -271,6 +271,8 @@ void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed)
|
||||
InstanceKlass* newer_klass = InstanceKlass::cast(old_method->method_holder()->new_version());
|
||||
Method* newer_method = newer_klass->method_with_idnum(old_method->orig_method_idnum());
|
||||
|
||||
+ log_info(redefine, class, load, exceptions)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
|
||||
+
|
||||
assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
|
||||
assert(newer_method != NULL, "method_with_idnum() should not be NULL");
|
||||
assert(old_method != newer_method, "sanity check");
|
||||
diff --git a/src/hotspot/share/prims/unsafe.cpp b/src/hotspot/share/prims/unsafe.cpp
|
||||
index 2f14e01ce0d..d0e0367d8eb 100644
|
||||
--- a/src/hotspot/share/prims/unsafe.cpp
|
||||
+++ b/src/hotspot/share/prims/unsafe.cpp
|
||||
@@ -818,6 +818,7 @@ Unsafe_DefineAnonymousClass_impl(JNIEnv *env,
|
||||
host_domain,
|
||||
&st,
|
||||
InstanceKlass::cast(host_klass),
|
||||
+ NULL,
|
||||
cp_patches,
|
||||
CHECK_NULL);
|
||||
if (anonk == NULL) {
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From 3f53bb48682b17cfbf4781d4fa47055be88baea0 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Fri, 22 May 2020 21:43:22 +0200
|
||||
Subject: [PATCH 44/50] Skip GC runs for redefinitions without instance size
|
||||
change
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 08fe42d5c28..a785a43d352 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -578,14 +578,14 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
}
|
||||
}
|
||||
|
||||
-// if (objectClosure.needs_instance_update()) {
|
||||
+ if (objectClosure.needs_instance_update()) {
|
||||
// Do a full garbage collection to update the instance sizes accordingly
|
||||
Universe::set_redefining_gc_run(true);
|
||||
notify_gc_begin(true);
|
||||
Universe::heap()->collect_as_vm_thread(GCCause::_heap_inspection);
|
||||
notify_gc_end();
|
||||
Universe::set_redefining_gc_run(false);
|
||||
-// }
|
||||
+ }
|
||||
|
||||
// Unmark Klass*s as "redefining"
|
||||
for (int i = 0; i < _new_classes->length(); i++) {
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
From d0d6602fe3d664cb2322d7066bf46fa7e20d5d4e Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 23 May 2020 10:02:15 +0200
|
||||
Subject: [PATCH 45/50] Fix "no original bytecode found" error if method with
|
||||
bkp is missing
|
||||
|
||||
Sometimes IDE can deploy class with erroneous method, such method has
|
||||
no bytecode, but breakpoint position can still exist.
|
||||
---
|
||||
src/hotspot/share/interpreter/bytecodes.cpp | 2 +-
|
||||
.../share/interpreter/interpreterRuntime.cpp | 2 +-
|
||||
src/hotspot/share/oops/method.cpp | 8 ++++----
|
||||
src/hotspot/share/oops/method.hpp | 4 ++--
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 18 ++++++++++--------
|
||||
5 files changed, 18 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/interpreter/bytecodes.cpp b/src/hotspot/share/interpreter/bytecodes.cpp
|
||||
index e377e36b88c..262ecc021b2 100644
|
||||
--- a/src/hotspot/share/interpreter/bytecodes.cpp
|
||||
+++ b/src/hotspot/share/interpreter/bytecodes.cpp
|
||||
@@ -84,7 +84,7 @@ Bytecodes::Code Bytecodes::code_at(Method* method, int bci) {
|
||||
Bytecodes::Code Bytecodes::non_breakpoint_code_at(const Method* method, address bcp) {
|
||||
assert(method != NULL, "must have the method for breakpoint conversion");
|
||||
assert(method->contains(bcp), "must be valid bcp in method");
|
||||
- return method->orig_bytecode_at(method->bci_from(bcp));
|
||||
+ return method->orig_bytecode_at(method->bci_from(bcp), false);
|
||||
}
|
||||
|
||||
int Bytecodes::special_length_at(Bytecodes::Code code, address bcp, address end) {
|
||||
diff --git a/src/hotspot/share/interpreter/interpreterRuntime.cpp b/src/hotspot/share/interpreter/interpreterRuntime.cpp
|
||||
index f367e658879..71bbd15a4f5 100644
|
||||
--- a/src/hotspot/share/interpreter/interpreterRuntime.cpp
|
||||
+++ b/src/hotspot/share/interpreter/interpreterRuntime.cpp
|
||||
@@ -834,7 +834,7 @@ IRT_END
|
||||
// Invokes
|
||||
|
||||
IRT_ENTRY(Bytecodes::Code, InterpreterRuntime::get_original_bytecode_at(JavaThread* thread, Method* method, address bcp))
|
||||
- return method->orig_bytecode_at(method->bci_from(bcp));
|
||||
+ return method->orig_bytecode_at(method->bci_from(bcp), false);
|
||||
IRT_END
|
||||
|
||||
IRT_ENTRY(void, InterpreterRuntime::set_original_bytecode_at(JavaThread* thread, Method* method, address bcp, Bytecodes::Code new_code))
|
||||
diff --git a/src/hotspot/share/oops/method.cpp b/src/hotspot/share/oops/method.cpp
|
||||
index bee69f9cec6..f1e22db70d6 100644
|
||||
--- a/src/hotspot/share/oops/method.cpp
|
||||
+++ b/src/hotspot/share/oops/method.cpp
|
||||
@@ -1747,14 +1747,14 @@ bool CompressedLineNumberReadStream::read_pair() {
|
||||
|
||||
#if INCLUDE_JVMTI
|
||||
|
||||
-Bytecodes::Code Method::orig_bytecode_at(int bci) const {
|
||||
+Bytecodes::Code Method::orig_bytecode_at(int bci, bool no_fatal) const {
|
||||
BreakpointInfo* bp = method_holder()->breakpoints();
|
||||
for (; bp != NULL; bp = bp->next()) {
|
||||
if (bp->match(this, bci)) {
|
||||
return bp->orig_bytecode();
|
||||
}
|
||||
}
|
||||
- {
|
||||
+ if (!no_fatal) {
|
||||
ResourceMark rm;
|
||||
fatal("no original bytecode found in %s at bci %d", name_and_sig_as_C_string(), bci);
|
||||
}
|
||||
@@ -1900,7 +1900,7 @@ BreakpointInfo::BreakpointInfo(Method* m, int bci) {
|
||||
_signature_index = m->signature_index();
|
||||
_orig_bytecode = (Bytecodes::Code) *m->bcp_from(_bci);
|
||||
if (_orig_bytecode == Bytecodes::_breakpoint)
|
||||
- _orig_bytecode = m->orig_bytecode_at(_bci);
|
||||
+ _orig_bytecode = m->orig_bytecode_at(_bci, false);
|
||||
_next = NULL;
|
||||
}
|
||||
|
||||
@@ -1909,7 +1909,7 @@ void BreakpointInfo::set(Method* method) {
|
||||
{
|
||||
Bytecodes::Code code = (Bytecodes::Code) *method->bcp_from(_bci);
|
||||
if (code == Bytecodes::_breakpoint)
|
||||
- code = method->orig_bytecode_at(_bci);
|
||||
+ code = method->orig_bytecode_at(_bci, false);
|
||||
assert(orig_bytecode() == code, "original bytecode must be the same");
|
||||
}
|
||||
#endif
|
||||
diff --git a/src/hotspot/share/oops/method.hpp b/src/hotspot/share/oops/method.hpp
|
||||
index 4533476ff8f..193e1845b23 100644
|
||||
--- a/src/hotspot/share/oops/method.hpp
|
||||
+++ b/src/hotspot/share/oops/method.hpp
|
||||
@@ -230,7 +230,7 @@ class Method : public Metadata {
|
||||
|
||||
// JVMTI breakpoints
|
||||
#if !INCLUDE_JVMTI
|
||||
- Bytecodes::Code orig_bytecode_at(int bci) const {
|
||||
+ Bytecodes::Code orig_bytecode_at(int bci, bool no_fatal) const {
|
||||
ShouldNotReachHere();
|
||||
return Bytecodes::_shouldnotreachhere;
|
||||
}
|
||||
@@ -239,7 +239,7 @@ class Method : public Metadata {
|
||||
};
|
||||
u2 number_of_breakpoints() const {return 0;}
|
||||
#else // !INCLUDE_JVMTI
|
||||
- Bytecodes::Code orig_bytecode_at(int bci) const;
|
||||
+ Bytecodes::Code orig_bytecode_at(int bci, bool no_fatal) const;
|
||||
void set_orig_bytecode_at(int bci, Bytecodes::Code code);
|
||||
void set_breakpoint(int bci);
|
||||
void clear_breakpoint(int bci);
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index a785a43d352..2321483dcbd 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -1389,14 +1389,16 @@ void VM_EnhancedRedefineClasses::unpatch_bytecode(Method* method) {
|
||||
|
||||
if (code == Bytecodes::_breakpoint) {
|
||||
int bci = method->bci_from(bcp);
|
||||
- code = method->orig_bytecode_at(bci);
|
||||
- java_code = Bytecodes::java_code(code);
|
||||
- if (code != java_code &&
|
||||
- (java_code == Bytecodes::_getfield ||
|
||||
- java_code == Bytecodes::_putfield ||
|
||||
- java_code == Bytecodes::_aload_0)) {
|
||||
- // Let breakpoint table handling unpatch bytecode
|
||||
- method->set_orig_bytecode_at(bci, java_code);
|
||||
+ code = method->orig_bytecode_at(bci, true);
|
||||
+ if (code != Bytecodes::_shouldnotreachhere) {
|
||||
+ java_code = Bytecodes::java_code(code);
|
||||
+ if (code != java_code &&
|
||||
+ (java_code == Bytecodes::_getfield ||
|
||||
+ java_code == Bytecodes::_putfield ||
|
||||
+ java_code == Bytecodes::_aload_0)) {
|
||||
+ // Let breakpoint table handling unpatch bytecode
|
||||
+ method->set_orig_bytecode_at(bci, java_code);
|
||||
+ }
|
||||
}
|
||||
} else {
|
||||
java_code = Bytecodes::java_code(code);
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,421 @@
|
||||
From 585f1cb56766be837a34114b1ee5c743aa4e6801 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sat, 23 May 2020 10:17:56 +0200
|
||||
Subject: [PATCH 46/50] Fix comments according hotspot formatting conventions
|
||||
|
||||
---
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 191 +++++++-----------
|
||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 41 ++--
|
||||
2 files changed, 90 insertions(+), 142 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 2321483dcbd..8d00203fd9a 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -67,21 +67,19 @@ int VM_EnhancedRedefineClasses::_deleted_methods_length = 0;
|
||||
int VM_EnhancedRedefineClasses::_added_methods_length = 0;
|
||||
Klass* VM_EnhancedRedefineClasses::_the_class_oop = NULL;
|
||||
|
||||
-/**
|
||||
- * Create new instance of enhanced class redefiner.
|
||||
- *
|
||||
- * This class implements VM_GC_Operation - the usual usage should be:
|
||||
- * VM_EnhancedRedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_redefine);
|
||||
- * VMThread::execute(&op);
|
||||
- * Which
|
||||
- *
|
||||
- * @param class_count size of class_defs
|
||||
- * @param class_defs class definition - either new class or redefined class
|
||||
- * note that this is not the final array of classes to be redefined
|
||||
- * we need to scan for all affected classes (e.g. subclasses) and
|
||||
- * caculcate redefinition for them as well.
|
||||
- * @param class_load_kind always jvmti_class_load_kind_redefine
|
||||
- */
|
||||
+//
|
||||
+// Create new instance of enhanced class redefiner.
|
||||
+//
|
||||
+// This class implements VM_GC_Operation - the usual usage should be:
|
||||
+// VM_EnhancedRedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_redefine);
|
||||
+// VMThread::execute(&op);
|
||||
+// Which
|
||||
+// - class_count size of class_defs
|
||||
+// - class_defs class definition - either new class or redefined class
|
||||
+// note that this is not the final array of classes to be redefined
|
||||
+// we need to scan for all affected classes (e.g. subclasses) and
|
||||
+// caculcate redefinition for them as well.
|
||||
+// @param class_load_kind always jvmti_class_load_kind_redefine
|
||||
VM_EnhancedRedefineClasses::VM_EnhancedRedefineClasses(jint class_count, const jvmtiClassDefinition *class_defs, JvmtiClassLoadKind class_load_kind) :
|
||||
VM_GC_Operation(Universe::heap()->total_collections(), GCCause::_heap_inspection, Universe::heap()->total_full_collections(), true) {
|
||||
_affected_klasses = NULL;
|
||||
@@ -97,12 +95,10 @@ static inline InstanceKlass* get_ik(jclass def) {
|
||||
return InstanceKlass::cast(java_lang_Class::as_Klass(mirror));
|
||||
}
|
||||
|
||||
-/**
|
||||
- * Start the redefinition:
|
||||
- * - Load new class definitions - @see load_new_class_versions
|
||||
- * - Start mark&sweep GC.
|
||||
- * @return true if success, otherwise all chnages are rollbacked.
|
||||
- */
|
||||
+// Start the redefinition:
|
||||
+// - Load new class definitions - @see load_new_class_versions
|
||||
+// - Start mark&sweep GC.
|
||||
+// - true if success, otherwise all chnages are rollbacked.
|
||||
bool VM_EnhancedRedefineClasses::doit_prologue() {
|
||||
|
||||
if (_class_count == 0) {
|
||||
@@ -175,9 +171,7 @@ bool VM_EnhancedRedefineClasses::doit_prologue() {
|
||||
return true;
|
||||
}
|
||||
|
||||
-/**
|
||||
- * Closer for static fields - copy value from old class to the new class.
|
||||
- */
|
||||
+// Closer for static fields - copy value from old class to the new class.
|
||||
class FieldCopier : public FieldClosure {
|
||||
public:
|
||||
void do_field(fieldDescriptor* fd) {
|
||||
@@ -236,9 +230,7 @@ struct StoreNoBarrier {
|
||||
template <class T> static void oop_store(T* p) { RawAccess<>::oop_store(p, oop(NULL)); }
|
||||
};
|
||||
|
||||
-/**
|
||||
- Closure to scan all heap objects and update method handles
|
||||
-*/
|
||||
+// Closure to scan all heap objects and update method handles
|
||||
template <class S>
|
||||
class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
// import java_lang_invoke_MemberName.*
|
||||
@@ -247,7 +239,6 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
REFERENCE_KIND_MASK = java_lang_invoke_MemberName::MN_REFERENCE_KIND_MASK,
|
||||
};
|
||||
|
||||
-
|
||||
bool update_member_name(oop obj) {
|
||||
int flags = java_lang_invoke_MemberName::flags(obj);
|
||||
int ref_kind = (flags >> REFERENCE_KIND_SHIFT) & REFERENCE_KIND_MASK;
|
||||
@@ -382,14 +373,12 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
}
|
||||
};
|
||||
|
||||
-/**
|
||||
- * Closure to scan all objects on heap for objects of changed classes
|
||||
- * - if the fields are compatible, only update class definition reference
|
||||
- * - otherwise if the new object size is smaller then old size, reshufle
|
||||
- * the fields and fill the gap with "dead_space"
|
||||
- * - otherwise set the _needs_instance_update flag, we need to do full GC
|
||||
- * and reshuffle object positions durring mark&sweep
|
||||
- */
|
||||
+// Closure to scan all objects on heap for objects of changed classes
|
||||
+// - if the fields are compatible, only update class definition reference
|
||||
+// - otherwise if the new object size is smaller then old size, reshufle
|
||||
+// the fields and fill the gap with "dead_space"
|
||||
+// - otherwise set the _needs_instance_update flag, we need to do full GC
|
||||
+// and reshuffle object positions durring mark&sweep
|
||||
class ChangePointersObjectClosure : public ObjectClosure {
|
||||
private:
|
||||
|
||||
@@ -451,19 +440,16 @@ public:
|
||||
};
|
||||
|
||||
|
||||
-/**
|
||||
- Main transformation method - runs in VM thread.
|
||||
-
|
||||
- - UseSharedSpaces - TODO what does it mean?
|
||||
- - for each sratch class call redefine_single_class
|
||||
- - clear code cache (flush_dependent_code)
|
||||
- - iterate the heap and update object defintions, check it old/new class fields
|
||||
- are compatible. If new class size is smaller then old, it can be solved directly here.
|
||||
- - iterate the heap and update method handles to new version
|
||||
- - Swap marks to have same hashcodes
|
||||
- - copy static fields
|
||||
- - notify JVM of the modification
|
||||
-*/
|
||||
+// Main transformation method - runs in VM thread.
|
||||
+// - UseSharedSpaces - TODO what does it mean?
|
||||
+// - for each sratch class call redefine_single_class
|
||||
+// - clear code cache (flush_dependent_code)
|
||||
+// - iterate the heap and update object defintions, check it old/new class fields
|
||||
+// are compatible. If new class size is smaller then old, it can be solved directly here.
|
||||
+// - iterate the heap and update method handles to new version
|
||||
+// - Swap marks to have same hashcodes
|
||||
+// - copy static fields
|
||||
+// - notify JVM of the modification
|
||||
void VM_EnhancedRedefineClasses::doit() {
|
||||
Thread *thread = Thread::current();
|
||||
|
||||
@@ -634,11 +620,9 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
|
||||
}
|
||||
|
||||
-/**
|
||||
- * Cleanup - runs in JVM thread
|
||||
- * - free used memory
|
||||
- * - end GC
|
||||
- */
|
||||
+// Cleanup - runs in JVM thread
|
||||
+// - free used memory
|
||||
+// - end GC
|
||||
void VM_EnhancedRedefineClasses::doit_epilogue() {
|
||||
VM_GC_Operation::doit_epilogue();
|
||||
|
||||
@@ -670,11 +654,9 @@ void VM_EnhancedRedefineClasses::doit_epilogue() {
|
||||
}
|
||||
}
|
||||
|
||||
-/**
|
||||
- * Exclude java primitives and arrays from redefinition
|
||||
- * @param klass_mirror pointer to the klass
|
||||
- * @return true if is modifiable
|
||||
- */
|
||||
+// Exclude java primitives and arrays from redefinition
|
||||
+// - klass_mirror pointer to the klass
|
||||
+// - true if is modifiable
|
||||
bool VM_EnhancedRedefineClasses::is_modifiable_class(oop klass_mirror) {
|
||||
// classes for primitives cannot be redefined
|
||||
if (java_lang_Class::is_primitive(klass_mirror)) {
|
||||
@@ -693,17 +675,12 @@ bool VM_EnhancedRedefineClasses::is_modifiable_class(oop klass_mirror) {
|
||||
return true;
|
||||
}
|
||||
|
||||
-/**
|
||||
- Load and link new classes (either redefined or affected by redefinition - subclass, ...)
|
||||
-
|
||||
- - find sorted affected classes
|
||||
- - resolve new class
|
||||
- - calculate redefine flags (field change, method change, supertype change, ...)
|
||||
- - calculate modified fields and mapping to old fields
|
||||
- - link new classes
|
||||
-
|
||||
- The result is sotred in _affected_klasses(old definitions) and _new_classes(new definitions) arrays.
|
||||
-*/
|
||||
+// Load and link new classes (either redefined or affected by redefinition - subclass, ...)
|
||||
+// - find sorted affected classes
|
||||
+// - resolve new class
|
||||
+// - calculate redefine flags (field change, method change, supertype change, ...)
|
||||
+// - calculate modified fields and mapping to old fields
|
||||
+// - link new classes
|
||||
jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
|
||||
|
||||
_affected_klasses = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<Klass*>(_class_count, true);
|
||||
@@ -898,9 +875,7 @@ jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
|
||||
return JVMTI_ERROR_NONE;
|
||||
}
|
||||
|
||||
-/**
|
||||
- Calculated the difference between new and old class (field change, method change, supertype change, ...).
|
||||
-*/
|
||||
+ // Calculated the difference between new and old class (field change, method change, supertype change, ...).
|
||||
int VM_EnhancedRedefineClasses::calculate_redefinition_flags(InstanceKlass* new_class) {
|
||||
int result = Klass::NoRedefinition;
|
||||
log_info(redefine, class, load)("Comparing different class versions of class %s",new_class->name()->as_C_string());
|
||||
@@ -1183,14 +1158,11 @@ int VM_EnhancedRedefineClasses::calculate_redefinition_flags(InstanceKlass* new_
|
||||
}
|
||||
|
||||
|
||||
-/**
|
||||
- Searches for the class bytecode of the given class and returns it as a byte array.
|
||||
-
|
||||
- @param the_class definition of a class, either existing class or new_class
|
||||
- @param class_bytes - if the class is redefined, it contains new class definition, otherwise just original class bytecode.
|
||||
- @param class_byte_count - size of class_bytes
|
||||
- @param not_changed - new_class not available or same as current class
|
||||
-*/
|
||||
+// Searches for the class bytecode of the given class and returns it as a byte array.
|
||||
+// - the_class definition of a class, either existing class or new_class
|
||||
+// - class_bytes - if the class is redefined, it contains new class definition, otherwise just original class bytecode.
|
||||
+// - class_byte_count - size of class_bytes
|
||||
+// - not_changed - new_class not available or same as current class
|
||||
jvmtiError VM_EnhancedRedefineClasses::find_class_bytes(InstanceKlass* the_class, const unsigned char **class_bytes, jint *class_byte_count, jboolean *not_changed) {
|
||||
|
||||
*not_changed = false;
|
||||
@@ -1233,11 +1205,9 @@ jvmtiError VM_EnhancedRedefineClasses::find_class_bytes(InstanceKlass* the_class
|
||||
return JVMTI_ERROR_NONE;
|
||||
}
|
||||
|
||||
-/**
|
||||
- Calculate difference between non static fields of old and new class and store the info into new class:
|
||||
- instanceKlass->store_update_information
|
||||
- instanceKlass->copy_backwards
|
||||
-*/
|
||||
+// Calculate difference between non static fields of old and new class and store the info into new class:
|
||||
+// instanceKlass->store_update_information
|
||||
+// instanceKlass->copy_backwards
|
||||
void VM_EnhancedRedefineClasses::calculate_instance_update_information(Klass* new_version) {
|
||||
|
||||
class CalculateFieldUpdates : public FieldClosure {
|
||||
@@ -1348,9 +1318,7 @@ void VM_EnhancedRedefineClasses::calculate_instance_update_information(Klass* ne
|
||||
}
|
||||
}
|
||||
|
||||
-/**
|
||||
- Rollback all changes - clear new classes from the system dictionary, return old classes to directory, free memory.
|
||||
-*/
|
||||
+// Rollback all changes - clear new classes from the system dictionary, return old classes to directory, free memory.
|
||||
void VM_EnhancedRedefineClasses::rollback() {
|
||||
log_info(redefine, class, load)("Rolling back redefinition, result=%d", _res);
|
||||
ClassLoaderDataGraph::rollback_redefinition();
|
||||
@@ -1547,9 +1515,7 @@ void VM_EnhancedRedefineClasses::update_jmethod_ids() {
|
||||
}
|
||||
}
|
||||
|
||||
-/**
|
||||
- Set method as obsolete / old / deleted.
|
||||
-*/
|
||||
+// Set method as obsolete / old / deleted.
|
||||
void VM_EnhancedRedefineClasses::check_methods_and_mark_as_obsolete() {
|
||||
for (int j = 0; j < _matching_methods_length; ++j/*, ++old_index*/) {
|
||||
Method* old_method = _matching_old_methods[j];
|
||||
@@ -1771,12 +1737,9 @@ void VM_EnhancedRedefineClasses::flush_dependent_code(InstanceKlass* k_h, TRAPS)
|
||||
}
|
||||
}
|
||||
|
||||
-/**
|
||||
- Compare _old_methods and _new_methods arrays and store the result into
|
||||
- _matching_old_methods, _matching_new_methods, _added_methods, _deleted_methods
|
||||
-
|
||||
- Setup _old_methods and _new_methods before the call - it should be called for one class only!
|
||||
-*/
|
||||
+// Compare _old_methods and _new_methods arrays and store the result into
|
||||
+// _matching_old_methods, _matching_new_methods, _added_methods, _deleted_methods
|
||||
+// Setup _old_methods and _new_methods before the call - it should be called for one class only!
|
||||
void VM_EnhancedRedefineClasses::compute_added_deleted_matching_methods() {
|
||||
Method* old_method;
|
||||
Method* new_method;
|
||||
@@ -1900,7 +1863,6 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
}
|
||||
*/
|
||||
|
||||
-
|
||||
{
|
||||
ResourceMark rm(THREAD);
|
||||
// increment the classRedefinedCount field in the_class and in any
|
||||
@@ -1940,9 +1902,7 @@ void VM_EnhancedRedefineClasses::check_class(InstanceKlass* ik, TRAPS) {
|
||||
}
|
||||
}
|
||||
|
||||
-/**
|
||||
- * Logging of all methods (old, new, changed, ...)
|
||||
- */
|
||||
+// Logging of all methods (old, new, changed, ...)
|
||||
void VM_EnhancedRedefineClasses::dump_methods() {
|
||||
int j;
|
||||
log_trace(redefine, class, dump)("_old_methods --");
|
||||
@@ -2002,9 +1962,7 @@ void VM_EnhancedRedefineClasses::dump_methods() {
|
||||
}
|
||||
}
|
||||
|
||||
-/**
|
||||
- Helper class to traverse all loaded classes and figure out if the class is affected by redefinition.
|
||||
-*/
|
||||
+// Helper class to traverse all loaded classes and figure out if the class is affected by redefinition.
|
||||
class AffectedKlassClosure : public KlassClosure {
|
||||
private:
|
||||
GrowableArray<Klass*>* _affected_klasses;
|
||||
@@ -2052,10 +2010,8 @@ class AffectedKlassClosure : public KlassClosure {
|
||||
}
|
||||
};
|
||||
|
||||
-/**
|
||||
- Find all affected classes by current redefinition (either because of redefine, class hierarchy or interface change).
|
||||
- Affected classes are stored in _affected_klasses and parent classes always precedes child class.
|
||||
-*/
|
||||
+// Find all affected classes by current redefinition (either because of redefine, class hierarchy or interface change).
|
||||
+// Affected classes are stored in _affected_klasses and parent classes always precedes child class.
|
||||
jvmtiError VM_EnhancedRedefineClasses::find_sorted_affected_classes(TRAPS) {
|
||||
for (int i = 0; i < _class_count; i++) {
|
||||
InstanceKlass* klass_handle = get_ik(_class_defs[i].klass);
|
||||
@@ -2086,9 +2042,7 @@ jvmtiError VM_EnhancedRedefineClasses::find_sorted_affected_classes(TRAPS) {
|
||||
return JVMTI_ERROR_NONE;
|
||||
}
|
||||
|
||||
-/**
|
||||
- Pairs of class dependencies (for topological sort)
|
||||
-*/
|
||||
+// Pairs of class dependencies (for topological sort)
|
||||
struct KlassPair {
|
||||
const Klass* _left;
|
||||
const Klass* _right;
|
||||
@@ -2101,14 +2055,11 @@ static bool match_second(void* value, KlassPair elem) {
|
||||
return elem._right == value;
|
||||
}
|
||||
|
||||
-/**
|
||||
- For each class to be redefined parse the bytecode and figure out the superclass and all interfaces.
|
||||
- First newly introduced classes (_class_defs) are scanned and then affected classed (_affected_klasses).
|
||||
- Affected flag is cleared (clear_redefinition_flag(Klass::MarkedAsAffected))
|
||||
- For each dependency create a KlassPair instance. Finnaly, affected classes (_affected_klasses) are sorted according to pairs.
|
||||
-
|
||||
- TODO - the class file is potentionally parsed multiple times - introduce a cache?
|
||||
-*/
|
||||
+// For each class to be redefined parse the bytecode and figure out the superclass and all interfaces.
|
||||
+// First newly introduced classes (_class_defs) are scanned and then affected classed (_affected_klasses).
|
||||
+// Affected flag is cleared (clear_redefinition_flag(Klass::MarkedAsAffected))
|
||||
+// For each dependency create a KlassPair instance. Finnaly, affected classes (_affected_klasses) are sorted according to pairs.
|
||||
+// TODO - the class file is potentionally parsed multiple times - introduce a cache?
|
||||
jvmtiError VM_EnhancedRedefineClasses::do_topological_class_sorting(TRAPS) {
|
||||
ResourceMark mark(THREAD);
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index 7e2afd49650..d8a11b51fe9 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -35,17 +35,16 @@
|
||||
#include "gc/shared/vmGCOperations.hpp"
|
||||
#include "../../../java.base/unix/native/include/jni_md.h"
|
||||
|
||||
-/**
|
||||
- * Enhanced class redefiner.
|
||||
- *
|
||||
- * This class implements VM_GC_Operation - the usual usage should be:
|
||||
- * VM_EnhancedRedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_redefine);
|
||||
- * VMThread::execute(&op);
|
||||
- * Which in turn runs:
|
||||
- * - doit_prologue() - calculate all affected classes (add subclasses etc) and load new class versions
|
||||
- * - doit() - main redefition, adjust existing objects on the heap, clear caches
|
||||
- * - doit_epilogue() - cleanup
|
||||
-*/
|
||||
+//
|
||||
+// Enhanced class redefiner.
|
||||
+//
|
||||
+// This class implements VM_GC_Operation - the usual usage should be:
|
||||
+// VM_EnhancedRedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_redefine);
|
||||
+// VMThread::execute(&op);
|
||||
+// Which in turn runs:
|
||||
+// - doit_prologue() - calculate all affected classes (add subclasses etc) and load new class versions
|
||||
+// - doit() - main redefition, adjust existing objects on the heap, clear caches
|
||||
+// - doit_epilogue() - cleanup
|
||||
class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
private:
|
||||
// These static fields are needed by ClassLoaderDataGraph::classes_do()
|
||||
@@ -93,17 +92,15 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
|
||||
// These routines are roughly in call order unless otherwise noted.
|
||||
|
||||
- /**
|
||||
- Load and link new classes (either redefined or affected by redefinition - subclass, ...)
|
||||
-
|
||||
- - find sorted affected classes
|
||||
- - resolve new class
|
||||
- - calculate redefine flags (field change, method change, supertype change, ...)
|
||||
- - calculate modified fields and mapping to old fields
|
||||
- - link new classes
|
||||
-
|
||||
- The result is sotred in _affected_klasses(old definitions) and _new_classes(new definitions) arrays.
|
||||
- */
|
||||
+ // Load and link new classes (either redefined or affected by redefinition - subclass, ...)
|
||||
+ //
|
||||
+ // - find sorted affected classes
|
||||
+ // - resolve new class
|
||||
+ // - calculate redefine flags (field change, method change, supertype change, ...)
|
||||
+ // - calculate modified fields and mapping to old fields
|
||||
+ // - link new classes
|
||||
+ //
|
||||
+ // The result is sotred in _affected_klasses(old definitions) and _new_classes(new definitions) arrays.
|
||||
jvmtiError load_new_class_versions(TRAPS);
|
||||
|
||||
// Searches for all affected classes and performs a sorting such tha
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
From 79c80c48da4d52f4616f1c6ef37e838d29be9be1 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 24 May 2020 12:07:09 +0200
|
||||
Subject: [PATCH 47/50] Review threads, cleanup
|
||||
|
||||
---
|
||||
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 9 ++++-----
|
||||
1 file changed, 4 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 8d00203fd9a..1fbba406087 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -253,7 +253,7 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
// Note: we might set NULL at this point, which should force AbstractMethodError at runtime
|
||||
Thread *thread = Thread::current();
|
||||
CallInfo info(new_method, newest, thread);
|
||||
- Handle objHandle(thread, obj); // TODO : review thread
|
||||
+ Handle objHandle(thread, obj);
|
||||
MethodHandles::init_method_MemberName(objHandle, info);
|
||||
} else {
|
||||
java_lang_invoke_MemberName::set_method(obj, NULL);
|
||||
@@ -280,7 +280,7 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
||||
InstanceKlass* ik_new = InstanceKlass::cast(k->newest_version());
|
||||
fieldDescriptor fd_new;
|
||||
if (ik_new->find_local_field(fd.name(), fd.signature(), &fd_new)) {
|
||||
- Handle objHandle(Thread::current(), obj); // TODO : review thread
|
||||
+ Handle objHandle(Thread::current(), obj);
|
||||
MethodHandles::init_field_MemberName(objHandle, fd_new, MethodHandles::ref_kind_is_setter(ref_kind));
|
||||
} else {
|
||||
// Matching field is not found in new version, not much we can do here.
|
||||
@@ -441,10 +441,9 @@ public:
|
||||
|
||||
|
||||
// Main transformation method - runs in VM thread.
|
||||
-// - UseSharedSpaces - TODO what does it mean?
|
||||
-// - for each sratch class call redefine_single_class
|
||||
+// - for each scratch class call redefine_single_class
|
||||
// - clear code cache (flush_dependent_code)
|
||||
-// - iterate the heap and update object defintions, check it old/new class fields
|
||||
+// - iterate the heap and update object definitions, check it old/new class fields
|
||||
// are compatible. If new class size is smaller then old, it can be solved directly here.
|
||||
// - iterate the heap and update method handles to new version
|
||||
// - Swap marks to have same hashcodes
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
From 8b79e673a3a9d12c97b8b7dd2f4d79c2d4cdd1d6 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 24 May 2020 12:07:42 +0200
|
||||
Subject: [PATCH 48/50] Replace deleted method with
|
||||
Universe::throw_no_such_method_error
|
||||
|
||||
---
|
||||
.../share/prims/resolvedMethodTable.cpp | 28 +++++++++----------
|
||||
1 file changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/prims/resolvedMethodTable.cpp b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
index 7741328979f..06581643c3b 100644
|
||||
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
|
||||
@@ -261,25 +261,25 @@ void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed)
|
||||
|
||||
if (old_method->is_old()) {
|
||||
|
||||
+ InstanceKlass* newer_klass = InstanceKlass::cast(old_method->method_holder()->new_version());
|
||||
+ Method* newer_method;
|
||||
+
|
||||
// Method* new_method;
|
||||
if (old_method->is_deleted()) {
|
||||
- // FIXME:(DCEVM) - check if exception can be thrown
|
||||
- // new_method = Universe::throw_no_such_method_error();
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- InstanceKlass* newer_klass = InstanceKlass::cast(old_method->method_holder()->new_version());
|
||||
- Method* newer_method = newer_klass->method_with_idnum(old_method->orig_method_idnum());
|
||||
+ newer_method = Universe::throw_no_such_method_error();
|
||||
+ } else {
|
||||
+ newer_method = newer_klass->method_with_idnum(old_method->orig_method_idnum());
|
||||
|
||||
- log_info(redefine, class, load, exceptions)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
|
||||
+ log_info(redefine, class, load, exceptions)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
|
||||
|
||||
- assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
|
||||
- assert(newer_method != NULL, "method_with_idnum() should not be NULL");
|
||||
- assert(old_method != newer_method, "sanity check");
|
||||
+ assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
|
||||
+ assert(newer_method != NULL, "method_with_idnum() should not be NULL");
|
||||
+ assert(old_method != newer_method, "sanity check");
|
||||
|
||||
- if (_the_table->lookup(newer_method) != NULL) {
|
||||
- // old method was already adjusted if new method exists in _the_table
|
||||
- continue;
|
||||
+ if (_the_table->lookup(newer_method) != NULL) {
|
||||
+ // old method was already adjusted if new method exists in _the_table
|
||||
+ continue;
|
||||
+ }
|
||||
}
|
||||
|
||||
java_lang_invoke_ResolvedMethodName::set_vmtarget(mem_name, newer_method);
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
1148
jb/project/tools/patches/dcevm/0049-Support-for-G1-gc.patch
Normal file
1148
jb/project/tools/patches/dcevm/0049-Support-for-G1-gc.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,214 @@
|
||||
From 55e30de9a54b2f3bec995a2df42fe14b09d16f06 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Dvorak <lada.dvorak7@gmail.com>
|
||||
Date: Sun, 21 Jun 2020 13:38:45 +0200
|
||||
Subject: [PATCH 50/50] G1 Heap parallel iterate method "object_par_iterate" +
|
||||
dcevm timers
|
||||
|
||||
G1 Heap does not have parallel iterate method, that is usefull in dcevm
|
||||
iterate phase. According performance tests the parallel iteration is up
|
||||
~25% faster then serial iteration, ratio depends on the size of heap.
|
||||
Dcevm's timers did not make sense. Now, there are timers fo prologue,
|
||||
doit, gc itarate and full gc phases. Iterate+fullgc time make up most
|
||||
the total doit time.
|
||||
---
|
||||
src/hotspot/share/gc/g1/g1CollectedHeap.cpp | 20 ++++++++
|
||||
src/hotspot/share/gc/g1/g1CollectedHeap.hpp | 2 +
|
||||
.../prims/jvmtiEnhancedRedefineClasses.cpp | 46 +++++++++++++------
|
||||
.../prims/jvmtiEnhancedRedefineClasses.hpp | 5 +-
|
||||
4 files changed, 58 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp
|
||||
index dea8d9fdb0e..33664a30519 100644
|
||||
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp
|
||||
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp
|
||||
@@ -2108,6 +2108,21 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
+class G1IterateObjectClosureTask : public AbstractGangTask {
|
||||
+ private:
|
||||
+ ObjectClosure* _cl;
|
||||
+ G1CollectedHeap* _g1h;
|
||||
+ HeapRegionClaimer _hrclaimer;
|
||||
+ public:
|
||||
+ G1IterateObjectClosureTask(ObjectClosure* cl, G1CollectedHeap* g1h) : AbstractGangTask("IterateObject Closure"),
|
||||
+ _cl(cl), _g1h(g1h), _hrclaimer(g1h->workers()->active_workers()) { }
|
||||
+
|
||||
+ virtual void work(uint worker_id) {
|
||||
+ IterateObjectClosureRegionClosure blk(_cl);
|
||||
+ _g1h->heap_region_par_iterate_from_worker_offset(&blk, &_hrclaimer, worker_id);
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
void G1CollectedHeap::object_iterate(ObjectClosure* cl) {
|
||||
IterateObjectClosureRegionClosure blk(cl);
|
||||
heap_region_iterate(&blk);
|
||||
@@ -2117,6 +2132,11 @@ void G1CollectedHeap::heap_region_iterate(HeapRegionClosure* cl) const {
|
||||
_hrm.iterate(cl);
|
||||
}
|
||||
|
||||
+void G1CollectedHeap::object_par_iterate(ObjectClosure* cl) {
|
||||
+ G1IterateObjectClosureTask iocl_task(cl, this);
|
||||
+ workers()->run_task(&iocl_task);
|
||||
+}
|
||||
+
|
||||
void G1CollectedHeap::heap_region_par_iterate_from_worker_offset(HeapRegionClosure* cl,
|
||||
HeapRegionClaimer *hrclaimer,
|
||||
uint worker_id) const {
|
||||
diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp
|
||||
index 0735eef0da8..05a068bb2e0 100644
|
||||
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp
|
||||
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp
|
||||
@@ -1117,6 +1117,8 @@ public:
|
||||
|
||||
// Iteration functions.
|
||||
|
||||
+ void object_par_iterate(ObjectClosure* cl);
|
||||
+
|
||||
// Iterate over all objects, calling "cl.do_object" on each.
|
||||
virtual void object_iterate(ObjectClosure* cl);
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
index 32929b3d7a0..5be9bb74305 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
|
||||
@@ -54,6 +54,7 @@
|
||||
#include "utilities/events.hpp"
|
||||
#include "oops/constantPool.inline.hpp"
|
||||
#include "gc/cms/cmsHeap.hpp"
|
||||
+#include "gc/g1/g1CollectedHeap.hpp"
|
||||
#include "gc/shared/dcevmSharedGC.hpp"
|
||||
|
||||
Array<Method*>* VM_EnhancedRedefineClasses::_old_methods = NULL;
|
||||
@@ -459,6 +460,10 @@ public:
|
||||
void VM_EnhancedRedefineClasses::doit() {
|
||||
Thread *thread = Thread::current();
|
||||
|
||||
+ if (log_is_enabled(Info, redefine, class, timer)) {
|
||||
+ _timer_vm_op_doit.start();
|
||||
+ }
|
||||
+
|
||||
#if INCLUDE_CDS
|
||||
if (UseSharedSpaces) {
|
||||
// Sharing is enabled so we remap the shared readonly space to
|
||||
@@ -523,8 +528,22 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
}
|
||||
|
||||
Universe::heap()->ensure_parsability(false);
|
||||
- Universe::heap()->object_iterate(&objectClosure);
|
||||
+ if (UseG1GC) {
|
||||
+ if (log_is_enabled(Info, redefine, class, timer)) {
|
||||
+ _timer_heap_iterate.start();
|
||||
+ }
|
||||
+ G1CollectedHeap::heap()->object_par_iterate(&objectClosure);
|
||||
+ _timer_heap_iterate.stop();
|
||||
+ } else {
|
||||
+ if (log_is_enabled(Info, redefine, class, timer)) {
|
||||
+ _timer_heap_iterate.start();
|
||||
+ }
|
||||
+ Universe::heap()->object_iterate(&objectClosure);
|
||||
+ _timer_heap_iterate.stop();
|
||||
+ }
|
||||
+
|
||||
Universe::root_oops_do(&oopClosureNoBarrier);
|
||||
+
|
||||
}
|
||||
log_trace(redefine, class, obsolete, metadata)("After updating instances");
|
||||
|
||||
@@ -577,12 +596,19 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
|
||||
if (objectClosure.needs_instance_update()) {
|
||||
// Do a full garbage collection to update the instance sizes accordingly
|
||||
+
|
||||
+ if (log_is_enabled(Info, redefine, class, timer)) {
|
||||
+ _timer_heap_full_gc.start();
|
||||
+ }
|
||||
+
|
||||
Universe::set_redefining_gc_run(true);
|
||||
notify_gc_begin(true);
|
||||
// TODO: check _metadata_GC_clear_soft_refs with ScavengeRootsInCode
|
||||
Universe::heap()->collect_as_vm_thread(GCCause::_heap_inspection);
|
||||
notify_gc_end();
|
||||
Universe::set_redefining_gc_run(false);
|
||||
+
|
||||
+ _timer_heap_full_gc.stop();
|
||||
}
|
||||
|
||||
// Unmark Klass*s as "redefining"
|
||||
@@ -630,6 +656,7 @@ void VM_EnhancedRedefineClasses::doit() {
|
||||
}
|
||||
#endif
|
||||
|
||||
+ _timer_vm_op_doit.stop();
|
||||
}
|
||||
|
||||
// Cleanup - runs in JVM thread
|
||||
@@ -653,16 +680,14 @@ void VM_EnhancedRedefineClasses::doit_epilogue() {
|
||||
if (log_is_enabled(Info, redefine, class, timer)) {
|
||||
// Used to have separate timers for "doit" and "all", but the timer
|
||||
// overhead skewed the measurements.
|
||||
- jlong doit_time = _timer_rsc_phase1.milliseconds() +
|
||||
- _timer_rsc_phase2.milliseconds();
|
||||
- jlong all_time = _timer_vm_op_prologue.milliseconds() + doit_time;
|
||||
+ jlong all_time = _timer_vm_op_prologue.milliseconds() + _timer_vm_op_doit.milliseconds();
|
||||
|
||||
log_info(redefine, class, timer)
|
||||
("vm_op: all=" JLONG_FORMAT " prologue=" JLONG_FORMAT " doit=" JLONG_FORMAT,
|
||||
- all_time, _timer_vm_op_prologue.milliseconds(), doit_time);
|
||||
+ all_time, _timer_vm_op_prologue.milliseconds(), _timer_vm_op_doit.milliseconds());
|
||||
log_info(redefine, class, timer)
|
||||
- ("redefine_single_class: phase1=" JLONG_FORMAT " phase2=" JLONG_FORMAT,
|
||||
- _timer_rsc_phase1.milliseconds(), _timer_rsc_phase2.milliseconds());
|
||||
+ ("doit: heap iterate=" JLONG_FORMAT " fullgc=" JLONG_FORMAT,
|
||||
+ _timer_heap_iterate.milliseconds(), _timer_heap_full_gc.milliseconds());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1411,7 +1436,7 @@ void VM_EnhancedRedefineClasses::unpatch_bytecode(Method* method) {
|
||||
// arrayKlassOops. See Open Issues in jvmtiRedefineClasses.hpp.
|
||||
void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
|
||||
if (!k->is_instance_klass()) {
|
||||
- return;
|
||||
+ return;
|
||||
}
|
||||
|
||||
HandleMark hm(_thread);
|
||||
@@ -1829,10 +1854,6 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
|
||||
HandleMark hm(THREAD); // make sure handles from this call are freed
|
||||
|
||||
- if (log_is_enabled(Info, redefine, class, timer)) {
|
||||
- _timer_rsc_phase1.start();
|
||||
- }
|
||||
-
|
||||
InstanceKlass* new_class = new_class_oop;
|
||||
InstanceKlass* the_class = InstanceKlass::cast(new_class_oop->old_version());
|
||||
assert(the_class != NULL, "must have old version");
|
||||
@@ -1887,7 +1908,6 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
|
||||
new_class->external_name(),
|
||||
java_lang_Class::classRedefinedCount(new_class->java_mirror()));
|
||||
}
|
||||
- _timer_rsc_phase2.stop();
|
||||
} // end redefine_single_class()
|
||||
|
||||
|
||||
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
index 030852b160a..9755944d70b 100644
|
||||
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
|
||||
@@ -86,9 +86,10 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
|
||||
// Performance measurement support. These timers do not cover all
|
||||
// the work done for JVM/TI RedefineClasses() but they do cover
|
||||
// the heavy lifting.
|
||||
- elapsedTimer _timer_rsc_phase1;
|
||||
- elapsedTimer _timer_rsc_phase2;
|
||||
+ elapsedTimer _timer_vm_op_doit;
|
||||
elapsedTimer _timer_vm_op_prologue;
|
||||
+ elapsedTimer _timer_heap_iterate;
|
||||
+ elapsedTimer _timer_heap_full_gc;
|
||||
|
||||
// These routines are roughly in call order unless otherwise noted.
|
||||
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
33
jb/project/tools/patches/exclude_jcef_module.patch
Normal file
33
jb/project/tools/patches/exclude_jcef_module.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
Index: src/java.desktop/share/classes/module-info.java
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- src/java.desktop/share/classes/module-info.java (revision 5ae6630e3ebc71beb9f9df63b1b5bc19c9405d1f)
|
||||
+++ src/java.desktop/share/classes/module-info.java (date 1588168285537)
|
||||
@@ -109,10 +109,7 @@
|
||||
// see make/GensrcModuleInfo.gmk
|
||||
exports sun.awt to
|
||||
jdk.accessibility,
|
||||
- jdk.unsupported.desktop,
|
||||
- jcef;
|
||||
-
|
||||
- exports java.awt.peer to jcef;
|
||||
+ jdk.unsupported.desktop;
|
||||
|
||||
exports java.awt.dnd.peer to jdk.unsupported.desktop;
|
||||
exports sun.awt.dnd to jdk.unsupported.desktop;
|
||||
Index: modules.list
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- modules.list (revision 5ae6630e3ebc71beb9f9df63b1b5bc19c9405d1f)
|
||||
+++ modules.list (date 1588168285505)
|
||||
@@ -61,5 +61,4 @@
|
||||
jdk.unsupported,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs,
|
||||
-jdk.hotspot.agent,
|
||||
-jcef
|
||||
+jdk.hotspot.agent
|
||||
21
jb/project/tools/patches/exclude_jfx_module.patch
Normal file
21
jb/project/tools/patches/exclude_jfx_module.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
Index: modules.list
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
--- modules.list (revision ab073976c4f85f154ff1421b7ac888eee86b6595)
|
||||
+++ modules.list (date 1588171510146)
|
||||
@@ -20,13 +20,6 @@
|
||||
java.transaction.xa,
|
||||
java.xml,
|
||||
java.xml.crypto,
|
||||
-javafx.base,
|
||||
-javafx.controls,
|
||||
-javafx.fxml,
|
||||
-javafx.graphics,
|
||||
-javafx.media,
|
||||
-javafx.swing,
|
||||
-javafx.web,
|
||||
jdk.accessibility,
|
||||
jdk.aot,
|
||||
jdk.attach,
|
||||
10
jb/project/tools/windows/scripts/mkbundles_x64.sh
Executable file
10
jb/project/tools/windows/scripts/mkbundles_x64.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
script_dir=jb/project/tools/windows/scripts
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jcef" || exit $?
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx" || exit $?
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "dcevm" || exit $?
|
||||
${script_dir}/mkimages_x64.sh $JBSDK_VERSION $JDK_BUILD_NUMBER $build_number "jfx_jcef" || exit $?
|
||||
122
jb/project/tools/windows/scripts/mkimages_x64.sh
Executable file
122
jb/project/tools/windows/scripts/mkimages_x64.sh
Executable file
@@ -0,0 +1,122 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
|
||||
# By default imported modules should be located in ./jcef_win_x64
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=${WORK_DIR}/modular-sdk}"
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_win_x64}
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
function create_jbr {
|
||||
|
||||
case "$1" in
|
||||
"${bundle_type}_lw")
|
||||
grep -v "jdk.compiler\|jdk.hotspot.agent" modules.list > modules_tmp.list
|
||||
;;
|
||||
"jfx" | "jcef" | "jfx_jcef" | "dcevm" | "nomod")
|
||||
cat modules.list > modules_tmp.list
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && exit 1
|
||||
;;
|
||||
esac
|
||||
rm -rf ${JBR_BUNDLE}
|
||||
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output ${JBR_BUNDLE} || exit $?
|
||||
if [[ "${bundle_type}" == *jcef* ]] || [[ "${bundle_type}" == *dcevm* ]]
|
||||
then
|
||||
cp -R ${JCEF_PATH}/* ${JBR_BUNDLE}/bin
|
||||
fi
|
||||
echo Modifying release info ...
|
||||
cat ${JSDK}/release | tr -d '\r' | grep -v 'JAVA_VERSION' | grep -v 'MODULES' >> ${JBR_BUNDLE}/release
|
||||
}
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WORK_DIR=$(pwd)
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=windows-x86_64-normal-server-release
|
||||
git checkout -- modules.list src/java.desktop/share/classes/module-info.java
|
||||
case "$bundle_type" in
|
||||
"jfx")
|
||||
echo "Excluding jcef modules"
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
|
||||
;;
|
||||
"jcef")
|
||||
echo "Excluding jfx modules"
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
|
||||
;;
|
||||
"dcevm")
|
||||
echo "Adding dcevm patches"
|
||||
git am jb/project/tools/patches/dcevm/*.patch
|
||||
;;
|
||||
"nomod")
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch
|
||||
git apply -p0 < jb/project/tools/patches/exclude_jfx_module.patch
|
||||
WITH_IMPORT_MODULES=""
|
||||
;;
|
||||
esac
|
||||
|
||||
PATH="/usr/local/bin:/usr/bin:${PATH}"
|
||||
./configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-target-bits=64 \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--with-toolchain-version=2015 \
|
||||
--with-boot-jdk=${BOOT_JDK} \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes || exit 1
|
||||
|
||||
if [ "$bundle_type" == "jfx_jcef" ]; then
|
||||
make LOG=info clean images CONF=$RELEASE_NAME test-image || exit 1
|
||||
else
|
||||
make LOG=info clean images CONF=$RELEASE_NAME || exit 1
|
||||
fi
|
||||
|
||||
JSDK=build/$RELEASE_NAME/images/jdk
|
||||
if [[ "$bundle_type" == *jcef* ]]; then
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-b${build_number}
|
||||
fi
|
||||
BASE_DIR=build/$RELEASE_NAME/images
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || exit 1
|
||||
cp -R ${JCEF_PATH}/* ${JBRSDK_BUNDLE}/bin
|
||||
sed 's/JBR/JBRSDK/g' ${JSDK}/release > release
|
||||
mv release ${JBRSDK_BUNDLE}/release
|
||||
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
create_jbr ${bundle_type}
|
||||
76
jb/project/tools/windows/scripts/mkimages_x64_fd.sh
Executable file
76
jb/project/tools/windows/scripts/mkimages_x64_fd.sh
Executable file
@@ -0,0 +1,76 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
# Environment variables:
|
||||
# MODULAR_SDK_PATH - specifies the path to the directory where imported modules are located.
|
||||
# By default imported modules should be located in ./modular-sdk
|
||||
# JCEF_PATH - specifies the path to the directory where JCEF binaries are located.
|
||||
# By default imported modules should be located in ./jcef_win_x64
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
WITH_IMPORT_MODULES="--with-import-modules=${MODULAR_SDK_PATH:=${WORK_DIR}/modular-sdk}"
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_win_x64}
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WORK_DIR=$(pwd)
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=windows-x86_64-normal-server-fastdebug
|
||||
PATH="/usr/local/bin:/usr/bin:${PATH}"
|
||||
./configure \
|
||||
--disable-warnings-as-errors \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-target-bits=64 \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-version-pre= \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
$WITH_IMPORT_MODULES \
|
||||
--with-toolchain-version=2015 \
|
||||
--with-boot-jdk=${BOOT_JDK} \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes || exit 1
|
||||
|
||||
make LOG=info clean images CONF=$RELEASE_NAME || exit 1
|
||||
|
||||
JSDK=build/$RELEASE_NAME/images/jdk
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-b${build_number}
|
||||
BASE_DIR=build/$RELEASE_NAME/images
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || exit 1
|
||||
cp -R ${JCEF_PATH}/* ${JBRSDK_BUNDLE}/bin
|
||||
sed 's/JBR/JBRSDK/g' ${JSDK}/release > release
|
||||
mv release ${JBRSDK_BUNDLE}/release
|
||||
|
||||
JBR_BUNDLE=jbr
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
rm -rf ${JBR_BUNDLE}
|
||||
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules.list | sed s/" "//g) --output ${JBR_BUNDLE} || exit $?
|
||||
cp -R ${JCEF_PATH}/* ${JBR_BUNDLE}/bin
|
||||
echo Modifying release info ...
|
||||
cat ${JSDK}/release | tr -d '\r' | grep -v 'JAVA_VERSION' | grep -v 'MODULES' >> ${JBR_BUNDLE}/release
|
||||
65
jb/project/tools/windows/scripts/mkimages_x86.sh
Executable file
65
jb/project/tools/windows/scripts/mkimages_x86.sh
Executable file
@@ -0,0 +1,65 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
|
||||
|
||||
source jb/project/tools/common.sh
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
||||
WORK_DIR=$(pwd)
|
||||
|
||||
PATH="/usr/local/bin:/usr/bin:${PATH}"
|
||||
./configure \
|
||||
--disable-warnings-as-errors \
|
||||
--disable-debug-symbols \
|
||||
--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=2015 \
|
||||
--with-boot-jdk=${BOOT_JDK} \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes || exit 1
|
||||
make clean CONF=windows-x86-normal-server-release || exit 1
|
||||
make LOG=info images CONF=windows-x86-normal-server-release test-image || exit 1
|
||||
|
||||
JBSDK=${JBRSDK_BASE_NAME}-windows-x86-b${build_number}
|
||||
BASE_DIR=build/windows-x86-normal-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
|
||||
74
jb/project/tools/windows/scripts/pack_x64.sh
Executable file
74
jb/project/tools/windows/scripts/pack_x64.sh
Executable file
@@ -0,0 +1,74 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
bundle_type=$4
|
||||
|
||||
function pack_jbr {
|
||||
|
||||
case "$1" in
|
||||
"${bundle_type}_lw")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}_lw-${JBSDK_VERSION}
|
||||
;;
|
||||
"jfx" | "jcef" | "dcevm" | "nomod")
|
||||
JBR_BASE_NAME=jbr_${bundle_type}-${JBSDK_VERSION}
|
||||
;;
|
||||
"jfx_jcef")
|
||||
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
|
||||
;;
|
||||
*)
|
||||
echo "***ERR*** bundle was not specified" && exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
JBR=$JBR_BASE_NAME-windows-x64-b$build_number
|
||||
echo Creating $JBR.tar.gz ...
|
||||
rm -rf ${BASE_DIR}/jbr
|
||||
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
|
||||
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR jbr || exit 1
|
||||
#rm -rf ${BASE_DIR}/${JBR_BUNDLE}
|
||||
}
|
||||
|
||||
RELEASE_NAME=windows-x86_64-normal-server-release
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JBSDK=$JBRSDK_BASE_NAME-windows-x64-b$build_number
|
||||
BASE_DIR=.
|
||||
|
||||
if [ "$bundle_type" == "jfx_jcef" ]; then
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || exit 1
|
||||
fi
|
||||
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
pack_jbr $bundle_type
|
||||
|
||||
if [ "$bundle_type" == "jfx_jcef" ]; then
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-windows-test-x64-b$build_number
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || exit 1
|
||||
fi
|
||||
44
jb/project/tools/windows/scripts/pack_x64_fd.sh
Executable file
44
jb/project/tools/windows/scripts/pack_x64_fd.sh
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
JBSDK_VERSION=$1
|
||||
JDK_BUILD_NUMBER=$2
|
||||
build_number=$3
|
||||
|
||||
RELEASE_NAME=windows-x86_64-normal-server-fastdebug
|
||||
|
||||
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JBSDK=$JBRSDK_BASE_NAME-windows-x64-fastdebug-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-x64-fastdebug-b$build_number
|
||||
echo Creating $JBR.tar.gz ...
|
||||
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
|
||||
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR jbr || exit 1
|
||||
45
jb/project/tools/windows/scripts/pack_x86.sh
Executable file
45
jb/project/tools/windows/scripts/pack_x86.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
|
||||
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to bu built; possible values:
|
||||
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
|
||||
# jfx - the bundle 1) jbr with javafx only will be created
|
||||
#
|
||||
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
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-normal-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
|
||||
246
make/Bundles.gmk
246
make/Bundles.gmk
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -50,6 +50,7 @@ $(eval $(call IncludeCustomExtension, Bundles-pre.gmk))
|
||||
# files or directories may contain spaces.
|
||||
# BASE_DIRS : Base directories for the root dir in the bundle.
|
||||
# SUBDIR : Optional name of root dir in bundle.
|
||||
# OUTPUTDIR : Optionally override output dir
|
||||
SetupBundleFile = $(NamedParamsMacroTemplate)
|
||||
define SetupBundleFileBody
|
||||
|
||||
@@ -70,8 +71,11 @@ define SetupBundleFileBody
|
||||
|
||||
$$(call SetIfEmpty, $1_UNZIP_DEBUGINFO, false)
|
||||
|
||||
$(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME): $$($1_FILES)
|
||||
# If any of the files contain a space in the file name, CacheFind
|
||||
$$(call SetIfEmpty, $1_OUTPUTDIR, $$(BUNDLES_OUTPUTDIR))
|
||||
|
||||
$$($1_OUTPUTDIR)/$$($1_BUNDLE_NAME): $$($1_FILES)
|
||||
$$(call LogWarn, Creating $$($1_BUNDLE_NAME))
|
||||
# If any of the files contain a space in the file name, FindFiles
|
||||
# will have replaced it with ?. Tar does not accept that so need to
|
||||
# switch it back.
|
||||
$$(foreach d, $$($1_BASE_DIRS), \
|
||||
@@ -121,6 +125,13 @@ define SetupBundleFileBody
|
||||
&& $(TAR) cf - -$(TAR_INCLUDE_PARAM) $$($1_$$d_LIST_FILE) \
|
||||
$(TAR_IGNORE_EXIT_VALUE) ) \
|
||||
| ( $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) && $(TAR) xf - )$$(NEWLINE) )
|
||||
# Rename stripped pdb files
|
||||
ifeq ($(OPENJDK_TARGET_OS)+$(SHIP_DEBUG_SYMBOLS), windows+public)
|
||||
for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.stripped.pdb"`; do \
|
||||
$(ECHO) Renaming $$$${f} to $$$${f%stripped.pdb}pdb $(LOG_INFO); \
|
||||
$(MV) $$$${f} $$$${f%stripped.pdb}pdb; \
|
||||
done
|
||||
endif
|
||||
# Unzip any zipped debuginfo files
|
||||
ifeq ($$($1_UNZIP_DEBUGINFO), true)
|
||||
for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.diz"`; do \
|
||||
@@ -137,7 +148,7 @@ define SetupBundleFileBody
|
||||
endif
|
||||
endif
|
||||
|
||||
$1 += $(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME)
|
||||
$1 += $$($1_OUTPUTDIR)/$$($1_BUNDLE_NAME)
|
||||
|
||||
endef
|
||||
|
||||
@@ -152,6 +163,12 @@ ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
|
||||
JRE_IMAGE_HOMEDIR := $(JRE_MACOSX_CONTENTS_DIR)/Home
|
||||
JDK_BUNDLE_SUBDIR :=
|
||||
JRE_BUNDLE_SUBDIR :=
|
||||
# In certain situations, the JDK_IMAGE_DIR points to an image without the
|
||||
# the symbols and demos. If so, the symobls and demos can be found in a
|
||||
# separate image. These variables allow for overriding from a custom makefile.
|
||||
JDK_SYMBOLS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
|
||||
JDK_DEMOS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
|
||||
JDK_DEMOS_IMAGE_HOMEDIR ?= $(JDK_DEMOS_IMAGE_DIR)/$(JDK_MACOSX_CONTENTS_SUBDIR)/Home
|
||||
else
|
||||
JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR)
|
||||
JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR)
|
||||
@@ -161,23 +178,56 @@ else
|
||||
JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
|
||||
JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
|
||||
endif
|
||||
# In certain situations, the JDK_IMAGE_DIR points to an image without the
|
||||
# the symbols and demos. If so, the symobls and demos can be found in a
|
||||
# separate image. These variables allow for overriding from a custom makefile.
|
||||
JDK_SYMBOLS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
|
||||
JDK_DEMOS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
|
||||
JDK_DEMOS_IMAGE_HOMEDIR ?= $(JDK_DEMOS_IMAGE_DIR)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
ifneq ($(filter product-bundles legacy-bundles, $(MAKECMDGOALS)), )
|
||||
$(eval $(call FillCacheFind, $(IMAGES_OUTPUTDIR)))
|
||||
ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
|
||||
SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.pdb %.map
|
||||
SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.map
|
||||
|
||||
ALL_JDK_FILES := $(call CacheFind, $(JDK_IMAGE_DIR))
|
||||
# There may be files with spaces in the names, so use ShellFindFiles
|
||||
# explicitly.
|
||||
ALL_JDK_FILES := $(call ShellFindFiles, $(JDK_IMAGE_DIR))
|
||||
ifneq ($(JDK_IMAGE_DIR), $(JDK_SYMBOLS_IMAGE_DIR))
|
||||
ALL_JDK_SYMBOLS_FILES := $(call ShellFindFiles, $(JDK_SYMBOLS_IMAGE_DIR))
|
||||
else
|
||||
ALL_JDK_SYMBOLS_FILES := $(ALL_JDK_FILES)
|
||||
endif
|
||||
ifneq ($(JDK_IMAGE_DIR), $(JDK_DEMOS_IMAGE_DIR))
|
||||
ALL_JDK_DEMOS_FILES := $(call ShellFindFiles, $(JDK_DEMOS_IMAGE_DIR))
|
||||
else
|
||||
ALL_JDK_DEMOS_FILES := $(ALL_JDK_FILES)
|
||||
endif
|
||||
|
||||
# Create special filter rules when dealing with unzipped .dSYM directories on
|
||||
# macosx
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
|
||||
JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
|
||||
$(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, $(ALL_JDK_FILES))))
|
||||
$(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, \
|
||||
$(ALL_JDK_SYMBOLS_FILES))))
|
||||
endif
|
||||
endif
|
||||
|
||||
# Create special filter rules when dealing with debug symbols on windows
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), )
|
||||
JDK_SYMBOLS_EXCLUDE_PATTERN := %.pdb
|
||||
else
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), public)
|
||||
JDK_SYMBOLS_EXCLUDE_PATTERN := \
|
||||
$(filter-out \
|
||||
%.stripped.pdb, \
|
||||
$(filter %.pdb, $(ALL_JDK_FILES)) \
|
||||
)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -190,22 +240,24 @@ ifneq ($(filter product-bundles legacy-bundles, $(MAKECMDGOALS)), )
|
||||
, \
|
||||
$(ALL_JDK_FILES) \
|
||||
)
|
||||
|
||||
JDK_SYMBOLS_BUNDLE_FILES := \
|
||||
$(filter \
|
||||
$(JDK_SYMBOLS_EXCLUDE_PATTERN) \
|
||||
$(SYMBOLS_EXCLUDE_PATTERN) \
|
||||
, \
|
||||
$(filter-out \
|
||||
$(JDK_IMAGE_HOMEDIR)/demo/% \
|
||||
$(JDK_IMAGE_HOMEDIR)/demo/% %.stripped.pdb \
|
||||
, \
|
||||
$(ALL_JDK_FILES) \
|
||||
$(ALL_JDK_SYMBOLS_FILES) \
|
||||
) \
|
||||
) \
|
||||
$(call CacheFind, $(SYMBOLS_IMAGE_DIR))
|
||||
$(call FindFiles, $(SYMBOLS_IMAGE_DIR))
|
||||
|
||||
TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_IMAGE_HOMEDIR)/demo/%, $(ALL_JDK_FILES))
|
||||
TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_DEMOS_IMAGE_HOMEDIR)/demo/%, \
|
||||
$(ALL_JDK_DEMOS_FILES))
|
||||
|
||||
ALL_JRE_FILES := $(call CacheFind, $(JRE_IMAGE_DIR))
|
||||
ALL_JRE_FILES := $(call ShellFindFiles, $(JRE_IMAGE_DIR))
|
||||
|
||||
# Create special filter rules when dealing with unzipped .dSYM directories on
|
||||
# macosx
|
||||
@@ -216,39 +268,128 @@ ifneq ($(filter product-bundles legacy-bundles, $(MAKECMDGOALS)), )
|
||||
endif
|
||||
endif
|
||||
|
||||
# Create special filter rules when dealing with debug symbols on windows
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), )
|
||||
JRE_SYMBOLS_EXCLUDE_PATTERN := %.pdb
|
||||
else
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), public)
|
||||
JRE_SYMBOLS_EXCLUDE_PATTERN := \
|
||||
$(filter-out \
|
||||
%.stripped.pdb, \
|
||||
$(filter %.pdb, $(ALL_JRE_FILES)) \
|
||||
)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
JRE_BUNDLE_FILES := $(filter-out \
|
||||
$(JRE_SYMBOLS_EXCLUDE_PATTERN) \
|
||||
$(SYMBOLS_EXCLUDE_PATTERN), \
|
||||
$(ALL_JRE_FILES))
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
|
||||
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
|
||||
FILES := $(JDK_BUNDLE_FILES), \
|
||||
SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \
|
||||
BASE_DIRS := $(JDK_IMAGE_DIR), \
|
||||
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
|
||||
))
|
||||
# On Macosx release builds, when there is a code signing certificate available,
|
||||
# the final bundle layout can be signed.
|
||||
SIGN_BUNDLE := false
|
||||
ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
|
||||
ifneq ($(CODESIGN), )
|
||||
SIGN_BUNDLE := true
|
||||
endif
|
||||
endif
|
||||
|
||||
PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
|
||||
ifeq ($(SIGN_BUNDLE), true)
|
||||
# Macosx release build and code signing available.
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
|
||||
BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
|
||||
FILES := $(JRE_BUNDLE_FILES), \
|
||||
BASE_DIRS := $(JRE_IMAGE_DIR), \
|
||||
SUBDIR := $(JRE_BUNDLE_SUBDIR), \
|
||||
))
|
||||
################################################################################
|
||||
# JDK bundle
|
||||
$(eval $(call SetupCopyFiles, CREATE_JDK_BUNDLE_DIR_SIGNED, \
|
||||
SRC := $(JDK_IMAGE_DIR), \
|
||||
FILES := $(JDK_BUNDLE_FILES), \
|
||||
DEST := $(JDK_MACOSX_BUNDLE_DIR_SIGNED), \
|
||||
))
|
||||
|
||||
LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
|
||||
JDK_SIGNED_CODE_RESOURCES := \
|
||||
$(JDK_MACOSX_BUNDLE_DIR_SIGNED)/$(JDK_MACOSX_CONTENTS_SUBDIR)/_CodeSignature/CodeResources
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
|
||||
BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \
|
||||
FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \
|
||||
BASE_DIRS := $(JDK_IMAGE_DIR) $(wildcard $(SYMBOLS_IMAGE_DIR)), \
|
||||
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
|
||||
UNZIP_DEBUGINFO := true, \
|
||||
))
|
||||
$(JDK_SIGNED_CODE_RESOURCES): $(CREATE_JDK_BUNDLE_DIR_SIGNED)
|
||||
$(call LogWarn, Signing $(JDK_BUNDLE_NAME))
|
||||
$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
|
||||
--timestamp --options runtime --deep --force \
|
||||
$(JDK_MACOSX_BUNDLE_DIR_SIGNED)/$(JDK_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
|
||||
$(TOUCH) $@
|
||||
|
||||
PRODUCT_TARGETS += $(BUILD_JDK_SYMBOLS_BUNDLE)
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
|
||||
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
|
||||
FILES := \
|
||||
$(CREATE_JDK_BUNDLE_DIR_SIGNED) \
|
||||
$(JDK_SIGNED_CODE_RESOURCES), \
|
||||
BASE_DIRS := $(JDK_MACOSX_BUNDLE_DIR_SIGNED), \
|
||||
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
|
||||
|
||||
################################################################################
|
||||
# JRE bundle
|
||||
$(eval $(call SetupCopyFiles, CREATE_JRE_BUNDLE_DIR_SIGNED, \
|
||||
SRC := $(JRE_IMAGE_DIR), \
|
||||
FILES := $(JRE_BUNDLE_FILES), \
|
||||
DEST := $(JRE_MACOSX_BUNDLE_DIR_SIGNED), \
|
||||
))
|
||||
|
||||
JRE_SIGNED_CODE_RESOURCES := \
|
||||
$(JRE_MACOSX_BUNDLE_DIR_SIGNED)/$(JRE_MACOSX_CONTENTS_SUBDIR)/_CodeSignature/CodeResources
|
||||
|
||||
$(JRE_SIGNED_CODE_RESOURCES): $(CREATE_JRE_BUNDLE_DIR_SIGNED)
|
||||
$(call LogWarn, Signing $(JRE_BUNDLE_NAME))
|
||||
$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
|
||||
--timestamp --options runtime --deep --force \
|
||||
$(JRE_MACOSX_BUNDLE_DIR_SIGNED)/$(JRE_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
|
||||
$(TOUCH) $@
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
|
||||
BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
|
||||
FILES := \
|
||||
$(CREATE_JRE_BUNDLE_DIR_SIGNED) \
|
||||
$(JRE_SIGNED_CODE_RESOURCES), \
|
||||
BASE_DIRS := $(JRE_MACOSX_BUNDLE_DIR_SIGNED), \
|
||||
SUBDIR := $(JRE_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
|
||||
else
|
||||
# Not a Macosx release build or code signing not available.
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
|
||||
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
|
||||
FILES := $(JDK_BUNDLE_FILES), \
|
||||
SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \
|
||||
BASE_DIRS := $(JDK_IMAGE_DIR), \
|
||||
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
|
||||
BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
|
||||
FILES := $(JRE_BUNDLE_FILES), \
|
||||
BASE_DIRS := $(JRE_IMAGE_DIR), \
|
||||
SUBDIR := $(JRE_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
|
||||
endif
|
||||
|
||||
ifeq ($(COPY_DEBUG_SYMBOLS), true)
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
|
||||
BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \
|
||||
FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \
|
||||
BASE_DIRS := $(JDK_SYMBOLS_IMAGE_DIR) $(wildcard $(SYMBOLS_IMAGE_DIR)), \
|
||||
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
|
||||
UNZIP_DEBUGINFO := true, \
|
||||
))
|
||||
|
||||
PRODUCT_TARGETS += $(BUILD_JDK_SYMBOLS_BUNDLE)
|
||||
endif
|
||||
|
||||
# The demo bundle is only created to support client tests. Ideally it should
|
||||
# be built with the main test bundle, but since the prerequisites match
|
||||
@@ -256,7 +397,7 @@ ifneq ($(filter product-bundles legacy-bundles, $(MAKECMDGOALS)), )
|
||||
$(eval $(call SetupBundleFile, BUILD_TEST_DEMOS_BUNDLE, \
|
||||
BUNDLE_NAME := $(TEST_DEMOS_BUNDLE_NAME), \
|
||||
FILES := $(TEST_DEMOS_BUNDLE_FILES), \
|
||||
BASE_DIRS := $(JDK_IMAGE_DIR), \
|
||||
BASE_DIRS := $(JDK_DEMOS_IMAGE_DIR), \
|
||||
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
@@ -266,7 +407,7 @@ endif
|
||||
################################################################################
|
||||
|
||||
ifneq ($(filter test-bundles, $(MAKECMDGOALS)), )
|
||||
TEST_BUNDLE_FILES := $(call CacheFind, $(TEST_IMAGE_DIR))
|
||||
TEST_BUNDLE_FILES := $(call FindFiles, $(TEST_IMAGE_DIR))
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_TEST_BUNDLE, \
|
||||
BUNDLE_NAME := $(TEST_BUNDLE_NAME), \
|
||||
@@ -280,7 +421,7 @@ endif
|
||||
################################################################################
|
||||
|
||||
ifneq ($(filter docs-bundles, $(MAKECMDGOALS)), )
|
||||
DOCS_BUNDLE_FILES := $(call CacheFind, $(DOCS_IMAGE_DIR))
|
||||
DOCS_BUNDLE_FILES := $(call FindFiles, $(DOCS_IMAGE_DIR))
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_DOCS_BUNDLE, \
|
||||
BUNDLE_NAME := $(DOCS_BUNDLE_NAME), \
|
||||
@@ -294,6 +435,27 @@ endif
|
||||
|
||||
################################################################################
|
||||
|
||||
ifneq ($(filter static-libs-bundles, $(MAKECMDGOALS)), )
|
||||
STATIC_LIBS_BUNDLE_FILES := $(call FindFiles, $(STATIC_LIBS_IMAGE_DIR))
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
|
||||
STATIC_LIBS_BUNDLE_SUBDIR := $(JDK_MACOSX_CONTENTS_SUBDIR)/Home
|
||||
else
|
||||
STATIC_LIBS_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)
|
||||
endif
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_STATIC_LIBS_BUNDLE, \
|
||||
BUNDLE_NAME := $(STATIC_LIBS_BUNDLE_NAME), \
|
||||
FILES := $(STATIC_LIBS_BUNDLE_FILES), \
|
||||
BASE_DIRS := $(STATIC_LIBS_IMAGE_DIR), \
|
||||
SUBDIR := $(STATIC_LIBS_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
STATIC_LIBS_TARGETS += $(BUILD_STATIC_LIBS_BUNDLE)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, Bundles.gmk))
|
||||
|
||||
@@ -303,5 +465,7 @@ product-bundles: $(PRODUCT_TARGETS)
|
||||
legacy-bundles: $(LEGACY_TARGETS)
|
||||
test-bundles: $(TEST_TARGETS)
|
||||
docs-bundles: $(DOCS_TARGETS)
|
||||
static-libs-bundles: $(STATIC_LIBS_TARGETS)
|
||||
|
||||
.PHONY: all default product-bundles test-bundles docs-bundles
|
||||
.PHONY: all default product-bundles test-bundles docs-bundles \
|
||||
static-libs-bundles
|
||||
|
||||
60
make/CompileCommands.gmk
Normal file
60
make/CompileCommands.gmk
Normal file
@@ -0,0 +1,60 @@
|
||||
#
|
||||
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
# When FIXPATH is set, let it process the file to make sure all paths are usable
|
||||
# by system native tools. The FIXPATH tool assumes arguments preceeded by an @
|
||||
# character points to a text file containing further arguments (similar to a
|
||||
# linker). It replaces any such arguments with a different temporary filename,
|
||||
# whose contents has been processed to make any paths native. To obtain a
|
||||
# properly processed compile_commands.json, FIXPATH is then made to invoke an
|
||||
# AWK script with the unprocessed json file as the only argument, prepended with
|
||||
# an @ character. The AWK script simply copies the contents of this processed
|
||||
# file.
|
||||
#
|
||||
# The sed command encloses the fragments inside brackets and removes the final
|
||||
# trailing comma.
|
||||
$(OUTPUTDIR)/compile_commands.json: $(wildcard $(MAKESUPPORT_OUTPUTDIR)/compile-commands/*.json)
|
||||
$(call LogWarn, Updating compile_commands.json)
|
||||
$(RM) $@
|
||||
$(FIND) $(MAKESUPPORT_OUTPUTDIR)/compile-commands/ -name \*.json | \
|
||||
$(SORT) | $(XARGS) $(CAT) >> $@.tmp
|
||||
$(if $(FIXPATH),$(FIXPATH) $(AWK) 'BEGIN { \
|
||||
tmpfile = substr(ARGV[2],2); \
|
||||
cmd = "$(CP) " "\047" tmpfile "\047" " $@.tmp"; \
|
||||
system(cmd); \
|
||||
}' -- @$@.tmp)
|
||||
$(SED) -e '1s/^/[\$(NEWLINE)/' -e '$(DOLLAR)s/,\s\{0,\}$(DOLLAR)/\$(NEWLINE)]/' $@.tmp > $@
|
||||
$(RM) $@.tmp
|
||||
|
||||
TARGETS += $(OUTPUTDIR)/compile_commands.json
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2019, 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
|
||||
@@ -43,7 +43,7 @@ $(eval $(call IncludeCustomExtension, CompileDemos-pre.gmk))
|
||||
# Prepare the find cache.
|
||||
DEMO_SRC_DIRS += $(TOPDIR)/src/demo
|
||||
|
||||
$(eval $(call FillCacheFind, $(wildcard $(DEMO_SRC_DIRS))))
|
||||
$(call FillFindCache, $(DEMO_SRC_DIRS))
|
||||
|
||||
# Append demo goals to this variable.
|
||||
TARGETS =
|
||||
@@ -237,11 +237,11 @@ $(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%: $(DEMO_SHARE_SRC)/nbproject/%
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
|
||||
$(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \
|
||||
$(call CacheFind, $(DEMO_SHARE_SRC)/nbproject))
|
||||
$(call FindFiles, $(DEMO_SHARE_SRC)/nbproject))
|
||||
else
|
||||
TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
|
||||
$(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \
|
||||
$(call CacheFind, $(DEMO_SHARE_SRC)/nbproject))
|
||||
$(call FindFiles, $(DEMO_SHARE_SRC)/nbproject))
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
@@ -250,7 +250,7 @@ ifneq ($(filter images, $(MAKECMDGOALS)), )
|
||||
$(eval $(call SetupCopyFiles, COPY_TO_TEST_IMAGE, \
|
||||
SRC := $(SUPPORT_OUTPUTDIR)/demos/image, \
|
||||
DEST := $(TEST_IMAGE_DIR)/jdk/demos, \
|
||||
FILES := $(call CacheFind, $(SUPPORT_OUTPUTDIR)/demos/image), \
|
||||
FILES := $(call FindFiles, $(SUPPORT_OUTPUTDIR)/demos/image), \
|
||||
))
|
||||
|
||||
IMAGES_TARGETS := $(COPY_TO_TEST_IMAGE)
|
||||
|
||||
@@ -644,7 +644,7 @@ endif
|
||||
|
||||
ifneq ($(wildcard $(IMPORT_MODULES_CLASSES)/$(MODULE)), )
|
||||
$(JDK_OUTPUTDIR)/modules/$(MODULE)/_imported.marker: \
|
||||
$(call CacheFind, $(IMPORT_MODULES_CLASSES)/$(MODULE))
|
||||
$(call FindFiles, $(IMPORT_MODULES_CLASSES)/$(MODULE))
|
||||
$(call MakeDir, $(@D))
|
||||
# Do not delete marker and build meta data files
|
||||
$(RM) -r $(filter-out $(@D)/_%, $(wildcard $(@D)/*))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2019, 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
|
||||
@@ -35,7 +35,7 @@ LIBS_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_LIBS)))
|
||||
CMDS_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_CMDS)))
|
||||
CONF_DIR := $(wildcard $(addsuffix /$(MODULE), $(IMPORT_MODULES_CONF)))
|
||||
|
||||
$(eval $(call FillCacheFind, $(LIBS_DIR) $(CMDS_DIR) $(CONF_DIR)))
|
||||
$(call FillFindCache, $(LIBS_DIR) $(CMDS_DIR) $(CONF_DIR))
|
||||
|
||||
ifneq ($(LIBS_DIR), )
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
@@ -45,21 +45,21 @@ ifneq ($(LIBS_DIR), )
|
||||
SRC := $(LIBS_DIR), \
|
||||
DEST := $(JDK_OUTPUTDIR)/bin, \
|
||||
FILES := $(filter $(TO_BIN_FILTER), \
|
||||
$(call CacheFind, $(LIBS_DIR))) \
|
||||
$(call FindFiles, $(LIBS_DIR))) \
|
||||
))
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_LIBS_TO_LIB, \
|
||||
SRC := $(LIBS_DIR), \
|
||||
DEST := $(JDK_OUTPUTDIR)/lib, \
|
||||
FILES := $(filter-out $(TO_BIN_FILTER), \
|
||||
$(call CacheFind, $(LIBS_DIR))) \
|
||||
$(call FindFiles, $(LIBS_DIR))) \
|
||||
))
|
||||
TARGETS += $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB)
|
||||
else
|
||||
$(eval $(call SetupCopyFiles, COPY_LIBS, \
|
||||
SRC := $(LIBS_DIR), \
|
||||
DEST := $(JDK_OUTPUTDIR)/lib, \
|
||||
FILES := $(filter %$(SHARED_LIBRARY_SUFFIX), $(call CacheFind, $(LIBS_DIR))), \
|
||||
FILES := $(filter %$(SHARED_LIBRARY_SUFFIX), $(call FindFiles, $(LIBS_DIR))), \
|
||||
))
|
||||
|
||||
# Use relative links if the import dir is inside the OUTPUTDIR, otherwise
|
||||
@@ -75,7 +75,7 @@ ifneq ($(LIBS_DIR), )
|
||||
$(eval $(call SetupCopyFiles, LINK_LIBS, \
|
||||
SRC := $(LIBS_DIR), \
|
||||
DEST := $(JDK_OUTPUTDIR)/lib, \
|
||||
FILES := $(filter-out %$(SHARED_LIBRARY_SUFFIX), $(call CacheFind, $(LIBS_DIR))), \
|
||||
FILES := $(filter-out %$(SHARED_LIBRARY_SUFFIX), $(call FindFiles, $(LIBS_DIR))), \
|
||||
MACRO := $(LINK_MACRO), \
|
||||
LOG_ACTION := $(LOG_ACTION), \
|
||||
))
|
||||
@@ -87,7 +87,7 @@ ifneq ($(CMDS_DIR), )
|
||||
$(eval $(call SetupCopyFiles, COPY_CMDS, \
|
||||
SRC := $(CMDS_DIR), \
|
||||
DEST := $(JDK_OUTPUTDIR)/bin, \
|
||||
FILES := $(call CacheFind, $(CMDS_DIR)), \
|
||||
FILES := $(call FindFiles, $(CMDS_DIR)), \
|
||||
))
|
||||
TARGETS += $(COPY_CMDS)
|
||||
endif
|
||||
@@ -96,7 +96,7 @@ ifneq ($(CONF_DIR), )
|
||||
$(eval $(call SetupCopyFiles, COPY_CONF, \
|
||||
SRC := $(CONF_DIR), \
|
||||
DEST := $(JDK_OUTPUTDIR)/lib, \
|
||||
FILES := $(call CacheFind, $(CONF_DIR)), \
|
||||
FILES := $(call FindFiles, $(CONF_DIR)), \
|
||||
))
|
||||
TARGETS += $(COPY_CONF)
|
||||
endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -39,7 +39,7 @@ MODULES_TO_COPY := $(sort \
|
||||
|
||||
COPY_CLASSES_TARGET := $(BUILDJDK_OUTPUTDIR)/jdk/modules/java.base/_the.buildjdk-copy-marker
|
||||
|
||||
$(COPY_CLASSES_TARGET): $(call CacheFind, $(wildcard \
|
||||
$(COPY_CLASSES_TARGET): $(call FindFiles, $(wildcard \
|
||||
$(addprefix $(JDK_OUTPUTDIR)/modules/, $(MODULES_TO_COPY))))
|
||||
$(ECHO) $(LOG_INFO) "Copying java modules to buildjdk: $(MODULES_TO_COPY)"
|
||||
$(RM) -r $(BUILDJDK_OUTPUTDIR)/jdk/modules
|
||||
@@ -56,7 +56,7 @@ TARGETS += $(COPY_CLASSES_TARGET)
|
||||
$(eval $(call SetupCopyFiles, COPY_SUPPORT_HEADERS, \
|
||||
SRC := $(OUTPUTDIR), \
|
||||
DEST := $(BUILDJDK_OUTPUTDIR), \
|
||||
FILES := $(call CacheFind, $(wildcard \
|
||||
FILES := $(call FindFiles, $(wildcard \
|
||||
$(addprefix $(SUPPORT_OUTPUTDIR)/headers/, $(MODULES_TO_COPY)))), \
|
||||
))
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -51,33 +52,79 @@ INCLUDE_HEADERS_DIR ?= $(firstword $(wildcard $(addsuffix /$(MODULE), \
|
||||
MAN_DIR ?= $(firstword $(wildcard $(addsuffix /$(MODULE), \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_man $(IMPORT_MODULES_MAN))))
|
||||
|
||||
$(eval $(call FillCacheFind, \
|
||||
$(call FillFindCache, \
|
||||
$(LIBS_DIR) $(CMDS_DIR) $(CONF_DIR) $(CLASSES_DIR) \
|
||||
))
|
||||
)
|
||||
|
||||
ifneq ($(LIBS_DIR), )
|
||||
JMOD_FLAGS += --libs $(LIBS_DIR)
|
||||
DEPS += $(call CacheFind, $(LIBS_DIR))
|
||||
DEPS += $(call FindFiles, $(LIBS_DIR))
|
||||
ifeq ($(OPENJDK_TARGET_OS)+$(SHIP_DEBUG_SYMBOLS), windows+public)
|
||||
# For public debug symbols on Windows, we have to use stripped pdbs and rename them
|
||||
rename_stripped = $(patsubst %.stripped.pdb,%.pdb,$1)
|
||||
LIBS_DIR_FILTERED := $(subst modules_libs,modules_libs_filtered, $(LIBS_DIR))
|
||||
FILES_LIBS := $(filter-out %.pdb, $(call FindFiles, $(LIBS_DIR))) \
|
||||
$(filter %.stripped.pdb, $(call FindFiles, $(LIBS_DIR)))
|
||||
$(eval $(call SetupCopyFiles, COPY_FILTERED_LIBS, \
|
||||
SRC := $(LIBS_DIR), \
|
||||
DEST := $(LIBS_DIR_FILTERED), \
|
||||
FILES := $(FILES_LIBS), \
|
||||
NAME_MACRO := rename_stripped, \
|
||||
))
|
||||
DEPS += $(COPY_FILTERED_LIBS)
|
||||
JMOD_FLAGS += --libs $(LIBS_DIR_FILTERED)
|
||||
else
|
||||
JMOD_FLAGS += --libs $(LIBS_DIR)
|
||||
endif
|
||||
endif
|
||||
ifneq ($(CMDS_DIR), )
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR)
|
||||
DEPS += $(call CacheFind, $(CMDS_DIR))
|
||||
DEPS += $(call FindFiles, $(CMDS_DIR))
|
||||
ifeq ($(OPENJDK_TARGET_OS)+$(SHIP_DEBUG_SYMBOLS), windows+public)
|
||||
# For public debug symbols on Windows, we have to use stripped pdbs, rename them
|
||||
# and filter out a few launcher pdbs where there's a lib that goes by the same name
|
||||
rename_stripped = $(patsubst %.stripped.pdb,%.pdb,$1)
|
||||
CMDS_DIR_FILTERED := $(subst modules_cmds,modules_cmds_filtered, $(CMDS_DIR))
|
||||
FILES_CMDS := $(filter-out %.pdb, $(call FindFiles, $(CMDS_DIR))) \
|
||||
$(filter-out %jimage.stripped.pdb %jpackage.stripped.pdb %java.stripped.pdb, \
|
||||
$(filter %.stripped.pdb, $(call FindFiles, $(CMDS_DIR))))
|
||||
$(eval $(call SetupCopyFiles, COPY_FILTERED_CMDS, \
|
||||
SRC := $(CMDS_DIR), \
|
||||
DEST := $(CMDS_DIR_FILTERED), \
|
||||
FILES := $(FILES_CMDS), \
|
||||
NAME_MACRO := rename_stripped, \
|
||||
))
|
||||
DEPS += $(COPY_FILTERED_CMDS)
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR_FILTERED)
|
||||
else ifeq ($(OPENJDK_TARGET_OS)+$(SHIP_DEBUG_SYMBOLS), windows+full)
|
||||
# For full debug symbols on Windows, we have to filter out a few launcher pdbs
|
||||
# where there's a lib that goes by the same name
|
||||
CMDS_DIR_FILTERED := $(subst modules_cmds,modules_cmds_filtered, $(CMDS_DIR))
|
||||
$(eval $(call SetupCopyFiles, COPY_FILTERED_CMDS, \
|
||||
SRC := $(CMDS_DIR), \
|
||||
DEST := $(CMDS_DIR_FILTERED), \
|
||||
FILES := $(filter-out %jimage.pdb %jpackage.pdb %java.pdb, \
|
||||
$(call FindFiles, $(CMDS_DIR))), \
|
||||
))
|
||||
DEPS += $(COPY_FILTERED_CMDS)
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR_FILTERED)
|
||||
else
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR)
|
||||
endif
|
||||
endif
|
||||
ifneq ($(CONF_DIR), )
|
||||
JMOD_FLAGS += --config $(CONF_DIR)
|
||||
DEPS += $(call CacheFind, $(CONF_DIR))
|
||||
DEPS += $(call FindFiles, $(CONF_DIR))
|
||||
endif
|
||||
ifneq ($(CLASSES_DIR), )
|
||||
JMOD_FLAGS += --class-path $(CLASSES_DIR)
|
||||
DEPS += $(call CacheFind, $(CLASSES_DIR))
|
||||
DEPS += $(call FindFiles, $(CLASSES_DIR))
|
||||
endif
|
||||
ifneq ($(INCLUDE_HEADERS_DIR), )
|
||||
JMOD_FLAGS += --header-files $(INCLUDE_HEADERS_DIR)
|
||||
DEPS += $(call CacheFind, $(INCLUDE_HEADERS_DIR))
|
||||
DEPS += $(call FindFiles, $(INCLUDE_HEADERS_DIR))
|
||||
endif
|
||||
ifneq ($(MAN_DIR), )
|
||||
JMOD_FLAGS += --man-pages $(MAN_DIR)
|
||||
DEPS += $(call CacheFind, $(MAN_DIR))
|
||||
DEPS += $(call FindFiles, $(MAN_DIR))
|
||||
endif
|
||||
|
||||
# If a specific modules_legal dir exists for this module, only pick up files
|
||||
@@ -91,7 +138,7 @@ LEGAL_NOTICES := \
|
||||
)
|
||||
|
||||
LEGAL_NOTICES_PATH := $(call PathList, $(LEGAL_NOTICES))
|
||||
DEPS += $(call CacheFind, $(LEGAL_NOTICES))
|
||||
DEPS += $(call FindFiles, $(LEGAL_NOTICES))
|
||||
|
||||
JMOD_FLAGS += --legal-notices $(LEGAL_NOTICES_PATH)
|
||||
|
||||
@@ -145,7 +192,7 @@ endif
|
||||
# the actual command. Filter that out using wildcard before adding to DEPS.
|
||||
DEPS += $(wildcard $(JMOD_CMD))
|
||||
ifeq ($(EXTERNAL_BUILDJDK), false)
|
||||
DEPS += $(call CacheFind, $(JDK_OUTPUTDIR)/modules/jdk.jlink/jdk/tools/jmod)
|
||||
DEPS += $(call FindFiles, $(JDK_OUTPUTDIR)/modules/jdk.jlink/jdk/tools/jmod)
|
||||
endif
|
||||
|
||||
# If creating interim versions of jmods, certain files need to be filtered out
|
||||
@@ -154,7 +201,15 @@ ifeq ($(INTERIM_JMOD), true)
|
||||
DEPS := $(filter-out $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/classlist, $(DEPS))
|
||||
endif
|
||||
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM,*.pdb,*.map}'
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), )
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.pdb,*.map}'
|
||||
else
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.map}'
|
||||
endif
|
||||
else
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
|
||||
endif
|
||||
|
||||
# Create jmods in a temp dir and then move them into place to keep the
|
||||
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
|
||||
|
||||
@@ -341,7 +341,7 @@ define SetupApiDocsGenerationBody
|
||||
$$(SUPPORT_OUTPUTDIR)/docs/$1.vardeps)
|
||||
|
||||
# Get a list of all files in all the source dirs for all included modules
|
||||
$1_SOURCE_DEPS := $$(call CacheFind, $$(wildcard $$(foreach module, \
|
||||
$1_SOURCE_DEPS := $$(call FindFiles, $$(wildcard $$(foreach module, \
|
||||
$$($1_ALL_MODULES), $$(call FindModuleSrcDirs, $$(module)))))
|
||||
|
||||
# Javadoc creates a lot of files but use index.html as a marker
|
||||
@@ -496,7 +496,7 @@ JDK_INDEX_TARGETS += $(JDK_INDEX_HTML)
|
||||
GLOBAL_SPECS_RESOURCES_DIR := $(TOPDIR)/make/data/docs-resources/
|
||||
$(eval $(call SetupCopyFiles, COPY_GLOBAL_RESOURCES, \
|
||||
SRC := $(GLOBAL_SPECS_RESOURCES_DIR), \
|
||||
FILES := $(call CacheFind, $(GLOBAL_SPECS_RESOURCES_DIR)), \
|
||||
FILES := $(call FindFiles, $(GLOBAL_SPECS_RESOURCES_DIR)), \
|
||||
DEST := $(DOCS_OUTPUTDIR), \
|
||||
))
|
||||
JDK_INDEX_TARGETS += $(COPY_GLOBAL_RESOURCES)
|
||||
@@ -521,10 +521,10 @@ COPY_SPEC_FILTER := %.html %.gif %.jpg %.mib %.css
|
||||
$(foreach m, $(ALL_MODULES), \
|
||||
$(eval SPECS_$m := $(call FindModuleSpecsDirs, $m)) \
|
||||
$(foreach d, $(SPECS_$m), \
|
||||
$(if $(filter $(COPY_SPEC_FILTER), $(call CacheFind, $d)), \
|
||||
$(if $(filter $(COPY_SPEC_FILTER), $(call FindFiles, $d)), \
|
||||
$(eval $(call SetupCopyFiles, COPY_$m, \
|
||||
SRC := $d, \
|
||||
FILES := $(filter $(COPY_SPEC_FILTER), $(call CacheFind, $d)), \
|
||||
FILES := $(filter $(COPY_SPEC_FILTER), $(call FindFiles, $d)), \
|
||||
DEST := $(DOCS_OUTPUTDIR)/specs/, \
|
||||
)) \
|
||||
$(eval JDK_SPECS_TARGETS += $(COPY_$m)) \
|
||||
@@ -541,11 +541,11 @@ ifeq ($(ENABLE_FULL_DOCS), true)
|
||||
$(foreach m, $(ALL_MODULES), \
|
||||
$(eval SPECS_$m := $(call FindModuleSpecsDirs, $m)) \
|
||||
$(foreach d, $(SPECS_$m), \
|
||||
$(if $(filter %.md, $(call CacheFind, $d)), \
|
||||
$(if $(filter %.md, $(call FindFiles, $d)), \
|
||||
$(eval $m_$d_NAME := CONVERT_MARKDOWN_$m_$(strip $(call RelativePath, $d, $(TOPDIR)))) \
|
||||
$(eval $(call SetupProcessMarkdown, $($m_$d_NAME), \
|
||||
SRC := $d, \
|
||||
FILES := $(filter %.md, $(call CacheFind, $d)), \
|
||||
FILES := $(filter %.md, $(call FindFiles, $d)), \
|
||||
DEST := $(DOCS_OUTPUTDIR)/specs/, \
|
||||
CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \
|
||||
)) \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -84,6 +84,17 @@ $(eval $(call SetupCopyFiles, COPY_CLASSLIST, \
|
||||
|
||||
TARGETS += $(COPY_CLASSLIST)
|
||||
|
||||
# In case of shipping public debug symbols on windows, there is another temporary
|
||||
# location from where jmods are compiled - need to deploy classlist there, too.
|
||||
ifeq ($(OPENJDK_TARGET_OS)+$(SHIP_DEBUG_SYMBOLS), windows+public)
|
||||
$(eval $(call SetupCopyFiles, COPY_CLASSLIST_TO_FILTERED, \
|
||||
FILES := $(CLASSLIST_FILE), \
|
||||
DEST := $(SUPPORT_OUTPUTDIR)/modules_libs_filtered/java.base, \
|
||||
))
|
||||
|
||||
TARGETS += $(COPY_CLASSLIST_TO_FILTERED)
|
||||
endif
|
||||
|
||||
# Copy the default_jli_trace.txt file into jdk.jlink
|
||||
$(eval $(call SetupCopyFiles, COPY_JLI_TRACE, \
|
||||
FILES := $(JLI_TRACE_FILE), \
|
||||
|
||||
57
make/GraalBuilderImage.gmk
Normal file
57
make/GraalBuilderImage.gmk
Normal file
@@ -0,0 +1,57 @@
|
||||
#
|
||||
# Copyright (c) 2020, Red Hat Inc.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# 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.
|
||||
#
|
||||
|
||||
# This makefile creates a jdk image overlayed with statically linked core
|
||||
# libraries.
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
TARGETS :=
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_JDK_IMG, \
|
||||
SRC := $(JDK_IMAGE_DIR)/, \
|
||||
DEST := $(GRAAL_BUILDER_IMAGE_DIR)/, \
|
||||
FILES := $(call FindFiles, $(JDK_IMAGE_DIR)/), \
|
||||
))
|
||||
TARGETS += $(COPY_JDK_IMG)
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_STATIC_LIBS, \
|
||||
SRC := $(STATIC_LIBS_IMAGE_DIR)/lib, \
|
||||
DEST := $(GRAAL_BUILDER_IMAGE_DIR)/lib, \
|
||||
FILES := $(filter %$(STATIC_LIBRARY_SUFFIX), \
|
||||
$(call FindFiles, $(STATIC_LIBS_IMAGE_DIR)/lib)), \
|
||||
))
|
||||
TARGETS += $(COPY_STATIC_LIBS)
|
||||
|
||||
################################################################################
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all
|
||||
@@ -43,7 +43,7 @@ help:
|
||||
$(info $(_) make images # Create a complete jdk image)
|
||||
$(info $(_) # (alias for product-images))
|
||||
$(info $(_) make <name>-image # Build just the image for any of: )
|
||||
$(info $(_) # jdk, test, docs, symbols, legacy-jre)
|
||||
$(info $(_) # jdk, test, docs, symbols, legacy-jre, static-libs)
|
||||
$(info $(_) make <phase> # Build the specified phase and everything it depends on)
|
||||
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata, rmic))
|
||||
$(info $(_) make *-only # Applies to most targets and disables building the)
|
||||
@@ -119,7 +119,7 @@ print-configurations:
|
||||
run-test-prebuilt:
|
||||
@( cd $(topdir) && \
|
||||
$(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \
|
||||
run-test-prebuilt TEST="$(TEST)" )
|
||||
run-test-prebuilt CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )
|
||||
|
||||
ALL_GLOBAL_TARGETS := help print-configurations run-test-prebuilt
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -276,21 +276,14 @@ endif
|
||||
|
||||
ifeq ($(GCOV_ENABLED), true)
|
||||
|
||||
GCOV_FIND_EXPR := -type f -name "*.gcno"
|
||||
|
||||
$(eval $(call SetupCopyFiles,COPY_HOTSPOT_GCOV_GCNO, \
|
||||
$(eval $(call SetupCopyFiles,COPY_GCOV_GCNO, \
|
||||
SRC := $(OUTPUTDIR), \
|
||||
DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \
|
||||
FILES := $(shell $(FIND) $(HOTSPOT_OUTPUTDIR) $(GCOV_FIND_EXPR))))
|
||||
FILES := $(call FindFiles, $(HOTSPOT_OUTPUTDIR) \
|
||||
$(SUPPORT_OUTPUTDIR)/native, *.gcno) \
|
||||
))
|
||||
|
||||
SYMBOLS_TARGETS += $(COPY_HOTSPOT_GCOV_GCNO)
|
||||
|
||||
$(eval $(call SetupCopyFiles,COPY_JDK_GCOV_GCNO, \
|
||||
SRC := $(OUTPUTDIR), \
|
||||
DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \
|
||||
FILES := $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/native $(GCOV_FIND_EXPR))))
|
||||
|
||||
SYMBOLS_TARGETS += $(COPY_JDK_GCOV_GCNO)
|
||||
SYMBOLS_TARGETS += $(COPY_GCOV_GCNO)
|
||||
|
||||
endif
|
||||
|
||||
@@ -308,6 +301,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
else
|
||||
LIBS_TARGET_SUBDIR := lib
|
||||
endif
|
||||
CMDS_TARGET_SUBDIR := bin
|
||||
|
||||
# Param 1 - dir to find debuginfo files in
|
||||
FindDebuginfoFiles = \
|
||||
@@ -323,13 +317,16 @@ else
|
||||
# On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM
|
||||
# dirs.
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
$(eval $(call FillCacheFind, \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_cmds $(SUPPORT_OUTPUTDIR)/modules_libs))
|
||||
$(call FillFindCache, \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_libs $(SUPPORT_OUTPUTDIR)/modules_cmds)
|
||||
FindDebuginfoFiles = \
|
||||
$(if $(wildcard $1), $(call containing, .dSYM/, $(call CacheFind, $1)))
|
||||
$(if $(wildcard $1), $(call containing, .dSYM/, $(call FindFiles, $1)))
|
||||
endif
|
||||
endif
|
||||
|
||||
FILTERED_PDBS := %jimage.stripped.pdb %jpackage.stripped.pdb %java.stripped.pdb \
|
||||
%jimage.pdb %jpackage.pdb %java.pdb %jimage.map %jpackage.map %java.map
|
||||
|
||||
# Param 1 - either JDK or JRE
|
||||
SetupCopyDebuginfo = \
|
||||
$(foreach m, $(ALL_$1_MODULES), \
|
||||
@@ -340,6 +337,13 @@ SetupCopyDebuginfo = \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_libs/$m), \
|
||||
)) \
|
||||
$(eval $1_TARGETS += $$(COPY_$1_LIBS_DEBUGINFO_$m)) \
|
||||
$(eval $(call SetupCopyFiles, COPY_$1_CMDS_DEBUGINFO_$m, \
|
||||
SRC := $(SUPPORT_OUTPUTDIR)/modules_cmds/$m, \
|
||||
DEST := $($1_IMAGE_DIR)/$(CMDS_TARGET_SUBDIR), \
|
||||
FILES := $(filter-out $(FILTERED_PDBS), $(call FindDebuginfoFiles, \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_cmds/$m)), \
|
||||
)) \
|
||||
$(eval $1_TARGETS += $$(COPY_$1_CMDS_DEBUGINFO_$m)) \
|
||||
)
|
||||
|
||||
# No space before argument to avoid having to put $(strip ) everywhere in
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2019, 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
|
||||
@@ -52,26 +52,24 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
$(eval $(call SetupCopyFiles, COPY_JDK_IMAGE, \
|
||||
SRC := $(JDK_IMAGE_DIR), \
|
||||
DEST := $(JDK_MACOSX_CONTENTS_DIR)/Home, \
|
||||
FILES := $(call CacheFind, $(JDK_IMAGE_DIR)), \
|
||||
FILES := $(call FindFiles, $(JDK_IMAGE_DIR)), \
|
||||
))
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_JRE_IMAGE, \
|
||||
SRC := $(JRE_IMAGE_DIR), \
|
||||
DEST := $(JRE_MACOSX_CONTENTS_DIR)/Home, \
|
||||
FILES := $(call CacheFind, $(JRE_IMAGE_DIR)), \
|
||||
FILES := $(call FindFiles, $(JRE_IMAGE_DIR)), \
|
||||
))
|
||||
|
||||
$(JDK_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib:
|
||||
$(call LogInfo, Creating link $(patsubst $(OUTPUTDIR)/%,%,$@))
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(LN) -s ../Home/lib/jli/libjli.dylib $@
|
||||
$(eval $(call SetupCopyFiles, COPY_LIBJLI_JDK, \
|
||||
FILES := $(JDK_IMAGE_DIR)/lib/jli/libjli.dylib, \
|
||||
DEST := $(JDK_MACOSX_CONTENTS_DIR)/MacOS, \
|
||||
))
|
||||
|
||||
$(JRE_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib:
|
||||
$(call LogInfo, Creating link $(patsubst $(OUTPUTDIR)/%,%,$@))
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(LN) -s ../Home/lib/jli/libjli.dylib $@
|
||||
$(eval $(call SetupCopyFiles, COPY_LIBJLI_JRE, \
|
||||
FILES := $(JRE_IMAGE_DIR)/lib/jli/libjli.dylib, \
|
||||
DEST := $(JRE_MACOSX_CONTENTS_DIR)/MacOS, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTextFileProcessing, BUILD_JDK_PLIST, \
|
||||
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist, \
|
||||
@@ -97,13 +95,19 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
@@VENDOR@@ => $(BUNDLE_VENDOR) , \
|
||||
))
|
||||
|
||||
jdk-bundle: $(COPY_JDK_IMAGE) $(JDK_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib \
|
||||
$(BUILD_JDK_PLIST)
|
||||
$(SUPPORT_OUTPUTDIR)/images/_jdk_bundle_attribute_set: $(COPY_JDK_IMAGE)
|
||||
$(SETFILE) -a B $(dir $(JDK_MACOSX_CONTENTS_DIR))
|
||||
$(TOUCH) $@
|
||||
|
||||
jre-bundle: $(COPY_JRE_IMAGE) $(JRE_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib \
|
||||
$(BUILD_JRE_PLIST)
|
||||
$(SUPPORT_OUTPUTDIR)/images/_jre_bundle_attribute_set: $(COPY_JRE_IMAGE)
|
||||
$(SETFILE) -a B $(dir $(JRE_MACOSX_CONTENTS_DIR))
|
||||
$(TOUCH) $@
|
||||
|
||||
jdk-bundle: $(COPY_JDK_IMAGE) $(COPY_LIBJLI_JDK) \
|
||||
$(BUILD_JDK_PLIST) $(SUPPORT_OUTPUTDIR)/images/_jdk_bundle_attribute_set
|
||||
|
||||
jre-bundle: $(COPY_JRE_IMAGE) $(COPY_LIBJLI_JRE) \
|
||||
$(BUILD_JRE_PLIST) $(SUPPORT_OUTPUTDIR)/images/_jre_bundle_attribute_set
|
||||
|
||||
else # Not macosx
|
||||
|
||||
|
||||
156
make/Main.gmk
156
make/Main.gmk
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -80,7 +80,7 @@ ifneq ($(CREATING_BUILDJDK), true)
|
||||
|
||||
interim-cldrconverter:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimCLDRConverter.gmk)
|
||||
|
||||
|
||||
interim-tzdb:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimTZDB.gmk)
|
||||
|
||||
@@ -140,7 +140,7 @@ ifneq ($(CREATING_BUILDJDK), true)
|
||||
define DeclareModuleInfoRecipe
|
||||
$1-gensrc-moduleinfo:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
|
||||
-f GensrcModuleInfo.gmk MODULE=$1)
|
||||
-f gensrc/GensrcModuleInfo.gmk MODULE=$1)
|
||||
|
||||
$1-gensrc: $1-gensrc-moduleinfo
|
||||
endef
|
||||
@@ -225,6 +225,21 @@ $(eval $(call DeclareRecipesForPhase, LIBS, \
|
||||
|
||||
ALL_TARGETS += $(LIBS_TARGETS)
|
||||
|
||||
################################################################################
|
||||
# Targets for compiling static versions of certain native libraries. These do
|
||||
# not end up in the jmods or the normal JDK image, but are instead bundled into
|
||||
# a special deliverable.
|
||||
$(eval $(call DeclareRecipesForPhase, STATIC_LIBS, \
|
||||
TARGET_SUFFIX := static-libs, \
|
||||
FILE_PREFIX := Lib, \
|
||||
MAKE_SUBDIR := lib, \
|
||||
CHECK_MODULES := $(STATIC_LIBS_MODULES), \
|
||||
USE_WRAPPER := true, \
|
||||
EXTRA_ARGS := STATIC_LIBS=true, \
|
||||
))
|
||||
|
||||
ALL_TARGETS += $(STATIC_LIBS_TARGETS)
|
||||
|
||||
################################################################################
|
||||
# Targets for compiling native executables
|
||||
$(eval $(call DeclareRecipesForPhase, LAUNCHER, \
|
||||
@@ -266,6 +281,52 @@ hotspot-ide-project:
|
||||
ALL_TARGETS += $(HOTSPOT_VARIANT_TARGETS) $(HOTSPOT_VARIANT_GENSRC_TARGETS) \
|
||||
$(HOTSPOT_VARIANT_LIBS_TARGETS) hotspot-ide-project
|
||||
|
||||
################################################################################
|
||||
# Generate libs and launcher targets for creating compile_commands.json fragments
|
||||
define DeclareCompileCommandsRecipe
|
||||
$1-compile-commands:
|
||||
$$(call LogInfo, Generating compile_commands.json fragments for $1)
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Main.gmk $1-only \
|
||||
GENERATE_COMPILE_COMMANDS_ONLY=true)
|
||||
|
||||
COMPILE_COMMANDS_TARGETS_$2 += $1-compile-commands
|
||||
endef
|
||||
|
||||
$(foreach t, $(HOTSPOT_VARIANT_LIBS_TARGETS), \
|
||||
$(eval $(call DeclareCompileCommandsRecipe,$t,HOTSPOT)) \
|
||||
)
|
||||
|
||||
$(foreach t, $(LIBS_TARGETS) $(LAUNCHER_TARGETS), \
|
||||
$(eval $(call DeclareCompileCommandsRecipe,$t,JDK)) \
|
||||
)
|
||||
|
||||
compile-commands compile-commands-hotspot:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileCommands.gmk)
|
||||
|
||||
ALL_TARGETS += $(COMPILE_COMMANDS_TARGETS_HOTSPOT) $(COMPILE_COMMANDS_TARGETS_JDK)
|
||||
ALL_TARGETS += compile-commands compile-commands-hotspot
|
||||
|
||||
################################################################################
|
||||
# VS Code projects
|
||||
vscode-project:
|
||||
+($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
|
||||
VSCODE_INDEXER=cpptools)
|
||||
|
||||
vscode-project-clangd:
|
||||
+($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
|
||||
VSCODE_INDEXER=clangd)
|
||||
|
||||
vscode-project-rtags:
|
||||
+($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
|
||||
VSCODE_INDEXER=rtags)
|
||||
|
||||
vscode-project-ccls:
|
||||
+($(CD) $(TOPDIR)/make/vscode && $(MAKE) $(MAKE_ARGS) -f CreateVSCodeProject.gmk \
|
||||
VSCODE_INDEXER=ccls)
|
||||
|
||||
ALL_TARGETS += vscode-project vscode-project-clangd vscode-project-rtags \
|
||||
vscode-project-ccls
|
||||
|
||||
################################################################################
|
||||
# Build demos targets
|
||||
|
||||
@@ -338,6 +399,9 @@ legacy-jre-image:
|
||||
symbols-image:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk symbols)
|
||||
|
||||
static-libs-image:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f StaticLibsImage.gmk)
|
||||
|
||||
mac-jdk-bundle:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f MacBundles.gmk jdk-bundle)
|
||||
|
||||
@@ -350,10 +414,13 @@ release-file:
|
||||
exploded-image-optimize:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ExplodedImageOptimize.gmk)
|
||||
|
||||
graal-builder-image:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f GraalBuilderImage.gmk)
|
||||
|
||||
ALL_TARGETS += store-source-revision create-source-revision-tracker bootcycle-images zip-security \
|
||||
zip-source jrtfs-jar jdk-image legacy-jre-image \
|
||||
symbols-image mac-jdk-bundle mac-legacy-jre-bundle \
|
||||
release-file exploded-image-optimize
|
||||
symbols-image static-libs-image mac-jdk-bundle mac-legacy-jre-bundle \
|
||||
release-file exploded-image-optimize graal-builder-image
|
||||
|
||||
################################################################################
|
||||
# Docs targets
|
||||
@@ -563,8 +630,12 @@ test-jdk-jtreg-native:
|
||||
test-make:
|
||||
($(CD) $(TOPDIR)/test/make && $(MAKE) $(MAKE_ARGS) -f TestMake.gmk $(TEST_TARGET))
|
||||
|
||||
test-compile-commands:
|
||||
($(CD) $(TOPDIR)/test/make && $(MAKE) $(MAKE_ARGS) -f TestMake.gmk test-compile-commands)
|
||||
|
||||
ALL_TARGETS += test test-hotspot-jtreg test-hotspot-jtreg-native \
|
||||
test-hotspot-internal test-hotspot-gtest test-jdk-jtreg-native test-make
|
||||
test-hotspot-internal test-hotspot-gtest test-jdk-jtreg-native test-make \
|
||||
test-compile-commands
|
||||
|
||||
################################################################################
|
||||
# Bundles
|
||||
@@ -581,7 +652,11 @@ test-bundles:
|
||||
docs-bundles:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk docs-bundles)
|
||||
|
||||
ALL_TARGETS += product-bundles legacy-bundles test-bundles docs-bundles
|
||||
static-libs-bundles:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk static-libs-bundles)
|
||||
|
||||
ALL_TARGETS += product-bundles legacy-bundles test-bundles docs-bundles \
|
||||
static-libs-bundles
|
||||
|
||||
################################################################################
|
||||
# Install targets
|
||||
@@ -636,7 +711,7 @@ else
|
||||
|
||||
# Declare dependencies between hotspot-<variant>* targets
|
||||
$(foreach v, $(JVM_VARIANTS), \
|
||||
$(eval hotspot-$v: hotspot-$v-gensrc hotspot-$v-libs) \
|
||||
$(eval hotspot-$v-gensrc: java.base-copy) \
|
||||
$(eval hotspot-$v-libs: hotspot-$v-gensrc java.base-copy) \
|
||||
)
|
||||
|
||||
@@ -698,16 +773,17 @@ else
|
||||
# copied and processed.
|
||||
java.desktop-gensrc-src: java.base-gensrc java.base-copy
|
||||
|
||||
# The annotation processing for jdk.internal.vm.ci and jdk.internal.vm.compiler
|
||||
# needs classes from the current JDK.
|
||||
jdk.internal.vm.ci-gensrc-src: $(addsuffix -java, \
|
||||
$(call FindTransitiveDepsForModule, jdk.internal.vm.ci))
|
||||
# The annotation processing for jdk.internal.vm.compiler
|
||||
# and jdk.internal.vm.compiler.management needs classes from the current JDK.
|
||||
jdk.internal.vm.compiler-gensrc-src: $(addsuffix -java, \
|
||||
$(call FindTransitiveDepsForModule, jdk.internal.vm.compiler))
|
||||
jdk.internal.vm.compiler.management-gensrc-src: $(addsuffix -java, \
|
||||
$(call FindTransitiveDepsForModule, jdk.internal.vm.compiler.management))
|
||||
|
||||
# For jdk.internal.vm.compiler, the gensrc step is generating a module-info.java.extra
|
||||
# For these modules, the gensrc step is generating a module-info.java.extra
|
||||
# file to be processed by the gensrc-moduleinfo target.
|
||||
jdk.internal.vm.compiler-gensrc-moduleinfo: jdk.internal.vm.compiler-gensrc-src
|
||||
jdk.internal.vm.compiler.management-gensrc-moduleinfo: jdk.internal.vm.compiler.management-gensrc-src
|
||||
|
||||
jdk.jdeps-gendata: java rmic
|
||||
|
||||
@@ -742,6 +818,31 @@ else
|
||||
$(foreach m, $(ALL_MODULES), $(eval $m-jmod: $($(m)_JMOD_DEPS)))
|
||||
$(foreach m, $(INTERIM_IMAGE_MODULES), $(eval $m-interim-jmod: $($(m)_JMOD_DEPS)))
|
||||
|
||||
# Setup the minimal set of generated native source dependencies for hotspot
|
||||
$(foreach v, $(JVM_VARIANTS), \
|
||||
$(eval hotspot-$v-libs-compile-commands: hotspot-$v-gensrc) \
|
||||
$(foreach m, $(filter java.desktop jdk.hotspot.agent, $(GENSRC_MODULES)), \
|
||||
$(eval hotspot-$v-libs-compile-commands: $m-gensrc)) \
|
||||
)
|
||||
|
||||
# For the full JDK compile commands, create all possible generated sources
|
||||
$(foreach m, $(GENSRC_MODULES), $(eval $m-libs-compile-commands: $m-gensrc))
|
||||
$(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs-compile-commands: $m-java))
|
||||
|
||||
$(COMPILE_COMMANDS_TARGETS_HOTSPOT): clean-compile-commands
|
||||
$(COMPILE_COMMANDS_TARGETS_JDK): clean-compile-commands
|
||||
compile-commands-hotspot: $(COMPILE_COMMANDS_TARGETS_HOTSPOT)
|
||||
compile-commands: $(COMPILE_COMMANDS_TARGETS_HOTSPOT) $(COMPILE_COMMANDS_TARGETS_JDK)
|
||||
|
||||
# The -static-libs targets depend on -java as well as java.base-copy.
|
||||
$(foreach m, $(filter $(JAVA_MODULES), $(STATIC_LIBS_MODULES)), \
|
||||
$(eval $m-static-libs: $m-java java.base-copy))
|
||||
|
||||
vscode-project: compile-commands
|
||||
vscode-project-clangd: compile-commands
|
||||
vscode-project-rtags: compile-commands
|
||||
vscode-project-ccls: compile-commands
|
||||
|
||||
# Jmods cannot be created until we have the jmod tool ready to run. During
|
||||
# a normal build we run it from the exploded image, but when cross compiling
|
||||
# it's run from the buildjdk, which is either created at build time or user
|
||||
@@ -804,6 +905,10 @@ else
|
||||
legacy-jre-image: jmods release-file
|
||||
symbols-image: $(LIBS_TARGETS) $(LAUNCHER_TARGETS)
|
||||
|
||||
static-libs-image: $(STATIC_LIBS_TARGETS)
|
||||
|
||||
graal-builder-image: jdk-image static-libs-image
|
||||
|
||||
mac-jdk-bundle: jdk-image
|
||||
mac-legacy-jre-bundle: legacy-jre-image
|
||||
|
||||
@@ -856,6 +961,8 @@ else
|
||||
|
||||
test-make: clean-test-make
|
||||
|
||||
test-compile-commands: compile-commands
|
||||
|
||||
build-test-lib: exploded-image-optimize
|
||||
|
||||
build-test-failure-handler: interim-langtools
|
||||
@@ -895,6 +1002,8 @@ else
|
||||
|
||||
docs-bundles: docs-image
|
||||
|
||||
static-libs-bundles: static-libs-image
|
||||
|
||||
generate-summary: jmods buildtools-modules
|
||||
|
||||
update-x11wrappers: java.base-copy buildtools-jdk
|
||||
@@ -909,6 +1018,10 @@ JVM_TOOLS_TARGETS ?= buildtools-hotspot
|
||||
buildtools: buildtools-langtools interim-langtools interim-rmic \
|
||||
buildtools-jdk $(JVM_TOOLS_TARGETS)
|
||||
|
||||
# Declare dependencies from hotspot-<variant> targets
|
||||
$(foreach v, $(JVM_VARIANTS), \
|
||||
$(eval hotspot-$v: hotspot-$v-gensrc hotspot-$v-libs) \
|
||||
)
|
||||
hotspot: $(HOTSPOT_VARIANT_TARGETS)
|
||||
|
||||
# Create targets hotspot-libs and hotspot-gensrc.
|
||||
@@ -929,6 +1042,8 @@ rmic: $(RMIC_TARGETS)
|
||||
|
||||
libs: $(LIBS_TARGETS)
|
||||
|
||||
static-libs: $(STATIC_LIBS_TARGETS)
|
||||
|
||||
launchers: $(LAUNCHER_TARGETS)
|
||||
|
||||
jmods: $(JMOD_TARGETS)
|
||||
@@ -1035,10 +1150,10 @@ test-image: prepare-test-image \
|
||||
all-images: product-images test-image docs-image
|
||||
|
||||
# all-bundles packages all our deliverables as tar.gz bundles.
|
||||
all-bundles: product-bundles test-bundles docs-bundles
|
||||
all-bundles: product-bundles test-bundles docs-bundles static-libs-bundles
|
||||
|
||||
ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-gensrc gensrc gendata \
|
||||
copy java rmic libs launchers jmods \
|
||||
copy java rmic libs static-libs launchers jmods \
|
||||
jdk.jdwp.agent-gensrc $(ALL_MODULES) demos \
|
||||
exploded-image-base exploded-image \
|
||||
create-buildjdk docs-jdk-api docs-javase-api docs-reference-api docs-jdk \
|
||||
@@ -1085,12 +1200,15 @@ CLEAN_MODULE_PHASE_TARGETS := $(addprefix clean-, $(foreach m, $(ALL_MODULES), \
|
||||
|
||||
# Remove everything, except the output from configure.
|
||||
clean: $(CLEAN_DIR_TARGETS)
|
||||
($(CD) $(OUTPUTDIR) && $(RM) -r build*.log*)
|
||||
($(CD) $(OUTPUTDIR) && $(RM) -r build*.log* compile_commands.json)
|
||||
$(ECHO) Cleaned all build artifacts.
|
||||
|
||||
clean-docs:
|
||||
$(call CleanDocs)
|
||||
|
||||
clean-compile-commands:
|
||||
$(call CleanMakeSupportDir,compile-commands)
|
||||
|
||||
$(CLEAN_DIR_TARGETS):
|
||||
$(call CleanDir,$(patsubst clean-%, %, $@))
|
||||
|
||||
@@ -1132,9 +1250,9 @@ dist-clean: clean
|
||||
)
|
||||
$(ECHO) Cleaned everything, you will have to re-run configure.
|
||||
|
||||
ALL_TARGETS += clean clean-docs dist-clean $(CLEAN_DIR_TARGETS) $(CLEAN_SUPPORT_DIR_TARGETS) \
|
||||
$(CLEAN_TEST_TARGETS) $(CLEAN_PHASE_TARGETS) $(CLEAN_MODULE_TARGETS) \
|
||||
$(CLEAN_MODULE_PHASE_TARGETS)
|
||||
ALL_TARGETS += clean clean-docs clean-compile-commands dist-clean $(CLEAN_DIR_TARGETS) \
|
||||
$(CLEAN_SUPPORT_DIR_TARGETS) $(CLEAN_TEST_TARGETS) $(CLEAN_PHASE_TARGETS) \
|
||||
$(CLEAN_MODULE_TARGETS) $(CLEAN_MODULE_PHASE_TARGETS)
|
||||
|
||||
################################################################################
|
||||
# Declare *-only targets for each normal target
|
||||
|
||||
@@ -65,6 +65,13 @@ define CleanSupportDir
|
||||
@$(PRINTF) " done\n"
|
||||
endef
|
||||
|
||||
define CleanMakeSupportDir
|
||||
@$(PRINTF) "Cleaning $(strip $1) make support artifacts ..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
$(RM) -r $(MAKESUPPORT_OUTPUTDIR)/$(strip $1)
|
||||
@$(PRINTF) " done\n"
|
||||
endef
|
||||
|
||||
define CleanTest
|
||||
@$(PRINTF) "Cleaning test $(strip $1) ..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@@ -137,7 +144,7 @@ define DeclareRecipeForModuleMakefile
|
||||
$$(addprefix -I, $$(PHASE_MAKEDIRS) \
|
||||
$$(addsuffix /$$($1_MAKE_SUBDIR), $$(PHASE_MAKEDIRS)) \
|
||||
) \
|
||||
MODULE=$2 MAKEFILE_PREFIX=$$($1_FILE_PREFIX))
|
||||
MODULE=$2 MAKEFILE_PREFIX=$$($1_FILE_PREFIX) $$($1_EXTRA_ARGS))
|
||||
else
|
||||
+($(CD) $$(dir $$(firstword $$(wildcard $$(addsuffix \
|
||||
/$$($1_MAKE_SUBDIR)/$$($1_FILE_PREFIX)-$2.gmk, $$(PHASE_MAKEDIRS))))) \
|
||||
@@ -146,7 +153,7 @@ define DeclareRecipeForModuleMakefile
|
||||
$$(addprefix -I, $$(PHASE_MAKEDIRS) \
|
||||
$$(addsuffix /$$($1_MAKE_SUBDIR), $$(PHASE_MAKEDIRS)) \
|
||||
) \
|
||||
MODULE=$2 \
|
||||
MODULE=$2 $$($1_EXTRA_ARGS) \
|
||||
)
|
||||
endif
|
||||
|
||||
@@ -186,12 +193,13 @@ endef
|
||||
# CHECK_MODULES : List of modules to try
|
||||
# MULTIPLE_MAKEFILES : Set to true to handle makefiles for the same module and
|
||||
# phase in multiple repos
|
||||
# EXTRA_ARGS : Add extra make args to each makefile call
|
||||
# Exported variables:
|
||||
# $1_MODULES : All modules that had rules generated
|
||||
# $1_TARGETS : All targets generated
|
||||
define DeclareRecipesForPhase
|
||||
$(foreach i,2 3 4 5 6 7, $(if $(strip $($i)),$(strip $1)_$(strip $($i)))$(NEWLINE))
|
||||
$(if $(8),$(error Internal makefile error: Too many arguments to \
|
||||
$(foreach i,2 3 4 5 6 7 8, $(if $(strip $($i)),$(strip $1)_$(strip $($i)))$(NEWLINE))
|
||||
$(if $(9),$(error Internal makefile error: Too many arguments to \
|
||||
DeclareRecipesForPhase, please update MakeHelper.gmk))
|
||||
|
||||
$$(foreach m, $$($(strip $1)_CHECK_MODULES), \
|
||||
|
||||
@@ -100,5 +100,9 @@ $(eval $(call SetupCopyFiles, COPY_CONF, \
|
||||
$(TARGETS)), \
|
||||
))
|
||||
|
||||
all: $(TARGETS) $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB) \
|
||||
$(COPY_INCLUDE) $(COPY_CMDS) $(COPY_CONF) $(LINK_LIBS_TO_LIB)
|
||||
ifeq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
|
||||
all: $(filter $(MAKESUPPORT_OUTPUTDIR)/compile-commands/%, $(TARGETS))
|
||||
else
|
||||
all: $(TARGETS) $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB) \
|
||||
$(COPY_INCLUDE) $(COPY_CMDS) $(COPY_CONF) $(LINK_LIBS_TO_LIB)
|
||||
endif
|
||||
|
||||
@@ -82,8 +82,8 @@ ifneq ($(TEST_VM_OPTS), )
|
||||
endif
|
||||
|
||||
$(eval $(call ParseKeywordVariable, TEST_OPTS, \
|
||||
KEYWORDS := JOBS TIMEOUT, \
|
||||
STRING_KEYWORDS := VM_OPTIONS, \
|
||||
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR, \
|
||||
STRING_KEYWORDS := VM_OPTIONS JAVA_OPTIONS AOT_MODULES, \
|
||||
))
|
||||
|
||||
# Helper function to propagate TEST_OPTS values.
|
||||
@@ -102,10 +102,14 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifndef _NT_SYMBOL_PATH
|
||||
# Can't use PathList here as it adds quotes around the value.
|
||||
_NT_SYMBOL_PATH := \
|
||||
$(subst $(SPACE),;, $(foreach p, $(sort $(dir $(wildcard \
|
||||
$(addprefix $(SYMBOLS_IMAGE_DIR)/bin/, *.pdb */*.pdb)))), $(call FixPath, $p)))
|
||||
$(subst $(SPACE),;,$(strip \
|
||||
$(foreach p, $(sort $(dir $(wildcard \
|
||||
$(addprefix $(SYMBOLS_IMAGE_DIR)/bin/, *.pdb */*.pdb)))), \
|
||||
$(call FixPath, $p) \
|
||||
) \
|
||||
))
|
||||
export _NT_SYMBOL_PATH
|
||||
$(info _NT_SYMBOL_PATH $(_NT_SYMBOL_PATH))
|
||||
$(info _NT_SYMBOL_PATH=$(_NT_SYMBOL_PATH))
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -137,8 +141,118 @@ ifneq ($(wildcard $(JTREG_FAILURE_HANDLER)), )
|
||||
-timeoutHandlerTimeout:0
|
||||
endif
|
||||
|
||||
GTEST_LAUNCHER_DIRS := $(patsubst %/gtestLauncher, %, $(wildcard $(TEST_IMAGE_DIR)/hotspot/gtest/*/gtestLauncher))
|
||||
GTEST_VARIANTS := $(strip $(patsubst $(TEST_IMAGE_DIR)/hotspot/gtest/%, %, $(GTEST_LAUNCHER_DIRS)))
|
||||
GTEST_LAUNCHER_DIRS := $(patsubst %/gtestLauncher, %, \
|
||||
$(wildcard $(TEST_IMAGE_DIR)/hotspot/gtest/*/gtestLauncher))
|
||||
GTEST_VARIANTS := $(strip $(patsubst $(TEST_IMAGE_DIR)/hotspot/gtest/%, %, \
|
||||
$(GTEST_LAUNCHER_DIRS)))
|
||||
|
||||
################################################################################
|
||||
# Optionally create AOT libraries for specified modules before running tests.
|
||||
# Note, this could not be done during JDK build time.
|
||||
################################################################################
|
||||
|
||||
# Note, this could not be done during JDK build time.
|
||||
|
||||
# Parameter 1 is the name of the rule.
|
||||
#
|
||||
# Remaining parameters are named arguments.
|
||||
# MODULE The module to generate a library for
|
||||
# BIN Output directory in which to put the library
|
||||
# VM_OPTIONS List of JVM arguments to use when creating library
|
||||
# OPTIONS_VAR Name of variable to put AOT java options in
|
||||
# PREREQS_VAR Name of variable to put all AOT prerequisite rule targets in
|
||||
# for test rules to depend on
|
||||
#
|
||||
SetupAotModule = $(NamedParamsMacroTemplate)
|
||||
define SetupAotModuleBody
|
||||
$1_AOT_LIB := $$($1_BIN)/$$(call SHARED_LIBRARY,$$($1_MODULE))
|
||||
$1_AOT_CCLIST := $$(wildcard $$(TOPDIR)/test/hotspot/jtreg/compiler/aot/scripts/$$($1_MODULE)-list.txt)
|
||||
|
||||
# Create jaotc flags.
|
||||
# VM flags which don't affect AOT code generation are filtered out:
|
||||
# -Xcomp, -XX:+-TieredCompilation
|
||||
$1_JAOTC_OPTS := \
|
||||
-J-Xmx4g --info \
|
||||
$$(addprefix -J, $$(filter-out -Xcomp %TieredCompilation, $$($1_VM_OPTIONS))) \
|
||||
$$(addprefix --compile-commands$(SPACE), $$($1_AOT_CCLIST)) \
|
||||
--linker-path $$(LD_JAOTC) \
|
||||
#
|
||||
|
||||
ifneq ($$(filter -ea, $$($1_VM_OPTIONS)), )
|
||||
$1_JAOTC_OPTS += --compile-with-assertions
|
||||
endif
|
||||
|
||||
$$($1_AOT_LIB): $$(JDK_IMAGE_DIR)/release \
|
||||
$$(call DependOnVariable, $1_JAOTC_OPTS) \
|
||||
$$(call DependOnVariable, JDK_IMAGE_DIR)
|
||||
$$(call LogWarn, Generating $$(patsubst $$(OUTPUTDIR)/%, %, $$@))
|
||||
$$(call MakeTargetDir)
|
||||
$$(call ExecuteWithLog, $$@, ( \
|
||||
$$(FIXPATH) $$(JDK_IMAGE_DIR)/bin/jaotc \
|
||||
$$($1_JAOTC_OPTS) --output $$@ --module $$($1_MODULE) \
|
||||
))
|
||||
$$(call ExecuteWithLog, $$@.check, ( \
|
||||
$$(FIXPATH) $$(JDK_IMAGE_DIR)/bin/java \
|
||||
$$($1_VM_OPTIONS) -XX:+UnlockDiagnosticVMOptions \
|
||||
-XX:+PrintAOT -XX:+UseAOTStrictLoading \
|
||||
-XX:AOTLibrary=$$@ -version \
|
||||
> $$@.verify-aot \
|
||||
))
|
||||
|
||||
$1_AOT_OPTIONS += -XX:AOTLibrary=$$($1_AOT_LIB)
|
||||
$1_AOT_TARGETS += $$($1_AOT_LIB)
|
||||
endef
|
||||
|
||||
# Parameter 1 is the name of the rule.
|
||||
#
|
||||
# Remaining parameters are named arguments.
|
||||
# MODULES The modules to generate a library for
|
||||
# VM_OPTIONS List of JVM arguments to use when creating libraries
|
||||
#
|
||||
# After calling this, the following variables are defined
|
||||
# $1_AOT_OPTIONS List of all java options needed to use the AOT libraries
|
||||
# $1_AOT_TARGETS List of all targets that the test rule will need to depend on
|
||||
#
|
||||
SetupAot = $(NamedParamsMacroTemplate)
|
||||
define SetupAotBody
|
||||
$$(info Running with AOTd libraries for $$($1_MODULES))
|
||||
# Put aot libraries in a separate directory so they are not deleted between
|
||||
# test runs and may be reused between make invocations.
|
||||
$$(foreach m, $$($1_MODULES), \
|
||||
$$(eval $$(call SetupAotModule, $1_$$m, \
|
||||
MODULE := $$m, \
|
||||
BIN := $$(TEST_SUPPORT_DIR)/aot/$1, \
|
||||
VM_OPTIONS := $$($1_VM_OPTIONS), \
|
||||
)) \
|
||||
$$(eval $1_AOT_OPTIONS += $$($1_$$m_AOT_OPTIONS)) \
|
||||
$$(eval $1_AOT_TARGETS += $$($1_$$m_AOT_TARGETS)) \
|
||||
)
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# Setup global test running parameters
|
||||
################################################################################
|
||||
|
||||
# Each factor variable comes in 3 variants. The first one is reserved for users
|
||||
# to use on command line. The other two are for predifined configurations in JDL
|
||||
# and for machine specific configurations respectively.
|
||||
TEST_JOBS_FACTOR ?= 1
|
||||
TEST_JOBS_FACTOR_JDL ?= 1
|
||||
TEST_JOBS_FACTOR_MACHINE ?= 1
|
||||
|
||||
ifeq ($(TEST_JOBS), 0)
|
||||
# Concurrency based on min(cores / 2, 12) * TEST_JOBS_FACTOR
|
||||
TEST_JOBS := $(shell $(AWK) \
|
||||
'BEGIN { \
|
||||
c = $(NUM_CORES) / 2; \
|
||||
if (c > 12) c = 12; \
|
||||
c = c * $(TEST_JOBS_FACTOR); \
|
||||
c = c * $(TEST_JOBS_FACTOR_JDL); \
|
||||
c = c * $(TEST_JOBS_FACTOR_MACHINE); \
|
||||
if (c < 1) c = 1; \
|
||||
printf "%.0f", c; \
|
||||
}')
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Parse control variables
|
||||
@@ -147,17 +261,24 @@ GTEST_VARIANTS := $(strip $(patsubst $(TEST_IMAGE_DIR)/hotspot/gtest/%, %, $(GTE
|
||||
ifneq ($(TEST_OPTS), )
|
||||
# Inform the user
|
||||
$(info Running tests using TEST_OPTS control variable '$(TEST_OPTS)')
|
||||
|
||||
$(eval $(call SetTestOpt,VM_OPTIONS,JTREG))
|
||||
$(eval $(call SetTestOpt,VM_OPTIONS,GTEST))
|
||||
|
||||
$(eval $(call SetTestOpt,JOBS,JTREG))
|
||||
$(eval $(call SetTestOpt,TIMEOUT,JTREG))
|
||||
endif
|
||||
|
||||
$(eval $(call SetTestOpt,VM_OPTIONS,JTREG))
|
||||
$(eval $(call SetTestOpt,JAVA_OPTIONS,JTREG))
|
||||
$(eval $(call SetTestOpt,VM_OPTIONS,GTEST))
|
||||
$(eval $(call SetTestOpt,JAVA_OPTIONS,GTEST))
|
||||
|
||||
$(eval $(call SetTestOpt,AOT_MODULES,JTREG))
|
||||
$(eval $(call SetTestOpt,AOT_MODULES,GTEST))
|
||||
|
||||
$(eval $(call SetTestOpt,JOBS,JTREG))
|
||||
$(eval $(call SetTestOpt,TIMEOUT_FACTOR,JTREG))
|
||||
|
||||
$(eval $(call ParseKeywordVariable, JTREG, \
|
||||
KEYWORDS := JOBS TIMEOUT TEST_MODE ASSERT VERBOSE RETAIN MAX_MEM, \
|
||||
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS, \
|
||||
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR TEST_MODE ASSERT VERBOSE RETAIN \
|
||||
MAX_MEM, \
|
||||
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
|
||||
EXTRA_PROBLEM_LISTS AOT_MODULES, \
|
||||
))
|
||||
|
||||
ifneq ($(JTREG), )
|
||||
@@ -166,8 +287,8 @@ ifneq ($(JTREG), )
|
||||
endif
|
||||
|
||||
$(eval $(call ParseKeywordVariable, GTEST, \
|
||||
KEYWORDS := REPEAT, \
|
||||
STRING_KEYWORDS := OPTIONS VM_OPTIONS, \
|
||||
SINGLE_KEYWORDS := REPEAT, \
|
||||
STRING_KEYWORDS := OPTIONS VM_OPTIONS JAVA_OPTIONS AOT_MODULES, \
|
||||
))
|
||||
|
||||
ifneq ($(GTEST), )
|
||||
@@ -305,7 +426,7 @@ endef
|
||||
|
||||
# Helper function to determine if a test specification is a special test
|
||||
#
|
||||
# It is a special test if it is "special:" followed by a test name.
|
||||
# It is a special test if it is "special:" followed by a test name,
|
||||
define ParseSpecialTestSelection
|
||||
$(if $(filter special:%, $1), \
|
||||
$1 \
|
||||
@@ -396,19 +517,27 @@ define SetupRunGtestTestBody
|
||||
$1_GTEST_REPEAT :=--gtest_repeat=$$(GTEST_REPEAT)
|
||||
endif
|
||||
|
||||
run-test-$1:
|
||||
ifneq ($$(GTEST_AOT_MODULES), )
|
||||
$$(eval $$(call SetupAot, $1, \
|
||||
MODULES := $$(GTEST_AOT_MODULES), \
|
||||
VM_OPTIONS := $$(GTEST_VM_OPTIONS) $$(GTEST_JAVA_OPTIONS), \
|
||||
))
|
||||
endif
|
||||
|
||||
run-test-$1: $$($1_AOT_TARGETS)
|
||||
$$(call LogWarn)
|
||||
$$(call LogWarn, Running test '$$($1_TEST)')
|
||||
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/gtest, \
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/gtest, ( \
|
||||
$$(FIXPATH) $$(TEST_IMAGE_DIR)/hotspot/gtest/$$($1_VARIANT)/gtestLauncher \
|
||||
-jdk $(JDK_IMAGE_DIR) $$($1_GTEST_FILTER) \
|
||||
--gtest_output=xml:$$($1_TEST_RESULTS_DIR)/gtest.xml \
|
||||
$$($1_GTEST_REPEAT) $$(GTEST_OPTIONS) $$(GTEST_VM_OPTIONS) \
|
||||
-jdk $(JDK_IMAGE_DIR) $$($1_GTEST_FILTER) \
|
||||
--gtest_output=xml:$$($1_TEST_RESULTS_DIR)/gtest.xml \
|
||||
$$($1_GTEST_REPEAT) $$(GTEST_OPTIONS) $$(GTEST_VM_OPTIONS) \
|
||||
$$(GTEST_JAVA_OPTIONS) $$($1_AOT_OPTIONS) \
|
||||
> >($(TEE) $$($1_TEST_RESULTS_DIR)/gtest.txt) \
|
||||
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||
)
|
||||
))
|
||||
|
||||
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/gtest.txt
|
||||
|
||||
@@ -475,12 +604,11 @@ define SetupRunJtregTestBody
|
||||
|
||||
$1_TEST_NAME := $$(strip $$(patsubst jtreg:%, %, $$($1_TEST)))
|
||||
|
||||
$1_COMPONENT := \
|
||||
$1_TEST_ROOT := \
|
||||
$$(strip $$(foreach root, $$(JTREG_TESTROOTS), \
|
||||
$$(if $$(filter $$(root)%, $$(JTREG_TOPDIR)/$$($1_TEST_NAME)), \
|
||||
$$(lastword $$(subst /, $$(SPACE), $$(root))) \
|
||||
) \
|
||||
$$(if $$(filter $$(root)%, $$(JTREG_TOPDIR)/$$($1_TEST_NAME)), $$(root)) \
|
||||
))
|
||||
$1_COMPONENT := $$(lastword $$(subst /, $$(SPACE), $$($1_TEST_ROOT)))
|
||||
# This will work only as long as just hotspot has the additional "jtreg" directory
|
||||
ifeq ($$($1_COMPONENT), jtreg)
|
||||
$1_COMPONENT := hotspot
|
||||
@@ -503,6 +631,9 @@ define SetupRunJtregTestBody
|
||||
$$(eval $$(call SetJtregValue,$1,JTREG_BASIC_OPTIONS))
|
||||
$$(eval $$(call SetJtregValue,$1,JTREG_PROBLEM_LIST))
|
||||
|
||||
# Only the problem list for the current test root should be used.
|
||||
$1_JTREG_PROBLEM_LIST := $$(filter $$($1_TEST_ROOT)%, $$($1_JTREG_PROBLEM_LIST))
|
||||
|
||||
ifneq ($(TEST_JOBS), 0)
|
||||
$$(eval $$(call SetJtregValue,$1,JTREG_JOBS,$$(TEST_JOBS)))
|
||||
else
|
||||
@@ -515,9 +646,9 @@ define SetupRunJtregTestBody
|
||||
|
||||
# SPARC is in general slower per core so need to scale up timeouts a bit.
|
||||
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
|
||||
JTREG_TIMEOUT ?= 8
|
||||
JTREG_TIMEOUT_FACTOR ?= 8
|
||||
else
|
||||
JTREG_TIMEOUT ?= 4
|
||||
JTREG_TIMEOUT_FACTOR ?= 4
|
||||
endif
|
||||
JTREG_VERBOSE ?= fail,error,summary
|
||||
JTREG_RETAIN ?= fail,error
|
||||
@@ -529,10 +660,10 @@ define SetupRunJtregTestBody
|
||||
|
||||
$1_JTREG_BASIC_OPTIONS += -$$($1_JTREG_TEST_MODE) \
|
||||
-verbose:$$(JTREG_VERBOSE) -retain:$$(JTREG_RETAIN) \
|
||||
-concurrency:$$($1_JTREG_JOBS) -timeoutFactor:$$(JTREG_TIMEOUT) \
|
||||
-concurrency:$$($1_JTREG_JOBS) -timeoutFactor:$$(JTREG_TIMEOUT_FACTOR) \
|
||||
-vmoption:-XX:MaxRAMPercentage=$$($1_JTREG_MAX_RAM_PERCENTAGE)
|
||||
|
||||
$1_JTREG_BASIC_OPTIONS += -automatic -keywords:\!ignore -ignore:quiet
|
||||
$1_JTREG_BASIC_OPTIONS += -automatic -ignore:quiet
|
||||
|
||||
# Make it possible to specify the JIB_DATA_DIR for tests using the
|
||||
# JIB Artifact resolver
|
||||
@@ -562,24 +693,55 @@ define SetupRunJtregTestBody
|
||||
$1_JTREG_BASIC_OPTIONS += $$(addprefix -exclude:, $$($1_JTREG_PROBLEM_LIST))
|
||||
endif
|
||||
|
||||
ifneq ($$(JIB_JAR), )
|
||||
$1_JTREG_BASIC_OPTIONS += -cpa:$$(JIB_JAR)
|
||||
ifneq ($$(JTREG_EXTRA_PROBLEM_LISTS), )
|
||||
# Accept both absolute paths as well as relative to the current test root.
|
||||
$1_JTREG_BASIC_OPTIONS += $$(addprefix -exclude:, $$(wildcard \
|
||||
$$(JTREG_EXTRA_PROBLEM_LISTS) \
|
||||
$$(addprefix $$($1_TEST_ROOT)/, $$(JTREG_EXTRA_PROBLEM_LISTS)) \
|
||||
))
|
||||
endif
|
||||
|
||||
$1_JTREG_BASIC_OPTIONS += -e:TEST_IMAGE_GRAAL_DIR=${TEST_IMAGE_DIR}/hotspot/jtreg/graal
|
||||
ifneq ($$(JIB_HOME), )
|
||||
$1_JTREG_BASIC_OPTIONS += -e:JIB_HOME=$$(JIB_HOME)
|
||||
endif
|
||||
|
||||
$1_JTREG_BASIC_OPTIONS += -e:TEST_IMAGE_DIR=$(TEST_IMAGE_DIR)
|
||||
$1_JTREG_BASIC_OPTIONS += -e:TEST_IMAGE_GRAAL_DIR=$(TEST_IMAGE_DIR)/hotspot/jtreg/graal
|
||||
|
||||
ifneq ($$(JTREG_FAILURE_HANDLER_OPTIONS), )
|
||||
$1_JTREG_LAUNCHER_OPTIONS += -Djava.library.path="$(JTREG_FAILURE_HANDLER_DIR)"
|
||||
endif
|
||||
|
||||
ifneq ($$(JTREG_KEYWORDS), )
|
||||
# The keywords string may contain problematic characters and may be quoted
|
||||
# already when it arrives here. Remove any existing quotes and replace them
|
||||
# with one set of single quotes.
|
||||
$1_JTREG_KEYWORDS := \
|
||||
$$(strip $$(subst $$(SQUOTE),,$$(subst $$(DQUOTE),,$$(JTREG_KEYWORDS))))
|
||||
ifneq ($$($1_JTREG_KEYWORDS), )
|
||||
$1_JTREG_BASIC_OPTIONS += -k:'$$($1_JTREG_KEYWORDS)'
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($$(JTREG_AOT_MODULES), )
|
||||
$$(eval $$(call SetupAot, $1, \
|
||||
MODULES := $$(JTREG_AOT_MODULES), \
|
||||
VM_OPTIONS := $$(JTREG_VM_OPTIONS) $$(JTREG_JAVA_OPTIONS), \
|
||||
))
|
||||
endif
|
||||
|
||||
ifneq ($$($1_AOT_OPTIONS), )
|
||||
$1_JTREG_BASIC_OPTIONS += -vmoptions:"$$($1_AOT_OPTIONS)"
|
||||
endif
|
||||
|
||||
clean-workdir-$1:
|
||||
$$(RM) -r $$($1_TEST_SUPPORT_DIR)
|
||||
|
||||
run-test-$1: clean-workdir-$1
|
||||
run-test-$1: clean-workdir-$1 $$($1_AOT_TARGETS)
|
||||
$$(call LogWarn)
|
||||
$$(call LogWarn, Running test '$$($1_TEST)')
|
||||
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/jtreg, \
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/jtreg, ( \
|
||||
$$(JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \
|
||||
-Dprogram=jtreg -jar $$(JT_HOME)/lib/jtreg.jar \
|
||||
$$($1_JTREG_BASIC_OPTIONS) \
|
||||
@@ -592,7 +754,7 @@ define SetupRunJtregTestBody
|
||||
$$($1_TEST_NAME) \
|
||||
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||
)
|
||||
))
|
||||
|
||||
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/text/stats.txt
|
||||
|
||||
@@ -662,16 +824,16 @@ define SetupRunSpecialTestBody
|
||||
$$(error Invalid special test specification: $$($1_TEST_NAME))
|
||||
endif
|
||||
|
||||
run-test-$1:
|
||||
run-test-$1: $(TEST_PREREQS)
|
||||
$$(call LogWarn)
|
||||
$$(call LogWarn, Running test '$$($1_TEST)')
|
||||
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/test-execution, \
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/test-execution, ( \
|
||||
$$($1_TEST_COMMAND_LINE) \
|
||||
> >($(TEE) $$($1_TEST_RESULTS_DIR)/test-output.txt) \
|
||||
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||
)
|
||||
))
|
||||
|
||||
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/gtest.txt
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user