mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2026-01-22 16:30:53 +01:00
Compare commits
1146 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b81a9c75d | ||
|
|
76ee5495cd | ||
|
|
14623c6087 | ||
|
|
568be58e85 | ||
|
|
69448f9c1a | ||
|
|
3c2289d651 | ||
|
|
71ab5c95af | ||
|
|
c0623972cf | ||
|
|
a45a4b9465 | ||
|
|
d3fed12867 | ||
|
|
b653b9cc27 | ||
|
|
0813a47051 | ||
|
|
fa5cc4cc8e | ||
|
|
ad2e0c4df0 | ||
|
|
13c0369646 | ||
|
|
fe0544f8a7 | ||
|
|
926380d3b7 | ||
|
|
f3be6731d3 | ||
|
|
d24b7b7026 | ||
|
|
8a45abd5f3 | ||
|
|
cc287832c2 | ||
|
|
cf00677412 | ||
|
|
d92e00a519 | ||
|
|
486f90c134 | ||
|
|
b4e1aa87e3 | ||
|
|
84936e9278 | ||
|
|
259ba86c60 | ||
|
|
a85a72341b | ||
|
|
4da1745836 | ||
|
|
38a81913d3 | ||
|
|
27af0144ea | ||
|
|
f58aaab4a4 | ||
|
|
ab6988599c | ||
|
|
54843b700a | ||
|
|
8a0c3e53d5 | ||
|
|
8e8ee4b6f2 | ||
|
|
aa9b8f04bf | ||
|
|
f95ee79603 | ||
|
|
45c3e898ed | ||
|
|
db77227684 | ||
|
|
256b52387b | ||
|
|
e561933907 | ||
|
|
dcd78020e4 | ||
|
|
16593cf51c | ||
|
|
c59f9b374b | ||
|
|
476c484e37 | ||
|
|
a17fce7507 | ||
|
|
1ed03d82b2 | ||
|
|
79597f1ea6 | ||
|
|
7b5f9edb59 | ||
|
|
07c797720d | ||
|
|
a3ec0bb03a | ||
|
|
27b0f7726b | ||
|
|
9a65524e2f | ||
|
|
f9004fe443 | ||
|
|
2fbb936203 | ||
|
|
3601e30df7 | ||
|
|
37c0a13647 | ||
|
|
44532009ff | ||
|
|
07c9ba74fa | ||
|
|
235151ead8 | ||
|
|
df5209e70f | ||
|
|
74d3330e10 | ||
|
|
57aac2ab65 | ||
|
|
6a8a531359 | ||
|
|
7244dd6fab | ||
|
|
1f3578b79c | ||
|
|
45dec480ef | ||
|
|
58aae340a9 | ||
|
|
5ca268ca65 | ||
|
|
37aa7c165d | ||
|
|
f2f0cd86bf | ||
|
|
1f484dae4e | ||
|
|
63a126aa2d | ||
|
|
7d18ebd870 | ||
|
|
2edd550105 | ||
|
|
964aac28fe | ||
|
|
f85411f24a | ||
|
|
82dbe29fc8 | ||
|
|
54ce11431d | ||
|
|
a1df2da668 | ||
|
|
1b756bfa3a | ||
|
|
97e2689470 | ||
|
|
833bf06905 | ||
|
|
62a7fc60d3 | ||
|
|
20a3cb7ce3 | ||
|
|
f567fa0fd5 | ||
|
|
d00e7b92b4 | ||
|
|
f2773f6404 | ||
|
|
d5435642f9 | ||
|
|
2ee9491a60 | ||
|
|
32d675ca60 | ||
|
|
0d96546ab9 | ||
|
|
e8bc87956a | ||
|
|
494d3873b1 | ||
|
|
8b4e6ba01f | ||
|
|
0fc92637d2 | ||
|
|
e81210f5fe | ||
|
|
f45b8408a0 | ||
|
|
0c67fba11f | ||
|
|
bf7d6d3a0f | ||
|
|
e230719ad3 | ||
|
|
f75da2235a | ||
|
|
802ef38060 | ||
|
|
e61f6fc394 | ||
|
|
0bfb12162f | ||
|
|
1d9c2f7a6e | ||
|
|
a25e1dc53c | ||
|
|
1ef4e48488 | ||
|
|
0cc66aeae8 | ||
|
|
da477b1366 | ||
|
|
01b87ba8e2 | ||
|
|
e44e3f0c19 | ||
|
|
c3d3662e52 | ||
|
|
3e122419b2 | ||
|
|
ec53fba039 | ||
|
|
4cc6cb9d9d | ||
|
|
d1edda8ff5 | ||
|
|
21f4eb2233 | ||
|
|
6e6ae596d6 | ||
|
|
ea2c82e74f | ||
|
|
b5707b0376 | ||
|
|
b00eedeb02 | ||
|
|
3a090777ba | ||
|
|
dd2034b007 | ||
|
|
aa5b718933 | ||
|
|
695bb39391 | ||
|
|
ec96b1f187 | ||
|
|
fd4b2f2868 | ||
|
|
9d7c13eb14 | ||
|
|
e89abb7d2d | ||
|
|
77cd917a97 | ||
|
|
1c1c4410b2 | ||
|
|
d546d13861 | ||
|
|
8353a33350 | ||
|
|
e70747b4e9 | ||
|
|
967a28c3d8 | ||
|
|
22d6d315f2 | ||
|
|
00decca46a | ||
|
|
9f8cc42135 | ||
|
|
871b7dab14 | ||
|
|
0c40128fec | ||
|
|
6eb7c3ad0e | ||
|
|
083e014d0c | ||
|
|
45e5b31a18 | ||
|
|
9bfffa082e | ||
|
|
bd5855337c | ||
|
|
755ecf6b73 | ||
|
|
dedc05cb40 | ||
|
|
3d20a8b20a | ||
|
|
a28ab7b62a | ||
|
|
7ea9ba1f6c | ||
|
|
fc1d94ef1a | ||
|
|
a9bc149992 | ||
|
|
1c0f0f4211 | ||
|
|
ad5f628c58 | ||
|
|
2ddf72874f | ||
|
|
3aaffd6309 | ||
|
|
85a602355f | ||
|
|
4b03e135e1 | ||
|
|
2e0a17c560 | ||
|
|
36ef4c1a92 | ||
|
|
b47438cabc | ||
|
|
543163a03b | ||
|
|
68af7c1365 | ||
|
|
e4925a3959 | ||
|
|
7b029ea6ba | ||
|
|
35fd5d88eb | ||
|
|
9825c33560 | ||
|
|
cb37282a12 | ||
|
|
4c6d22a6ce | ||
|
|
37d3146cca | ||
|
|
ecfa38ffa8 | ||
|
|
5fce02e39a | ||
|
|
83dc2e3e45 | ||
|
|
49133809c2 | ||
|
|
6397d564a5 | ||
|
|
0def5316cd | ||
|
|
57e0da1578 | ||
|
|
17c77b5d7a | ||
|
|
d889264c61 | ||
|
|
ae1a9a0b25 | ||
|
|
4040927d17 | ||
|
|
8d0d9eaa9c | ||
|
|
aff7689a00 | ||
|
|
3677b55b45 | ||
|
|
0ade2641f7 | ||
|
|
f5b3618c42 | ||
|
|
cbc9040f3a | ||
|
|
2712bc3f79 | ||
|
|
af243ca334 | ||
|
|
77398430b5 | ||
|
|
eb8b789015 | ||
|
|
08274e6fea | ||
|
|
7db5abddd1 | ||
|
|
124fc4a83d | ||
|
|
459193710f | ||
|
|
7676be8a99 | ||
|
|
861cc671e2 | ||
|
|
8d88be233b | ||
|
|
8a804f653d | ||
|
|
5a539e8da7 | ||
|
|
b2f0cbdca1 | ||
|
|
891df2128a | ||
|
|
d4fb91ba04 | ||
|
|
20123ea4de | ||
|
|
8e2c006cd1 | ||
|
|
ae52053757 | ||
|
|
87cda21c5d | ||
|
|
0657acf534 | ||
|
|
b66a0d1613 | ||
|
|
9bff3b76f2 | ||
|
|
f9bb3676e3 | ||
|
|
b17a745d7f | ||
|
|
0da4314e95 | ||
|
|
88c96dd3eb | ||
|
|
dd7f2d912b | ||
|
|
4c652d9eca | ||
|
|
5963300c0c | ||
|
|
b0d6952811 | ||
|
|
504a626597 | ||
|
|
6e7cd7627d | ||
|
|
477f471159 | ||
|
|
6b2184e8d1 | ||
|
|
27c8826090 | ||
|
|
6e6c64c6f6 | ||
|
|
617a196fd3 | ||
|
|
1edc245574 | ||
|
|
6ad6b1c454 | ||
|
|
90257f9505 | ||
|
|
c48cd88652 | ||
|
|
3c3256414f | ||
|
|
fd9ac62161 | ||
|
|
3ba317167d | ||
|
|
4b3dfe1d22 | ||
|
|
92d2982f3f | ||
|
|
966ab219b4 | ||
|
|
aa557b9b01 | ||
|
|
d4a795d75a | ||
|
|
a3040fcc2b | ||
|
|
ce61eb6ff9 | ||
|
|
26e5c112da | ||
|
|
0bc804d6ef | ||
|
|
3493973186 | ||
|
|
4772354f4c | ||
|
|
43bb399375 | ||
|
|
1a6c83b771 | ||
|
|
b6b0317f83 | ||
|
|
4cfbb3b5ec | ||
|
|
13f0f126b9 | ||
|
|
67f001186b | ||
|
|
1b66cecd31 | ||
|
|
0cc49fd9ea | ||
|
|
c89556f6cd | ||
|
|
4d6e6f6741 | ||
|
|
e52a340d7f | ||
|
|
af529be069 | ||
|
|
e265b2a291 | ||
|
|
b7d2bde8e3 | ||
|
|
0971d34646 | ||
|
|
0ae8341057 | ||
|
|
5acf2d7cb4 | ||
|
|
a6564d495b | ||
|
|
54c093ab0e | ||
|
|
af76c0c199 | ||
|
|
a9db5bb373 | ||
|
|
a2cff2634c | ||
|
|
554f44ecb1 | ||
|
|
f714ac52bf | ||
|
|
6cbc234ad1 | ||
|
|
57bf603b73 | ||
|
|
1df77ec137 | ||
|
|
fcc119531a | ||
|
|
226b8e680a | ||
|
|
464085ed90 | ||
|
|
f5d1b5bda2 | ||
|
|
30205bb289 | ||
|
|
86ef7b20eb | ||
|
|
d61c0c79cf | ||
|
|
7ff19694df | ||
|
|
257c71c35f | ||
|
|
d9cb410efc | ||
|
|
acbe093a66 | ||
|
|
32d410a1af | ||
|
|
357902415d | ||
|
|
470c0eb216 | ||
|
|
dd9bd31b86 | ||
|
|
8179a191f0 | ||
|
|
15943e4242 | ||
|
|
0bcf17674e | ||
|
|
cc2861a993 | ||
|
|
64a1a08ff9 | ||
|
|
95fc16bdfa | ||
|
|
f58e08e258 | ||
|
|
18cd16d2ea | ||
|
|
cfe9026fe0 | ||
|
|
eeac3da795 | ||
|
|
791fc5791a | ||
|
|
e052d7f4bc | ||
|
|
1d16c91ba7 | ||
|
|
54a2c5a6d1 | ||
|
|
5214a17d81 | ||
|
|
471a427d10 | ||
|
|
5d1ad39684 | ||
|
|
97fc8deb1d | ||
|
|
dd69a68d09 | ||
|
|
07f0612c9a | ||
|
|
93f96d8c9e | ||
|
|
5d82d67a9e | ||
|
|
348a0521e1 | ||
|
|
bc6a3c7b83 | ||
|
|
16a127524c | ||
|
|
c1a3347f17 | ||
|
|
37b08c7bf9 | ||
|
|
dc74ea21f1 | ||
|
|
c1040897cd | ||
|
|
923462467e | ||
|
|
2f3e494b80 | ||
|
|
e804236f05 | ||
|
|
adaf3b9014 | ||
|
|
48b77a6969 | ||
|
|
8ec3197683 | ||
|
|
61e072d11c | ||
|
|
36c00fdd74 | ||
|
|
2bd90c2149 | ||
|
|
2a1d9cfead | ||
|
|
4d796ee8ab | ||
|
|
f0f78a9125 | ||
|
|
1451642317 | ||
|
|
8159a1ab70 | ||
|
|
7318b22209 | ||
|
|
2ae8e31183 | ||
|
|
893909558b | ||
|
|
da9cc5c9f4 | ||
|
|
330adc03a9 | ||
|
|
28bbdc5ebb | ||
|
|
a6faf5d33a | ||
|
|
0ca5cb13a3 | ||
|
|
7c3cfd13e3 | ||
|
|
8c9d5ad4f8 | ||
|
|
0ca74f538e | ||
|
|
1e270ea4f5 | ||
|
|
b17269ad52 | ||
|
|
350808a5a3 | ||
|
|
d0c365a7b9 | ||
|
|
80dc6cebc9 | ||
|
|
228e8e94fe | ||
|
|
852e71d9f0 | ||
|
|
0599a05f8c | ||
|
|
987656d690 | ||
|
|
2660a9268b | ||
|
|
ef8486a1a4 | ||
|
|
62f22633d1 | ||
|
|
b28f9dab80 | ||
|
|
54854d9300 | ||
|
|
75c1e99968 | ||
|
|
c29242ebb0 | ||
|
|
7841e5cc38 | ||
|
|
e9f97b2e8c | ||
|
|
59d85bad34 | ||
|
|
66f59c2c16 | ||
|
|
0dda3c14eb | ||
|
|
620c8a045f | ||
|
|
7ec0132ad3 | ||
|
|
80bd8c3549 | ||
|
|
15f4b30459 | ||
|
|
4c1cd66d22 | ||
|
|
6346c3338c | ||
|
|
604a115a5b | ||
|
|
59e495e4d3 | ||
|
|
799a2c844d | ||
|
|
52cc6cd063 | ||
|
|
3582fd9e93 | ||
|
|
53fc495e3a | ||
|
|
db1e44c2dd | ||
|
|
2c73a1f39d | ||
|
|
e8975be94b | ||
|
|
9c19d89c9c | ||
|
|
b1817a30a0 | ||
|
|
eeb345a286 | ||
|
|
89458e36af | ||
|
|
3d3e3df8f0 | ||
|
|
17e65bbd23 | ||
|
|
1c055076e0 | ||
|
|
011958d30b | ||
|
|
984cd02dfb | ||
|
|
4b4d35289a | ||
|
|
43c47b1ad7 | ||
|
|
5425573bb4 | ||
|
|
a3e07d950a | ||
|
|
2ea3f546c2 | ||
|
|
971479153d | ||
|
|
618f3a82a4 | ||
|
|
43588648ca | ||
|
|
7b418f9aba | ||
|
|
41ef2b2490 | ||
|
|
d991ec4f9f | ||
|
|
b7b917a0a8 | ||
|
|
a37465b8fa | ||
|
|
632d2d2690 | ||
|
|
84b4e9bb41 | ||
|
|
e7f8003edd | ||
|
|
cdc1582d1d | ||
|
|
ec1d338e15 | ||
|
|
c2cbeb3ee8 | ||
|
|
f1001a06b3 | ||
|
|
5d1c44871a | ||
|
|
d0a2f13dea | ||
|
|
83339500ba | ||
|
|
879ea78037 | ||
|
|
78c514d085 | ||
|
|
ac93ab0e0a | ||
|
|
67dd3f7343 | ||
|
|
243c76f59f | ||
|
|
ddb106be7a | ||
|
|
1af7c33df5 | ||
|
|
d67e7ccda5 | ||
|
|
977e09489d | ||
|
|
96a542feb2 | ||
|
|
2cb659e7f4 | ||
|
|
bbc57483ce | ||
|
|
e062dff1bf | ||
|
|
a41b12f430 | ||
|
|
e02627ca0a | ||
|
|
2ff22087f2 | ||
|
|
a6bab2a379 | ||
|
|
f5a7de8627 | ||
|
|
612d8c6cb1 | ||
|
|
d7f0de272c | ||
|
|
dfbc6919e1 | ||
|
|
4e6cd67fec | ||
|
|
4dc421caa0 | ||
|
|
af86cd3d8c | ||
|
|
6cd1c0c14e | ||
|
|
4a4d8ed83b | ||
|
|
5a96a5db13 | ||
|
|
b65f7ec2f1 | ||
|
|
6c8d0e617f | ||
|
|
e72742eeb5 | ||
|
|
b9de0a7556 | ||
|
|
5ae4320921 | ||
|
|
efed7a7f65 | ||
|
|
b2010a7481 | ||
|
|
ea8b75cfe4 | ||
|
|
6882f0eb39 | ||
|
|
92067e2003 | ||
|
|
2677dd6d23 | ||
|
|
4f3f74c141 | ||
|
|
87340fd540 | ||
|
|
bc7a1ea249 | ||
|
|
84f23149e2 | ||
|
|
4dd236b40a | ||
|
|
522b65743c | ||
|
|
441c33f0b1 | ||
|
|
2342684f2c | ||
|
|
0143cf1d46 | ||
|
|
0184f46bdf | ||
|
|
cca91f7bcc | ||
|
|
b4e2ce0094 | ||
|
|
f3abb82989 | ||
|
|
92deab5465 | ||
|
|
70fce07a38 | ||
|
|
15d3329edd | ||
|
|
757a742ac7 | ||
|
|
890bcedd49 | ||
|
|
c8e0315114 | ||
|
|
3ad3950560 | ||
|
|
fb27ddcbe5 | ||
|
|
3bb2dc8e7f | ||
|
|
c7c20661ee | ||
|
|
be58cbc417 | ||
|
|
109e21af66 | ||
|
|
adf40d25a1 | ||
|
|
292d909e81 | ||
|
|
a7f83582d3 | ||
|
|
02fae60740 | ||
|
|
5d588eda97 | ||
|
|
3471ac9a90 | ||
|
|
fd89ab8dac | ||
|
|
dbab827bee | ||
|
|
3216d198f3 | ||
|
|
2bf6285c80 | ||
|
|
c83fcbd18f | ||
|
|
74ac5df96f | ||
|
|
5e3ecff7a6 | ||
|
|
535804554d | ||
|
|
73b83e0188 | ||
|
|
2583feb21b | ||
|
|
44fb92e2aa | ||
|
|
f528124f57 | ||
|
|
572c14efc6 | ||
|
|
6e18883d8f | ||
|
|
ce36f6ea85 | ||
|
|
fff7f35300 | ||
|
|
128c6c648c | ||
|
|
31f7fc043b | ||
|
|
d9ca438d06 | ||
|
|
e8568b890a | ||
|
|
7f0e9bd632 | ||
|
|
728157fa03 | ||
|
|
59d0c739ac | ||
|
|
4545ed6842 | ||
|
|
0fd1b68972 | ||
|
|
0e906975a8 | ||
|
|
2baf526fce | ||
|
|
ea12615d2f | ||
|
|
393dc7ade7 | ||
|
|
e5491a2605 | ||
|
|
04c47da118 | ||
|
|
3164c98f4c | ||
|
|
3b9059a147 | ||
|
|
c3806b93c4 | ||
|
|
f42dab8592 | ||
|
|
39715f3da7 | ||
|
|
21db9a507b | ||
|
|
c79baaa811 | ||
|
|
62fbc3f883 | ||
|
|
0c1aa2bc8a | ||
|
|
c33fa55cf8 | ||
|
|
59980ac8e4 | ||
|
|
fc01666a58 | ||
|
|
fed3af8ae0 | ||
|
|
95c8022958 | ||
|
|
0c37008917 | ||
|
|
46251bc6e2 | ||
|
|
bba6be79e0 | ||
|
|
2579373dd0 | ||
|
|
cb6e9cb728 | ||
|
|
0494291490 | ||
|
|
25f4b04365 | ||
|
|
0225eb434c | ||
|
|
e25982071d | ||
|
|
b542bcba57 | ||
|
|
4ab77ac60d | ||
|
|
e9d9cc6d0a | ||
|
|
87aa3ce03e | ||
|
|
81ee7d28f8 | ||
|
|
3c08e6b311 | ||
|
|
c86c51cc72 | ||
|
|
9981c85d46 | ||
|
|
54b4576f78 | ||
|
|
6aaf141f61 | ||
|
|
1877533f75 | ||
|
|
c142fbbbaf | ||
|
|
9c86c82091 | ||
|
|
eeaf0bbabc | ||
|
|
e7795851d2 | ||
|
|
460d879a75 | ||
|
|
732f1065fe | ||
|
|
d852e99ae9 | ||
|
|
a13af65043 | ||
|
|
f1967cfaab | ||
|
|
ea21c46531 | ||
|
|
1b8f466dba | ||
|
|
ac399e9777 | ||
|
|
1fec62f299 | ||
|
|
01b9f95c62 | ||
|
|
64286074ba | ||
|
|
3f1174aa47 | ||
|
|
f804f2ce8e | ||
|
|
1304390b3e | ||
|
|
11319c2aeb | ||
|
|
8cdead0c94 | ||
|
|
f93beacd2f | ||
|
|
3212dc9c6f | ||
|
|
3e60e82814 | ||
|
|
f7b183059a | ||
|
|
5564effe9c | ||
|
|
a8eb728680 | ||
|
|
a694e9e34d | ||
|
|
95e3190d96 | ||
|
|
8e7b45b820 | ||
|
|
74ca6ca25b | ||
|
|
86f63f9703 | ||
|
|
013a5eeeb9 | ||
|
|
77ad998b6e | ||
|
|
532a6ec7e3 | ||
|
|
e05b2f2c3b | ||
|
|
cce77a7001 | ||
|
|
889150b47a | ||
|
|
d1249aa5cb | ||
|
|
a79ce4e748 | ||
|
|
8dd94a2c14 | ||
|
|
569de453c3 | ||
|
|
403a9bc796 | ||
|
|
8f24d25168 | ||
|
|
a40c17b730 | ||
|
|
2a6ec88cd0 | ||
|
|
9a0fa82424 | ||
|
|
55fa19b508 | ||
|
|
32b650c024 | ||
|
|
ef3f2ed9ba | ||
|
|
35387d5cb6 | ||
|
|
9f37ba44b8 | ||
|
|
dfb24ae4b7 | ||
|
|
82a8bd7e92 | ||
|
|
cc2b792704 | ||
|
|
75c0a5b828 | ||
|
|
83a5d5996b | ||
|
|
cbaf6e807e | ||
|
|
0526402a02 | ||
|
|
834189527e | ||
|
|
ac6be16519 | ||
|
|
4ad18cf088 | ||
|
|
d8f4e97bd3 | ||
|
|
f783244caf | ||
|
|
b3a0e482ad | ||
|
|
fafe8b3f8d | ||
|
|
0b6fd4820c | ||
|
|
351560414d | ||
|
|
30e134e909 | ||
|
|
d48694d0f3 | ||
|
|
c45d613faa | ||
|
|
29ea6429d2 | ||
|
|
77c3bbf105 | ||
|
|
a5934cddca | ||
|
|
fd1bb078ea | ||
|
|
4c997ba830 | ||
|
|
1b997db734 | ||
|
|
688712f75c | ||
|
|
df063f7db1 | ||
|
|
9ccae7078e | ||
|
|
f640fc5a1e | ||
|
|
bad9ffe471 | ||
|
|
0dff3276e8 | ||
|
|
b5d965656d | ||
|
|
d53b02eb9f | ||
|
|
1a271645a8 | ||
|
|
a8edd7a12f | ||
|
|
e31003a064 | ||
|
|
5b5bc6c26e | ||
|
|
8e7a3cb5ab | ||
|
|
dc4edd3fe8 | ||
|
|
649f2d8835 | ||
|
|
d8444aa45e | ||
|
|
c4dcce4bca | ||
|
|
70f5693356 | ||
|
|
dee5121bd4 | ||
|
|
cdf6979259 | ||
|
|
f5cdabad06 | ||
|
|
9515560c54 | ||
|
|
cfc9a881af | ||
|
|
9925014035 | ||
|
|
44e8c462b4 | ||
|
|
8e01ffb3a7 | ||
|
|
2dd00f580c | ||
|
|
e291a67e96 | ||
|
|
20124ac755 | ||
|
|
c43bdf7165 | ||
|
|
604ea90d55 | ||
|
|
09b4032f8b | ||
|
|
a8fe2d97a2 | ||
|
|
b9b900a61c | ||
|
|
f190f4e638 | ||
|
|
d260a4e794 | ||
|
|
95497772e7 | ||
|
|
124c63c17c | ||
|
|
918068a115 | ||
|
|
00d06d4a82 | ||
|
|
feb223aacf | ||
|
|
c3addbb1c0 | ||
|
|
1305fb5ca8 | ||
|
|
c20b3aa9c5 | ||
|
|
7b5bd251ef | ||
|
|
28c5e483a8 | ||
|
|
da6d1fc0e0 | ||
|
|
31e50f2c76 | ||
|
|
dddd4e7c81 | ||
|
|
048bffad79 | ||
|
|
15efb2bdeb | ||
|
|
b6bd190d8d | ||
|
|
ba670ecbb9 | ||
|
|
cf7154498f | ||
|
|
570897498b | ||
|
|
0709a6a1fb | ||
|
|
2961b7eede | ||
|
|
167ce4dae2 | ||
|
|
108cd69516 | ||
|
|
b96ba19807 | ||
|
|
779b4e1d19 | ||
|
|
dbc6e11010 | ||
|
|
910053b74e | ||
|
|
7b3bf97760 | ||
|
|
86dc760f9e | ||
|
|
1504804896 | ||
|
|
af0088076d | ||
|
|
c67149be4b | ||
|
|
1f36ed1fae | ||
|
|
9b7805e3b4 | ||
|
|
c42b796f91 | ||
|
|
a814293e1f | ||
|
|
88fe19c5b2 | ||
|
|
6f9717b46b | ||
|
|
d4eeeb82cb | ||
|
|
9048cef761 | ||
|
|
549c6c22ae | ||
|
|
aa43824249 | ||
|
|
adbd200dc5 | ||
|
|
b4ab5fe1da | ||
|
|
33369719b2 | ||
|
|
b4490386fe | ||
|
|
784fa0add7 | ||
|
|
ca78f7bd76 | ||
|
|
2efa89a89e | ||
|
|
e322e77e95 | ||
|
|
40bf3b1167 | ||
|
|
17ef8cae33 | ||
|
|
caa6b74b5b | ||
|
|
28913f4747 | ||
|
|
d4b040f42d | ||
|
|
354ed1034d | ||
|
|
7746664819 | ||
|
|
2c8ada689f | ||
|
|
f3f078846f | ||
|
|
be6be15efa | ||
|
|
210a06a287 | ||
|
|
64f95cfb32 | ||
|
|
ddb55ede2c | ||
|
|
699ad45b43 | ||
|
|
784a0f0496 | ||
|
|
7e13cdb799 | ||
|
|
7905788e96 | ||
|
|
47fe9ef5bf | ||
|
|
62e1e7950b | ||
|
|
de7467146f | ||
|
|
9c92da5249 | ||
|
|
a5c25d8837 | ||
|
|
e93be3acdf | ||
|
|
7ac40f3b9f | ||
|
|
53b37fe153 | ||
|
|
08288819dd | ||
|
|
4cdb97893c | ||
|
|
9918b6d384 | ||
|
|
f67c5361cc | ||
|
|
239b4bb020 | ||
|
|
0d2952e5b3 | ||
|
|
fdc8455c45 | ||
|
|
20f55abd27 | ||
|
|
925084c496 | ||
|
|
bdf9902f75 | ||
|
|
17aacde50f | ||
|
|
9dc9a64fa4 | ||
|
|
64782a7524 | ||
|
|
b0db33333a | ||
|
|
651cbebb96 | ||
|
|
c8cc94a384 | ||
|
|
740169ce1c | ||
|
|
13cbb3a416 | ||
|
|
1f9521e6cb | ||
|
|
a716f7934b | ||
|
|
4c9ea7e66a | ||
|
|
b206d2d149 | ||
|
|
2728770e3d | ||
|
|
ef17ee4dea | ||
|
|
72f286a9ba | ||
|
|
b8db0c383b | ||
|
|
d579916a6b | ||
|
|
26c03c1860 | ||
|
|
a802b9816a | ||
|
|
bf0623b11f | ||
|
|
3f5e48a44e | ||
|
|
5b583e4792 | ||
|
|
3b1ec3e660 | ||
|
|
58b6937b09 | ||
|
|
6458ebc8e4 | ||
|
|
82c77ca807 | ||
|
|
d4de475747 | ||
|
|
50c37f53f2 | ||
|
|
6037ccdd50 | ||
|
|
270cf67e5f | ||
|
|
d51f4f471f | ||
|
|
8fa46c8f72 | ||
|
|
7cf71bc2d3 | ||
|
|
affbd72aa3 | ||
|
|
9e2d9ac59a | ||
|
|
2bf5c9a687 | ||
|
|
70008da6b4 | ||
|
|
d7b43af591 | ||
|
|
9f8bfab290 | ||
|
|
f080430440 | ||
|
|
834d92dd72 | ||
|
|
198cec9e1b | ||
|
|
97200a78b1 | ||
|
|
31d981e5ea | ||
|
|
a144988600 | ||
|
|
e26d3b3c01 | ||
|
|
c74a9235fc | ||
|
|
535fba8bfc | ||
|
|
af05139133 | ||
|
|
19017358b1 | ||
|
|
0f801fe6fd | ||
|
|
701ea3beaa | ||
|
|
5e680d0594 | ||
|
|
b9c396625c | ||
|
|
ad8914616b | ||
|
|
7e211d7daa | ||
|
|
7039c6616a | ||
|
|
453e8beb43 | ||
|
|
33d0363e03 | ||
|
|
302a6c068d | ||
|
|
0408f9c543 | ||
|
|
a7df5a4063 | ||
|
|
406cf611d9 | ||
|
|
1cf83a403f | ||
|
|
5cdb4b1960 | ||
|
|
46d5b682db | ||
|
|
68bff04515 | ||
|
|
d917e1874e | ||
|
|
695d8656c5 | ||
|
|
09da87cf5c | ||
|
|
7acdcc1034 | ||
|
|
f62b2bd9cd | ||
|
|
02da5f9970 | ||
|
|
ed714af854 | ||
|
|
7d4df6a83f | ||
|
|
ae030bcbc5 | ||
|
|
f12d044929 | ||
|
|
97544be5b6 | ||
|
|
47b86690b6 | ||
|
|
983f75caa6 | ||
|
|
af64d316c0 | ||
|
|
cc445926cf | ||
|
|
523d553e13 | ||
|
|
f3da7ff66e | ||
|
|
53bf1bfdab | ||
|
|
9d4b25e788 | ||
|
|
c254c9d095 | ||
|
|
e833c1d179 | ||
|
|
e7d52e25a2 | ||
|
|
2cf7c01759 | ||
|
|
ce5024f66f | ||
|
|
ff3db52044 | ||
|
|
8fc8fdca96 | ||
|
|
cf4a4966a8 | ||
|
|
3d12c0225b | ||
|
|
b2a58bec4a | ||
|
|
39526e28bc | ||
|
|
a1795901ee | ||
|
|
f7ba3b7e42 | ||
|
|
07612281b0 | ||
|
|
729164f534 | ||
|
|
9ff40346dd | ||
|
|
1855e9d201 | ||
|
|
6d595614a2 | ||
|
|
9254e12993 | ||
|
|
395aea307f | ||
|
|
3475e12fa6 | ||
|
|
cb5ef3da19 | ||
|
|
13d4ddc35b | ||
|
|
6633855ca7 | ||
|
|
d5cd2f2caa | ||
|
|
dfeeb6f8f3 | ||
|
|
68b2057205 | ||
|
|
f3b1f60a29 | ||
|
|
2471f8f7c5 | ||
|
|
31bc689977 | ||
|
|
33f34d540e | ||
|
|
444a0d98ac | ||
|
|
08400f18ba | ||
|
|
fe807217a7 | ||
|
|
50f99c3208 | ||
|
|
bbaeacb597 | ||
|
|
0f580974a6 | ||
|
|
5a8e1e43a4 | ||
|
|
fb297705f6 | ||
|
|
8cd87e731b | ||
|
|
c76a06aeb5 | ||
|
|
0530f4e517 | ||
|
|
1a6533225d | ||
|
|
c2ccf4ca85 | ||
|
|
03dca565cf | ||
|
|
86c9241cce | ||
|
|
fbe9266622 | ||
|
|
19043538e1 | ||
|
|
53ef59c402 | ||
|
|
a9c2ab67c4 | ||
|
|
e90b579b29 | ||
|
|
b42c1ad108 | ||
|
|
9b6d0a7e94 | ||
|
|
53a0acee06 | ||
|
|
8f400b9aab | ||
|
|
e0baf012b1 | ||
|
|
17695962ac | ||
|
|
b97a4f6cdc | ||
|
|
7aafc69a96 | ||
|
|
2adef6a1f8 | ||
|
|
4aede33fbf | ||
|
|
0207d761f4 | ||
|
|
33ed0365c3 | ||
|
|
ac28be721f | ||
|
|
0cb0ecf443 | ||
|
|
f1143b1b57 | ||
|
|
d46f404b31 | ||
|
|
f4b05a1168 | ||
|
|
f7a4be75fb | ||
|
|
d4b473d890 | ||
|
|
da2339cf69 | ||
|
|
f2e10dce78 | ||
|
|
fa564e9d58 | ||
|
|
d0c8ff8fdf | ||
|
|
7e940efcbc | ||
|
|
c6dd2ab9d7 | ||
|
|
d9c1364dde | ||
|
|
aaa897148a | ||
|
|
2cc40afa07 | ||
|
|
0164145afc | ||
|
|
03276a5153 | ||
|
|
3ee1e60595 | ||
|
|
512db0ff31 | ||
|
|
fcb35ed40e | ||
|
|
bdd64d6f7d | ||
|
|
5d0e8b6981 | ||
|
|
975316e3e5 | ||
|
|
0901548833 | ||
|
|
dae4c493e4 | ||
|
|
94b473e464 | ||
|
|
900d967da5 | ||
|
|
d482d7f5b9 | ||
|
|
edff51e5fd | ||
|
|
267144311c | ||
|
|
59b0de6bc7 | ||
|
|
db4405d0f8 | ||
|
|
7e948f7ccb | ||
|
|
3fa99844a6 | ||
|
|
4285e3d6db | ||
|
|
560e2927e3 | ||
|
|
e5b56bafa9 | ||
|
|
5a89cb01bc | ||
|
|
bc28baeba9 | ||
|
|
aa2fc54b61 | ||
|
|
7e1cce8cb5 | ||
|
|
3419beec7f | ||
|
|
e01cd7c3ed | ||
|
|
a941bc2de6 | ||
|
|
65f0829d64 | ||
|
|
130ce7c6b8 | ||
|
|
b623398555 | ||
|
|
04f02ac6b2 | ||
|
|
024a240e1b | ||
|
|
c8cff1bd6f | ||
|
|
c15e10fb6c | ||
|
|
b92ce2699b | ||
|
|
c68419f2f7 | ||
|
|
6fb84e2c91 | ||
|
|
a9b9831f2a | ||
|
|
b021d37cec | ||
|
|
78d371266a | ||
|
|
f7791ad0ea | ||
|
|
5ad6286b73 | ||
|
|
a9d46f3413 | ||
|
|
6e3e470dac | ||
|
|
d959c22a95 | ||
|
|
230726ea58 | ||
|
|
ecf00785f2 | ||
|
|
5c39a36641 | ||
|
|
47d3c2a175 | ||
|
|
bf0e625fe0 | ||
|
|
0960ecc407 | ||
|
|
590337e2f2 | ||
|
|
4662e06bff | ||
|
|
7df48f97d2 | ||
|
|
32dd1eef88 | ||
|
|
45f1b72a6e | ||
|
|
39ec58b63c | ||
|
|
68c5957b9e | ||
|
|
bf439f8c93 | ||
|
|
b7a34f728d | ||
|
|
8e07839179 | ||
|
|
b12e7f1bf9 | ||
|
|
1aa87e0078 | ||
|
|
74be2d9ef6 | ||
|
|
8e10c2bfc7 | ||
|
|
9ec27d0e9f | ||
|
|
91e6bf6791 | ||
|
|
3da7e393ee | ||
|
|
c41a283f52 | ||
|
|
41d5809caf | ||
|
|
5d4ea9b954 | ||
|
|
96641c0c42 | ||
|
|
67f1bd7ff1 | ||
|
|
062db59eeb | ||
|
|
ee4a6c23ee | ||
|
|
1499e5eac0 | ||
|
|
2f62f15b09 | ||
|
|
905bcbe34e | ||
|
|
8d28734ede | ||
|
|
f1dd559e20 | ||
|
|
4fe0ca9ec3 | ||
|
|
bde7a7ae03 | ||
|
|
2d8c649054 | ||
|
|
b647a1259b | ||
|
|
dbf0905ff4 | ||
|
|
39fa52b5f7 | ||
|
|
42261d752a | ||
|
|
b6c6cc5d99 | ||
|
|
778ed1a760 | ||
|
|
aa6c568a06 | ||
|
|
956d44d2da | ||
|
|
f6a79e340f | ||
|
|
ef7cc2105c | ||
|
|
645be42f76 | ||
|
|
a50b06e851 | ||
|
|
c37c8e5d34 | ||
|
|
124ba45fb8 | ||
|
|
0e06bf3b04 | ||
|
|
a277590c89 | ||
|
|
5264881a15 | ||
|
|
e94b05c720 | ||
|
|
3eb49fecea | ||
|
|
2e332c2760 | ||
|
|
c328f8fa2a | ||
|
|
4d6fb51551 | ||
|
|
0d1a3053cd | ||
|
|
24fe8ad74c | ||
|
|
f347ff9986 | ||
|
|
ebc012ece2 | ||
|
|
8c460b043e | ||
|
|
3df4b034fb | ||
|
|
a6fc485a22 | ||
|
|
a113e166e9 | ||
|
|
e4e1e8f66c | ||
|
|
308c068b36 | ||
|
|
d76c1089ef | ||
|
|
005a330387 | ||
|
|
e2cfe2e14a | ||
|
|
b6cdfd685d | ||
|
|
25e9901aea | ||
|
|
6f526e1bc3 | ||
|
|
a7e07fdbc1 | ||
|
|
7a0c8b14aa | ||
|
|
0b35460fa0 | ||
|
|
a0219da966 | ||
|
|
ce5ae51773 | ||
|
|
59e9700c4e | ||
|
|
28c112fcf0 | ||
|
|
34bb0a5e6e | ||
|
|
33b9d77065 | ||
|
|
a75299c3ab | ||
|
|
407abf5d65 | ||
|
|
625821dae7 | ||
|
|
b544b8b7d4 | ||
|
|
ba9ee8cb28 | ||
|
|
deb06539b0 | ||
|
|
cbaeb00fce | ||
|
|
2776ff3b03 | ||
|
|
409157d2af | ||
|
|
b5a646ee6c | ||
|
|
26048ea21e | ||
|
|
37e1835be7 | ||
|
|
26d24263c7 | ||
|
|
ccec5d1e85 | ||
|
|
7f44f572ea | ||
|
|
13596cdf69 | ||
|
|
49e24f0cd8 | ||
|
|
1fcbaa4116 | ||
|
|
e51ca1dee3 | ||
|
|
3cfd38caf1 | ||
|
|
c78392db4d | ||
|
|
5acac2238f | ||
|
|
bddef71518 | ||
|
|
6ff2d89ea1 | ||
|
|
199832a710 | ||
|
|
a82417fa19 | ||
|
|
d7341ae42e | ||
|
|
07d24509a6 | ||
|
|
6030c0e403 | ||
|
|
72bcf2aa03 | ||
|
|
2f19144249 | ||
|
|
cdb476888a | ||
|
|
4caf1ef389 | ||
|
|
27ad1d5549 | ||
|
|
239ac2a5d4 | ||
|
|
67ecd30327 | ||
|
|
8071b2311c | ||
|
|
774928f944 | ||
|
|
e3791ecfe4 | ||
|
|
f8eb7a892f | ||
|
|
b2b4ee212f | ||
|
|
168b226b0f | ||
|
|
48f19e43c5 | ||
|
|
0ef3d8551d | ||
|
|
e0e15def24 | ||
|
|
7846971381 | ||
|
|
7159976335 | ||
|
|
3deb58a89a | ||
|
|
8fc201e5bb | ||
|
|
f5bbade9e4 | ||
|
|
97bd4c255a | ||
|
|
8db5247ebc | ||
|
|
cfdbde11f0 | ||
|
|
8df5f1058f | ||
|
|
e0382c5523 | ||
|
|
37a513003c | ||
|
|
d5b6c7bde1 | ||
|
|
6f6486e977 | ||
|
|
171a7cdd5d | ||
|
|
1b44f6c483 | ||
|
|
7ef6993576 | ||
|
|
c6e0416495 | ||
|
|
6e55a72f25 | ||
|
|
8f59422d35 | ||
|
|
8a9aeff18c | ||
|
|
b2ba9fc9f6 | ||
|
|
0c420e03ae | ||
|
|
1606d5545b | ||
|
|
f086d945c3 | ||
|
|
73ba7fdce8 | ||
|
|
b1b9674663 | ||
|
|
eb8d067b56 | ||
|
|
d8331737ad | ||
|
|
19fb8ab8b9 | ||
|
|
1b9987cb08 | ||
|
|
447ae00616 | ||
|
|
a27ba1a3db | ||
|
|
744b822ab1 | ||
|
|
5848a60c01 | ||
|
|
3d2d039538 | ||
|
|
36350bf1be | ||
|
|
a6e2e223ea | ||
|
|
2c461acfeb | ||
|
|
66340372d5 | ||
|
|
410a25d59a | ||
|
|
ed8e8ac289 | ||
|
|
d3e781de08 | ||
|
|
0df4748216 | ||
|
|
6520843f86 | ||
|
|
63eb0b7e86 | ||
|
|
f2bc447659 | ||
|
|
be93318576 | ||
|
|
777f813e9b | ||
|
|
22e2067349 | ||
|
|
37ecbb461c | ||
|
|
176bb23de1 | ||
|
|
ec97da93c1 | ||
|
|
140419fe0e | ||
|
|
6a33974a6b | ||
|
|
295be6f10f | ||
|
|
7cb368b34d | ||
|
|
7eb15593e1 | ||
|
|
e44465d4d6 | ||
|
|
c10749a6a7 | ||
|
|
f235955eef | ||
|
|
f58c9a659b | ||
|
|
f710393e35 | ||
|
|
704b9a66bb | ||
|
|
94811c0dc7 |
@@ -1,10 +1,12 @@
|
||||
#
|
||||
# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# 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. 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
|
||||
@@ -21,34 +23,24 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
#
|
||||
# @test
|
||||
# @bug 4530538
|
||||
# @summary Run MemoryManagement test with serial GC
|
||||
# @author Mandy Chung
|
||||
#
|
||||
# @requires vm.gc=="Serial" | vm.gc=="null"
|
||||
#
|
||||
# @run build MemoryManagement
|
||||
# @run shell/timeout=600 MemoryManagementSerialGC.sh
|
||||
#
|
||||
name: 'Config'
|
||||
description: 'Read JDK Configuration Variables'
|
||||
inputs:
|
||||
var:
|
||||
description: 'The name of the variable to read'
|
||||
required: true
|
||||
outputs:
|
||||
value:
|
||||
description: 'The value of the configuration variable'
|
||||
value: ${{ steps.read-config.outputs.value }}
|
||||
|
||||
#Set appropriate jdk
|
||||
|
||||
if [ ! -z "${TESTJAVA}" ] ; then
|
||||
jdk="$TESTJAVA"
|
||||
else
|
||||
echo "--Error: TESTJAVA must be defined as the pathname of a jdk to test."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
runOne()
|
||||
{
|
||||
echo "runOne $@"
|
||||
$TESTJAVA/bin/java ${TESTVMOPTS} -classpath $TESTCLASSES $@ || exit 2
|
||||
}
|
||||
|
||||
# Test MemoryManagement with serial collector
|
||||
runOne -XX:+UseSerialGC MemoryManagement
|
||||
|
||||
exit 0
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Read configuration variable from repo'
|
||||
id: read-config
|
||||
run: |
|
||||
# Extract value from configuration file
|
||||
value="$(grep -h ${{ inputs.var }}= make/conf/github-actions.conf | cut -d '=' -f 2-)"
|
||||
echo "::set-output name=value::$value"
|
||||
shell: bash
|
||||
80
.github/actions/do-build/action.yml
vendored
Normal file
80
.github/actions/do-build/action.yml
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
name: 'Do build'
|
||||
description: 'Build the JDK using make'
|
||||
inputs:
|
||||
make-target:
|
||||
description: 'Make target(s)'
|
||||
required: true
|
||||
platform:
|
||||
description: 'Platform name'
|
||||
required: true
|
||||
debug-suffix:
|
||||
description: 'File name suffix denoting debug level, possibly empty'
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Build'
|
||||
id: build
|
||||
run: >
|
||||
make LOG=info ${{ inputs.make-target }}
|
||||
|| bash ./.github/scripts/gen-build-failure-report.sh "$GITHUB_STEP_SUMMARY"
|
||||
shell: bash
|
||||
|
||||
- name: 'Check for failure'
|
||||
id: check
|
||||
run: |
|
||||
# Check for failure marker file
|
||||
build_dir="$(ls -d build/*)"
|
||||
if [[ -e $build_dir/build-failure ]]; then
|
||||
# Collect relevant log files
|
||||
mkdir failure-logs
|
||||
cp \
|
||||
$build_dir/spec.gmk \
|
||||
$build_dir/build.log \
|
||||
$build_dir/configure.log \
|
||||
$build_dir/make-support/failure-summary.log \
|
||||
$build_dir/make-support/failure-logs/* \
|
||||
failure-logs/ 2> /dev/null || true
|
||||
echo '::set-output name=failure::true'
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: 'Upload build logs'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: failure-logs-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: failure-logs
|
||||
if: steps.check.outputs.failure == 'true'
|
||||
|
||||
# This is the best way I found to abort the job with an error message
|
||||
- name: 'Notify about build failures'
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: core.setFailed('Build failed. See summary for details.')
|
||||
if: steps.check.outputs.failure == 'true'
|
||||
109
.github/actions/get-bootjdk/action.yml
vendored
Normal file
109
.github/actions/get-bootjdk/action.yml
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
name: 'Get BootJDK'
|
||||
description: 'Download the BootJDK from cache or source location'
|
||||
inputs:
|
||||
platform:
|
||||
description: 'Platform'
|
||||
required: true
|
||||
outputs:
|
||||
path:
|
||||
description: 'Path to the installed BootJDK'
|
||||
value: ${{ steps.path-name.outputs.path }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Determine platform prefix'
|
||||
id: platform-prefix
|
||||
run: |
|
||||
# Convert platform name to upper case
|
||||
platform_prefix="$(echo ${{ inputs.platform }} | tr [a-z-] [A-Z_])"
|
||||
echo "::set-output name=value::$platform_prefix"
|
||||
shell: bash
|
||||
|
||||
- name: 'Get URL configuration'
|
||||
id: url
|
||||
uses: ./.github/actions/config
|
||||
with:
|
||||
var: ${{ steps.platform-prefix.outputs.value}}_BOOT_JDK_URL
|
||||
|
||||
- name: 'Get SHA256 configuration'
|
||||
id: sha256
|
||||
uses: ./.github/actions/config
|
||||
with:
|
||||
var: ${{ steps.platform-prefix.outputs.value}}_BOOT_JDK_SHA256
|
||||
|
||||
- name: 'Get file extension configuration'
|
||||
id: ext
|
||||
uses: ./.github/actions/config
|
||||
with:
|
||||
var: ${{ steps.platform-prefix.outputs.value}}_BOOT_JDK_EXT
|
||||
|
||||
- name: 'Check cache for BootJDK'
|
||||
id: get-cached-bootjdk
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: bootjdk/jdk
|
||||
key: boot-jdk-${{ inputs.platform }}-${{ steps.sha256.outputs.value }}
|
||||
|
||||
# macOS is missing sha256sum
|
||||
- name: 'Install sha256sum'
|
||||
run: |
|
||||
# Run Homebrew installation
|
||||
brew install coreutils
|
||||
shell: bash
|
||||
if: steps.get-cached-bootjdk.outputs.cache-hit != 'true' && runner.os == 'macOS'
|
||||
|
||||
- name: 'Download BootJDK'
|
||||
run: |
|
||||
# Download BootJDK and verify checksum
|
||||
mkdir -p bootjdk/jdk
|
||||
mkdir -p bootjdk/unpacked
|
||||
wget --progress=dot:mega -O bootjdk/jdk.${{ steps.ext.outputs.value }} '${{ steps.url.outputs.value }}'
|
||||
echo '${{ steps.sha256.outputs.value }} bootjdk/jdk.${{ steps.ext.outputs.value }}' | sha256sum -c >/dev/null -
|
||||
shell: bash
|
||||
if: steps.get-cached-bootjdk.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Unpack BootJDK'
|
||||
run: |
|
||||
# Unpack the BootJDK and move files to a common location
|
||||
if [[ '${{ steps.ext.outputs.value }}' == 'tar.gz' ]]; then
|
||||
tar -xf bootjdk/jdk.${{ steps.ext.outputs.value }} -C bootjdk/unpacked
|
||||
else
|
||||
unzip -q bootjdk/jdk.${{ steps.ext.outputs.value }} -d bootjdk/unpacked
|
||||
fi
|
||||
jdk_root="$(dirname $(find bootjdk/unpacked -name bin -type d))"
|
||||
mv "$jdk_root"/* bootjdk/jdk/
|
||||
shell: bash
|
||||
if: steps.get-cached-bootjdk.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Export path to where BootJDK is installed'
|
||||
id: path-name
|
||||
run: |
|
||||
# Export the path
|
||||
echo '::set-output name=path::bootjdk/jdk'
|
||||
shell: bash
|
||||
109
.github/actions/get-bundles/action.yml
vendored
Normal file
109
.github/actions/get-bundles/action.yml
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
name: 'Get bundles'
|
||||
description: 'Download resulting JDK bundles'
|
||||
inputs:
|
||||
platform:
|
||||
description: 'Platform name'
|
||||
required: true
|
||||
debug-suffix:
|
||||
description: 'File name suffix denoting debug level, possibly empty'
|
||||
required: false
|
||||
outputs:
|
||||
jdk-path:
|
||||
description: 'Path to the installed JDK bundle'
|
||||
value: ${{ steps.path-name.outputs.jdk }}
|
||||
symbols-path:
|
||||
description: 'Path to the installed symbols bundle'
|
||||
value: ${{ steps.path-name.outputs.symbols }}
|
||||
tests-path:
|
||||
description: 'Path to the installed tests bundle'
|
||||
value: ${{ steps.path-name.outputs.tests }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Download bundles artifact'
|
||||
id: download-bundles
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: bundles
|
||||
continue-on-error: true
|
||||
|
||||
- name: 'Download bundles artifact (retry)'
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: bundles
|
||||
if: steps.download-bundles.outcome == 'failure'
|
||||
|
||||
- name: 'Unpack bundles'
|
||||
run: |
|
||||
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip ]]; then
|
||||
echo 'Unpacking jdk bundle...'
|
||||
mkdir -p bundles/jdk
|
||||
unzip -q bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip -d bundles/jdk
|
||||
fi
|
||||
|
||||
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
|
||||
echo 'Unpacking jdk bundle...'
|
||||
mkdir -p bundles/jdk
|
||||
tar -xf bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/jdk
|
||||
fi
|
||||
|
||||
if [[ -e bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
|
||||
echo 'Unpacking symbols bundle...'
|
||||
mkdir -p bundles/symbols
|
||||
tar -xf bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/symbols
|
||||
fi
|
||||
|
||||
if [[ -e bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
|
||||
echo 'Unpacking tests bundle...'
|
||||
mkdir -p bundles/tests
|
||||
tar -xf bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/tests
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: 'Export paths to where bundles are installed'
|
||||
id: path-name
|
||||
run: |
|
||||
# Export the paths
|
||||
|
||||
jdk_dir="$GITHUB_WORKSPACE/$(dirname $(find bundles/jdk -name bin -type d))"
|
||||
symbols_dir="$GITHUB_WORKSPACE/$(dirname $(find bundles/symbols -name bin -type d))"
|
||||
tests_dir="$GITHUB_WORKSPACE/bundles/tests"
|
||||
|
||||
if [[ '${{ runner.os }}' == 'Windows' ]]; then
|
||||
jdk_dir="$(cygpath $jdk_dir)"
|
||||
symbols_dir="$(cygpath $symbols_dir)"
|
||||
tests_dir="$(cygpath $tests_dir)"
|
||||
fi
|
||||
|
||||
echo "::set-output name=jdk::$jdk_dir"
|
||||
echo "::set-output name=symbols::$symbols_dir"
|
||||
echo "::set-output name=tests::$tests_dir"
|
||||
shell: bash
|
||||
54
.github/actions/get-gtest/action.yml
vendored
Normal file
54
.github/actions/get-gtest/action.yml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
name: 'Get GTest'
|
||||
description: 'Download GTest source'
|
||||
outputs:
|
||||
path:
|
||||
description: 'Path to the installed GTest'
|
||||
value: ${{ steps.path-name.outputs.path }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Get GTest version configuration'
|
||||
id: version
|
||||
uses: ./.github/actions/config
|
||||
with:
|
||||
var: GTEST_VERSION
|
||||
|
||||
- name: 'Checkout GTest source'
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: google/googletest
|
||||
ref: 'release-${{ steps.version.outputs.value }}'
|
||||
path: gtest
|
||||
|
||||
- name: 'Export path to where GTest is installed'
|
||||
id: path-name
|
||||
run: |
|
||||
# Export the path
|
||||
echo '::set-output name=path::gtest'
|
||||
shell: bash
|
||||
72
.github/actions/get-jtreg/action.yml
vendored
Normal file
72
.github/actions/get-jtreg/action.yml
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
name: 'Get JTReg'
|
||||
description: 'Download JTReg from cache or source location'
|
||||
outputs:
|
||||
path:
|
||||
description: 'Path to the installed JTReg'
|
||||
value: ${{ steps.path-name.outputs.path }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Get JTReg version configuration'
|
||||
id: version
|
||||
uses: ./.github/actions/config
|
||||
with:
|
||||
var: JTREG_VERSION
|
||||
|
||||
- name: 'Check cache for JTReg'
|
||||
id: get-cached-jtreg
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: jtreg/installed
|
||||
key: jtreg-${{ steps.version.outputs.value }}
|
||||
|
||||
- name: 'Checkout the JTReg source'
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: openjdk/jtreg
|
||||
ref: jtreg-${{ steps.version.outputs.value }}
|
||||
path: jtreg/src
|
||||
if: steps.get-cached-jtreg.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Build JTReg'
|
||||
run: |
|
||||
# Build JTReg and move files to the proper locations
|
||||
bash make/build.sh --jdk "$JAVA_HOME_11_X64"
|
||||
mkdir ../installed
|
||||
mv build/images/jtreg/* ../installed
|
||||
working-directory: jtreg/src
|
||||
shell: bash
|
||||
if: steps.get-cached-jtreg.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Export path to where JTReg is installed'
|
||||
id: path-name
|
||||
run: |
|
||||
# Export the path
|
||||
echo '::set-output name=path::jtreg/installed'
|
||||
shell: bash
|
||||
@@ -1,10 +1,12 @@
|
||||
#
|
||||
# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# 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. 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
|
||||
@@ -21,34 +23,22 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
#
|
||||
# @test
|
||||
# @bug 4530538
|
||||
# @summary Run MemoryManagement test with parallel GC
|
||||
# @author Mandy Chung
|
||||
#
|
||||
# @requires vm.gc=="Parallel" | vm.gc=="null"
|
||||
#
|
||||
# @run build MemoryManagement
|
||||
# @run shell/timeout=600 MemoryManagementParallelGC.sh
|
||||
#
|
||||
name: 'Get MSYS2'
|
||||
description: 'Download MSYS2 and prepare a Windows host'
|
||||
|
||||
#Set appropriate jdk
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Install MSYS2'
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
install: 'autoconf tar unzip zip make'
|
||||
path-type: minimal
|
||||
location: msys2
|
||||
|
||||
if [ ! -z "${TESTJAVA}" ] ; then
|
||||
jdk="$TESTJAVA"
|
||||
else
|
||||
echo "--Error: TESTJAVA must be defined as the pathname of a jdk to test."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
runOne()
|
||||
{
|
||||
echo "runOne $@"
|
||||
$TESTJAVA/bin/java ${TESTVMOPTS} -classpath $TESTCLASSES $@ || exit 2
|
||||
}
|
||||
|
||||
# Test MemoryManagement with parallel collector
|
||||
runOne -XX:+UseParallelGC MemoryManagement
|
||||
|
||||
exit 0
|
||||
# We can't run bash until this is completed, so stick with pwsh
|
||||
- name: 'Set MSYS2 path'
|
||||
run: |
|
||||
# Prepend msys2/msys64/usr/bin to the PATH
|
||||
echo "$env:GITHUB_WORKSPACE/msys2/msys64/usr/bin" >> $env:GITHUB_PATH
|
||||
shell: pwsh
|
||||
77
.github/actions/upload-bundles/action.yml
vendored
Normal file
77
.github/actions/upload-bundles/action.yml
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
name: 'Upload bundles'
|
||||
description: 'Upload resulting JDK bundles'
|
||||
inputs:
|
||||
platform:
|
||||
description: 'Platform name'
|
||||
required: true
|
||||
debug-suffix:
|
||||
description: 'File name suffix denoting debug level, possibly empty'
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
|
||||
- name: 'Determine bundle names'
|
||||
id: bundles
|
||||
run: |
|
||||
# Rename bundles to consistent names
|
||||
jdk_bundle_zip="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.zip 2> /dev/null || true)"
|
||||
jdk_bundle_tar_gz="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||
symbols_bundle="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}-symbols.tar.gz 2> /dev/null || true)"
|
||||
tests_bundle="$(ls build/*/bundles/jdk-*_bin-tests${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||
|
||||
mkdir bundles
|
||||
|
||||
if [[ "$jdk_bundle_zip" != "" ]]; then
|
||||
mv "$jdk_bundle_zip" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip"
|
||||
fi
|
||||
if [[ "$jdk_bundle_tar_gz" != "" ]]; then
|
||||
mv "$jdk_bundle_tar_gz" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||
fi
|
||||
if [[ "$symbols_bundle" != "" ]]; then
|
||||
mv "$symbols_bundle" "bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||
fi
|
||||
if [[ "$tests_bundle" != "" ]]; then
|
||||
mv "$tests_bundle" "bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||
fi
|
||||
|
||||
if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$symbols_bundle$tests_bundle" != "" ]]; then
|
||||
echo '::set-output name=bundles-found::true'
|
||||
else
|
||||
echo '::set-output name=bundles-found::false'
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: 'Upload bundles artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: bundles
|
||||
retention-days: 1
|
||||
if: steps.bundles.outputs.bundles-found == 'true'
|
||||
51
.github/scripts/gen-build-failure-report.sh
vendored
Normal file
51
.github/scripts/gen-build-failure-report.sh
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
GITHUB_STEP_SUMMARY="$1"
|
||||
BUILD_DIR="$(ls -d build/*)"
|
||||
|
||||
# Send signal to the do-build action that we failed
|
||||
touch "$BUILD_DIR/build-failure"
|
||||
|
||||
(
|
||||
echo '### :boom: Build failure summary'
|
||||
echo ''
|
||||
echo 'The build failed. Here follows the failure summary from the build.'
|
||||
echo '<details><summary><b>View build failure summary</b></summary>'
|
||||
echo ''
|
||||
echo '```'
|
||||
if [[ -f "$BUILD_DIR/make-support/failure-summary.log" ]]; then
|
||||
cat "$BUILD_DIR/make-support/failure-summary.log"
|
||||
else
|
||||
echo "Failure summary ($BUILD_DIR/make-support/failure-summary.log) not found"
|
||||
fi
|
||||
echo '```'
|
||||
echo '</details>'
|
||||
echo ''
|
||||
|
||||
echo ''
|
||||
echo ':arrow_right: To see the entire test log, click the job in the list to the left. To download logs, see the `failure-logs` [artifact above](#artifacts).'
|
||||
) >> $GITHUB_STEP_SUMMARY
|
||||
92
.github/scripts/gen-test-results.sh
vendored
Normal file
92
.github/scripts/gen-test-results.sh
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
GITHUB_STEP_SUMMARY="$1"
|
||||
|
||||
test_suite_name=$(cat build/run-test-prebuilt/test-support/test-last-ids.txt)
|
||||
results_dir=build/run-test-prebuilt/test-results/$test_suite_name/text
|
||||
report_dir=build/run-test-prebuilt/test-support/$test_suite_name
|
||||
|
||||
failures=$(sed -E -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/newfailures.txt 2> /dev/null || true)
|
||||
errors=$(sed -E -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/other_errors.txt 2> /dev/null || true)
|
||||
|
||||
if [[ "$failures" = "" && "$errors" = "" ]]; then
|
||||
# If we have nothing to report, exit this step now
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "### Test output for failed tests" >> $GITHUB_STEP_SUMMARY
|
||||
for test in $failures $errors; do
|
||||
anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
|
||||
base_path="$(echo "$test" | tr '#' '_')"
|
||||
report_file="$report_dir/$base_path.jtr"
|
||||
hs_err_files=$(ls $report_dir/$base_path/hs_err*.log 2> /dev/null || true)
|
||||
echo "#### <a id="$anchor">$test"
|
||||
|
||||
echo '<details><summary>View test results</summary>'
|
||||
echo ''
|
||||
echo '```'
|
||||
if [[ -f "$report_file" ]]; then
|
||||
cat "$report_file"
|
||||
else
|
||||
echo "Error: Result file $report_file not found"
|
||||
fi
|
||||
echo '```'
|
||||
echo '</details>'
|
||||
echo ''
|
||||
|
||||
if [[ "$hs_err_files" != "" ]]; then
|
||||
echo '<details><summary>View HotSpot error log</summary>'
|
||||
echo ''
|
||||
for hs_err in $hs_err_files; do
|
||||
echo '```'
|
||||
echo "$hs_err:"
|
||||
echo ''
|
||||
cat "$hs_err"
|
||||
echo '```'
|
||||
done
|
||||
|
||||
echo '</details>'
|
||||
echo ''
|
||||
fi
|
||||
|
||||
done >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
# With many failures, the summary can easily exceed 1024 kB, the limit set by Github
|
||||
# Trim it down if so.
|
||||
summary_size=$(wc -c < $GITHUB_STEP_SUMMARY)
|
||||
if [[ $summary_size -gt 1000000 ]]; then
|
||||
# Trim to below 1024 kB, and cut off after the last detail group
|
||||
head -c 1000000 $GITHUB_STEP_SUMMARY | tac | sed -n -e '/<\/details>/,$ p' | tac > $GITHUB_STEP_SUMMARY.tmp
|
||||
mv $GITHUB_STEP_SUMMARY.tmp $GITHUB_STEP_SUMMARY
|
||||
(
|
||||
echo ''
|
||||
echo ':x: **WARNING: Summary is too large and has been truncated.**'
|
||||
echo ''
|
||||
) >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
echo ':arrow_right: To see the entire test log, click the job in the list to the left.' >> $GITHUB_STEP_SUMMARY
|
||||
69
.github/scripts/gen-test-summary.sh
vendored
Normal file
69
.github/scripts/gen-test-summary.sh
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
GITHUB_STEP_SUMMARY="$1"
|
||||
|
||||
test_suite_name=$(cat build/run-test-prebuilt/test-support/test-last-ids.txt)
|
||||
results_dir=build/run-test-prebuilt/test-results/$test_suite_name/text
|
||||
|
||||
if [[ ! -f build/run-test-prebuilt/make-support/exit-with-error ]]; then
|
||||
# There were no failures, exit now
|
||||
exit
|
||||
fi
|
||||
|
||||
failures=$(sed -E -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/newfailures.txt 2> /dev/null || true)
|
||||
errors=$(sed -E -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/other_errors.txt 2> /dev/null || true)
|
||||
failure_count=$(echo $failures | wc -w || true)
|
||||
error_count=$(echo $errors | wc -w || true)
|
||||
|
||||
if [[ "$failures" = "" && "$errors" = "" ]]; then
|
||||
# We know something went wrong, but not what
|
||||
echo '::set-output name=error-message::Unspecified test suite failure. Please see log for job for details.'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo '::set-output name=failure::true'
|
||||
echo "::set-output name=error-message::Test run reported $failure_count test failure(s) and $error_count error(s). See summary for details."
|
||||
|
||||
echo '### :boom: Test failures summary' >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
if [[ "$failures" != "" ]]; then
|
||||
echo '' >> $GITHUB_STEP_SUMMARY
|
||||
echo 'These tests reported failure:' >> $GITHUB_STEP_SUMMARY
|
||||
for test in $failures; do
|
||||
anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
|
||||
echo "* [$test](#user-content-$anchor)"
|
||||
done >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
if [[ "$errors" != "" ]]; then
|
||||
echo '' >> $GITHUB_STEP_SUMMARY
|
||||
echo 'These tests reported errors:' >> $GITHUB_STEP_SUMMARY
|
||||
for test in $errors; do
|
||||
anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
|
||||
echo "* [$test](#user-content-$anchor)"
|
||||
done >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
154
.github/workflows/build-cross-compile.yml
vendored
Normal file
154
.github/workflows/build-cross-compile.yml
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
name: 'Build (cross-compile)'
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
gcc-major-version:
|
||||
required: false
|
||||
type: string
|
||||
default: '10'
|
||||
apt-gcc-version:
|
||||
required: false
|
||||
type: string
|
||||
default: '10.3.0-1ubuntu1~20.04'
|
||||
apt-gcc-cross-suffix:
|
||||
required: false
|
||||
type: string
|
||||
default: 'cross1'
|
||||
|
||||
jobs:
|
||||
build-cross-compile:
|
||||
name: build
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target-cpu:
|
||||
- aarch64
|
||||
- arm
|
||||
- s390x
|
||||
- ppc64le
|
||||
include:
|
||||
- target-cpu: aarch64
|
||||
debian-arch: arm64
|
||||
gnu-arch: aarch64
|
||||
- target-cpu: arm
|
||||
debian-arch: armhf
|
||||
gnu-arch: arm
|
||||
gnu-abi: eabihf
|
||||
- target-cpu: s390x
|
||||
debian-arch: s390x
|
||||
gnu-arch: s390x
|
||||
- target-cpu: ppc64le
|
||||
debian-arch: ppc64el
|
||||
gnu-arch: powerpc64le
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'Get the BootJDK'
|
||||
id: bootjdk
|
||||
uses: ./.github/actions/get-bootjdk
|
||||
with:
|
||||
platform: linux-x64
|
||||
|
||||
# Use linux-x64 JDK bundle as build JDK
|
||||
- name: 'Get build JDK'
|
||||
id: buildjdk
|
||||
uses: ./.github/actions/get-bundles
|
||||
with:
|
||||
platform: linux-x64
|
||||
|
||||
# Upgrading apt to solve libc6 installation bugs, see JDK-8260460.
|
||||
- name: 'Install toolchain and dependencies'
|
||||
run: |
|
||||
# Install dependencies using apt-get
|
||||
sudo apt-get update
|
||||
sudo apt-get install --only-upgrade apt
|
||||
sudo apt-get install \
|
||||
gcc-${{ inputs.gcc-major-version }}=${{ inputs.apt-gcc-version }} \
|
||||
g++-${{ inputs.gcc-major-version }}=${{ inputs.apt-gcc-version }} \
|
||||
gcc-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-version }}${{ inputs.apt-gcc-cross-suffix }} \
|
||||
g++-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-version }}${{ inputs.apt-gcc-cross-suffix }} \
|
||||
libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.gcc-major-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.gcc-major-version }}
|
||||
|
||||
- name: 'Check cache for sysroot'
|
||||
id: get-cached-sysroot
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: sysroot
|
||||
key: sysroot-${{ matrix.debian-arch }}-${{ hashFiles('./.github/workflows/build-cross-compile.yml') }}
|
||||
|
||||
- name: 'Install sysroot dependencies'
|
||||
run: sudo apt-get install debootstrap qemu-user-static
|
||||
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Create sysroot'
|
||||
run: >
|
||||
sudo qemu-debootstrap
|
||||
--arch=${{ matrix.debian-arch }}
|
||||
--verbose
|
||||
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev
|
||||
--resolve-deps
|
||||
buster
|
||||
sysroot
|
||||
https://httpredir.debian.org/debian/
|
||||
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Prepare sysroot'
|
||||
run: |
|
||||
# Prepare sysroot and remove unused files to minimize cache
|
||||
sudo chroot sysroot symlinks -cr .
|
||||
sudo chown ${USER} -R sysroot
|
||||
rm -rf sysroot/{dev,proc,run,sys}
|
||||
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Configure'
|
||||
run: >
|
||||
bash configure
|
||||
--with-conf-name=linux-${{ matrix.target-cpu }}
|
||||
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
|
||||
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||
--with-zlib=system
|
||||
--enable-debug
|
||||
--disable-precompiled-headers
|
||||
--openjdk-target=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}
|
||||
--with-sysroot=sysroot
|
||||
--with-build-jdk=${{ steps.buildjdk.outputs.jdk-path }}
|
||||
CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-gcc-10
|
||||
CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-g++-10
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
uses: ./.github/actions/do-build
|
||||
with:
|
||||
make-target: 'hotspot'
|
||||
platform: linux-${{ matrix.target-cpu }}
|
||||
132
.github/workflows/build-linux.yml
vendored
Normal file
132
.github/workflows/build-linux.yml
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
name: 'Build (linux)'
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
platform:
|
||||
required: true
|
||||
type: string
|
||||
extra-conf-options:
|
||||
required: false
|
||||
type: string
|
||||
make-target:
|
||||
required: false
|
||||
type: string
|
||||
default: 'product-bundles test-bundles'
|
||||
debug-levels:
|
||||
required: false
|
||||
type: string
|
||||
default: '[ "debug", "release" ]'
|
||||
apt-gcc-version:
|
||||
required: true
|
||||
type: string
|
||||
apt-architecture:
|
||||
required: false
|
||||
type: string
|
||||
apt-extra-packages:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
name: build
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
debug-level: ${{ fromJSON(inputs.debug-levels) }}
|
||||
include:
|
||||
- debug-level: debug
|
||||
flags: --with-debug-level=fastdebug
|
||||
suffix: -debug
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'Get the BootJDK'
|
||||
id: bootjdk
|
||||
uses: ./.github/actions/get-bootjdk
|
||||
with:
|
||||
platform: linux-x64
|
||||
|
||||
- name: 'Get JTReg'
|
||||
id: jtreg
|
||||
uses: ./.github/actions/get-jtreg
|
||||
|
||||
- name: 'Get GTest'
|
||||
id: gtest
|
||||
uses: ./.github/actions/get-gtest
|
||||
|
||||
- name: 'Set architecture'
|
||||
id: arch
|
||||
run: |
|
||||
# Set a proper suffix for packages if using a different architecture
|
||||
if [[ '${{ inputs.apt-architecture }}' != '' ]]; then
|
||||
echo '::set-output name=suffix:::${{ inputs.apt-architecture }}'
|
||||
fi
|
||||
|
||||
# Upgrading apt to solve libc6 installation bugs, see JDK-8260460.
|
||||
- name: 'Install toolchain and dependencies'
|
||||
run: |
|
||||
# Install dependencies using apt-get
|
||||
if [[ '${{ inputs.apt-architecture }}' != '' ]]; then
|
||||
sudo dpkg --add-architecture ${{ inputs.apt-architecture }}
|
||||
fi
|
||||
sudo apt-get update
|
||||
sudo apt-get install --only-upgrade apt
|
||||
sudo apt-get install gcc-${{ inputs.apt-gcc-version }} g++-${{ inputs.apt-gcc-version }} libxrandr-dev${{ steps.arch.outputs.suffix }} libxtst-dev${{ steps.arch.outputs.suffix }} libcups2-dev${{ steps.arch.outputs.suffix }} libasound2-dev${{ steps.arch.outputs.suffix }} ${{ inputs.apt-extra-packages }}
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
|
||||
|
||||
- name: 'Configure'
|
||||
run: >
|
||||
bash configure
|
||||
--with-conf-name=${{ inputs.platform }}
|
||||
${{ matrix.flags }}
|
||||
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
|
||||
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||
--with-jtreg=${{ steps.jtreg.outputs.path }}
|
||||
--with-gtest=${{ steps.gtest.outputs.path }}
|
||||
--enable-jtreg-failure-handler
|
||||
--with-zlib=system
|
||||
${{ inputs.extra-conf-options }}
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
uses: ./.github/actions/do-build
|
||||
with:
|
||||
make-target: '${{ inputs.make-target }}'
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
|
||||
- name: 'Upload bundles'
|
||||
uses: ./.github/actions/upload-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
114
.github/workflows/build-macos.yml
vendored
Normal file
114
.github/workflows/build-macos.yml
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
name: 'Build (macos)'
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
platform:
|
||||
required: true
|
||||
type: string
|
||||
extra-conf-options:
|
||||
required: false
|
||||
type: string
|
||||
make-target:
|
||||
required: false
|
||||
type: string
|
||||
default: 'product-bundles test-bundles'
|
||||
debug-levels:
|
||||
required: false
|
||||
type: string
|
||||
default: '[ "debug", "release" ]'
|
||||
xcode-toolset-version:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build-macos:
|
||||
name: build
|
||||
runs-on: macos-11
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
debug-level: ${{ fromJSON(inputs.debug-levels) }}
|
||||
include:
|
||||
- debug-level: debug
|
||||
flags: --with-debug-level=fastdebug
|
||||
suffix: -debug
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'Get the BootJDK'
|
||||
id: bootjdk
|
||||
uses: ./.github/actions/get-bootjdk
|
||||
with:
|
||||
platform: macos-x64
|
||||
|
||||
- name: 'Get JTReg'
|
||||
id: jtreg
|
||||
uses: ./.github/actions/get-jtreg
|
||||
|
||||
- name: 'Get GTest'
|
||||
id: gtest
|
||||
uses: ./.github/actions/get-gtest
|
||||
|
||||
- name: 'Install toolchain and dependencies'
|
||||
run: |
|
||||
# Run Homebrew installation and xcode-select
|
||||
brew install make
|
||||
sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-toolset-version }}.app/Contents/Developer
|
||||
# This will make GNU make available as 'make' and not only as 'gmake'
|
||||
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
|
||||
|
||||
- name: 'Configure'
|
||||
run: >
|
||||
bash configure
|
||||
--with-conf-name=${{ inputs.platform }}
|
||||
${{ matrix.flags }}
|
||||
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
|
||||
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||
--with-jtreg=${{ steps.jtreg.outputs.path }}
|
||||
--with-gtest=${{ steps.gtest.outputs.path }}
|
||||
--enable-jtreg-failure-handler
|
||||
--with-zlib=system
|
||||
${{ inputs.extra-conf-options }}
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
uses: ./.github/actions/do-build
|
||||
with:
|
||||
make-target: '${{ inputs.make-target }}'
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
|
||||
- name: 'Upload bundles'
|
||||
uses: ./.github/actions/upload-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
131
.github/workflows/build-windows.yml
vendored
Normal file
131
.github/workflows/build-windows.yml
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
name: 'Build (windows)'
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
platform:
|
||||
required: true
|
||||
type: string
|
||||
extra-conf-options:
|
||||
required: false
|
||||
type: string
|
||||
make-target:
|
||||
required: false
|
||||
type: string
|
||||
default: 'product-bundles test-bundles'
|
||||
debug-levels:
|
||||
required: false
|
||||
type: string
|
||||
default: '[ "debug", "release" ]'
|
||||
msvc-toolset-version:
|
||||
required: true
|
||||
type: string
|
||||
msvc-toolset-architecture:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
env:
|
||||
# These are needed to make the MSYS2 bash work properly
|
||||
MSYS2_PATH_TYPE: minimal
|
||||
CHERE_INVOKING: 1
|
||||
|
||||
jobs:
|
||||
build-windows:
|
||||
name: build
|
||||
runs-on: windows-2019
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
debug-level: ${{ fromJSON(inputs.debug-levels) }}
|
||||
include:
|
||||
- debug-level: debug
|
||||
flags: --with-debug-level=fastdebug
|
||||
suffix: -debug
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'Get MSYS2'
|
||||
uses: ./.github/actions/get-msys2
|
||||
|
||||
- name: 'Get the BootJDK'
|
||||
id: bootjdk
|
||||
uses: ./.github/actions/get-bootjdk
|
||||
with:
|
||||
platform: windows-x64
|
||||
|
||||
- name: 'Get JTReg'
|
||||
id: jtreg
|
||||
uses: ./.github/actions/get-jtreg
|
||||
|
||||
- name: 'Get GTest'
|
||||
id: gtest
|
||||
uses: ./.github/actions/get-gtest
|
||||
|
||||
- name: 'Install toolchain and dependencies'
|
||||
run: |
|
||||
# Run Visual Studio Installer
|
||||
'/c/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe' \
|
||||
modify --quiet --installPath 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise' \
|
||||
--add Microsoft.VisualStudio.Component.VC.${{ inputs.msvc-toolset-version }}.${{ inputs.msvc-toolset-architecture }}
|
||||
|
||||
- name: 'Configure'
|
||||
run: >
|
||||
bash configure
|
||||
--with-conf-name=${{ inputs.platform }}
|
||||
${{ matrix.flags }}
|
||||
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
|
||||
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||
--with-jtreg=${{ steps.jtreg.outputs.path }}
|
||||
--with-gtest=${{ steps.gtest.outputs.path }}
|
||||
--enable-jtreg-failure-handler
|
||||
--with-msvc-toolset-version=${{ inputs.msvc-toolset-version }}
|
||||
${{ inputs.extra-conf-options }}
|
||||
env:
|
||||
# We need a minimal PATH on Windows
|
||||
# Set PATH to "", so just GITHUB_PATH is included
|
||||
PATH: ''
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
uses: ./.github/actions/do-build
|
||||
with:
|
||||
make-target: '${{ inputs.make-target }}'
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
|
||||
- name: 'Upload bundles'
|
||||
uses: ./.github/actions/upload-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
331
.github/workflows/main.yml
vendored
Normal file
331
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,331 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
name: 'OpenJDK GHA Sanity Checks'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- master
|
||||
- pr/*
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
platforms:
|
||||
description: 'Platform(s) to execute on (comma separated, e.g. "linux-x64, macos, aarch64")'
|
||||
required: true
|
||||
default: 'linux-x64, linux-x86, linux-x64-variants, linux-cross-compile, macos-x64, macos-aarch64, windows-x64, windows-aarch64'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
###
|
||||
### Determine platforms to include
|
||||
###
|
||||
|
||||
select:
|
||||
name: 'Select platforms'
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
linux-x64: ${{ steps.include.outputs.linux-x64 }}
|
||||
linux-x86: ${{ steps.include.outputs.linux-x86 }}
|
||||
linux-x64-variants: ${{ steps.include.outputs.linux-x64-variants }}
|
||||
linux-cross-compile: ${{ steps.include.outputs.linux-cross-compile }}
|
||||
macos-x64: ${{ steps.include.outputs.macos-x64 }}
|
||||
macos-aarch64: ${{ steps.include.outputs.macos-aarch64 }}
|
||||
windows-x64: ${{ steps.include.outputs.windows-x64 }}
|
||||
windows-aarch64: ${{ steps.include.outputs.windows-aarch64 }}
|
||||
|
||||
steps:
|
||||
# This function must be inlined in main.yml, or we'd be forced to checkout the repo
|
||||
- name: 'Check what jobs to run'
|
||||
id: include
|
||||
run: |
|
||||
# Determine which platform jobs to run
|
||||
|
||||
# Returns 'true' if the input platform list matches any of the platform monikers given as argument,
|
||||
# 'false' otherwise.
|
||||
# arg $1: platform name or names to look for
|
||||
function check_platform() {
|
||||
if [[ '${{ !secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/') }}' == 'false' ]]; then
|
||||
# If JDK_SUBMIT_FILTER is set, and this is not a "submit/" branch, don't run anything
|
||||
echo 'false'
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
|
||||
input='${{ github.event.inputs.platforms }}'
|
||||
elif [[ $GITHUB_EVENT_NAME == push ]]; then
|
||||
input='${{ secrets.JDK_SUBMIT_PLATFORMS }}'
|
||||
else
|
||||
echo 'Internal error in GHA'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
normalized_input="$(echo ,$input, | tr -d ' ')"
|
||||
if [[ "$normalized_input" == ",," ]]; then
|
||||
# For an empty input, assume all platforms should run
|
||||
echo 'true'
|
||||
return
|
||||
else
|
||||
# Check for all acceptable platform names
|
||||
for part in $* ; do
|
||||
if echo "$normalized_input" | grep -q -e ",$part," ; then
|
||||
echo 'true'
|
||||
return
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
echo 'false'
|
||||
}
|
||||
|
||||
echo "::set-output name=linux-x64::$(check_platform linux-x64 linux x64)"
|
||||
echo "::set-output name=linux-x86::$(check_platform linux-x86 linux x86)"
|
||||
echo "::set-output name=linux-x64-variants::$(check_platform linux-x64-variants variants)"
|
||||
echo "::set-output name=linux-cross-compile::$(check_platform linux-cross-compile cross-compile)"
|
||||
echo "::set-output name=macos-x64::$(check_platform macos-x64 macos x64)"
|
||||
echo "::set-output name=macos-aarch64::$(check_platform macos-aarch64 macos aarch64)"
|
||||
echo "::set-output name=windows-x64::$(check_platform windows-x64 windows x64)"
|
||||
echo "::set-output name=windows-aarch64::$(check_platform windows-aarch64 windows aarch64)"
|
||||
|
||||
###
|
||||
### Build jobs
|
||||
###
|
||||
|
||||
build-linux-x64:
|
||||
name: linux-x64
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
# The linux-x64 jdk bundle is used as buildjdk for the cross-compile job
|
||||
if: needs.select.outputs.linux-x64 == 'true' || needs.select.outputs.linux-cross-compile == 'true'
|
||||
|
||||
build-linux-x86:
|
||||
name: linux-x86
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x86
|
||||
apt-gcc-version: '10-multilib'
|
||||
apt-architecture: 'i386'
|
||||
# Some multilib libraries do not have proper inter-dependencies, so we have to
|
||||
# install their dependencies manually.
|
||||
apt-extra-packages: 'libfreetype6-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386'
|
||||
extra-conf-options: '--with-target-bits=32'
|
||||
if: needs.select.outputs.linux-x86 == 'true'
|
||||
|
||||
build-linux-x64-hs-nopch:
|
||||
name: linux-x64-hs-nopch
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
make-target: 'hotspot'
|
||||
debug-levels: '[ "debug" ]'
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
extra-conf-options: '--disable-precompiled-headers'
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-x64-hs-zero:
|
||||
name: linux-x64-hs-zero
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
make-target: 'hotspot'
|
||||
debug-levels: '[ "debug" ]'
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-x64-hs-minimal:
|
||||
name: linux-x64-hs-minimal
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
make-target: 'hotspot'
|
||||
debug-levels: '[ "debug" ]'
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-x64-hs-optimized:
|
||||
name: linux-x64-hs-optimized
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
make-target: 'hotspot'
|
||||
# Technically this is not the "debug" level, but we can't inject a new matrix state for just this job
|
||||
debug-levels: '[ "debug" ]'
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-cross-compile:
|
||||
name: linux-cross-compile
|
||||
needs:
|
||||
- select
|
||||
- build-linux-x64
|
||||
uses: ./.github/workflows/build-cross-compile.yml
|
||||
if: needs.select.outputs.linux-cross-compile == 'true'
|
||||
|
||||
build-macos-x64:
|
||||
name: macos-x64
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-macos.yml
|
||||
with:
|
||||
platform: macos-x64
|
||||
xcode-toolset-version: '11.7'
|
||||
if: needs.select.outputs.macos-x64 == 'true'
|
||||
|
||||
build-macos-aarch64:
|
||||
name: macos-aarch64
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-macos.yml
|
||||
with:
|
||||
platform: macos-aarch64
|
||||
xcode-toolset-version: '12.4'
|
||||
extra-conf-options: '--openjdk-target=aarch64-apple-darwin'
|
||||
if: needs.select.outputs.macos-aarch64 == 'true'
|
||||
|
||||
build-windows-x64:
|
||||
name: windows-x64
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
with:
|
||||
platform: windows-x64
|
||||
msvc-toolset-version: '14.25'
|
||||
msvc-toolset-architecture: 'x86.x64'
|
||||
if: needs.select.outputs.windows-x64 == 'true'
|
||||
|
||||
build-windows-aarch64:
|
||||
name: windows-aarch64
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
with:
|
||||
platform: windows-aarch64
|
||||
msvc-toolset-version: '14.29'
|
||||
msvc-toolset-architecture: 'arm64'
|
||||
make-target: 'hotspot'
|
||||
extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin'
|
||||
if: needs.select.outputs.windows-aarch64 == 'true'
|
||||
|
||||
###
|
||||
### Test jobs
|
||||
###
|
||||
|
||||
test-linux-x64:
|
||||
name: linux-x64
|
||||
needs:
|
||||
- build-linux-x64
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
bootjdk-platform: linux-x64
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
test-linux-x86:
|
||||
name: linux-x86
|
||||
needs:
|
||||
- build-linux-x86
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: linux-x86
|
||||
bootjdk-platform: linux-x64
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
test-macos-x64:
|
||||
name: macos-x64
|
||||
needs:
|
||||
- build-macos-x64
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: macos-x64
|
||||
bootjdk-platform: macos-x64
|
||||
runs-on: macos-11
|
||||
|
||||
test-windows-x64:
|
||||
name: windows-x64
|
||||
needs:
|
||||
- build-windows-x64
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: windows-x64
|
||||
bootjdk-platform: windows-x64
|
||||
runs-on: windows-2019
|
||||
|
||||
# Remove bundles so they are not misconstrued as binary distributions from the JDK project
|
||||
remove-bundles:
|
||||
name: 'Remove bundle artifacts'
|
||||
runs-on: ubuntu-20.04
|
||||
if: always()
|
||||
needs:
|
||||
- build-linux-x64
|
||||
- build-linux-x86
|
||||
- build-linux-x64-hs-nopch
|
||||
- build-linux-x64-hs-zero
|
||||
- build-linux-x64-hs-minimal
|
||||
- build-linux-x64-hs-optimized
|
||||
- build-linux-cross-compile
|
||||
- build-macos-x64
|
||||
- build-macos-aarch64
|
||||
- build-windows-x64
|
||||
- build-windows-aarch64
|
||||
- test-linux-x64
|
||||
- test-linux-x86
|
||||
- test-macos-x64
|
||||
- test-windows-x64
|
||||
|
||||
steps:
|
||||
# Hack to get hold of the api environment variables that are only defined for actions
|
||||
- name: 'Get API configuration'
|
||||
id: api
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: 'return { url: process.env["ACTIONS_RUNTIME_URL"], token: process.env["ACTIONS_RUNTIME_TOKEN"] }'
|
||||
|
||||
- name: 'Remove bundle artifacts'
|
||||
run: |
|
||||
# Find and remove all bundle artifacts
|
||||
ALL_ARTIFACT_URLS="$(curl -s \
|
||||
-H 'Accept: application/json;api-version=6.0-preview' \
|
||||
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
|
||||
'${{ fromJson(steps.api.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview')"
|
||||
BUNDLE_ARTIFACT_URLS="$(echo "$ALL_ARTIFACT_URLS" | jq -r -c '.value | map(select(.name|startswith("bundles-"))) | .[].url')"
|
||||
for url in $BUNDLE_ARTIFACT_URLS; do
|
||||
echo "Removing $url"
|
||||
curl -s \
|
||||
-H 'Accept: application/json;api-version=6.0-preview' \
|
||||
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
|
||||
-X DELETE "$url" \
|
||||
|| echo "Failed to remove bundle"
|
||||
done
|
||||
1773
.github/workflows/submit.yml
vendored
1773
.github/workflows/submit.yml
vendored
File diff suppressed because it is too large
Load Diff
205
.github/workflows/test.yml
vendored
Normal file
205
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,205 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
name: 'Run tests'
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
platform:
|
||||
required: true
|
||||
type: string
|
||||
bootjdk-platform:
|
||||
required: true
|
||||
type: string
|
||||
runs-on:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
env:
|
||||
# These are needed to make the MSYS2 bash work properly
|
||||
MSYS2_PATH_TYPE: minimal
|
||||
CHERE_INVOKING: 1
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: test
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
test-name:
|
||||
- 'jdk/tier1 part 1'
|
||||
- 'jdk/tier1 part 2'
|
||||
- 'jdk/tier1 part 3'
|
||||
- 'langtools/tier1'
|
||||
- 'hs/tier1 common'
|
||||
- 'hs/tier1 compiler'
|
||||
- 'hs/tier1 gc'
|
||||
- 'hs/tier1 runtime'
|
||||
- 'hs/tier1 serviceability'
|
||||
|
||||
include:
|
||||
- test-name: 'jdk/tier1 part 1'
|
||||
test-suite: 'test/jdk/:tier1_part1'
|
||||
|
||||
- test-name: 'jdk/tier1 part 2'
|
||||
test-suite: 'test/jdk/:tier1_part2'
|
||||
|
||||
- test-name: 'jdk/tier1 part 3'
|
||||
test-suite: 'test/jdk/:tier1_part3'
|
||||
|
||||
- test-name: 'langtools/tier1'
|
||||
test-suite: 'test/langtools/:tier1'
|
||||
|
||||
- test-name: 'hs/tier1 common'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_common'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 compiler'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 gc'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_gc'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 runtime'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_runtime'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 serviceability'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_serviceability'
|
||||
debug-suffix: -debug
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'Get MSYS2'
|
||||
uses: ./.github/actions/get-msys2
|
||||
if: runner.os == 'Windows'
|
||||
|
||||
- name: 'Get the BootJDK'
|
||||
id: bootjdk
|
||||
uses: ./.github/actions/get-bootjdk
|
||||
with:
|
||||
platform: ${{ inputs.bootjdk-platform }}
|
||||
|
||||
- name: 'Get JTReg'
|
||||
id: jtreg
|
||||
uses: ./.github/actions/get-jtreg
|
||||
|
||||
- name: 'Get bundles'
|
||||
id: bundles
|
||||
uses: ./.github/actions/get-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: ${{ matrix.debug-suffix }}
|
||||
|
||||
- name: 'Install dependencies'
|
||||
run: |
|
||||
# On macOS we need to install some dependencies for testing
|
||||
brew install make
|
||||
sudo xcode-select --switch /Applications/Xcode_11.7.app/Contents/Developer
|
||||
# This will make GNU make available as 'make' and not only as 'gmake'
|
||||
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
|
||||
if: runner.os == 'macOS'
|
||||
|
||||
- name: 'Set PATH'
|
||||
id: path
|
||||
run: |
|
||||
# We need a minimal PATH on Windows
|
||||
# Set PATH to "", so just GITHUB_PATH is included
|
||||
if [[ '${{ runner.os }}' == 'Windows' ]]; then
|
||||
echo "::set-output name=value::"
|
||||
else
|
||||
echo "::set-output name=value::$PATH"
|
||||
fi
|
||||
|
||||
- name: 'Run tests'
|
||||
id: run-tests
|
||||
run: >
|
||||
make test-prebuilt
|
||||
TEST='${{ matrix.test-suite }}'
|
||||
BOOT_JDK=${{ steps.bootjdk.outputs.path }}
|
||||
JT_HOME=${{ steps.jtreg.outputs.path }}
|
||||
JDK_IMAGE_DIR=${{ steps.bundles.outputs.jdk-path }}
|
||||
SYMBOLS_IMAGE_DIR=${{ steps.bundles.outputs.symbols-path }}
|
||||
TEST_IMAGE_DIR=${{ steps.bundles.outputs.tests-path }}
|
||||
JTREG='JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash;VERBOSE=fail,error,time;KEYWORDS=!headful'
|
||||
&& bash ./.github/scripts/gen-test-summary.sh "$GITHUB_STEP_SUMMARY"
|
||||
env:
|
||||
PATH: ${{ steps.path.outputs.value }}
|
||||
|
||||
# This is a separate step, since if the markdown from a step gets bigger than
|
||||
# 1024 kB it is skipped, but then the short summary above is still generated
|
||||
- name: 'Generate test report'
|
||||
run: bash ./.github/scripts/gen-test-results.sh "$GITHUB_STEP_SUMMARY"
|
||||
if: always()
|
||||
|
||||
- name: 'Package test results'
|
||||
id: package
|
||||
run: |
|
||||
# Package test-results and relevant parts of test-support
|
||||
mkdir results
|
||||
|
||||
if [[ -d build/run-test-prebuilt/test-results ]]; then
|
||||
cd build/run-test-prebuilt/test-results/
|
||||
zip -r -9 "$GITHUB_WORKSPACE/results/test-results.zip" .
|
||||
cd $GITHUB_WORKSPACE
|
||||
else
|
||||
echo '::warning ::Missing test-results directory'
|
||||
fi
|
||||
|
||||
if [[ -d build/run-test-prebuilt/test-support ]]; then
|
||||
cd build/run-test-prebuilt/test-support/
|
||||
zip -r -9 "$GITHUB_WORKSPACE/results/test-support.zip" . -i *.jtr -i */hs_err*.log -i */replay*.log
|
||||
cd $GITHUB_WORKSPACE
|
||||
else
|
||||
echo '::warning ::Missing test-support directory'
|
||||
fi
|
||||
|
||||
artifact_name="results-${{ inputs.platform }}-$(echo ${{ matrix.test-name }} | tr '/ ' '__')"
|
||||
echo "::set-output name=artifact-name::$artifact_name"
|
||||
if: always()
|
||||
|
||||
- name: 'Upload test results'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: results
|
||||
name: ${{ steps.package.outputs.artifact-name }}
|
||||
if: always()
|
||||
|
||||
# This is the best way I found to abort the job with an error message
|
||||
- name: 'Notify about test failures'
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: core.setFailed('${{ steps.run-tests.outputs.error-message }}')
|
||||
if: steps.run-tests.outputs.failure == 'true'
|
||||
@@ -1,7 +1,7 @@
|
||||
[general]
|
||||
project=jdk
|
||||
jbs=JDK
|
||||
version=19
|
||||
version=20
|
||||
|
||||
[checks]
|
||||
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
|
||||
|
||||
@@ -810,7 +810,7 @@ ls build/linux-aarch64-server-release/</code></pre></li>
|
||||
<p><a href="http://github.com/icecc/icecream">icecc/icecream</a> is a simple way to setup a distributed compiler network. If you have multiple machines available for building the JDK, you can drastically cut individual build times by utilizing it.</p>
|
||||
<p>To use, setup an icecc network, and install icecc on the build machine. Then run <code>configure</code> using <code>--enable-icecc</code>.</p>
|
||||
<h3 id="using-sjavac">Using sjavac</h3>
|
||||
<p>To speed up Java compilation, especially incremental compilations, you can try the experimental sjavac compiler by using <code>--enable-sjavac</code>.</p>
|
||||
<p>To speed up compilation of Java code, especially during incremental compilations, the sjavac server is automatically enabled in the configuration step by default. To explicitly enable or disable sjavac, use either <code>--enable-javac-server</code> or <code>--disable-javac-server</code>.</p>
|
||||
<h3 id="building-the-right-target">Building the Right Target</h3>
|
||||
<p>Selecting the proper target to build can have dramatic impact on build time. For normal usage, <code>jdk</code> or the default target is just fine. You only need to build <code>images</code> for shipping, or if your tests require it.</p>
|
||||
<p>See also <a href="#using-fine-grained-make-targets">Using Fine-Grained Make Targets</a> on how to build an even smaller subset of the product.</p>
|
||||
@@ -898,13 +898,13 @@ spawn failed</code></pre>
|
||||
<pre><code>export SOURCE_DATE_EPOCH=946684800
|
||||
bash configure --with-version-opt=adhoc
|
||||
make</code></pre>
|
||||
<p>Note that regardless if you specify a source date for <code>configure</code> or not, the JDK build system will set <code>SOURCE_DATE_EPOCH</code> for all build tools when building. If <code>--with-source-date</code> has the value <code>updated</code> (which is the default unless <code>SOURCE_DATE_EPOCH</code> is found by in the environment by <code>configure</code>), the source date value will be determined at build time.</p>
|
||||
<p>Note that regardless if you specify a source date for <code>configure</code> or not, the JDK build system will set <code>SOURCE_DATE_EPOCH</code> for all build tools when building. If <code>--with-source-date</code> has the value <code>current</code> (which is the default unless <code>SOURCE_DATE_EPOCH</code> is found by in the environment by <code>configure</code>), the source date value will be determined at configure time.</p>
|
||||
<p>There are several aspects of reproducible builds that can be individually adjusted by <code>configure</code> arguments. If any of these are given, they will override the value derived from <code>SOURCE_DATE_EPOCH</code>. These arguments are:</p>
|
||||
<ul>
|
||||
<li><p><code>--with-source-date</code></p>
|
||||
<p>This option controls how the JDK build sets <code>SOURCE_DATE_EPOCH</code> when building. It can be set to a value describing a date, either an epoch based timestamp as an integer, or a valid ISO-8601 date.</p>
|
||||
<p>It can also be set to one of the special values <code>current</code>, <code>updated</code> or <code>version</code>. <code>current</code> means that the time of running <code>configure</code> will be used. <code>version</code> will use the nominal release date for the current JDK version. <code>updated</code>, which means that <code>SOURCE_DATE_EPOCH</code> will be set to the current time each time you are running <code>make</code>. All choices, except for <code>updated</code>, will set a fixed value for the source date timestamp.</p>
|
||||
<p>When <code>SOURCE_DATE_EPOCH</code> is set, the default value for <code>--with-source-date</code> will be the value given by <code>SOURCE_DATE_EPOCH</code>. Otherwise, the default value is <code>updated</code>.</p></li>
|
||||
<p>When <code>SOURCE_DATE_EPOCH</code> is set, the default value for <code>--with-source-date</code> will be the value given by <code>SOURCE_DATE_EPOCH</code>. Otherwise, the default value is <code>current</code>.</p></li>
|
||||
<li><p><code>--with-hotspot-build-time</code></p>
|
||||
<p>This option controls the build time string that will be included in the hotspot library (<code>libjvm.so</code> or <code>jvm.dll</code>). When the source date is fixed (e.g. by setting <code>SOURCE_DATE_EPOCH</code>), the default value for <code>--with-hotspot-build-time</code> will be an ISO 8601 representation of that time stamp. Otherwise the default value will be the current time when building hotspot.</p></li>
|
||||
<li><p><code>--with-copyright-year</code></p>
|
||||
|
||||
@@ -1296,8 +1296,10 @@ run `configure` using `--enable-icecc`.
|
||||
|
||||
### Using sjavac
|
||||
|
||||
To speed up Java compilation, especially incremental compilations, you can try
|
||||
the experimental sjavac compiler by using `--enable-sjavac`.
|
||||
To speed up compilation of Java code, especially during incremental compilations,
|
||||
the sjavac server is automatically enabled in the configuration step by default.
|
||||
To explicitly enable or disable sjavac, use either `--enable-javac-server`
|
||||
or `--disable-javac-server`.
|
||||
|
||||
### Building the Right Target
|
||||
|
||||
@@ -1557,9 +1559,9 @@ make
|
||||
|
||||
Note that regardless if you specify a source date for `configure` or not, the
|
||||
JDK build system will set `SOURCE_DATE_EPOCH` for all build tools when building.
|
||||
If `--with-source-date` has the value `updated` (which is the default unless
|
||||
If `--with-source-date` has the value `current` (which is the default unless
|
||||
`SOURCE_DATE_EPOCH` is found by in the environment by `configure`), the source
|
||||
date value will be determined at build time.
|
||||
date value will be determined at configure time.
|
||||
|
||||
There are several aspects of reproducible builds that can be individually
|
||||
adjusted by `configure` arguments. If any of these are given, they will override
|
||||
@@ -1580,7 +1582,7 @@ the value derived from `SOURCE_DATE_EPOCH`. These arguments are:
|
||||
|
||||
When `SOURCE_DATE_EPOCH` is set, the default value for `--with-source-date`
|
||||
will be the value given by `SOURCE_DATE_EPOCH`. Otherwise, the default value
|
||||
is `updated`.
|
||||
is `current`.
|
||||
|
||||
* `--with-hotspot-build-time`
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -226,13 +226,6 @@ else
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
|
||||
endif
|
||||
|
||||
# For reproducible builds specify the jmod --date using SOURCE_DATE in ISO-8601
|
||||
ifeq ($(ENABLE_REPRODUCIBLE_BUILD), true)
|
||||
JMOD_SOURCE_DATE := --date $(SOURCE_DATE_ISO_8601)
|
||||
else
|
||||
JMOD_SOURCE_DATE :=
|
||||
endif
|
||||
|
||||
# Create jmods in the support dir and then move them into place to keep the
|
||||
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
|
||||
$(eval $(call SetupExecute, create_$(JMOD_FILE), \
|
||||
@@ -244,7 +237,7 @@ $(eval $(call SetupExecute, create_$(JMOD_FILE), \
|
||||
COMMAND := $(JMOD) create --module-version $(VERSION_SHORT) \
|
||||
--target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \
|
||||
--module-path $(JMODS_DIR) $(JMOD_FLAGS) \
|
||||
$(JMOD_SOURCE_DATE) \
|
||||
--date $(SOURCE_DATE_ISO_8601) \
|
||||
$(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \
|
||||
POST_COMMAND := $(MV) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE) $(JMODS_DIR)/$(JMOD_FILE), \
|
||||
))
|
||||
|
||||
@@ -104,14 +104,14 @@ JAVADOC_DISABLED_DOCLINT_PACKAGES := org.w3c.* javax.smartcardio
|
||||
|
||||
# The initial set of options for javadoc
|
||||
JAVADOC_OPTIONS := -use -keywords -notimestamp \
|
||||
-serialwarn -encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \
|
||||
-encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \
|
||||
-splitIndex --system none -javafx --expand-requires transitive \
|
||||
--override-methods=summary
|
||||
|
||||
# The reference options must stay stable to allow for comparisons across the
|
||||
# development cycle.
|
||||
REFERENCE_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \
|
||||
-serialwarn -encoding ISO-8859-1 -breakiterator -splitIndex --system none \
|
||||
-encoding ISO-8859-1 -breakiterator -splitIndex --system none \
|
||||
-html5 -javafx --expand-requires transitive
|
||||
|
||||
# Should we add DRAFT stamps to the generated javadoc?
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -114,67 +114,66 @@ $(eval $(call SetupExecute, jlink_jre, \
|
||||
|
||||
JLINK_JRE_TARGETS := $(jlink_jre)
|
||||
|
||||
ifeq ($(BUILD_CDS_ARCHIVE), true)
|
||||
# Optimize CDS shared heap for small heap sizes, which are typically used
|
||||
# for small cloud-based apps that have the most critical start-up requirement.
|
||||
# The trade-off is that when larger heap sizes are used, the shared heap
|
||||
# may need to be relocated at runtime.
|
||||
CDS_DUMP_FLAGS = -Xmx128M -Xms128M
|
||||
|
||||
# Helper function for creating the CDS archives for the JDK and JRE
|
||||
#
|
||||
# Param1 - VM variant (e.g., server, client, zero, ...)
|
||||
# Param2 - _nocoops, or empty
|
||||
define CreateCDSArchive
|
||||
$1_$2_DUMP_EXTRA_ARG := $(if $(filter _nocoops, $2),-XX:-UseCompressedOops,)
|
||||
$1_$2_DUMP_TYPE := $(if $(filter _nocoops, $2),-NOCOOPS,)
|
||||
|
||||
# Only G1 supports dumping the shared heap, so explicitly use G1 if the JVM supports it.
|
||||
$1_$2_CDS_DUMP_FLAGS := $(CDS_DUMP_FLAGS) $(if $(filter g1gc, $(JVM_FEATURES_$1)),-XX:+UseG1GC)
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
CDS_ARCHIVE := bin/server/classes.jsa
|
||||
CDS_NOCOOPS_ARCHIVE := bin/server/classes_nocoops.jsa
|
||||
$1_$2_CDS_ARCHIVE := bin/$1/classes$2.jsa
|
||||
else
|
||||
CDS_ARCHIVE := lib/server/classes.jsa
|
||||
CDS_NOCOOPS_ARCHIVE := lib/server/classes_nocoops.jsa
|
||||
$1_$2_CDS_ARCHIVE := lib/$1/classes$2.jsa
|
||||
endif
|
||||
|
||||
$(eval $(call SetupExecute, gen_cds_archive_jdk, \
|
||||
WARN := Creating CDS archive for jdk image, \
|
||||
DEPS := $(jlink_jdk), \
|
||||
OUTPUT_FILE := $(JDK_IMAGE_DIR)/$(CDS_ARCHIVE), \
|
||||
SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk, \
|
||||
COMMAND := $(FIXPATH) $(JDK_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-XX:SharedArchiveFile=$(JDK_IMAGE_DIR)/$(CDS_ARCHIVE) \
|
||||
-Xmx128M -Xms128M $(LOG_INFO), \
|
||||
$$(eval $$(call SetupExecute, $1_$2_gen_cds_archive_jdk, \
|
||||
WARN := Creating CDS$$($1_$2_DUMP_TYPE) archive for jdk image for $1, \
|
||||
INFO := Using CDS flags for $1: $$($1_$2_CDS_DUMP_FLAGS), \
|
||||
DEPS := $$(jlink_jdk), \
|
||||
OUTPUT_FILE := $$(JDK_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE), \
|
||||
SUPPORT_DIR := $$(SUPPORT_OUTPUTDIR)/images/jdk, \
|
||||
COMMAND := $$(FIXPATH) $$(JDK_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-XX:SharedArchiveFile=$$(JDK_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE) \
|
||||
-$1 $$($1_$2_DUMP_EXTRA_ARG) $$($1_$2_CDS_DUMP_FLAGS) $$(LOG_INFO), \
|
||||
))
|
||||
|
||||
JDK_TARGETS += $(gen_cds_archive_jdk)
|
||||
JDK_TARGETS += $$($1_$2_gen_cds_archive_jdk)
|
||||
|
||||
$(eval $(call SetupExecute, gen_cds_archive_jre, \
|
||||
WARN := Creating CDS archive for jre image, \
|
||||
DEPS := $(jlink_jre), \
|
||||
OUTPUT_FILE := $(JRE_IMAGE_DIR)/$(CDS_ARCHIVE), \
|
||||
SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jre, \
|
||||
COMMAND := $(FIXPATH) $(JRE_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-XX:SharedArchiveFile=$(JRE_IMAGE_DIR)/$(CDS_ARCHIVE) \
|
||||
-Xmx128M -Xms128M $(LOG_INFO), \
|
||||
$$(eval $$(call SetupExecute, $1_$2_gen_cds_archive_jre, \
|
||||
WARN := Creating CDS$$($1_$2_DUMP_TYPE) archive for jre image for $1, \
|
||||
INFO := Using CDS flags for $1: $$($1_$2_CDS_DUMP_FLAGS), \
|
||||
DEPS := $$(jlink_jre), \
|
||||
OUTPUT_FILE := $$(JRE_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE), \
|
||||
SUPPORT_DIR := $$(SUPPORT_OUTPUTDIR)/images/jre, \
|
||||
COMMAND := $$(FIXPATH) $$(JRE_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-XX:SharedArchiveFile=$$(JRE_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE) \
|
||||
-$1 $$($1_$2_DUMP_EXTRA_ARG) $$($1_$2_CDS_DUMP_FLAGS) $$(LOG_INFO), \
|
||||
))
|
||||
|
||||
JRE_TARGETS += $(gen_cds_archive_jre)
|
||||
JRE_TARGETS += $$($1_$2_gen_cds_archive_jre)
|
||||
endef
|
||||
|
||||
ifeq ($(BUILD_CDS_ARCHIVE), true)
|
||||
$(foreach v, $(JVM_VARIANTS), \
|
||||
$(eval $(call CreateCDSArchive,$v,)) \
|
||||
)
|
||||
|
||||
ifeq ($(call isTargetCpuBits, 64), true)
|
||||
$(eval $(call SetupExecute, gen_cds_nocoops_archive_jdk, \
|
||||
WARN := Creating CDS-NOCOOPS archive for jdk image, \
|
||||
DEPS := $(jlink_jdk), \
|
||||
OUTPUT_FILE := $(JDK_IMAGE_DIR)/$(CDS_NOCOOPS_ARCHIVE), \
|
||||
SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk, \
|
||||
COMMAND := $(FIXPATH) $(JDK_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-XX:SharedArchiveFile=$(JDK_IMAGE_DIR)/$(CDS_NOCOOPS_ARCHIVE) \
|
||||
-XX:-UseCompressedOops \
|
||||
-Xmx128M -Xms128M $(LOG_INFO), \
|
||||
))
|
||||
|
||||
JDK_TARGETS += $(gen_cds_nocoops_archive_jdk)
|
||||
|
||||
$(eval $(call SetupExecute, gen_cds_nocoops_archive_jre, \
|
||||
WARN := Creating CDS-NOCOOPS archive for jre image, \
|
||||
DEPS := $(jlink_jre), \
|
||||
OUTPUT_FILE := $(JRE_IMAGE_DIR)/$(CDS_NOCOOPS_ARCHIVE), \
|
||||
SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jre, \
|
||||
COMMAND := $(FIXPATH) $(JRE_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-XX:SharedArchiveFile=$(JRE_IMAGE_DIR)/$(CDS_NOCOOPS_ARCHIVE) \
|
||||
-XX:-UseCompressedOops \
|
||||
-Xmx128M -Xms128M $(LOG_INFO), \
|
||||
))
|
||||
|
||||
JRE_TARGETS += $(gen_cds_nocoops_archive_jre)
|
||||
$(foreach v, $(JVM_VARIANTS), \
|
||||
$(eval $(call CreateCDSArchive,$v,_nocoops)) \
|
||||
)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -436,21 +436,24 @@ else # $(HAS_SPEC)=true
|
||||
|
||||
define PrintFailureReports
|
||||
$(if $(filter none, $(LOG_REPORT)), , \
|
||||
$(RM) $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log ; \
|
||||
$(if $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log), \
|
||||
$(PRINTF) "\n=== Output from failing command(s) repeated here ===\n" $(NEWLINE) \
|
||||
$(foreach logfile, $(sort $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log)), \
|
||||
$(PRINTF) "* For target $(notdir $(basename $(logfile))):\n" $(NEWLINE) \
|
||||
$(if $(filter all, $(LOG_REPORT)), \
|
||||
$(GREP) -v -e "^Note: including file:" < $(logfile) || true $(NEWLINE) \
|
||||
, \
|
||||
($(GREP) -v -e "^Note: including file:" < $(logfile) || true) | $(HEAD) -n 15 $(NEWLINE) \
|
||||
if test `$(WC) -l < $(logfile)` -gt 15; then \
|
||||
$(ECHO) " ... (rest of output omitted)" ; \
|
||||
fi $(NEWLINE) \
|
||||
) \
|
||||
) \
|
||||
$(PRINTF) "\n* All command lines available in $(MAKESUPPORT_OUTPUTDIR)/failure-logs.\n" $(NEWLINE) \
|
||||
$(PRINTF) "=== End of repeated output ===\n" \
|
||||
( \
|
||||
$(PRINTF) "\n=== Output from failing command(s) repeated here ===\n" ; \
|
||||
$(foreach logfile, $(sort $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log)), \
|
||||
$(PRINTF) "* For target $(notdir $(basename $(logfile))):\n" ; \
|
||||
$(if $(filter all, $(LOG_REPORT)), \
|
||||
$(GREP) -v -e "^Note: including file:" < $(logfile) || true ; \
|
||||
, \
|
||||
($(GREP) -v -e "^Note: including file:" < $(logfile) || true) | $(HEAD) -n 15 ; \
|
||||
if test `$(WC) -l < $(logfile)` -gt 15; then \
|
||||
$(ECHO) " ... (rest of output omitted)" ; \
|
||||
fi ; \
|
||||
) \
|
||||
) \
|
||||
$(PRINTF) "\n* All command lines available in $(MAKESUPPORT_OUTPUTDIR)/failure-logs.\n" ; \
|
||||
$(PRINTF) "=== End of repeated output ===\n" ; \
|
||||
) >> $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log \
|
||||
) \
|
||||
)
|
||||
endef
|
||||
@@ -465,7 +468,8 @@ else # $(HAS_SPEC)=true
|
||||
else \
|
||||
$(PRINTF) "\nNo indication of failed target found.\n" ; \
|
||||
$(PRINTF) "HELP: Try searching the build log for '] Error'.\n" ; \
|
||||
fi \
|
||||
fi >> $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log ; \
|
||||
$(CAT) $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log \
|
||||
)
|
||||
endef
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -349,13 +349,24 @@ ExpandJtregPath = \
|
||||
)) \
|
||||
)
|
||||
|
||||
# with test id: dir/Test.java#selection -> Test.java#selection -> .java#selection -> #selection
|
||||
# without: dir/Test.java -> Test.java -> .java -> <<empty string>>
|
||||
TestID = \
|
||||
$(subst .java,,$(suffix $(notdir $1)))
|
||||
|
||||
# The test id starting with a hash (#testid) will be stripped by all
|
||||
# evals in ParseJtregTestSelectionInner and will be reinserted by calling
|
||||
# TestID (if it is present).
|
||||
ParseJtregTestSelection = \
|
||||
$(call IfAppend, $(call ParseJtregTestSelectionInner, $1), $(call TestID, $1))
|
||||
|
||||
# Helper function to determine if a test specification is a Jtreg test
|
||||
#
|
||||
# It is a Jtreg test if it optionally begins with jtreg:, and then is either
|
||||
# an unspecified group name (possibly prefixed by :), or a group in a
|
||||
# specified test root, or a path to a test or test directory,
|
||||
# either absolute or relative to any of the TEST_BASEDIRS or test roots.
|
||||
define ParseJtregTestSelection
|
||||
define ParseJtregTestSelectionInner
|
||||
$(eval TEST_NAME := $(strip $(patsubst jtreg:%, %, $1))) \
|
||||
$(if $(or $(findstring :, $(TEST_NAME)), $(findstring /, $(TEST_NAME))), , \
|
||||
$(eval TEST_NAME := :$(TEST_NAME)) \
|
||||
@@ -419,28 +430,19 @@ ifeq ($(TEST), )
|
||||
$(error Cannot continue)
|
||||
endif
|
||||
|
||||
ParseTestSelection = \
|
||||
$(strip $(or \
|
||||
$(call ParseCustomTestSelection, $1) \
|
||||
$(call ParseGtestTestSelection, $1) \
|
||||
$(call ParseMicroTestSelection, $1) \
|
||||
$(call ParseJtregTestSelection, $1) \
|
||||
$(call ParseSpecialTestSelection, $1) \
|
||||
))
|
||||
|
||||
# Now intelligently convert the test selection given by the user in TEST
|
||||
# into a list of fully qualified test descriptors of the tests to run.
|
||||
TESTS_TO_RUN :=
|
||||
$(foreach test, $(TEST), \
|
||||
$(eval PARSED_TESTS := $(call ParseCustomTestSelection, $(test))) \
|
||||
$(if $(strip $(PARSED_TESTS)), , \
|
||||
$(eval PARSED_TESTS += $(call ParseGtestTestSelection, $(test))) \
|
||||
) \
|
||||
$(if $(strip $(PARSED_TESTS)), , \
|
||||
$(eval PARSED_TESTS += $(call ParseMicroTestSelection, $(test))) \
|
||||
) \
|
||||
$(if $(strip $(PARSED_TESTS)), , \
|
||||
$(eval PARSED_TESTS += $(call ParseJtregTestSelection, $(test))) \
|
||||
) \
|
||||
$(if $(strip $(PARSED_TESTS)), , \
|
||||
$(eval PARSED_TESTS += $(call ParseSpecialTestSelection, $(test))) \
|
||||
) \
|
||||
$(if $(strip $(PARSED_TESTS)), , \
|
||||
$(eval UNKNOWN_TEST := $(test)) \
|
||||
) \
|
||||
$(eval TESTS_TO_RUN += $(PARSED_TESTS)) \
|
||||
)
|
||||
TESTS_TO_RUN := $(strip $(foreach test, $(TEST), $(call ParseTestSelection, $(test))))
|
||||
UNKNOWN_TEST := $(strip $(foreach test, $(TEST), $(if $(call ParseTestSelection, $(test)), , $(test))))
|
||||
|
||||
ifneq ($(UNKNOWN_TEST), )
|
||||
$(info Unknown test selection: '$(UNKNOWN_TEST)')
|
||||
@@ -448,9 +450,6 @@ ifneq ($(UNKNOWN_TEST), )
|
||||
$(error Cannot continue)
|
||||
endif
|
||||
|
||||
TESTS_TO_RUN := $(strip $(TESTS_TO_RUN))
|
||||
|
||||
|
||||
# Present the result of our parsing to the user
|
||||
$(info Test selection '$(TEST)', will run:)
|
||||
$(foreach test, $(TESTS_TO_RUN), $(info * $(test)))
|
||||
@@ -786,6 +785,8 @@ define SetupRunJtregTestBody
|
||||
# symbol lookup in hserr files
|
||||
ifeq ($$(call isTargetOs, windows), true)
|
||||
$1_JTREG_BASIC_OPTIONS += -e:_NT_SYMBOL_PATH
|
||||
else ifeq ($$(call isTargetOs, linux), true)
|
||||
$1_JTREG_BASIC_OPTIONS += -e:_JVM_DWARF_PATH=$$(SYMBOLS_IMAGE_DIR)
|
||||
endif
|
||||
|
||||
$1_JTREG_BASIC_OPTIONS += \
|
||||
|
||||
@@ -300,6 +300,8 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
||||
# Prepend the extra path to the global path
|
||||
UTIL_PREPEND_TO_PATH([PATH],$EXTRA_PATH)
|
||||
|
||||
UTIL_FIXUP_PATH([SYSROOT])
|
||||
|
||||
AC_MSG_CHECKING([for sysroot])
|
||||
AC_MSG_RESULT([$SYSROOT])
|
||||
AC_SUBST(SYSROOT)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -126,16 +126,18 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
|
||||
AC_DEFUN([BOOTJDK_CHECK_ARGUMENTS],
|
||||
[
|
||||
if test "x$with_boot_jdk" != x; then
|
||||
if test -d "$with_boot_jdk"; then
|
||||
BOOT_JDK=$with_boot_jdk
|
||||
BOOT_JDK_ARG="$with_boot_jdk"
|
||||
UTIL_FIXUP_PATH(BOOT_JDK_ARG)
|
||||
if test -d "$BOOT_JDK_ARG"; then
|
||||
BOOT_JDK=$BOOT_JDK_ARG
|
||||
BOOT_JDK_FOUND=maybe
|
||||
elif test -f "$with_boot_jdk"; then
|
||||
case "$with_boot_jdk" in
|
||||
elif test -f "$BOOT_JDK_ARG"; then
|
||||
case "$BOOT_JDK_ARG" in
|
||||
*.tar.gz )
|
||||
BOOT_JDK_SUPPORT_DIR=$CONFIGURESUPPORT_OUTPUTDIR/boot-jdk
|
||||
$RM -rf $BOOT_JDK_SUPPORT_DIR
|
||||
$MKDIR -p $BOOT_JDK_SUPPORT_DIR
|
||||
$GUNZIP -c $with_boot_jdk | $TAR xf - -C $BOOT_JDK_SUPPORT_DIR
|
||||
$GUNZIP -c $BOOT_JDK_ARG | $TAR xf - -C $BOOT_JDK_SUPPORT_DIR
|
||||
|
||||
# Try to find javac to determine BOOT_JDK path
|
||||
BOOT_JDK_JAVAC_PATH=`$FIND $BOOT_JDK_SUPPORT_DIR | $GREP "/bin/javac"`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -92,7 +92,6 @@ if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
export PATH="$PATH:@TOOLCHAIN_PATH@"
|
||||
fi
|
||||
|
||||
export HOTSPOT_BUILD_TIME="@HOTSPOT_BUILD_TIME@"
|
||||
export USE_PRECOMPILED_HEADER="@USE_PRECOMPILED_HEADER@"
|
||||
|
||||
# Now locate the main script and run it.
|
||||
|
||||
@@ -191,18 +191,15 @@ TOOLCHAIN_POST_DETECTION
|
||||
TOOLCHAIN_SETUP_BUILD_COMPILERS
|
||||
TOOLCHAIN_MISC_CHECKS
|
||||
|
||||
# Setup the JTReg Regression Test Harness.
|
||||
TOOLCHAIN_SETUP_JTREG
|
||||
|
||||
# Setup the Java Microbenchmark Harness (JMH)
|
||||
LIB_TESTS_SETUP_JMH
|
||||
|
||||
# Setup Jib dependency tool
|
||||
TOOLCHAIN_SETUP_JIB
|
||||
|
||||
# After toolchain setup, we need to process some flags to be able to continue.
|
||||
FLAGS_POST_TOOLCHAIN
|
||||
|
||||
# Setup the tools needed to test the JDK (JTReg Regression Test Harness,
|
||||
# Java Microbenchmark Harness (JMH) and the Jib dependency tool).
|
||||
LIB_TESTS_SETUP_JTREG
|
||||
LIB_TESTS_SETUP_JMH
|
||||
LIB_TESTS_SETUP_JIB
|
||||
|
||||
# Now we can test some aspects on the target using configure macros.
|
||||
PLATFORM_SETUP_OPENJDK_TARGET_BITS
|
||||
PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
|
||||
@@ -243,7 +240,8 @@ HOTSPOT_SETUP_MISC
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER
|
||||
LIB_TESTS_ENABLE_DISABLE_FAILURE_HANDLER
|
||||
|
||||
JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
|
||||
JDKOPT_EXCLUDE_TRANSLATIONS
|
||||
JDKOPT_ENABLE_DISABLE_MANPAGES
|
||||
|
||||
@@ -113,9 +113,21 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
|
||||
)
|
||||
fi
|
||||
|
||||
CFLAGS_DEBUG_SYMBOLS="-g"
|
||||
CFLAGS_DEBUG_SYMBOLS="-g -gdwarf-4"
|
||||
ASFLAGS_DEBUG_SYMBOLS="-g"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
if test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = "xfalse"; then
|
||||
# Check if compiler supports -fdebug-prefix-map. If so, use that to make
|
||||
# the debug symbol paths resolve to paths relative to the workspace root.
|
||||
workspace_root_trailing_slash="${WORKSPACE_ROOT%/}/"
|
||||
DEBUG_PREFIX_CFLAGS="-fdebug-prefix-map=${workspace_root_trailing_slash}="
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${DEBUG_PREFIX_CFLAGS}],
|
||||
IF_FALSE: [
|
||||
DEBUG_PREFIX_CFLAGS=
|
||||
]
|
||||
)
|
||||
fi
|
||||
|
||||
CFLAGS_DEBUG_SYMBOLS="-g"
|
||||
ASFLAGS_DEBUG_SYMBOLS="-g"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
@@ -774,10 +786,8 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
$1_TOOLCHAIN_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG}"
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft && test "x$ENABLE_REPRODUCIBLE_BUILD" = xtrue; then
|
||||
# Enabling deterministic creates warnings if __DATE__ or __TIME__ are
|
||||
# used, and since we are, silence that warning.
|
||||
REPRODUCIBLE_CFLAGS="-experimental:deterministic -wd5048"
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
REPRODUCIBLE_CFLAGS="-experimental:deterministic"
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${REPRODUCIBLE_CFLAGS}],
|
||||
PREFIX: $3,
|
||||
IF_FALSE: [
|
||||
@@ -804,8 +814,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
FILE_MACRO_CFLAGS=
|
||||
]
|
||||
)
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft &&
|
||||
test "x$ENABLE_REPRODUCIBLE_BUILD" = xtrue; then
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# There is a known issue with the pathmap if the mapping is made to the
|
||||
# empty string. Add a minimal string "s" as prefix to work around this.
|
||||
# PATHMAP_FLAGS is also added to LDFLAGS in flags-ldflags.m4.
|
||||
|
||||
@@ -128,10 +128,13 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$ENABLE_REPRODUCIBLE_BUILD" = "xtrue"; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
REPRODUCIBLE_LDFLAGS="-experimental:deterministic"
|
||||
fi
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
REPRODUCIBLE_LDFLAGS="-experimental:deterministic"
|
||||
FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$REPRODUCIBLE_LDFLAGS],
|
||||
IF_FALSE: [
|
||||
REPRODUCIBLE_LDFLAGS=
|
||||
]
|
||||
)
|
||||
fi
|
||||
|
||||
if test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = "xfalse"; then
|
||||
|
||||
@@ -311,6 +311,13 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||
fi
|
||||
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
|
||||
printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
|
||||
if test "x$DEVKIT_NAME" != x; then
|
||||
printf "* Devkit: $DEVKIT_NAME ($DEVKIT_ROOT)\n"
|
||||
elif test "x$DEVKIT_ROOT" != x; then
|
||||
printf "* Devkit: $DEVKIT_ROOT\n"
|
||||
elif test "x$SYSROOT" != x; then
|
||||
printf "* Sysroot: $SYSROOT\n"
|
||||
fi
|
||||
printf "* C Compiler: Version $CC_VERSION_NUMBER (at ${CC#"$FIXPATH "})\n"
|
||||
printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at ${CXX#"$FIXPATH "})\n"
|
||||
|
||||
|
||||
@@ -486,29 +486,6 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JLINK_OPTIONS],
|
||||
AC_SUBST(JLINK_KEEP_PACKAGED_MODULES)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Check if building of the jtreg failure handler should be enabled.
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER],
|
||||
[
|
||||
UTIL_ARG_ENABLE(NAME: jtreg-failure-handler, DEFAULT: auto,
|
||||
RESULT: BUILD_FAILURE_HANDLER,
|
||||
DESC: [enable keeping of packaged modules in jdk image],
|
||||
DEFAULT_DESC: [enabled if jtreg is present],
|
||||
CHECKING_MSG: [if the jtreg failure handler should be built],
|
||||
CHECK_AVAILABLE: [
|
||||
AC_MSG_CHECKING([if the jtreg failure handler is available])
|
||||
if test "x$JT_HOME" != "x"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AVAILABLE=false
|
||||
AC_MSG_RESULT([no (jtreg not present)])
|
||||
fi
|
||||
])
|
||||
AC_SUBST(BUILD_FAILURE_HANDLER)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Enable or disable generation of the classlist at build time
|
||||
@@ -648,7 +625,7 @@ AC_DEFUN([JDKOPT_ALLOW_ABSOLUTE_PATHS_IN_OUTPUT],
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
|
||||
[
|
||||
AC_ARG_WITH([source-date], [AS_HELP_STRING([--with-source-date],
|
||||
[how to set SOURCE_DATE_EPOCH ('updated', 'current', 'version' a timestamp or an ISO-8601 date) @<:@updated/value of SOURCE_DATE_EPOCH@:>@])],
|
||||
[how to set SOURCE_DATE_EPOCH ('updated', 'current', 'version' a timestamp or an ISO-8601 date) @<:@current/value of SOURCE_DATE_EPOCH@:>@])],
|
||||
[with_source_date_present=true], [with_source_date_present=false])
|
||||
|
||||
if test "x$SOURCE_DATE_EPOCH" != x && test "x$with_source_date" != x; then
|
||||
@@ -665,9 +642,9 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
|
||||
with_source_date_present=true
|
||||
AC_MSG_RESULT([$SOURCE_DATE, from SOURCE_DATE_EPOCH])
|
||||
else
|
||||
# Tell the makefiles to update at each build
|
||||
SOURCE_DATE=updated
|
||||
AC_MSG_RESULT([determined at build time (default)])
|
||||
# Tell makefiles to take the time from configure
|
||||
SOURCE_DATE=$($DATE +"%s")
|
||||
AC_MSG_RESULT([$SOURCE_DATE, from 'current' (default)])
|
||||
fi
|
||||
elif test "x$with_source_date" = xupdated; then
|
||||
SOURCE_DATE=updated
|
||||
@@ -713,30 +690,9 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
|
||||
fi
|
||||
fi
|
||||
|
||||
REPRODUCIBLE_BUILD_DEFAULT=$with_source_date_present
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows && \
|
||||
test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = xfalse; then
|
||||
# To support banning absolute paths on Windows, we must use the -pathmap
|
||||
# method, which requires reproducible builds.
|
||||
REPRODUCIBLE_BUILD_DEFAULT=true
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: reproducible-build, DEFAULT: $REPRODUCIBLE_BUILD_DEFAULT,
|
||||
RESULT: ENABLE_REPRODUCIBLE_BUILD,
|
||||
DESC: [enable reproducible builds (not yet fully functional)],
|
||||
DEFAULT_DESC: [enabled if --with-source-date is given or on Windows without absolute paths])
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows && \
|
||||
test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = xfalse && \
|
||||
test "x$ENABLE_REPRODUCIBLE_BUILD" = xfalse; then
|
||||
AC_MSG_NOTICE([On Windows it is not possible to combine --disable-reproducible-build])
|
||||
AC_MSG_NOTICE([with --disable-absolute-paths-in-output.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
AC_SUBST(SOURCE_DATE)
|
||||
AC_SUBST(ENABLE_REPRODUCIBLE_BUILD)
|
||||
AC_SUBST(ISO_8601_FORMAT_STRING)
|
||||
AC_SUBST(SOURCE_DATE_ISO_8601)
|
||||
|
||||
UTIL_DEPRECATED_ARG_ENABLE(reproducible-build)
|
||||
])
|
||||
|
||||
@@ -410,7 +410,7 @@ AC_DEFUN([JVM_FEATURES_PREPARE_VARIANT],
|
||||
elif test "x$variant" = "xcore"; then
|
||||
JVM_FEATURES_VARIANT_UNAVAILABLE="cds minimal zero"
|
||||
elif test "x$variant" = "xzero"; then
|
||||
JVM_FEATURES_VARIANT_UNAVAILABLE="cds compiler1 compiler2 \
|
||||
JVM_FEATURES_VARIANT_UNAVAILABLE="compiler1 compiler2 \
|
||||
jvmci minimal zgc"
|
||||
else
|
||||
JVM_FEATURES_VARIANT_UNAVAILABLE="minimal zero"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -23,6 +23,13 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Setup libraries and functionalities needed to test the JDK.
|
||||
################################################################################
|
||||
|
||||
# Minimum supported version
|
||||
JTREG_MINIMUM_VERSION=6.1
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Setup and check for gtest framework source files
|
||||
@@ -118,3 +125,163 @@ AC_DEFUN_ONCE([LIB_TESTS_SETUP_JMH],
|
||||
AC_SUBST(JMH_COMMONS_MATH_JAR)
|
||||
AC_SUBST(JMH_VERSION)
|
||||
])
|
||||
|
||||
# Setup the JTReg Regression Test Harness.
|
||||
AC_DEFUN_ONCE([LIB_TESTS_SETUP_JTREG],
|
||||
[
|
||||
AC_ARG_WITH(jtreg, [AS_HELP_STRING([--with-jtreg],
|
||||
[Regression Test Harness @<:@probed@:>@])])
|
||||
|
||||
if test "x$with_jtreg" = xno; then
|
||||
# jtreg disabled
|
||||
AC_MSG_CHECKING([for jtreg test harness])
|
||||
AC_MSG_RESULT([no, disabled])
|
||||
elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
|
||||
if test -d "$with_jtreg"; then
|
||||
# An explicit path is specified, use it.
|
||||
JT_HOME="$with_jtreg"
|
||||
else
|
||||
case "$with_jtreg" in
|
||||
*.zip )
|
||||
JTREG_SUPPORT_DIR=$CONFIGURESUPPORT_OUTPUTDIR/jtreg
|
||||
$RM -rf $JTREG_SUPPORT_DIR
|
||||
$MKDIR -p $JTREG_SUPPORT_DIR
|
||||
$UNZIP -qq -d $JTREG_SUPPORT_DIR $with_jtreg
|
||||
|
||||
# Try to find jtreg to determine JT_HOME path
|
||||
JTREG_PATH=`$FIND $JTREG_SUPPORT_DIR | $GREP "/bin/jtreg"`
|
||||
if test "x$JTREG_PATH" != x; then
|
||||
JT_HOME=$($DIRNAME $($DIRNAME $JTREG_PATH))
|
||||
fi
|
||||
;;
|
||||
* )
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
UTIL_FIXUP_PATH([JT_HOME])
|
||||
if test ! -d "$JT_HOME"; then
|
||||
AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg does not exist])
|
||||
fi
|
||||
|
||||
if test ! -e "$JT_HOME/lib/jtreg.jar"; then
|
||||
AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for jtreg test harness])
|
||||
AC_MSG_RESULT([$JT_HOME])
|
||||
else
|
||||
# Try to locate jtreg using the JT_HOME environment variable
|
||||
if test "x$JT_HOME" != x; then
|
||||
# JT_HOME set in environment, use it
|
||||
if test ! -d "$JT_HOME"; then
|
||||
AC_MSG_WARN([Ignoring JT_HOME pointing to invalid directory: $JT_HOME])
|
||||
JT_HOME=
|
||||
else
|
||||
if test ! -e "$JT_HOME/lib/jtreg.jar"; then
|
||||
AC_MSG_WARN([Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME])
|
||||
JT_HOME=
|
||||
else
|
||||
AC_MSG_NOTICE([Located jtreg using JT_HOME from environment])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$JT_HOME" = x; then
|
||||
# JT_HOME is not set in environment, or was deemed invalid.
|
||||
# Try to find jtreg on path
|
||||
UTIL_LOOKUP_PROGS(JTREGEXE, jtreg)
|
||||
if test "x$JTREGEXE" != x; then
|
||||
# That's good, now try to derive JT_HOME
|
||||
JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
|
||||
if test ! -e "$JT_HOME/lib/jtreg.jar"; then
|
||||
AC_MSG_WARN([Ignoring jtreg from path since a valid jtreg home cannot be found])
|
||||
JT_HOME=
|
||||
else
|
||||
AC_MSG_NOTICE([Located jtreg using jtreg executable in path])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for jtreg test harness])
|
||||
if test "x$JT_HOME" != x; then
|
||||
AC_MSG_RESULT([$JT_HOME])
|
||||
else
|
||||
AC_MSG_RESULT([no, not found])
|
||||
|
||||
if test "x$with_jtreg" = xyes; then
|
||||
AC_MSG_ERROR([--with-jtreg was specified, but no jtreg found.])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
UTIL_FIXUP_PATH(JT_HOME)
|
||||
AC_SUBST(JT_HOME)
|
||||
|
||||
# Verify jtreg version
|
||||
if test "x$JT_HOME" != x; then
|
||||
AC_MSG_CHECKING([jtreg version number])
|
||||
# jtreg -version looks like this: "jtreg 6.1+1-19"
|
||||
# Extract actual version part ("6.1" in this case)
|
||||
jtreg_version_full=`$JAVA -jar $JT_HOME/lib/jtreg.jar -version | $HEAD -n 1 | $CUT -d ' ' -f 2`
|
||||
jtreg_version=${jtreg_version_full/%+*}
|
||||
AC_MSG_RESULT([$jtreg_version])
|
||||
|
||||
# This is a simplified version of TOOLCHAIN_CHECK_COMPILER_VERSION
|
||||
comparable_actual_version=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", [$]1, [$]2, [$]3, [$]4) }' <<< "$jtreg_version"`
|
||||
comparable_minimum_version=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", [$]1, [$]2, [$]3, [$]4) }' <<< "$JTREG_MINIMUM_VERSION"`
|
||||
if test $comparable_actual_version -lt $comparable_minimum_version ; then
|
||||
AC_MSG_ERROR([jtreg version is too old, at least version $JTREG_MINIMUM_VERSION is required])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# Setup the JIB dependency resolver
|
||||
AC_DEFUN_ONCE([LIB_TESTS_SETUP_JIB],
|
||||
[
|
||||
AC_ARG_WITH(jib, [AS_HELP_STRING([--with-jib],
|
||||
[Jib dependency management tool @<:@not used@:>@])])
|
||||
|
||||
if test "x$with_jib" = xno || test "x$with_jib" = x; then
|
||||
# jib disabled
|
||||
AC_MSG_CHECKING([for jib])
|
||||
AC_MSG_RESULT(no)
|
||||
elif test "x$with_jib" = xyes; then
|
||||
AC_MSG_ERROR([Must supply a value to --with-jib])
|
||||
else
|
||||
JIB_HOME="${with_jib}"
|
||||
AC_MSG_CHECKING([for jib])
|
||||
AC_MSG_RESULT(${JIB_HOME})
|
||||
if test ! -d "${JIB_HOME}"; then
|
||||
AC_MSG_ERROR([--with-jib must be a directory])
|
||||
fi
|
||||
JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
|
||||
if test ! -f "${JIB_JAR}"; then
|
||||
AC_MSG_ERROR([Could not find jib jar file in ${JIB_HOME}])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(JIB_HOME)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Check if building of the jtreg failure handler should be enabled.
|
||||
#
|
||||
AC_DEFUN_ONCE([LIB_TESTS_ENABLE_DISABLE_FAILURE_HANDLER],
|
||||
[
|
||||
UTIL_ARG_ENABLE(NAME: jtreg-failure-handler, DEFAULT: auto,
|
||||
RESULT: BUILD_FAILURE_HANDLER,
|
||||
DESC: [enable building of the jtreg failure handler],
|
||||
DEFAULT_DESC: [enabled if jtreg is present],
|
||||
CHECKING_MSG: [if the jtreg failure handler should be built],
|
||||
CHECK_AVAILABLE: [
|
||||
AC_MSG_CHECKING([if the jtreg failure handler is available])
|
||||
if test "x$JT_HOME" != "x"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AVAILABLE=false
|
||||
AC_MSG_RESULT([no (jtreg not present)])
|
||||
fi
|
||||
])
|
||||
AC_SUBST(BUILD_FAILURE_HANDLER)
|
||||
])
|
||||
|
||||
@@ -218,7 +218,7 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
|
||||
VAR_OS=windows
|
||||
VAR_OS_ENV=windows.wsl
|
||||
;;
|
||||
*msys*)
|
||||
*msys* | *mingw*)
|
||||
VAR_OS=windows
|
||||
VAR_OS_ENV=windows.msys2
|
||||
;;
|
||||
|
||||
@@ -129,7 +129,6 @@ RELEASE_FILE_OS_ARCH:=@RELEASE_FILE_OS_ARCH@
|
||||
RELEASE_FILE_LIBC:=@RELEASE_FILE_LIBC@
|
||||
|
||||
SOURCE_DATE := @SOURCE_DATE@
|
||||
ENABLE_REPRODUCIBLE_BUILD := @ENABLE_REPRODUCIBLE_BUILD@
|
||||
ISO_8601_FORMAT_STRING := @ISO_8601_FORMAT_STRING@
|
||||
|
||||
ifneq ($(SOURCE_DATE), updated)
|
||||
|
||||
@@ -972,123 +972,3 @@ AC_DEFUN_ONCE([TOOLCHAIN_MISC_CHECKS],
|
||||
fi
|
||||
AC_SUBST(HOTSPOT_TOOLCHAIN_TYPE)
|
||||
])
|
||||
|
||||
# Setup the JTReg Regression Test Harness.
|
||||
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
|
||||
[
|
||||
AC_ARG_WITH(jtreg, [AS_HELP_STRING([--with-jtreg],
|
||||
[Regression Test Harness @<:@probed@:>@])])
|
||||
|
||||
if test "x$with_jtreg" = xno; then
|
||||
# jtreg disabled
|
||||
AC_MSG_CHECKING([for jtreg test harness])
|
||||
AC_MSG_RESULT([no, disabled])
|
||||
elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
|
||||
if test -d "$with_jtreg"; then
|
||||
# An explicit path is specified, use it.
|
||||
JT_HOME="$with_jtreg"
|
||||
else
|
||||
case "$with_jtreg" in
|
||||
*.zip )
|
||||
JTREG_SUPPORT_DIR=$CONFIGURESUPPORT_OUTPUTDIR/jtreg
|
||||
$RM -rf $JTREG_SUPPORT_DIR
|
||||
$MKDIR -p $JTREG_SUPPORT_DIR
|
||||
$UNZIP -qq -d $JTREG_SUPPORT_DIR $with_jtreg
|
||||
|
||||
# Try to find jtreg to determine JT_HOME path
|
||||
JTREG_PATH=`$FIND $JTREG_SUPPORT_DIR | $GREP "/bin/jtreg"`
|
||||
if test "x$JTREG_PATH" != x; then
|
||||
JT_HOME=$($DIRNAME $($DIRNAME $JTREG_PATH))
|
||||
fi
|
||||
;;
|
||||
* )
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
UTIL_FIXUP_PATH([JT_HOME])
|
||||
if test ! -d "$JT_HOME"; then
|
||||
AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg does not exist])
|
||||
fi
|
||||
|
||||
if test ! -e "$JT_HOME/lib/jtreg.jar"; then
|
||||
AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for jtreg test harness])
|
||||
AC_MSG_RESULT([$JT_HOME])
|
||||
else
|
||||
# Try to locate jtreg using the JT_HOME environment variable
|
||||
if test "x$JT_HOME" != x; then
|
||||
# JT_HOME set in environment, use it
|
||||
if test ! -d "$JT_HOME"; then
|
||||
AC_MSG_WARN([Ignoring JT_HOME pointing to invalid directory: $JT_HOME])
|
||||
JT_HOME=
|
||||
else
|
||||
if test ! -e "$JT_HOME/lib/jtreg.jar"; then
|
||||
AC_MSG_WARN([Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME])
|
||||
JT_HOME=
|
||||
else
|
||||
AC_MSG_NOTICE([Located jtreg using JT_HOME from environment])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$JT_HOME" = x; then
|
||||
# JT_HOME is not set in environment, or was deemed invalid.
|
||||
# Try to find jtreg on path
|
||||
UTIL_LOOKUP_PROGS(JTREGEXE, jtreg)
|
||||
if test "x$JTREGEXE" != x; then
|
||||
# That's good, now try to derive JT_HOME
|
||||
JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
|
||||
if test ! -e "$JT_HOME/lib/jtreg.jar"; then
|
||||
AC_MSG_WARN([Ignoring jtreg from path since a valid jtreg home cannot be found])
|
||||
JT_HOME=
|
||||
else
|
||||
AC_MSG_NOTICE([Located jtreg using jtreg executable in path])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for jtreg test harness])
|
||||
if test "x$JT_HOME" != x; then
|
||||
AC_MSG_RESULT([$JT_HOME])
|
||||
else
|
||||
AC_MSG_RESULT([no, not found])
|
||||
|
||||
if test "x$with_jtreg" = xyes; then
|
||||
AC_MSG_ERROR([--with-jtreg was specified, but no jtreg found.])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
UTIL_FIXUP_PATH(JT_HOME)
|
||||
AC_SUBST(JT_HOME)
|
||||
])
|
||||
|
||||
# Setup the JIB dependency resolver
|
||||
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JIB],
|
||||
[
|
||||
AC_ARG_WITH(jib, [AS_HELP_STRING([--with-jib],
|
||||
[Jib dependency management tool @<:@not used@:>@])])
|
||||
|
||||
if test "x$with_jib" = xno || test "x$with_jib" = x; then
|
||||
# jib disabled
|
||||
AC_MSG_CHECKING([for jib])
|
||||
AC_MSG_RESULT(no)
|
||||
elif test "x$with_jib" = xyes; then
|
||||
AC_MSG_ERROR([Must supply a value to --with-jib])
|
||||
else
|
||||
JIB_HOME="${with_jib}"
|
||||
AC_MSG_CHECKING([for jib])
|
||||
AC_MSG_RESULT(${JIB_HOME})
|
||||
if test ! -d "${JIB_HOME}"; then
|
||||
AC_MSG_ERROR([--with-jib must be a directory])
|
||||
fi
|
||||
JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
|
||||
if test ! -f "${JIB_JAR}"; then
|
||||
AC_MSG_ERROR([Could not find jib jar file in ${JIB_HOME}])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(JIB_HOME)
|
||||
])
|
||||
|
||||
@@ -223,10 +223,8 @@ define SetupJarArchiveBody
|
||||
# If reproducible build and the boot jdk jar supports --date option
|
||||
# then specify the --date using SOURCE_DATE in ISO-8601
|
||||
$1_JAR_OPTIONS :=
|
||||
ifeq ($$(ENABLE_REPRODUCIBLE_BUILD), true)
|
||||
ifeq ($$(BOOT_JDK_JAR_SUPPORTS_DATE), true)
|
||||
$1_JAR_OPTIONS += --date $(SOURCE_DATE_ISO_8601)
|
||||
endif
|
||||
ifeq ($$(BOOT_JDK_JAR_SUPPORTS_DATE), true)
|
||||
$1_JAR_OPTIONS += --date $(SOURCE_DATE_ISO_8601)
|
||||
endif
|
||||
ifneq (,$$($1_CHECK_COMPRESS_JAR))
|
||||
ifneq ($(COMPRESS_JARS), true)
|
||||
|
||||
@@ -359,9 +359,9 @@ define SetupCompileNativeFileBody
|
||||
$1_FLAGS := $(BASIC_ASFLAGS) $$($1_BASE_ASFLAGS)
|
||||
$1_COMPILER := $(AS)
|
||||
|
||||
# gcc assembly files must contain an appropriate relative .file
|
||||
# gcc or clang assembly files must contain an appropriate relative .file
|
||||
# path for reproducible builds.
|
||||
ifeq ($(TOOLCHAIN_TYPE), gcc)
|
||||
ifneq ($(findstring $(TOOLCHAIN_TYPE), gcc clang), )
|
||||
# If no absolute paths allowed, work out relative source file path
|
||||
# for assembly .file substitution, otherwise use full file path
|
||||
ifeq ($(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT), false)
|
||||
@@ -403,11 +403,10 @@ define SetupCompileNativeFileBody
|
||||
$1_OBJ_DEPS := $$($1_SRC_FILE) $$($$($1_BASE)_COMPILE_VARDEPS_FILE) \
|
||||
$$($$($1_BASE)_EXTRA_DEPS) $$($1_VARDEPS_FILE)
|
||||
$1_COMPILE_OPTIONS := $$($1_FLAGS) $(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE)
|
||||
# For reproducible builds with gcc ensure random symbol generation is seeded deterministically
|
||||
ifeq ($(TOOLCHAIN_TYPE), gcc)
|
||||
ifeq ($$(ENABLE_REPRODUCIBLE_BUILD), true)
|
||||
$1_COMPILE_OPTIONS += -frandom-seed="$$($1_FILENAME)"
|
||||
endif
|
||||
# For reproducible builds with gcc and clang ensure random symbol generation is
|
||||
# seeded deterministically
|
||||
ifneq ($(findstring $(TOOLCHAIN_TYPE), gcc clang), )
|
||||
$1_COMPILE_OPTIONS += -frandom-seed="$$($1_FILENAME)"
|
||||
endif
|
||||
|
||||
$$($1_OBJ_JSON): $$($1_OBJ_DEPS)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -68,6 +68,12 @@ _sequence-do = \
|
||||
$(words $(SEQUENCE_COUNT)) \
|
||||
$(call _sequence-do,$1))
|
||||
|
||||
################################################################################
|
||||
# Strip both arguments. Append the first argument to the second argument. If the
|
||||
# first argument is empty, return the empty string.
|
||||
IfAppend = \
|
||||
$(if $(strip $1),$(strip $1)$(strip $2),)
|
||||
|
||||
################################################################################
|
||||
# Replace question marks with space in string. This macro needs to be called on
|
||||
# files from FindFiles in case any of them contains space in their file name,
|
||||
@@ -367,6 +373,9 @@ isBuildCpu = \
|
||||
isBuildCpuArch = \
|
||||
$(strip $(if $(filter $(OPENJDK_BUILD_CPU_ARCH), $1), true, false))
|
||||
|
||||
isCompiler = \
|
||||
$(strip $(if $(filter $(TOOLCHAIN_TYPE), $1), true, false))
|
||||
|
||||
################################################################################
|
||||
# Converts a space separated list to a comma separated list.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -54,7 +54,7 @@ endif
|
||||
# FOLLOW_SYMLINKS - Set to explicitly follow symlinks. Affects performance of
|
||||
# finding files.
|
||||
# ZIP_OPTIONS extra options to pass to zip
|
||||
# REPRODUCIBLE override ENABLE_REPRODUCIBLE_BUILD (to make zip reproducible or not)
|
||||
# REPRODUCIBLE set to false to disable the step that makes zip reproducible
|
||||
|
||||
SetupZipArchive = $(NamedParamsMacroTemplate)
|
||||
define SetupZipArchiveBody
|
||||
@@ -130,7 +130,7 @@ define SetupZipArchiveBody
|
||||
)
|
||||
|
||||
ifeq ($$($1_REPRODUCIBLE), )
|
||||
$1_REPRODUCIBLE := $$(ENABLE_REPRODUCIBLE_BUILD)
|
||||
$1_REPRODUCIBLE := true
|
||||
endif
|
||||
|
||||
# Use a slightly shorter name for logging, but with enough path to identify this zip.
|
||||
|
||||
@@ -87,8 +87,8 @@ define SetupBuildLauncherBody
|
||||
$1_MAIN_MODULE := $(MODULE)
|
||||
endif
|
||||
|
||||
$1_JAVA_ARGS += -ms8m
|
||||
ifneq ($$($1_MAIN_CLASS), )
|
||||
$1_JAVA_ARGS += -ms8m
|
||||
$1_LAUNCHER_CLASS := -m $$($1_MAIN_MODULE)/$$($1_MAIN_CLASS)
|
||||
endif
|
||||
|
||||
@@ -97,9 +97,12 @@ define SetupBuildLauncherBody
|
||||
$$(addprefix -J, $$($1_EXTRA_JAVA_ARGS)), "$$a"$(COMMA) )) }'
|
||||
$1_CFLAGS += -DEXTRA_JAVA_ARGS=$$($1_EXTRA_JAVA_ARGS_STR)
|
||||
endif
|
||||
$1_JAVA_ARGS_STR := '{ $$(strip $$(foreach a, \
|
||||
$$(addprefix -J, $$($1_JAVA_ARGS)) $$($1_LAUNCHER_CLASS), "$$a"$(COMMA) )) }'
|
||||
$1_CFLAGS += -DJAVA_ARGS=$$($1_JAVA_ARGS_STR)
|
||||
|
||||
ifneq ($$($1_JAVA_ARGS), )
|
||||
$1_JAVA_ARGS_STR := '{ $$(strip $$(foreach a, \
|
||||
$$(addprefix -J, $$($1_JAVA_ARGS)) $$($1_LAUNCHER_CLASS), "$$a"$(COMMA) )) }'
|
||||
$1_CFLAGS += -DJAVA_ARGS=$$($1_JAVA_ARGS_STR)
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
ifeq ($$($1_MACOSX_PRIVILEGED), true)
|
||||
|
||||
@@ -42,6 +42,7 @@ DOCS_MODULES= \
|
||||
jdk.hotspot.agent \
|
||||
jdk.httpserver \
|
||||
jdk.jpackage \
|
||||
jdk.incubator.concurrent \
|
||||
jdk.incubator.vector \
|
||||
jdk.jartool \
|
||||
jdk.javadoc \
|
||||
|
||||
@@ -23,21 +23,19 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Versions and download locations for dependencies used by pre-submit testing.
|
||||
# Versions and download locations for dependencies used by GitHub Actions (GHA)
|
||||
|
||||
BOOT_JDK_VERSION=18
|
||||
JTREG_VERSION=6.1
|
||||
JTREG_BUILD=1
|
||||
GTEST_VERSION=1.8.1
|
||||
JTREG_VERSION=6.1+2
|
||||
|
||||
LINUX_X64_BOOT_JDK_FILENAME=openjdk-18_linux-x64_bin.tar.gz
|
||||
LINUX_X64_BOOT_JDK_EXT=tar.gz
|
||||
LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk18/43f95e8614114aeaa8e8a5fcf20a682d/36/GPL/openjdk-18_linux-x64_bin.tar.gz
|
||||
LINUX_X64_BOOT_JDK_SHA256=0f60aef7b8504983d6e374fe94d09a7bedcf05ec559e812d801a33bd4ebd23d0
|
||||
|
||||
WINDOWS_X64_BOOT_JDK_FILENAME=openjdk-18_windows-x64_bin.zip
|
||||
WINDOWS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk18/43f95e8614114aeaa8e8a5fcf20a682d/36/GPL/openjdk-18_windows-x64_bin.zip
|
||||
WINDOWS_X64_BOOT_JDK_SHA256=a5b91d4c12752d44aa75df70ae3e2311287b3e60c288b07dade106376c688277
|
||||
|
||||
MACOS_X64_BOOT_JDK_FILENAME=openjdk-18_macos-x64_bin.tar.gz
|
||||
MACOS_X64_BOOT_JDK_EXT=tar.gz
|
||||
MACOS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk18/43f95e8614114aeaa8e8a5fcf20a682d/36/GPL/openjdk-18_macos-x64_bin.tar.gz
|
||||
MACOS_X64_BOOT_JDK_SHA256=527b61b4265caf45cdcbacfcf8fbcd0b4b280bede1eff32a5b252d855ff0534b
|
||||
|
||||
WINDOWS_X64_BOOT_JDK_EXT=zip
|
||||
WINDOWS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk18/43f95e8614114aeaa8e8a5fcf20a682d/36/GPL/openjdk-18_windows-x64_bin.zip
|
||||
WINDOWS_X64_BOOT_JDK_SHA256=a5b91d4c12752d44aa75df70ae3e2311287b3e60c288b07dade106376c688277
|
||||
@@ -254,12 +254,7 @@ var getJibProfilesCommon = function (input, data) {
|
||||
"--disable-jvm-feature-shenandoahgc",
|
||||
versionArgs(input, common))
|
||||
};
|
||||
// Extra settings for release profiles
|
||||
common.release_profile_base = {
|
||||
configure_args: [
|
||||
"--enable-reproducible-build",
|
||||
],
|
||||
};
|
||||
|
||||
// Extra settings for debug profiles
|
||||
common.debug_suffix = "-debug";
|
||||
common.debug_profile_base = {
|
||||
@@ -854,13 +849,6 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
});
|
||||
});
|
||||
|
||||
// After creating all derived profiles, we can add the release profile base
|
||||
// to the main profiles
|
||||
common.main_profile_names.forEach(function (name) {
|
||||
profiles[name] = concatObjects(profiles[name],
|
||||
common.release_profile_base);
|
||||
});
|
||||
|
||||
// Artifacts of JCov profiles
|
||||
[ "linux-aarch64", "linux-x64", "macosx-x64", "macosx-aarch64", "windows-x64" ]
|
||||
.forEach(function (name) {
|
||||
@@ -955,7 +943,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
target_cpu: input.build_cpu,
|
||||
dependencies: [
|
||||
"jtreg", "gnumake", "boot_jdk", "devkit", "jib", "jcov", testedProfileJdk,
|
||||
testedProfileTest
|
||||
testedProfileTest, testedProfile + ".jdk_symbols",
|
||||
],
|
||||
src: "src.conf",
|
||||
make_args: testOnlyMake,
|
||||
@@ -963,7 +951,8 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"BOOT_JDK": common.boot_jdk_home,
|
||||
"JT_HOME": input.get("jtreg", "home_path"),
|
||||
"JDK_IMAGE_DIR": input.get(testedProfileJdk, "home_path"),
|
||||
"TEST_IMAGE_DIR": input.get(testedProfileTest, "home_path")
|
||||
"TEST_IMAGE_DIR": input.get(testedProfileTest, "home_path"),
|
||||
"SYMBOLS_IMAGE_DIR": input.get(testedProfile + ".jdk_symbols", "home_path")
|
||||
},
|
||||
labels: "test"
|
||||
}
|
||||
@@ -1003,17 +992,6 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
profiles["run-test"] = concatObjects(profiles["run-test"], macosxRunTestExtra);
|
||||
profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"], macosxRunTestExtra);
|
||||
}
|
||||
// On windows we want the debug symbols available at test time
|
||||
if (input.build_os == "windows") {
|
||||
windowsRunTestPrebuiltExtra = {
|
||||
dependencies: [ testedProfile + ".jdk_symbols" ],
|
||||
environment: {
|
||||
"SYMBOLS_IMAGE_DIR": input.get(testedProfile + ".jdk_symbols", "home_path"),
|
||||
}
|
||||
};
|
||||
profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"],
|
||||
windowsRunTestPrebuiltExtra);
|
||||
}
|
||||
|
||||
// The profile run-test-prebuilt defines src.conf as the src bundle. When
|
||||
// running in Mach 5, this reduces the time it takes to populate the
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -43,6 +43,7 @@ BOOT_MODULES= \
|
||||
java.rmi \
|
||||
java.security.sasl \
|
||||
java.xml \
|
||||
jdk.incubator.concurrent \
|
||||
jdk.incubator.vector \
|
||||
jdk.internal.vm.ci \
|
||||
jdk.jfr \
|
||||
|
||||
@@ -26,17 +26,17 @@
|
||||
# Default version, product, and vendor information to use,
|
||||
# unless overridden by configure
|
||||
|
||||
DEFAULT_VERSION_FEATURE=19
|
||||
DEFAULT_VERSION_FEATURE=20
|
||||
DEFAULT_VERSION_INTERIM=0
|
||||
DEFAULT_VERSION_UPDATE=0
|
||||
DEFAULT_VERSION_PATCH=0
|
||||
DEFAULT_VERSION_EXTRA1=0
|
||||
DEFAULT_VERSION_EXTRA2=0
|
||||
DEFAULT_VERSION_EXTRA3=0
|
||||
DEFAULT_VERSION_DATE=2022-09-20
|
||||
DEFAULT_VERSION_CLASSFILE_MAJOR=63 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
|
||||
DEFAULT_VERSION_DATE=2023-03-21
|
||||
DEFAULT_VERSION_CLASSFILE_MAJOR=64 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
|
||||
DEFAULT_VERSION_CLASSFILE_MINOR=0
|
||||
DEFAULT_VERSION_DOCS_API_SINCE=11
|
||||
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="18 19"
|
||||
DEFAULT_JDK_SOURCE_TARGET_VERSION=19
|
||||
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="18 19 20"
|
||||
DEFAULT_JDK_SOURCE_TARGET_VERSION=20
|
||||
DEFAULT_PROMOTED_VERSION_PRE=ea
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
#
|
||||
# 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. 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
|
||||
|
||||
1
make/data/charsetmapping/IBM864.c2b
Normal file
1
make/data/charsetmapping/IBM864.c2b
Normal file
@@ -0,0 +1 @@
|
||||
0x25 U+0025
|
||||
@@ -81,6 +81,7 @@ JVM_GetClassDeclaredConstructors
|
||||
JVM_GetClassDeclaredFields
|
||||
JVM_GetClassDeclaredMethods
|
||||
JVM_GetClassFieldsCount
|
||||
JVM_GetClassFileVersion
|
||||
JVM_GetClassInterfaces
|
||||
JVM_GetClassMethodsCount
|
||||
JVM_GetClassModifiers
|
||||
@@ -155,6 +156,7 @@ JVM_IsFinalizationEnabled
|
||||
JVM_IsHiddenClass
|
||||
JVM_IsInterface
|
||||
JVM_IsPreviewEnabled
|
||||
JVM_IsContinuationsSupported
|
||||
JVM_IsPrimitiveClass
|
||||
JVM_IsRecord
|
||||
JVM_IsSameClassPackage
|
||||
|
||||
@@ -142,8 +142,7 @@ ifeq ($(call check-jvm-feature, compiler2), true)
|
||||
|
||||
ifeq ($(HOTSPOT_TARGET_CPU_ARCH), aarch64)
|
||||
AD_SRC_FILES += $(call uniq, $(wildcard $(foreach d, $(AD_SRC_ROOTS), \
|
||||
$d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/$(HOTSPOT_TARGET_CPU_ARCH)_neon.ad \
|
||||
$d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/$(HOTSPOT_TARGET_CPU_ARCH)_sve.ad \
|
||||
$d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/$(HOTSPOT_TARGET_CPU_ARCH)_vector.ad \
|
||||
)))
|
||||
endif
|
||||
|
||||
|
||||
@@ -66,6 +66,10 @@ ifeq ($(VERSION_BUILD), )
|
||||
VERSION_BUILD := 0
|
||||
endif
|
||||
|
||||
ifeq ($(HOTSPOT_BUILD_TIME), )
|
||||
HOTSPOT_BUILD_TIME := $(call EpochToISO8601, $(shell $(DATE) +"%s"))
|
||||
endif
|
||||
|
||||
CFLAGS_VM_VERSION := \
|
||||
$(VERSION_CFLAGS) \
|
||||
-DHOTSPOT_VERSION_STRING='"$(VERSION_STRING)"' \
|
||||
@@ -73,12 +77,9 @@ CFLAGS_VM_VERSION := \
|
||||
-DHOTSPOT_BUILD_USER='"$(USERNAME)"' \
|
||||
-DHOTSPOT_VM_DISTRO='"$(HOTSPOT_VM_DISTRO)"' \
|
||||
-DCPU='"$(OPENJDK_TARGET_CPU_VM_VERSION)"' \
|
||||
-DHOTSPOT_BUILD_TIME='"$(HOTSPOT_BUILD_TIME)"' \
|
||||
#
|
||||
|
||||
ifneq ($(HOTSPOT_BUILD_TIME), )
|
||||
CFLAGS_VM_VERSION += -DHOTSPOT_BUILD_TIME='"$(HOTSPOT_BUILD_TIME)"'
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Disabled warnings
|
||||
|
||||
|
||||
@@ -169,12 +169,13 @@ endif
|
||||
################################################################################
|
||||
|
||||
ifeq ($(call check-jvm-feature, link-time-opt), true)
|
||||
# NOTE: Disable automatic opimization level and let the explicit cflag control
|
||||
# optimization level instead. This activates O3 on slowdebug builds, just
|
||||
# like the old build, but it's probably not right.
|
||||
JVM_OPTIMIZATION :=
|
||||
JVM_CFLAGS_FEATURES += -O3 -flto
|
||||
JVM_LDFLAGS_FEATURES += -O3 -flto -fuse-linker-plugin -fno-strict-aliasing
|
||||
# Set JVM_OPTIMIZATION directly so other jvm-feature flags can override it
|
||||
# later on if desired
|
||||
JVM_OPTIMIZATION := HIGHEST_JVM
|
||||
ifeq ($(call isCompiler, gcc), true)
|
||||
JVM_CFLAGS_FEATURES += -flto -fuse-linker-plugin
|
||||
JVM_LDFLAGS_FEATURES += -flto -fuse-linker-plugin -fno-strict-aliasing
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(call check-jvm-feature, opt-size), true)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<list>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="\d{7}" />
|
||||
<option name="linkRegexp" value="https://bugs.openjdk.java.net/browse/JDK-$0" />
|
||||
<option name="linkRegexp" value="https://bugs.openjdk.org/browse/JDK-$0" />
|
||||
</IssueNavigationLink>
|
||||
</list>
|
||||
</option>
|
||||
|
||||
@@ -89,7 +89,12 @@ public class HelloClasslist {
|
||||
String CSCSC = "string" + s + "string" + s + "string";
|
||||
String SCSCS = s + "string" + s + "string" + s;
|
||||
String SSCSS = s + s + "string" + s + s;
|
||||
String SSSSS = s + s + s + s + s;
|
||||
String S5 = s + s + s + s + s;
|
||||
String S6 = s + s + s + s + s + s;
|
||||
String S7 = s + s + s + s + s + s + s;
|
||||
String S8 = s + s + s + s + s + s + s + s;
|
||||
String S9 = s + s + s + s + s + s + s + s + s;
|
||||
String S10 = s + s + s + s + s + s + s + s + s + s;
|
||||
|
||||
String CI = "string" + i;
|
||||
String IC = i + "string";
|
||||
@@ -100,6 +105,16 @@ public class HelloClasslist {
|
||||
String CIC = "string" + i + "string";
|
||||
String CICI = "string" + i + "string" + i;
|
||||
|
||||
float f = 0.1f;
|
||||
String CF = "string" + f;
|
||||
String CFS = "string" + f + s;
|
||||
String CSCF = "string" + s + "string" + f;
|
||||
|
||||
char c = 'a';
|
||||
String CC = "string" + c;
|
||||
String CCS = "string" + c + s;
|
||||
String CSCC = "string" + s + "string" + c;
|
||||
|
||||
long l = System.currentTimeMillis();
|
||||
String CJ = "string" + l;
|
||||
String JC = l + "string";
|
||||
@@ -108,6 +123,8 @@ public class HelloClasslist {
|
||||
String CJCJC = "string" + l + "string" + l + "string";
|
||||
double d = i / 2.0;
|
||||
String CD = "string" + d;
|
||||
String CDS = "string" + d + s;
|
||||
String CSCD = "string" + s + "string" + d;
|
||||
|
||||
String newDate = DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(
|
||||
LocalDateTime.now(ZoneId.of("GMT")));
|
||||
|
||||
@@ -33,7 +33,6 @@ import java.util.Formatter;
|
||||
import java.util.HashSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
@@ -70,7 +69,6 @@ class ResourceBundleGenerator implements BundleGenerator {
|
||||
private static final String META_VALUE_PREFIX = "metaValue_";
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void generateBundle(String packageName, String baseName, String localeID, boolean useJava,
|
||||
Map<String, ?> map, BundleType type) throws IOException {
|
||||
String suffix = useJava ? ".java" : ".properties";
|
||||
@@ -144,56 +142,34 @@ class ResourceBundleGenerator implements BundleGenerator {
|
||||
map = newMap;
|
||||
} else {
|
||||
// generic reduction of duplicated values
|
||||
Map<String, Object> newMap = null;
|
||||
for (String key : map.keySet()) {
|
||||
Object val = map.get(key);
|
||||
String metaVal = null;
|
||||
|
||||
for (Map.Entry<String, ?> entry : map.entrySet()) {
|
||||
String k = entry.getKey();
|
||||
if (!k.equals(key) &&
|
||||
Objects.deepEquals(val, entry.getValue()) &&
|
||||
!(Objects.nonNull(newMap) && newMap.containsKey(k))) {
|
||||
if (Objects.isNull(newMap)) {
|
||||
newMap = new HashMap<>();
|
||||
Map<String, Object> newMap = new LinkedHashMap<>(map);
|
||||
Map<BundleEntryValue, BundleEntryValue> dedup = new HashMap<>(map.size());
|
||||
for (Map.Entry<String, ?> entry : map.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
Object val = entry.getValue();
|
||||
BundleEntryValue newEntry = new BundleEntryValue(key, val);
|
||||
BundleEntryValue oldEntry = dedup.putIfAbsent(newEntry, newEntry);
|
||||
if (oldEntry != null) {
|
||||
if (oldEntry.meta()) {
|
||||
if (fmt == null) {
|
||||
fmt = new Formatter();
|
||||
}
|
||||
|
||||
if (Objects.isNull(metaVal)) {
|
||||
metaVal = META_VALUE_PREFIX + key.replaceAll("[\\.-]", "_");
|
||||
|
||||
if (val instanceof String[]) {
|
||||
fmt.format(" final String[] %s = new String[] {\n", metaVal);
|
||||
for (String s : (String[]) val) {
|
||||
fmt.format(" \"%s\",\n", CLDRConverter.saveConvert(s, useJava));
|
||||
}
|
||||
fmt.format(" };\n");
|
||||
} else if (val instanceof List) {
|
||||
fmt.format(" final String[] %s = new String[] {\n", metaVal);
|
||||
for (String s : (List<String>) val) {
|
||||
fmt.format(" \"%s\",\n", CLDRConverter.saveConvert(s, useJava));
|
||||
}
|
||||
fmt.format(" };\n");
|
||||
} else {
|
||||
fmt.format(" final String %s = \"%s\";\n", metaVal, CLDRConverter.saveConvert((String)val, useJava));
|
||||
String metaVal = oldEntry.metaKey();
|
||||
if (val instanceof String[] values) {
|
||||
fmt.format(" final String[] %s = new String[] {\n", metaVal);
|
||||
for (String s : values) {
|
||||
fmt.format(" \"%s\",\n", CLDRConverter.saveConvert(s, useJava));
|
||||
}
|
||||
fmt.format(" };\n");
|
||||
} else {
|
||||
fmt.format(" final String %s = \"%s\";\n", metaVal, CLDRConverter.saveConvert((String)val, useJava));
|
||||
}
|
||||
|
||||
newMap.put(k, metaVal);
|
||||
newMap.put(oldEntry.key, oldEntry.metaKey());
|
||||
}
|
||||
}
|
||||
|
||||
if (Objects.nonNull(metaVal)) {
|
||||
newMap.put(key, metaVal);
|
||||
newMap.put(key, oldEntry.metaKey());
|
||||
}
|
||||
}
|
||||
|
||||
if (Objects.nonNull(newMap)) {
|
||||
for (String key : map.keySet()) {
|
||||
newMap.putIfAbsent(key, map.get(key));
|
||||
}
|
||||
map = newMap;
|
||||
}
|
||||
map = newMap;
|
||||
}
|
||||
|
||||
try (PrintWriter out = new PrintWriter(file, encoding)) {
|
||||
@@ -247,6 +223,58 @@ class ResourceBundleGenerator implements BundleGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
private static class BundleEntryValue {
|
||||
private final String key;
|
||||
private final Object value;
|
||||
private final int hashCode;
|
||||
private String metaKey;
|
||||
|
||||
BundleEntryValue(String key, Object value) {
|
||||
this.key = Objects.requireNonNull(key);
|
||||
this.value = Objects.requireNonNull(value);
|
||||
if (value instanceof String) {
|
||||
hashCode = value.hashCode();
|
||||
} else if (value instanceof String[] arr) {
|
||||
hashCode = Arrays.hashCode(arr);
|
||||
} else {
|
||||
throw new InternalError("Expected a string or a string array");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* mark the entry as meta
|
||||
* @return true if the entry was not meta before, false otherwise
|
||||
*/
|
||||
public boolean meta() {
|
||||
if (metaKey == null) {
|
||||
metaKey = META_VALUE_PREFIX + key.replaceAll("[\\.-]", "_");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public String metaKey() {
|
||||
return metaKey;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return hashCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof BundleEntryValue entry) {
|
||||
if (value instanceof String s) {
|
||||
return s.equals(entry.value);
|
||||
} else if (entry.value instanceof String[] otherVal) {
|
||||
return Arrays.equals((String[]) value, otherVal);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generateMetaInfo(Map<String, SortedSet<String>> metaInfo) throws IOException {
|
||||
String dirName = CLDRConverter.DESTINATION_DIR + File.separator + "sun" + File.separator + "util" +
|
||||
@@ -268,27 +296,29 @@ class ResourceBundleGenerator implements BundleGenerator {
|
||||
try (PrintWriter out = new PrintWriter(file, "us-ascii")) {
|
||||
out.printf(CopyrightHeaders.getOpenJDKCopyright(CLDRConverter.copyrightYear));
|
||||
|
||||
out.printf((CLDRConverter.isBaseModule ? "package sun.util.cldr;\n\n" :
|
||||
"package sun.util.resources.cldr.provider;\n\n")
|
||||
+ "import java.util.HashMap;\n"
|
||||
+ "import java.util.Locale;\n"
|
||||
+ "import java.util.Map;\n"
|
||||
+ "import sun.util.locale.provider.LocaleDataMetaInfo;\n"
|
||||
+ "import sun.util.locale.provider.LocaleProviderAdapter;\n\n");
|
||||
out.printf("public class %s implements LocaleDataMetaInfo {\n", className);
|
||||
out.printf(" private static final Map<String, String> resourceNameToLocales = new HashMap<>(" +
|
||||
((int)(metaInfo.keySet().stream()
|
||||
.filter(k -> k.equals("AvailableLocales"))
|
||||
.count() / 0.75f) + 1) + ");\n" +
|
||||
(CLDRConverter.isBaseModule ?
|
||||
" private static final Map<Locale, String[]> parentLocalesMap = new HashMap<>(" +
|
||||
((int)(metaInfo.keySet().stream()
|
||||
.filter(k -> k.startsWith(CLDRConverter.PARENT_LOCALE_PREFIX))
|
||||
.count() / 0.75f) + 1) + ");\n" +
|
||||
" private static final Map<String, String> languageAliasMap = new HashMap<>(" +
|
||||
((int)(CLDRConverter.handlerSupplMeta.getLanguageAliasData().size() / 0.75f) + 1) + ");\n\n" :
|
||||
"\n") +
|
||||
" static {\n");
|
||||
out.printf("""
|
||||
package sun.util.%s;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import sun.util.locale.provider.LocaleDataMetaInfo;
|
||||
import sun.util.locale.provider.LocaleProviderAdapter;
|
||||
|
||||
public class %s implements LocaleDataMetaInfo {
|
||||
private static final Map<String, String> resourceNameToLocales = HashMap.newHashMap(%d);
|
||||
%s
|
||||
static {
|
||||
""", CLDRConverter.isBaseModule ? "cldr" : "resources.cldr.provider",
|
||||
className, metaInfo.keySet().stream().filter(k -> k.equals("AvailableLocales")).count(),
|
||||
CLDRConverter.isBaseModule ?
|
||||
"""
|
||||
private static final Map<Locale, String[]> parentLocalesMap = HashMap.newHashMap(%d);
|
||||
private static final Map<String, String> languageAliasMap = HashMap.newHashMap(%d);
|
||||
""".formatted(
|
||||
metaInfo.keySet().stream().filter(k -> k.startsWith(CLDRConverter.PARENT_LOCALE_PREFIX)).count(),
|
||||
CLDRConverter.handlerSupplMeta.getLanguageAliasData().size()) :
|
||||
"");
|
||||
|
||||
for (String key : metaInfo.keySet()) {
|
||||
if (key.startsWith(CLDRConverter.PARENT_LOCALE_PREFIX)) {
|
||||
@@ -301,23 +331,23 @@ class ResourceBundleGenerator implements BundleGenerator {
|
||||
}
|
||||
String[] children = toLocaleList(metaInfo.get(key), true).split(" ");
|
||||
Arrays.sort(children);
|
||||
out.printf(" new String[] {\n" +
|
||||
" ");
|
||||
out.printf(" new String[] {\n" +
|
||||
" ");
|
||||
int count = 0;
|
||||
for (int i = 0; i < children.length; i++) {
|
||||
String child = children[i];
|
||||
out.printf("\"%s\", ", child);
|
||||
count += child.length() + 4;
|
||||
if (i != children.length - 1 && count > 64) {
|
||||
out.printf("\n ");
|
||||
out.printf("\n ");
|
||||
count = 0;
|
||||
}
|
||||
}
|
||||
out.printf("\n });\n");
|
||||
out.printf("\n });\n");
|
||||
} else {
|
||||
if ("AvailableLocales".equals(key)) {
|
||||
out.printf(" resourceNameToLocales.put(\"%s\",\n", key);
|
||||
out.printf(" \"%s\");\n", toLocaleList(applyLanguageAliases(metaInfo.get(key)), false));
|
||||
out.printf(" \"%s\");\n", toLocaleList(applyLanguageAliases(metaInfo.get(key)), false));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -334,10 +364,11 @@ class ResourceBundleGenerator implements BundleGenerator {
|
||||
|
||||
// Canonical TZ names for delayed initialization
|
||||
if (CLDRConverter.isBaseModule) {
|
||||
out.printf(" private static class TZCanonicalIDMapHolder {\n");
|
||||
out.printf(" static final Map<String, String> tzCanonicalIDMap = new HashMap<>(" +
|
||||
((int)(CLDRConverter.handlerTimeZone.getData().size() / 0.75f) + 1) + ");\n");
|
||||
out.printf(" static {\n");
|
||||
out.printf("""
|
||||
private static class TZCanonicalIDMapHolder {
|
||||
static final Map<String, String> tzCanonicalIDMap = HashMap.newHashMap(%d);
|
||||
static {
|
||||
""", CLDRConverter.handlerTimeZone.getData().size());
|
||||
CLDRConverter.handlerTimeZone.getData().entrySet().stream()
|
||||
.forEach(e -> {
|
||||
String[] ids = ((String)e.getValue()).split("\\s");
|
||||
@@ -351,31 +382,35 @@ class ResourceBundleGenerator implements BundleGenerator {
|
||||
out.printf(" }\n }\n\n");
|
||||
}
|
||||
|
||||
out.printf(" @Override\n" +
|
||||
" public LocaleProviderAdapter.Type getType() {\n" +
|
||||
" return LocaleProviderAdapter.Type.CLDR;\n" +
|
||||
" }\n\n");
|
||||
out.printf("""
|
||||
@Override
|
||||
public LocaleProviderAdapter.Type getType() {
|
||||
return LocaleProviderAdapter.Type.CLDR;
|
||||
}
|
||||
|
||||
out.printf(" @Override\n" +
|
||||
" public String availableLanguageTags(String category) {\n" +
|
||||
" return resourceNameToLocales.getOrDefault(category, \"\");\n" +
|
||||
" }\n\n");
|
||||
@Override
|
||||
public String availableLanguageTags(String category) {
|
||||
return resourceNameToLocales.getOrDefault(category, "");
|
||||
}
|
||||
%s
|
||||
}
|
||||
""",
|
||||
CLDRConverter.isBaseModule ? """
|
||||
|
||||
if (CLDRConverter.isBaseModule) {
|
||||
out.printf(" @Override\n" +
|
||||
" public Map<String, String> getLanguageAliasMap() {\n" +
|
||||
" return languageAliasMap;\n" +
|
||||
" }\n\n");
|
||||
out.printf(" @Override\n" +
|
||||
" public Map<String, String> tzCanonicalIDs() {\n" +
|
||||
" return TZCanonicalIDMapHolder.tzCanonicalIDMap;\n" +
|
||||
" }\n\n");
|
||||
out.printf(" public Map<Locale, String[]> parentLocales() {\n" +
|
||||
" return parentLocalesMap;\n" +
|
||||
" }\n}");
|
||||
} else {
|
||||
out.printf("}");
|
||||
}
|
||||
@Override
|
||||
public Map<String, String> getLanguageAliasMap() {
|
||||
return languageAliasMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> tzCanonicalIDs() {
|
||||
return TZCanonicalIDMapHolder.tzCanonicalIDMap;
|
||||
}
|
||||
|
||||
public Map<Locale, String[]> parentLocales() {
|
||||
return parentLocalesMap;
|
||||
}
|
||||
""" : "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,18 +30,9 @@ import java.io.DataOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Vector;
|
||||
import java.util.BitSet;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Properties;
|
||||
import java.util.zip.DeflaterOutputStream;
|
||||
import java.util.zip.Deflater;
|
||||
import java.net.URL;
|
||||
|
||||
/**
|
||||
* The representation of an SGML DTD. This is produced by the DTDParser.
|
||||
@@ -58,8 +49,7 @@ import java.net.URL;
|
||||
* @author Arthur van Hoff
|
||||
* @author Guy Abossolo Foh
|
||||
*/
|
||||
public
|
||||
class DTDBuilder extends DTD {
|
||||
public class DTDBuilder extends DTD {
|
||||
|
||||
static PublicMapping mapping = null;
|
||||
|
||||
|
||||
@@ -172,8 +172,10 @@ ifeq ($(call isTargetOs, macosx), true)
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
# Supply the name of the C runtime lib.
|
||||
LIBJLI_CFLAGS += -DMSVCR_DLL_NAME='"$(notdir $(MSVCR_DLL))"'
|
||||
# Supply the name of the C runtime libs.
|
||||
ifneq ($(MSVCR_DLL), )
|
||||
LIBJLI_CFLAGS += -DMSVCR_DLL_NAME='"$(notdir $(MSVCR_DLL))"'
|
||||
endif
|
||||
ifneq ($(VCRUNTIME_1_DLL), )
|
||||
LIBJLI_CFLAGS += -DVCRUNTIME_1_DLL_NAME='"$(notdir $(VCRUNTIME_1_DLL))"'
|
||||
endif
|
||||
|
||||
@@ -103,7 +103,6 @@ LIBAWT_EXTRA_HEADER_DIRS := \
|
||||
libmlib_image \
|
||||
include \
|
||||
java.base:libjava \
|
||||
java.base:include \
|
||||
#
|
||||
|
||||
LIBAWT_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES $(X_CFLAGS)
|
||||
@@ -459,7 +458,7 @@ else
|
||||
|
||||
HARFBUZZ_DISABLED_WARNINGS_gcc := type-limits missing-field-initializers strict-aliasing
|
||||
HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \
|
||||
maybe-uninitialized class-memaccess unused-result extra
|
||||
maybe-uninitialized class-memaccess unused-result extra use-after-free
|
||||
HARFBUZZ_DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
|
||||
tautological-constant-out-of-range-compare int-to-pointer-cast \
|
||||
undef missing-field-initializers range-loop-analysis \
|
||||
@@ -565,7 +564,6 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
libawt/java2d \
|
||||
libawt/java2d/windows \
|
||||
libawt/windows \
|
||||
java.base:include \
|
||||
java.base:libjava \
|
||||
#
|
||||
|
||||
@@ -732,7 +730,6 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
|
||||
|
||||
LIBSPLASHSCREEN_HEADER_DIRS += \
|
||||
libosxapp \
|
||||
java.base:include \
|
||||
java.base:libjava \
|
||||
#
|
||||
|
||||
|
||||
@@ -45,7 +45,6 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
-DACCESSBRIDGE_ARCH_$2, \
|
||||
EXTRA_HEADER_DIRS := \
|
||||
include/bridge \
|
||||
java.base:include \
|
||||
java.desktop:include, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB), \
|
||||
LIBS := kernel32.lib user32.lib gdi32.lib \
|
||||
@@ -72,8 +71,7 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
-DACCESSBRIDGE_ARCH_$2, \
|
||||
EXTRA_HEADER_DIRS := \
|
||||
include/bridge \
|
||||
java.base:include, \
|
||||
include/bridge, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
-def:$(ACCESSIBILITY_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \
|
||||
LIBS := kernel32.lib user32.lib gdi32.lib \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
|
||||
@@ -129,6 +129,10 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
|
||||
JPACKAGE_TARGETS += $(BUILD_LIB_JPACKAGE)
|
||||
|
||||
JPACKAGE_WIXHELPER_SRC := \
|
||||
$(call FindSrcDirsForComponent, jdk.jpackage, libwixhelper) \
|
||||
$(call FindSrcDirsForComponent, jdk.jpackage, common)
|
||||
|
||||
# Build Wix custom action helper
|
||||
# Output library in resources dir, and symbols in the object dir
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIB_WIXHELPER, \
|
||||
@@ -136,11 +140,12 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
|
||||
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libwixhelper, \
|
||||
OPTIMIZATION := LOW, \
|
||||
SRC := $(JPACKAGE_WIXHELPER_SRC), \
|
||||
CXXFLAGS := $(call JpackageWithStaticCrt, $(CXXFLAGS_JDKLIB)) \
|
||||
$(JPACKAGE_CXXFLAGS_windows), \
|
||||
$(addprefix -I, $(JPACKAGE_WIXHELPER_SRC)) $(JPACKAGE_CXXFLAGS_windows), \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
|
||||
LIBS := $(LIBCXX), \
|
||||
LIBS_windows := msi.lib Shlwapi.lib User32.lib, \
|
||||
LIBS_windows := User32.lib, \
|
||||
))
|
||||
|
||||
JPACKAGE_TARGETS += $(BUILD_LIB_WIXHELPER)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -36,7 +36,7 @@ fi
|
||||
# Diff exceptions
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "linux" ]; then
|
||||
if [ "$HOTSPOT_BUILD_TIME" = "" -o "$USE_PRECOMPILED_HEADER" = "true" ]; then
|
||||
if [ "$USE_PRECOMPILED_HEADER" = "true" ]; then
|
||||
ACCEPTED_BIN_DIFF="
|
||||
./lib/server/libjvm.so
|
||||
./hotspot/gtest/server/libjvm.so
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -28,6 +28,14 @@
|
||||
# available, or extract values automatically from the environment if missing.
|
||||
# This is robust, but slower.
|
||||
function setup() {
|
||||
|
||||
# Make regexp tests case insensitive
|
||||
shopt -s nocasematch
|
||||
# Prohibit msys2 from meddling with paths
|
||||
export MSYS2_ARG_CONV_EXCL="*"
|
||||
# Make sure WSL gets a copy of the path
|
||||
export WSLENV=PATH/l
|
||||
|
||||
while getopts "e:p:r:t:c:qmi" opt; do
|
||||
case "$opt" in
|
||||
e) PATHTOOL="$OPTARG" ;;
|
||||
@@ -87,13 +95,6 @@ function setup() {
|
||||
wintemp_win="$($CMD /q /c echo %TEMP% 2>/dev/null | tr -d \\n\\r)"
|
||||
WINTEMP="$($PATHTOOL -u "$wintemp_win")"
|
||||
fi
|
||||
|
||||
# Make regexp tests case insensitive
|
||||
shopt -s nocasematch
|
||||
# Prohibit msys2 from meddling with paths
|
||||
export MSYS2_ARG_CONV_EXCL="*"
|
||||
# Make sure WSL gets a copy of the path
|
||||
export WSLENV=PATH/l
|
||||
}
|
||||
|
||||
# Cleanup handling
|
||||
@@ -147,14 +148,13 @@ function import_path() {
|
||||
if [[ "$path" != "" ]]; then
|
||||
# Store current unix path
|
||||
unixpath="$path"
|
||||
# Now turn it into a windows path
|
||||
winpath="$($PATHTOOL -w "$path" 2>/dev/null)"
|
||||
# If it fails, try again with an added .exe (needed on WSL)
|
||||
if [[ $? -ne 0 ]]; then
|
||||
# If $unixpath does not exist, add .exe (needed on WSL)
|
||||
if [[ ! -e "$unixpath" ]]; then
|
||||
unixpath="$unixpath.exe"
|
||||
winpath="$($PATHTOOL -w "$unixpath" 2>/dev/null)"
|
||||
fi
|
||||
if [[ $? -eq 0 ]]; then
|
||||
# Now turn it into a windows path
|
||||
winpath="$($PATHTOOL -w "$unixpath" 2>/dev/null)"
|
||||
if [[ $? -eq 0 && -e "$unixpath" ]]; then
|
||||
if [[ ! "$winpath" =~ ^"$ENVROOT"\\.*$ ]] ; then
|
||||
# If it is not in envroot, it's a generic windows path
|
||||
if [[ ! $winpath =~ ^[-_.:\\a-zA-Z0-9]*$ ]] ; then
|
||||
@@ -299,6 +299,19 @@ function convert_path() {
|
||||
if [[ $arg =~ ^([^/]*|-[^:=]*[:=]|.*file://|/[a-zA-Z:]{1,3}:?)($DRIVEPREFIX/)([a-z])(/[^/]+.*$) ]] ; then
|
||||
prefix="${BASH_REMATCH[1]}"
|
||||
winpath="${BASH_REMATCH[3]}:${BASH_REMATCH[4]}"
|
||||
|
||||
# If the thing in its entirety points to an existing path, use that instead of thinking
|
||||
# we have a prefix. This can only happen if the top-level directory has a single-letter name.
|
||||
if [[ ${#prefix} -eq 2 && "${prefix:0:1}" == "/" ]]; then
|
||||
possiblepath="${BASH_REMATCH[1]}/${BASH_REMATCH[3]}${BASH_REMATCH[4]}"
|
||||
if [[ -e "$possiblepath" || -e "$(dirname $possiblepath)" || -e "$(echo $possiblepath | cut -d / -f 1-5)" ]] ; then
|
||||
prefix=
|
||||
drivepart="${possiblepath:1:1}"
|
||||
pathpart="${possiblepath:2}"
|
||||
winpath="$drivepart:$pathpart"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Change slash to backslash (or vice versa if mixed mode)
|
||||
if [[ $MIXEDMODE != true ]]; then
|
||||
winpath="${winpath//'/'/'\'}"
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
# directory.
|
||||
# - open a terminal program and run these commands:
|
||||
# cd "${JDK_CHECKOUT}"/src/jdk.compiler/share/data/symbols
|
||||
# bash ../../scripts/generate-symbol-data.sh "${JDK_N_INSTALL}"
|
||||
# bash ../../../../../make/scripts/generate-symbol-data.sh "${JDK_N_INSTALL}"
|
||||
# - this command will generate or update data for "--release N" into the ${JDK_CHECKOUT}/src/jdk.compiler/share/data/symbols
|
||||
# directory, updating all registration necessary. If the goal was to update the data, and there are no
|
||||
# new or changed files in the ${JDK_CHECKOUT}/src/jdk.compiler/share/data/symbols directory after running this script,
|
||||
@@ -73,5 +73,5 @@ $1/bin/java --add-exports jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
|
||||
--add-modules jdk.jdeps \
|
||||
../../../make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java \
|
||||
../../../../../make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java \
|
||||
build-description-incremental symbols include.list
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -53,39 +53,52 @@ BUILD_JDK_JTREG_EXECUTABLES_CFLAGS_exeJliLaunchTest := \
|
||||
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjli \
|
||||
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjli
|
||||
|
||||
TEST_LIB_NATIVE_SRC := $(TOPDIR)/test/lib/native
|
||||
|
||||
# Platform specific setup
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
BUILD_JDK_JTREG_EXCLUDE += libDirectIO.c libInheritedChannel.c exelauncher.c
|
||||
BUILD_JDK_JTREG_EXCLUDE += libDirectIO.c libInheritedChannel.c \
|
||||
libExplicitAttach.c libImplicitAttach.c \
|
||||
exelauncher.c
|
||||
|
||||
WIN_LIB_JAVA := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := $(WIN_LIB_JAVA)
|
||||
WIN_LIB_JLI := $(SUPPORT_OUTPUTDIR)/native/java.base/libjli/jli.lib
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeJliLaunchTest := $(WIN_LIB_JLI)
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeCallerAccessTest := jvm.lib
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeNullCallerClassLoaderTest := jvm.lib
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeNullCallerLookupTest := jvm.lib
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeNullCallerResourceBundle := jvm.lib
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeNullCallerGetResource := jvm.lib
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeNullCallerTest := $(LIBCXX) jvm.lib
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exerevokeall := advapi32.lib
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libAsyncStackWalk := /EHsc
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libAsyncInvokers := /EHsc
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerUnnamed := /EHsc
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerModule := /EHsc
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLoaderLookupInvoker := /EHsc
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libAsyncStackWalk := $(LIBCXX)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libAsyncInvokers := $(LIBCXX)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerUnnamed := $(LIBCXX)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerModule := $(LIBCXX)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLoaderLookupInvoker := $(LIBCXX)
|
||||
BUILD_JDK_JTREG_EXECUTABLES_CFLAGS_exeNullCallerTest := /EHsc
|
||||
|
||||
# java.lang.foreign tests
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libAsyncStackWalk := -I$(TEST_LIB_NATIVE_SRC)
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libLinkerInvokerUnnamed := -I$(TEST_LIB_NATIVE_SRC)
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libLinkerInvokerModule := -I$(TEST_LIB_NATIVE_SRC)
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libLoaderLookupInvoker := -I$(TEST_LIB_NATIVE_SRC)
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libAsyncInvokers := -I$(TEST_LIB_NATIVE_SRC)
|
||||
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libTracePinnedThreads := jvm.lib
|
||||
else
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libDirectIO := -ljava
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libNativeThread := -pthread
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libAsyncStackWalk := $(LIBCXX) -pthread
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libAsyncInvokers := $(LIBCXX) -pthread
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerUnnamed := $(LIBCXX) -pthread
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerModule := $(LIBCXX) -pthread
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLoaderLookupInvoker := $(LIBCXX) -pthread
|
||||
|
||||
# java.lang.foreign tests
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libAsyncStackWalk := -I$(TEST_LIB_NATIVE_SRC)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libAsyncStackWalk := -pthread
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libAsyncInvokers := -I$(TEST_LIB_NATIVE_SRC)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libAsyncInvokers := -pthread
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libLinkerInvokerUnnamed := -I$(TEST_LIB_NATIVE_SRC)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerUnnamed := -pthread
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libLinkerInvokerModule := -I$(TEST_LIB_NATIVE_SRC)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerModule := -pthread
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libLoaderLookupInvoker := -I$(TEST_LIB_NATIVE_SRC)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLoaderLookupInvoker := -pthread
|
||||
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libExplicitAttach := -ljvm
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libExplicitAttach := -pthread
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libImplicitAttach := -pthread
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libTracePinnedThreads := -ljvm
|
||||
BUILD_JDK_JTREG_EXCLUDE += exerevokeall.c
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libInheritedChannel := -ljava
|
||||
@@ -93,10 +106,7 @@ else
|
||||
endif
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeJliLaunchTest := -ljli
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeCallerAccessTest := -ljvm
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeNullCallerClassLoaderTest := -ljvm
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeNullCallerLookupTest := -ljvm
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeNullCallerResourceBundle := -ljvm
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeNullCallerGetResource := -ljvm
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeNullCallerTest := $(LIBCXX) -ljvm
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -40,11 +40,11 @@
|
||||
|
||||
package j2dbench;
|
||||
|
||||
import java.util.Vector;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Enumeration;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
|
||||
public class Result {
|
||||
public static final int RATE_UNKNOWN = 0;
|
||||
@@ -243,7 +243,7 @@ public class Result {
|
||||
int repsPerRun;
|
||||
int unitsPerRep;
|
||||
Vector times;
|
||||
Hashtable modifiers;
|
||||
LinkedHashMap modifiers;
|
||||
Throwable error;
|
||||
|
||||
public Result(Test test) {
|
||||
@@ -277,7 +277,7 @@ public class Result {
|
||||
this.error = t;
|
||||
}
|
||||
|
||||
public void setModifiers(Hashtable modifiers) {
|
||||
public void setModifiers(LinkedHashMap modifiers) {
|
||||
this.modifiers = modifiers;
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ public class Result {
|
||||
return ((long) getRepsPerRun()) * ((long) getUnitsPerRep());
|
||||
}
|
||||
|
||||
public Hashtable getModifiers() {
|
||||
public LinkedHashMap getModifiers() {
|
||||
return modifiers;
|
||||
}
|
||||
|
||||
@@ -423,11 +423,11 @@ public class Result {
|
||||
System.out.println(test+" averaged "+getAverageString());
|
||||
}
|
||||
if (true) {
|
||||
Enumeration enum_ = modifiers.keys();
|
||||
Iterator iter_ = modifiers.keySet().iterator();
|
||||
System.out.print(" with");
|
||||
String sep = " ";
|
||||
while (enum_.hasMoreElements()) {
|
||||
Modifier mod = (Modifier) enum_.nextElement();
|
||||
while (iter_.hasNext()) {
|
||||
Modifier mod = (Modifier) iter_.next();
|
||||
Object v = modifiers.get(mod);
|
||||
System.out.print(sep);
|
||||
System.out.print(mod.getAbbreviatedModifierDescription(v));
|
||||
@@ -442,9 +442,9 @@ public class Result {
|
||||
"num-reps=\""+getRepsPerRun()+"\" "+
|
||||
"num-units=\""+getUnitsPerRep()+"\" "+
|
||||
"name=\""+test.getTreeName()+"\">");
|
||||
Enumeration enum_ = modifiers.keys();
|
||||
while (enum_.hasMoreElements()) {
|
||||
Modifier mod = (Modifier) enum_.nextElement();
|
||||
Iterator iter_ = modifiers.keySet().iterator();
|
||||
while (iter_.hasNext()) {
|
||||
Modifier mod = (Modifier) iter_.next();
|
||||
Object v = modifiers.get(mod);
|
||||
String val = mod.getModifierValueName(v);
|
||||
pw.println(" <option "+
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -40,15 +40,15 @@
|
||||
|
||||
package j2dbench;
|
||||
|
||||
import java.awt.AlphaComposite;
|
||||
import java.awt.Canvas;
|
||||
import java.awt.Image;
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.AlphaComposite;
|
||||
import java.awt.Color;
|
||||
import java.awt.Image;
|
||||
import java.awt.Toolkit;
|
||||
import java.util.Hashtable;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
import j2dbench.tests.GraphicsTests;
|
||||
|
||||
@@ -105,12 +105,12 @@ public class TestEnvironment implements Node.Visitor {
|
||||
Image srcImage;
|
||||
boolean stopped;
|
||||
ResultSet results;
|
||||
Hashtable modifiers;
|
||||
LinkedHashMap modifiers;
|
||||
Timer timer;
|
||||
|
||||
public TestEnvironment() {
|
||||
results = new ResultSet();
|
||||
modifiers = new Hashtable();
|
||||
modifiers = new LinkedHashMap();
|
||||
timer = Timer.getImpl();
|
||||
}
|
||||
|
||||
@@ -246,8 +246,8 @@ public class TestEnvironment implements Node.Visitor {
|
||||
modifiers.remove(o);
|
||||
}
|
||||
|
||||
public Hashtable getModifiers() {
|
||||
return (Hashtable) modifiers.clone();
|
||||
public LinkedHashMap getModifiers() {
|
||||
return (LinkedHashMap) modifiers.clone();
|
||||
}
|
||||
|
||||
public void record(Result result) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
6394
src/hotspot/cpu/aarch64/aarch64_vector.ad
Normal file
6394
src/hotspot/cpu/aarch64/aarch64_vector.ad
Normal file
File diff suppressed because it is too large
Load Diff
4734
src/hotspot/cpu/aarch64/aarch64_vector_ad.m4
Normal file
4734
src/hotspot/cpu/aarch64/aarch64_vector_ad.m4
Normal file
File diff suppressed because it is too large
Load Diff
@@ -90,7 +90,7 @@ int AbstractInterpreter::size_activation(int max_stack,
|
||||
// for the callee's params we only need to account for the extra
|
||||
// locals.
|
||||
int size = overhead +
|
||||
(callee_locals - callee_params) +
|
||||
(callee_locals - callee_params) * Interpreter::stackElementWords +
|
||||
monitors * frame::interpreter_frame_monitor_size() +
|
||||
// On the top frame, at all times SP <= ESP, and SP is
|
||||
// 16-aligned. We ensure this by adjusting SP on method
|
||||
@@ -135,7 +135,7 @@ void AbstractInterpreter::layout_activation(Method* method,
|
||||
// NOTE the difference in using sender_sp and
|
||||
// interpreter_frame_sender_sp interpreter_frame_sender_sp is
|
||||
// the original sp of the caller (the unextended_sp) and
|
||||
// sender_sp is fp+8/16 (32bit/64bit) XXX
|
||||
// sender_sp is fp+16
|
||||
//
|
||||
// The interpreted method entry on AArch64 aligns SP to 16 bytes
|
||||
// before generating the fixed part of the activation frame. So there
|
||||
@@ -165,6 +165,19 @@ void AbstractInterpreter::layout_activation(Method* method,
|
||||
popframe_extra_args;
|
||||
interpreter_frame->interpreter_frame_set_last_sp(esp);
|
||||
|
||||
// We have to add extra reserved slots to max_stack. There are 3 users of the extra slots,
|
||||
// none of which are at the same time, so we just need to make sure there is enough room
|
||||
// for the biggest user:
|
||||
// -reserved slot for exception handler
|
||||
// -reserved slots for JSR292. Method::extra_stack_entries() is the size.
|
||||
// -reserved slots for TraceBytecodes
|
||||
int max_stack = method->constMethod()->max_stack() + MAX2(3, Method::extra_stack_entries());
|
||||
intptr_t* extended_sp = (intptr_t*) monbot -
|
||||
(max_stack * Interpreter::stackElementWords) -
|
||||
popframe_extra_args;
|
||||
extended_sp = align_down(extended_sp, StackAlignmentInBytes);
|
||||
interpreter_frame->interpreter_frame_set_extended_sp(extended_sp);
|
||||
|
||||
// All frames but the initial (oldest) interpreter frame we fill in have
|
||||
// a value for sender_sp that allows walking the stack but isn't
|
||||
// truly correct. Correct the value here.
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "memory/resourceArea.hpp"
|
||||
|
||||
#ifndef PRODUCT
|
||||
const uintptr_t Assembler::asm_bp = 0x00007fffee09ac88;
|
||||
const uintptr_t Assembler::asm_bp = 0x0000ffffac221240;
|
||||
#endif
|
||||
|
||||
static float unpack(unsigned value);
|
||||
@@ -155,10 +155,6 @@ void Address::lea(MacroAssembler *as, Register r) const {
|
||||
}
|
||||
}
|
||||
|
||||
void Assembler::adrp(Register reg1, const Address &dest, uint64_t &byte_offset) {
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
|
||||
#undef __
|
||||
|
||||
#define starti Instruction_aarch64 current_insn(this);
|
||||
@@ -189,7 +185,7 @@ void Assembler::adrp(Register reg1, const Address &dest, uint64_t &byte_offset)
|
||||
offset >>= 2;
|
||||
starti;
|
||||
f(1, 31), f(offset_lo, 30, 29), f(0b10000, 28, 24), sf(offset, 23, 5);
|
||||
rf(Rd, 0);
|
||||
zrf(Rd, 0);
|
||||
}
|
||||
|
||||
// An "all-purpose" add/subtract immediate, per ARM documentation:
|
||||
|
||||
@@ -142,16 +142,18 @@ REGISTER_DECLARATION(Register, rthread, r28);
|
||||
REGISTER_DECLARATION(Register, rheapbase, r27);
|
||||
// constant pool cache
|
||||
REGISTER_DECLARATION(Register, rcpool, r26);
|
||||
// monitors allocated on stack
|
||||
REGISTER_DECLARATION(Register, rmonitors, r25);
|
||||
// r25 is a callee-saved temp
|
||||
// REGISTER_DECLARATION(Register, unused, r25);
|
||||
// locals on stack
|
||||
REGISTER_DECLARATION(Register, rlocals, r24);
|
||||
// bytecode pointer
|
||||
REGISTER_DECLARATION(Register, rbcp, r22);
|
||||
// Dispatch table base
|
||||
REGISTER_DECLARATION(Register, rdispatch, r21);
|
||||
// Java stack pointer
|
||||
// Java expression stack pointer
|
||||
REGISTER_DECLARATION(Register, esp, r20);
|
||||
// Sender's SP while in interpreter
|
||||
REGISTER_DECLARATION(Register, r19_sender_sp, r19);
|
||||
|
||||
// Preserved predicate register with all elements set TRUE.
|
||||
REGISTER_DECLARATION(PRegister, ptrue, p7);
|
||||
@@ -218,7 +220,7 @@ public:
|
||||
return extend(uval, msb - lsb);
|
||||
}
|
||||
|
||||
static void patch(address a, int msb, int lsb, uint64_t val) {
|
||||
static ALWAYSINLINE void patch(address a, int msb, int lsb, uint64_t val) {
|
||||
int nbits = msb - lsb + 1;
|
||||
guarantee(val < (1ULL << nbits), "Field too big for insn");
|
||||
assert_cond(msb >= lsb);
|
||||
@@ -716,7 +718,7 @@ public:
|
||||
wrap_label(Rd, L, &Assembler::_adrp);
|
||||
}
|
||||
|
||||
void adrp(Register Rd, const Address &dest, uint64_t &offset);
|
||||
void adrp(Register Rd, const Address &dest, uint64_t &offset) = delete;
|
||||
|
||||
#undef INSN
|
||||
|
||||
@@ -768,7 +770,7 @@ public:
|
||||
INSN(andw, 0b000, true);
|
||||
INSN(orrw, 0b001, true);
|
||||
INSN(eorw, 0b010, true);
|
||||
INSN(andr, 0b100, false);
|
||||
INSN(andr, 0b100, false);
|
||||
INSN(orr, 0b101, false);
|
||||
INSN(eor, 0b110, false);
|
||||
|
||||
@@ -794,15 +796,15 @@ public:
|
||||
starti; \
|
||||
f(opcode, 31, 29), f(0b100101, 28, 23), f(shift/16, 22, 21), \
|
||||
f(imm, 20, 5); \
|
||||
rf(Rd, 0); \
|
||||
zrf(Rd, 0); \
|
||||
}
|
||||
|
||||
INSN(movnw, 0b000);
|
||||
INSN(movzw, 0b010);
|
||||
INSN(movkw, 0b011);
|
||||
INSN(movn, 0b100);
|
||||
INSN(movz, 0b110);
|
||||
INSN(movk, 0b111);
|
||||
INSN(movn, 0b100);
|
||||
INSN(movz, 0b110);
|
||||
INSN(movk, 0b111);
|
||||
|
||||
#undef INSN
|
||||
|
||||
@@ -1104,12 +1106,12 @@ public:
|
||||
rf(RM, 0);
|
||||
}
|
||||
|
||||
#define INSN(NAME, opc) \
|
||||
void NAME(Register RN) { \
|
||||
branch_reg(opc, 0, 0, RN, r0); \
|
||||
#define INSN(NAME, opc) \
|
||||
void NAME(Register RN) { \
|
||||
branch_reg(opc, 0, 0, RN, r0); \
|
||||
}
|
||||
|
||||
INSN(br, 0b0000);
|
||||
INSN(br, 0b0000);
|
||||
INSN(blr, 0b0001);
|
||||
INSN(ret, 0b0010);
|
||||
|
||||
@@ -1117,9 +1119,9 @@ public:
|
||||
|
||||
#undef INSN
|
||||
|
||||
#define INSN(NAME, opc) \
|
||||
void NAME() { \
|
||||
branch_reg(opc, 0, 0, dummy_reg, r0); \
|
||||
#define INSN(NAME, opc) \
|
||||
void NAME() { \
|
||||
branch_reg(opc, 0, 0, dummy_reg, r0); \
|
||||
}
|
||||
|
||||
INSN(eret, 0b0100);
|
||||
@@ -1208,44 +1210,46 @@ public:
|
||||
}
|
||||
|
||||
// bytes
|
||||
INSN3(stxrb, byte, 0b000, 0);
|
||||
INSN3(stxrb, byte, 0b000, 0);
|
||||
INSN3(stlxrb, byte, 0b000, 1);
|
||||
INSN2(ldxrb, byte, 0b010, 0);
|
||||
INSN2(ldxrb, byte, 0b010, 0);
|
||||
INSN2(ldaxrb, byte, 0b010, 1);
|
||||
INSN2(stlrb, byte, 0b100, 1);
|
||||
INSN2(ldarb, byte, 0b110, 1);
|
||||
INSN2(stlrb, byte, 0b100, 1);
|
||||
INSN2(ldarb, byte, 0b110, 1);
|
||||
|
||||
// halfwords
|
||||
INSN3(stxrh, halfword, 0b000, 0);
|
||||
INSN3(stxrh, halfword, 0b000, 0);
|
||||
INSN3(stlxrh, halfword, 0b000, 1);
|
||||
INSN2(ldxrh, halfword, 0b010, 0);
|
||||
INSN2(ldxrh, halfword, 0b010, 0);
|
||||
INSN2(ldaxrh, halfword, 0b010, 1);
|
||||
INSN2(stlrh, halfword, 0b100, 1);
|
||||
INSN2(ldarh, halfword, 0b110, 1);
|
||||
INSN2(stlrh, halfword, 0b100, 1);
|
||||
INSN2(ldarh, halfword, 0b110, 1);
|
||||
|
||||
// words
|
||||
INSN3(stxrw, word, 0b000, 0);
|
||||
INSN3(stxrw, word, 0b000, 0);
|
||||
INSN3(stlxrw, word, 0b000, 1);
|
||||
INSN4(stxpw, word, 0b001, 0);
|
||||
INSN4(stxpw, word, 0b001, 0);
|
||||
INSN4(stlxpw, word, 0b001, 1);
|
||||
INSN2(ldxrw, word, 0b010, 0);
|
||||
INSN2(ldxrw, word, 0b010, 0);
|
||||
INSN2(ldaxrw, word, 0b010, 1);
|
||||
INSN_FOO(ldxpw, word, 0b011, 0);
|
||||
INSN2(stlrw, word, 0b100, 1);
|
||||
INSN2(ldarw, word, 0b110, 1);
|
||||
// pairs of words
|
||||
INSN_FOO(ldxpw, word, 0b011, 0);
|
||||
INSN_FOO(ldaxpw, word, 0b011, 1);
|
||||
INSN2(stlrw, word, 0b100, 1);
|
||||
INSN2(ldarw, word, 0b110, 1);
|
||||
|
||||
// xwords
|
||||
INSN3(stxr, xword, 0b000, 0);
|
||||
INSN3(stxr, xword, 0b000, 0);
|
||||
INSN3(stlxr, xword, 0b000, 1);
|
||||
INSN4(stxp, xword, 0b001, 0);
|
||||
INSN4(stxp, xword, 0b001, 0);
|
||||
INSN4(stlxp, xword, 0b001, 1);
|
||||
INSN2(ldxr, xword, 0b010, 0);
|
||||
INSN2(ldxr, xword, 0b010, 0);
|
||||
INSN2(ldaxr, xword, 0b010, 1);
|
||||
INSN_FOO(ldxp, xword, 0b011, 0);
|
||||
INSN2(stlr, xword, 0b100, 1);
|
||||
INSN2(ldar, xword, 0b110, 1);
|
||||
// pairs of xwords
|
||||
INSN_FOO(ldxp, xword, 0b011, 0);
|
||||
INSN_FOO(ldaxp, xword, 0b011, 1);
|
||||
INSN2(stlr, xword, 0b100, 1);
|
||||
INSN2(ldar, xword, 0b110, 1);
|
||||
|
||||
#undef INSN2
|
||||
#undef INSN3
|
||||
@@ -1271,10 +1275,10 @@ public:
|
||||
assert(Rs != Rn && Rs != Rt, "unpredictable instruction"); \
|
||||
lse_cas(Rs, Rt, Rn, sz, a, r, true); \
|
||||
}
|
||||
INSN(cas, false, false)
|
||||
INSN(casa, true, false)
|
||||
INSN(casl, false, true)
|
||||
INSN(casal, true, true)
|
||||
INSN(cas, false, false)
|
||||
INSN(casa, true, false)
|
||||
INSN(casl, false, true)
|
||||
INSN(casal, true, true)
|
||||
#undef INSN
|
||||
|
||||
// CASP
|
||||
@@ -1286,10 +1290,10 @@ public:
|
||||
Rs != Rn && Rs1 != Rn && Rs != Rt, "invalid registers"); \
|
||||
lse_cas(Rs, Rt, Rn, sz, a, r, false); \
|
||||
}
|
||||
INSN(casp, false, false)
|
||||
INSN(caspa, true, false)
|
||||
INSN(caspl, false, true)
|
||||
INSN(caspal, true, true)
|
||||
INSN(casp, false, false)
|
||||
INSN(caspa, true, false)
|
||||
INSN(caspl, false, true)
|
||||
INSN(caspal, true, true)
|
||||
#undef INSN
|
||||
|
||||
// 8.1 Atomic operations
|
||||
@@ -1415,17 +1419,17 @@ public:
|
||||
ld_st1(size, p1, V, L, Rt1, Rt2, adr, no_allocate); \
|
||||
}
|
||||
|
||||
INSN(stpw, 0b00, 0b101, 0, 0, false);
|
||||
INSN(ldpw, 0b00, 0b101, 0, 1, false);
|
||||
INSN(stpw, 0b00, 0b101, 0, 0, false);
|
||||
INSN(ldpw, 0b00, 0b101, 0, 1, false);
|
||||
INSN(ldpsw, 0b01, 0b101, 0, 1, false);
|
||||
INSN(stp, 0b10, 0b101, 0, 0, false);
|
||||
INSN(ldp, 0b10, 0b101, 0, 1, false);
|
||||
INSN(stp, 0b10, 0b101, 0, 0, false);
|
||||
INSN(ldp, 0b10, 0b101, 0, 1, false);
|
||||
|
||||
// Load/store no-allocate pair (offset)
|
||||
INSN(stnpw, 0b00, 0b101, 0, 0, true);
|
||||
INSN(ldnpw, 0b00, 0b101, 0, 1, true);
|
||||
INSN(stnp, 0b10, 0b101, 0, 0, true);
|
||||
INSN(ldnp, 0b10, 0b101, 0, 1, true);
|
||||
INSN(stnp, 0b10, 0b101, 0, 0, true);
|
||||
INSN(ldnp, 0b10, 0b101, 0, 1, true);
|
||||
|
||||
#undef INSN
|
||||
|
||||
@@ -1475,21 +1479,21 @@ public:
|
||||
ld_st2(Rt, adr, size, op); \
|
||||
} \
|
||||
|
||||
INSN(str, 0b11, 0b00);
|
||||
INSN(str, 0b11, 0b00);
|
||||
INSN(strw, 0b10, 0b00);
|
||||
INSN(strb, 0b00, 0b00);
|
||||
INSN(strh, 0b01, 0b00);
|
||||
|
||||
INSN(ldr, 0b11, 0b01);
|
||||
INSN(ldr, 0b11, 0b01);
|
||||
INSN(ldrw, 0b10, 0b01);
|
||||
INSN(ldrb, 0b00, 0b01);
|
||||
INSN(ldrh, 0b01, 0b01);
|
||||
|
||||
INSN(ldrsb, 0b00, 0b10);
|
||||
INSN(ldrsb, 0b00, 0b10);
|
||||
INSN(ldrsbw, 0b00, 0b11);
|
||||
INSN(ldrsh, 0b01, 0b10);
|
||||
INSN(ldrsh, 0b01, 0b10);
|
||||
INSN(ldrshw, 0b01, 0b11);
|
||||
INSN(ldrsw, 0b10, 0b10);
|
||||
INSN(ldrsw, 0b10, 0b10);
|
||||
|
||||
#undef INSN
|
||||
|
||||
@@ -1569,13 +1573,13 @@ public:
|
||||
op_shifted_reg(current_insn, 0b01010, kind, shift, size, op); \
|
||||
}
|
||||
|
||||
INSN(andr, 1, 0b00, 0);
|
||||
INSN(orr, 1, 0b01, 0);
|
||||
INSN(eor, 1, 0b10, 0);
|
||||
INSN(ands, 1, 0b11, 0);
|
||||
INSN(andw, 0, 0b00, 0);
|
||||
INSN(orrw, 0, 0b01, 0);
|
||||
INSN(eorw, 0, 0b10, 0);
|
||||
INSN(andr, 1, 0b00, 0);
|
||||
INSN(orr, 1, 0b01, 0);
|
||||
INSN(eor, 1, 0b10, 0);
|
||||
INSN(ands, 1, 0b11, 0);
|
||||
INSN(andw, 0, 0b00, 0);
|
||||
INSN(orrw, 0, 0b01, 0);
|
||||
INSN(eorw, 0, 0b10, 0);
|
||||
INSN(andsw, 0, 0b11, 0);
|
||||
|
||||
#undef INSN
|
||||
@@ -1597,13 +1601,13 @@ public:
|
||||
assert(false, " can't be used with immediate operand"); \
|
||||
}
|
||||
|
||||
INSN(bic, 1, 0b00, 1);
|
||||
INSN(orn, 1, 0b01, 1);
|
||||
INSN(eon, 1, 0b10, 1);
|
||||
INSN(bics, 1, 0b11, 1);
|
||||
INSN(bicw, 0, 0b00, 1);
|
||||
INSN(ornw, 0, 0b01, 1);
|
||||
INSN(eonw, 0, 0b10, 1);
|
||||
INSN(bic, 1, 0b00, 1);
|
||||
INSN(orn, 1, 0b01, 1);
|
||||
INSN(eon, 1, 0b10, 1);
|
||||
INSN(bics, 1, 0b11, 1);
|
||||
INSN(bicw, 0, 0b00, 1);
|
||||
INSN(ornw, 0, 0b01, 1);
|
||||
INSN(eonw, 0, 0b10, 1);
|
||||
INSN(bicsw, 0, 0b11, 1);
|
||||
|
||||
#undef INSN
|
||||
@@ -1636,13 +1640,13 @@ void mvnw(Register Rd, Register Rm,
|
||||
op_shifted_reg(current_insn, 0b01011, kind, shift, size, op); \
|
||||
}
|
||||
|
||||
INSN(add, 1, 0b000);
|
||||
INSN(sub, 1, 0b10);
|
||||
INSN(add, 1, 0b000);
|
||||
INSN(sub, 1, 0b10);
|
||||
INSN(addw, 0, 0b000);
|
||||
INSN(subw, 0, 0b10);
|
||||
|
||||
INSN(adds, 1, 0b001);
|
||||
INSN(subs, 1, 0b11);
|
||||
INSN(adds, 1, 0b001);
|
||||
INSN(subs, 1, 0b11);
|
||||
INSN(addsw, 0, 0b001);
|
||||
INSN(subsw, 0, 0b11);
|
||||
|
||||
@@ -1667,8 +1671,8 @@ void mvnw(Register Rd, Register Rm,
|
||||
|
||||
INSN(addw, 0b000);
|
||||
INSN(subw, 0b010);
|
||||
INSN(add, 0b100);
|
||||
INSN(sub, 0b110);
|
||||
INSN(add, 0b100);
|
||||
INSN(sub, 0b110);
|
||||
|
||||
#undef INSN
|
||||
|
||||
@@ -1682,8 +1686,8 @@ void mvnw(Register Rd, Register Rm,
|
||||
|
||||
INSN(addsw, 0b001);
|
||||
INSN(subsw, 0b011);
|
||||
INSN(adds, 0b101);
|
||||
INSN(subs, 0b111);
|
||||
INSN(adds, 0b101);
|
||||
INSN(subs, 0b111);
|
||||
|
||||
#undef INSN
|
||||
|
||||
@@ -1722,14 +1726,14 @@ void mvnw(Register Rd, Register Rm,
|
||||
add_sub_carry(op, Rd, Rn, Rm); \
|
||||
}
|
||||
|
||||
INSN(adcw, 0b000);
|
||||
INSN(adcw, 0b000);
|
||||
INSN(adcsw, 0b001);
|
||||
INSN(sbcw, 0b010);
|
||||
INSN(sbcw, 0b010);
|
||||
INSN(sbcsw, 0b011);
|
||||
INSN(adc, 0b100);
|
||||
INSN(adcs, 0b101);
|
||||
INSN(sbc,0b110);
|
||||
INSN(sbcs, 0b111);
|
||||
INSN(adc, 0b100);
|
||||
INSN(adcs, 0b101);
|
||||
INSN(sbc, 0b110);
|
||||
INSN(sbcs, 0b111);
|
||||
|
||||
#undef INSN
|
||||
|
||||
@@ -1782,14 +1786,14 @@ void mvnw(Register Rd, Register Rm,
|
||||
conditional_select(op, op2, Rd, Rn, Rm, cond); \
|
||||
}
|
||||
|
||||
INSN(cselw, 0b000, 0b00);
|
||||
INSN(cselw, 0b000, 0b00);
|
||||
INSN(csincw, 0b000, 0b01);
|
||||
INSN(csinvw, 0b010, 0b00);
|
||||
INSN(csnegw, 0b010, 0b01);
|
||||
INSN(csel, 0b100, 0b00);
|
||||
INSN(csinc, 0b100, 0b01);
|
||||
INSN(csinv, 0b110, 0b00);
|
||||
INSN(csneg, 0b110, 0b01);
|
||||
INSN(csel, 0b100, 0b00);
|
||||
INSN(csinc, 0b100, 0b01);
|
||||
INSN(csinv, 0b110, 0b00);
|
||||
INSN(csneg, 0b110, 0b01);
|
||||
|
||||
#undef INSN
|
||||
|
||||
@@ -1855,7 +1859,7 @@ void mvnw(Register Rd, Register Rm,
|
||||
|
||||
#undef INSN
|
||||
|
||||
// (2 sources)
|
||||
// Data-processing (2 source)
|
||||
#define INSN(NAME, op29, opcode) \
|
||||
void NAME(Register Rd, Register Rn, Register Rm) { \
|
||||
starti; \
|
||||
@@ -1879,7 +1883,7 @@ void mvnw(Register Rd, Register Rm,
|
||||
|
||||
#undef INSN
|
||||
|
||||
// (3 sources)
|
||||
// Data-processing (3 source)
|
||||
void data_processing(unsigned op54, unsigned op31, unsigned o0,
|
||||
Register Rd, Register Rn, Register Rm,
|
||||
Register Ra) {
|
||||
@@ -1894,10 +1898,10 @@ void mvnw(Register Rd, Register Rm,
|
||||
data_processing(op54, op31, o0, Rd, Rn, Rm, Ra); \
|
||||
}
|
||||
|
||||
INSN(maddw, 0b000, 0b000, 0);
|
||||
INSN(msubw, 0b000, 0b000, 1);
|
||||
INSN(madd, 0b100, 0b000, 0);
|
||||
INSN(msub, 0b100, 0b000, 1);
|
||||
INSN(maddw, 0b000, 0b000, 0);
|
||||
INSN(msubw, 0b000, 0b000, 1);
|
||||
INSN(madd, 0b100, 0b000, 0);
|
||||
INSN(msub, 0b100, 0b000, 1);
|
||||
INSN(smaddl, 0b100, 0b001, 0);
|
||||
INSN(smsubl, 0b100, 0b001, 1);
|
||||
INSN(umaddl, 0b100, 0b101, 0);
|
||||
@@ -1930,31 +1934,17 @@ void mvnw(Register Rd, Register Rm,
|
||||
data_processing(op31, type, opcode, Vd, Vn); \
|
||||
}
|
||||
|
||||
private:
|
||||
INSN(i_fmovs, 0b000, 0b00, 0b000000);
|
||||
public:
|
||||
INSN(fabss, 0b000, 0b00, 0b000001);
|
||||
INSN(fnegs, 0b000, 0b00, 0b000010);
|
||||
INSN(fmovs, 0b000, 0b00, 0b000000);
|
||||
INSN(fabss, 0b000, 0b00, 0b000001);
|
||||
INSN(fnegs, 0b000, 0b00, 0b000010);
|
||||
INSN(fsqrts, 0b000, 0b00, 0b000011);
|
||||
INSN(fcvts, 0b000, 0b00, 0b000101); // Single-precision to double-precision
|
||||
INSN(fcvts, 0b000, 0b00, 0b000101); // Single-precision to double-precision
|
||||
|
||||
private:
|
||||
INSN(i_fmovd, 0b000, 0b01, 0b000000);
|
||||
public:
|
||||
INSN(fabsd, 0b000, 0b01, 0b000001);
|
||||
INSN(fnegd, 0b000, 0b01, 0b000010);
|
||||
INSN(fmovd, 0b000, 0b01, 0b000000);
|
||||
INSN(fabsd, 0b000, 0b01, 0b000001);
|
||||
INSN(fnegd, 0b000, 0b01, 0b000010);
|
||||
INSN(fsqrtd, 0b000, 0b01, 0b000011);
|
||||
INSN(fcvtd, 0b000, 0b01, 0b000100); // Double-precision to single-precision
|
||||
|
||||
void fmovd(FloatRegister Vd, FloatRegister Vn) {
|
||||
assert(Vd != Vn, "should be");
|
||||
i_fmovd(Vd, Vn);
|
||||
}
|
||||
|
||||
void fmovs(FloatRegister Vd, FloatRegister Vn) {
|
||||
assert(Vd != Vn, "should be");
|
||||
i_fmovs(Vd, Vn);
|
||||
}
|
||||
INSN(fcvtd, 0b000, 0b01, 0b000100); // Double-precision to single-precision
|
||||
|
||||
private:
|
||||
void _fcvt_narrow_extend(FloatRegister Vd, SIMD_Arrangement Ta,
|
||||
@@ -2034,15 +2024,15 @@ public:
|
||||
data_processing(op31, type, o1, o0, Vd, Vn, Vm, Va); \
|
||||
}
|
||||
|
||||
INSN(fmadds, 0b000, 0b00, 0, 0);
|
||||
INSN(fmsubs, 0b000, 0b00, 0, 1);
|
||||
INSN(fmadds, 0b000, 0b00, 0, 0);
|
||||
INSN(fmsubs, 0b000, 0b00, 0, 1);
|
||||
INSN(fnmadds, 0b000, 0b00, 1, 0);
|
||||
INSN(fnmsubs, 0b000, 0b00, 1, 1);
|
||||
|
||||
INSN(fmaddd, 0b000, 0b01, 0, 0);
|
||||
INSN(fmsubd, 0b000, 0b01, 0, 1);
|
||||
INSN(fmaddd, 0b000, 0b01, 0, 0);
|
||||
INSN(fmsubd, 0b000, 0b01, 0, 1);
|
||||
INSN(fnmaddd, 0b000, 0b01, 1, 0);
|
||||
INSN(fnmsub, 0b000, 0b01, 1, 1);
|
||||
INSN(fnmsub, 0b000, 0b01, 1, 1);
|
||||
|
||||
#undef INSN
|
||||
|
||||
@@ -2072,7 +2062,7 @@ public:
|
||||
|
||||
#undef INSN
|
||||
|
||||
// Floating-point<->integer conversions
|
||||
// Conversion between floating-point and integer
|
||||
void float_int_convert(unsigned sflag, unsigned ftype,
|
||||
unsigned rmode, unsigned opcode,
|
||||
Register Rd, Register Rn) {
|
||||
@@ -2110,9 +2100,9 @@ public:
|
||||
|
||||
#undef INSN
|
||||
|
||||
#define INSN(NAME, sflag, type, rmode, opcode) \
|
||||
#define INSN(NAME, sflag, type, rmode, opcode) \
|
||||
void NAME(FloatRegister Vd, Register Rn) { \
|
||||
float_int_convert(sflag, type, rmode, opcode, as_Register(Vd), Rn); \
|
||||
float_int_convert(sflag, type, rmode, opcode, as_Register(Vd), Rn); \
|
||||
}
|
||||
|
||||
INSN(fmovs, 0b0, 0b00, 0b00, 0b111);
|
||||
@@ -2242,6 +2232,8 @@ public:
|
||||
movi(Vn, T1D, 0);
|
||||
}
|
||||
|
||||
// Floating-point data-processing (1 source)
|
||||
|
||||
// Floating-point rounding
|
||||
// type: half-precision = 11
|
||||
// single = 00
|
||||
@@ -2429,6 +2421,7 @@ public:
|
||||
|
||||
#undef INSN
|
||||
|
||||
// Advanced SIMD three different
|
||||
#define INSN(NAME, opc, opc2, acceptT2D) \
|
||||
void NAME(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn, FloatRegister Vm) { \
|
||||
guarantee(T != T1Q && T != T1D, "incorrect arrangement"); \
|
||||
@@ -2573,6 +2566,7 @@ public:
|
||||
INSN(fcmeq, 0, 0, 0b111001);
|
||||
INSN(fcmgt, 1, 1, 0b111001);
|
||||
INSN(fcmge, 1, 0, 0b111001);
|
||||
INSN(facgt, 1, 1, 0b111011);
|
||||
|
||||
#undef INSN
|
||||
|
||||
@@ -2670,9 +2664,9 @@ public:
|
||||
f(opc, 31, 10), rf(Vn, 5), rf(Vd, 0); \
|
||||
}
|
||||
|
||||
INSN(aese, 0b0100111000101000010010);
|
||||
INSN(aesd, 0b0100111000101000010110);
|
||||
INSN(aesmc, 0b0100111000101000011010);
|
||||
INSN(aese, 0b0100111000101000010010);
|
||||
INSN(aesd, 0b0100111000101000010110);
|
||||
INSN(aesmc, 0b0100111000101000011010);
|
||||
INSN(aesimc, 0b0100111000101000011110);
|
||||
|
||||
#undef INSN
|
||||
@@ -3128,24 +3122,25 @@ public:
|
||||
sve_predicate_reg_insn(op1, op2, Zdn_or_Zd_or_Vd, T, Pg, Znm_or_Vn); \
|
||||
}
|
||||
|
||||
INSN(sve_abs, 0b00000100, 0b010110101); // vector abs, unary
|
||||
INSN(sve_add, 0b00000100, 0b000000000); // vector add
|
||||
INSN(sve_and, 0b00000100, 0b011010000); // vector and
|
||||
INSN(sve_andv, 0b00000100, 0b011010001); // bitwise and reduction to scalar
|
||||
INSN(sve_asr, 0b00000100, 0b010000100); // vector arithmetic shift right
|
||||
INSN(sve_bic, 0b00000100, 0b011011000); // vector bitwise clear
|
||||
INSN(sve_cnt, 0b00000100, 0b011010101); // count non-zero bits
|
||||
INSN(sve_cpy, 0b00000101, 0b100000100); // copy scalar to each active vector element
|
||||
INSN(sve_eor, 0b00000100, 0b011001000); // vector eor
|
||||
INSN(sve_eorv, 0b00000100, 0b011001001); // bitwise xor reduction to scalar
|
||||
INSN(sve_lsl, 0b00000100, 0b010011100); // vector logical shift left
|
||||
INSN(sve_lsr, 0b00000100, 0b010001100); // vector logical shift right
|
||||
INSN(sve_mul, 0b00000100, 0b010000000); // vector mul
|
||||
INSN(sve_neg, 0b00000100, 0b010111101); // vector neg, unary
|
||||
INSN(sve_not, 0b00000100, 0b011110101); // bitwise invert vector, unary
|
||||
INSN(sve_orr, 0b00000100, 0b011000000); // vector or
|
||||
INSN(sve_orv, 0b00000100, 0b011000001); // bitwise or reduction to scalar
|
||||
INSN(sve_smax, 0b00000100, 0b001000000); // signed maximum vectors
|
||||
INSN(sve_abs, 0b00000100, 0b010110101); // vector abs, unary
|
||||
INSN(sve_add, 0b00000100, 0b000000000); // vector add
|
||||
INSN(sve_and, 0b00000100, 0b011010000); // vector and
|
||||
INSN(sve_andv, 0b00000100, 0b011010001); // bitwise and reduction to scalar
|
||||
INSN(sve_asr, 0b00000100, 0b010000100); // vector arithmetic shift right
|
||||
INSN(sve_bic, 0b00000100, 0b011011000); // vector bitwise clear
|
||||
INSN(sve_clz, 0b00000100, 0b011001101); // vector count leading zero bits
|
||||
INSN(sve_cnt, 0b00000100, 0b011010101); // count non-zero bits
|
||||
INSN(sve_cpy, 0b00000101, 0b100000100); // copy scalar to each active vector element
|
||||
INSN(sve_eor, 0b00000100, 0b011001000); // vector eor
|
||||
INSN(sve_eorv, 0b00000100, 0b011001001); // bitwise xor reduction to scalar
|
||||
INSN(sve_lsl, 0b00000100, 0b010011100); // vector logical shift left
|
||||
INSN(sve_lsr, 0b00000100, 0b010001100); // vector logical shift right
|
||||
INSN(sve_mul, 0b00000100, 0b010000000); // vector mul
|
||||
INSN(sve_neg, 0b00000100, 0b010111101); // vector neg, unary
|
||||
INSN(sve_not, 0b00000100, 0b011110101); // bitwise invert vector, unary
|
||||
INSN(sve_orr, 0b00000100, 0b011000000); // vector or
|
||||
INSN(sve_orv, 0b00000100, 0b011000001); // bitwise or reduction to scalar
|
||||
INSN(sve_smax, 0b00000100, 0b001000000); // signed maximum vectors
|
||||
INSN(sve_smaxv, 0b00000100, 0b001000001); // signed maximum reduction to scalar
|
||||
INSN(sve_smin, 0b00000100, 0b001010000); // signed minimum vectors
|
||||
INSN(sve_sminv, 0b00000100, 0b001010001); // signed minimum reduction to scalar
|
||||
@@ -3160,22 +3155,22 @@ public:
|
||||
sve_predicate_reg_insn(op1, op2, Zd_or_Zdn_or_Vd, T, Pg, Zn_or_Zm); \
|
||||
}
|
||||
|
||||
INSN(sve_fabs, 0b00000100, 0b011100101);
|
||||
INSN(sve_fadd, 0b01100101, 0b000000100);
|
||||
INSN(sve_fadda, 0b01100101, 0b011000001); // add strictly-ordered reduction to scalar Vd
|
||||
INSN(sve_fdiv, 0b01100101, 0b001101100);
|
||||
INSN(sve_fmax, 0b01100101, 0b000110100); // floating-point maximum
|
||||
INSN(sve_fmaxv, 0b01100101, 0b000110001); // floating-point maximum recursive reduction to scalar
|
||||
INSN(sve_fmin, 0b01100101, 0b000111100); // floating-point minimum
|
||||
INSN(sve_fminv, 0b01100101, 0b000111001); // floating-point minimum recursive reduction to scalar
|
||||
INSN(sve_fmul, 0b01100101, 0b000010100);
|
||||
INSN(sve_fneg, 0b00000100, 0b011101101);
|
||||
INSN(sve_frintm, 0b01100101, 0b000010101); // floating-point round to integral value, toward minus infinity
|
||||
INSN(sve_frintn, 0b01100101, 0b000000101); // floating-point round to integral value, nearest with ties to even
|
||||
INSN(sve_frinta, 0b01100101, 0b000100101); // floating-point round to integral value, nearest with ties to away
|
||||
INSN(sve_frintp, 0b01100101, 0b000001101); // floating-point round to integral value, toward plus infinity
|
||||
INSN(sve_fsqrt, 0b01100101, 0b001101101);
|
||||
INSN(sve_fsub, 0b01100101, 0b000001100);
|
||||
INSN(sve_fabs, 0b00000100, 0b011100101);
|
||||
INSN(sve_fadd, 0b01100101, 0b000000100);
|
||||
INSN(sve_fadda, 0b01100101, 0b011000001); // add strictly-ordered reduction to scalar Vd
|
||||
INSN(sve_fdiv, 0b01100101, 0b001101100);
|
||||
INSN(sve_fmax, 0b01100101, 0b000110100); // floating-point maximum
|
||||
INSN(sve_fmaxv, 0b01100101, 0b000110001); // floating-point maximum recursive reduction to scalar
|
||||
INSN(sve_fmin, 0b01100101, 0b000111100); // floating-point minimum
|
||||
INSN(sve_fminv, 0b01100101, 0b000111001); // floating-point minimum recursive reduction to scalar
|
||||
INSN(sve_fmul, 0b01100101, 0b000010100);
|
||||
INSN(sve_fneg, 0b00000100, 0b011101101);
|
||||
INSN(sve_frintm, 0b01100101, 0b000010101); // floating-point round to integral value, toward minus infinity
|
||||
INSN(sve_frintn, 0b01100101, 0b000000101); // floating-point round to integral value, nearest with ties to even
|
||||
INSN(sve_frinta, 0b01100101, 0b000100101); // floating-point round to integral value, nearest with ties to away
|
||||
INSN(sve_frintp, 0b01100101, 0b000001101); // floating-point round to integral value, toward plus infinity
|
||||
INSN(sve_fsqrt, 0b01100101, 0b001101101);
|
||||
INSN(sve_fsub, 0b01100101, 0b000001100);
|
||||
#undef INSN
|
||||
|
||||
// SVE multiple-add/sub - predicated
|
||||
@@ -3518,18 +3513,22 @@ public:
|
||||
void NAME(Condition cond, PRegister Pd, SIMD_RegVariant T, PRegister Pg, \
|
||||
FloatRegister Zn, FloatRegister Zm) { \
|
||||
starti; \
|
||||
if (fp == 0) { \
|
||||
assert(T != Q, "invalid size"); \
|
||||
} else { \
|
||||
assert(T != B && T != Q, "invalid size"); \
|
||||
assert(cond != HI && cond != HS, "invalid condition for fcm"); \
|
||||
assert(T != Q, "invalid size"); \
|
||||
bool is_absolute = op2 == 0b11; \
|
||||
if (fp == 1) { \
|
||||
assert(T != B, "invalid size"); \
|
||||
if (is_absolute) { \
|
||||
assert(cond == GT || cond == GE, "invalid condition for fac"); \
|
||||
} else { \
|
||||
assert(cond != HI && cond != HS, "invalid condition for fcm"); \
|
||||
} \
|
||||
} \
|
||||
int cond_op; \
|
||||
switch(cond) { \
|
||||
case EQ: cond_op = (op2 << 2) | 0b10; break; \
|
||||
case NE: cond_op = (op2 << 2) | 0b11; break; \
|
||||
case GE: cond_op = (op2 << 2) | 0b00; break; \
|
||||
case GT: cond_op = (op2 << 2) | 0b01; break; \
|
||||
case GE: cond_op = (op2 << 2) | (is_absolute ? 0b01 : 0b00); break; \
|
||||
case GT: cond_op = (op2 << 2) | (is_absolute ? 0b11 : 0b01); break; \
|
||||
case HI: cond_op = 0b0001; break; \
|
||||
case HS: cond_op = 0b0000; break; \
|
||||
default: \
|
||||
@@ -3539,8 +3538,9 @@ public:
|
||||
pgrf(Pg, 10), rf(Zn, 5), f(cond_op & 1, 4), prf(Pd, 0); \
|
||||
}
|
||||
|
||||
INSN(sve_cmp, 0b00100100, 0b10, 0);
|
||||
INSN(sve_fcm, 0b01100101, 0b01, 1);
|
||||
INSN(sve_cmp, 0b00100100, 0b10, 0); // Integer compare vectors
|
||||
INSN(sve_fcm, 0b01100101, 0b01, 1); // Floating-point compare vectors
|
||||
INSN(sve_fac, 0b01100101, 0b11, 1); // Floating-point absolute compare vectors
|
||||
#undef INSN
|
||||
|
||||
// SVE Integer Compare - Signed Immediate
|
||||
@@ -3641,20 +3641,27 @@ void sve_fcm(Condition cond, PRegister Pd, SIMD_RegVariant T,
|
||||
INSN(sve_uzp2, 0b1); // Concatenate odd elements from two predicates
|
||||
#undef INSN
|
||||
|
||||
// Predicate counted loop (SVE) (32-bit variants are not included)
|
||||
#define INSN(NAME, decode) \
|
||||
// SVE integer compare scalar count and limit
|
||||
#define INSN(NAME, sf, op) \
|
||||
void NAME(PRegister Pd, SIMD_RegVariant T, Register Rn, Register Rm) { \
|
||||
starti; \
|
||||
assert(T != Q, "invalid register variant"); \
|
||||
f(0b00100101, 31, 24), f(T, 23, 22), f(1, 21), \
|
||||
zrf(Rm, 16), f(0, 15, 13), f(1, 12), f(decode >> 1, 11, 10), \
|
||||
zrf(Rn, 5), f(decode & 1, 4), prf(Pd, 0); \
|
||||
zrf(Rm, 16), f(0, 15, 13), f(sf, 12), f(op >> 1, 11, 10), \
|
||||
zrf(Rn, 5), f(op & 1, 4), prf(Pd, 0); \
|
||||
}
|
||||
|
||||
INSN(sve_whilelt, 0b010); // While incrementing signed scalar less than scalar
|
||||
INSN(sve_whilele, 0b011); // While incrementing signed scalar less than or equal to scalar
|
||||
INSN(sve_whilelo, 0b110); // While incrementing unsigned scalar lower than scalar
|
||||
INSN(sve_whilels, 0b111); // While incrementing unsigned scalar lower than or the same as scalar
|
||||
// While incrementing signed scalar less than scalar
|
||||
INSN(sve_whileltw, 0b0, 0b010);
|
||||
INSN(sve_whilelt, 0b1, 0b010);
|
||||
// While incrementing signed scalar less than or equal to scalar
|
||||
INSN(sve_whilelew, 0b0, 0b011);
|
||||
INSN(sve_whilele, 0b1, 0b011);
|
||||
// While incrementing unsigned scalar lower than scalar
|
||||
INSN(sve_whilelow, 0b0, 0b110);
|
||||
INSN(sve_whilelo, 0b1, 0b110);
|
||||
// While incrementing unsigned scalar lower than or the same as scalar
|
||||
INSN(sve_whilelsw, 0b0, 0b111);
|
||||
INSN(sve_whilels, 0b1, 0b111);
|
||||
#undef INSN
|
||||
|
||||
// SVE predicate reverse
|
||||
@@ -3793,6 +3800,19 @@ void sve_fcm(Condition cond, PRegister Pd, SIMD_RegVariant T,
|
||||
INSN(sve_lastb, 0b1);
|
||||
#undef INSN
|
||||
|
||||
// SVE reverse within elements
|
||||
#define INSN(NAME, opc, cond) \
|
||||
void NAME(FloatRegister Zd, SIMD_RegVariant T, PRegister Pg, FloatRegister Zn) { \
|
||||
starti; \
|
||||
assert(cond, "invalid size"); \
|
||||
f(0b00000101, 31, 24), f(T, 23, 22), f(0b1001, 21, 18), f(opc, 17, 16); \
|
||||
f(0b100, 15, 13), pgrf(Pg, 10), rf(Zn, 5), rf(Zd, 0); \
|
||||
}
|
||||
|
||||
INSN(sve_revb, 0b00, T == H || T == S || T == D);
|
||||
INSN(sve_rbit, 0b11, T != Q);
|
||||
#undef INSN
|
||||
|
||||
// SVE Create index starting from general-purpose register and incremented by immediate
|
||||
void sve_index(FloatRegister Zd, SIMD_RegVariant T, Register Rn, int imm) {
|
||||
starti;
|
||||
@@ -3819,6 +3839,23 @@ void sve_fcm(Condition cond, PRegister Pd, SIMD_RegVariant T,
|
||||
f(0b001100, 15, 10), rf(Zn, 5), rf(Zd, 0);
|
||||
}
|
||||
|
||||
// Shuffle active elements of vector to the right and fill with zero
|
||||
void sve_compact(FloatRegister Zd, SIMD_RegVariant T, FloatRegister Zn, PRegister Pg) {
|
||||
starti;
|
||||
assert(T == S || T == D, "invalid size");
|
||||
f(0b00000101, 31, 24), f(T, 23, 22), f(0b100001100, 21, 13);
|
||||
pgrf(Pg, 10), rf(Zn, 5), rf(Zd, 0);
|
||||
}
|
||||
|
||||
// SVE2 Count matching elements in vector
|
||||
void sve_histcnt(FloatRegister Zd, SIMD_RegVariant T, PRegister Pg,
|
||||
FloatRegister Zn, FloatRegister Zm) {
|
||||
starti;
|
||||
assert(T == S || T == D, "invalid size");
|
||||
f(0b01000101, 31, 24), f(T, 23, 22), f(0b1, 21), rf(Zm, 16);
|
||||
f(0b110, 15, 13), pgrf(Pg, 10), rf(Zn, 5), rf(Zd, 0);
|
||||
}
|
||||
|
||||
// SVE2 bitwise permute
|
||||
#define INSN(NAME, opc) \
|
||||
void NAME(FloatRegister Zd, SIMD_RegVariant T, FloatRegister Zn, FloatRegister Zm) { \
|
||||
@@ -3830,6 +3867,7 @@ void sve_fcm(Condition cond, PRegister Pd, SIMD_RegVariant T,
|
||||
}
|
||||
|
||||
INSN(sve_bext, 0b00);
|
||||
INSN(sve_bdep, 0b01);
|
||||
#undef INSN
|
||||
|
||||
Assembler(CodeBuffer* code) : AbstractAssembler(code) {
|
||||
|
||||
@@ -300,8 +300,6 @@ void FrameMap::initialize() {
|
||||
|
||||
|
||||
Address FrameMap::make_new_address(ByteSize sp_offset) const {
|
||||
// for rbp, based address use this:
|
||||
// return Address(rbp, in_bytes(sp_offset) - (framesize() - 2) * 4);
|
||||
return Address(sp, in_bytes(sp_offset));
|
||||
}
|
||||
|
||||
|
||||
@@ -282,10 +282,9 @@ void LIR_Assembler::osr_entry() {
|
||||
__ bind(L);
|
||||
}
|
||||
#endif
|
||||
__ ldr(r19, Address(OSR_buf, slot_offset + 0));
|
||||
__ ldp(r19, r20, Address(OSR_buf, slot_offset));
|
||||
__ str(r19, frame_map()->address_for_monitor_lock(i));
|
||||
__ ldr(r19, Address(OSR_buf, slot_offset + 1*BytesPerWord));
|
||||
__ str(r19, frame_map()->address_for_monitor_object(i));
|
||||
__ str(r20, frame_map()->address_for_monitor_object(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -438,7 +437,6 @@ int LIR_Assembler::emit_unwind_handler() {
|
||||
__ unlock_object(r5, r4, r0, *stub->entry());
|
||||
}
|
||||
__ bind(*stub->continuation());
|
||||
__ dec_held_monitor_count(rthread);
|
||||
}
|
||||
|
||||
if (compilation()->env()->dtrace_method_probes()) {
|
||||
@@ -965,7 +963,7 @@ void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch
|
||||
if (UseCompressedOops && !wide) {
|
||||
__ ldrw(dest->as_register(), as_Address(from_addr));
|
||||
} else {
|
||||
__ ldr(dest->as_register(), as_Address(from_addr));
|
||||
__ ldr(dest->as_register(), as_Address(from_addr));
|
||||
}
|
||||
break;
|
||||
case T_METADATA:
|
||||
@@ -2559,6 +2557,10 @@ void LIR_Assembler::emit_lock(LIR_OpLock* op) {
|
||||
Register hdr = op->hdr_opr()->as_register();
|
||||
Register lock = op->lock_opr()->as_register();
|
||||
if (UseHeavyMonitors) {
|
||||
if (op->info() != NULL) {
|
||||
add_debug_info_for_null_check_here(op->info());
|
||||
__ null_check(obj, -1);
|
||||
}
|
||||
__ b(*op->stub()->entry());
|
||||
} else if (op->code() == lir_lock) {
|
||||
assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
|
||||
@@ -2574,18 +2576,7 @@ void LIR_Assembler::emit_lock(LIR_OpLock* op) {
|
||||
} else {
|
||||
Unimplemented();
|
||||
}
|
||||
if (op->code() == lir_lock) {
|
||||
// If deoptimization happens in Runtime1::monitorenter, inc_held_monitor_count after backing from slowpath
|
||||
// will be skipped. Solution is:
|
||||
// 1. Increase only in fastpath
|
||||
// 2. Runtime1::monitorenter increase count after locking
|
||||
__ inc_held_monitor_count(rthread);
|
||||
}
|
||||
__ bind(*op->stub()->continuation());
|
||||
if (op->code() == lir_unlock) {
|
||||
// unlock in slowpath is JRT_Leaf stub, no deoptimization can happen
|
||||
__ dec_held_monitor_count(rthread);
|
||||
}
|
||||
}
|
||||
|
||||
void LIR_Assembler::emit_load_klass(LIR_OpLoadKlass* op) {
|
||||
@@ -2699,7 +2690,7 @@ void LIR_Assembler::emit_updatecrc32(LIR_OpUpdateCRC32* op) {
|
||||
assert_different_registers(val, crc, res);
|
||||
uint64_t offset;
|
||||
__ adrp(res, ExternalAddress(StubRoutines::crc_table_addr()), offset);
|
||||
if (offset) __ add(res, res, offset);
|
||||
__ add(res, res, offset);
|
||||
|
||||
__ mvnw(crc, crc); // ~crc
|
||||
__ update_byte_crc32(crc, val, res);
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "ci/ciArray.hpp"
|
||||
#include "ci/ciObjArrayKlass.hpp"
|
||||
#include "ci/ciTypeArrayKlass.hpp"
|
||||
#include "compiler/compilerDefinitions.inline.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
@@ -917,7 +918,6 @@ void LIRGenerator::do_update_CRC32(Intrinsic* x) {
|
||||
assert(UseCRC32Intrinsics, "why are we here?");
|
||||
// Make all state_for calls early since they can emit code
|
||||
LIR_Opr result = rlock_result(x);
|
||||
int flags = 0;
|
||||
switch (x->id()) {
|
||||
case vmIntrinsics::_updateCRC32: {
|
||||
LIRItem crc(x->argument_at(0), this);
|
||||
@@ -942,9 +942,9 @@ void LIRGenerator::do_update_CRC32(Intrinsic* x) {
|
||||
|
||||
LIR_Opr index = off.result();
|
||||
int offset = is_updateBytes ? arrayOopDesc::base_offset_in_bytes(T_BYTE) : 0;
|
||||
if(off.result()->is_constant()) {
|
||||
if (off.result()->is_constant()) {
|
||||
index = LIR_OprFact::illegalOpr;
|
||||
offset += off.result()->as_jint();
|
||||
offset += off.result()->as_jint();
|
||||
}
|
||||
LIR_Opr base_op = buf.result();
|
||||
|
||||
@@ -994,7 +994,6 @@ void LIRGenerator::do_update_CRC32C(Intrinsic* x) {
|
||||
assert(UseCRC32CIntrinsics, "why are we here?");
|
||||
// Make all state_for calls early since they can emit code
|
||||
LIR_Opr result = rlock_result(x);
|
||||
int flags = 0;
|
||||
switch (x->id()) {
|
||||
case vmIntrinsics::_updateBytesCRC32C:
|
||||
case vmIntrinsics::_updateDirectByteBufferCRC32C: {
|
||||
|
||||
@@ -116,6 +116,7 @@ int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr
|
||||
cbnz(hdr, slow_case);
|
||||
// done
|
||||
bind(done);
|
||||
increment(Address(rthread, JavaThread::held_monitor_count_offset()));
|
||||
return null_check_offset;
|
||||
}
|
||||
|
||||
@@ -147,6 +148,7 @@ void C1_MacroAssembler::unlock_object(Register hdr, Register obj, Register disp_
|
||||
}
|
||||
// done
|
||||
bind(done);
|
||||
decrement(Address(rthread, JavaThread::held_monitor_count_offset()));
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +157,7 @@ void C1_MacroAssembler::try_allocate(Register obj, Register var_size_in_bytes, i
|
||||
if (UseTLAB) {
|
||||
tlab_allocate(obj, var_size_in_bytes, con_size_in_bytes, t1, t2, slow_case);
|
||||
} else {
|
||||
eden_allocate(obj, var_size_in_bytes, con_size_in_bytes, t1, slow_case);
|
||||
b(slow_case);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,7 +298,7 @@ void C1_MacroAssembler::build_frame(int framesize, int bang_size_in_bytes) {
|
||||
|
||||
// Insert nmethod entry barrier into frame.
|
||||
BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
|
||||
bs->nmethod_entry_barrier(this);
|
||||
bs->nmethod_entry_barrier(this, NULL /* slow_path */, NULL /* continuation */, NULL /* guard */);
|
||||
}
|
||||
|
||||
void C1_MacroAssembler::remove_frame(int framesize) {
|
||||
@@ -313,7 +315,7 @@ void C1_MacroAssembler::verified_entry(bool breakAtEntry) {
|
||||
}
|
||||
|
||||
void C1_MacroAssembler::load_parameter(int offset_in_words, Register reg) {
|
||||
// rbp, + 0: link
|
||||
// rfp, + 0: link
|
||||
// + 1: return address
|
||||
// + 2: argument with offset 0
|
||||
// + 3: argument with offset 1
|
||||
|
||||
@@ -656,56 +656,6 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
__ set_info("fast new_instance init check", dont_gc_arguments);
|
||||
}
|
||||
|
||||
// If TLAB is disabled, see if there is support for inlining contiguous
|
||||
// allocations.
|
||||
// Otherwise, just go to the slow path.
|
||||
if ((id == fast_new_instance_id || id == fast_new_instance_init_check_id) &&
|
||||
!UseTLAB && Universe::heap()->supports_inline_contig_alloc()) {
|
||||
Label slow_path;
|
||||
Register obj_size = r19;
|
||||
Register t1 = r10;
|
||||
Register t2 = r11;
|
||||
assert_different_registers(klass, obj, obj_size, t1, t2);
|
||||
|
||||
__ stp(r19, zr, Address(__ pre(sp, -2 * wordSize)));
|
||||
|
||||
if (id == fast_new_instance_init_check_id) {
|
||||
// make sure the klass is initialized
|
||||
__ ldrb(rscratch1, Address(klass, InstanceKlass::init_state_offset()));
|
||||
__ cmpw(rscratch1, InstanceKlass::fully_initialized);
|
||||
__ br(Assembler::NE, slow_path);
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
// assert object can be fast path allocated
|
||||
{
|
||||
Label ok, not_ok;
|
||||
__ ldrw(obj_size, Address(klass, Klass::layout_helper_offset()));
|
||||
__ cmp(obj_size, (u1)0);
|
||||
__ br(Assembler::LE, not_ok); // make sure it's an instance (LH > 0)
|
||||
__ tstw(obj_size, Klass::_lh_instance_slow_path_bit);
|
||||
__ br(Assembler::EQ, ok);
|
||||
__ bind(not_ok);
|
||||
__ stop("assert(can be fast path allocated)");
|
||||
__ should_not_reach_here();
|
||||
__ bind(ok);
|
||||
}
|
||||
#endif // ASSERT
|
||||
|
||||
// get the instance size (size is positive so movl is fine for 64bit)
|
||||
__ ldrw(obj_size, Address(klass, Klass::layout_helper_offset()));
|
||||
|
||||
__ eden_allocate(obj, obj_size, 0, t1, slow_path);
|
||||
|
||||
__ initialize_object(obj, klass, obj_size, 0, t1, t2, /* is_tlab_allocated */ false);
|
||||
__ verify_oop(obj);
|
||||
__ ldp(r19, zr, Address(__ post(sp, 2 * wordSize)));
|
||||
__ ret(lr);
|
||||
|
||||
__ bind(slow_path);
|
||||
__ ldp(r19, zr, Address(__ post(sp, 2 * wordSize)));
|
||||
}
|
||||
|
||||
__ enter();
|
||||
OopMap* map = save_live_registers(sasm);
|
||||
int call_offset = __ call_RT(obj, noreg, CAST_FROM_FN_PTR(address, new_instance), klass);
|
||||
@@ -771,51 +721,6 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
}
|
||||
#endif // ASSERT
|
||||
|
||||
// If TLAB is disabled, see if there is support for inlining contiguous
|
||||
// allocations.
|
||||
// Otherwise, just go to the slow path.
|
||||
if (!UseTLAB && Universe::heap()->supports_inline_contig_alloc()) {
|
||||
Register arr_size = r5;
|
||||
Register t1 = r10;
|
||||
Register t2 = r11;
|
||||
Label slow_path;
|
||||
assert_different_registers(length, klass, obj, arr_size, t1, t2);
|
||||
|
||||
// check that array length is small enough for fast path.
|
||||
__ mov(rscratch1, C1_MacroAssembler::max_array_allocation_length);
|
||||
__ cmpw(length, rscratch1);
|
||||
__ br(Assembler::HI, slow_path);
|
||||
|
||||
// get the allocation size: round_up(hdr + length << (layout_helper & 0x1F))
|
||||
// since size is positive ldrw does right thing on 64bit
|
||||
__ ldrw(t1, Address(klass, Klass::layout_helper_offset()));
|
||||
// since size is positive movw does right thing on 64bit
|
||||
__ movw(arr_size, length);
|
||||
__ lslvw(arr_size, length, t1);
|
||||
__ ubfx(t1, t1, Klass::_lh_header_size_shift,
|
||||
exact_log2(Klass::_lh_header_size_mask + 1));
|
||||
__ add(arr_size, arr_size, t1);
|
||||
__ add(arr_size, arr_size, MinObjAlignmentInBytesMask); // align up
|
||||
__ andr(arr_size, arr_size, ~MinObjAlignmentInBytesMask);
|
||||
|
||||
__ eden_allocate(obj, arr_size, 0, t1, slow_path); // preserves arr_size
|
||||
|
||||
__ initialize_header(obj, klass, length, t1, t2);
|
||||
__ ldrb(t1, Address(klass, in_bytes(Klass::layout_helper_offset()) + (Klass::_lh_header_size_shift / BitsPerByte)));
|
||||
assert(Klass::_lh_header_size_shift % BitsPerByte == 0, "bytewise");
|
||||
assert(Klass::_lh_header_size_mask <= 0xFF, "bytewise");
|
||||
__ andr(t1, t1, Klass::_lh_header_size_mask);
|
||||
__ sub(arr_size, arr_size, t1); // body length
|
||||
__ add(t1, t1, obj); // body start
|
||||
__ initialize_body(t1, arr_size, 0, t1, t2);
|
||||
__ membar(Assembler::StoreStore);
|
||||
__ verify_oop(obj);
|
||||
|
||||
__ ret(lr);
|
||||
|
||||
__ bind(slow_path);
|
||||
}
|
||||
|
||||
__ enter();
|
||||
OopMap* map = save_live_registers(sasm);
|
||||
int call_offset;
|
||||
|
||||
@@ -26,7 +26,10 @@
|
||||
#include "asm/assembler.hpp"
|
||||
#include "asm/assembler.inline.hpp"
|
||||
#include "opto/c2_MacroAssembler.hpp"
|
||||
#include "opto/compile.hpp"
|
||||
#include "opto/intrinsicnode.hpp"
|
||||
#include "opto/matcher.hpp"
|
||||
#include "opto/output.hpp"
|
||||
#include "opto/subnode.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
|
||||
@@ -42,6 +45,21 @@
|
||||
|
||||
typedef void (MacroAssembler::* chr_insn)(Register Rt, const Address &adr);
|
||||
|
||||
void C2_MacroAssembler::emit_entry_barrier_stub(C2EntryBarrierStub* stub) {
|
||||
bind(stub->slow_path());
|
||||
movptr(rscratch1, (uintptr_t) StubRoutines::aarch64::method_entry_barrier());
|
||||
blr(rscratch1);
|
||||
b(stub->continuation());
|
||||
|
||||
bind(stub->guard());
|
||||
relocate(entry_guard_Relocation::spec());
|
||||
emit_int32(0); // nmethod guard value
|
||||
}
|
||||
|
||||
int C2_MacroAssembler::entry_barrier_stub_size() {
|
||||
return 4 * 6;
|
||||
}
|
||||
|
||||
// Search for str1 in str2 and return index or -1
|
||||
void C2_MacroAssembler::string_indexof(Register str2, Register str1,
|
||||
Register cnt2, Register cnt1,
|
||||
@@ -986,7 +1004,7 @@ void C2_MacroAssembler::sve_vmask_tolong(Register dst, PRegister src, BasicType
|
||||
// Repeat on higher bytes and join the results.
|
||||
// Compress 8 bytes in each iteration.
|
||||
for (int idx = 1; idx < (lane_cnt / 8); idx++) {
|
||||
sve_extract_integral(rscratch1, D, vtmp1, idx, /* is_signed */ false, vtmp2);
|
||||
sve_extract_integral(rscratch1, T_LONG, vtmp1, idx, vtmp2);
|
||||
bytemask_compress(rscratch1);
|
||||
orr(dst, dst, rscratch1, Assembler::LSL, idx << 3);
|
||||
}
|
||||
@@ -1030,6 +1048,67 @@ void C2_MacroAssembler::sve_vmask_tolong(Register dst, PRegister src, BasicType
|
||||
}
|
||||
}
|
||||
|
||||
// Unpack the mask, a long value in src, into predicate register dst based on the
|
||||
// corresponding data type. Note that dst can support at most 64 lanes.
|
||||
// Below example gives the expected dst predicate register in different types, with
|
||||
// a valid src(0x658D) on a 1024-bit vector size machine.
|
||||
// BYTE: dst = 0x00 00 00 00 00 00 00 00 00 00 00 00 00 00 65 8D
|
||||
// SHORT: dst = 0x00 00 00 00 00 00 00 00 00 00 00 00 14 11 40 51
|
||||
// INT: dst = 0x00 00 00 00 00 00 00 00 01 10 01 01 10 00 11 01
|
||||
// LONG: dst = 0x00 01 01 00 00 01 00 01 01 00 00 00 01 01 00 01
|
||||
//
|
||||
// The number of significant bits of src must be equal to lane_cnt. E.g., 0xFF658D which
|
||||
// has 24 significant bits would be an invalid input if dst predicate register refers to
|
||||
// a LONG type 1024-bit vector, which has at most 16 lanes.
|
||||
void C2_MacroAssembler::sve_vmask_fromlong(PRegister dst, Register src, BasicType bt, int lane_cnt,
|
||||
FloatRegister vtmp1, FloatRegister vtmp2) {
|
||||
assert(UseSVE == 2 && VM_Version::supports_svebitperm() &&
|
||||
lane_cnt <= 64 && is_power_of_2(lane_cnt), "unsupported");
|
||||
Assembler::SIMD_RegVariant size = elemType_to_regVariant(bt);
|
||||
// Example: src = 0x658D, bt = T_BYTE, size = B, lane_cnt = 16
|
||||
// Expected: dst = 0b01101001 10001101
|
||||
|
||||
// Put long value from general purpose register into the first lane of vector.
|
||||
// vtmp1 = 0x0000000000000000 | 0x000000000000658D
|
||||
sve_dup(vtmp1, B, 0);
|
||||
mov(vtmp1, D, 0, src);
|
||||
|
||||
// As sve_cmp generates mask value with the minimum unit in byte, we should
|
||||
// transform the value in the first lane which is mask in bit now to the
|
||||
// mask in byte, which can be done by SVE2's BDEP instruction.
|
||||
|
||||
// The first source input of BDEP instruction. Deposite each byte in every 8 bytes.
|
||||
// vtmp1 = 0x0000000000000065 | 0x000000000000008D
|
||||
if (lane_cnt <= 8) {
|
||||
// Nothing. As only one byte exsits.
|
||||
} else if (lane_cnt <= 16) {
|
||||
ins(vtmp1, B, vtmp1, 8, 1);
|
||||
mov(vtmp1, B, 1, zr);
|
||||
} else {
|
||||
sve_vector_extend(vtmp1, D, vtmp1, B);
|
||||
}
|
||||
|
||||
// The second source input of BDEP instruction, initialized with 0x01 for each byte.
|
||||
// vtmp2 = 0x01010101 0x01010101 0x01010101 0x01010101
|
||||
sve_dup(vtmp2, B, 1);
|
||||
|
||||
// BDEP vtmp1.D, vtmp1.D, vtmp2.D
|
||||
// vtmp1 = 0x0000000000000065 | 0x000000000000008D
|
||||
// vtmp2 = 0x0101010101010101 | 0x0101010101010101
|
||||
// ---------------------------------------
|
||||
// vtmp1 = 0x0001010000010001 | 0x0100000001010001
|
||||
sve_bdep(vtmp1, D, vtmp1, vtmp2);
|
||||
|
||||
if (bt != T_BYTE) {
|
||||
sve_vector_extend(vtmp1, size, vtmp1, B);
|
||||
}
|
||||
// Generate mask according to the given vector, in which the elements have been
|
||||
// extended to expected type.
|
||||
// dst = 0b01101001 10001101
|
||||
sve_cmp(Assembler::NE, dst, size, ptrue, vtmp1, 0);
|
||||
}
|
||||
|
||||
// Clobbers: rflags
|
||||
void C2_MacroAssembler::sve_compare(PRegister pd, BasicType bt, PRegister pg,
|
||||
FloatRegister zn, FloatRegister zm, int cond) {
|
||||
assert(pg->is_governing(), "This register has to be a governing predicate register");
|
||||
@@ -1067,6 +1146,61 @@ void C2_MacroAssembler::sve_vmask_lasttrue(Register dst, BasicType bt, PRegister
|
||||
subw(dst, rscratch1, dst);
|
||||
}
|
||||
|
||||
// Extend integer vector src to dst with the same lane count
|
||||
// but larger element size, e.g. 4B -> 4I
|
||||
void C2_MacroAssembler::neon_vector_extend(FloatRegister dst, BasicType dst_bt, unsigned dst_vlen_in_bytes,
|
||||
FloatRegister src, BasicType src_bt) {
|
||||
if (src_bt == T_BYTE) {
|
||||
if (dst_bt == T_SHORT) {
|
||||
// 4B/8B to 4S/8S
|
||||
assert(dst_vlen_in_bytes == 8 || dst_vlen_in_bytes == 16, "unsupported");
|
||||
sxtl(dst, T8H, src, T8B);
|
||||
} else {
|
||||
// 4B to 4I
|
||||
assert(dst_vlen_in_bytes == 16 && dst_bt == T_INT, "unsupported");
|
||||
sxtl(dst, T8H, src, T8B);
|
||||
sxtl(dst, T4S, dst, T4H);
|
||||
}
|
||||
} else if (src_bt == T_SHORT) {
|
||||
// 4S to 4I
|
||||
assert(dst_vlen_in_bytes == 16 && dst_bt == T_INT, "unsupported");
|
||||
sxtl(dst, T4S, src, T4H);
|
||||
} else if (src_bt == T_INT) {
|
||||
// 2I to 2L
|
||||
assert(dst_vlen_in_bytes == 16 && dst_bt == T_LONG, "unsupported");
|
||||
sxtl(dst, T2D, src, T2S);
|
||||
} else {
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
}
|
||||
|
||||
// Narrow integer vector src down to dst with the same lane count
|
||||
// but smaller element size, e.g. 4I -> 4B
|
||||
void C2_MacroAssembler::neon_vector_narrow(FloatRegister dst, BasicType dst_bt,
|
||||
FloatRegister src, BasicType src_bt, unsigned src_vlen_in_bytes) {
|
||||
if (src_bt == T_SHORT) {
|
||||
// 4S/8S to 4B/8B
|
||||
assert(src_vlen_in_bytes == 8 || src_vlen_in_bytes == 16, "unsupported");
|
||||
assert(dst_bt == T_BYTE, "unsupported");
|
||||
xtn(dst, T8B, src, T8H);
|
||||
} else if (src_bt == T_INT) {
|
||||
// 4I to 4B/4S
|
||||
assert(src_vlen_in_bytes == 16, "unsupported");
|
||||
assert(dst_bt == T_BYTE || dst_bt == T_SHORT, "unsupported");
|
||||
xtn(dst, T4H, src, T4S);
|
||||
if (dst_bt == T_BYTE) {
|
||||
xtn(dst, T8B, dst, T8H);
|
||||
}
|
||||
} else if (src_bt == T_LONG) {
|
||||
// 2L to 2I
|
||||
assert(src_vlen_in_bytes == 16, "unsupported");
|
||||
assert(dst_bt == T_INT, "unsupported");
|
||||
xtn(dst, T2S, src, T2D);
|
||||
} else {
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
}
|
||||
|
||||
void C2_MacroAssembler::sve_vector_extend(FloatRegister dst, SIMD_RegVariant dst_size,
|
||||
FloatRegister src, SIMD_RegVariant src_size) {
|
||||
assert(dst_size > src_size && dst_size <= D && src_size <= S, "invalid element size");
|
||||
@@ -1113,10 +1247,12 @@ void C2_MacroAssembler::sve_vector_narrow(FloatRegister dst, SIMD_RegVariant dst
|
||||
sve_uzp1(dst, S, src, tmp);
|
||||
break;
|
||||
case H:
|
||||
assert_different_registers(dst, tmp);
|
||||
sve_uzp1(dst, S, src, tmp);
|
||||
sve_uzp1(dst, H, dst, tmp);
|
||||
break;
|
||||
case B:
|
||||
assert_different_registers(dst, tmp);
|
||||
sve_uzp1(dst, S, src, tmp);
|
||||
sve_uzp1(dst, H, dst, tmp);
|
||||
sve_uzp1(dst, B, dst, tmp);
|
||||
@@ -1128,6 +1264,7 @@ void C2_MacroAssembler::sve_vector_narrow(FloatRegister dst, SIMD_RegVariant dst
|
||||
if (dst_size == H) {
|
||||
sve_uzp1(dst, H, src, tmp);
|
||||
} else { // B
|
||||
assert_different_registers(dst, tmp);
|
||||
sve_uzp1(dst, H, src, tmp);
|
||||
sve_uzp1(dst, B, dst, tmp);
|
||||
}
|
||||
@@ -1176,6 +1313,275 @@ void C2_MacroAssembler::sve_vmaskcast_narrow(PRegister dst, PRegister src,
|
||||
}
|
||||
}
|
||||
|
||||
// Vector reduction add for integral type with ASIMD instructions.
|
||||
void C2_MacroAssembler::neon_reduce_add_integral(Register dst, BasicType bt,
|
||||
Register isrc, FloatRegister vsrc,
|
||||
unsigned vector_length_in_bytes,
|
||||
FloatRegister vtmp) {
|
||||
assert(vector_length_in_bytes == 8 || vector_length_in_bytes == 16, "unsupported");
|
||||
assert_different_registers(dst, isrc);
|
||||
bool isQ = vector_length_in_bytes == 16;
|
||||
|
||||
BLOCK_COMMENT("neon_reduce_add_integral {");
|
||||
switch(bt) {
|
||||
case T_BYTE:
|
||||
addv(vtmp, isQ ? T16B : T8B, vsrc);
|
||||
smov(dst, vtmp, B, 0);
|
||||
addw(dst, dst, isrc, ext::sxtb);
|
||||
break;
|
||||
case T_SHORT:
|
||||
addv(vtmp, isQ ? T8H : T4H, vsrc);
|
||||
smov(dst, vtmp, H, 0);
|
||||
addw(dst, dst, isrc, ext::sxth);
|
||||
break;
|
||||
case T_INT:
|
||||
isQ ? addv(vtmp, T4S, vsrc) : addpv(vtmp, T2S, vsrc, vsrc);
|
||||
umov(dst, vtmp, S, 0);
|
||||
addw(dst, dst, isrc);
|
||||
break;
|
||||
case T_LONG:
|
||||
assert(isQ, "unsupported");
|
||||
addpd(vtmp, vsrc);
|
||||
umov(dst, vtmp, D, 0);
|
||||
add(dst, dst, isrc);
|
||||
break;
|
||||
default:
|
||||
assert(false, "unsupported");
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
BLOCK_COMMENT("} neon_reduce_add_integral");
|
||||
}
|
||||
|
||||
// Vector reduction multiply for integral type with ASIMD instructions.
|
||||
// Note: temporary registers vtmp1 and vtmp2 are not used in some cases.
|
||||
// Clobbers: rscratch1
|
||||
void C2_MacroAssembler::neon_reduce_mul_integral(Register dst, BasicType bt,
|
||||
Register isrc, FloatRegister vsrc,
|
||||
unsigned vector_length_in_bytes,
|
||||
FloatRegister vtmp1, FloatRegister vtmp2) {
|
||||
assert(vector_length_in_bytes == 8 || vector_length_in_bytes == 16, "unsupported");
|
||||
bool isQ = vector_length_in_bytes == 16;
|
||||
|
||||
BLOCK_COMMENT("neon_reduce_mul_integral {");
|
||||
switch(bt) {
|
||||
case T_BYTE:
|
||||
if (isQ) {
|
||||
// Multiply the lower half and higher half of vector iteratively.
|
||||
// vtmp1 = vsrc[8:15]
|
||||
ins(vtmp1, D, vsrc, 0, 1);
|
||||
// vtmp1[n] = vsrc[n] * vsrc[n + 8], where n=[0, 7]
|
||||
mulv(vtmp1, T8B, vtmp1, vsrc);
|
||||
// vtmp2 = vtmp1[4:7]
|
||||
ins(vtmp2, S, vtmp1, 0, 1);
|
||||
// vtmp1[n] = vtmp1[n] * vtmp1[n + 4], where n=[0, 3]
|
||||
mulv(vtmp1, T8B, vtmp2, vtmp1);
|
||||
} else {
|
||||
ins(vtmp1, S, vsrc, 0, 1);
|
||||
mulv(vtmp1, T8B, vtmp1, vsrc);
|
||||
}
|
||||
// vtmp2 = vtmp1[2:3]
|
||||
ins(vtmp2, H, vtmp1, 0, 1);
|
||||
// vtmp2[n] = vtmp1[n] * vtmp1[n + 2], where n=[0, 1]
|
||||
mulv(vtmp2, T8B, vtmp2, vtmp1);
|
||||
// dst = vtmp2[0] * isrc * vtmp2[1]
|
||||
umov(rscratch1, vtmp2, B, 0);
|
||||
mulw(dst, rscratch1, isrc);
|
||||
sxtb(dst, dst);
|
||||
umov(rscratch1, vtmp2, B, 1);
|
||||
mulw(dst, rscratch1, dst);
|
||||
sxtb(dst, dst);
|
||||
break;
|
||||
case T_SHORT:
|
||||
if (isQ) {
|
||||
ins(vtmp2, D, vsrc, 0, 1);
|
||||
mulv(vtmp2, T4H, vtmp2, vsrc);
|
||||
ins(vtmp1, S, vtmp2, 0, 1);
|
||||
mulv(vtmp1, T4H, vtmp1, vtmp2);
|
||||
} else {
|
||||
ins(vtmp1, S, vsrc, 0, 1);
|
||||
mulv(vtmp1, T4H, vtmp1, vsrc);
|
||||
}
|
||||
umov(rscratch1, vtmp1, H, 0);
|
||||
mulw(dst, rscratch1, isrc);
|
||||
sxth(dst, dst);
|
||||
umov(rscratch1, vtmp1, H, 1);
|
||||
mulw(dst, rscratch1, dst);
|
||||
sxth(dst, dst);
|
||||
break;
|
||||
case T_INT:
|
||||
if (isQ) {
|
||||
ins(vtmp1, D, vsrc, 0, 1);
|
||||
mulv(vtmp1, T2S, vtmp1, vsrc);
|
||||
} else {
|
||||
vtmp1 = vsrc;
|
||||
}
|
||||
umov(rscratch1, vtmp1, S, 0);
|
||||
mul(dst, rscratch1, isrc);
|
||||
umov(rscratch1, vtmp1, S, 1);
|
||||
mul(dst, rscratch1, dst);
|
||||
break;
|
||||
case T_LONG:
|
||||
umov(rscratch1, vsrc, D, 0);
|
||||
mul(dst, isrc, rscratch1);
|
||||
umov(rscratch1, vsrc, D, 1);
|
||||
mul(dst, dst, rscratch1);
|
||||
break;
|
||||
default:
|
||||
assert(false, "unsupported");
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
BLOCK_COMMENT("} neon_reduce_mul_integral");
|
||||
}
|
||||
|
||||
// Vector reduction multiply for floating-point type with ASIMD instructions.
|
||||
void C2_MacroAssembler::neon_reduce_mul_fp(FloatRegister dst, BasicType bt,
|
||||
FloatRegister fsrc, FloatRegister vsrc,
|
||||
unsigned vector_length_in_bytes,
|
||||
FloatRegister vtmp) {
|
||||
assert(vector_length_in_bytes == 8 || vector_length_in_bytes == 16, "unsupported");
|
||||
bool isQ = vector_length_in_bytes == 16;
|
||||
|
||||
BLOCK_COMMENT("neon_reduce_mul_fp {");
|
||||
switch(bt) {
|
||||
case T_FLOAT:
|
||||
fmuls(dst, fsrc, vsrc);
|
||||
ins(vtmp, S, vsrc, 0, 1);
|
||||
fmuls(dst, dst, vtmp);
|
||||
if (isQ) {
|
||||
ins(vtmp, S, vsrc, 0, 2);
|
||||
fmuls(dst, dst, vtmp);
|
||||
ins(vtmp, S, vsrc, 0, 3);
|
||||
fmuls(dst, dst, vtmp);
|
||||
}
|
||||
break;
|
||||
case T_DOUBLE:
|
||||
assert(isQ, "unsupported");
|
||||
fmuld(dst, fsrc, vsrc);
|
||||
ins(vtmp, D, vsrc, 0, 1);
|
||||
fmuld(dst, dst, vtmp);
|
||||
break;
|
||||
default:
|
||||
assert(false, "unsupported");
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
BLOCK_COMMENT("} neon_reduce_mul_fp");
|
||||
}
|
||||
|
||||
// Helper to select logical instruction
|
||||
void C2_MacroAssembler::neon_reduce_logical_helper(int opc, bool is64, Register Rd,
|
||||
Register Rn, Register Rm,
|
||||
enum shift_kind kind, unsigned shift) {
|
||||
switch(opc) {
|
||||
case Op_AndReductionV:
|
||||
is64 ? andr(Rd, Rn, Rm, kind, shift) : andw(Rd, Rn, Rm, kind, shift);
|
||||
break;
|
||||
case Op_OrReductionV:
|
||||
is64 ? orr(Rd, Rn, Rm, kind, shift) : orrw(Rd, Rn, Rm, kind, shift);
|
||||
break;
|
||||
case Op_XorReductionV:
|
||||
is64 ? eor(Rd, Rn, Rm, kind, shift) : eorw(Rd, Rn, Rm, kind, shift);
|
||||
break;
|
||||
default:
|
||||
assert(false, "unsupported");
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
}
|
||||
|
||||
// Vector reduction logical operations And, Or, Xor
|
||||
// Clobbers: rscratch1
|
||||
void C2_MacroAssembler::neon_reduce_logical(int opc, Register dst, BasicType bt,
|
||||
Register isrc, FloatRegister vsrc,
|
||||
unsigned vector_length_in_bytes) {
|
||||
assert(opc == Op_AndReductionV || opc == Op_OrReductionV || opc == Op_XorReductionV,
|
||||
"unsupported");
|
||||
assert(vector_length_in_bytes == 8 || vector_length_in_bytes == 16, "unsupported");
|
||||
assert_different_registers(dst, isrc);
|
||||
bool isQ = vector_length_in_bytes == 16;
|
||||
|
||||
BLOCK_COMMENT("neon_reduce_logical {");
|
||||
umov(rscratch1, vsrc, isQ ? D : S, 0);
|
||||
umov(dst, vsrc, isQ ? D : S, 1);
|
||||
neon_reduce_logical_helper(opc, /* is64 */ true, dst, dst, rscratch1);
|
||||
switch(bt) {
|
||||
case T_BYTE:
|
||||
if (isQ) {
|
||||
neon_reduce_logical_helper(opc, /* is64 */ true, dst, dst, dst, Assembler::LSR, 32);
|
||||
}
|
||||
neon_reduce_logical_helper(opc, /* is64 */ false, dst, dst, dst, Assembler::LSR, 16);
|
||||
neon_reduce_logical_helper(opc, /* is64 */ false, dst, dst, dst, Assembler::LSR, 8);
|
||||
neon_reduce_logical_helper(opc, /* is64 */ false, dst, isrc, dst);
|
||||
sxtb(dst, dst);
|
||||
break;
|
||||
case T_SHORT:
|
||||
if (isQ) {
|
||||
neon_reduce_logical_helper(opc, /* is64 */ true, dst, dst, dst, Assembler::LSR, 32);
|
||||
}
|
||||
neon_reduce_logical_helper(opc, /* is64 */ false, dst, dst, dst, Assembler::LSR, 16);
|
||||
neon_reduce_logical_helper(opc, /* is64 */ false, dst, isrc, dst);
|
||||
sxth(dst, dst);
|
||||
break;
|
||||
case T_INT:
|
||||
if (isQ) {
|
||||
neon_reduce_logical_helper(opc, /* is64 */ true, dst, dst, dst, Assembler::LSR, 32);
|
||||
}
|
||||
neon_reduce_logical_helper(opc, /* is64 */ false, dst, isrc, dst);
|
||||
break;
|
||||
case T_LONG:
|
||||
assert(isQ, "unsupported");
|
||||
neon_reduce_logical_helper(opc, /* is64 */ true, dst, isrc, dst);
|
||||
break;
|
||||
default:
|
||||
assert(false, "unsupported");
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
BLOCK_COMMENT("} neon_reduce_logical");
|
||||
}
|
||||
|
||||
// Vector reduction min/max for integral type with ASIMD instructions.
|
||||
// Note: vtmp is not used and expected to be fnoreg for T_LONG case.
|
||||
// Clobbers: rscratch1, rflags
|
||||
void C2_MacroAssembler::neon_reduce_minmax_integral(int opc, Register dst, BasicType bt,
|
||||
Register isrc, FloatRegister vsrc,
|
||||
unsigned vector_length_in_bytes,
|
||||
FloatRegister vtmp) {
|
||||
assert(opc == Op_MinReductionV || opc == Op_MaxReductionV, "unsupported");
|
||||
assert(vector_length_in_bytes == 8 || vector_length_in_bytes == 16, "unsupported");
|
||||
assert(bt == T_BYTE || bt == T_SHORT || bt == T_INT || bt == T_LONG, "unsupported");
|
||||
assert_different_registers(dst, isrc);
|
||||
bool isQ = vector_length_in_bytes == 16;
|
||||
bool is_min = opc == Op_MinReductionV;
|
||||
|
||||
BLOCK_COMMENT("neon_reduce_minmax_integral {");
|
||||
if (bt == T_LONG) {
|
||||
assert(vtmp == fnoreg, "should be");
|
||||
assert(isQ, "should be");
|
||||
umov(rscratch1, vsrc, D, 0);
|
||||
cmp(isrc, rscratch1);
|
||||
csel(dst, isrc, rscratch1, is_min ? LT : GT);
|
||||
umov(rscratch1, vsrc, D, 1);
|
||||
cmp(dst, rscratch1);
|
||||
csel(dst, dst, rscratch1, is_min ? LT : GT);
|
||||
} else {
|
||||
SIMD_Arrangement size = esize2arrangement((unsigned)type2aelembytes(bt), isQ);
|
||||
if (size == T2S) {
|
||||
is_min ? sminp(vtmp, size, vsrc, vsrc) : smaxp(vtmp, size, vsrc, vsrc);
|
||||
} else {
|
||||
is_min ? sminv(vtmp, size, vsrc) : smaxv(vtmp, size, vsrc);
|
||||
}
|
||||
if (bt == T_INT) {
|
||||
umov(dst, vtmp, S, 0);
|
||||
} else {
|
||||
smov(dst, vtmp, elemType_to_regVariant(bt), 0);
|
||||
}
|
||||
cmpw(dst, isrc);
|
||||
cselw(dst, dst, isrc, is_min ? LT : GT);
|
||||
}
|
||||
BLOCK_COMMENT("} neon_reduce_minmax_integral");
|
||||
}
|
||||
|
||||
// Vector reduction for integral type with SVE instruction.
|
||||
// Supported operations are Add, And, Or, Xor, Max, Min.
|
||||
// rflags would be clobbered if opc is Op_MaxReductionV or Op_MinReductionV.
|
||||
void C2_MacroAssembler::sve_reduce_integral(int opc, Register dst, BasicType bt, Register src1,
|
||||
FloatRegister src2, PRegister pg, FloatRegister tmp) {
|
||||
assert(bt == T_BYTE || bt == T_SHORT || bt == T_INT || bt == T_LONG, "unsupported element type");
|
||||
@@ -1186,12 +1592,14 @@ void C2_MacroAssembler::sve_reduce_integral(int opc, Register dst, BasicType bt,
|
||||
switch (opc) {
|
||||
case Op_AddReductionVI: {
|
||||
sve_uaddv(tmp, size, pg, src2);
|
||||
smov(dst, tmp, size, 0);
|
||||
if (bt == T_BYTE) {
|
||||
smov(dst, tmp, size, 0);
|
||||
addw(dst, src1, dst, ext::sxtb);
|
||||
} else if (bt == T_SHORT) {
|
||||
smov(dst, tmp, size, 0);
|
||||
addw(dst, src1, dst, ext::sxth);
|
||||
} else {
|
||||
umov(dst, tmp, size, 0);
|
||||
addw(dst, dst, src1);
|
||||
}
|
||||
break;
|
||||
@@ -1204,45 +1612,57 @@ void C2_MacroAssembler::sve_reduce_integral(int opc, Register dst, BasicType bt,
|
||||
}
|
||||
case Op_AndReductionV: {
|
||||
sve_andv(tmp, size, pg, src2);
|
||||
if (bt == T_LONG) {
|
||||
if (bt == T_INT || bt == T_LONG) {
|
||||
umov(dst, tmp, size, 0);
|
||||
andr(dst, dst, src1);
|
||||
} else {
|
||||
smov(dst, tmp, size, 0);
|
||||
}
|
||||
if (bt == T_LONG) {
|
||||
andr(dst, dst, src1);
|
||||
} else {
|
||||
andw(dst, dst, src1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Op_OrReductionV: {
|
||||
sve_orv(tmp, size, pg, src2);
|
||||
if (bt == T_LONG) {
|
||||
if (bt == T_INT || bt == T_LONG) {
|
||||
umov(dst, tmp, size, 0);
|
||||
orr(dst, dst, src1);
|
||||
} else {
|
||||
smov(dst, tmp, size, 0);
|
||||
}
|
||||
if (bt == T_LONG) {
|
||||
orr(dst, dst, src1);
|
||||
} else {
|
||||
orrw(dst, dst, src1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Op_XorReductionV: {
|
||||
sve_eorv(tmp, size, pg, src2);
|
||||
if (bt == T_LONG) {
|
||||
if (bt == T_INT || bt == T_LONG) {
|
||||
umov(dst, tmp, size, 0);
|
||||
eor(dst, dst, src1);
|
||||
} else {
|
||||
smov(dst, tmp, size, 0);
|
||||
}
|
||||
if (bt == T_LONG) {
|
||||
eor(dst, dst, src1);
|
||||
} else {
|
||||
eorw(dst, dst, src1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Op_MaxReductionV: {
|
||||
sve_smaxv(tmp, size, pg, src2);
|
||||
if (bt == T_LONG) {
|
||||
if (bt == T_INT || bt == T_LONG) {
|
||||
umov(dst, tmp, size, 0);
|
||||
} else {
|
||||
smov(dst, tmp, size, 0);
|
||||
}
|
||||
if (bt == T_LONG) {
|
||||
cmp(dst, src1);
|
||||
csel(dst, dst, src1, Assembler::GT);
|
||||
} else {
|
||||
smov(dst, tmp, size, 0);
|
||||
cmpw(dst, src1);
|
||||
cselw(dst, dst, src1, Assembler::GT);
|
||||
}
|
||||
@@ -1250,12 +1670,15 @@ void C2_MacroAssembler::sve_reduce_integral(int opc, Register dst, BasicType bt,
|
||||
}
|
||||
case Op_MinReductionV: {
|
||||
sve_sminv(tmp, size, pg, src2);
|
||||
if (bt == T_LONG) {
|
||||
if (bt == T_INT || bt == T_LONG) {
|
||||
umov(dst, tmp, size, 0);
|
||||
} else {
|
||||
smov(dst, tmp, size, 0);
|
||||
}
|
||||
if (bt == T_LONG) {
|
||||
cmp(dst, src1);
|
||||
csel(dst, dst, src1, Assembler::LT);
|
||||
} else {
|
||||
smov(dst, tmp, size, 0);
|
||||
cmpw(dst, src1);
|
||||
cselw(dst, dst, src1, Assembler::LT);
|
||||
}
|
||||
@@ -1275,35 +1698,214 @@ void C2_MacroAssembler::sve_reduce_integral(int opc, Register dst, BasicType bt,
|
||||
}
|
||||
}
|
||||
|
||||
// Set elements of the dst predicate to true if the element number is
|
||||
// in the range of [0, lane_cnt), or to false otherwise.
|
||||
void C2_MacroAssembler::sve_ptrue_lanecnt(PRegister dst, SIMD_RegVariant size, int lane_cnt) {
|
||||
// Set elements of the dst predicate to true for lanes in the range of [0, lane_cnt), or
|
||||
// to false otherwise. The input "lane_cnt" should be smaller than or equal to the supported
|
||||
// max vector length of the basic type. Clobbers: rscratch1 and the rFlagsReg.
|
||||
void C2_MacroAssembler::sve_gen_mask_imm(PRegister dst, BasicType bt, uint32_t lane_cnt) {
|
||||
uint32_t max_vector_length = Matcher::max_vector_size(bt);
|
||||
assert(lane_cnt <= max_vector_length, "unsupported input lane_cnt");
|
||||
|
||||
// Set all elements to false if the input "lane_cnt" is zero.
|
||||
if (lane_cnt == 0) {
|
||||
sve_pfalse(dst);
|
||||
return;
|
||||
}
|
||||
|
||||
SIMD_RegVariant size = elemType_to_regVariant(bt);
|
||||
assert(size != Q, "invalid size");
|
||||
|
||||
// Set all true if "lane_cnt" equals to the max lane count.
|
||||
if (lane_cnt == max_vector_length) {
|
||||
sve_ptrue(dst, size, /* ALL */ 0b11111);
|
||||
return;
|
||||
}
|
||||
|
||||
// Fixed numbers for "ptrue".
|
||||
switch(lane_cnt) {
|
||||
case 1: /* VL1 */
|
||||
case 2: /* VL2 */
|
||||
case 3: /* VL3 */
|
||||
case 4: /* VL4 */
|
||||
case 5: /* VL5 */
|
||||
case 6: /* VL6 */
|
||||
case 7: /* VL7 */
|
||||
case 8: /* VL8 */
|
||||
sve_ptrue(dst, size, lane_cnt);
|
||||
case 1: /* VL1 */
|
||||
case 2: /* VL2 */
|
||||
case 3: /* VL3 */
|
||||
case 4: /* VL4 */
|
||||
case 5: /* VL5 */
|
||||
case 6: /* VL6 */
|
||||
case 7: /* VL7 */
|
||||
case 8: /* VL8 */
|
||||
sve_ptrue(dst, size, lane_cnt);
|
||||
return;
|
||||
case 16:
|
||||
sve_ptrue(dst, size, /* VL16 */ 0b01001);
|
||||
return;
|
||||
case 32:
|
||||
sve_ptrue(dst, size, /* VL32 */ 0b01010);
|
||||
return;
|
||||
case 64:
|
||||
sve_ptrue(dst, size, /* VL64 */ 0b01011);
|
||||
return;
|
||||
case 128:
|
||||
sve_ptrue(dst, size, /* VL128 */ 0b01100);
|
||||
return;
|
||||
case 256:
|
||||
sve_ptrue(dst, size, /* VL256 */ 0b01101);
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Special patterns for "ptrue".
|
||||
if (lane_cnt == round_down_power_of_2(max_vector_length)) {
|
||||
sve_ptrue(dst, size, /* POW2 */ 0b00000);
|
||||
} else if (lane_cnt == max_vector_length - (max_vector_length % 4)) {
|
||||
sve_ptrue(dst, size, /* MUL4 */ 0b11101);
|
||||
} else if (lane_cnt == max_vector_length - (max_vector_length % 3)) {
|
||||
sve_ptrue(dst, size, /* MUL3 */ 0b11110);
|
||||
} else {
|
||||
// Encode to "whilelow" for the remaining cases.
|
||||
mov(rscratch1, lane_cnt);
|
||||
sve_whilelow(dst, size, zr, rscratch1);
|
||||
}
|
||||
}
|
||||
|
||||
// Pack active elements of src, under the control of mask, into the lowest-numbered elements of dst.
|
||||
// Any remaining elements of dst will be filled with zero.
|
||||
// Clobbers: rscratch1
|
||||
// Preserves: src, mask
|
||||
void C2_MacroAssembler::sve_compress_short(FloatRegister dst, FloatRegister src, PRegister mask,
|
||||
FloatRegister vtmp1, FloatRegister vtmp2,
|
||||
PRegister pgtmp) {
|
||||
assert(pgtmp->is_governing(), "This register has to be a governing predicate register");
|
||||
assert_different_registers(dst, src, vtmp1, vtmp2);
|
||||
assert_different_registers(mask, pgtmp);
|
||||
|
||||
// Example input: src = 8888 7777 6666 5555 4444 3333 2222 1111
|
||||
// mask = 0001 0000 0000 0001 0001 0000 0001 0001
|
||||
// Expected result: dst = 0000 0000 0000 8888 5555 4444 2222 1111
|
||||
sve_dup(vtmp2, H, 0);
|
||||
|
||||
// Extend lowest half to type INT.
|
||||
// dst = 00004444 00003333 00002222 00001111
|
||||
sve_uunpklo(dst, S, src);
|
||||
// pgtmp = 00000001 00000000 00000001 00000001
|
||||
sve_punpklo(pgtmp, mask);
|
||||
// Pack the active elements in size of type INT to the right,
|
||||
// and fill the remainings with zero.
|
||||
// dst = 00000000 00004444 00002222 00001111
|
||||
sve_compact(dst, S, dst, pgtmp);
|
||||
// Narrow the result back to type SHORT.
|
||||
// dst = 0000 0000 0000 0000 0000 4444 2222 1111
|
||||
sve_uzp1(dst, H, dst, vtmp2);
|
||||
// Count the active elements of lowest half.
|
||||
// rscratch1 = 3
|
||||
sve_cntp(rscratch1, S, ptrue, pgtmp);
|
||||
|
||||
// Repeat to the highest half.
|
||||
// pgtmp = 00000001 00000000 00000000 00000001
|
||||
sve_punpkhi(pgtmp, mask);
|
||||
// vtmp1 = 00008888 00007777 00006666 00005555
|
||||
sve_uunpkhi(vtmp1, S, src);
|
||||
// vtmp1 = 00000000 00000000 00008888 00005555
|
||||
sve_compact(vtmp1, S, vtmp1, pgtmp);
|
||||
// vtmp1 = 0000 0000 0000 0000 0000 0000 8888 5555
|
||||
sve_uzp1(vtmp1, H, vtmp1, vtmp2);
|
||||
|
||||
// Compressed low: dst = 0000 0000 0000 0000 0000 4444 2222 1111
|
||||
// Compressed high: vtmp1 = 0000 0000 0000 0000 0000 0000 8888 5555
|
||||
// Left shift(cross lane) compressed high with TRUE_CNT lanes,
|
||||
// TRUE_CNT is the number of active elements in the compressed low.
|
||||
neg(rscratch1, rscratch1);
|
||||
// vtmp2 = {4 3 2 1 0 -1 -2 -3}
|
||||
sve_index(vtmp2, H, rscratch1, 1);
|
||||
// vtmp1 = 0000 0000 0000 8888 5555 0000 0000 0000
|
||||
sve_tbl(vtmp1, H, vtmp1, vtmp2);
|
||||
|
||||
// Combine the compressed high(after shifted) with the compressed low.
|
||||
// dst = 0000 0000 0000 8888 5555 4444 2222 1111
|
||||
sve_orr(dst, dst, vtmp1);
|
||||
}
|
||||
|
||||
// Clobbers: rscratch1, rscratch2
|
||||
// Preserves: src, mask
|
||||
void C2_MacroAssembler::sve_compress_byte(FloatRegister dst, FloatRegister src, PRegister mask,
|
||||
FloatRegister vtmp1, FloatRegister vtmp2,
|
||||
FloatRegister vtmp3, FloatRegister vtmp4,
|
||||
PRegister ptmp, PRegister pgtmp) {
|
||||
assert(pgtmp->is_governing(), "This register has to be a governing predicate register");
|
||||
assert_different_registers(dst, src, vtmp1, vtmp2, vtmp3, vtmp4);
|
||||
assert_different_registers(mask, ptmp, pgtmp);
|
||||
// Example input: src = 88 77 66 55 44 33 22 11
|
||||
// mask = 01 00 00 01 01 00 01 01
|
||||
// Expected result: dst = 00 00 00 88 55 44 22 11
|
||||
|
||||
sve_dup(vtmp4, B, 0);
|
||||
// Extend lowest half to type SHORT.
|
||||
// vtmp1 = 0044 0033 0022 0011
|
||||
sve_uunpklo(vtmp1, H, src);
|
||||
// ptmp = 0001 0000 0001 0001
|
||||
sve_punpklo(ptmp, mask);
|
||||
// Count the active elements of lowest half.
|
||||
// rscratch2 = 3
|
||||
sve_cntp(rscratch2, H, ptrue, ptmp);
|
||||
// Pack the active elements in size of type SHORT to the right,
|
||||
// and fill the remainings with zero.
|
||||
// dst = 0000 0044 0022 0011
|
||||
sve_compress_short(dst, vtmp1, ptmp, vtmp2, vtmp3, pgtmp);
|
||||
// Narrow the result back to type BYTE.
|
||||
// dst = 00 00 00 00 00 44 22 11
|
||||
sve_uzp1(dst, B, dst, vtmp4);
|
||||
|
||||
// Repeat to the highest half.
|
||||
// ptmp = 0001 0000 0000 0001
|
||||
sve_punpkhi(ptmp, mask);
|
||||
// vtmp1 = 0088 0077 0066 0055
|
||||
sve_uunpkhi(vtmp2, H, src);
|
||||
// vtmp1 = 0000 0000 0088 0055
|
||||
sve_compress_short(vtmp1, vtmp2, ptmp, vtmp3, vtmp4, pgtmp);
|
||||
|
||||
sve_dup(vtmp4, B, 0);
|
||||
// vtmp1 = 00 00 00 00 00 00 88 55
|
||||
sve_uzp1(vtmp1, B, vtmp1, vtmp4);
|
||||
|
||||
// Compressed low: dst = 00 00 00 00 00 44 22 11
|
||||
// Compressed high: vtmp1 = 00 00 00 00 00 00 88 55
|
||||
// Left shift(cross lane) compressed high with TRUE_CNT lanes,
|
||||
// TRUE_CNT is the number of active elements in the compressed low.
|
||||
neg(rscratch2, rscratch2);
|
||||
// vtmp2 = {4 3 2 1 0 -1 -2 -3}
|
||||
sve_index(vtmp2, B, rscratch2, 1);
|
||||
// vtmp1 = 00 00 00 88 55 00 00 00
|
||||
sve_tbl(vtmp1, B, vtmp1, vtmp2);
|
||||
// Combine the compressed high(after shifted) with the compressed low.
|
||||
// dst = 00 00 00 88 55 44 22 11
|
||||
sve_orr(dst, dst, vtmp1);
|
||||
}
|
||||
|
||||
void C2_MacroAssembler::neon_reverse_bits(FloatRegister dst, FloatRegister src, BasicType bt, bool isQ) {
|
||||
assert(bt == T_BYTE || bt == T_SHORT || bt == T_INT || bt == T_LONG, "unsupported basic type");
|
||||
SIMD_Arrangement size = isQ ? T16B : T8B;
|
||||
if (bt == T_BYTE) {
|
||||
rbit(dst, size, src);
|
||||
} else {
|
||||
neon_reverse_bytes(dst, src, bt, isQ);
|
||||
rbit(dst, size, dst);
|
||||
}
|
||||
}
|
||||
|
||||
void C2_MacroAssembler::neon_reverse_bytes(FloatRegister dst, FloatRegister src, BasicType bt, bool isQ) {
|
||||
assert(bt == T_BYTE || bt == T_SHORT || bt == T_INT || bt == T_LONG, "unsupported basic type");
|
||||
SIMD_Arrangement size = isQ ? T16B : T8B;
|
||||
switch (bt) {
|
||||
case T_BYTE:
|
||||
if (dst != src) {
|
||||
orr(dst, size, src, src);
|
||||
}
|
||||
break;
|
||||
case 16:
|
||||
sve_ptrue(dst, size, /* VL16 */ 0b01001);
|
||||
case T_SHORT:
|
||||
rev16(dst, size, src);
|
||||
break;
|
||||
case 32:
|
||||
sve_ptrue(dst, size, /* VL32 */ 0b01010);
|
||||
case T_INT:
|
||||
rev32(dst, size, src);
|
||||
break;
|
||||
case 64:
|
||||
sve_ptrue(dst, size, /* VL64 */ 0b01011);
|
||||
break;
|
||||
case 128:
|
||||
sve_ptrue(dst, size, /* VL128 */ 0b01100);
|
||||
break;
|
||||
case 256:
|
||||
sve_ptrue(dst, size, /* VL256 */ 0b01101);
|
||||
case T_LONG:
|
||||
rev64(dst, size, src);
|
||||
break;
|
||||
default:
|
||||
assert(false, "unsupported");
|
||||
@@ -1313,23 +1915,32 @@ void C2_MacroAssembler::sve_ptrue_lanecnt(PRegister dst, SIMD_RegVariant size, i
|
||||
|
||||
// Extract a scalar element from an sve vector at position 'idx'.
|
||||
// The input elements in src are expected to be of integral type.
|
||||
void C2_MacroAssembler::sve_extract_integral(Register dst, SIMD_RegVariant size, FloatRegister src, int idx,
|
||||
bool is_signed, FloatRegister vtmp) {
|
||||
assert(UseSVE > 0 && size != Q, "unsupported");
|
||||
assert(!(is_signed && size == D), "signed extract (D) not supported.");
|
||||
void C2_MacroAssembler::sve_extract_integral(Register dst, BasicType bt, FloatRegister src,
|
||||
int idx, FloatRegister vtmp) {
|
||||
assert(bt == T_BYTE || bt == T_SHORT || bt == T_INT || bt == T_LONG, "unsupported element type");
|
||||
Assembler::SIMD_RegVariant size = elemType_to_regVariant(bt);
|
||||
if (regVariant_to_elemBits(size) * idx < 128) { // generate lower cost NEON instruction
|
||||
is_signed ? smov(dst, src, size, idx) : umov(dst, src, size, idx);
|
||||
if (bt == T_INT || bt == T_LONG) {
|
||||
umov(dst, src, size, idx);
|
||||
} else {
|
||||
smov(dst, src, size, idx);
|
||||
}
|
||||
} else {
|
||||
sve_orr(vtmp, src, src);
|
||||
sve_ext(vtmp, vtmp, idx << size);
|
||||
is_signed ? smov(dst, vtmp, size, 0) : umov(dst, vtmp, size, 0);
|
||||
if (bt == T_INT || bt == T_LONG) {
|
||||
umov(dst, vtmp, size, 0);
|
||||
} else {
|
||||
smov(dst, vtmp, size, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// java.lang.Math::round intrinsics
|
||||
|
||||
// Clobbers: rscratch1, rflags
|
||||
void C2_MacroAssembler::vector_round_neon(FloatRegister dst, FloatRegister src, FloatRegister tmp1,
|
||||
FloatRegister tmp2, FloatRegister tmp3, SIMD_Arrangement T) {
|
||||
FloatRegister tmp2, FloatRegister tmp3, SIMD_Arrangement T) {
|
||||
assert_different_registers(tmp1, tmp2, tmp3, src, dst);
|
||||
switch (T) {
|
||||
case T2S:
|
||||
@@ -1360,8 +1971,10 @@ void C2_MacroAssembler::vector_round_neon(FloatRegister dst, FloatRegister src,
|
||||
// result in dst
|
||||
}
|
||||
|
||||
// Clobbers: rscratch1, rflags
|
||||
void C2_MacroAssembler::vector_round_sve(FloatRegister dst, FloatRegister src, FloatRegister tmp1,
|
||||
FloatRegister tmp2, PRegister ptmp, SIMD_RegVariant T) {
|
||||
FloatRegister tmp2, PRegister pgtmp, SIMD_RegVariant T) {
|
||||
assert(pgtmp->is_governing(), "This register has to be a governing predicate register");
|
||||
assert_different_registers(tmp1, tmp2, src, dst);
|
||||
|
||||
switch (T) {
|
||||
@@ -1372,7 +1985,7 @@ void C2_MacroAssembler::vector_round_sve(FloatRegister dst, FloatRegister src, F
|
||||
mov(rscratch1, julong_cast(0x1.0p52));
|
||||
break;
|
||||
default:
|
||||
assert(T == S || T == D, "invalid arrangement");
|
||||
assert(T == S || T == D, "invalid register variant");
|
||||
}
|
||||
|
||||
sve_frinta(dst, T, ptrue, src);
|
||||
@@ -1382,12 +1995,12 @@ void C2_MacroAssembler::vector_round_sve(FloatRegister dst, FloatRegister src, F
|
||||
|
||||
sve_fneg(tmp1, T, ptrue, src);
|
||||
sve_dup(tmp2, T, rscratch1);
|
||||
sve_cmp(HS, ptmp, T, ptrue, tmp2, tmp1);
|
||||
sve_cmp(HS, pgtmp, T, ptrue, tmp2, tmp1);
|
||||
br(EQ, none);
|
||||
{
|
||||
sve_cpy(tmp1, T, ptmp, 0.5);
|
||||
sve_fadd(tmp1, T, ptmp, src);
|
||||
sve_frintm(dst, T, ptmp, tmp1);
|
||||
sve_cpy(tmp1, T, pgtmp, 0.5);
|
||||
sve_fadd(tmp1, T, pgtmp, src);
|
||||
sve_frintm(dst, T, pgtmp, tmp1);
|
||||
// dst = floor(src + 0.5, ties to even)
|
||||
}
|
||||
bind(none);
|
||||
@@ -1395,3 +2008,48 @@ void C2_MacroAssembler::vector_round_sve(FloatRegister dst, FloatRegister src, F
|
||||
sve_fcvtzs(dst, T, ptrue, dst, T);
|
||||
// result in dst
|
||||
}
|
||||
|
||||
void C2_MacroAssembler::vector_signum_neon(FloatRegister dst, FloatRegister src, FloatRegister zero,
|
||||
FloatRegister one, SIMD_Arrangement T) {
|
||||
assert_different_registers(dst, src, zero, one);
|
||||
assert(T == T2S || T == T4S || T == T2D, "invalid arrangement");
|
||||
|
||||
facgt(dst, T, src, zero);
|
||||
ushr(dst, T, dst, 1); // dst=0 for +-0.0 and NaN. 0x7FF..F otherwise
|
||||
bsl(dst, T == T2S ? T8B : T16B, one, src); // Result in dst
|
||||
}
|
||||
|
||||
void C2_MacroAssembler::vector_signum_sve(FloatRegister dst, FloatRegister src, FloatRegister zero,
|
||||
FloatRegister one, FloatRegister vtmp, PRegister pgtmp, SIMD_RegVariant T) {
|
||||
assert_different_registers(dst, src, zero, one, vtmp);
|
||||
assert(pgtmp->is_governing(), "This register has to be a governing predicate register");
|
||||
|
||||
sve_orr(vtmp, src, src);
|
||||
sve_fac(Assembler::GT, pgtmp, T, ptrue, src, zero); // pmtp=0 for +-0.0 and NaN. 0x1 otherwise
|
||||
switch (T) {
|
||||
case S:
|
||||
sve_and(vtmp, T, min_jint); // Extract the sign bit of float value in every lane of src
|
||||
sve_orr(vtmp, T, jint_cast(1.0)); // OR it with +1 to make the final result +1 or -1 depending
|
||||
// on the sign of the float value
|
||||
break;
|
||||
case D:
|
||||
sve_and(vtmp, T, min_jlong);
|
||||
sve_orr(vtmp, T, jlong_cast(1.0));
|
||||
break;
|
||||
default:
|
||||
assert(false, "unsupported");
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
sve_sel(dst, T, pgtmp, vtmp, src); // Select either from src or vtmp based on the predicate register pgtmp
|
||||
// Result in dst
|
||||
}
|
||||
|
||||
bool C2_MacroAssembler::in_scratch_emit_size() {
|
||||
if (ciEnv::current()->task() != NULL) {
|
||||
PhaseOutput* phase_output = Compile::current()->output();
|
||||
if (phase_output != NULL && phase_output->in_scratch_emit_size()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return MacroAssembler::in_scratch_emit_size();
|
||||
}
|
||||
|
||||
@@ -27,7 +27,16 @@
|
||||
|
||||
// C2_MacroAssembler contains high-level macros for C2
|
||||
|
||||
private:
|
||||
// Return true if the phase output is in the scratch emit size mode.
|
||||
virtual bool in_scratch_emit_size() override;
|
||||
|
||||
void neon_reduce_logical_helper(int opc, bool sf, Register Rd, Register Rn, Register Rm,
|
||||
enum shift_kind kind = Assembler::LSL, unsigned shift = 0);
|
||||
|
||||
public:
|
||||
void emit_entry_barrier_stub(C2EntryBarrierStub* stub);
|
||||
static int entry_barrier_stub_size();
|
||||
|
||||
void string_compare(Register str1, Register str2,
|
||||
Register cnt1, Register cnt2, Register result,
|
||||
@@ -64,6 +73,11 @@
|
||||
void sve_vmask_tolong(Register dst, PRegister src, BasicType bt, int lane_cnt,
|
||||
FloatRegister vtmp1, FloatRegister vtmp2);
|
||||
|
||||
// Unpack the mask, a long value in src, into predicate register dst based on the
|
||||
// corresponding data type. Note that dst can support at most 64 lanes.
|
||||
void sve_vmask_fromlong(PRegister dst, Register src, BasicType bt, int lane_cnt,
|
||||
FloatRegister vtmp1, FloatRegister vtmp2);
|
||||
|
||||
// SIMD&FP comparison
|
||||
void neon_compare(FloatRegister dst, BasicType bt, FloatRegister src1,
|
||||
FloatRegister src2, int cond, bool isQ);
|
||||
@@ -73,6 +87,13 @@
|
||||
|
||||
void sve_vmask_lasttrue(Register dst, BasicType bt, PRegister src, PRegister ptmp);
|
||||
|
||||
// Vector cast
|
||||
void neon_vector_extend(FloatRegister dst, BasicType dst_bt, unsigned dst_vlen_in_bytes,
|
||||
FloatRegister src, BasicType src_bt);
|
||||
|
||||
void neon_vector_narrow(FloatRegister dst, BasicType dst_bt,
|
||||
FloatRegister src, BasicType src_bt, unsigned src_vlen_in_bytes);
|
||||
|
||||
void sve_vector_extend(FloatRegister dst, SIMD_RegVariant dst_size,
|
||||
FloatRegister src, SIMD_RegVariant src_size);
|
||||
|
||||
@@ -85,24 +106,70 @@
|
||||
void sve_vmaskcast_narrow(PRegister dst, PRegister src,
|
||||
uint dst_element_length_in_bytes, uint src_element_lenght_in_bytes);
|
||||
|
||||
// Vector reduction
|
||||
void neon_reduce_add_integral(Register dst, BasicType bt,
|
||||
Register isrc, FloatRegister vsrc,
|
||||
unsigned vector_length_in_bytes, FloatRegister vtmp);
|
||||
|
||||
void neon_reduce_mul_integral(Register dst, BasicType bt,
|
||||
Register isrc, FloatRegister vsrc,
|
||||
unsigned vector_length_in_bytes,
|
||||
FloatRegister vtmp1, FloatRegister vtmp2);
|
||||
|
||||
void neon_reduce_mul_fp(FloatRegister dst, BasicType bt,
|
||||
FloatRegister fsrc, FloatRegister vsrc,
|
||||
unsigned vector_length_in_bytes, FloatRegister vtmp);
|
||||
|
||||
void neon_reduce_logical(int opc, Register dst, BasicType bt, Register isrc,
|
||||
FloatRegister vsrc, unsigned vector_length_in_bytes);
|
||||
|
||||
void neon_reduce_minmax_integral(int opc, Register dst, BasicType bt,
|
||||
Register isrc, FloatRegister vsrc,
|
||||
unsigned vector_length_in_bytes, FloatRegister vtmp);
|
||||
|
||||
void sve_reduce_integral(int opc, Register dst, BasicType bt, Register src1,
|
||||
FloatRegister src2, PRegister pg, FloatRegister tmp);
|
||||
|
||||
// Set elements of the dst predicate to true if the element number is
|
||||
// in the range of [0, lane_cnt), or to false otherwise.
|
||||
void sve_ptrue_lanecnt(PRegister dst, SIMD_RegVariant size, int lane_cnt);
|
||||
// Set elements of the dst predicate to true for lanes in the range of
|
||||
// [0, lane_cnt), or to false otherwise. The input "lane_cnt" should be
|
||||
// smaller than or equal to the supported max vector length of the basic
|
||||
// type. Clobbers: rscratch1 and the rFlagsReg.
|
||||
void sve_gen_mask_imm(PRegister dst, BasicType bt, uint32_t lane_cnt);
|
||||
|
||||
// Extract a scalar element from an sve vector at position 'idx'.
|
||||
// The input elements in src are expected to be of integral type.
|
||||
void sve_extract_integral(Register dst, SIMD_RegVariant size, FloatRegister src, int idx,
|
||||
bool is_signed, FloatRegister vtmp);
|
||||
void sve_extract_integral(Register dst, BasicType bt, FloatRegister src,
|
||||
int idx, FloatRegister vtmp);
|
||||
|
||||
// java.lang.Math::round intrinsics
|
||||
void vector_round_neon(FloatRegister dst, FloatRegister src, FloatRegister tmp1,
|
||||
FloatRegister tmp2, FloatRegister tmp3,
|
||||
SIMD_Arrangement T);
|
||||
void vector_round_sve(FloatRegister dst, FloatRegister src, FloatRegister tmp1,
|
||||
FloatRegister tmp2, PRegister ptmp,
|
||||
FloatRegister tmp2, PRegister pgtmp,
|
||||
SIMD_RegVariant T);
|
||||
|
||||
// Pack active elements of src, under the control of mask, into the
|
||||
// lowest-numbered elements of dst. Any remaining elements of dst will
|
||||
// be filled with zero.
|
||||
void sve_compress_byte(FloatRegister dst, FloatRegister src, PRegister mask,
|
||||
FloatRegister vtmp1, FloatRegister vtmp2,
|
||||
FloatRegister vtmp3, FloatRegister vtmp4,
|
||||
PRegister ptmp, PRegister pgtmp);
|
||||
|
||||
void sve_compress_short(FloatRegister dst, FloatRegister src, PRegister mask,
|
||||
FloatRegister vtmp1, FloatRegister vtmp2,
|
||||
PRegister pgtmp);
|
||||
|
||||
void neon_reverse_bits(FloatRegister dst, FloatRegister src, BasicType bt, bool isQ);
|
||||
|
||||
void neon_reverse_bytes(FloatRegister dst, FloatRegister src, BasicType bt, bool isQ);
|
||||
|
||||
// java.lang.Math::signum intrinsics
|
||||
void vector_signum_neon(FloatRegister dst, FloatRegister src, FloatRegister zero,
|
||||
FloatRegister one, SIMD_Arrangement T);
|
||||
|
||||
void vector_signum_sve(FloatRegister dst, FloatRegister src, FloatRegister zero,
|
||||
FloatRegister one, FloatRegister vtmp, PRegister pgtmp, SIMD_RegVariant T);
|
||||
|
||||
#endif // CPU_AARCH64_C2_MACROASSEMBLER_AARCH64_HPP
|
||||
|
||||
81
src/hotspot/cpu/aarch64/codeBuffer_aarch64.cpp
Normal file
81
src/hotspot/cpu/aarch64/codeBuffer_aarch64.cpp
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/codeBuffer.inline.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
|
||||
void CodeBuffer::share_trampoline_for(address dest, int caller_offset) {
|
||||
if (_shared_trampoline_requests == nullptr) {
|
||||
constexpr unsigned init_size = 8;
|
||||
constexpr unsigned max_size = 256;
|
||||
_shared_trampoline_requests = new SharedTrampolineRequests(init_size, max_size);
|
||||
}
|
||||
|
||||
bool created;
|
||||
Offsets* offsets = _shared_trampoline_requests->put_if_absent(dest, &created);
|
||||
if (created) {
|
||||
_shared_trampoline_requests->maybe_grow();
|
||||
}
|
||||
offsets->add(caller_offset);
|
||||
_finalize_stubs = true;
|
||||
}
|
||||
|
||||
static bool emit_shared_trampolines(CodeBuffer* cb, CodeBuffer::SharedTrampolineRequests* requests) {
|
||||
if (requests == nullptr) {
|
||||
return true;
|
||||
}
|
||||
|
||||
MacroAssembler masm(cb);
|
||||
|
||||
bool p_succeeded = true;
|
||||
auto emit = [&](address dest, const CodeBuffer::Offsets &offsets) {
|
||||
masm.set_code_section(cb->stubs());
|
||||
masm.align(wordSize);
|
||||
|
||||
LinkedListIterator<int> it(offsets.head());
|
||||
int offset = *it.next();
|
||||
for (; !it.is_empty(); offset = *it.next()) {
|
||||
masm.relocate(trampoline_stub_Relocation::spec(cb->insts()->start() + offset));
|
||||
}
|
||||
masm.set_code_section(cb->insts());
|
||||
|
||||
address stub = masm.emit_trampoline_stub(offset, dest);
|
||||
if (stub == nullptr) {
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
p_succeeded = false;
|
||||
}
|
||||
|
||||
return p_succeeded;
|
||||
};
|
||||
|
||||
requests->iterate(emit);
|
||||
|
||||
return p_succeeded;
|
||||
}
|
||||
|
||||
bool CodeBuffer::pd_finalize_stubs() {
|
||||
return emit_shared_stubs_to_interp<MacroAssembler>(this, _shared_stub_to_interp_requests)
|
||||
&& emit_shared_trampolines(this, _shared_trampoline_requests);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -28,8 +28,12 @@
|
||||
|
||||
private:
|
||||
void pd_initialize() {}
|
||||
bool pd_finalize_stubs();
|
||||
|
||||
public:
|
||||
void flush_bundle(bool start_new_bundle) {}
|
||||
static constexpr bool supports_shared_stubs() { return true; }
|
||||
|
||||
void share_trampoline_for(address dest, int caller_offset);
|
||||
|
||||
#endif // CPU_AARCH64_CODEBUFFER_AARCH64_HPP
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "runtime/continuationEntry.hpp"
|
||||
|
||||
#include "code/codeCache.hpp"
|
||||
#include "oops/method.inline.hpp"
|
||||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/registerMap.hpp"
|
||||
|
||||
|
||||
@@ -153,6 +153,7 @@ inline void FreezeBase::relativize_interpreted_frame_metadata(const frame& f, co
|
||||
*hf.addr_at(frame::interpreter_frame_locals_offset) = frame::sender_sp_offset + f.interpreter_frame_method()->max_locals() - 1;
|
||||
|
||||
relativize_one(vfp, hfp, frame::interpreter_frame_initial_sp_offset); // == block_top == block_bottom
|
||||
relativize_one(vfp, hfp, frame::interpreter_frame_extended_sp_offset);
|
||||
|
||||
assert((hf.fp() - hf.unextended_sp()) == (f.fp() - f.unextended_sp()), "");
|
||||
assert(hf.unextended_sp() == (intptr_t*)hf.at(frame::interpreter_frame_last_sp_offset), "");
|
||||
@@ -213,7 +214,9 @@ template<typename FKind> frame ThawBase::new_stack_frame(const frame& hf, frame&
|
||||
|
||||
if (FKind::interpreted) {
|
||||
intptr_t* heap_sp = hf.unextended_sp();
|
||||
const int fsize = ContinuationHelper::InterpretedFrame::frame_bottom(hf) - hf.unextended_sp();
|
||||
// If caller is interpreted it already made room for the callee arguments
|
||||
int overlap = caller.is_interpreted_frame() ? ContinuationHelper::InterpretedFrame::stack_argsize(hf) : 0;
|
||||
const int fsize = ContinuationHelper::InterpretedFrame::frame_bottom(hf) - hf.unextended_sp() - overlap;
|
||||
const int locals = hf.interpreter_frame_method()->max_locals();
|
||||
intptr_t* frame_sp = caller.unextended_sp() - fsize;
|
||||
intptr_t* fp = frame_sp + (hf.fp() - heap_sp);
|
||||
@@ -292,6 +295,7 @@ inline void ThawBase::derelativize_interpreted_frame_metadata(const frame& hf, c
|
||||
|
||||
derelativize_one(vfp, frame::interpreter_frame_last_sp_offset);
|
||||
derelativize_one(vfp, frame::interpreter_frame_initial_sp_offset);
|
||||
derelativize_one(vfp, frame::interpreter_frame_extended_sp_offset);
|
||||
}
|
||||
|
||||
inline void ThawBase::set_interpreter_frame_bottom(const frame& f, intptr_t* bottom) {
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "runtime/jniHandles.inline.hpp"
|
||||
#include "oops/typeArrayOop.inline.hpp"
|
||||
#include "oops/oopCast.inline.hpp"
|
||||
#include "opto/matcher.hpp"
|
||||
#include "prims/foreignGlobals.hpp"
|
||||
#include "prims/foreignGlobals.inline.hpp"
|
||||
#include "utilities/formatBuffer.hpp"
|
||||
@@ -91,11 +90,7 @@ int RegSpiller::pd_reg_size(VMReg reg) {
|
||||
if (reg->is_Register()) {
|
||||
return 8;
|
||||
} else if (reg->is_FloatRegister()) {
|
||||
bool use_sve = Matcher::supports_scalable_vector();
|
||||
if (use_sve) {
|
||||
return Matcher::scalable_vector_reg_size(T_BYTE);
|
||||
}
|
||||
return 16;
|
||||
return 16; // Always spill/unspill Q registers
|
||||
}
|
||||
return 0; // stack and BAD
|
||||
}
|
||||
@@ -104,12 +99,7 @@ void RegSpiller::pd_store_reg(MacroAssembler* masm, int offset, VMReg reg) {
|
||||
if (reg->is_Register()) {
|
||||
masm->spill(reg->as_Register(), true, offset);
|
||||
} else if (reg->is_FloatRegister()) {
|
||||
bool use_sve = Matcher::supports_scalable_vector();
|
||||
if (use_sve) {
|
||||
masm->spill_sve_vector(reg->as_FloatRegister(), offset, Matcher::scalable_vector_reg_size(T_BYTE));
|
||||
} else {
|
||||
masm->spill(reg->as_FloatRegister(), masm->Q, offset);
|
||||
}
|
||||
masm->spill(reg->as_FloatRegister(), masm->Q, offset);
|
||||
} else {
|
||||
// stack and BAD
|
||||
}
|
||||
@@ -119,12 +109,7 @@ void RegSpiller::pd_load_reg(MacroAssembler* masm, int offset, VMReg reg) {
|
||||
if (reg->is_Register()) {
|
||||
masm->unspill(reg->as_Register(), true, offset);
|
||||
} else if (reg->is_FloatRegister()) {
|
||||
bool use_sve = Matcher::supports_scalable_vector();
|
||||
if (use_sve) {
|
||||
masm->unspill_sve_vector(reg->as_FloatRegister(), offset, Matcher::scalable_vector_reg_size(T_BYTE));
|
||||
} else {
|
||||
masm->unspill(reg->as_FloatRegister(), masm->Q, offset);
|
||||
}
|
||||
masm->unspill(reg->as_FloatRegister(), masm->Q, offset);
|
||||
} else {
|
||||
// stack and BAD
|
||||
}
|
||||
|
||||
@@ -354,6 +354,11 @@ void frame::interpreter_frame_set_last_sp(intptr_t* sp) {
|
||||
*((intptr_t**)addr_at(interpreter_frame_last_sp_offset)) = sp;
|
||||
}
|
||||
|
||||
// Used by template based interpreter deoptimization
|
||||
void frame::interpreter_frame_set_extended_sp(intptr_t* sp) {
|
||||
*((intptr_t**)addr_at(interpreter_frame_extended_sp_offset)) = sp;
|
||||
}
|
||||
|
||||
frame frame::sender_for_entry_frame(RegisterMap* map) const {
|
||||
assert(map != NULL, "map must be set");
|
||||
// Java frame called from C; skip all C frames and return top C
|
||||
@@ -599,6 +604,7 @@ void frame::describe_pd(FrameValues& values, int frame_no) {
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_last_sp);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_method);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_mdp);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_extended_sp);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_mirror);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_cache);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_locals);
|
||||
@@ -606,13 +612,21 @@ void frame::describe_pd(FrameValues& values, int frame_no) {
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_initial_sp);
|
||||
}
|
||||
|
||||
intptr_t* ret_pc_loc = sp() - return_addr_offset;
|
||||
address ret_pc = *(address*)ret_pc_loc;
|
||||
if (Continuation::is_return_barrier_entry(ret_pc))
|
||||
values.describe(frame_no, ret_pc_loc, "return address (return barrier)");
|
||||
else
|
||||
values.describe(frame_no, ret_pc_loc, err_msg("return address for #%d", frame_no));
|
||||
values.describe(frame_no, sp() - sender_sp_offset, err_msg("saved fp for #%d", frame_no), 0);
|
||||
if (is_java_frame() || Continuation::is_continuation_enterSpecial(*this)) {
|
||||
intptr_t* ret_pc_loc;
|
||||
intptr_t* fp_loc;
|
||||
if (is_interpreted_frame()) {
|
||||
ret_pc_loc = fp() + return_addr_offset;
|
||||
fp_loc = fp();
|
||||
} else {
|
||||
ret_pc_loc = real_fp() - return_addr_offset;
|
||||
fp_loc = real_fp() - sender_sp_offset;
|
||||
}
|
||||
address ret_pc = *(address*)ret_pc_loc;
|
||||
values.describe(frame_no, ret_pc_loc,
|
||||
Continuation::is_return_barrier_entry(ret_pc) ? "return address (return barrier)" : "return address");
|
||||
values.describe(-1, fp_loc, "saved fp", 0); // "unowned" as value belongs to sender
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -662,6 +676,8 @@ void internal_pf(uintptr_t sp, uintptr_t fp, uintptr_t pc, uintptr_t bcx) {
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_last_sp);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_method);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_mdp);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_extended_sp);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_mirror);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_cache);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_locals);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_bcp);
|
||||
@@ -723,9 +739,15 @@ extern "C" void pf(uintptr_t sp, uintptr_t fp, uintptr_t pc,
|
||||
uintptr_t bcx, uintptr_t thread) {
|
||||
if (!reg_map) {
|
||||
reg_map = NEW_C_HEAP_OBJ(RegisterMap, mtInternal);
|
||||
::new (reg_map) RegisterMap((JavaThread*)thread, false);
|
||||
::new (reg_map) RegisterMap((JavaThread*)thread,
|
||||
RegisterMap::UpdateMap::skip,
|
||||
RegisterMap::ProcessFrames::include,
|
||||
RegisterMap::WalkContinuation::skip);
|
||||
} else {
|
||||
*reg_map = RegisterMap((JavaThread*)thread, false);
|
||||
*reg_map = RegisterMap((JavaThread*)thread,
|
||||
RegisterMap::UpdateMap::skip,
|
||||
RegisterMap::ProcessFrames::include,
|
||||
RegisterMap::WalkContinuation::skip);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -764,4 +786,3 @@ void JavaFrameAnchor::make_walkable() {
|
||||
_last_Java_pc = (address)_last_Java_sp[-1];
|
||||
vmassert(walkable(), "something went wrong");
|
||||
}
|
||||
|
||||
|
||||
@@ -26,8 +26,6 @@
|
||||
#ifndef CPU_AARCH64_FRAME_AARCH64_HPP
|
||||
#define CPU_AARCH64_FRAME_AARCH64_HPP
|
||||
|
||||
#include "runtime/synchronizer.hpp"
|
||||
|
||||
// A frame represents a physical stack frame (an activation). Frames can be
|
||||
// C or Java frames, and the Java frames can be interpreted or compiled.
|
||||
// In contrast, vframes represent source-level activations, so that one physical frame
|
||||
@@ -47,13 +45,13 @@
|
||||
// [constant pool cache ] = cache() cache_offset
|
||||
|
||||
// [klass of method ] = mirror() mirror_offset
|
||||
// [padding ]
|
||||
// [extended SP ] extended_sp offset
|
||||
|
||||
// [methodData ] = mdp() mdx_offset
|
||||
// [Method ] = method() method_offset
|
||||
|
||||
// [last esp ] = last_sp() last_sp_offset
|
||||
// [old stack pointer ] (sender_sp) sender_sp_offset
|
||||
// [sender's SP ] (sender_sp) sender_sp_offset
|
||||
|
||||
// [old frame pointer ] <- fp = link()
|
||||
// [return pc ]
|
||||
@@ -82,8 +80,8 @@
|
||||
interpreter_frame_last_sp_offset = interpreter_frame_sender_sp_offset - 1,
|
||||
interpreter_frame_method_offset = interpreter_frame_last_sp_offset - 1,
|
||||
interpreter_frame_mdp_offset = interpreter_frame_method_offset - 1,
|
||||
interpreter_frame_padding_offset = interpreter_frame_mdp_offset - 1,
|
||||
interpreter_frame_mirror_offset = interpreter_frame_padding_offset - 1,
|
||||
interpreter_frame_extended_sp_offset = interpreter_frame_mdp_offset - 1,
|
||||
interpreter_frame_mirror_offset = interpreter_frame_extended_sp_offset - 1,
|
||||
interpreter_frame_cache_offset = interpreter_frame_mirror_offset - 1,
|
||||
interpreter_frame_locals_offset = interpreter_frame_cache_offset - 1,
|
||||
interpreter_frame_bcp_offset = interpreter_frame_locals_offset - 1,
|
||||
@@ -182,6 +180,8 @@
|
||||
// expression stack tos if we are nested in a java call
|
||||
intptr_t* interpreter_frame_last_sp() const;
|
||||
|
||||
void interpreter_frame_set_extended_sp(intptr_t* sp);
|
||||
|
||||
template <typename RegisterMapT>
|
||||
static void update_map_with_saved_link(RegisterMapT* map, intptr_t** link_addr);
|
||||
|
||||
|
||||
@@ -336,19 +336,13 @@ inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
|
||||
// Compiled frames
|
||||
|
||||
inline oop frame::saved_oop_result(RegisterMap* map) const {
|
||||
PRAGMA_DIAG_PUSH
|
||||
PRAGMA_NONNULL_IGNORED
|
||||
oop* result_adr = (oop *)map->location(r0->as_VMReg(), sp());
|
||||
PRAGMA_DIAG_POP
|
||||
guarantee(result_adr != NULL, "bad register save location");
|
||||
return *result_adr;
|
||||
}
|
||||
|
||||
inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
|
||||
PRAGMA_DIAG_PUSH
|
||||
PRAGMA_NONNULL_IGNORED
|
||||
oop* result_adr = (oop *)map->location(r0->as_VMReg(), sp());
|
||||
PRAGMA_DIAG_POP
|
||||
guarantee(result_adr != NULL, "bad register save location");
|
||||
|
||||
*result_adr = obj;
|
||||
@@ -444,7 +438,7 @@ inline frame frame::sender_for_compiled_frame(RegisterMap* map) const {
|
||||
assert(oop_map() == NULL || !oop_map()->has_any(OopMapValue::callee_saved_value), "callee-saved value in compiled frame");
|
||||
}
|
||||
|
||||
// Since the prolog does the save and restore of EBP there is no oopmap
|
||||
// Since the prolog does the save and restore of FP there is no oopmap
|
||||
// for it so we must fill in its location as if there was an oopmap entry
|
||||
// since if our caller was compiled code there could be live jvm state in it.
|
||||
update_map_with_saved_link(map, saved_fp_addr);
|
||||
@@ -464,14 +458,11 @@ inline frame frame::sender_for_compiled_frame(RegisterMap* map) const {
|
||||
|
||||
template <typename RegisterMapT>
|
||||
void frame::update_map_with_saved_link(RegisterMapT* map, intptr_t** link_addr) {
|
||||
// The interpreter and compiler(s) always save EBP/RBP in a known
|
||||
// location on entry. We must record where that location is
|
||||
// so this if EBP/RBP was live on callout from c2 we can find
|
||||
// the saved copy no matter what it called.
|
||||
// The interpreter and compiler(s) always save FP in a known
|
||||
// location on entry. C2-compiled code uses FP as an allocatable
|
||||
// callee-saved register. We must record where that location is so
|
||||
// that if FP was live on callout from c2 we can find the saved copy.
|
||||
|
||||
// Since the interpreter always saves EBP/RBP if we record where it is then
|
||||
// we don't have to always save EBP/RBP on entry and exit to c2 compiled
|
||||
// code, on entry will be enough.
|
||||
map->set_location(rfp->as_VMReg(), (address) link_addr);
|
||||
// this is weird "H" ought to be at a higher address however the
|
||||
// oopMaps seems to have the "H" regs at the same address and the
|
||||
|
||||
@@ -31,9 +31,8 @@
|
||||
#include "gc/g1/g1ThreadLocalData.hpp"
|
||||
#include "gc/g1/heapRegion.hpp"
|
||||
#include "gc/shared/collectedHeap.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/thread.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "runtime/javaThread.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#ifdef COMPILER1
|
||||
#include "c1/c1_LIRAssembler.hpp"
|
||||
@@ -162,7 +161,7 @@ void G1BarrierSetAssembler::g1_write_barrier_pre(MacroAssembler* masm,
|
||||
// that checks that the *(rfp+frame::interpreter_frame_last_sp) == NULL.
|
||||
//
|
||||
// If we care generating the pre-barrier without a frame (e.g. in the
|
||||
// intrinsified Reference.get() routine) then ebp might be pointing to
|
||||
// intrinsified Reference.get() routine) then rfp might be pointing to
|
||||
// the caller frame and so this check will most likely fail at runtime.
|
||||
//
|
||||
// Expanding the call directly bypasses the generation of the check.
|
||||
@@ -381,15 +380,6 @@ void G1BarrierSetAssembler::generate_c1_pre_barrier_runtime_stub(StubAssembler*
|
||||
Label done;
|
||||
Label runtime;
|
||||
|
||||
// Is marking still active?
|
||||
if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
|
||||
__ ldrw(tmp, in_progress);
|
||||
} else {
|
||||
assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption");
|
||||
__ ldrb(tmp, in_progress);
|
||||
}
|
||||
__ cbzw(tmp, done);
|
||||
|
||||
// Can we store original value in the thread's buffer?
|
||||
__ ldr(tmp, queue_index);
|
||||
__ cbz(tmp, runtime);
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
#include "gc/shared/collectedHeap.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "runtime/javaThread.hpp"
|
||||
#include "runtime/jniHandles.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "runtime/thread.hpp"
|
||||
|
||||
|
||||
#define __ masm->
|
||||
@@ -160,63 +160,6 @@ void BarrierSetAssembler::tlab_allocate(MacroAssembler* masm, Register obj,
|
||||
// verify_tlab();
|
||||
}
|
||||
|
||||
// Defines obj, preserves var_size_in_bytes
|
||||
void BarrierSetAssembler::eden_allocate(MacroAssembler* masm, Register obj,
|
||||
Register var_size_in_bytes,
|
||||
int con_size_in_bytes,
|
||||
Register t1,
|
||||
Label& slow_case) {
|
||||
assert_different_registers(obj, var_size_in_bytes, t1);
|
||||
if (!Universe::heap()->supports_inline_contig_alloc()) {
|
||||
__ b(slow_case);
|
||||
} else {
|
||||
Register end = t1;
|
||||
Register heap_end = rscratch2;
|
||||
Label retry;
|
||||
__ bind(retry);
|
||||
{
|
||||
uint64_t offset;
|
||||
__ adrp(rscratch1, ExternalAddress((address) Universe::heap()->end_addr()), offset);
|
||||
__ ldr(heap_end, Address(rscratch1, offset));
|
||||
}
|
||||
|
||||
ExternalAddress heap_top((address) Universe::heap()->top_addr());
|
||||
|
||||
// Get the current top of the heap
|
||||
{
|
||||
uint64_t offset;
|
||||
__ adrp(rscratch1, heap_top, offset);
|
||||
// Use add() here after ARDP, rather than lea().
|
||||
// lea() does not generate anything if its offset is zero.
|
||||
// However, relocs expect to find either an ADD or a load/store
|
||||
// insn after an ADRP. add() always generates an ADD insn, even
|
||||
// for add(Rn, Rn, 0).
|
||||
__ add(rscratch1, rscratch1, offset);
|
||||
__ ldaxr(obj, rscratch1);
|
||||
}
|
||||
|
||||
// Adjust it my the size of our new object
|
||||
if (var_size_in_bytes == noreg) {
|
||||
__ lea(end, Address(obj, con_size_in_bytes));
|
||||
} else {
|
||||
__ lea(end, Address(obj, var_size_in_bytes));
|
||||
}
|
||||
|
||||
// if end < obj then we wrapped around high memory
|
||||
__ cmp(end, obj);
|
||||
__ br(Assembler::LO, slow_case);
|
||||
|
||||
__ cmp(end, heap_end);
|
||||
__ br(Assembler::HI, slow_case);
|
||||
|
||||
// If heap_top hasn't been changed by some other thread, update it.
|
||||
__ stlxr(rscratch2, end, rscratch1);
|
||||
__ cbnzw(rscratch2, retry);
|
||||
|
||||
incr_allocated_bytes(masm, var_size_in_bytes, con_size_in_bytes, t1);
|
||||
}
|
||||
}
|
||||
|
||||
void BarrierSetAssembler::incr_allocated_bytes(MacroAssembler* masm,
|
||||
Register var_size_in_bytes,
|
||||
int con_size_in_bytes,
|
||||
@@ -246,18 +189,38 @@ void BarrierSetAssembler::clear_patching_epoch() {
|
||||
_patching_epoch = 0;
|
||||
}
|
||||
|
||||
void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm) {
|
||||
void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm, Label* slow_path, Label* continuation, Label* guard) {
|
||||
BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
|
||||
|
||||
if (bs_nm == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
Label skip_barrier, guard;
|
||||
Label local_guard;
|
||||
Label skip_barrier;
|
||||
NMethodPatchingType patching_type = nmethod_patching_type();
|
||||
|
||||
__ ldrw(rscratch1, guard);
|
||||
if (slow_path == NULL) {
|
||||
guard = &local_guard;
|
||||
}
|
||||
|
||||
if (nmethod_code_patching()) {
|
||||
// If the slow path is out of line in a stub, we flip the condition
|
||||
Assembler::Condition condition = slow_path == NULL ? Assembler::EQ : Assembler::NE;
|
||||
Label& barrier_target = slow_path == NULL ? skip_barrier : *slow_path;
|
||||
|
||||
__ ldrw(rscratch1, *guard);
|
||||
|
||||
if (patching_type == NMethodPatchingType::stw_instruction_and_data_patch) {
|
||||
// With STW patching, no data or instructions are updated concurrently,
|
||||
// which means there isn't really any need for any fencing for neither
|
||||
// data nor instruction modifications happening concurrently. The
|
||||
// instruction patching is handled with isb fences on the way back
|
||||
// from the safepoint to Java. So here we can do a plain conditional
|
||||
// branch with no fencing.
|
||||
Address thread_disarmed_addr(rthread, in_bytes(bs_nm->thread_disarmed_offset()));
|
||||
__ ldrw(rscratch2, thread_disarmed_addr);
|
||||
__ cmp(rscratch1, rscratch2);
|
||||
} else if (patching_type == NMethodPatchingType::conc_instruction_and_data_patch) {
|
||||
// If we patch code we need both a code patching and a loadload
|
||||
// fence. It's not super cheap, so we use a global epoch mechanism
|
||||
// to hide them in a slow path.
|
||||
@@ -278,24 +241,28 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm) {
|
||||
Address thread_disarmed_and_epoch_addr(rthread, in_bytes(bs_nm->thread_disarmed_offset()));
|
||||
__ ldr(rscratch2, thread_disarmed_and_epoch_addr);
|
||||
__ cmp(rscratch1, rscratch2);
|
||||
__ br(Assembler::EQ, skip_barrier);
|
||||
} else {
|
||||
assert(patching_type == NMethodPatchingType::conc_data_patch, "must be");
|
||||
// Subsequent loads of oops must occur after load of guard value.
|
||||
// BarrierSetNMethod::disarm sets guard with release semantics.
|
||||
__ membar(__ LoadLoad);
|
||||
Address thread_disarmed_addr(rthread, in_bytes(bs_nm->thread_disarmed_offset()));
|
||||
__ ldrw(rscratch2, thread_disarmed_addr);
|
||||
__ cmpw(rscratch1, rscratch2);
|
||||
__ br(Assembler::EQ, skip_barrier);
|
||||
}
|
||||
__ br(condition, barrier_target);
|
||||
|
||||
__ movptr(rscratch1, (uintptr_t) StubRoutines::aarch64::method_entry_barrier());
|
||||
__ blr(rscratch1);
|
||||
__ b(skip_barrier);
|
||||
if (slow_path == NULL) {
|
||||
__ movptr(rscratch1, (uintptr_t) StubRoutines::aarch64::method_entry_barrier());
|
||||
__ blr(rscratch1);
|
||||
__ b(skip_barrier);
|
||||
|
||||
__ bind(guard);
|
||||
__ bind(local_guard);
|
||||
|
||||
__ emit_int32(0); // nmethod guard value. Skipped over in common case.
|
||||
__ emit_int32(0); // nmethod guard value. Skipped over in common case.
|
||||
} else {
|
||||
__ bind(*continuation);
|
||||
}
|
||||
|
||||
__ bind(skip_barrier);
|
||||
}
|
||||
|
||||
@@ -31,6 +31,12 @@
|
||||
#include "memory/allocation.hpp"
|
||||
#include "oops/access.hpp"
|
||||
|
||||
enum class NMethodPatchingType {
|
||||
stw_instruction_and_data_patch,
|
||||
conc_instruction_and_data_patch,
|
||||
conc_data_patch
|
||||
};
|
||||
|
||||
class BarrierSetAssembler: public CHeapObj<mtGC> {
|
||||
private:
|
||||
void incr_allocated_bytes(MacroAssembler* masm,
|
||||
@@ -59,18 +65,11 @@ public:
|
||||
Label& slow_case // continuation point if fast allocation fails
|
||||
);
|
||||
|
||||
void eden_allocate(MacroAssembler* masm,
|
||||
Register obj, // result: pointer to object after successful allocation
|
||||
Register var_size_in_bytes, // object size in bytes if unknown at compile time; invalid otherwise
|
||||
int con_size_in_bytes, // object size in bytes if known at compile time
|
||||
Register t1, // temp register
|
||||
Label& slow_case // continuation point if fast allocation fails
|
||||
);
|
||||
virtual void barrier_stubs_init() {}
|
||||
|
||||
virtual bool nmethod_code_patching() { return true; }
|
||||
virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::stw_instruction_and_data_patch; }
|
||||
|
||||
virtual void nmethod_entry_barrier(MacroAssembler* masm);
|
||||
virtual void nmethod_entry_barrier(MacroAssembler* masm, Label* slow_path, Label* continuation, Label* guard);
|
||||
virtual void c2i_entry_barrier(MacroAssembler* masm);
|
||||
|
||||
static address patching_epoch_addr();
|
||||
|
||||
@@ -31,35 +31,68 @@
|
||||
#include "logging/log.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/javaThread.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/registerMap.hpp"
|
||||
#include "runtime/thread.hpp"
|
||||
#include "utilities/align.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
|
||||
static int slow_path_size(nmethod* nm) {
|
||||
// The slow path code is out of line with C2
|
||||
return nm->is_compiled_by_c2() ? 0 : 6;
|
||||
}
|
||||
|
||||
// This is the offset of the entry barrier from where the frame is completed.
|
||||
// If any code changes between the end of the verified entry where the entry
|
||||
// barrier resides, and the completion of the frame, then
|
||||
// NativeNMethodCmpBarrier::verify() will immediately complain when it does
|
||||
// not find the expected native instruction at this offset, which needs updating.
|
||||
// Note that this offset is invariant of PreserveFramePointer.
|
||||
static int entry_barrier_offset(nmethod* nm) {
|
||||
BarrierSetAssembler* bs_asm = BarrierSet::barrier_set()->barrier_set_assembler();
|
||||
switch (bs_asm->nmethod_patching_type()) {
|
||||
case NMethodPatchingType::stw_instruction_and_data_patch:
|
||||
return -4 * (4 + slow_path_size(nm));
|
||||
case NMethodPatchingType::conc_instruction_and_data_patch:
|
||||
return -4 * (10 + slow_path_size(nm));
|
||||
case NMethodPatchingType::conc_data_patch:
|
||||
return -4 * (5 + slow_path_size(nm));
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
return 0;
|
||||
}
|
||||
|
||||
class NativeNMethodBarrier: public NativeInstruction {
|
||||
address instruction_address() const { return addr_at(0); }
|
||||
|
||||
int guard_offset() {
|
||||
BarrierSetAssembler* bs_asm = BarrierSet::barrier_set()->barrier_set_assembler();
|
||||
if (bs_asm->nmethod_code_patching()) {
|
||||
return 4 * 15;
|
||||
} else {
|
||||
return 4 * 10;
|
||||
}
|
||||
int local_guard_offset(nmethod* nm) {
|
||||
// It's the last instruction
|
||||
return (-entry_barrier_offset(nm)) - 4;
|
||||
}
|
||||
|
||||
int *guard_addr() {
|
||||
return reinterpret_cast<int*>(instruction_address() + guard_offset());
|
||||
int *guard_addr(nmethod* nm) {
|
||||
if (nm->is_compiled_by_c2()) {
|
||||
// With c2 compiled code, the guard is out-of-line in a stub
|
||||
// We find it using the RelocIterator.
|
||||
RelocIterator iter(nm);
|
||||
while (iter.next()) {
|
||||
if (iter.type() == relocInfo::entry_guard_type) {
|
||||
entry_guard_Relocation* const reloc = iter.entry_guard_reloc();
|
||||
return reinterpret_cast<int*>(reloc->addr());
|
||||
}
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
return reinterpret_cast<int*>(instruction_address() + local_guard_offset(nm));
|
||||
}
|
||||
|
||||
public:
|
||||
int get_value() {
|
||||
return Atomic::load_acquire(guard_addr());
|
||||
int get_value(nmethod* nm) {
|
||||
return Atomic::load_acquire(guard_addr(nm));
|
||||
}
|
||||
|
||||
void set_value(int value) {
|
||||
Atomic::release_store(guard_addr(), value);
|
||||
void set_value(nmethod* nm, int value) {
|
||||
Atomic::release_store(guard_addr(nm), value);
|
||||
}
|
||||
|
||||
void verify() const;
|
||||
@@ -98,7 +131,10 @@ void BarrierSetNMethod::deoptimize(nmethod* nm, address* return_address_ptr) {
|
||||
frame_pointers_t *new_frame = (frame_pointers_t *)(return_address_ptr - 5);
|
||||
|
||||
JavaThread *thread = JavaThread::current();
|
||||
RegisterMap reg_map(thread, false);
|
||||
RegisterMap reg_map(thread,
|
||||
RegisterMap::UpdateMap::skip,
|
||||
RegisterMap::ProcessFrames::include,
|
||||
RegisterMap::WalkContinuation::skip);
|
||||
frame frame = thread->last_frame();
|
||||
|
||||
assert(frame.is_compiled_frame() || frame.is_native_frame(), "must be");
|
||||
@@ -120,24 +156,8 @@ void BarrierSetNMethod::deoptimize(nmethod* nm, address* return_address_ptr) {
|
||||
new_frame->pc = SharedRuntime::get_handle_wrong_method_stub();
|
||||
}
|
||||
|
||||
// This is the offset of the entry barrier from where the frame is completed.
|
||||
// If any code changes between the end of the verified entry where the entry
|
||||
// barrier resides, and the completion of the frame, then
|
||||
// NativeNMethodCmpBarrier::verify() will immediately complain when it does
|
||||
// not find the expected native instruction at this offset, which needs updating.
|
||||
// Note that this offset is invariant of PreserveFramePointer.
|
||||
|
||||
static int entry_barrier_offset() {
|
||||
BarrierSetAssembler* bs_asm = BarrierSet::barrier_set()->barrier_set_assembler();
|
||||
if (bs_asm->nmethod_code_patching()) {
|
||||
return -4 * 16;
|
||||
} else {
|
||||
return -4 * 11;
|
||||
}
|
||||
}
|
||||
|
||||
static NativeNMethodBarrier* native_nmethod_barrier(nmethod* nm) {
|
||||
address barrier_address = nm->code_begin() + nm->frame_complete_offset() + entry_barrier_offset();
|
||||
address barrier_address = nm->code_begin() + nm->frame_complete_offset() + entry_barrier_offset(nm);
|
||||
NativeNMethodBarrier* barrier = reinterpret_cast<NativeNMethodBarrier*>(barrier_address);
|
||||
debug_only(barrier->verify());
|
||||
return barrier;
|
||||
@@ -160,7 +180,7 @@ void BarrierSetNMethod::disarm(nmethod* nm) {
|
||||
// Disarms the nmethod guard emitted by BarrierSetAssembler::nmethod_entry_barrier.
|
||||
// Symmetric "LDR; DMB ISHLD" is in the nmethod barrier.
|
||||
NativeNMethodBarrier* barrier = native_nmethod_barrier(nm);
|
||||
barrier->set_value(disarmed_value());
|
||||
barrier->set_value(nm, disarmed_value());
|
||||
}
|
||||
|
||||
void BarrierSetNMethod::arm(nmethod* nm, int arm_value) {
|
||||
@@ -180,7 +200,7 @@ void BarrierSetNMethod::arm(nmethod* nm, int arm_value) {
|
||||
}
|
||||
|
||||
NativeNMethodBarrier* barrier = native_nmethod_barrier(nm);
|
||||
barrier->set_value(arm_value);
|
||||
barrier->set_value(nm, arm_value);
|
||||
}
|
||||
|
||||
bool BarrierSetNMethod::is_armed(nmethod* nm) {
|
||||
@@ -189,5 +209,5 @@ bool BarrierSetNMethod::is_armed(nmethod* nm) {
|
||||
}
|
||||
|
||||
NativeNMethodBarrier* barrier = native_nmethod_barrier(nm);
|
||||
return barrier->get_value() != disarmed_value();
|
||||
return barrier->get_value(nm) != disarmed_value();
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user