mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-08 18:39:40 +01:00
Compare commits
1384 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef906c89ce | ||
|
|
97a6b4b6e8 | ||
|
|
b5abced08b | ||
|
|
59726118ff | ||
|
|
9425da39e5 | ||
|
|
38c494e569 | ||
|
|
77a4ce5569 | ||
|
|
6750549bb0 | ||
|
|
950ddf6143 | ||
|
|
8ce6a3fbf9 | ||
|
|
356fb57e35 | ||
|
|
4fa873392e | ||
|
|
d9b7356004 | ||
|
|
f75bc2e199 | ||
|
|
eb80cad549 | ||
|
|
713c85dda8 | ||
|
|
93a052bab3 | ||
|
|
2414951dd3 | ||
|
|
050eb5168e | ||
|
|
b72b8e194e | ||
|
|
b74c7b3808 | ||
|
|
7cd6e230ea | ||
|
|
8911e12adf | ||
|
|
ae06986c80 | ||
|
|
7ba83041b1 | ||
|
|
171e39a058 | ||
|
|
d0a89bf0ce | ||
|
|
86b46f2113 | ||
|
|
94d3e22c87 | ||
|
|
2907a0c10f | ||
|
|
d053ad2a28 | ||
|
|
918f015f18 | ||
|
|
9a87fa5db9 | ||
|
|
89d052603d | ||
|
|
236fc341a2 | ||
|
|
154d04e929 | ||
|
|
b3c7ed26d3 | ||
|
|
421567fdaa | ||
|
|
511a59c696 | ||
|
|
828d2063d2 | ||
|
|
5f0d1aff63 | ||
|
|
25414e9507 | ||
|
|
64e10ad1ad | ||
|
|
4bd5ee8bdb | ||
|
|
80de74d575 | ||
|
|
12898a0d25 | ||
|
|
568e4e56e0 | ||
|
|
8a530c580d | ||
|
|
75c48b0d1b | ||
|
|
bed477d90d | ||
|
|
0c10a5d7eb | ||
|
|
6c2dcf473c | ||
|
|
05154fcb04 | ||
|
|
a894ac0ae7 | ||
|
|
f0dc1b9881 | ||
|
|
7d55c30765 | ||
|
|
1c11f83e92 | ||
|
|
16753c9198 | ||
|
|
dd65c08868 | ||
|
|
0b803c8b53 | ||
|
|
0a22e173d6 | ||
|
|
3d2f01879c | ||
|
|
8cbe3d2743 | ||
|
|
be76fc517f | ||
|
|
8261ee6da3 | ||
|
|
9c1e33d08c | ||
|
|
77fb006441 | ||
|
|
7d50a99bd8 | ||
|
|
c430497460 | ||
|
|
b975e9076b | ||
|
|
ad5c81704c | ||
|
|
f62e421be4 | ||
|
|
e7187d14db | ||
|
|
404d7476b9 | ||
|
|
b390a90275 | ||
|
|
28e7395a79 | ||
|
|
7c037a69a2 | ||
|
|
caab605a3c | ||
|
|
30e0acc2eb | ||
|
|
ad2d6c7304 | ||
|
|
78bc845d66 | ||
|
|
15c1ac891b | ||
|
|
5defb71047 | ||
|
|
922add969a | ||
|
|
5e32cc4aa1 | ||
|
|
9666b7da3f | ||
|
|
18c668e87a | ||
|
|
fe3ab5fb83 | ||
|
|
902594c3e6 | ||
|
|
4f99e62a5c | ||
|
|
167e25a35a | ||
|
|
9dfb5d8720 | ||
|
|
ee4833d707 | ||
|
|
a6b48817ff | ||
|
|
8ecb1333e7 | ||
|
|
5426c55692 | ||
|
|
faaa074af7 | ||
|
|
156097f517 | ||
|
|
35d6f09bb4 | ||
|
|
b8790e0e70 | ||
|
|
5ebc8f4779 | ||
|
|
1faf4f7e32 | ||
|
|
ce594a00c5 | ||
|
|
b2bf35c6d8 | ||
|
|
924beaaf2c | ||
|
|
90cbbab800 | ||
|
|
04266857c4 | ||
|
|
91c5b72633 | ||
|
|
5229273660 | ||
|
|
57c273a689 | ||
|
|
ab4646a034 | ||
|
|
b94c2e86de | ||
|
|
81ecd2932e | ||
|
|
eedb7e6e6d | ||
|
|
594390779b | ||
|
|
4374464e64 | ||
|
|
160ee581b2 | ||
|
|
1113ececbf | ||
|
|
57b4c14b54 | ||
|
|
c7ff8ac152 | ||
|
|
737b863ce4 | ||
|
|
f3236a879e | ||
|
|
0960629d28 | ||
|
|
9ae41399f1 | ||
|
|
817e260afc | ||
|
|
86b53b9dd7 | ||
|
|
528aec3f18 | ||
|
|
f21ded8eea | ||
|
|
0bd26c4c5b | ||
|
|
0eab6d54ad | ||
|
|
14d7f14432 | ||
|
|
c2043f5ac9 | ||
|
|
ae0385ccc0 | ||
|
|
ae5f0fafc4 | ||
|
|
02472faab5 | ||
|
|
aaac35b3d7 | ||
|
|
c26ee9d321 | ||
|
|
3b1ccee969 | ||
|
|
50efb858e0 | ||
|
|
899bcf76ae | ||
|
|
bed9464bce | ||
|
|
98d3004bd9 | ||
|
|
1a74b23a2f | ||
|
|
c84424d4af | ||
|
|
8936d472bd | ||
|
|
fe92862089 | ||
|
|
2ff5bb1c92 | ||
|
|
f85789e68a | ||
|
|
c444c1faea | ||
|
|
96dbc17346 | ||
|
|
73094fada5 | ||
|
|
b8b9434a9f | ||
|
|
3e1c15cc0a | ||
|
|
7a31c1d5f3 | ||
|
|
b799a85392 | ||
|
|
60f0c3f6fc | ||
|
|
410fa3840e | ||
|
|
b08ac437b7 | ||
|
|
fbc01baf4a | ||
|
|
4e3d30888f | ||
|
|
4b358696a6 | ||
|
|
9946dda799 | ||
|
|
5a8e8cf6b4 | ||
|
|
1a03134bc8 | ||
|
|
53ae53637d | ||
|
|
b70f9bfef4 | ||
|
|
d56a0e26bf | ||
|
|
11cd94d40b | ||
|
|
7b43f3402c | ||
|
|
88ec03b622 | ||
|
|
e3f64880d0 | ||
|
|
9ff6dfb849 | ||
|
|
1d1641be2f | ||
|
|
78a1d5e64b | ||
|
|
2f3d1da4f6 | ||
|
|
2d47fd6658 | ||
|
|
bfe250c236 | ||
|
|
345e7e8175 | ||
|
|
99fa0d1e99 | ||
|
|
1d468be4b1 | ||
|
|
b56b3bc9aa | ||
|
|
301152ddb7 | ||
|
|
48fbf1ca88 | ||
|
|
8c52b75d0f | ||
|
|
8bb4f96911 | ||
|
|
656949d014 | ||
|
|
8d2496d7de | ||
|
|
d867a3f9a8 | ||
|
|
aa38d46a14 | ||
|
|
25c1411706 | ||
|
|
1439d121c2 | ||
|
|
7e8a3b3d11 | ||
|
|
bf12ddea85 | ||
|
|
2a904298d2 | ||
|
|
b6f45f1098 | ||
|
|
5265514689 | ||
|
|
3a353cb8e0 | ||
|
|
260e822459 | ||
|
|
e57875e8ab | ||
|
|
e0ece27387 | ||
|
|
390cc1d7a1 | ||
|
|
51da3d1337 | ||
|
|
5159c925af | ||
|
|
96300f3ad9 | ||
|
|
3611e527c8 | ||
|
|
8d24b760cd | ||
|
|
dd9a6fc8eb | ||
|
|
7dc8dad176 | ||
|
|
d49ae7856e | ||
|
|
c023aba8f4 | ||
|
|
19f22d8bbc | ||
|
|
12ac02b1d3 | ||
|
|
e2244526fa | ||
|
|
b6991ff139 | ||
|
|
95bd43cd0a | ||
|
|
d258e2c069 | ||
|
|
32bced14f5 | ||
|
|
14251d6480 | ||
|
|
08c118806c | ||
|
|
827f8f788b | ||
|
|
2e048c5ce6 | ||
|
|
78687c4aaf | ||
|
|
0b69873d73 | ||
|
|
ff4bbcd501 | ||
|
|
469a44bcd6 | ||
|
|
1db22b304c | ||
|
|
8952875c84 | ||
|
|
bf91374f3f | ||
|
|
20bc6a3d8c | ||
|
|
c2f4ba73be | ||
|
|
9b523dc375 | ||
|
|
187c4688e0 | ||
|
|
20987e6144 | ||
|
|
a8dfb771d1 | ||
|
|
ba9cf66b48 | ||
|
|
db31a896d8 | ||
|
|
61363dfe99 | ||
|
|
4c2a4c9b4a | ||
|
|
56014d30fc | ||
|
|
0691bb6c06 | ||
|
|
48a592be5a | ||
|
|
8f58ebc261 | ||
|
|
3bfd774a99 | ||
|
|
264f4dbe27 | ||
|
|
21e48ed16d | ||
|
|
403e23ec70 | ||
|
|
8ccde1a96e | ||
|
|
a89fa83b32 | ||
|
|
034705ee13 | ||
|
|
fdcad628a4 | ||
|
|
3d55cc1e02 | ||
|
|
959ddfce4a | ||
|
|
42b8720bef | ||
|
|
f44592861c | ||
|
|
dfdd79f3ee | ||
|
|
30a25e41d2 | ||
|
|
e0eba88c1b | ||
|
|
14c0c8eed8 | ||
|
|
05d4ff0383 | ||
|
|
7d28698730 | ||
|
|
464abcb4fa | ||
|
|
13c5c423d6 | ||
|
|
4e7de85e4d | ||
|
|
1ec5dfafe0 | ||
|
|
7ca3c9dd84 | ||
|
|
e7cdd4a93a | ||
|
|
73c043f49e | ||
|
|
ef7aa05f20 | ||
|
|
851ae93451 | ||
|
|
9bdfca5e56 | ||
|
|
232b814f68 | ||
|
|
c401bf065d | ||
|
|
024075fabb | ||
|
|
e8d53ad94a | ||
|
|
048185ef4c | ||
|
|
b21082a545 | ||
|
|
527b0d661a | ||
|
|
44e3518c32 | ||
|
|
faea95b8d3 | ||
|
|
46677b6d86 | ||
|
|
212f30a18e | ||
|
|
43c01fd8b6 | ||
|
|
b30e5c6313 | ||
|
|
ee53020f94 | ||
|
|
6a910ea8f2 | ||
|
|
231bbf39f4 | ||
|
|
1e2b7bcabb | ||
|
|
15d1949971 | ||
|
|
ef59a25f71 | ||
|
|
4e766f0ef1 | ||
|
|
c3e1c6d07b | ||
|
|
410876d0ee | ||
|
|
fc6a9c2d07 | ||
|
|
6ff685b4c8 | ||
|
|
2fd28ebb43 | ||
|
|
59bf14707f | ||
|
|
6c172dae73 | ||
|
|
a6fefc1cae | ||
|
|
e563c0ecf4 | ||
|
|
92053d4fb2 | ||
|
|
59318f1b2e | ||
|
|
561631ea44 | ||
|
|
bba9417038 | ||
|
|
8cf98587f7 | ||
|
|
f1442d8261 | ||
|
|
ac1a75df8c | ||
|
|
9cad40fca6 | ||
|
|
4f0f5861ed | ||
|
|
45f09caa8d | ||
|
|
2683bbdf2f | ||
|
|
b0b7e821de | ||
|
|
2ac871a5a1 | ||
|
|
a68198e6bc | ||
|
|
0813162608 | ||
|
|
268a4d605c | ||
|
|
d5cad58ba3 | ||
|
|
c88c3bb683 | ||
|
|
fb6927c36c | ||
|
|
8ef946f380 | ||
|
|
285249963c | ||
|
|
62b85e6a17 | ||
|
|
b74073c0db | ||
|
|
249b55b573 | ||
|
|
be1edfbb6f | ||
|
|
83b9b38fc5 | ||
|
|
8a4107ab64 | ||
|
|
76953b4d1e | ||
|
|
d8233ec657 | ||
|
|
724f325f44 | ||
|
|
826105d548 | ||
|
|
ea5819f8d3 | ||
|
|
19982b2e80 | ||
|
|
925fe9142b | ||
|
|
218dc713ff | ||
|
|
58d8702881 | ||
|
|
574897c629 | ||
|
|
305cf1f98b | ||
|
|
ac96c41fe8 | ||
|
|
681e6c377e | ||
|
|
0336a57511 | ||
|
|
c572f25040 | ||
|
|
dab327e501 | ||
|
|
919ef8e0df | ||
|
|
8f73f7d041 | ||
|
|
3720c9565f | ||
|
|
2023570fb1 | ||
|
|
62634823f9 | ||
|
|
fb8617f293 | ||
|
|
050d7c9d90 | ||
|
|
ceb2baae92 | ||
|
|
2a4bf8ddd8 | ||
|
|
ce66b0aad0 | ||
|
|
23ca241597 | ||
|
|
36a5ccb73f | ||
|
|
873c276a26 | ||
|
|
a0a52a2b85 | ||
|
|
67dea32d8c | ||
|
|
d9a61c7ea3 | ||
|
|
076aeb3106 | ||
|
|
bab241d2e7 | ||
|
|
750e587f23 | ||
|
|
8985a7c2ac | ||
|
|
c2bb152e6c | ||
|
|
014d9489bb | ||
|
|
99468dc6c0 | ||
|
|
3d09f6b621 | ||
|
|
85c0519ca6 | ||
|
|
631c9a9bad | ||
|
|
d1a58e452a | ||
|
|
de47c5722f | ||
|
|
6101f88a80 | ||
|
|
dea2648931 | ||
|
|
7a0ded349d | ||
|
|
329bc97900 | ||
|
|
ea33ae6c4d | ||
|
|
05a047b442 | ||
|
|
920d11993c | ||
|
|
4d8014cefa | ||
|
|
581f36e1cc | ||
|
|
eb1726c151 | ||
|
|
2cc65f1eb7 | ||
|
|
3b65d23bc8 | ||
|
|
0b84b16b84 | ||
|
|
1333948266 | ||
|
|
e13466742d | ||
|
|
78b547afa7 | ||
|
|
83473ea55d | ||
|
|
db8ced219f | ||
|
|
37d83019d0 | ||
|
|
16990e896a | ||
|
|
ddbfa5fe53 | ||
|
|
5712b216b4 | ||
|
|
7add1f152d | ||
|
|
ab34438938 | ||
|
|
1831def9cc | ||
|
|
da5499f4ed | ||
|
|
eaa663b241 | ||
|
|
2b800f01d9 | ||
|
|
fe5aed65c2 | ||
|
|
2708349f7c | ||
|
|
f13dbb00cf | ||
|
|
6c6a537471 | ||
|
|
812262d16b | ||
|
|
302a583c08 | ||
|
|
eea117f3e5 | ||
|
|
3f02516d3e | ||
|
|
a4a897ce52 | ||
|
|
a9f424c887 | ||
|
|
e618b1556c | ||
|
|
898965f458 | ||
|
|
b61bb15030 | ||
|
|
8734c66d55 | ||
|
|
82206bd7f5 | ||
|
|
ac8a131b61 | ||
|
|
4bc9ed2c1f | ||
|
|
2195d1d5e4 | ||
|
|
8da1d4a40c | ||
|
|
81a6d7fb01 | ||
|
|
7eb8af5534 | ||
|
|
0050c5b4fb | ||
|
|
26b2bbe306 | ||
|
|
111ddcc827 | ||
|
|
bae6c82c7a | ||
|
|
d701ede8bb | ||
|
|
854e269f20 | ||
|
|
c2e77030a1 | ||
|
|
7cadb57785 | ||
|
|
8f90cd0025 | ||
|
|
d907dfa21e | ||
|
|
4a1c674d5b | ||
|
|
a2966dd62d | ||
|
|
6b4b68a145 | ||
|
|
7ee6242d0c | ||
|
|
81e9d881ca | ||
|
|
01ea5d17ec | ||
|
|
38f3a59c9a | ||
|
|
97d1424b48 | ||
|
|
d0830009e8 | ||
|
|
932c29e08e | ||
|
|
da8ccb9375 | ||
|
|
823c749bd1 | ||
|
|
9bf4d2f978 | ||
|
|
64ef3bfccc | ||
|
|
71b457cb97 | ||
|
|
b543c19bac | ||
|
|
2ccecb9e10 | ||
|
|
79896f3eaf | ||
|
|
7c22c50e9e | ||
|
|
34d99c6b39 | ||
|
|
545ef0e5fe | ||
|
|
7ecc657cee | ||
|
|
f9329eb66f | ||
|
|
0c6cb9cdc2 | ||
|
|
f7f0768c22 | ||
|
|
15cde403c4 | ||
|
|
ad121b14cb | ||
|
|
6b6febce98 | ||
|
|
665fca9d60 | ||
|
|
320ce960ce | ||
|
|
757d9cdeb9 | ||
|
|
4484857b50 | ||
|
|
9101ca61f5 | ||
|
|
907f0724ce | ||
|
|
b3fa7187ae | ||
|
|
7d2ccf3a21 | ||
|
|
c78a8aad38 | ||
|
|
40c0ad3990 | ||
|
|
018fbffe54 | ||
|
|
d843dec3b7 | ||
|
|
2b389730e2 | ||
|
|
c2b707c559 | ||
|
|
ba0917c531 | ||
|
|
676769c08f | ||
|
|
45c58805e7 | ||
|
|
9f5b40123d | ||
|
|
34e1726860 | ||
|
|
9af4557880 | ||
|
|
5725cfdc73 | ||
|
|
294ab2b404 | ||
|
|
c3cd43825b | ||
|
|
ebc0ebf54d | ||
|
|
58717e9087 | ||
|
|
b034f7ca19 | ||
|
|
a1d7653c19 | ||
|
|
e8860a177b | ||
|
|
b29b479461 | ||
|
|
733d5fdd65 | ||
|
|
cb255a0269 | ||
|
|
b28f16c910 | ||
|
|
2447f369f6 | ||
|
|
7d75509a22 | ||
|
|
8be9f14166 | ||
|
|
3f92d0764c | ||
|
|
b5148d30e2 | ||
|
|
0a2347e0ba | ||
|
|
f018e9352d | ||
|
|
f76350f541 | ||
|
|
d6e0250020 | ||
|
|
739b41a21e | ||
|
|
c2419823c8 | ||
|
|
7d8f623180 | ||
|
|
89b8658977 | ||
|
|
6c80586b40 | ||
|
|
1a9e6be809 | ||
|
|
a25db953cc | ||
|
|
fe8363948e | ||
|
|
93b845e21b | ||
|
|
fc0efc91c8 | ||
|
|
f3c57efb11 | ||
|
|
0c7d523859 | ||
|
|
bf0716e7e4 | ||
|
|
6e9aeb3520 | ||
|
|
d7fb5addc5 | ||
|
|
25189c1a6a | ||
|
|
19303cc71d | ||
|
|
020fe75e67 | ||
|
|
90c6fdd506 | ||
|
|
686adf319b | ||
|
|
bdd8df2f1b | ||
|
|
23ff2911e3 | ||
|
|
86f89a0768 | ||
|
|
ad11d38f92 | ||
|
|
5288b84f0a | ||
|
|
27c881b2fb | ||
|
|
deceb833bf | ||
|
|
4de970006b | ||
|
|
9bb5656e4b | ||
|
|
83321b989a | ||
|
|
c06a8276fe | ||
|
|
601fc96c27 | ||
|
|
354116da47 | ||
|
|
6d5f0df029 | ||
|
|
2c1808e68d | ||
|
|
d22b9b7149 | ||
|
|
c41878d46d | ||
|
|
3f2ea7f894 | ||
|
|
6eb458d364 | ||
|
|
7782e252f1 | ||
|
|
ae1a2f5e3c | ||
|
|
24c9534dd7 | ||
|
|
6b27e06701 | ||
|
|
c727c73cce | ||
|
|
251a9ff39c | ||
|
|
77ebf3cbc1 | ||
|
|
ff7575383f | ||
|
|
e39be2cb45 | ||
|
|
2c17d50a8b | ||
|
|
63fd60257c | ||
|
|
f884e97af2 | ||
|
|
8915295560 | ||
|
|
3fcddbbea2 | ||
|
|
659a96edf9 | ||
|
|
5b1a78dc92 | ||
|
|
f1cf6ff588 | ||
|
|
698fba94ef | ||
|
|
99039568f9 | ||
|
|
eb646f3c09 | ||
|
|
ac591918e0 | ||
|
|
af4998b10e | ||
|
|
0a44d7bfec | ||
|
|
036eecdd79 | ||
|
|
4b926cfd51 | ||
|
|
ef9719425e | ||
|
|
cac8147988 | ||
|
|
7bdddc8471 | ||
|
|
26936d0600 | ||
|
|
8b799721ae | ||
|
|
dfb3ff9459 | ||
|
|
9e0c61f822 | ||
|
|
4d81507a36 | ||
|
|
44cdae9a57 | ||
|
|
080750fe65 | ||
|
|
1f8b2abf80 | ||
|
|
948888218b | ||
|
|
43b8609138 | ||
|
|
5dc4c11b2b | ||
|
|
293df92991 | ||
|
|
3e5a0c70ab | ||
|
|
2add9b3fcf | ||
|
|
241fc73e25 | ||
|
|
355fea6f2a | ||
|
|
e349682e3d | ||
|
|
3807bcee8b | ||
|
|
546eee6d15 | ||
|
|
183657c9ab | ||
|
|
3727e751f6 | ||
|
|
a1d5ea2b9d | ||
|
|
930299d58c | ||
|
|
b680bc8ca7 | ||
|
|
7dcd0b38a8 | ||
|
|
60e625f275 | ||
|
|
c3343fdb49 | ||
|
|
6c5679d418 | ||
|
|
5f7ebf8d51 | ||
|
|
12e480040a | ||
|
|
3b0f760747 | ||
|
|
cd509df8b6 | ||
|
|
df4d235c1f | ||
|
|
54752a2afe | ||
|
|
995a0dc1b8 | ||
|
|
bc751c3469 | ||
|
|
98c357abf8 | ||
|
|
8f1dc20874 | ||
|
|
ad7544b47c | ||
|
|
cd451cc955 | ||
|
|
a23a1a942b | ||
|
|
3ca765dfbd | ||
|
|
50ccbb6018 | ||
|
|
99f3285106 | ||
|
|
945d6e8f23 | ||
|
|
08f31d5198 | ||
|
|
706efde6df | ||
|
|
3054ea5580 | ||
|
|
a6fc182d40 | ||
|
|
422c8bd914 | ||
|
|
442154dcf9 | ||
|
|
8c4608f165 | ||
|
|
e5aa886e8b | ||
|
|
11e010320c | ||
|
|
f251cc24ca | ||
|
|
7967c92db0 | ||
|
|
ece23e1bac | ||
|
|
14d1261536 | ||
|
|
3f14786363 | ||
|
|
94b0107f2e | ||
|
|
dab7afc69f | ||
|
|
cfbcddfb0f | ||
|
|
f466a4f675 | ||
|
|
444cf2ed48 | ||
|
|
8e565b0c0e | ||
|
|
aa42a1616b | ||
|
|
3d92cb12a6 | ||
|
|
2f7185008f | ||
|
|
c4c9a281f3 | ||
|
|
6bc0d6d200 | ||
|
|
caf667de05 | ||
|
|
bd4ebc07d8 | ||
|
|
2c52089918 | ||
|
|
2b742e4081 | ||
|
|
f9d0dd3d72 | ||
|
|
6b32c387f1 | ||
|
|
69757a1c92 | ||
|
|
c98a554aaf | ||
|
|
4e11f499f4 | ||
|
|
435bcab6c4 | ||
|
|
a9080d9ab2 | ||
|
|
69b0c6aad4 | ||
|
|
091328ba71 | ||
|
|
9bad85cb03 | ||
|
|
8b7552a616 | ||
|
|
52b64fa9dc | ||
|
|
00ae27b2cf | ||
|
|
ca94a86847 | ||
|
|
db0f450d53 | ||
|
|
1c9730cfb8 | ||
|
|
ab8570e77f | ||
|
|
6e59c39db8 | ||
|
|
c3d91fec59 | ||
|
|
04fc62c5ed | ||
|
|
f3576a18a9 | ||
|
|
272e33b245 | ||
|
|
833b7fcfff | ||
|
|
59f0209008 | ||
|
|
3eb6582f4b | ||
|
|
3d5f55b851 | ||
|
|
a7f43eaad5 | ||
|
|
8f2bd71dc9 | ||
|
|
fe16fc39d6 | ||
|
|
e508ba9b0b | ||
|
|
0a95b1d28c | ||
|
|
68f3dd76c9 | ||
|
|
b7bcfe73b1 | ||
|
|
6799149f7d | ||
|
|
a4c3f06259 | ||
|
|
6e8916cdbb | ||
|
|
b8e0cde9e1 | ||
|
|
c9583f70f7 | ||
|
|
d67df37b2b | ||
|
|
675e3578b4 | ||
|
|
f421c295bd | ||
|
|
7b493a180e | ||
|
|
73f88f3896 | ||
|
|
270d599981 | ||
|
|
4ce43bafa5 | ||
|
|
c803a77fa8 | ||
|
|
e942cdde81 | ||
|
|
b11bbbe239 | ||
|
|
7026f02404 | ||
|
|
65b346ba67 | ||
|
|
2062fc003c | ||
|
|
656c28326c | ||
|
|
4598fecb7c | ||
|
|
41ec1cb065 | ||
|
|
c5c2fe5f14 | ||
|
|
7716c3be5e | ||
|
|
15750269ce | ||
|
|
2c1924638e | ||
|
|
5d2a6972af | ||
|
|
17ebfc350d | ||
|
|
5a60f56dbe | ||
|
|
3b3feb3853 | ||
|
|
d19bc80ca1 | ||
|
|
fbb2e494a8 | ||
|
|
07e2e8803a | ||
|
|
68eb431db8 | ||
|
|
9a4e15eaf6 | ||
|
|
dcc8fbec72 | ||
|
|
38f6de7a0c | ||
|
|
7062898817 | ||
|
|
ef774a39f7 | ||
|
|
cc15237ca5 | ||
|
|
84fce989dd | ||
|
|
f8b61f9b0c | ||
|
|
b60eabe813 | ||
|
|
b3b1b412b1 | ||
|
|
5dda34f798 | ||
|
|
bdca3e8f8c | ||
|
|
7f6891593a | ||
|
|
f3d016ffd9 | ||
|
|
43cad4a619 | ||
|
|
a3ef57ec3c | ||
|
|
08f29b04df | ||
|
|
492a251bdb | ||
|
|
cb7b639e6a | ||
|
|
5bd5533490 | ||
|
|
9d65c6d24f | ||
|
|
67fc68ea7f | ||
|
|
9ea953b481 | ||
|
|
97013ba028 | ||
|
|
40039951b8 | ||
|
|
c79f62bb7d | ||
|
|
a788c5b6b8 | ||
|
|
f92bbd3311 | ||
|
|
a2f594bf74 | ||
|
|
33b7cd7cae | ||
|
|
c882c29132 | ||
|
|
9fa2377054 | ||
|
|
b4546eb428 | ||
|
|
9e3a121357 | ||
|
|
95cbed6639 | ||
|
|
5613847626 | ||
|
|
6972d9ff95 | ||
|
|
f8b9f3900c | ||
|
|
be0c8e9f08 | ||
|
|
efc2bb8cee | ||
|
|
0614ed6542 | ||
|
|
73b452e941 | ||
|
|
7510da3514 | ||
|
|
a3639fdea1 | ||
|
|
48aff5a267 | ||
|
|
e912773451 | ||
|
|
7a8ddfee99 | ||
|
|
c7c2bd14d7 | ||
|
|
7428b2f902 | ||
|
|
827930b510 | ||
|
|
fb60d01e36 | ||
|
|
b17ebac5b5 | ||
|
|
ba649f4203 | ||
|
|
a0a0d0b65e | ||
|
|
a42478ecf4 | ||
|
|
546e2eb164 | ||
|
|
6c57a4b9f8 | ||
|
|
2cbabcea4a | ||
|
|
c12b624078 | ||
|
|
ae35dfeeec | ||
|
|
93d2366337 | ||
|
|
36e2ef2ba8 | ||
|
|
d06c06026a | ||
|
|
ad4210a395 | ||
|
|
95d6d393e9 | ||
|
|
54489e4ba1 | ||
|
|
3dfc6b7512 | ||
|
|
8f70550080 | ||
|
|
7518dede81 | ||
|
|
56dd0c2a5c | ||
|
|
4837a1c13d | ||
|
|
ce51b6ebee | ||
|
|
cac8a55fb2 | ||
|
|
e7e6443c6d | ||
|
|
3475f97172 | ||
|
|
2af47c361c | ||
|
|
ce7e25b7ad | ||
|
|
543d0a4abe | ||
|
|
80a7fb0bb4 | ||
|
|
472004ca58 | ||
|
|
ca5da47efc | ||
|
|
a2dea4d9f4 | ||
|
|
5c5820e950 | ||
|
|
f7eb6cd556 | ||
|
|
91c93084cb | ||
|
|
bd2402428b | ||
|
|
49feba985e | ||
|
|
28f35575da | ||
|
|
09e823e002 | ||
|
|
0adc452e4f | ||
|
|
714ada87e7 | ||
|
|
d696ea84e6 | ||
|
|
be38ea68e5 | ||
|
|
a1118e2d86 | ||
|
|
4ed6eedb66 | ||
|
|
f2c492220c | ||
|
|
51e7243003 | ||
|
|
f1bd82ba8f | ||
|
|
af27b8c59d | ||
|
|
a55305503e | ||
|
|
9cc0c0af8b | ||
|
|
e6db535078 | ||
|
|
030fa5107d | ||
|
|
4779676ac1 | ||
|
|
8762d54e63 | ||
|
|
45b5d84c8f | ||
|
|
86b40c8697 | ||
|
|
19b3fdf5ee | ||
|
|
33f2917473 | ||
|
|
0f2c37ea4a | ||
|
|
3c8b65b820 | ||
|
|
df5b548d02 | ||
|
|
d01edb0815 | ||
|
|
b492dc9bac | ||
|
|
f4da82981d | ||
|
|
3296803650 | ||
|
|
908a847808 | ||
|
|
7426677a62 | ||
|
|
70ec9b9666 | ||
|
|
d6b52d13ee | ||
|
|
91510ba8ea | ||
|
|
6cc211f4e1 | ||
|
|
c6f02e06f0 | ||
|
|
db4cfa5011 | ||
|
|
38c81fb411 | ||
|
|
5c6318e816 | ||
|
|
be968245ec | ||
|
|
cfea76669a | ||
|
|
8d91f983e0 | ||
|
|
9d4f6a0ebe | ||
|
|
5ee942d5a8 | ||
|
|
c932023b04 | ||
|
|
159b251085 | ||
|
|
d9c892c9fd | ||
|
|
f660de4e1e | ||
|
|
2edaf46a3d | ||
|
|
b3fe91a803 | ||
|
|
cd3ceb4771 | ||
|
|
b21bc8e16d | ||
|
|
89e575df23 | ||
|
|
96c5499439 | ||
|
|
1381be8b23 | ||
|
|
259f5d7cc8 | ||
|
|
f4c27e0ba1 | ||
|
|
d0ff55ec00 | ||
|
|
1dbfb160ba | ||
|
|
ec348edbe6 | ||
|
|
7fb60025ee | ||
|
|
cca092892b | ||
|
|
6ae79cff82 | ||
|
|
02d2100562 | ||
|
|
174782e022 | ||
|
|
2574114b01 | ||
|
|
7695a75883 | ||
|
|
a4434fe7db | ||
|
|
e92b3e716e | ||
|
|
260c554c06 | ||
|
|
839f973de6 | ||
|
|
df61de8df2 | ||
|
|
c994d9bc0e | ||
|
|
6061c09cab | ||
|
|
c7144600bf | ||
|
|
24f8d04828 | ||
|
|
a393578bcc | ||
|
|
2cd5c87cb9 | ||
|
|
7b9133b99c | ||
|
|
cfcd28fd9d | ||
|
|
6f5991fa38 | ||
|
|
696db0f4f7 | ||
|
|
36dee83516 | ||
|
|
240cfb1ef1 | ||
|
|
98f5be72c4 | ||
|
|
54b645a88b | ||
|
|
1c2cee9c68 | ||
|
|
37f63f5f8a | ||
|
|
782ef982f6 | ||
|
|
9ff32c288e | ||
|
|
f2fab62173 | ||
|
|
83223ad4ac | ||
|
|
64499d9494 | ||
|
|
282c765e3d | ||
|
|
1d85687c30 | ||
|
|
55ba91ee3e | ||
|
|
f80cc97adb | ||
|
|
87a4453583 | ||
|
|
cc77f0e79c | ||
|
|
36c06a232d | ||
|
|
8a93671af6 | ||
|
|
39734d27f0 | ||
|
|
75a99396e7 | ||
|
|
53cdde9124 | ||
|
|
15bae865ac | ||
|
|
73b497c12e | ||
|
|
e8ce882d43 | ||
|
|
87ea670a65 | ||
|
|
f2c7a7867a | ||
|
|
b7af263526 | ||
|
|
5294fa2499 | ||
|
|
dcbabfcf7b | ||
|
|
177206a185 | ||
|
|
46b23b4009 | ||
|
|
dbdd083e7c | ||
|
|
f933209475 | ||
|
|
2fc01efdd8 | ||
|
|
33a20f586c | ||
|
|
c2f4000a6f | ||
|
|
f85705002e | ||
|
|
36ae539974 | ||
|
|
a16e8f75d6 | ||
|
|
e781e203bf | ||
|
|
8ae1606066 | ||
|
|
6d41a58c82 | ||
|
|
552c289b79 | ||
|
|
ada3653e48 | ||
|
|
12ae00bd7d | ||
|
|
c04f299d28 | ||
|
|
d2bce7f267 | ||
|
|
645890b143 | ||
|
|
b4bb519963 | ||
|
|
cea2872b76 | ||
|
|
1ca719243f | ||
|
|
ca417aacd2 | ||
|
|
919a2e217f | ||
|
|
ae64839a12 | ||
|
|
9268fe1857 | ||
|
|
b9ea1c8108 | ||
|
|
1ac4606dea | ||
|
|
ce4f8fe85b | ||
|
|
d11167de22 | ||
|
|
d9c8359951 | ||
|
|
da7613dbbd | ||
|
|
8cbd71d7bf | ||
|
|
614dd26d3d | ||
|
|
23e90c98b2 | ||
|
|
2826ca39d3 | ||
|
|
4bc8e6ac87 | ||
|
|
8a40619e4d | ||
|
|
a5fbc1aa4d | ||
|
|
dfbb5287a9 | ||
|
|
78a555f9e0 | ||
|
|
2185318b56 | ||
|
|
73d6d417be | ||
|
|
7dd77a4b62 | ||
|
|
2df5f7cc5a | ||
|
|
7cb614b0e5 | ||
|
|
86dd796322 | ||
|
|
52a0bed8f5 | ||
|
|
11425ca9ff | ||
|
|
0c6644eb2e | ||
|
|
fb6df17a6d | ||
|
|
917282a86d | ||
|
|
1d3157ac87 | ||
|
|
378571e10e | ||
|
|
84f4754563 | ||
|
|
446a481b15 | ||
|
|
42c79d741b | ||
|
|
ad4080a20a | ||
|
|
1fd4da4d29 | ||
|
|
06be28ce8d | ||
|
|
113e9ab39d | ||
|
|
5dc630b150 | ||
|
|
306cab1006 | ||
|
|
8208c844dd | ||
|
|
fb31951ddf | ||
|
|
b3404d2c71 | ||
|
|
9008a63fde | ||
|
|
fede1f0216 | ||
|
|
50185a4371 | ||
|
|
27f7bfd9f0 | ||
|
|
f2c8fd3d1a | ||
|
|
d8b54b1219 | ||
|
|
e2bd09e6f6 | ||
|
|
16bb0e7a81 | ||
|
|
b2724c11c4 | ||
|
|
553bf8aba9 | ||
|
|
11dfefe252 | ||
|
|
5f74f40caa | ||
|
|
4630ee07bb | ||
|
|
d571173bc7 | ||
|
|
96c02bccd3 | ||
|
|
6d67de55fa | ||
|
|
a3f6c5ebeb | ||
|
|
199a9c32b2 | ||
|
|
bba9907d2a | ||
|
|
8c190945b9 | ||
|
|
28979bd7a2 | ||
|
|
6ed6cb5375 | ||
|
|
2a45536ba1 | ||
|
|
5bac85fc66 | ||
|
|
e508acf372 | ||
|
|
ddb2b5d004 | ||
|
|
960d969ade | ||
|
|
ba0d2572eb | ||
|
|
6fd78e16c1 | ||
|
|
940d0ee783 | ||
|
|
059b2b67b3 | ||
|
|
9c761152db | ||
|
|
4ce906db2b | ||
|
|
122ca6521e | ||
|
|
679f2eee3f | ||
|
|
606197bf4b | ||
|
|
9ee412031f | ||
|
|
a0e241952c | ||
|
|
f39122797e | ||
|
|
f79b7e879f | ||
|
|
4c293ebcd6 | ||
|
|
5c4f1d7778 | ||
|
|
6fec53905c | ||
|
|
407aefdc02 | ||
|
|
52da261983 | ||
|
|
a54661714f | ||
|
|
8eb3b25c4f | ||
|
|
f569dcc7e9 | ||
|
|
6d08af845e | ||
|
|
b1c3e5ccc6 | ||
|
|
da4c36cdcb | ||
|
|
ccafa0b2e1 | ||
|
|
e046c9d3f5 | ||
|
|
fb74718339 | ||
|
|
934898a792 | ||
|
|
fe6a78af86 | ||
|
|
c75042e28b | ||
|
|
d398aa77d7 | ||
|
|
d159fff7fd | ||
|
|
2533b1ce06 | ||
|
|
00802749ea | ||
|
|
7fc460bae3 | ||
|
|
627cd88eba | ||
|
|
f458bb3861 | ||
|
|
aed660dc95 | ||
|
|
c5c34df7bf | ||
|
|
a3355065be | ||
|
|
166cf4fbc1 | ||
|
|
7aab781edb | ||
|
|
3855230f7a | ||
|
|
5ded9d47a1 | ||
|
|
72cbbd7f3b | ||
|
|
aee2457cd0 | ||
|
|
5cf1075de1 | ||
|
|
2296453268 | ||
|
|
d61f7ca328 | ||
|
|
da02d4f3d5 | ||
|
|
9f039ad8bd | ||
|
|
3ce1d65326 | ||
|
|
08823b6103 | ||
|
|
4a3e904c6e | ||
|
|
c5acce4569 | ||
|
|
c38e124ed5 | ||
|
|
29698e6212 | ||
|
|
c1804d6409 | ||
|
|
a7b0cbd4e6 | ||
|
|
b3c9917021 | ||
|
|
4cb99fc37e | ||
|
|
e668a7a7a1 | ||
|
|
fd69767808 | ||
|
|
49be988925 | ||
|
|
0118983407 | ||
|
|
110d953ab2 | ||
|
|
40a871f3e9 | ||
|
|
11605cf755 | ||
|
|
25706f6a77 | ||
|
|
39ddaf8a4b | ||
|
|
abe9bf1b53 | ||
|
|
af7cedec67 | ||
|
|
65793d5644 | ||
|
|
630bba40bd | ||
|
|
516f5d5da2 | ||
|
|
9d5b19ab0a | ||
|
|
f329e18992 | ||
|
|
d25f3ac7fb | ||
|
|
294f5f158e | ||
|
|
892ca4947b | ||
|
|
7b0930ff0e | ||
|
|
dc523aae7a | ||
|
|
e3a5678c3e | ||
|
|
7524cd99c1 | ||
|
|
077973261a | ||
|
|
c9063f559f | ||
|
|
25435d7aa4 | ||
|
|
e3c39dffe5 | ||
|
|
453bef09b0 | ||
|
|
2f8cd2937d | ||
|
|
0ed52d16e2 | ||
|
|
2b3c2f2603 | ||
|
|
9032aa3391 | ||
|
|
e57799bc0e | ||
|
|
85db8f9602 | ||
|
|
3e23931d0c | ||
|
|
47424a5d4d | ||
|
|
0d7c6381b3 | ||
|
|
f522d676c3 | ||
|
|
4ddb77631b | ||
|
|
73843e1140 | ||
|
|
38887c7167 | ||
|
|
54bbf614e8 | ||
|
|
bf46e16bbc | ||
|
|
6d9c854a3d | ||
|
|
f7ad1c8c98 | ||
|
|
64b0adf837 | ||
|
|
2f710eebba | ||
|
|
c740727efc | ||
|
|
2c1f08ea9e | ||
|
|
20d79bf440 | ||
|
|
ee1832fd74 | ||
|
|
511a9d8982 | ||
|
|
c745a7e923 | ||
|
|
5695b639f8 | ||
|
|
7e37c10bf1 | ||
|
|
f5fc8bc650 | ||
|
|
2be2f20b65 | ||
|
|
e28423afe9 | ||
|
|
393e43594b | ||
|
|
a4c1246b3a | ||
|
|
9cb760fd37 | ||
|
|
e4a502d7f5 | ||
|
|
5e999034a3 | ||
|
|
78a8ed73a2 | ||
|
|
8be8c66772 | ||
|
|
4698a5c96d | ||
|
|
04fee0b792 | ||
|
|
1dff0005b9 | ||
|
|
ba2a5a260d | ||
|
|
0d262db9b4 | ||
|
|
b059fdfdb3 | ||
|
|
f790d59eca | ||
|
|
6c64f0223c | ||
|
|
d8921b191a | ||
|
|
846f0f2ded | ||
|
|
b7f53938ae | ||
|
|
fbc76e673a | ||
|
|
453c37183c | ||
|
|
d8eae9f3ec | ||
|
|
8dfc01a8f3 | ||
|
|
8afda75ade | ||
|
|
d337116170 | ||
|
|
a3784507bf | ||
|
|
dcf65b2a52 | ||
|
|
cd08acf8ea | ||
|
|
34733bb83c | ||
|
|
c44c5e64ed | ||
|
|
6fd00f446e | ||
|
|
7cd4aaa02d | ||
|
|
aab1dbdc30 | ||
|
|
7350163053 | ||
|
|
c18cb33802 | ||
|
|
cbba06982b | ||
|
|
f5797a2ffe | ||
|
|
6c560d6b09 | ||
|
|
e60836f1d6 | ||
|
|
f148219a1f | ||
|
|
a3f91508bd | ||
|
|
f436d23492 | ||
|
|
0e089aadcd | ||
|
|
e7f9c73f87 | ||
|
|
01dc08a587 | ||
|
|
e6ab16c283 | ||
|
|
00ad2900dd | ||
|
|
0b8ff32553 | ||
|
|
ec15d0a1b0 | ||
|
|
8841803399 | ||
|
|
288c935f0d | ||
|
|
367e07444a | ||
|
|
c5240e7c53 | ||
|
|
e8b3b89264 | ||
|
|
e4c0346aa9 | ||
|
|
eb66ce8b2e | ||
|
|
0c7b2461a2 | ||
|
|
e4c3d2d727 | ||
|
|
9537c44ca5 | ||
|
|
1c8e65a20e | ||
|
|
8fc2d739bd | ||
|
|
5c0bff8f21 | ||
|
|
c4bb9ec3b8 | ||
|
|
fdd109b467 | ||
|
|
ecdf296456 | ||
|
|
d2d5213b87 | ||
|
|
e78a1eb083 | ||
|
|
76863b84de | ||
|
|
6a66f24366 | ||
|
|
1944119a77 | ||
|
|
654d3dcd3e | ||
|
|
cc4aa039e3 | ||
|
|
351dbc4683 | ||
|
|
574b90d1c6 | ||
|
|
ad0ada24a2 | ||
|
|
2c2c007448 | ||
|
|
6c0bf79f7a | ||
|
|
d7cae9afff | ||
|
|
a533392684 | ||
|
|
98c1b902dd | ||
|
|
d7884e5ae2 | ||
|
|
c76c08e82a | ||
|
|
0db60b7bb2 | ||
|
|
684271da34 | ||
|
|
792a1f9d72 | ||
|
|
5b7045b5ba | ||
|
|
a42dd61e45 | ||
|
|
2f3796af9d | ||
|
|
4b272f6fdd | ||
|
|
96a62b95f3 | ||
|
|
c1126e3727 | ||
|
|
dd42277862 | ||
|
|
98abf6fb1c | ||
|
|
fdf8ceee2d | ||
|
|
7aa43fc5d8 | ||
|
|
e21b3cc37b | ||
|
|
32e0bb9c4e | ||
|
|
1bedcf62af | ||
|
|
cc7b34ea06 | ||
|
|
d926f93877 | ||
|
|
e0d4a1ff33 | ||
|
|
484044afec | ||
|
|
defec7ae16 | ||
|
|
e74d551608 | ||
|
|
4e43b88153 | ||
|
|
79727a83aa | ||
|
|
463528217c | ||
|
|
7aed72aa11 | ||
|
|
38bcfd05a2 | ||
|
|
ba3ae37ef0 | ||
|
|
ab75d799e3 | ||
|
|
2d91430e91 | ||
|
|
2a4b35660e | ||
|
|
1cf41521cc | ||
|
|
f721ac5ad5 | ||
|
|
6538c5134b | ||
|
|
f620e53bca | ||
|
|
8a5c8801ab | ||
|
|
fb719ffc25 | ||
|
|
67a70e3b75 | ||
|
|
6c4d705c91 | ||
|
|
996befafc2 | ||
|
|
36464f41e2 | ||
|
|
696ef20cb4 | ||
|
|
052a8eade3 | ||
|
|
408c9d46f3 | ||
|
|
d1b26bf6dd | ||
|
|
a1c151acd0 | ||
|
|
ef28e7a277 | ||
|
|
2f74d6d52e | ||
|
|
861d5c3e01 | ||
|
|
760fa57658 | ||
|
|
858cebeb66 | ||
|
|
29a342dabe | ||
|
|
bf822bfa13 | ||
|
|
318015ba7a | ||
|
|
fb43b09f46 | ||
|
|
35183211d7 | ||
|
|
b197a6ca68 | ||
|
|
17ab9f5969 | ||
|
|
d89c34023b | ||
|
|
ff1d49bc5b | ||
|
|
aad815709f | ||
|
|
8e00acca17 | ||
|
|
2d2532e740 | ||
|
|
f0bbdd0834 | ||
|
|
c00c803b89 | ||
|
|
10f71a3f72 | ||
|
|
96562be9e5 | ||
|
|
24fde021e4 | ||
|
|
8c32bcb315 | ||
|
|
57204d9f34 | ||
|
|
bfc0bfcd8e | ||
|
|
3c2f3a321a | ||
|
|
31411dbc32 | ||
|
|
8288138aac | ||
|
|
2e2b69e96b | ||
|
|
42c0192ee6 | ||
|
|
033919cce4 | ||
|
|
3f59d3882d | ||
|
|
c9b91fa45a | ||
|
|
d869bfa179 | ||
|
|
9eb345a1e4 | ||
|
|
7363eaae0e | ||
|
|
a2314ab9ca | ||
|
|
9bbd892818 | ||
|
|
7fb8379371 | ||
|
|
68a92f6e88 | ||
|
|
68137e4136 | ||
|
|
8b54df7773 | ||
|
|
1d4cbc27ff | ||
|
|
07e9c8cf27 | ||
|
|
5791b1f1c3 | ||
|
|
e0eaca5e5a | ||
|
|
7f0d3fe5e7 | ||
|
|
55eba1fa2e | ||
|
|
6a2db1d680 | ||
|
|
27d64e18d2 | ||
|
|
df3c665be3 | ||
|
|
274b3df2dc | ||
|
|
c8adadc51c | ||
|
|
822139baf8 | ||
|
|
12c1fa1d8b | ||
|
|
8eed09101d | ||
|
|
d1a78e2021 | ||
|
|
d1eede168b | ||
|
|
f2fa2a199c | ||
|
|
f0fe027b50 | ||
|
|
f19ad0fb5b | ||
|
|
7e892709bd | ||
|
|
6dfea5e847 | ||
|
|
5f0debc005 | ||
|
|
0bb98e7294 | ||
|
|
61235e9c09 | ||
|
|
55e7dd8b71 | ||
|
|
4850bec745 | ||
|
|
5a30b6af0c | ||
|
|
c94385feb8 | ||
|
|
2aea4cbc8c | ||
|
|
28ca680a31 | ||
|
|
a494f0ab86 | ||
|
|
a9594cbceb | ||
|
|
fea11c53eb | ||
|
|
ef1950d024 | ||
|
|
c39f1d99b4 | ||
|
|
a054222634 | ||
|
|
03311b147c | ||
|
|
f3a0849e39 | ||
|
|
ddec2a3aed | ||
|
|
2cb72bf989 | ||
|
|
d055fd81db | ||
|
|
b3a3f7cdf3 | ||
|
|
6c62e2d0f1 | ||
|
|
6ef527a3e7 | ||
|
|
78ff6a33ee | ||
|
|
b379df39d9 | ||
|
|
6e2b60ce65 | ||
|
|
aa988a211b | ||
|
|
18602b4eed | ||
|
|
64bb3ed664 | ||
|
|
d757cb8b11 | ||
|
|
2f70d7a0ff | ||
|
|
2aefbba070 | ||
|
|
41ba9aeef2 | ||
|
|
4b288c8976 | ||
|
|
ed633a2108 | ||
|
|
f439018255 | ||
|
|
bbe12c2488 | ||
|
|
c78e1cbfac | ||
|
|
10568b5266 | ||
|
|
19c725d07b | ||
|
|
d0455982a4 | ||
|
|
42ad69505d | ||
|
|
acd0ee7c35 | ||
|
|
23c574fe3a | ||
|
|
0f6c2bcdde | ||
|
|
9359ccee62 | ||
|
|
6da2c235bd | ||
|
|
5bf5ff8812 | ||
|
|
56d387a2ef | ||
|
|
13e6e19e2c | ||
|
|
b05c04c8c0 | ||
|
|
f7ee6989a0 | ||
|
|
b2926d9724 | ||
|
|
78499292e1 | ||
|
|
8c308db579 | ||
|
|
6bb3dd6ea2 | ||
|
|
96aa3fad5a | ||
|
|
b873533e98 | ||
|
|
4b3c0978fb | ||
|
|
033786fbf0 | ||
|
|
be815ba8fa | ||
|
|
f712e12f98 | ||
|
|
4aad9b74e7 | ||
|
|
a28380d97e | ||
|
|
aaa52056e9 | ||
|
|
86d36e5d55 | ||
|
|
a988fc0968 | ||
|
|
07b3c477fe | ||
|
|
f47de1cb41 | ||
|
|
ba0e500048 | ||
|
|
77c6d4fa5f | ||
|
|
8735609a8c | ||
|
|
1abc21c310 | ||
|
|
1c4dbc48e5 | ||
|
|
14d6692461 | ||
|
|
dd5c8eb660 | ||
|
|
80cc4706a6 | ||
|
|
aac13806ea |
15
.hgtags
15
.hgtags
@@ -186,3 +186,18 @@ cdaa6122185f9bf512dcd6600f56bfccc4824e8c jdk8-b61
|
||||
8d9d430b4244b95f5cf1ebe719f834a1ac5d6cd5 jdk8-b62
|
||||
21ee1dd7b809639284900a128b9b656a592ebc7a jdk8-b63
|
||||
70fa4b11f26522e69b51fd652215f60ce350bac3 jdk8-b64
|
||||
a2cf4d4a484378caea2e827ed604b2bbae58bdba jdk8-b65
|
||||
17820b958ae84f7c1cc6719319c8e2232f7a4f1d jdk8-b66
|
||||
76cc9bd3ece407d3a15d3bea537b57927973c5e7 jdk8-b67
|
||||
cb33628d4e8f11e879c371959e5948b66a53376f jdk8-b68
|
||||
adb5171c554e14cd86f618b5584f6e3d693d5889 jdk8-b69
|
||||
0d625373c69e2ad6f546fd88ab50c6c9aad01271 jdk8-b70
|
||||
a41ada2ed4ef735449531c6ebe6cec593d890a1c jdk8-b71
|
||||
6725b3961f987cf40f446d1c11cd324a3bec545f jdk8-b72
|
||||
fe94b40ffd9390f6cffcdf51c0389b0e6dde0c13 jdk8-b73
|
||||
f627eff819628822a0777af8062244352f2a29cf jdk8-b74
|
||||
f1478a6d25fddd311a84dcbfac50824cc1858bdd jdk8-b75
|
||||
f407160c280d1c5b00d314c535441ac26f195fee jdk8-b76
|
||||
d17eb2e13e362085e866d46235314c50cc4661cc jdk8-b77
|
||||
6d3dcd34b5b962ea1ef9eed0dafdee9e812401bc jdk8-b78
|
||||
a1313a8d90d17d363a3b2a645dc4030ec204b168 jdk8-b79
|
||||
|
||||
@@ -186,3 +186,18 @@ e07f499b9dccb529ecf74172cf6ac11a195ec57a jdk8-b60
|
||||
8a3fe0ae06a8cc21347da5a18384b0aa6c2349f5 jdk8-b62
|
||||
3229597524cab4239325bc3602df6c486397a511 jdk8-b63
|
||||
1c8370a55b305d35353346202bde042ba9e8a9fd jdk8-b64
|
||||
b772de306dc24c17f7bd1398531ddeb58723b804 jdk8-b65
|
||||
13bb8c326e7b7b0b19d78c8088033e3932e3f7ca jdk8-b66
|
||||
9a6ec97ec45c1a62d5233cefa91e8390e380e13a jdk8-b67
|
||||
cdb401a60cea6ad5ef3f498725ed1decf8dda1ea jdk8-b68
|
||||
6ee8080a6efe0639fcd00627a5e0f839bf010481 jdk8-b69
|
||||
105a25ffa4a4f0af70188d4371b4a0385009b7ce jdk8-b70
|
||||
51ad2a34342055333eb5f36e2fb514b027895708 jdk8-b71
|
||||
c1be681d80a1f1c848dc671d664fccb19e046a12 jdk8-b72
|
||||
93b9664f97eeb6f89397a8842318ebacaac9feb9 jdk8-b73
|
||||
b43aa5bd8ca5c8121336495382d35ecfa7a71536 jdk8-b74
|
||||
2a713921952cbd77a1e699626976cb6cdfe3e57e jdk8-b75
|
||||
278af9fc67e7eba2884936b49ec07345f423aabb jdk8-b76
|
||||
3933eebc659d58c597aa8cb4b3e58f2250ce3e1a jdk8-b77
|
||||
fd1a5574cf68af24bfd52decc37ac6361afb278a jdk8-b78
|
||||
91d35211e74464dca5edf9b66ab01d0d0d8cded7 jdk8-b79
|
||||
|
||||
5
Makefile
5
Makefile
@@ -26,6 +26,11 @@
|
||||
# If NEWBUILD is defined, use the new build-infra Makefiles and configure.
|
||||
# See NewMakefile.gmk for more information.
|
||||
|
||||
# If not specified, select what the default build is
|
||||
ifndef NEWBUILD
|
||||
NEWBUILD=true
|
||||
endif
|
||||
|
||||
ifeq ($(NEWBUILD),true)
|
||||
|
||||
# The new top level Makefile
|
||||
|
||||
351
NewMakefile.gmk
351
NewMakefile.gmk
@@ -23,273 +23,110 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Utilities used in this Makefile
|
||||
BASENAME=basename
|
||||
CAT=cat
|
||||
CD=cd
|
||||
CMP=cmp
|
||||
CP=cp
|
||||
ECHO=echo
|
||||
MKDIR=mkdir
|
||||
PRINTF=printf
|
||||
PWD=pwd
|
||||
TAR=tar
|
||||
ifeq ($(PLATFORM),windows)
|
||||
ZIP=zip
|
||||
# This must be the first rule
|
||||
default:
|
||||
|
||||
# Inclusion of this pseudo-target will cause make to execute this file
|
||||
# serially, regardless of -j. Recursively called makefiles will not be
|
||||
# affected, however. This is required for correct dependency management.
|
||||
.NOTPARALLEL:
|
||||
|
||||
# The shell code below will be executed on /usr/ccs/bin/make on Solaris, but not in GNU make.
|
||||
# /usr/ccs/bin/make lacks basically every other flow control mechanism.
|
||||
TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1
|
||||
|
||||
# Assume we have GNU make, but check version.
|
||||
ifeq (,$(findstring 3.81,$(MAKE_VERSION)))
|
||||
ifeq (,$(findstring 3.82,$(MAKE_VERSION)))
|
||||
$(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Locate this Makefile
|
||||
ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
|
||||
makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
|
||||
else
|
||||
# store symbolic links as the link
|
||||
ZIP=zip -y
|
||||
makefile_path:=$(lastword $(MAKEFILE_LIST))
|
||||
endif
|
||||
# Insure we have a path that looks like it came from pwd
|
||||
# (This is mostly for Windows sake and drive letters)
|
||||
define UnixPath # path
|
||||
$(shell (cd "$1" && $(PWD)))
|
||||
endef
|
||||
root_dir:=$(dir $(makefile_path))
|
||||
|
||||
# Current root directory
|
||||
CURRENT_DIRECTORY := $(shell $(PWD))
|
||||
# ... and then we can include our helper functions
|
||||
include $(root_dir)/common/makefiles/MakeHelpers.gmk
|
||||
|
||||
# Build directory root
|
||||
BUILD_DIR_ROOT = $(CURRENT_DIRECTORY)/build
|
||||
$(eval $(call ParseLogLevel))
|
||||
$(eval $(call ParseConfAndSpec))
|
||||
|
||||
# All configured Makefiles to run
|
||||
ALL_MAKEFILES = $(wildcard $(BUILD_DIR_ROOT)/*-*/Makefile)
|
||||
# Now determine if we have zero, one or several configurations to build.
|
||||
ifeq ($(SPEC),)
|
||||
# Since we got past ParseConfAndSpec, we must be building a global target. Do nothing.
|
||||
else
|
||||
ifeq ($(words $(SPEC)),1)
|
||||
# We are building a single configuration. This is the normal case. Execute the Main.gmk file.
|
||||
include $(root_dir)/common/makefiles/Main.gmk
|
||||
else
|
||||
# We are building multiple configurations.
|
||||
# First, find out the valid targets
|
||||
# Run the makefile with an arbitraty SPEC using -p -q (quiet dry-run and dump rules) to find
|
||||
# available PHONY targets. Use this list as valid targets to pass on to the repeated calls.
|
||||
all_phony_targets=$(filter-out $(global_targets), $(strip $(shell \
|
||||
$(MAKE) -p -q -f common/makefiles SPEC=$(firstword $(SPEC)) | \
|
||||
grep ^.PHONY: | head -n 1 | cut -d " " -f 2-)))
|
||||
|
||||
# All bundles to create
|
||||
ALL_IMAGE_DIRS = $(wildcard $(BUILD_DIR_ROOT)/*-*/images/*-image)
|
||||
$(all_phony_targets):
|
||||
@$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) $@) &&) true
|
||||
|
||||
# Build all the standard 'all', 'images', and 'clean' targets
|
||||
all images clean: checks
|
||||
@if [ "$(ALL_MAKEFILES)" = "" ] ; then \
|
||||
$(ECHO) "ERROR: No configurations to build"; exit 1; \
|
||||
fi
|
||||
@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
|
||||
$(ECHO) "$(CD) $${bdir} && $(MAKE) $@" ; \
|
||||
$(CD) $${bdir} && $(MAKE) $@ ; \
|
||||
done
|
||||
|
||||
# TBD: Deploy input
|
||||
$(BUILD_DIR_ROOT)/.deploy_input:
|
||||
@if [ "$(ALL_MAKEFILES)" = "" ] ; then \
|
||||
$(ECHO) "ERROR: No configurations to build"; exit 1; \
|
||||
fi
|
||||
@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
|
||||
if [ deploy/make/Makefile ] ; then \
|
||||
echo "Attempting deploy build." ; \
|
||||
( \
|
||||
$(RM) -r $${bdir}/deploy_input ; \
|
||||
$(MKDIR) -p $${bdir}/deploy_input ; \
|
||||
( $(CD) $${bdir}/images && $(TAR) -cf - j2sdk-image j2re-image ) \
|
||||
| ( $(CD) $${bdir}/deploy_input && $(TAR) -xf - ) ; \
|
||||
) ; \
|
||||
fi; \
|
||||
done
|
||||
touch $@
|
||||
|
||||
# TBD: Deploy images
|
||||
deploy: $(BUILD_DIR_ROOT)/.deploy_input
|
||||
@if [ "$(ALL_MAKEFILES)" = "" ] ; then \
|
||||
$(ECHO) "ERROR: No configurations to build"; exit 1; \
|
||||
fi
|
||||
@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
|
||||
if [ deploy/make/Makefile ] ; then \
|
||||
echo "Attempting deploy build." ; \
|
||||
( \
|
||||
$(CD) deploy/make && \
|
||||
$(MAKE) \
|
||||
ABS_OUTPUTDIR=$${bdir}/deploy_input \
|
||||
OUTPUTDIR=$${bdir}/deploy_input \
|
||||
) ; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# TBD: Install bundles
|
||||
install:
|
||||
|
||||
# Bundle creation
|
||||
bundles:
|
||||
@if [ "$(ALL_IMAGE_DIRS)" = "" ] ; then \
|
||||
$(ECHO) "ERROR: No images to bundle"; exit 1; \
|
||||
fi
|
||||
@for i in $(ALL_IMAGE_DIRS) ; do \
|
||||
$(MKDIR) -p $${i}/../../bundles && \
|
||||
$(RM) $${i}/../../bundles/`$(BASENAME) $${i}`.zip && \
|
||||
$(ECHO) "$(CD) $${i} && $(ZIP) -q -r ../../bundles/`$(BASENAME) $${i}`.zip ." && \
|
||||
$(CD) $${i} && $(ZIP) -q -r ../../bundles/`$(BASENAME) $${i}`.zip . ; \
|
||||
done
|
||||
|
||||
# Clobber all the built files
|
||||
clobber::
|
||||
$(RM) -r $(BUILD_DIR_ROOT)
|
||||
|
||||
# Make various checks to insure the build will be successful
|
||||
# Possibilities:
|
||||
# * Check that if any closed repo is provided, they all must be.
|
||||
# * Check that all open repos exist, at least until we are ready for some
|
||||
# kind of partial build.
|
||||
checks:
|
||||
@$(ECHO) "No checks yet"
|
||||
|
||||
# Keep track of user targets
|
||||
USER_TARGETS += all deploy install images clean clobber checks
|
||||
|
||||
###########################################################################
|
||||
# To help in adoption of the new configure&&make build process, a bridge
|
||||
# build will use the old settings to run configure and do the build.
|
||||
|
||||
# Build with the configure bridge
|
||||
bridgeBuild: bridge2configure images
|
||||
|
||||
# Bridge from old Makefile ALT settings to configure options
|
||||
bridge2configure: $(BUILD_DIR_ROOT)/.bridge2configureOpts
|
||||
bash ./configure $(strip $(shell $(CAT) $<))
|
||||
|
||||
# Create a file with configure options created from old Makefile mechanisms.
|
||||
$(BUILD_DIR_ROOT)/.bridge2configureOpts: $(BUILD_DIR_ROOT)/.bridge2configureOptsLatest
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
# Use this file to only change when obvious things have changed
|
||||
$(BUILD_DIR_ROOT)/.bridge2configureOptsLatest: FRC
|
||||
$(RM) $@.tmp
|
||||
$(MKDIR) -p $(BUILD_DIR_ROOT)
|
||||
@$(ECHO) " --with-debug-level=$(if $(DEBUG_LEVEL),$(DEBUG_LEVEL),release) " >> $@.tmp
|
||||
ifdef ARCH_DATA_MODEL
|
||||
@$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_PARALLEL_COMPILE_JOBS
|
||||
@$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_BOOTDIR
|
||||
@$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_CUPS_HEADERS_PATH
|
||||
@$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_FREETYPE_HEADERS_PATH
|
||||
@$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp
|
||||
endif
|
||||
@if [ -f $@ ] ; then \
|
||||
if ! $(CMP) $@ $@.tmp > /dev/null ; then \
|
||||
$(CP) $@.tmp $@ ; \
|
||||
fi ; \
|
||||
else \
|
||||
$(CP) $@.tmp $@ ; \
|
||||
fi
|
||||
$(RM) $@.tmp
|
||||
|
||||
# Clobber all the built files
|
||||
clobber:: bridge2clobber
|
||||
bridge2clobber::
|
||||
$(RM) $(BUILD_DIR_ROOT)/.bridge2*
|
||||
$(RM) $(BUILD_DIR_ROOT)/.deploy_input
|
||||
|
||||
# Keep track of phony targets
|
||||
PHONY_LIST += bridge2configure bridgeBuild bridge2clobber
|
||||
|
||||
###########################################################################
|
||||
# Sanity checks (history target)
|
||||
#
|
||||
|
||||
sanity: checks
|
||||
|
||||
# Keep track of user targets
|
||||
USER_TARGETS += sanity
|
||||
|
||||
###########################################################################
|
||||
# Javadocs
|
||||
#
|
||||
|
||||
javadocs:
|
||||
cd common/makefiles && $(MAKE) -f MakefileJavadoc.gmk
|
||||
|
||||
# Keep track of user targets
|
||||
USER_TARGETS += javadocs
|
||||
|
||||
###########################################################################
|
||||
# JPRT targets
|
||||
|
||||
ifndef JPRT_ARCHIVE_BUNDLE
|
||||
JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip
|
||||
endif
|
||||
endif
|
||||
|
||||
jprt_build_product: DEBUG_LEVEL=release
|
||||
jprt_build_product: BUILD_DIRNAME=*-release
|
||||
jprt_build_product: jprt_build_generic
|
||||
# Include this after a potential spec file has been included so that the bundles target
|
||||
# has access to the spec variables.
|
||||
include $(root_dir)/common/makefiles/Jprt.gmk
|
||||
|
||||
jprt_build_fastdebug: DEBUG_LEVEL=fastdebug
|
||||
jprt_build_fastdebug: BUILD_DIRNAME=*-fastdebug
|
||||
jprt_build_fastdebug: jprt_build_generic
|
||||
|
||||
jprt_build_debug: DEBUG_LEVEL=slowdebug
|
||||
jprt_build_debug: BUILD_DIRNAME=*-debug
|
||||
jprt_build_debug: jprt_build_generic
|
||||
|
||||
jprt_build_generic: $(JPRT_ARCHIVE_BUNDLE)
|
||||
|
||||
$(JPRT_ARCHIVE_BUNDLE): bridgeBuild bundles
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(CP) $(BUILD_DIR_ROOT)/$(BUILD_DIRNAME)/bundles/j2sdk-image.zip $@
|
||||
|
||||
# Keep track of phony targets
|
||||
PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \
|
||||
jprt_build_generic
|
||||
|
||||
###########################################################################
|
||||
# Help target
|
||||
|
||||
HELP_FORMAT=%12s%s\n
|
||||
# Here are "global" targets, i.e. targets that can be executed without specifying a single configuration.
|
||||
# If you addd more global targets, please update the variable global_targets in MakeHelpers.
|
||||
|
||||
help:
|
||||
@$(PRINTF) "# JDK Makefile\n"
|
||||
@$(PRINTF) "#\n"
|
||||
@$(PRINTF) "# Usage: make [Target]\n"
|
||||
@$(PRINTF) "#\n"
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "Target " "Description"
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "------ " "-----------"
|
||||
@for i in $(USER_TARGETS) ; do \
|
||||
$(MAKE) help_$${i} ; \
|
||||
done
|
||||
@$(PRINTF) "#\n"
|
||||
$(info )
|
||||
$(info OpenJDK Makefile help)
|
||||
$(info =====================)
|
||||
$(info )
|
||||
$(info Common make targets)
|
||||
$(info . make [default] # Compile all product in langtools, hotspot, jaxp, jaxws,)
|
||||
$(info . # corba and jdk)
|
||||
$(info . make all # Compile everything, all repos and images)
|
||||
$(info . make images # Create complete j2sdk and j2re images)
|
||||
$(info . make overlay-images # Create limited images for sparc 64 bit platforms)
|
||||
$(info . make profiles # Create complete j2re compact profile images)
|
||||
$(info . make bootcycle-images # Build images twice, second time with newly build JDK)
|
||||
$(info . make install # Install the generated images locally)
|
||||
$(info . make clean # Remove all files generated by make, but not those)
|
||||
$(info . # generated by configure)
|
||||
$(info . make dist-clean # Remove all files, including configuration)
|
||||
$(info . make help # Give some help on using make)
|
||||
$(info . make test # Run tests, default is all tests (see TEST below))
|
||||
$(info )
|
||||
$(info Targets for specific components)
|
||||
$(info (Component is any of langtools, corba, jaxp, jaxws, hotspot, jdk, images or overlay-images))
|
||||
$(info . make <component> # Build <component> and everything it depends on. )
|
||||
$(info . make <component>-only # Build <component> only, without dependencies. This)
|
||||
$(info . # is faster but can result in incorrect build results!)
|
||||
$(info . make clean-<component> # Remove files generated by make for <component>)
|
||||
$(info )
|
||||
$(info Useful make variables)
|
||||
$(info . make CONF= # Build all configurations (note, assignment is empty))
|
||||
$(info . make CONF=<substring> # Build the configuration(s) with a name matching)
|
||||
$(info . # <substring>)
|
||||
$(info )
|
||||
$(info . make LOG=<loglevel> # Change the log level from warn to <loglevel>)
|
||||
$(info . # Available log levels are:)
|
||||
$(info . # 'warn' (default), 'info', 'debug' and 'trace')
|
||||
$(info . # To see executed command lines, use LOG=debug)
|
||||
$(info )
|
||||
$(info . make JOBS=<n> # Run <n> parallel make jobs)
|
||||
$(info . # Note that -jN does not work as expected!)
|
||||
$(info )
|
||||
$(info . make test TEST=<test> # Only run the given test or tests, e.g.)
|
||||
$(info . # make test TEST="jdk_lang jdk_net")
|
||||
$(info )
|
||||
|
||||
help_all:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Build the entire jdk but not the images"
|
||||
help_images:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Create the jdk images for the builds"
|
||||
help_deploy:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Create the jdk deploy images from the jdk images"
|
||||
help_install:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Create the jdk install bundles from the deploy images"
|
||||
help_clean:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Clean and prepare for a fresh build from scratch"
|
||||
help_clobber:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Clean and also purge any hidden derived data"
|
||||
help_checks:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Perform various checks to make sure we can build"
|
||||
help_sanity:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Same as 'make checks'"
|
||||
help_javadocs:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Build the javadocs"
|
||||
help_help:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Print out the help messages"
|
||||
|
||||
# Keep track of user targets
|
||||
USER_TARGETS += help
|
||||
|
||||
###########################################################################
|
||||
# Phony targets
|
||||
.PHONY: $(PHONY_LIST) $(USER_TARGETS)
|
||||
|
||||
# Force target
|
||||
FRC:
|
||||
.PHONY: help
|
||||
|
||||
39
README
39
README
@@ -1,45 +1,40 @@
|
||||
README:
|
||||
This file should be located at the top of the OpenJDK Mercurial root
|
||||
repository. This root repository will include a "make" directory,
|
||||
and a Makefile for building the entire OpenJDK.
|
||||
A full OpenJDK repository set (forest) should also include the following
|
||||
6 nested repositories:
|
||||
repository. A full OpenJDK repository set (forest) should also include
|
||||
the following 6 nested repositories:
|
||||
"jdk", "hotspot", "langtools", "corba", "jaxws" and "jaxp".
|
||||
There are also several source downloads for the jax* repositories that
|
||||
will be needed.
|
||||
|
||||
This one root repository can be obtained with something like:
|
||||
|
||||
The root repository can be obtained with something like:
|
||||
hg clone http://hg.openjdk.java.net/jdk8/jdk8 openjdk8
|
||||
|
||||
To make sure you have all the nested repositories, you can run the
|
||||
get_source.sh script located in the same respository as this file:
|
||||
|
||||
You can run the get_source.sh script located in the root repository to get
|
||||
the other needed repositories:
|
||||
cd openjdk8 && sh ./get_source.sh
|
||||
|
||||
People unfamiliar with Mercurial should read the first few chapters of
|
||||
the Mercurial book: http://hgbook.red-bean.com/read/
|
||||
|
||||
See http://openjdk.java.net/ for more information about the OpenJDK.
|
||||
See http://openjdk.java.net/ for more information about OpenJDK.
|
||||
|
||||
Simple Build Instructions:
|
||||
|
||||
0. Get the necessary system software/packages installed on your system, see
|
||||
http://hg.openjdk.java.net/jdk8/build/raw-file/tip/README-builds.html
|
||||
http://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html
|
||||
|
||||
1. If you don't have a jdk6 installed, download and install a JDK 6 from
|
||||
1. If you don't have a jdk7u7 or newer jdk, download and install it from
|
||||
http://java.sun.com/javase/downloads/index.jsp
|
||||
Set the environment variable ALT_BOOTDIR to the location of JDK 6.
|
||||
Add the /bin directory of this installation to your PATH environment
|
||||
variable.
|
||||
|
||||
2. Check the sanity of doing a build with your current system:
|
||||
make sanity
|
||||
See README-builds.html if you run into problems.
|
||||
2. Configure the build:
|
||||
bash ./configure
|
||||
|
||||
3. Do a complete build of the OpenJDK:
|
||||
3. Build the OpenJDK:
|
||||
make all
|
||||
The resulting JDK image should be found in build/*/j2sdk-image
|
||||
The resulting JDK image should be found in build/*/images/j2sdk-image
|
||||
|
||||
where make is GNU make 3.81 or newer, /usr/bin/make on Linux usually
|
||||
is 3.81 or newer.
|
||||
is 3.81 or newer. Note that on Solaris, GNU make is called "gmake".
|
||||
|
||||
Complete details are available in README-builds.html.
|
||||
Complete details are available in the file:
|
||||
http://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html
|
||||
|
||||
4480
README-builds.html
4480
README-builds.html
File diff suppressed because it is too large
Load Diff
@@ -24,4 +24,4 @@
|
||||
# This Makefile was generated by configure @DATE_WHEN_CONFIGURED@
|
||||
# GENERATED FILE, DO NOT EDIT
|
||||
SPEC:=@OUTPUT_ROOT@/spec.gmk
|
||||
include @SRC_ROOT@/common/makefiles/Makefile
|
||||
include @SRC_ROOT@/NewMakefile.gmk
|
||||
|
||||
@@ -26,9 +26,11 @@ script_dir=`dirname $0`
|
||||
|
||||
# Create a timestamp as seconds since epoch
|
||||
if test "x`uname -s`" = "xSunOS"; then
|
||||
# date +%s is not available on Solaris, use this workaround
|
||||
# from http://solarisjedi.blogspot.co.uk/2006/06/solaris-date-command-and-epoch-time.html
|
||||
TIMESTAMP=`/usr/bin/truss /usr/bin/date 2>&1 | nawk -F= '/^time\(\)/ {gsub(/ /,"",$2);print $2}'`
|
||||
TIMESTAMP=`date +%s`
|
||||
if test "x$TIMESTAMP" = "x%s"; then
|
||||
# date +%s not available on this Solaris, use workaround from nawk(1):
|
||||
TIMESTAMP=`nawk 'BEGIN{print srand()}'`
|
||||
fi
|
||||
else
|
||||
TIMESTAMP=`date +%s`
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2013, 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
|
||||
@@ -90,13 +90,25 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE],
|
||||
tmp="$complete EOL"
|
||||
arguments="${tmp#* }"
|
||||
|
||||
new_path=`$WHICH $path 2> /dev/null`
|
||||
# Cannot rely on the command "which" here since it doesn't always work.
|
||||
is_absolute_path=`$ECHO "$path" | $GREP ^/`
|
||||
if test -z "$is_absolute_path"; then
|
||||
# Path to executable is not absolute. Find it.
|
||||
IFS_save="$IFS"
|
||||
IFS=:
|
||||
for p in $PATH; do
|
||||
if test -f "$p/$path" && test -x "$p/$path"; then
|
||||
new_path="$p/$path"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$IFS_save"
|
||||
else
|
||||
AC_MSG_NOTICE([Resolving $1 (as $path) failed, using $path directly.])
|
||||
new_path="$path"
|
||||
fi
|
||||
|
||||
if test "x$new_path" = x; then
|
||||
is_absolute_path=`$ECHO "$path" | $GREP ^/`
|
||||
if test "x$is_absolute_path" != x; then
|
||||
AC_MSG_NOTICE([Resolving $1 (as $path) with 'which' failed, using $path directly.])
|
||||
new_path="$path"
|
||||
else
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
|
||||
has_space=`$ECHO "$complete" | $GREP " "`
|
||||
if test "x$has_space" != x; then
|
||||
@@ -104,20 +116,19 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE],
|
||||
fi
|
||||
AC_MSG_ERROR([Cannot locate the the path of $1])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now join together the path and the arguments once again
|
||||
if test "x$arguments" != xEOL; then
|
||||
new_complete="$new_path ${arguments% *}"
|
||||
else
|
||||
new_complete="$new_path"
|
||||
fi
|
||||
# Now join together the path and the arguments once again
|
||||
if test "x$arguments" != xEOL; then
|
||||
new_complete="$new_path ${arguments% *}"
|
||||
else
|
||||
new_complete="$new_path"
|
||||
fi
|
||||
|
||||
if test "x$complete" != "x$new_complete"; then
|
||||
$1="$new_complete"
|
||||
AC_MSG_NOTICE([Rewriting $1 to "$new_complete"])
|
||||
fi
|
||||
$1="$new_complete"
|
||||
AC_MSG_NOTICE([Rewriting $1 to "$new_complete"])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
|
||||
@@ -129,7 +140,7 @@ AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
|
||||
if test "x$READLINK_TESTED" != yes; then
|
||||
# On MacOSX there is a readlink tool with a different
|
||||
# purpose than the GNU readlink tool. Check the found readlink.
|
||||
ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
|
||||
ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
|
||||
if test "x$ISGNU" = x; then
|
||||
# A readlink that we do not know how to use.
|
||||
# Are there other non-GNU readlinks out there?
|
||||
@@ -141,20 +152,24 @@ AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
|
||||
if test "x$READLINK" != x; then
|
||||
$1=`$READLINK -f [$]$1`
|
||||
else
|
||||
# Save the current directory for restoring afterwards
|
||||
STARTDIR=$PWD
|
||||
COUNTER=0
|
||||
sym_link_dir=`$DIRNAME [$]$1`
|
||||
sym_link_file=`$BASENAME [$]$1`
|
||||
# Use the system pwd and not the shell builtin to resolve directory symlinks
|
||||
cd $sym_link_dir
|
||||
cd `$THEPWDCMD`
|
||||
sym_link_dir=`$THEPWDCMD`
|
||||
# Resolve file symlinks
|
||||
while test $COUNTER -lt 20; do
|
||||
ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
|
||||
if test "x$ISLINK" == x; then
|
||||
# This is not a symbolic link! We are done!
|
||||
break
|
||||
fi
|
||||
# The link might be relative! We have to use cd to travel safely.
|
||||
cd $sym_link_dir
|
||||
# ... and we must get the to the absolute path, not one using symbolic links.
|
||||
cd `pwd -P`
|
||||
# Again resolve directory symlinks since the target of the just found
|
||||
# link could be in a different directory
|
||||
cd `$DIRNAME $ISLINK`
|
||||
sym_link_dir=`$THEPWDCMD`
|
||||
sym_link_file=`$BASENAME $ISLINK`
|
||||
@@ -219,7 +234,9 @@ BASIC_REQUIRE_PROG(BASH, bash)
|
||||
BASIC_REQUIRE_PROG(CAT, cat)
|
||||
BASIC_REQUIRE_PROG(CHMOD, chmod)
|
||||
BASIC_REQUIRE_PROG(CMP, cmp)
|
||||
BASIC_REQUIRE_PROG(COMM, comm)
|
||||
BASIC_REQUIRE_PROG(CP, cp)
|
||||
BASIC_REQUIRE_PROG(CPIO, cpio)
|
||||
BASIC_REQUIRE_PROG(CUT, cut)
|
||||
BASIC_REQUIRE_PROG(DATE, date)
|
||||
BASIC_REQUIRE_PROG(DIFF, [gdiff diff])
|
||||
@@ -286,7 +303,7 @@ AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
|
||||
# Where is the source? It is located two levels above the configure script.
|
||||
CURDIR="$PWD"
|
||||
cd "$AUTOCONF_DIR/../.."
|
||||
SRC_ROOT="`pwd`"
|
||||
SRC_ROOT="`$THEPWDCMD`"
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
PATH_SEP=";"
|
||||
@@ -345,7 +362,13 @@ AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
|
||||
[ CONF_NAME=${with_conf_name} ])
|
||||
|
||||
# Test from where we are running configure, in or outside of src root.
|
||||
if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
|
||||
# To enable comparison of directories, CURDIR needs to be symlink free
|
||||
# just like SRC_ROOT already is
|
||||
NOSYM_CURDIR="$CURDIR"
|
||||
BASIC_REMOVE_SYMBOLIC_LINKS(NOSYM_CURDIR)
|
||||
if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
|
||||
|| test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
|
||||
|| test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
|
||||
# We are running configure from the src root.
|
||||
# Create a default ./build/target-variant-debuglevel output root.
|
||||
if test "x${CONF_NAME}" = x; then
|
||||
@@ -612,6 +635,18 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
|
||||
fi
|
||||
])
|
||||
|
||||
# Check that source files have basic read permissions set. This might
|
||||
# not be the case in cygwin in certain conditions.
|
||||
AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
|
||||
[
|
||||
if test x"$OPENJDK_BUILD_OS" = xwindows; then
|
||||
file_to_test="$SRC_ROOT/LICENSE"
|
||||
if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
|
||||
AC_MSG_ERROR([Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin.])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
|
||||
[
|
||||
|
||||
@@ -621,6 +656,8 @@ BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUT_ROOT,
|
||||
[OUTPUT_DIR_IS_LOCAL="no"])
|
||||
AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL)
|
||||
|
||||
BASIC_CHECK_SRC_PERMS
|
||||
|
||||
# Check if the user has any old-style ALT_ variables set.
|
||||
FOUND_ALT_VARIABLES=`env | grep ^ALT_`
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN],
|
||||
# bat and cmd files are not always considered executable in cygwin causing which
|
||||
# to not find them
|
||||
if test "x$new_path" = x \
|
||||
&& test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
|
||||
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
|
||||
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
|
||||
new_path=`$CYGPATH -u "$path"`
|
||||
fi
|
||||
@@ -191,7 +191,7 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN],
|
||||
# bat and cmd files are not always considered executable in cygwin causing which
|
||||
# to not find them
|
||||
if test "x$new_path" = x \
|
||||
&& test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
|
||||
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
|
||||
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
|
||||
new_path=`$CYGPATH -u "$path"`
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,29 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Copyright (c) 2012, 2013, 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.
|
||||
#
|
||||
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
|
||||
26
common/autoconf/build-aux/config.sub
vendored
26
common/autoconf/build-aux/config.sub
vendored
@@ -1,4 +1,30 @@
|
||||
#! /bin/sh
|
||||
|
||||
#
|
||||
# Copyright (c) 2012, 2013, 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.
|
||||
#
|
||||
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
|
||||
@@ -1,4 +1,30 @@
|
||||
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
|
||||
#
|
||||
# Copyright (c) 2012, 2013, 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.
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
#
|
||||
|
||||
@@ -47,10 +47,6 @@ AC_DEFUN([BPERF_CHECK_CORES],
|
||||
FOUND_CORES=yes
|
||||
fi
|
||||
|
||||
# For c/c++ code we run twice as many concurrent build
|
||||
# jobs than we have cores, otherwise we will stall on io.
|
||||
CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
|
||||
|
||||
if test "x$FOUND_CORES" = xyes; then
|
||||
AC_MSG_RESULT([$NUM_CORES])
|
||||
else
|
||||
@@ -98,32 +94,62 @@ AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
|
||||
|
||||
AC_DEFUN_ONCE([BPERF_SETUP_BUILD_CORES],
|
||||
[
|
||||
# How many cores do we have on this build system?
|
||||
AC_ARG_WITH(num-cores, [AS_HELP_STRING([--with-num-cores],
|
||||
# How many cores do we have on this build system?
|
||||
AC_ARG_WITH(num-cores, [AS_HELP_STRING([--with-num-cores],
|
||||
[number of cores in the build system, e.g. --with-num-cores=8 @<:@probed@:>@])])
|
||||
if test "x$with_num_cores" = x; then
|
||||
if test "x$with_num_cores" = x; then
|
||||
# The number of cores were not specified, try to probe them.
|
||||
BPERF_CHECK_CORES
|
||||
else
|
||||
else
|
||||
NUM_CORES=$with_num_cores
|
||||
CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
|
||||
fi
|
||||
AC_SUBST(NUM_CORES)
|
||||
AC_SUBST(CONCURRENT_BUILD_JOBS)
|
||||
fi
|
||||
AC_SUBST(NUM_CORES)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BPERF_SETUP_BUILD_MEMORY],
|
||||
[
|
||||
# How much memory do we have on this build system?
|
||||
AC_ARG_WITH(memory-size, [AS_HELP_STRING([--with-memory-size],
|
||||
# How much memory do we have on this build system?
|
||||
AC_ARG_WITH(memory-size, [AS_HELP_STRING([--with-memory-size],
|
||||
[memory (in MB) available in the build system, e.g. --with-memory-size=1024 @<:@probed@:>@])])
|
||||
if test "x$with_memory_size" = x; then
|
||||
if test "x$with_memory_size" = x; then
|
||||
# The memory size was not specified, try to probe it.
|
||||
BPERF_CHECK_MEMORY_SIZE
|
||||
else
|
||||
else
|
||||
MEMORY_SIZE=$with_memory_size
|
||||
fi
|
||||
AC_SUBST(MEMORY_SIZE)
|
||||
fi
|
||||
AC_SUBST(MEMORY_SIZE)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BPERF_SETUP_BUILD_JOBS],
|
||||
[
|
||||
# Provide a decent default number of parallel jobs for make depending on
|
||||
# number of cores, amount of memory and machine architecture.
|
||||
AC_ARG_WITH(jobs, [AS_HELP_STRING([--with-jobs],
|
||||
[number of parallel jobs to let make run @<:@calculated based on cores and memory@:>@])])
|
||||
if test "x$with_jobs" = x; then
|
||||
# Number of jobs was not specified, calculate.
|
||||
AC_MSG_CHECKING([for appropriate number of jobs to run in parallel])
|
||||
# Approximate memory in GB, rounding up a bit.
|
||||
memory_gb=`expr $MEMORY_SIZE / 1100`
|
||||
# Pick the lowest of memory in gb and number of cores.
|
||||
if test "$memory_gb" -lt "$NUM_CORES"; then
|
||||
JOBS="$memory_gb"
|
||||
else
|
||||
JOBS="$NUM_CORES"
|
||||
# On bigger machines, leave some room for other processes to run
|
||||
if test "$JOBS" -gt "4"; then
|
||||
JOBS=`expr $JOBS '*' 90 / 100`
|
||||
fi
|
||||
fi
|
||||
# Cap number of jobs to 16
|
||||
if test "$JOBS" -gt "16"; then
|
||||
JOBS=16
|
||||
fi
|
||||
AC_MSG_RESULT([$JOBS])
|
||||
else
|
||||
JOBS=$with_jobs
|
||||
fi
|
||||
AC_SUBST(JOBS)
|
||||
])
|
||||
|
||||
AC_DEFUN([BPERF_SETUP_CCACHE],
|
||||
@@ -204,7 +230,7 @@ AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
|
||||
#
|
||||
AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers],
|
||||
[disable using precompiled headers when compiling C++ @<:@enabled@:>@])],
|
||||
[ENABLE_PRECOMPH=${enable_precompiled-headers}], [ENABLE_PRECOMPH=yes])
|
||||
[ENABLE_PRECOMPH=${enable_precompiled_headers}], [ENABLE_PRECOMPH=yes])
|
||||
|
||||
USE_PRECOMPILED_HEADER=1
|
||||
if test "x$ENABLE_PRECOMPH" = xno; then
|
||||
@@ -214,17 +240,16 @@ fi
|
||||
if test "x$ENABLE_PRECOMPH" = xyes; then
|
||||
# Check that the compiler actually supports precomp headers.
|
||||
if test "x$GCC" = xyes; then
|
||||
AC_MSG_CHECKING([that precompiled headers work])
|
||||
AC_MSG_CHECKING([that precompiled headers work])
|
||||
echo "int alfa();" > conftest.h
|
||||
$CXX -x c++-header conftest.h -o conftest.hpp.gch
|
||||
$CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD
|
||||
if test ! -f conftest.hpp.gch; then
|
||||
echo Precompiled header is not working!
|
||||
USE_PRECOMPILED_HEADER=0
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
rm -f conftest.h
|
||||
rm -f conftest.h conftest.hpp.gch
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2013 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
|
||||
@@ -48,6 +48,7 @@ GREP="@GREP@"
|
||||
JAVAP="@FIXPATH@ @BOOT_JDK@/bin/javap"
|
||||
LDD="@LDD@"
|
||||
MKDIR="@MKDIR@"
|
||||
NAWK="@NAWK@"
|
||||
NM="@NM@"
|
||||
OBJDUMP="@OBJDUMP@"
|
||||
OTOOL="@OTOOL@"
|
||||
|
||||
@@ -83,6 +83,9 @@ PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET
|
||||
BASIC_SETUP_PATHS
|
||||
BASIC_SETUP_LOGGING
|
||||
|
||||
# Check if it's a pure open build or if custom sources are to be used.
|
||||
JDKOPT_SETUP_OPEN_OR_CUSTOM
|
||||
|
||||
# These are needed to be able to create a configuration name (and thus the output directory)
|
||||
JDKOPT_SETUP_JDK_VARIANT
|
||||
JDKOPT_SETUP_JVM_VARIANTS
|
||||
@@ -201,6 +204,7 @@ JDKOPT_SETUP_BUILD_TWEAKS
|
||||
|
||||
BPERF_SETUP_BUILD_CORES
|
||||
BPERF_SETUP_BUILD_MEMORY
|
||||
BPERF_SETUP_BUILD_JOBS
|
||||
|
||||
# Setup smart javac (after cores and memory have been setup)
|
||||
BPERF_SETUP_SMART_JAVAC
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -174,7 +174,7 @@ printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
|
||||
|
||||
printf "\n"
|
||||
printf "Build performance summary:\n"
|
||||
printf "* Cores to use: $NUM_CORES\n"
|
||||
printf "* Cores to use: $JOBS\n"
|
||||
printf "* Memory limit: $MEMORY_SIZE MB\n"
|
||||
printf "* ccache status: $CCACHE_STATUS\n"
|
||||
printf "\n"
|
||||
|
||||
@@ -80,7 +80,7 @@ ALT_EXPORT_PATH=$(HOTSPOT_DIST)
|
||||
|
||||
HOTSPOT_MAKE_ARGS:=@HOTSPOT_MAKE_ARGS@ @STATIC_CXX_SETTING@
|
||||
# This is used from the libjvm build for C/C++ code.
|
||||
HOTSPOT_BUILD_JOBS:=@CONCURRENT_BUILD_JOBS@
|
||||
HOTSPOT_BUILD_JOBS:=$(JOBS)
|
||||
# Control wether Hotspot runs Queens test after building
|
||||
TEST_IN_BUILD=@TEST_IN_BUILD@
|
||||
|
||||
@@ -95,6 +95,26 @@ EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@
|
||||
EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@
|
||||
EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@
|
||||
|
||||
USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@
|
||||
|
||||
# Hotspot expects the variable FULL_DEBUG_SYMBOLS=1/0 to control debug symbols
|
||||
# creation.
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
|
||||
FULL_DEBUG_SYMBOLS=1
|
||||
# Ensure hotspot uses the objcopy that configure located
|
||||
ALT_OBJCOPY:=$(OBJCOPY)
|
||||
else
|
||||
FULL_DEBUG_SYMBOLS=0
|
||||
endif
|
||||
|
||||
# Hotspot expects the variable ZIP_DEBUGINFO_FILES=1/0 and not true/false.
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES)$(ENABLE_DEBUG_SYMBOLS), truetrue)
|
||||
ZIP_DEBUGINFO_FILES:=1
|
||||
endif
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES), false)
|
||||
ZIP_DEBUGINFO_FILES:=0
|
||||
endif
|
||||
|
||||
# Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files.
|
||||
# This is needed to get the LOG setting to work properly.
|
||||
include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2013, 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
|
||||
@@ -60,28 +60,30 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS],
|
||||
# Currently we have:
|
||||
# server: normal interpreter and a tiered C1/C2 compiler
|
||||
# client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
|
||||
# minimal1: reduced form of client with optional VM services and features stripped out
|
||||
# kernel: kernel footprint JVM that passes the TCK without major performance problems,
|
||||
# ie normal interpreter and C1, only the serial GC, kernel jvmti etc
|
||||
# zero: no machine code interpreter, no compiler
|
||||
# zeroshark: zero interpreter and shark/llvm compiler backend
|
||||
AC_MSG_CHECKING([which variants of the JVM to build])
|
||||
AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
|
||||
[JVM variants (separated by commas) to build (server, client, kernel, zero, zeroshark) @<:@server@:>@])])
|
||||
[JVM variants (separated by commas) to build (server, client, minimal1, kernel, zero, zeroshark) @<:@server@:>@])])
|
||||
|
||||
if test "x$with_jvm_variants" = x; then
|
||||
with_jvm_variants="server"
|
||||
fi
|
||||
|
||||
JVM_VARIANTS=",$with_jvm_variants,"
|
||||
TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
|
||||
TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
|
||||
|
||||
if test "x$TEST_VARIANTS" != "x,"; then
|
||||
AC_MSG_ERROR([The available JVM variants are: server, client, kernel, zero, zeroshark])
|
||||
AC_MSG_ERROR([The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark])
|
||||
fi
|
||||
AC_MSG_RESULT([$with_jvm_variants])
|
||||
|
||||
JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
|
||||
JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
|
||||
JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
|
||||
JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
|
||||
JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
|
||||
JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
|
||||
@@ -96,10 +98,15 @@ if test "x$JVM_VARIANT_KERNEL" = xtrue; then
|
||||
AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.])
|
||||
fi
|
||||
fi
|
||||
if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
AC_MSG_ERROR([You cannot build a minimal JVM for a 64-bit machine.])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Replace the commas with AND for use in the build directory name.
|
||||
ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
|
||||
COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
|
||||
COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
|
||||
if test "x$COUNT_VARIANTS" != "x,1"; then
|
||||
BUILDING_MULTIPLE_JVM_VARIANTS=yes
|
||||
else
|
||||
@@ -109,6 +116,7 @@ fi
|
||||
AC_SUBST(JVM_VARIANTS)
|
||||
AC_SUBST(JVM_VARIANT_SERVER)
|
||||
AC_SUBST(JVM_VARIANT_CLIENT)
|
||||
AC_SUBST(JVM_VARIANT_MINIMAL1)
|
||||
AC_SUBST(JVM_VARIANT_KERNEL)
|
||||
AC_SUBST(JVM_VARIANT_ZERO)
|
||||
AC_SUBST(JVM_VARIANT_ZEROSHARK)
|
||||
@@ -191,7 +199,9 @@ esac
|
||||
#####
|
||||
# Generate the legacy makefile targets for hotspot.
|
||||
# The hotspot api for selecting the build artifacts, really, needs to be improved.
|
||||
#
|
||||
# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
|
||||
# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
|
||||
# But until then ...
|
||||
HOTSPOT_TARGET=""
|
||||
|
||||
if test "x$JVM_VARIANT_SERVER" = xtrue; then
|
||||
@@ -202,6 +212,10 @@ if test "x$JVM_VARIANT_CLIENT" = xtrue; then
|
||||
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
|
||||
fi
|
||||
|
||||
if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
|
||||
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
|
||||
fi
|
||||
|
||||
if test "x$JVM_VARIANT_KERNEL" = xtrue; then
|
||||
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
|
||||
fi
|
||||
@@ -221,7 +235,7 @@ HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
|
||||
# from configure, but only server is valid anyway. Fix this
|
||||
# when hotspot makefiles are rewritten.
|
||||
if test "x$MACOSX_UNIVERSAL" = xtrue; then
|
||||
HOTSPOT_TARGET=universal_product
|
||||
HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
|
||||
fi
|
||||
|
||||
#####
|
||||
@@ -233,46 +247,50 @@ AC_SUBST(DEBUG_CLASSFILES)
|
||||
AC_SUBST(BUILD_VARIANT_RELEASE)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Should we build only OpenJDK even if closed sources are present?
|
||||
#
|
||||
AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
|
||||
[supress building closed source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"])
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_OPEN_OR_CUSTOM],
|
||||
[
|
||||
AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
|
||||
[suppress building custom source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"])
|
||||
|
||||
AC_MSG_CHECKING([for presence of closed sources])
|
||||
if test -d "$SRC_ROOT/jdk/src/closed"; then
|
||||
AC_MSG_CHECKING([for presence of closed sources])
|
||||
if test -d "$SRC_ROOT/jdk/src/closed"; then
|
||||
CLOSED_SOURCE_PRESENT=yes
|
||||
else
|
||||
CLOSED_SOURCE_PRESENT=no
|
||||
fi
|
||||
AC_MSG_RESULT([$CLOSED_SOURCE_PRESENT])
|
||||
|
||||
AC_MSG_CHECKING([if closed source is supressed (openjdk-only)])
|
||||
SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
|
||||
AC_MSG_RESULT([$SUPRESS_CLOSED_SOURCE])
|
||||
|
||||
if test "x$CLOSED_SOURCE_PRESENT" = xno; then
|
||||
OPENJDK=true
|
||||
if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
|
||||
AC_MSG_WARN([No closed source present, --enable-openjdk-only makes no sense])
|
||||
fi
|
||||
else
|
||||
if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
|
||||
OPENJDK=true
|
||||
else
|
||||
OPENJDK=false
|
||||
CLOSED_SOURCE_PRESENT=no
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT([$CLOSED_SOURCE_PRESENT])
|
||||
|
||||
if test "x$OPENJDK" = "xtrue"; then
|
||||
AC_MSG_CHECKING([if closed source is suppressed (openjdk-only)])
|
||||
SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
|
||||
AC_MSG_RESULT([$SUPPRESS_CLOSED_SOURCE])
|
||||
|
||||
if test "x$CLOSED_SOURCE_PRESENT" = xno; then
|
||||
OPENJDK=true
|
||||
if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
|
||||
AC_MSG_WARN([No closed source present, --enable-openjdk-only makes no sense])
|
||||
fi
|
||||
else
|
||||
if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
|
||||
OPENJDK=true
|
||||
else
|
||||
OPENJDK=false
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK" = "xtrue"; then
|
||||
SET_OPENJDK="OPENJDK=true"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(SET_OPENJDK)
|
||||
AC_SUBST(SET_OPENJDK)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@@ -355,13 +373,52 @@ COMPRESS_JARS=false
|
||||
AC_SUBST(COMPRESS_JARS)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Setup version numbers
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
|
||||
[
|
||||
# Source the version numbers
|
||||
. $AUTOCONF_DIR/version.numbers
|
||||
if test "x$OPENJDK" = "xfalse"; then
|
||||
. $AUTOCONF_DIR/closed.version.numbers
|
||||
. $AUTOCONF_DIR/version-numbers
|
||||
|
||||
# Get the settings from parameters
|
||||
AC_ARG_WITH(milestone, [AS_HELP_STRING([--with-milestone],
|
||||
[Set milestone value for build @<:@internal@:>@])])
|
||||
if test "x$with_milestone" = xyes; then
|
||||
AC_MSG_ERROR([Milestone must have a value])
|
||||
elif test "x$with_milestone" != x; then
|
||||
MILESTONE="$with_milestone"
|
||||
fi
|
||||
if test "x$MILESTONE" = x; then
|
||||
MILESTONE=internal
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(build-number, [AS_HELP_STRING([--with-build-number],
|
||||
[Set build number value for build @<:@b00@:>@])])
|
||||
if test "x$with_build_number" = xyes; then
|
||||
AC_MSG_ERROR([Build number must have a value])
|
||||
elif test "x$with_build_number" != x; then
|
||||
JDK_BUILD_NUMBER="$with_build_number"
|
||||
fi
|
||||
if test "x$JDK_BUILD_NUMBER" = x; then
|
||||
JDK_BUILD_NUMBER=b00
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix],
|
||||
[Add a custom string to the version string if build number isn't set.@<:@username_builddateb00@:>@])])
|
||||
if test "x$with_user_release_suffix" = xyes; then
|
||||
AC_MSG_ERROR([Release suffix must have a value])
|
||||
elif test "x$with_user_release_suffix" != x; then
|
||||
USER_RELEASE_SUFFIX="$with_user_release_suffix"
|
||||
else
|
||||
BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
|
||||
# Avoid [:alnum:] since it depends on the locale.
|
||||
CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
|
||||
USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
fi
|
||||
AC_SUBST(USER_RELEASE_SUFFIX)
|
||||
|
||||
# Now set the JDK version, milestone, build number etc.
|
||||
AC_SUBST(JDK_MAJOR_VERSION)
|
||||
AC_SUBST(JDK_MINOR_VERSION)
|
||||
@@ -380,34 +437,13 @@ AC_SUBST(MACOSX_BUNDLE_ID_BASE)
|
||||
COPYRIGHT_YEAR=`date +'%Y'`
|
||||
AC_SUBST(COPYRIGHT_YEAR)
|
||||
|
||||
RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
|
||||
AC_SUBST(RUNTIME_NAME)
|
||||
|
||||
if test "x$JDK_UPDATE_VERSION" != x; then
|
||||
JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
|
||||
JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
|
||||
else
|
||||
JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
|
||||
JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
|
||||
fi
|
||||
AC_SUBST(JDK_VERSION)
|
||||
|
||||
if test "x$MILESTONE" != x; then
|
||||
RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
|
||||
else
|
||||
RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
|
||||
fi
|
||||
AC_SUBST(RELEASE)
|
||||
|
||||
if test "x$JDK_BUILD_NUMBER" != x; then
|
||||
FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
|
||||
else
|
||||
JDK_BUILD_NUMBER=b00
|
||||
BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
|
||||
# Avoid [:alnum:] since it depends on the locale.
|
||||
CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
|
||||
USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
|
||||
fi
|
||||
AC_SUBST(FULL_VERSION)
|
||||
COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
|
||||
AC_SUBST(COOKED_BUILD_NUMBER)
|
||||
])
|
||||
@@ -420,7 +456,7 @@ AC_SUBST(HOTSPOT_MAKE_ARGS)
|
||||
# The name of the Service Agent jar.
|
||||
SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
|
||||
SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
|
||||
fi
|
||||
AC_SUBST(SALIB_NAME)
|
||||
|
||||
@@ -432,32 +468,30 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
|
||||
# ENABLE_DEBUG_SYMBOLS
|
||||
# This must be done after the toolchain is setup, since we're looking at objcopy.
|
||||
#
|
||||
ENABLE_DEBUG_SYMBOLS=default
|
||||
|
||||
# default on macosx is no...
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
ENABLE_DEBUG_SYMBOLS=no
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([debug-symbols],
|
||||
[AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])],
|
||||
[ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}],
|
||||
)
|
||||
[AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])])
|
||||
|
||||
AC_MSG_CHECKING([if we should generate debug symbols])
|
||||
|
||||
if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
|
||||
if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
|
||||
# explicit enabling of enable-debug-symbols and can't find objcopy
|
||||
# this is an error
|
||||
AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
|
||||
fi
|
||||
|
||||
if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
|
||||
if test "x$enable_debug_symbols" = "xyes"; then
|
||||
ENABLE_DEBUG_SYMBOLS=true
|
||||
elif test "x$enable_debug_symbols" = "xno"; then
|
||||
ENABLE_DEBUG_SYMBOLS=false
|
||||
else
|
||||
# default on macosx is false
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
ENABLE_DEBUG_SYMBOLS=false
|
||||
# Default is on if objcopy is found, otherwise off
|
||||
if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
ENABLE_DEBUG_SYMBOLS=yes
|
||||
elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
ENABLE_DEBUG_SYMBOLS=true
|
||||
else
|
||||
ENABLE_DEBUG_SYMBOLS=no
|
||||
ENABLE_DEBUG_SYMBOLS=false
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -466,22 +500,16 @@ AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
|
||||
#
|
||||
# ZIP_DEBUGINFO_FILES
|
||||
#
|
||||
ZIP_DEBUGINFO_FILES=yes
|
||||
|
||||
AC_ARG_ENABLE([zip-debug-info],
|
||||
[AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])],
|
||||
[ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}],
|
||||
)
|
||||
[AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])])
|
||||
|
||||
AC_MSG_CHECKING([if we should zip debug-info files])
|
||||
AC_MSG_RESULT([$ZIP_DEBUGINFO_FILES])
|
||||
AC_MSG_RESULT([${enable_zip_debug_info}])
|
||||
|
||||
# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
|
||||
# use that...
|
||||
if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
|
||||
ZIP_DEBUGINFO_FILES=1
|
||||
if test "x${enable_zip_debug_info}" = "xno"; then
|
||||
ZIP_DEBUGINFO_FILES=false
|
||||
else
|
||||
ZIP_DEBUGINFO_FILES=0
|
||||
ZIP_DEBUGINFO_FILES=true
|
||||
fi
|
||||
|
||||
AC_SUBST(ENABLE_DEBUG_SYMBOLS)
|
||||
|
||||
@@ -136,6 +136,12 @@ fi
|
||||
AC_PATH_X
|
||||
AC_PATH_XTRA
|
||||
|
||||
# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
|
||||
# this doesn't make sense so we remove it.
|
||||
if test "x$COMPILE_TYPE" = xcross; then
|
||||
X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'`
|
||||
fi
|
||||
|
||||
if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([x11])
|
||||
AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
|
||||
@@ -601,11 +607,16 @@ AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP],
|
||||
# statically link libstdc++ before C++ ABI is stablized on Linux unless
|
||||
# dynamic build is configured on command line.
|
||||
#
|
||||
AC_ARG_ENABLE([static-link-stdc++], [AS_HELP_STRING([--disable-static-link-stdc++],
|
||||
[disable static linking of the C++ runtime on Linux @<:@enabled@:>@])],,
|
||||
[
|
||||
enable_static_link_stdc__=yes
|
||||
])
|
||||
AC_ARG_WITH([stdc++lib], [AS_HELP_STRING([--with-stdc++lib=<static>,<dynamic>,<default>],
|
||||
[force linking of the C++ runtime on Linux to either static or dynamic, default is static with dynamic as fallback])],
|
||||
[
|
||||
if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
|
||||
&& test "x$with_stdc__lib" != xdefault; then
|
||||
AC_MSG_ERROR([Bad parameter value --with-stdc++lib=$with_stdc__lib!])
|
||||
fi
|
||||
],
|
||||
[with_stdc__lib=default]
|
||||
)
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
# Test if -lstdc++ works.
|
||||
@@ -636,31 +647,31 @@ if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
AC_LANG_POP(C++)
|
||||
AC_MSG_RESULT([$has_static_libstdcxx])
|
||||
|
||||
if test "x$has_static_libcxx" = xno && test "x$has_dynamic_libcxx" = xno; then
|
||||
AC_MSG_ERROR([I cannot link to stdc++! Neither dynamically nor statically.])
|
||||
if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
|
||||
AC_MSG_ERROR([Cannot link to stdc++, neither dynamically nor statically!])
|
||||
fi
|
||||
|
||||
if test "x$enable_static_link_stdc__" = xyes && test "x$has_static_libstdcxx" = xno; then
|
||||
AC_MSG_NOTICE([Static linking of libstdc++ was not possible reverting to dynamic linking.])
|
||||
enable_static_link_stdc__=no
|
||||
if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
|
||||
AC_MSG_ERROR([Static linking of libstdc++ was not possible!])
|
||||
fi
|
||||
|
||||
if test "x$enable_static_link_stdc__" = xno && test "x$has_dynamic_libstdcxx" = xno; then
|
||||
AC_MSG_NOTICE([Dynamic linking of libstdc++ was not possible reverting to static linking.])
|
||||
enable_static_link_stdc__=yes
|
||||
if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
|
||||
AC_MSG_ERROR([Dynamic linking of libstdc++ was not possible!])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([how to link with libstdc++])
|
||||
if test "x$enable_static_link_stdc__" = xyes; then
|
||||
LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
|
||||
LDCXX="$CC"
|
||||
STATIC_CXX_SETTING="STATIC_CXX=true"
|
||||
AC_MSG_RESULT([static])
|
||||
else
|
||||
# If dynamic was requested, it's available since it would fail above otherwise.
|
||||
# If dynamic wasn't requested, go with static unless it isn't available.
|
||||
if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
|
||||
LIBCXX="$LIBCXX -lstdc++"
|
||||
LDCXX="$CXX"
|
||||
STATIC_CXX_SETTING="STATIC_CXX=false"
|
||||
AC_MSG_RESULT([dynamic])
|
||||
else
|
||||
LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
|
||||
LDCXX="$CC"
|
||||
STATIC_CXX_SETTING="STATIC_CXX=true"
|
||||
AC_MSG_RESULT([static])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(STATIC_CXX_SETTING)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2013, 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
|
||||
@@ -163,11 +163,22 @@ MACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
|
||||
|
||||
# Different version strings generated from the above information.
|
||||
JDK_VERSION:=@JDK_VERSION@
|
||||
RUNTIME_NAME:=@RUNTIME_NAME@
|
||||
FULL_VERSION:=@FULL_VERSION@
|
||||
JRE_RELEASE_VERSION:=@FULL_VERSION@
|
||||
RELEASE:=@RELEASE@
|
||||
RUNTIME_NAME=$(PRODUCT_NAME) $(PRODUCT_SUFFIX)
|
||||
COOKED_BUILD_NUMBER:=@COOKED_BUILD_NUMBER@
|
||||
# These variables need to be generated here so that MILESTONE and
|
||||
# JDK_BUILD_NUMBER can be overridden on the make command line.
|
||||
ifeq ($(MILESTONE),)
|
||||
RELEASE=$(JDK_VERSION)$(BUILD_VARIANT_RELEASE)
|
||||
else
|
||||
RELEASE=$(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
|
||||
endif
|
||||
ifeq ($(JDK_BUILD_NUMBER),b00)
|
||||
USER_RELEASE_SUFFIX=@USER_RELEASE_SUFFIX@
|
||||
FULL_VERSION=$(RELEASE)-$(USER_RELEASE_SUFFIX)-$(JDK_BUILD_NUMBER)
|
||||
else
|
||||
FULL_VERSION=$(RELEASE)-$(JDK_BUILD_NUMBER)
|
||||
endif
|
||||
JRE_RELEASE_VERSION:=$(FULL_VERSION)
|
||||
|
||||
# How to compile the code: release, fastdebug or slowdebug
|
||||
DEBUG_LEVEL:=@DEBUG_LEVEL@
|
||||
@@ -185,11 +196,12 @@ SUPPORT_HEADLESS:=@SUPPORT_HEADLESS@
|
||||
|
||||
# These are the libjvms that we want to build.
|
||||
# The java launcher uses the default.
|
||||
# The other can be selected by specifying -client -server -kernel -zero or -zeroshark
|
||||
# The others can be selected by specifying -client -server -minimal1 -kernel -zero or -zeroshark
|
||||
# on the java launcher command line.
|
||||
JVM_VARIANTS:=@JVM_VARIANTS@
|
||||
JVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@
|
||||
JVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@
|
||||
JVM_VARIANT_MINIMAL1:=@JVM_VARIANT_MINIMAL1@
|
||||
JVM_VARIANT_KERNEL:=@JVM_VARIANT_KERNEL@
|
||||
JVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@
|
||||
JVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@
|
||||
@@ -219,6 +231,7 @@ JAXWS_OUTPUTDIR=$(BUILD_OUTPUT)/jaxws
|
||||
HOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot
|
||||
JDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk
|
||||
IMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images
|
||||
JCE_OUTPUTDIR=$(BUILD_OUTPUT)/jce-release
|
||||
|
||||
LANGTOOLS_DIST=$(LANGTOOLS_OUTPUTDIR)/dist
|
||||
CORBA_DIST=$(CORBA_OUTPUTDIR)/dist
|
||||
@@ -247,6 +260,9 @@ ENABLE_SJAVAC:=@ENABLE_SJAVAC@
|
||||
# the sjavac server log files.
|
||||
SJAVAC_SERVER_DIR:=@SJAVAC_SERVER_DIR@
|
||||
|
||||
# Number of parallel jobs to use for compilation
|
||||
JOBS?=@JOBS@
|
||||
|
||||
# The OpenJDK makefiles should be changed to using the standard
|
||||
# configure output ..._CFLAGS and ..._LIBS. In the meantime we
|
||||
# extract the information here.
|
||||
@@ -269,6 +285,9 @@ X_CFLAGS:=@X_CFLAGS@
|
||||
X_LIBS:=@X_LIBS@
|
||||
OPENWIN_HOME:=@OPENWIN_HOME@
|
||||
|
||||
# The lowest required version of macosx to enforce compatiblity for
|
||||
MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
|
||||
|
||||
# There are two types: CC or CL
|
||||
# CC is gcc and others behaving reasonably similar.
|
||||
# CL is cl.exe only.
|
||||
@@ -419,6 +438,14 @@ RMIC=@FIXPATH@ $(BOOT_JDK)/bin/rmic
|
||||
|
||||
NATIVE2ASCII=@FIXPATH@ $(BOOT_JDK)/bin/native2ascii
|
||||
|
||||
JARSIGNER=@FIXPATH@ $(BOOT_JDK)/bin/jarsigner
|
||||
|
||||
# You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ...
|
||||
BOOTSTRAP_JAVAC_JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar
|
||||
BOOTSTRAP_JAVAC_ARGS:="-Xbootclasspath/p:$(BOOTSTRAP_JAVAC_JAR)" -cp $(BOOTSTRAP_JAVAC_JAR)
|
||||
NEW_JAVAC = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javac.Main
|
||||
NEW_JAVADOC = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javadoc.Main
|
||||
|
||||
# Base flags for RC
|
||||
# Guarding this against resetting value. Legacy make files include spec multiple
|
||||
# times.
|
||||
@@ -439,10 +466,13 @@ CCACHE:=@CCACHE@
|
||||
# CD is going away, but remains to cater for legacy makefiles.
|
||||
CD:=cd
|
||||
CHMOD:=@CHMOD@
|
||||
COMM:=@COMM@
|
||||
CP:=@CP@
|
||||
CPIO:=@CPIO@
|
||||
CUT:=@CUT@
|
||||
DATE:=@DATE@
|
||||
DIFF:=@DIFF@
|
||||
DIRNAME:=@DIRNAME@
|
||||
FIND:=@FIND@
|
||||
FIND_DELETE:=@FIND_DELETE@
|
||||
ECHO:=@ECHO@
|
||||
@@ -467,6 +497,7 @@ TEE:=@TEE@
|
||||
TIME:=@TIME@
|
||||
TR:=@TR@
|
||||
TOUCH:=@TOUCH@
|
||||
UNIQ:=@UNIQ@
|
||||
WC:=@WC@
|
||||
XARGS:=@XARGS@
|
||||
ZIPEXE:=@ZIP@
|
||||
@@ -599,5 +630,21 @@ OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@
|
||||
OS_VERSION_MINOR:=@OS_VERSION_MINOR@
|
||||
OS_VERSION_MICRO:=@OS_VERSION_MICRO@
|
||||
|
||||
# Images directory definitions
|
||||
JDK_IMAGE_SUBDIR:=j2sdk-image
|
||||
JRE_IMAGE_SUBDIR:=j2re-image
|
||||
JDK_OVERLAY_IMAGE_SUBDIR:=j2sdk-overlay-image
|
||||
JRE_OVERLAY_IMAGE_SUBDIR:=j2re-overlay-image
|
||||
JDK_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR)
|
||||
JRE_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR)
|
||||
JDK_OVERLAY_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JDK_OVERLAY_IMAGE_SUBDIR)
|
||||
JRE_OVERLAY_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JRE_OVERLAY_IMAGE_SUBDIR)
|
||||
|
||||
# Macosx bundles directory definitions
|
||||
JDK_BUNDLE_SUBDIR:=j2sdk-bundle/jdk$(JDK_VERSION).jdk/Contents
|
||||
JRE_BUNDLE_SUBDIR:=j2re-bundle/jre$(JDK_VERSION).jre/Contents
|
||||
JDK_BUNDLE_DIR:=$(IMAGES_OUTPUTDIR)/$(JDK_BUNDLE_SUBDIR)
|
||||
JRE_BUNDLE_DIR:=$(IMAGES_OUTPUTDIR)/$(JRE_BUNDLE_SUBDIR)
|
||||
|
||||
# Include the custom-spec.gmk file if it exists
|
||||
-include $(dir @SPEC@)/custom-spec.gmk
|
||||
|
||||
@@ -114,13 +114,25 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
|
||||
[
|
||||
COMPILER_NAME=$2
|
||||
|
||||
# Do a first initial attempt at searching the list of compiler names.
|
||||
$1=
|
||||
# If TOOLS_DIR is set, check for all compiler names in there first
|
||||
# before checking the rest of the PATH.
|
||||
if test -n "$TOOLS_DIR"; then
|
||||
PATH_save="$PATH"
|
||||
PATH="$TOOLS_DIR"
|
||||
AC_PATH_PROGS(TOOLS_DIR_$1, $3)
|
||||
$1=$TOOLS_DIR_$1
|
||||
PATH="$PATH_save"
|
||||
fi
|
||||
|
||||
# AC_PATH_PROGS can't be run multiple times with the same variable,
|
||||
# so create a new name for this run.
|
||||
AC_PATH_PROGS(POTENTIAL_$1, $3)
|
||||
$1=$POTENTIAL_$1
|
||||
if test "x[$]$1" = x; then
|
||||
AC_PATH_PROGS(POTENTIAL_$1, $3)
|
||||
$1=$POTENTIAL_$1
|
||||
fi
|
||||
|
||||
if test "x$[$]$1" = x; then
|
||||
if test "x[$]$1" = x; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([devkit])
|
||||
AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
|
||||
fi
|
||||
@@ -437,7 +449,10 @@ fi
|
||||
# full debug symbols are enabled.
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
AC_CHECK_TOOLS(OBJCOPY, [gobjcopy objcopy])
|
||||
BASIC_FIXUP_EXECUTABLE(OBJCOPY)
|
||||
# Only call fixup if objcopy was found.
|
||||
if test -n "$OBJCOPY"; then
|
||||
BASIC_FIXUP_EXECUTABLE(OBJCOPY)
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CHECK_TOOLS(OBJDUMP, [gobjdump objdump])
|
||||
@@ -861,6 +876,17 @@ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
|
||||
# Setting these parameters makes it an error to link to macosx APIs that are
|
||||
# newer than the given OS version and makes the linked binaries compatible even
|
||||
# if built on a newer version of the OS.
|
||||
# The expected format is X.Y.Z
|
||||
MACOSX_VERSION_MIN=10.7.0
|
||||
AC_SUBST(MACOSX_VERSION_MIN)
|
||||
# The macro takes the version with no dots, ex: 1070
|
||||
# Let the flags variables get resolved in make for easier override on make
|
||||
# command line.
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
|
||||
LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xbsd; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
|
||||
@@ -935,10 +961,22 @@ else
|
||||
fi
|
||||
fi
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
|
||||
-L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server \
|
||||
-L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client \
|
||||
-L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
|
||||
|
||||
# On some platforms (mac) the linker warns about non existing -L dirs.
|
||||
# Add server first if available. Linking aginst client does not always produce the same results.
|
||||
# Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
|
||||
# Default to server for other variants.
|
||||
if test "x$JVM_VARIANT_SERVER" = xtrue; then
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
|
||||
elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
|
||||
elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
|
||||
else
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
|
||||
fi
|
||||
|
||||
LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
|
||||
if test "x$COMPILER_NAME" = xossc; then
|
||||
LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
|
||||
|
||||
@@ -48,7 +48,12 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
|
||||
METHOD="$2"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(WIN_SDK_BASE)
|
||||
if test -d "$WIN_SDK_BASE"; then
|
||||
if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
|
||||
# There have been cases of partial or broken SDK installations. A missing
|
||||
# lib dir is not going to work.
|
||||
if test ! -d "$WIN_SDK_BASE/../lib"; then
|
||||
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
|
||||
AC_MSG_NOTICE([Warning: Installation is broken, lib dir is missing. Ignoring])
|
||||
elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
|
||||
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
|
||||
VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||
@@ -200,8 +205,9 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
|
||||
else
|
||||
AC_MSG_RESULT([ok])
|
||||
VS_INCLUDE="$INCLUDE"
|
||||
VS_LIB="$LIB"
|
||||
# Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
|
||||
VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
|
||||
VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
|
||||
VS_PATH="$PATH"
|
||||
AC_SUBST(VS_INCLUDE)
|
||||
AC_SUBST(VS_LIB)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2013, 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
|
||||
@@ -27,8 +27,6 @@ JDK_MAJOR_VERSION=1
|
||||
JDK_MINOR_VERSION=8
|
||||
JDK_MICRO_VERSION=0
|
||||
JDK_UPDATE_VERSION=
|
||||
JDK_BUILD_NUMBER=
|
||||
MILESTONE=internal
|
||||
LAUNCHER_NAME=openjdk
|
||||
PRODUCT_NAME=OpenJDK
|
||||
PRODUCT_SUFFIX="Runtime Environment"
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2013 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
|
||||
@@ -98,24 +98,30 @@ diff_text() {
|
||||
if test "x$SUFFIX" = "xclass"; then
|
||||
# To improve performance when large diffs are found, do a rough filtering of classes
|
||||
# elibeble for these exceptions
|
||||
if $GREP -R -e '[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}' -e thePoint -e aPoint -e setItemsPtr ${THIS_FILE} > /dev/null; then
|
||||
if $GREP -R -e '[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}' \
|
||||
-e '[0-9]\{2\}/[0-9]\{2\}/[0-9]\{4\}' \
|
||||
-e thePoint -e aPoint -e setItemsPtr ${THIS_FILE} > /dev/null; then
|
||||
$JAVAP -c -constants -l -p ${OTHER_FILE} > ${OTHER_FILE}.javap
|
||||
$JAVAP -c -constants -l -p ${THIS_FILE} > ${THIS_FILE}.javap
|
||||
TMP=$($DIFF ${OTHER_FILE}.javap ${THIS_FILE}.javap | \
|
||||
$GREP '^[<>]' | \
|
||||
$SED -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d' \
|
||||
-e '/[0-9]\{2\}\/[0-9]\{2\}\/[0-9]\{4\}/d' \
|
||||
-e '/[<>].*Point Lcom\/apple\/jobjc\/foundation\/NSPoint;/d' \
|
||||
-e '/[<>].*public com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*itemsPtr();/d' \
|
||||
-e '/[<>].*public void setItemsPtr(com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*);/d')
|
||||
fi
|
||||
fi
|
||||
if test "x$SUFFIX" = "xproperties"; then
|
||||
$CAT $OTHER_FILE | $SED -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
|
||||
| $SED -f "$SRC_ROOT/common/makefiles/support/unicode2x.sed" \
|
||||
| $SED -e '/^#/d' -e '/^$/d' \
|
||||
-e :a -e '/\\$/N; s/\\\n//; ta' \
|
||||
-e 's/^[ \t]*//;s/[ \t]*$//' \
|
||||
-e 's/\\=/=/' | LANG=C $SORT > $OTHER_FILE.cleaned
|
||||
# Run through nawk to add possibly missing newline at end of file.
|
||||
$CAT $OTHER_FILE | $NAWK '{ print }' > $OTHER_FILE.cleaned
|
||||
# Disable this exception since we aren't changing the properties cleaning method yet.
|
||||
# $CAT $OTHER_FILE | $SED -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
|
||||
# | $SED -f "$SRC_ROOT/common/makefiles/support/unicode2x.sed" \
|
||||
# | $SED -e '/^#/d' -e '/^$/d' \
|
||||
# -e :a -e '/\\$/N; s/\\\n//; ta' \
|
||||
# -e 's/^[ \t]*//;s/[ \t]*$//' \
|
||||
# -e 's/\\=/=/' | LANG=C $SORT > $OTHER_FILE.cleaned
|
||||
TMP=$(LANG=C $DIFF $OTHER_FILE.cleaned $THIS_FILE)
|
||||
fi
|
||||
if test -n "$TMP"; then
|
||||
@@ -283,13 +289,14 @@ compare_general_files() {
|
||||
! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
|
||||
! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" \
|
||||
! -name "*.pdb" ! -name "*.exp" ! -name "*.ilk" \
|
||||
! -name "*.lib" ! -name "*.war" \
|
||||
! -name "*.lib" ! -name "*.war" ! -name "JavaControlPanel" \
|
||||
| $GREP -v "./bin/" | $SORT | $FILTER)
|
||||
|
||||
echo General files...
|
||||
for f in $GENERAL_FILES
|
||||
do
|
||||
if [ -e $OTHER_DIR/$f ]; then
|
||||
SUFFIX="${f##*.}"
|
||||
if [ "$(basename $f)" = "release" ]; then
|
||||
# Ignore differences in change numbers in release file.
|
||||
OTHER_FILE=$WORK_DIR/$f.other
|
||||
@@ -298,6 +305,25 @@ compare_general_files() {
|
||||
$MKDIR -p $(dirname $THIS_FILE)
|
||||
$CAT $OTHER_DIR/$f | $SED 's/\:[0-9a-f]\{12,12\}/:CHANGE/g' > $OTHER_FILE
|
||||
$CAT $THIS_DIR/$f | $SED 's/\:[0-9a-f]\{12,12\}/:CHANGE/g' > $THIS_FILE
|
||||
elif [ "x$SUFFIX" = "xhtml" ]; then
|
||||
# Ignore time stamps in docs files
|
||||
OTHER_FILE=$WORK_DIR/$f.other
|
||||
THIS_FILE=$WORK_DIR/$f.this
|
||||
$MKDIR -p $(dirname $OTHER_FILE)
|
||||
$MKDIR -p $(dirname $THIS_FILE)
|
||||
#Note that | doesn't work on mac sed.
|
||||
$CAT $OTHER_DIR/$f | $SED -e 's/\(-- Generated by javadoc \).*\( --\)/\1(removed)\2/' \
|
||||
-e 's/\(<meta name="date" content="\).*\(">\)/\1(removed)\2/' \
|
||||
-e 's/[A-Z][a-z]*, [A-Z][a-z]* [0-9][0-9]*, [12][0-9]* [0-9][0-9:]* [AMP]\{2,2\} [A-Z][A-Z]*/(removed)/' \
|
||||
-e 's/[A-Z][a-z]* [A-Z][a-z]* [0-9][0-9] [0-9][0-9:]* [A-Z][A-Z]* [12][0-9]*/(removed)/' \
|
||||
-e 's/^\( from \).*\(\.idl\)$/\1(removed)\2/' \
|
||||
> $OTHER_FILE
|
||||
$CAT $THIS_DIR/$f | $SED -e 's/\(-- Generated by javadoc \).*\( --\)/\1(removed)\2/' \
|
||||
-e 's/\(<meta name="date" content="\).*\(">\)/\1(removed)\2/' \
|
||||
-e 's/[A-Z][a-z]*, [A-Z][a-z]* [0-9][0-9]*, [12][0-9]* [0-9][0-9:]* [AMP]\{2,2\} [A-Z][A-Z]*/(removed)/' \
|
||||
-e 's/[A-Z][a-z]* [A-Z][a-z]* [0-9][0-9] [0-9][0-9:]* [A-Z][A-Z]* [12][0-9]*/(removed)/' \
|
||||
-e 's/^\( from \).*\(\.idl\)$/\1(removed)\2/' \
|
||||
> $THIS_FILE
|
||||
else
|
||||
OTHER_FILE=$OTHER_DIR/$f
|
||||
THIS_FILE=$THIS_DIR/$f
|
||||
@@ -324,9 +350,15 @@ compare_zip_file() {
|
||||
OTHER_DIR=$2
|
||||
WORK_DIR=$3
|
||||
ZIP_FILE=$4
|
||||
# Optionally provide different name for other zipfile
|
||||
OTHER_ZIP_FILE=$5
|
||||
|
||||
THIS_ZIP=$THIS_DIR/$ZIP_FILE
|
||||
OTHER_ZIP=$OTHER_DIR/$ZIP_FILE
|
||||
if [ -n "$OTHER_ZIP_FILE" ]; then
|
||||
OTHER_ZIP=$OTHER_DIR/$OTHER_ZIP_FILE
|
||||
else
|
||||
OTHER_ZIP=$OTHER_DIR/$ZIP_FILE
|
||||
fi
|
||||
|
||||
THIS_SUFFIX="${THIS_ZIP##*.}"
|
||||
OTHER_SUFFIX="${OTHER_ZIP##*.}"
|
||||
@@ -353,14 +385,14 @@ compare_zip_file() {
|
||||
(cd $OTHER_UNZIPDIR && $UNARCHIVE $OTHER_ZIP)
|
||||
|
||||
# Find all archives inside and unzip them as well to compare the contents rather than
|
||||
# the archives.
|
||||
EXCEPTIONS=""
|
||||
for pack in $($FIND $THIS_UNZIPDIR -name "*.pack" -o -name "*.pack.gz"); do
|
||||
# the archives. pie.jar.pack.gz i app3.war is corrupt, skip it.
|
||||
EXCEPTIONS="pie.jar.pack.gz"
|
||||
for pack in $($FIND $THIS_UNZIPDIR \( -name "*.pack" -o -name "*.pack.gz" \) -a ! -name pie.jar.pack.gz); do
|
||||
($UNPACK200 $pack $pack.jar)
|
||||
# Filter out the unzipped archives from the diff below.
|
||||
EXCEPTIONS="$EXCEPTIONS $pack $pack.jar"
|
||||
done
|
||||
for pack in $($FIND $OTHER_UNZIPDIR -name "*.pack" -o -name "*.pack.gz"); do
|
||||
for pack in $($FIND $OTHER_UNZIPDIR \( -name "*.pack" -o -name "*.pack.gz" \) -a ! -name pie.jar.pack.gz); do
|
||||
($UNPACK200 $pack $pack.jar)
|
||||
EXCEPTIONS="$EXCEPTIONS $pack $pack.jar"
|
||||
done
|
||||
@@ -611,10 +643,19 @@ compare_bin_file() {
|
||||
DIFF_SIZE_NUM=$($EXPR $THIS_SIZE - $OTHER_SIZE)
|
||||
DIFF_SIZE_REL=$($EXPR $THIS_SIZE \* 100 / $OTHER_SIZE)
|
||||
SIZE_MSG=$($PRINTF "%3d%% %4d" $DIFF_SIZE_REL $DIFF_SIZE_NUM)
|
||||
if [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] && [ "$DIFF_SIZE_REL" -gt 98 ] && [ "$DIFF_SIZE_REL" -lt 102 ]; then
|
||||
if [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] && [ "$DIFF_SIZE_REL" -gt 98 ] \
|
||||
&& [ "$DIFF_SIZE_REL" -lt 102 ]; then
|
||||
SIZE_MSG="($SIZE_MSG)"
|
||||
DIFF_SIZE=
|
||||
elif [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] && [ "$DIFF_SIZE_NUM" = 512 ]; then
|
||||
elif [ "$OPENJDK_TARGET_OS" = "windows" ] \
|
||||
&& [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] \
|
||||
&& [ "$DIFF_SIZE_NUM" = 512 ]; then
|
||||
# On windows, size of binaries increase in 512 increments.
|
||||
SIZE_MSG="($SIZE_MSG)"
|
||||
DIFF_SIZE=
|
||||
elif [ "$OPENJDK_TARGET_OS" = "windows" ] \
|
||||
&& [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] \
|
||||
&& [ "$DIFF_SIZE_NUM" = -512 ]; then
|
||||
# On windows, size of binaries increase in 512 increments.
|
||||
SIZE_MSG="($SIZE_MSG)"
|
||||
DIFF_SIZE=
|
||||
@@ -840,7 +881,7 @@ compare_all_libs() {
|
||||
OTHER_DIR=$2
|
||||
WORK_DIR=$3
|
||||
|
||||
LIBS=$(cd $THIS_DIR && $FIND . -type f \( -name 'lib*.so' -o -name '*.dylib' -o -name '*.dll' \) | $SORT | $FILTER)
|
||||
LIBS=$(cd $THIS_DIR && $FIND . -type f \( -name 'lib*.so' -o -name '*.dylib' -o -name '*.dll' -o -name 'JavaControlPanel' \) | $SORT | $FILTER)
|
||||
|
||||
if [ -n "$LIBS" ]; then
|
||||
echo Libraries...
|
||||
@@ -927,6 +968,9 @@ if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "-?" ] || [ "$1" = "/h" ] || [ "$1
|
||||
echo "[FILTER] List filenames in the image to compare, works for jars, zips, libs and execs"
|
||||
echo "Example:"
|
||||
echo "bash ./common/bin/compareimages.sh CodePointIM.jar"
|
||||
echo ""
|
||||
echo "-2zips <file1> <file2> Compare two zip files only"
|
||||
echo ""
|
||||
exit 10
|
||||
fi
|
||||
|
||||
@@ -988,6 +1032,13 @@ while [ -n "$1" ]; do
|
||||
-execs)
|
||||
CMP_EXECS=true
|
||||
;;
|
||||
-2zips)
|
||||
CMP_2_ZIPS=true
|
||||
THIS_FILE=$2
|
||||
OTHER_FILE=$3
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
CMP_NAMES=false
|
||||
CMP_PERMS=false
|
||||
@@ -1006,6 +1057,18 @@ while [ -n "$1" ]; do
|
||||
shift
|
||||
done
|
||||
|
||||
if [ "$CMP_2_ZIPS" = "true" ]; then
|
||||
THIS_DIR="$(dirname $THIS_FILE)"
|
||||
THIS_DIR="$(cd "$THIS_DIR" && pwd )"
|
||||
OTHER_DIR="$(dirname $OTHER_FILE)"
|
||||
OTHER_DIR="$(cd "$OTHER_DIR" && pwd )"
|
||||
THIS_FILE_NAME="$(basename $THIS_FILE)"
|
||||
OTHER_FILE_NAME="$(basename $OTHER_FILE)"
|
||||
echo Comparing $THIS_DIR/$THIS_FILE_NAME and $OTHER_DIR/$OTHER_FILE_NAME
|
||||
compare_zip_file $THIS_DIR $OTHER_DIR $COMPARE_ROOT/2zips $THIS_FILE_NAME $OTHER_FILE_NAME
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$CMP_NAMES" = "false" ] && [ "$CMP_TYPES" = "false" ] && [ "$CMP_PERMS" = "false" ] && [ "$CMP_GENERAL" = "false" ] && [ "$CMP_ZIPS" = "false" ] && [ "$CMP_JARS" = "false" ] && [ "$CMP_LIBS" = "false" ] && [ "$CMP_EXECS" = "false" ]; then
|
||||
CMP_NAMES=true
|
||||
CMP_PERMS=true
|
||||
@@ -1047,7 +1110,11 @@ fi
|
||||
|
||||
|
||||
# Figure out the layout of the this build. Which kinds of images have been produced
|
||||
if [ -d "$THIS/deploy/j2sdk-image" ]; then
|
||||
if [ -d "$THIS/install/j2sdk-image" ]; then
|
||||
THIS_J2SDK="$THIS/install/j2sdk-image"
|
||||
THIS_J2RE="$THIS/install/j2re-image"
|
||||
echo "Comparing install images"
|
||||
elif [ -d "$THIS/deploy/j2sdk-image" ]; then
|
||||
THIS_J2SDK="$THIS/deploy/j2sdk-image"
|
||||
THIS_J2RE="$THIS/deploy/j2re-image"
|
||||
echo "Comparing deploy images"
|
||||
@@ -1055,9 +1122,16 @@ elif [ -d "$THIS/images/j2sdk-image" ]; then
|
||||
THIS_J2SDK="$THIS/images/j2sdk-image"
|
||||
THIS_J2RE="$THIS/images/j2re-image"
|
||||
fi
|
||||
|
||||
if [ -d "$THIS/images/j2sdk-overlay-image" ]; then
|
||||
THIS_J2SDK_OVERLAY="$THIS/images/j2sdk-overlay-image"
|
||||
THIS_J2RE_OVERLAY="$THIS/images/j2re-overlay-image"
|
||||
if [ -d "$THIS/install/j2sdk-image" ]; then
|
||||
# If there is an install image, prefer that, it's also overlay
|
||||
THIS_J2SDK_OVERLAY="$THIS/install/j2sdk-image"
|
||||
THIS_J2RE_OVERLAY="$THIS/install/j2re-image"
|
||||
else
|
||||
THIS_J2SDK_OVERLAY="$THIS/images/j2sdk-overlay-image"
|
||||
THIS_J2RE_OVERLAY="$THIS/images/j2re-overlay-image"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d "$THIS/images/j2sdk-bundle" ]; then
|
||||
@@ -1074,7 +1148,9 @@ if [ -d "$OTHER/j2sdk-image" ]; then
|
||||
OTHER_J2SDK_OVERLAY="$OTHER/j2sdk-image"
|
||||
OTHER_J2RE_OVERLAY="$OTHER/j2re-image"
|
||||
fi
|
||||
|
||||
elif [ -d "$OTHER/images/j2sdk-image" ]; then
|
||||
OTHER_J2SDK="$OTHER/images/j2sdk-image"
|
||||
OTHER_J2RE="$OTHER/images/j2re-image"
|
||||
fi
|
||||
|
||||
if [ -d "$OTHER/j2sdk-bundle" ]; then
|
||||
@@ -1102,6 +1178,42 @@ if [ -z "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
|
||||
echo "Skipping bundle compare!"
|
||||
fi
|
||||
|
||||
if [ -d "$THIS/docs" ]; then
|
||||
THIS_DOCS="$THIS/docs"
|
||||
fi
|
||||
|
||||
if [ -d "$OTHER/docs" ]; then
|
||||
OTHER_DOCS="$OTHER/docs"
|
||||
fi
|
||||
|
||||
if [ -z "$THIS_DOCS" ]; then
|
||||
echo "WARNING! Docs haven't been built and won't be compared."
|
||||
fi
|
||||
|
||||
if [ -z "$OTHER_DOCS" ]; then
|
||||
echo "WARNING! Other build doesn't contain docs, skipping doc compare."
|
||||
fi
|
||||
|
||||
if [ -d "$OTHER/images" ]; then
|
||||
OTHER_SEC_DIR="$OTHER/images"
|
||||
else
|
||||
OTHER_SEC_DIR="$OTHER/tmp"
|
||||
fi
|
||||
OTHER_SEC_BIN="$OTHER_SEC_DIR/sec-bin.zip"
|
||||
THIS_SEC_DIR="$THIS/images"
|
||||
THIS_SEC_BIN="$THIS_SEC_DIR/sec-bin.zip"
|
||||
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
if [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then
|
||||
JGSS_WINDOWS_BIN="jgss-windows-x64-bin.zip"
|
||||
else
|
||||
JGSS_WINDOWS_BIN="jgss-windows-i586-bin.zip"
|
||||
fi
|
||||
OTHER_SEC_WINDOWS_BIN="$OTHER_SEC_DIR/sec-windows-bin.zip"
|
||||
OTHER_JGSS_WINDOWS_BIN="$OTHER_SEC_DIR/$JGSS_WINDOWS_BIN"
|
||||
THIS_SEC_WINDOWS_BIN="$THIS_SEC_DIR/sec-windows-bin.zip"
|
||||
THIS_JGSS_WINDOWS_BIN="$THIS_SEC_DIR/$JGSS_WINDOWS_BIN"
|
||||
fi
|
||||
|
||||
##########################################################################################
|
||||
# Do the work
|
||||
|
||||
@@ -1139,6 +1251,12 @@ if [ "$CMP_NAMES" = "true" ]; then
|
||||
echo -n "J2RE Bundle "
|
||||
compare_files $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/j2re-bundle
|
||||
fi
|
||||
if [ -n "$THIS_DOCS" ] && [ -n "$OTHER_DOCS" ]; then
|
||||
echo -n "Docs "
|
||||
compare_dirs $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs
|
||||
echo -n "Docs "
|
||||
compare_files $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CMP_PERMS" = "true" ]; then
|
||||
@@ -1202,12 +1320,34 @@ if [ "$CMP_GENERAL" = "true" ]; then
|
||||
echo -n "J2RE Bundle "
|
||||
compare_general_files $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/j2re-bundle
|
||||
fi
|
||||
if [ -n "$THIS_DOCS" ] && [ -n "$OTHER_DOCS" ]; then
|
||||
echo -n "Docs "
|
||||
compare_general_files $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CMP_ZIPS" = "true" ]; then
|
||||
if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
|
||||
compare_all_zip_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
|
||||
fi
|
||||
if [ -n "$THIS_SEC_BIN" ] && [ -n "$OTHER_SEC_BIN" ]; then
|
||||
if [ -n "$(echo $THIS_SEC_BIN | $FILTER)" ]; then
|
||||
echo "sec-bin.zip..."
|
||||
compare_zip_file $THIS_SEC_DIR $OTHER_SEC_DIR $COMPARE_ROOT/sec-bin sec-bin.zip
|
||||
fi
|
||||
fi
|
||||
if [ -n "$THIS_SEC_WINDOWS_BIN" ] && [ -n "$OTHER_SEC_WINDOWS_BIN" ]; then
|
||||
if [ -n "$(echo $THIS_SEC_WINDOWS_BIN | $FILTER)" ]; then
|
||||
echo "sec-windows-bin.zip..."
|
||||
compare_zip_file $THIS_SEC_DIR $OTHER_SEC_DIR $COMPARE_ROOT/sec-bin sec-windows-bin.zip
|
||||
fi
|
||||
fi
|
||||
if [ -n "$THIS_JGSS_WINDOWS_BIN" ] && [ -n "$OTHER_JGSS_WINDOWS_BIN" ]; then
|
||||
if [ -n "$(echo $THIS_JGSS_WINDOWS_BIN | $FILTER)" ]; then
|
||||
echo "$JGSS_WINDOWS_BIN..."
|
||||
compare_zip_file $THIS_SEC_DIR $OTHER_SEC_DIR $COMPARE_ROOT/sec-bin $JGSS_WINDOWS_BIN
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CMP_JARS" = "true" ]; then
|
||||
@@ -1218,7 +1358,12 @@ fi
|
||||
|
||||
if [ "$CMP_LIBS" = "true" ]; then
|
||||
if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
|
||||
echo -n "J2SDK "
|
||||
compare_all_libs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
|
||||
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
|
||||
echo -n "J2RE "
|
||||
compare_all_libs $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
|
||||
fi
|
||||
fi
|
||||
if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
|
||||
echo -n "Bundle "
|
||||
|
||||
@@ -80,6 +80,7 @@ ACCEPTED_BIN_DIFF="
|
||||
./bin/javadoc
|
||||
./bin/javah
|
||||
./bin/javap
|
||||
./bin/jdeps
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
./bin/jdb
|
||||
@@ -167,6 +168,7 @@ ACCEPTED_BIN_DIFF="
|
||||
./bin/javadoc
|
||||
./bin/javah
|
||||
./bin/javap
|
||||
./bin/jdeps
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
./bin/jdb
|
||||
@@ -291,6 +293,14 @@ ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./jre/plugin/i386/ns4/libjavaplugin.so
|
||||
./jre/plugin/i386/ns7/libjavaplugin_oji.so
|
||||
./jre/lib/i386/server/libjvm.so
|
||||
./jre/lib/i386/client/64/libjvm_db.so
|
||||
./jre/lib/i386/client/64/libjvm_dtrace.so
|
||||
./jre/lib/i386/client/libjvm_db.so
|
||||
./jre/lib/i386/client/libjvm_dtrace.so
|
||||
./jre/lib/i386/server/64/libjvm_db.so
|
||||
./jre/lib/i386/server/64/libjvm_dtrace.so
|
||||
./jre/lib/i386/server/libjvm_db.so
|
||||
./jre/lib/i386/server/libjvm_dtrace.so
|
||||
./bin/appletviewer
|
||||
./bin/extcheck
|
||||
./bin/idlj
|
||||
@@ -301,6 +311,7 @@ ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./bin/javadoc
|
||||
./bin/javah
|
||||
./bin/javap
|
||||
./bin/jdeps
|
||||
./bin/javaws
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
@@ -348,7 +359,9 @@ ACCEPTED_SMALL_SIZE_DIFF="
|
||||
SKIP_FULLDUMP_DIFF="true"
|
||||
|
||||
# Filter random C++ symbol strings.
|
||||
DIS_DIFF_FILTER="$SED -e s/\.[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g"
|
||||
# Some numbers differ randomly.
|
||||
# Can't use space in these expressions as the shell will mess with them.
|
||||
DIS_DIFF_FILTER="$SED -e s/\.[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g -e s/\([0-9a-f][0-9a-f].\)\{2,8\}[0-9a-f][0-9a-f]/<NUMS>/g -e s/\(0x\)[0-9a-f]*\([,(>]\)/\1<HEX>\2/g -e s/\(0x\)[0-9a-f]*$/\1<HEX>/g -e s/\(\#.\)[0-9a-f]*\(.<\)/\1<HEX>\2/g -e s/[\.A-Za-z0-9%]\{16,16\}$/<BIN>/g"
|
||||
|
||||
fi
|
||||
|
||||
@@ -426,6 +439,9 @@ ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./jre/lib/amd64/libzip.so
|
||||
./jre/lib/amd64/server/64/libjvm_db.so
|
||||
./jre/lib/amd64/server/64/libjvm_dtrace.so
|
||||
./jre/lib/amd64/server/libjvm.so
|
||||
./jre/lib/amd64/server/libjvm_db.so
|
||||
./jre/lib/amd64/server/libjvm_dtrace.so
|
||||
./bin/amd64/appletviewer
|
||||
./bin/amd64/extcheck
|
||||
./bin/amd64/idlj
|
||||
@@ -436,6 +452,7 @@ ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./bin/amd64/javadoc
|
||||
./bin/amd64/javah
|
||||
./bin/amd64/javap
|
||||
./bin/amd64/jdeps
|
||||
./bin/amd64/jcmd
|
||||
./bin/amd64/jconsole
|
||||
./bin/amd64/jdb
|
||||
@@ -480,7 +497,9 @@ ACCEPTED_SMALL_SIZE_DIFF="
|
||||
SKIP_FULLDUMP_DIFF="true"
|
||||
|
||||
# Filter random C++ symbol strings.
|
||||
DIS_DIFF_FILTER="$SED -e s/\.[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g"
|
||||
# Some numbers differ randomly.
|
||||
# Can't use space in these expressions as the shell will mess with them.
|
||||
DIS_DIFF_FILTER="$SED -e s/\.[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g -e s/\([0-9a-f][0-9a-f].\)\{2,8\}[0-9a-f][0-9a-f]/<NUMS>/g -e s/\(0x\)[0-9a-f]*\([,(>]\)/\1<HEX>\2/g -e s/\(0x\)[0-9a-f]*$/\1<HEX>/g -e s/\(\#.\)[0-9a-f]*\(.<\)/\1<HEX>\2/g -e s/[\.A-Za-z0-9%]\{16,16\}$/<BIN>/g"
|
||||
|
||||
fi
|
||||
|
||||
@@ -591,6 +610,7 @@ ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./bin/javadoc
|
||||
./bin/javah
|
||||
./bin/javap
|
||||
./bin/jdeps
|
||||
./bin/javaws
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
@@ -736,6 +756,7 @@ ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./bin/sparcv9/javadoc
|
||||
./bin/sparcv9/javah
|
||||
./bin/sparcv9/javap
|
||||
./bin/sparcv9/jdeps
|
||||
./bin/sparcv9/jcmd
|
||||
./bin/sparcv9/jconsole
|
||||
./bin/sparcv9/jdb
|
||||
@@ -792,6 +813,10 @@ fi
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
|
||||
ACCEPTED_JARZIP_CONTENTS="
|
||||
/bin/w2k_lsa_auth.dll
|
||||
"
|
||||
|
||||
# Probably should add all libs here
|
||||
ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./demo/jvmti/gctest/lib/gctest.dll
|
||||
@@ -800,6 +825,7 @@ ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./jre/bin/attach.dll
|
||||
./jre/bin/java_crw_demo.dll
|
||||
./jre/bin/jsoundds.dll
|
||||
./jre/bin/server/jvm.dll
|
||||
./bin/appletviewer.exe
|
||||
./bin/extcheck.exe
|
||||
./bin/idlj.exe
|
||||
@@ -811,6 +837,7 @@ ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./bin/javadoc.exe
|
||||
./bin/javah.exe
|
||||
./bin/javap.exe
|
||||
./bin/jdeps.exe
|
||||
./bin/javaw.exe
|
||||
./bin/jcmd.exe
|
||||
./bin/jconsole.exe
|
||||
@@ -860,6 +887,17 @@ ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./jre/bin/unpack200.exe
|
||||
"
|
||||
|
||||
# jabswitch.exe is compiled and linked with incremental turned on in the old
|
||||
# build. This makes no sense, so it's turned off in the new build.
|
||||
ACCEPTED_SIZE_DIFF="
|
||||
./bin/jabswitch.exe
|
||||
./jre/bin/jabswitch.exe
|
||||
"
|
||||
ACCEPTED_DIS_DIFF="
|
||||
./bin/jabswitch.exe
|
||||
./jre/bin/jabswitch.exe
|
||||
"
|
||||
|
||||
# On windows, there are unavoidable allignment issues making
|
||||
# a perfect disasm diff impossible. Filter out the following:
|
||||
# * Random parts of C++ symbols (this is a bit greedy, but does the trick)
|
||||
@@ -881,6 +919,7 @@ ACCEPTED_JARZIP_CONTENTS="
|
||||
|
||||
KNOWN_BIN_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
./lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
ACCEPTED_BIN_DIFF="
|
||||
@@ -894,6 +933,7 @@ ACCEPTED_BIN_DIFF="
|
||||
./bin/javadoc
|
||||
./bin/javah
|
||||
./bin/javap
|
||||
./bin/jdeps
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
./bin/jdb
|
||||
@@ -932,26 +972,34 @@ ACCEPTED_BIN_DIFF="
|
||||
./jre/bin/tnameserv
|
||||
./jre/lib/libsaproc.dylib
|
||||
./jre/lib/server/libjvm.dylib
|
||||
./lib/libsaproc.dylib
|
||||
./lib/server/libjvm.dylib
|
||||
./lib/deploy/JavaControlPanel.prefPane/Contents/MacOS/JavaControlPanel
|
||||
"
|
||||
|
||||
KNOWN_SIZE_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
./lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
SORT_SYMBOLS="
|
||||
./jre/lib/libJObjC.dylib
|
||||
./lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
KNOWN_SYM_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
./lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
KNOWN_ELF_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
./lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
KNOWN_DIS_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
./lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
fi
|
||||
|
||||
215
common/bin/hgforest.sh
Normal file
215
common/bin/hgforest.sh
Normal file
@@ -0,0 +1,215 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Shell script for a fast parallel forest command
|
||||
command="$1"
|
||||
pull_extra_base="$2"
|
||||
|
||||
# Python always buffers stdout significantly, thus we will not see any output from hg clone jdk,
|
||||
# until a lot of time has passed! By passing -u to python, we get incremental updates
|
||||
# on stdout. Much nicer.
|
||||
whichhg="`which hg`"
|
||||
|
||||
if [ "${whichhg}" = "" ] ; then
|
||||
echo Cannot find hg!
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "" = "$command" ] ; then
|
||||
echo No command to hg supplied!
|
||||
exit 1
|
||||
fi
|
||||
|
||||
has_hash_bang="`head -n 1 "${whichhg}" | cut -b 1-2`"
|
||||
python=""
|
||||
bpython=""
|
||||
|
||||
if [ "#!" = "$has_hash_bang" ] ; then
|
||||
python="`head -n 1 ${whichhg} | cut -b 3-`"
|
||||
bpython="`basename "$python"`"
|
||||
fi
|
||||
|
||||
if [ "python" = "$bpython" -a -x "$python" ] ; then
|
||||
hg="${python} -u ${whichhg}"
|
||||
else
|
||||
echo Cannot find python from hg launcher. Running plain hg, which probably has buffered stdout.
|
||||
hg="hg"
|
||||
fi
|
||||
|
||||
# Clean out the temporary directory that stores the pid files.
|
||||
tmp=/tmp/forest.$$
|
||||
rm -f -r ${tmp}
|
||||
mkdir -p ${tmp}
|
||||
|
||||
safe_interrupt () {
|
||||
if [ -d ${tmp} ]; then
|
||||
if [ "`ls ${tmp}/*.pid`" != "" ]; then
|
||||
echo "Waiting for processes ( `cat ${tmp}/*.pid | tr '\n' ' '`) to terminate nicely!"
|
||||
sleep 1
|
||||
# Pipe stderr to dev/null to silence kill, that complains when trying to kill
|
||||
# a subprocess that has already exited.
|
||||
kill -TERM `cat ${tmp}/*.pid | tr '\n' ' '` 2> /dev/null
|
||||
wait
|
||||
echo Interrupt complete!
|
||||
fi
|
||||
fi
|
||||
rm -f -r ${tmp}
|
||||
exit 1
|
||||
}
|
||||
|
||||
nice_exit () {
|
||||
if [ -d ${tmp} ]; then
|
||||
if [ "`ls ${tmp}`" != "" ]; then
|
||||
wait
|
||||
fi
|
||||
fi
|
||||
rm -f -r ${tmp}
|
||||
}
|
||||
|
||||
trap 'safe_interrupt' INT QUIT
|
||||
trap 'nice_exit' EXIT
|
||||
|
||||
# Only look in specific locations for possible forests (avoids long searches)
|
||||
pull_default=""
|
||||
repos=""
|
||||
repos_extra=""
|
||||
if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then
|
||||
subrepos="corba jaxp jaxws langtools jdk hotspot"
|
||||
if [ -f .hg/hgrc ] ; then
|
||||
pull_default=`hg paths default`
|
||||
if [ "${pull_default}" = "" ] ; then
|
||||
echo "ERROR: Need initial clone with 'hg paths default' defined"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if [ "${pull_default}" = "" ] ; then
|
||||
echo "ERROR: Need initial repository to use this script"
|
||||
exit 1
|
||||
fi
|
||||
for i in ${subrepos} ; do
|
||||
if [ ! -f ${i}/.hg/hgrc ] ; then
|
||||
repos="${repos} ${i}"
|
||||
fi
|
||||
done
|
||||
if [ "${pull_extra_base}" != "" ] ; then
|
||||
subrepos_extra="jdk/src/closed jdk/make/closed jdk/test/closed hotspot/make/closed hotspot/src/closed hotspot/test/closed deploy install sponsors pubs"
|
||||
pull_default_tail=`echo ${pull_default} | sed -e 's@^.*://[^/]*/\(.*\)@\1@'`
|
||||
pull_extra="${pull_extra_base}/${pull_default_tail}"
|
||||
for i in ${subrepos_extra} ; do
|
||||
if [ ! -f ${i}/.hg/hgrc ] ; then
|
||||
repos_extra="${repos_extra} ${i}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
at_a_time=2
|
||||
# Any repos to deal with?
|
||||
if [ "${repos}" = "" -a "${repos_extra}" = "" ] ; then
|
||||
exit
|
||||
fi
|
||||
else
|
||||
hgdirs=`ls -d ./.hg ./*/.hg ./*/*/.hg ./*/*/*/.hg ./*/*/*/*/.hg 2>/dev/null`
|
||||
# Derive repository names from the .hg directory locations
|
||||
for i in ${hgdirs} ; do
|
||||
repos="${repos} `echo ${i} | sed -e 's@/.hg$@@'`"
|
||||
done
|
||||
for i in ${repos} ; do
|
||||
if [ -h ${i}/.hg/store/lock -o -f ${i}/.hg/store/lock ] ; then
|
||||
locked="${i} ${locked}"
|
||||
fi
|
||||
done
|
||||
at_a_time=8
|
||||
# Any repos to deal with?
|
||||
if [ "${repos}" = "" ] ; then
|
||||
echo "No repositories to process."
|
||||
exit
|
||||
fi
|
||||
if [ "${locked}" != "" ] ; then
|
||||
echo "These repositories are locked: ${locked}"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
# Echo out what repositories we do a command on.
|
||||
echo "# Repositories: ${repos} ${repos_extra}"
|
||||
echo
|
||||
|
||||
# Run the supplied command on all repos in parallel.
|
||||
n=0
|
||||
for i in ${repos} ${repos_extra} ; do
|
||||
n=`expr ${n} '+' 1`
|
||||
repopidfile=`echo ${i} | sed -e 's@./@@' -e 's@/@_@g'`
|
||||
reponame=`echo ${i} | sed -e :a -e 's/^.\{1,20\}$/ &/;ta'`
|
||||
pull_base="${pull_default}"
|
||||
for j in $repos_extra ; do
|
||||
if [ "$i" = "$j" ] ; then
|
||||
pull_base="${pull_extra}"
|
||||
fi
|
||||
done
|
||||
(
|
||||
(
|
||||
if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then
|
||||
pull_newrepo="`echo ${pull_base}/${i} | sed -e 's@\([^:]/\)//*@\1@g'`"
|
||||
echo ${hg} clone ${pull_newrepo} ${i}
|
||||
path="`dirname ${i}`"
|
||||
if [ "${path}" != "." ] ; then
|
||||
times=0
|
||||
while [ ! -d "${path}" ] ## nested repo, ensure containing dir exists
|
||||
do
|
||||
times=`expr ${times} '+' 1`
|
||||
if [ `expr ${times} '%' 10` -eq 0 ] ; then
|
||||
echo ${path} still not created, waiting...
|
||||
fi
|
||||
sleep 5
|
||||
done
|
||||
fi
|
||||
(${hg} clone ${pull_newrepo} ${i}; echo "$?" > ${tmp}/${repopidfile}.pid.rc )&
|
||||
else
|
||||
echo "cd ${i} && ${hg} $*"
|
||||
cd ${i} && (${hg} "$@"; echo "$?" > ${tmp}/${repopidfile}.pid.rc )&
|
||||
fi
|
||||
echo $! > ${tmp}/${repopidfile}.pid
|
||||
) 2>&1 | sed -e "s@^@${reponame}: @") &
|
||||
|
||||
if [ `expr ${n} '%' ${at_a_time}` -eq 0 ] ; then
|
||||
sleep 2
|
||||
echo Waiting 5 secs before spawning next background command.
|
||||
sleep 3
|
||||
fi
|
||||
done
|
||||
# Wait for all hg commands to complete
|
||||
wait
|
||||
|
||||
# Terminate with exit 0 only if all subprocesses were successful
|
||||
ec=0
|
||||
if [ -d ${tmp} ]; then
|
||||
for rc in ${tmp}/*.pid.rc ; do
|
||||
exit_code=`cat ${rc} | tr -d ' \n\r'`
|
||||
if [ "${exit_code}" != "0" ] ; then
|
||||
echo "WARNING: ${rc} exited abnormally."
|
||||
ec=1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
exit ${ec}
|
||||
@@ -71,7 +71,7 @@ define add_idl_package
|
||||
$4
|
||||
$(RM) -f $$(addprefix $3/$$($4_TMPDIR)/,$6)
|
||||
$(CP) -rp $3/$$($4_TMPDIR)/* $3
|
||||
($(CD) $3/$$($4_TMPDIR); find . -type f | sed 's!\./!$3/!g' | awk '{ print $$$$1 ": $4" }' > $5)
|
||||
($(CD) $3/$$($4_TMPDIR) && $(FIND) . -type f | $(SED) 's!\./!$3/!g' | $(NAWK) '{ print $$$$1 ": $4" }' > $5)
|
||||
$(RM) -rf $3/$$($4_TMPDIR)
|
||||
endef
|
||||
|
||||
@@ -87,7 +87,7 @@ $(if $(16),$(error Internal makefile error: Too many arguments to SetupIdlCompil
|
||||
$1_SRC := $$(abspath $$($1_SRC))
|
||||
$1_BIN := $$(abspath $$($1_BIN))
|
||||
# Find all existing java files and existing class files.
|
||||
$$(shell $(MKDIR) -p $$($1_SRC) $$($1_BIN))
|
||||
$$(eval $$(call MakeDir,$$($1_BIN)))
|
||||
$1_SRCS := $$(shell find $$($1_SRC) -name "*.idl")
|
||||
$1_BINS := $$(shell find $$($1_BIN) -name "*.java")
|
||||
# Prepend the source/bin path to the filter expressions.
|
||||
|
||||
@@ -42,8 +42,8 @@ endif
|
||||
FALSE_FIND_PATTERN:=-name FILE_NAME_THAT_DOESNT_EXIST
|
||||
|
||||
define SetupJavaCompiler
|
||||
# param 1 is for example BOOT_JAVAC or NEW_JAVAC
|
||||
# This is the name later used to decide which java compiler to use.
|
||||
# param 1 is for example GENERATE_OLD_BYTECODE or GENERATE_NEW_JDKBYTECODE
|
||||
# This is the name of the compiler setup.
|
||||
# param 2-9 are named args.
|
||||
# JVM:=The jvm used to run the javac/javah command
|
||||
# JAVAC:=The javac jar and bootstrap classpath changes, or just bin/javac if JVM is left out
|
||||
@@ -111,9 +111,9 @@ define SetupArchive
|
||||
ifeq ($$(word 20,$$($1_GREP_INCLUDE_PATTERNS)),)
|
||||
$1_GREP_INCLUDES:=| $(GREP) $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_INCLUDE_PATTERNS))
|
||||
else
|
||||
$$(shell $(MKDIR) -p $$($1_BIN) && $(RM) $$($1_BIN)/_the.$$($1_JARNAME)_include)
|
||||
$$(eval $$(call ListPathsSafelyNow,$1_GREP_INCLUDE_PATTERNS,\n, \
|
||||
>> $$($1_BIN)/_the.$$($1_JARNAME)_include))
|
||||
$1_GREP_INCLUDE_OUTPUT:=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_include && \
|
||||
$$(strip $$(call ListPathsSafely,$1_GREP_INCLUDE_PATTERNS,\n, \
|
||||
>> $$($1_BIN)/_the.$$($1_JARNAME)_include))
|
||||
$1_GREP_INCLUDES:=| $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include
|
||||
endif
|
||||
endif
|
||||
@@ -124,9 +124,9 @@ define SetupArchive
|
||||
ifeq ($$(word 20,$$($1_GREP_EXCLUDE_PATTERNS)),)
|
||||
$1_GREP_EXCLUDES:=| $(GREP) -v $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_EXCLUDE_PATTERNS))
|
||||
else
|
||||
$$(shell $(MKDIR) -p $$($1_BIN) && $(RM) $$($1_BIN)/_the.$$($1_JARNAME)_exclude)
|
||||
$$(eval $$(call ListPathsSafelyNow,$1_GREP_EXCLUDE_PATTERNS,\n, \
|
||||
>> $$($1_BIN)/_the.$$($1_JARNAME)_exclude))
|
||||
$1_GREP_EXCLUDE_OUTPUT=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_exclude && \
|
||||
$$(strip $$(call ListPathsSafely,$1_GREP_EXCLUDE_PATTERNS,\n, \
|
||||
>> $$($1_BIN)/_the.$$($1_JARNAME)_exclude))
|
||||
$1_GREP_EXCLUDES:=| $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude
|
||||
endif
|
||||
endif
|
||||
@@ -137,19 +137,25 @@ define SetupArchive
|
||||
else
|
||||
$1_JARINDEX = true
|
||||
endif
|
||||
# When this macro is run in the same makefile as the java compilation, dependencies are transfered
|
||||
# in make variables. When the macro is run in a different makefile than the java compilation, the
|
||||
# dependencies need to be found in the filesystem.
|
||||
# When this macro is run in the same makefile as the java compilation, dependencies are
|
||||
# transfered in make variables. When the macro is run in a different makefile than the
|
||||
# java compilation, the dependencies need to be found in the filesystem.
|
||||
ifneq (,$2)
|
||||
$1_DEPS:=$2
|
||||
else
|
||||
$1_DEPS:=$$(filter $$(addprefix %,$$($1_SUFFIXES)),\
|
||||
$$(call CacheFind,$$($1_SRCS)))
|
||||
ifneq (,$$($1_GREP_INCLUDE_PATTERNS))
|
||||
$1_DEPS:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPS))
|
||||
endif
|
||||
ifneq (,$$($1_GREP_EXCLUDE_PATTERNS))
|
||||
$1_DEPS:=$$(filter-out $$(addsuffix %,$$($1_GREP_EXCLUDE_PATTERNS)),$$($1_DEPS))
|
||||
endif
|
||||
# The subst of \ is needed because $ has to be escaped with \ in EXTRA_FILES for the command
|
||||
# lines, but not here for use in make dependencies.
|
||||
$1_DEPS:=$$(shell $(FIND) $$($1_SRCS) -type f -a \( $$($1_FIND_PATTERNS) \) \
|
||||
$$($1_GREP_INCLUDES) $$($1_GREP_EXCLUDES)) \
|
||||
$$(subst \,,$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,$$($1_EXTRA_FILES))))
|
||||
$1_DEPS+=$$(subst \,,$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,$$($1_EXTRA_FILES))))
|
||||
ifeq (,$$($1_SKIP_METAINF))
|
||||
$1_DEPS+=$$(shell $(FIND) $$(addsuffix /META-INF,$$($1_SRCS)) -type f 2> /dev/null))
|
||||
$1_DEPS+=$$(call CacheFind $$(wildcard $$(addsuffix /META-INF,$$($1_SRCS))))
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -210,6 +216,8 @@ define SetupArchive
|
||||
# Here is the rule that creates/updates the jar file.
|
||||
$$($1_JAR) : $$($1_DEPS)
|
||||
$(MKDIR) -p $$($1_BIN)
|
||||
$$($1_GREP_INCLUDE_OUTPUT)
|
||||
$$($1_GREP_EXCLUDE_OUTPUT)
|
||||
$$(if $$($1_MANIFEST),\
|
||||
$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
|
||||
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $$($1_MANIFEST) > $$($1_MANIFEST_FILE) \
|
||||
@@ -242,14 +250,14 @@ endef
|
||||
define SetupZipArchive
|
||||
# param 1 is for example ZIP_MYSOURCE
|
||||
# param 2,3,4,5,6,7,8,9 are named args.
|
||||
# SRC,ZIP,INCLUDES,EXCLUDES,EXCLUDE_FILES,SUFFIXES,EXTRA_DEPS
|
||||
# SRC,ZIP,INCLUDES,INCLUDE_FILES,EXCLUDES,EXCLUDE_FILES,SUFFIXES,EXTRA_DEPS
|
||||
$(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
|
||||
$(call LogSetupMacroEntry,SetupZipArchive($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
|
||||
$(if $(16),$(error Internal makefile error: Too many arguments to SetupZipArchive, please update JavaCompilation.gmk))
|
||||
|
||||
# Find all files in the source tree.
|
||||
$1_SUFFIX_FILTER := $$(patsubst %,-o -name $(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES))
|
||||
$1_ALL_SRCS := $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i -type f -a ! -name "_the.*" \( -name FALSE_DUMMY $$($1_SUFFIX_FILTER) \) ))
|
||||
$1_ALL_SRCS := $$(call not-containing,_the.,\
|
||||
$$(filter $$(addprefix %,$$($1_SUFFIXES)),$$(call CacheFind $$($1_SRC))))
|
||||
|
||||
ifneq ($$($1_INCLUDES),)
|
||||
$1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
|
||||
@@ -259,6 +267,12 @@ define SetupZipArchive
|
||||
else
|
||||
$1_ZIP_INCLUDES := $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_INCLUDES)))
|
||||
endif
|
||||
endif
|
||||
ifneq ($$($1_INCLUDE_FILES),)
|
||||
$1_SRC_INCLUDES += $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
|
||||
$1_ZIP_INCLUDES += $$(addprefix -i$(SPACE),$$($1_INCLUDE_FILES))
|
||||
endif
|
||||
ifneq ($$($1_SRC_INCLUDES),)
|
||||
$1_ALL_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_SRCS))
|
||||
endif
|
||||
ifneq ($$($1_EXCLUDES),)
|
||||
@@ -275,10 +289,12 @@ define SetupZipArchive
|
||||
# Explicitly excluded files can be given with absolute path. The patsubst solution
|
||||
# isn't perfect but the likelyhood of an absolute path to match something in a src
|
||||
# dir is very small.
|
||||
# If zip has nothing to do, it returns 12 and would fail the build. Check for 12
|
||||
# and only fail if it's not.
|
||||
$$($1_ZIP) : $$($1_ALL_SRCS) $$($1_EXTRA_DEPS)
|
||||
$(MKDIR) -p $$(@D)
|
||||
$(ECHO) Updating $$($1_NAME)
|
||||
$$(foreach i,$$($1_SRC),(cd $$i && $(ZIP) -qru $$@ . $$($1_ZIP_INCLUDES) $$($1_ZIP_EXCLUDES) -x \*_the.\* $$(addprefix -x$(SPACE),$$(patsubst $$i/%,%,$$($1_EXCLUDE_FILES))))$$(NEWLINE)) true
|
||||
$$(foreach i,$$($1_SRC),(cd $$i && $(ZIP) -qru $$@ . $$($1_ZIP_INCLUDES) $$($1_ZIP_EXCLUDES) -x \*_the.\* $$(addprefix -x$(SPACE),$$(patsubst $$i/%,%,$$($1_EXCLUDE_FILES))) || test "$$$$?" = "12" )$$(NEWLINE)) true
|
||||
$(TOUCH) $$@
|
||||
endef
|
||||
|
||||
@@ -374,7 +390,7 @@ define SetupJavaCompilation
|
||||
$$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupJavaCompilation $1 contains missing directory $$d)))
|
||||
$$(eval $$(call MakeDir,$$($1_BIN)))
|
||||
# Find all files in the source trees.
|
||||
$1_ALL_SRCS := $$(filter-out $(OVR_SRCS),$$(shell $(FIND) $$($1_SRC) -type f))
|
||||
$1_ALL_SRCS += $$(filter-out $(OVR_SRCS),$$(call CacheFind,$$($1_SRC)))
|
||||
# Extract the java files.
|
||||
ifneq ($$($1_EXCLUDE_FILES),)
|
||||
$1_EXCLUDE_FILES_PATTERN:=$$(addprefix %,$$($1_EXCLUDE_FILES))
|
||||
@@ -406,8 +422,6 @@ define SetupJavaCompilation
|
||||
|
||||
# Find all files to be copied from source to bin.
|
||||
ifneq (,$$($1_COPY))
|
||||
# Rewrite list of patterns into a find statement.
|
||||
$1_COPY_PATTERN:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_COPY))
|
||||
# Search for all files to be copied.
|
||||
$1_ALL_COPIES := $$(filter $$(addprefix %,$$($1_COPY)),$$($1_ALL_SRCS))
|
||||
# Copy these explicitly
|
||||
@@ -434,8 +448,6 @@ define SetupJavaCompilation
|
||||
|
||||
# Find all property files to be copied and cleaned from source to bin.
|
||||
ifneq (,$$($1_CLEAN))
|
||||
# Rewrite list of patterns into a find statement.
|
||||
$1_CLEAN_PATTERN:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_CLEAN))
|
||||
# Search for all files to be copied.
|
||||
$1_ALL_CLEANS := $$(filter $$(addprefix %,$$($1_CLEAN)),$$($1_ALL_SRCS))
|
||||
# Copy and clean must also respect filters.
|
||||
@@ -475,10 +487,10 @@ define SetupJavaCompilation
|
||||
# Using sjavac to compile.
|
||||
$1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/javac_state
|
||||
|
||||
# Create SJAVAC variable,
|
||||
# expects $1_JAVAC to be "bootclasspathprepend -jar ...javac.jar"
|
||||
# and it is rewritten into "bootclasspathprepend com.sun.tools.sjavac.Main"
|
||||
$1_SJAVAC:=$$(word 1,$$($1_JAVAC)) -cp $$(word 3,$$($1_JAVAC)) com.sun.tools.sjavac.Main
|
||||
# Create SJAVAC variable form JAVAC variable. Expects $1_JAVAC to be
|
||||
# "bootclasspathprepend -cp .../javac.jar com.sun.tools.javac.Main"
|
||||
# and javac is simply replaced with sjavac.
|
||||
$1_SJAVAC:=$$(subst com.sun.tools.javac.Main,com.sun.tools.sjavac.Main,$$($1_JAVAC))
|
||||
|
||||
# Set the $1_REMOTE to spawn a background javac server.
|
||||
$1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))
|
||||
@@ -489,7 +501,7 @@ define SetupJavaCompilation
|
||||
$(ECHO) Compiling $1
|
||||
($$($1_JVM) $$($1_SJAVAC) \
|
||||
$$($1_REMOTE) \
|
||||
-j $(NUM_CORES) \
|
||||
-j $(JOBS) \
|
||||
--permit-unidentified-artifacts \
|
||||
--permit-sources-without-package \
|
||||
--compare-found-sources $$($1_BIN)/_the.batch.tmp \
|
||||
|
||||
234
common/makefiles/Jprt.gmk
Normal file
234
common/makefiles/Jprt.gmk
Normal file
@@ -0,0 +1,234 @@
|
||||
#
|
||||
# Copyright (c) 2012, 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.
|
||||
#
|
||||
|
||||
# This file is included by the root NewerMakefile and contains targets
|
||||
# and utilities needed by JPRT.
|
||||
|
||||
# Utilities used in this Makefile. Most of this makefile executes without
|
||||
# the context of a spec file from configure.
|
||||
CAT=cat
|
||||
CMP=cmp
|
||||
CP=cp
|
||||
ECHO=echo
|
||||
MKDIR=mkdir
|
||||
PRINTF=printf
|
||||
PWD=pwd
|
||||
# Insure we have a path that looks like it came from pwd
|
||||
# (This is mostly for Windows sake and drive letters)
|
||||
define UnixPath # path
|
||||
$(shell (cd "$1" && $(PWD)))
|
||||
endef
|
||||
|
||||
BUILD_DIR_ROOT:=$(root_dir)/build
|
||||
|
||||
ifdef OPENJDK
|
||||
OPEN_BUILD=true
|
||||
else
|
||||
OPEN_BUILD := $(if $(or $(wildcard $(root_dir)/jdk/src/closed), \
|
||||
$(wildcard $(root_dir)/jdk/make/closed), \
|
||||
$(wildcard $(root_dir)/jdk/test/closed), \
|
||||
$(wildcard $(root_dir)/hotspot/src/closed), \
|
||||
$(wildcard $(root_dir)/hotspot/make/closed), \
|
||||
$(wildcard $(root_dir)/hotspot/test/closed)), \
|
||||
false,true)
|
||||
endif
|
||||
|
||||
HOTSPOT_AVAILABLE := $(if $(wildcard $(root_dir)/hotspot),true,false)
|
||||
|
||||
###########################################################################
|
||||
# To help in adoption of the new configure&&make build process, a bridge
|
||||
# build will use the old settings to run configure and do the build.
|
||||
|
||||
# Build with the configure bridge. After running configure, restart make
|
||||
# to parse the new spec file.
|
||||
BRIDGE_TARGETS := all
|
||||
bridgeBuild: bridge2configure
|
||||
@cd $(root_dir) && $(MAKE) -f NewMakefile.gmk $(BRIDGE_TARGETS)
|
||||
|
||||
# Bridge from old Makefile ALT settings to configure options
|
||||
bridge2configure: $(BUILD_DIR_ROOT)/.bridge2configureOpts
|
||||
bash ./configure $(strip $(shell $(CAT) $<))
|
||||
|
||||
# Create a file with configure options created from old Makefile mechanisms.
|
||||
$(BUILD_DIR_ROOT)/.bridge2configureOpts: $(BUILD_DIR_ROOT)/.bridge2configureOptsLatest
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
# Use this file to only change when obvious things have changed
|
||||
$(BUILD_DIR_ROOT)/.bridge2configureOptsLatest: FRC
|
||||
$(RM) $@.tmp
|
||||
$(MKDIR) -p $(BUILD_DIR_ROOT)
|
||||
@$(ECHO) " --with-debug-level=$(if $(DEBUG_LEVEL),$(DEBUG_LEVEL),release) " >> $@.tmp
|
||||
ifdef ARCH_DATA_MODEL
|
||||
@$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp
|
||||
endif
|
||||
ifeq ($(ARCH_DATA_MODEL),32)
|
||||
@$(ECHO) " --with-jvm-variants=client,server " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_PARALLEL_COMPILE_JOBS
|
||||
@$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_BOOTDIR
|
||||
@$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_CUPS_HEADERS_PATH
|
||||
@$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_FREETYPE_HEADERS_PATH
|
||||
@$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp
|
||||
endif
|
||||
ifeq ($(HOTSPOT_AVAILABLE),false)
|
||||
ifdef ALT_JDK_IMPORT_PATH
|
||||
@$(ECHO) " --with-import-hotspot=$(call UnixPath,$(ALT_JDK_IMPORT_PATH)) " >> $@.tmp
|
||||
endif
|
||||
endif
|
||||
ifeq ($(OPEN_BUILD),true)
|
||||
@$(ECHO) " --enable-openjdk-only " >> $@.tmp
|
||||
else
|
||||
# Todo: move to closed?
|
||||
ifdef ALT_MOZILLA_HEADERS_PATH
|
||||
@$(ECHO) " --with-mozilla-headers=$(call UnixPath,$(ALT_MOZILLA_HEADERS_PATH)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_JUNIT_DIR
|
||||
@$(ECHO) " --with-junit-dir=$(call UnixPath,$(ALT_JUNIT_DIR)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ANT_HOME
|
||||
@$(ECHO) " --with-ant-home=$(call UnixPath,$(ANT_HOME)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_JAVAFX_ZIP_DIR
|
||||
@$(ECHO) " --with-javafx-zip-dir=$(call UnixPath,$(ALT_JAVAFX_ZIP_DIR)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_WIXDIR
|
||||
@$(ECHO) " --with-wix=$(call UnixPath,$(ALT_WIXDIR)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_CCSS_SIGNING_DIR
|
||||
@$(ECHO) " --with-ccss-signing=$(call UnixPath,$(ALT_CCSS_SIGNING_DIR)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_SLASH_JAVA
|
||||
@$(ECHO) " --with-java-devtools=$(call UnixPath,$(ALT_SLASH_JAVA)/devtools) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_SPARKLE_FRAMEWORK_DIR
|
||||
@$(ECHO) " --with-sparkle-framework=$(call UnixPath,$(ALT_SPARKLE_FRAMEWORK_DIR)) " >> $@.tmp
|
||||
endif
|
||||
endif
|
||||
@if [ -f $@ ] ; then \
|
||||
if ! $(CMP) $@ $@.tmp > /dev/null ; then \
|
||||
$(CP) $@.tmp $@ ; \
|
||||
fi ; \
|
||||
else \
|
||||
$(CP) $@.tmp $@ ; \
|
||||
fi
|
||||
$(RM) $@.tmp
|
||||
|
||||
PHONY_LIST += bridge2configure bridgeBuild
|
||||
|
||||
###########################################################################
|
||||
# JPRT targets
|
||||
|
||||
ifndef JPRT_ARCHIVE_BUNDLE
|
||||
JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip
|
||||
endif
|
||||
ifndef JPRT_ARCHIVE_INSTALL_BUNDLE
|
||||
JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip
|
||||
endif
|
||||
|
||||
# These targets execute in a SPEC free context, before calling bridgeBuild
|
||||
# to generate the SPEC.
|
||||
jprt_build_product: DEBUG_LEVEL=release
|
||||
jprt_build_product: BUILD_DIRNAME=*-release
|
||||
jprt_build_product: jprt_build_generic
|
||||
|
||||
jprt_build_fastdebug: DEBUG_LEVEL=fastdebug
|
||||
jprt_build_fastdebug: BUILD_DIRNAME=*-fastdebug
|
||||
jprt_build_fastdebug: jprt_build_generic
|
||||
|
||||
jprt_build_debug: DEBUG_LEVEL=slowdebug
|
||||
jprt_build_debug: BUILD_DIRNAME=*-debug
|
||||
jprt_build_debug: jprt_build_generic
|
||||
|
||||
jprt_build_generic: BRIDGE_TARGETS+=jprt_bundle
|
||||
jprt_build_generic: bridgeBuild
|
||||
|
||||
# This target must be called in the context of a SPEC file
|
||||
jprt_bundle: $(JPRT_ARCHIVE_BUNDLE)
|
||||
@$(call CheckIfMakeAtEnd)
|
||||
|
||||
# This target must be called in the context of a SPEC file
|
||||
$(JPRT_ARCHIVE_BUNDLE): bundles
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(CP) $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip $@
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64)
|
||||
SRC_JDK_IMAGE_DIR := $(JDK_OVERLAY_IMAGE_DIR)
|
||||
SRC_JRE_IMAGE_DIR := $(JRE_OVERLAY_IMAGE_DIR)
|
||||
else
|
||||
SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR)
|
||||
SRC_JRE_IMAGE_DIR := $(JRE_IMAGE_DIR)
|
||||
endif
|
||||
SRC_JDK_BUNDLE_DIR := $(JDK_BUNDLE_DIR)
|
||||
SRC_JRE_BUNDLE_DIR := $(JRE_BUNDLE_DIR)
|
||||
|
||||
# Bundle up the images
|
||||
bundles: all bundles-only
|
||||
bundles-only: start-make
|
||||
@$(call TargetEnter)
|
||||
$(MKDIR) -p $(BUILD_OUTPUT)/bundles
|
||||
$(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip .
|
||||
$(CD) $(SRC_JRE_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).zip .
|
||||
if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \
|
||||
$(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \
|
||||
fi
|
||||
@$(call TargetExit)
|
||||
|
||||
# Copy images to one unified location regardless of platform etc.
|
||||
final-images: all final-images-only
|
||||
final-images-only: start-make
|
||||
@$(call TargetEnter)
|
||||
$(RM) -r $(BUILD_OUTPUT)/final-images
|
||||
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)
|
||||
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)
|
||||
$(CP) -R -P $(SRC_JDK_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)/
|
||||
$(CP) -R -P $(SRC_JRE_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)/
|
||||
ifeq ($(OPENJDK_TARGET_OS),macosx)
|
||||
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)
|
||||
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)
|
||||
$(CP) -R -P $(SRC_JDK_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)/
|
||||
$(CP) -R -P $(SRC_JRE_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)/
|
||||
endif
|
||||
@$(call TargetExit)
|
||||
|
||||
|
||||
# Keep track of phony targets
|
||||
PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \
|
||||
jprt_build_generic bundles jprt_bundle \
|
||||
final-images final-images-only
|
||||
|
||||
###########################################################################
|
||||
# Phony targets
|
||||
.PHONY: $(PHONY_LIST)
|
||||
|
||||
# Force target
|
||||
FRC:
|
||||
@@ -58,16 +58,28 @@ $(eval $(call ResetAllTimers))
|
||||
|
||||
# Setup number of jobs to use. -jN is unfortunately not available for us to parse from the command line,
|
||||
# hence this workaround.
|
||||
ifeq ($(JOBS),)
|
||||
JOBS=$(NUM_CORES)
|
||||
endif
|
||||
MAKE_ARGS:=$(MAKE_ARGS) -j$(JOBS)
|
||||
|
||||
### Main targets
|
||||
|
||||
all: jdk
|
||||
default: jdk
|
||||
@$(call CheckIfMakeAtEnd)
|
||||
|
||||
start-make:
|
||||
all: images docs
|
||||
@$(call CheckIfMakeAtEnd)
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64)
|
||||
all: overlay-images
|
||||
endif
|
||||
|
||||
# Setup a rule for SPEC file that fails if executed. This check makes sure the configuration
|
||||
# is up to date after changes to configure
|
||||
$(SPEC): $(wildcard $(SRC_ROOT)/common/autoconf/*)
|
||||
@$(ECHO) ERROR: $(SPEC) is not up to date
|
||||
@$(ECHO) Please rerun configure!
|
||||
@if test "x$(IGNORE_OLD_CONFIG)" != "xtrue"; then exit 1; fi
|
||||
|
||||
start-make: $(SPEC)
|
||||
@$(call AtMakeStart)
|
||||
|
||||
langtools: langtools-only
|
||||
@@ -114,7 +126,9 @@ demos-only: start-make
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk demos)
|
||||
@$(call TargetExit)
|
||||
|
||||
images: source-tips demos images-only
|
||||
# Note: This double-colon rule is intentional, to support
|
||||
# custom make file integration.
|
||||
images:: source-tips demos images-only
|
||||
images-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk images)
|
||||
@@ -126,12 +140,17 @@ overlay-images-only: start-make
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk overlay-images)
|
||||
@$(call TargetExit)
|
||||
|
||||
bundles: images bundles-only
|
||||
bundles-only: start-make
|
||||
profiles: profiles-oscheck source-tips jdk hotspot profiles-only
|
||||
profiles-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk bundles)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk profiles)
|
||||
@$(call TargetExit)
|
||||
|
||||
profiles-oscheck:
|
||||
ifneq ($(OPENJDK_TARGET_OS), linux)
|
||||
@echo "Error: The Java SE 8 Compact Profiles are only implemented for Linux at this time" && exit 1
|
||||
endif
|
||||
|
||||
install: images install-only
|
||||
install-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@@ -144,6 +163,12 @@ docs-only: start-make
|
||||
@($(CD) $(SRC_ROOT)/common/makefiles/javadoc && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs)
|
||||
@$(call TargetExit)
|
||||
|
||||
sign-jars: jdk sign-jars-only
|
||||
sign-jars-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk sign-jars)
|
||||
@$(call TargetExit)
|
||||
|
||||
bootcycle-images:
|
||||
@$(ECHO) Boot cycle build step 1: Building the JDK image normally
|
||||
@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(SPEC) images)
|
||||
@@ -152,7 +177,7 @@ bootcycle-images:
|
||||
|
||||
test: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(SRC_ROOT)/test && $(BUILD_LOG_WRAPPER) $(MAKE) MAKEFLAGS= -j1 PRODUCT_HOME=$(OUTPUT_ROOT)/jdk JPRT_JAVA_HOME=$(OUTPUT_ROOT)/jdk ALT_OUTPUTDIR=$(OUTPUT_ROOT) $(TEST)) || true
|
||||
@($(CD) $(SRC_ROOT)/test && $(BUILD_LOG_WRAPPER) $(MAKE) -j1 -k MAKEFLAGS= PRODUCT_HOME=$(OUTPUT_ROOT)/jdk JPRT_JAVA_HOME=$(OUTPUT_ROOT)/jdk ALT_OUTPUTDIR=$(OUTPUT_ROOT) $(TEST)) || true
|
||||
@$(call TargetExit)
|
||||
|
||||
# Stores the tips for each repository. This file is be used when constructing the jdk image and can be
|
||||
@@ -165,7 +190,7 @@ $(OUTPUT_ROOT)/source_tips: FRC
|
||||
|
||||
|
||||
# Remove everything, except the output from configure.
|
||||
clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images clean-overlay-images clean-bootcycle-build
|
||||
clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images clean-overlay-images clean-bootcycle-build clean-docs
|
||||
@($(CD) $(OUTPUT_ROOT) && $(RM) -r tmp source_tips build.log* build-trace*.log*)
|
||||
@$(ECHO) Cleaned all build artifacts.
|
||||
|
||||
@@ -201,10 +226,14 @@ clean-overlay-images:
|
||||
$(call CleanComponent,overlay-images)
|
||||
clean-bootcycle-build:
|
||||
$(call CleanComponent,bootcycle-build)
|
||||
clean-docs:
|
||||
$(call CleanComponent,docs)
|
||||
$(call CleanComponent,docstemp)
|
||||
|
||||
.PHONY: langtools corba jaxp jaxws hotspot jdk images overlay-images install
|
||||
.PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only images-only overlay-images-only install-only
|
||||
.PHONY: all test clean dist-clean bootcycle-images start-make
|
||||
.PHONY: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images clean-overlay-images clean-bootcycle-build
|
||||
.PHONY: profiles profiles-only profiles-oscheck
|
||||
|
||||
FRC: # Force target
|
||||
|
||||
@@ -391,4 +391,46 @@ define install-file
|
||||
endef
|
||||
endif
|
||||
|
||||
# Convenience functions for working around make's limitations with $(filter ).
|
||||
containing = $(foreach v,$2,$(if $(findstring $1,$v),$v))
|
||||
not-containing = $(foreach v,$2,$(if $(findstring $1,$v),,$v))
|
||||
|
||||
################################################################################
|
||||
# In Cygwin, finds are very costly, both because of expensive forks and because
|
||||
# of bad file system caching. Find is used extensively in $(shell) commands to
|
||||
# find source files. This makes rerunning make with no or few changes rather
|
||||
# expensive. To speed this up, these two macros are used to cache the results
|
||||
# of simple find commands for reuse.
|
||||
#
|
||||
# Runs a find and stores both the directories where it was run and the results.
|
||||
# This macro can be called multiple times to add to the cache. Only finds files
|
||||
# with no filters.
|
||||
#
|
||||
# Needs to be called with $(eval )
|
||||
#
|
||||
# Param 1 - Dir to find in
|
||||
ifeq ($(OPENJDK_BUILD_OS),windows)
|
||||
define FillCacheFind
|
||||
FIND_CACHE_DIR += $1
|
||||
FIND_CACHE := $$(sort $$(FIND_CACHE) $$(shell $(FIND) $1 -type f -o -type l))
|
||||
endef
|
||||
else
|
||||
define FillCacheFind
|
||||
endef
|
||||
endif
|
||||
|
||||
# Mimics find by looking in the cache if all of the directories have been cached.
|
||||
# Otherwise reverts to shell find. This is safe to call on all platforms, even if
|
||||
# cache is deactivated.
|
||||
#
|
||||
# The extra - is needed when FIND_CACHE_DIR is empty but should be harmless.
|
||||
# Param 1 - Dirs to find in
|
||||
define CacheFind
|
||||
$(if $(filter-out $(addsuffix %,- $(FIND_CACHE_DIR)),$1),\
|
||||
$(shell $(FIND) $1 -type f -o -type l),\
|
||||
$(filter $(addsuffix %,$1),$(FIND_CACHE)))
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
|
||||
endif # _MAKEBASE_GMK
|
||||
|
||||
@@ -50,7 +50,7 @@ BUILDTIMESDIR=$(OUTPUT_ROOT)/tmp/buildtimes
|
||||
|
||||
# Global targets are possible to run either with or without a SPEC. The prototypical
|
||||
# global target is "help".
|
||||
global_targets=help configure
|
||||
global_targets=help jprt% bridgeBuild
|
||||
|
||||
##############################
|
||||
# Functions
|
||||
@@ -112,7 +112,7 @@ endef
|
||||
|
||||
# Do not indent this function, this will add whitespace at the start which the caller won't handle
|
||||
define GetRealTarget
|
||||
$(strip $(if $(MAKECMDGOALS),$(MAKECMDGOALS),all))
|
||||
$(strip $(if $(MAKECMDGOALS),$(MAKECMDGOALS),default))
|
||||
endef
|
||||
|
||||
# Do not indent this function, this will add whitespace at the start which the caller won't handle
|
||||
@@ -126,10 +126,7 @@ define CheckIfMakeAtEnd
|
||||
# Check if the current target is the last goal
|
||||
$(if $(filter $@,$(call LastGoal)),$(call AtMakeEnd))
|
||||
# If the target is 'foo-only', check if our goal was stated as 'foo'
|
||||
$(if $(filter $(patsubst %-only,%,$@),$(call LastGoal)),$(call AtMakeEnd))
|
||||
# If no goal is given, 'all' is default, but the last target executed for all is 'jdk-only'. Check for that, too.
|
||||
# At most one of the tests can be true.
|
||||
$(if $(subst all,,$(call LastGoal)),,$(if $(filter $@,jdk-only),$(call AtMakeEnd)))
|
||||
$(if $(filter $@,$(call LastGoal)-only),$(call AtMakeEnd))
|
||||
endef
|
||||
|
||||
# Hook to be called when starting to execute a top-level target
|
||||
@@ -142,7 +139,7 @@ endef
|
||||
define TargetExit
|
||||
$(call RecordEndTime,$(patsubst %-only,%,$@))
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) "## Finished $(patsubst %-only,%,$@) (build time %s)\n\n" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_$(patsubst %-only,%,$@) | $(CUT) -f 1 -d " "`"
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_$(patsubst %-only,%,$@) | $(CUT) -f 1 -d ' '`"
|
||||
$(call CheckIfMakeAtEnd)
|
||||
endef
|
||||
|
||||
|
||||
@@ -23,109 +23,4 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This must be the first rule
|
||||
all:
|
||||
|
||||
# Inclusion of this pseudo-target will cause make to execute this file
|
||||
# serially, regardless of -j. Recursively called makefiles will not be
|
||||
# affected, however. This is required for correct dependency management.
|
||||
.NOTPARALLEL:
|
||||
|
||||
# The shell code below will be executed on /usr/ccs/bin/make on Solaris, but not in GNU make.
|
||||
# /usr/ccs/bin/make lacks basically every other flow control mechanism.
|
||||
TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1
|
||||
|
||||
# Assume we have GNU make, but check version.
|
||||
ifeq (,$(findstring 3.81,$(MAKE_VERSION)))
|
||||
ifeq (,$(findstring 3.82,$(MAKE_VERSION)))
|
||||
$(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Locate this Makefile
|
||||
ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
|
||||
makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
|
||||
else
|
||||
makefile_path:=$(lastword $(MAKEFILE_LIST))
|
||||
endif
|
||||
root_dir:=$(patsubst %/common/makefiles/Makefile,%,$(makefile_path))
|
||||
|
||||
# ... and then we can include our helper functions
|
||||
include $(dir $(makefile_path))/MakeHelpers.gmk
|
||||
|
||||
$(eval $(call ParseLogLevel))
|
||||
$(eval $(call ParseConfAndSpec))
|
||||
|
||||
# Now determine if we have zero, one or several configurations to build.
|
||||
ifeq ($(SPEC),)
|
||||
# Since we got past ParseConfAndSpec, we must be building a global target. Do nothing.
|
||||
else
|
||||
ifeq ($(words $(SPEC)),1)
|
||||
# We are building a single configuration. This is the normal case. Execute the Main.gmk file.
|
||||
include $(dir $(makefile_path))/Main.gmk
|
||||
else
|
||||
# We are building multiple configurations.
|
||||
# First, find out the valid targets
|
||||
# Run the makefile with an arbitraty SPEC using -p -q (quiet dry-run and dump rules) to find
|
||||
# available PHONY targets. Use this list as valid targets to pass on to the repeated calls.
|
||||
all_phony_targets=$(filter-out $(global_targets), $(strip $(shell \
|
||||
$(MAKE) -p -q -f $(makefile_path) SPEC=$(firstword $(SPEC)) | \
|
||||
grep ^.PHONY: | head -n 1 | cut -d " " -f 2-)))
|
||||
|
||||
$(all_phony_targets):
|
||||
@$(foreach spec,$(SPEC),($(MAKE) -f $(makefile_path) SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) $@) &&) true
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
# Here are "global" targets, i.e. targets that can be executed without specifying a single configuration.
|
||||
# If you addd more global targets, please update the variable global_targets in MakeHelpers.
|
||||
|
||||
help:
|
||||
$(info )
|
||||
$(info OpenJDK Makefile help)
|
||||
$(info =====================)
|
||||
$(info )
|
||||
$(info Common make targets)
|
||||
$(info . make [all] # Compile all code but do not create images)
|
||||
$(info . make images # Create complete j2sdk and j2re images)
|
||||
$(info . make overlay-images # Create limited images for sparc 64 bit platforms)
|
||||
$(info . make bootcycle-images # Build images twice, second time with newly build JDK)
|
||||
$(info . make install # Install the generated images locally)
|
||||
$(info . make clean # Remove all files generated by make, but not those)
|
||||
$(info . # generated by configure)
|
||||
$(info . make dist-clean # Remove all files, including configuration)
|
||||
$(info . make help # Give some help on using make)
|
||||
$(info . make test # Run tests, default is all tests (see TEST below))
|
||||
$(info )
|
||||
$(info Targets for specific components)
|
||||
$(info (Component is any of langtools, corba, jaxp, jaxws, hotspot, jdk, images or overlay-images))
|
||||
$(info . make <component> # Build <component> and everything it depends on. )
|
||||
$(info . make <component>-only # Build <component> only, without dependencies. This)
|
||||
$(info . # is faster but can result in incorrect build results!)
|
||||
$(info . make clean-<component> # Remove files generated by make for <component>)
|
||||
$(info )
|
||||
$(info Useful make variables)
|
||||
$(info . make CONF= # Build all configurations (note, assignment is empty))
|
||||
$(info . make CONF=<substring> # Build the configuration(s) with a name matching)
|
||||
$(info . # <substring>)
|
||||
$(info )
|
||||
$(info . make LOG=<loglevel> # Change the log level from warn to <loglevel>)
|
||||
$(info . # Available log levels are:)
|
||||
$(info . # 'warn' (default), 'info', 'debug' and 'trace')
|
||||
$(info . # To see executed command lines, use LOG=debug)
|
||||
$(info )
|
||||
$(info . make JOBS=<n> # Run <n> parallel make jobs)
|
||||
$(info . # Note that -jN does not work as expected!)
|
||||
$(info )
|
||||
$(info . make test TEST=<test> # Only run the given test or tests, e.g.)
|
||||
$(info . # make test TEST="jdk_lang jdk_net")
|
||||
$(info )
|
||||
|
||||
configure:
|
||||
@$(SHELL) $(root_dir)/configure $(CONFIGURE_ARGS)
|
||||
@echo ====================================================
|
||||
@echo "Note: This is a non-recommended way of running configure."
|
||||
@echo "Instead, run 'sh configure' in the top-level directory"
|
||||
|
||||
.PHONY: help configure
|
||||
include ../../NewMakefile.gmk
|
||||
|
||||
@@ -236,7 +236,7 @@ define SetupNativeCompilation
|
||||
$$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupNativeCompilation $1 contains missing directory $$d)))
|
||||
|
||||
# Find all files in the source trees. Sort to remove duplicates.
|
||||
$1_ALL_SRCS := $$(sort $$(shell $(FIND) $$($1_SRC) -type f))
|
||||
$1_ALL_SRCS := $$(sort $$(call CacheFind,$$($1_SRC)))
|
||||
# Extract the C/C++ files.
|
||||
$1_EXCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_EXCLUDE_FILES)))
|
||||
$1_INCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
|
||||
@@ -302,7 +302,7 @@ define SetupNativeCompilation
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_DEBUG_SYMBOLS))
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
|
||||
# Programs don't get the debug symbols added in the old build. It's not clear if
|
||||
# this is intentional.
|
||||
ifeq ($$($1_PROGRAM),)
|
||||
@@ -394,7 +394,7 @@ define SetupNativeCompilation
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_DEBUG_SYMBOLS))
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_LIBRARY).pdb" \
|
||||
"-map:$$($1_OBJECT_DIR)/$$($1_LIBRARY).map"
|
||||
@@ -429,7 +429,7 @@ define SetupNativeCompilation
|
||||
endif # Touch to not retrigger rule on rebuild
|
||||
$(TOUCH) $$@
|
||||
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES), 1)
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES), true)
|
||||
$1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
@@ -472,7 +472,7 @@ define SetupNativeCompilation
|
||||
ifneq (,$$($1_PROGRAM))
|
||||
# A executable binary has been specified, setup the target for it.
|
||||
ifneq (,$$($1_DEBUG_SYMBOLS))
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_PROGRAM).pdb" \
|
||||
"-map:$$($1_OBJECT_DIR)/$$($1_PROGRAM).map"
|
||||
@@ -507,7 +507,7 @@ define SetupNativeCompilation
|
||||
endif
|
||||
$(TOUCH) $$@
|
||||
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES), 1)
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES), true)
|
||||
$1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).diz
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2012, 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
|
||||
|
||||
@@ -127,10 +127,16 @@ CORE_PKGS = \
|
||||
java.sql \
|
||||
java.text \
|
||||
java.text.spi \
|
||||
java.time \
|
||||
java.time.chrono \
|
||||
java.time.format \
|
||||
java.time.temporal \
|
||||
java.time.zone \
|
||||
java.util \
|
||||
java.util.concurrent \
|
||||
java.util.concurrent.atomic \
|
||||
java.util.concurrent.locks \
|
||||
java.util.function \
|
||||
java.util.jar \
|
||||
java.util.logging \
|
||||
java.util.prefs \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1997, 2013, 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
|
||||
@@ -32,8 +32,6 @@ include MakeBase.gmk
|
||||
# Definitions for $(DOCSDIR), $(MKDIR), $(BINDIR), etc.
|
||||
#
|
||||
|
||||
CLASSPATH_SEPARATOR = :
|
||||
|
||||
DOCSDIR=$(OUTPUT_ROOT)/docs
|
||||
TEMPDIR=$(OUTPUT_ROOT)/docstemp
|
||||
|
||||
@@ -48,19 +46,11 @@ HOTSPOT_DOCS_IMPORT_PATH=$(HOTSPOT_OUTPUTDIR)/docs
|
||||
|
||||
BUILD_NUMBER=$(JDK_BUILD_NUMBER)
|
||||
|
||||
BOOT_JAVA_CMD=$(JAVA)
|
||||
|
||||
# Langtools
|
||||
JAVAC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javac.jar
|
||||
JAVADOC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javadoc.jar
|
||||
DOCLETS_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/doclets.jar
|
||||
JAVADOC_CMD = $(BOOT_JAVA_CMD) \
|
||||
JAVADOC_CMD = $(JAVA) \
|
||||
-Xmx1024m \
|
||||
-Djava.awt.headless=true \
|
||||
"-Xbootclasspath/p:$(JAVADOC_JAR)$(CLASSPATH_SEPARATOR)$(JAVAC_JAR)$(CLASSPATH_SEPARATOR)$(DOCLETS_JAR)" \
|
||||
-jar $(JAVADOC_JAR)
|
||||
|
||||
JAVADOC_CMD = javadoc
|
||||
$(NEW_JAVADOC) \
|
||||
-bootclasspath $(JDK_OUTPUTDIR)/classes
|
||||
|
||||
# Copyright year for beginning of Java and some of the apis
|
||||
# (Needed when creating the javadocs)
|
||||
@@ -113,7 +103,8 @@ DOCSDIR_URL = {@docroot}/$(GET2DOCSDIR)
|
||||
|
||||
# Url to copyright html file
|
||||
COPYRIGHT_URL-7 = $(DOCSDIR_URL)/legal/cpyr.html
|
||||
COPYRIGHT_URL-8 = $(DOCSDIR_URL)/legal/cpyr.html
|
||||
# This isn't added in old build yet.
|
||||
#COPYRIGHT_URL-8 = $(DOCSDIR_URL)/legal/cpyr.html
|
||||
COPYRIGHT_URL = $(COPYRIGHT_URL-$(JDK_MINOR_VERSION))
|
||||
|
||||
# Url to bug filing site
|
||||
@@ -125,7 +116,8 @@ BUG_SUBMIT_LINE = <a href="$(BUG_SUBMIT_URL)">Submit a bug or feature</a>
|
||||
# Url to devdocs page
|
||||
# Was: http://java.sun.com/javase/6/webnotes/devdocs-vs-specs.html
|
||||
DEV_DOCS_URL-7 = http://download.oracle.com/javase/7/docs/index.html
|
||||
DEV_DOCS_URL-8 = http://download.oracle.com/javase/7/docs/index.html
|
||||
# This isn't added in old build yet.
|
||||
#DEV_DOCS_URL-8 = http://download.oracle.com/javase/7/docs/index.html
|
||||
DEV_DOCS_URL = $(DEV_DOCS_URL-$(JDK_MINOR_VERSION))
|
||||
DOCS_BASE_URL = http://download.oracle.com/javase/7/docs
|
||||
|
||||
@@ -140,11 +132,12 @@ $(FULL_COMPANY_NAME) in the US and other countries.
|
||||
# List of all possible directories for javadoc to look for sources
|
||||
# NOTE: Quotes are required around sourcepath argument only on Windows.
|
||||
# Otherwise, you get "No packages or classes specified." due
|
||||
# to $(CLASSPATH_SEPARATOR) being interpreted as an end of
|
||||
# to $(PATH_SEP) being interpreted as an end of
|
||||
# command (newline or shell ; character)
|
||||
ALL_SOURCE_DIRS = $(JDK_IMPSRC) \
|
||||
ALL_SOURCE_DIRS = $(JDK_SHARE_CLASSES) \
|
||||
$(JDK_IMPSRC) \
|
||||
$(JDK_GENSRC) \
|
||||
$(JDK_SHARE_CLASSES) \
|
||||
$(JDK_OUTPUTDIR)/gendocsrc_rmic \
|
||||
$(JDK_TOPDIR)/src/solaris/classes \
|
||||
$(JDK_TOPDIR)/src/windows/classes \
|
||||
$(JDK_SHARE_SRC)/doc/stub
|
||||
@@ -156,7 +149,7 @@ ALL_EXISTING_SOURCE_DIRS := $(wildcard $(ALL_SOURCE_DIRS))
|
||||
EMPTY:=
|
||||
SPACE:= $(EMPTY) $(EMPTY)
|
||||
RELEASEDOCS_SOURCEPATH = \
|
||||
$(subst $(SPACE),$(CLASSPATH_SEPARATOR),$(strip $(ALL_SOURCE_DIRS)))
|
||||
$(subst $(SPACE),$(PATH_SEP),$(strip $(ALL_SOURCE_DIRS)))
|
||||
|
||||
define prep-target
|
||||
$(MKDIR) -p $(@D)
|
||||
@@ -273,6 +266,8 @@ COMMON_JAVADOCFLAGS = \
|
||||
-quiet \
|
||||
-use \
|
||||
-keywords \
|
||||
-Xdoclint:none \
|
||||
-Xprofilespath $(JDK_TOPDIR)/makefiles/profile-rtjar-includes.txt \
|
||||
$(ADDITIONAL_JAVADOCFLAGS)
|
||||
|
||||
ifdef OPENJDK
|
||||
@@ -440,7 +435,7 @@ docletapidocs: $(DOCLETAPI_INDEX_FILE)
|
||||
$(DOCLETAPI_INDEX_FILE): GET2DOCSDIR=$(DOCLETAPI2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(DOCLETAPI_INDEX_FILE): $(DOCLETAPI_OPTIONS_FILE) $(DOCLETAPI_PACKAGES_FILE)
|
||||
$(DOCLETAPI_INDEX_FILE): $(DOCLETAPI_OPTIONS_FILE) $(DOCLETAPI_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(DOCLETAPI_OPTIONS_FILE),$(DOCLETAPI_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@@ -481,7 +476,7 @@ TAGLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(TAGLETAPI_FIRST_COPYRIGHT_Y
|
||||
TAGLETAPI_TEMPDIR = $(DOCSTMPDIR)/taglets_temp
|
||||
|
||||
# The index.html, options, and packages files
|
||||
TAGLETAPI_INDEX_FILE = $(TAGLETAPI_DOCDIR)/com/sun/tools/doclets/Taglet.html
|
||||
TAGLETAPI_INDEX_FILE = $(TAGLETAPI_DOCDIR)/index.html
|
||||
TAGLETAPI_OPTIONS_FILE = $(DOCSTMPDIR)/tagletapi.options
|
||||
TAGLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/tagletapi.packages
|
||||
|
||||
@@ -491,7 +486,7 @@ tagletapidocs: $(TAGLETAPI_INDEX_FILE)
|
||||
$(TAGLETAPI_INDEX_FILE): GET2DOCSDIR=$(TAGLETAPI2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(TAGLETAPI_INDEX_FILE): $(TAGLETAPI_OPTIONS_FILE) $(TAGLETAPI_PACKAGES_FILE)
|
||||
$(TAGLETAPI_INDEX_FILE): $(TAGLETAPI_OPTIONS_FILE) $(TAGLETAPI_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(RM) -r $(TAGLETAPI_TEMPDIR)
|
||||
$(MKDIR) -p $(TAGLETAPI_TEMPDIR)
|
||||
@@ -517,9 +512,7 @@ $(TAGLETAPI_OPTIONS_FILE):
|
||||
# Create a file with the package names in it
|
||||
$(TAGLETAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(TAGLETAPI_PKGS))
|
||||
$(prep-target)
|
||||
$(call PackageFilter,$(TAGLETAPI_PKGS))
|
||||
$(GREP) "$(TAGLETAPI_FILE)" $@ > $@.tmp
|
||||
$(MV) $@.tmp $@
|
||||
@($(ECHO) "$(JDK_IMPSRC)/$(TAGLETAPI_FILE)" ) > $@
|
||||
|
||||
#############################################################
|
||||
#
|
||||
@@ -549,7 +542,7 @@ domapidocs: $(DOMAPI_INDEX_FILE)
|
||||
$(DOMAPI_INDEX_FILE): GET2DOCSDIR=$(DOMAPI2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(DOMAPI_INDEX_FILE): $(DOMAPI_OPTIONS_FILE) $(DOMAPI_PACKAGES_FILE)
|
||||
$(DOMAPI_INDEX_FILE): $(DOMAPI_OPTIONS_FILE) $(DOMAPI_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(DOMAPI_OPTIONS_FILE),$(DOMAPI_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@@ -611,7 +604,7 @@ jdidocs: $(JDI_INDEX_FILE)
|
||||
$(JDI_INDEX_FILE): GET2DOCSDIR=$(JDI2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(JDI_INDEX_FILE): $(JDI_OPTIONS_FILE) $(JDI_PACKAGES_FILE)
|
||||
$(JDI_INDEX_FILE): $(JDI_OPTIONS_FILE) $(JDI_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(JDI_OPTIONS_FILE),$(JDI_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@@ -698,7 +691,7 @@ jaasdocs: $(JAAS_INDEX_FILE)
|
||||
$(JAAS_INDEX_FILE): GET2DOCSDIR=$(JAAS2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(JAAS_INDEX_FILE): $(JAAS_OPTIONS_FILE) $(JAAS_PACKAGES_FILE)
|
||||
$(JAAS_INDEX_FILE): $(JAAS_OPTIONS_FILE) $(JAAS_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(JAAS_OPTIONS_FILE),$(JAAS_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@@ -750,7 +743,7 @@ jgssdocs: $(JGSS_INDEX_FILE)
|
||||
$(JGSS_INDEX_FILE): GET2DOCSDIR=$(JGSS2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(JGSS_INDEX_FILE): $(JGSS_OPTIONS_FILE) $(JGSS_PACKAGES_FILE)
|
||||
$(JGSS_INDEX_FILE): $(JGSS_OPTIONS_FILE) $(JGSS_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(JGSS_OPTIONS_FILE),$(JGSS_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@@ -802,7 +795,7 @@ smartcardiodocs: $(SMARTCARDIO_INDEX_FILE)
|
||||
$(SMARTCARDIO_INDEX_FILE): GET2DOCSDIR=$(SMARTCARDIO2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(SMARTCARDIO_INDEX_FILE): $(SMARTCARDIO_OPTIONS_FILE) $(SMARTCARDIO_PACKAGES_FILE)
|
||||
$(SMARTCARDIO_INDEX_FILE): $(SMARTCARDIO_OPTIONS_FILE) $(SMARTCARDIO_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(SMARTCARDIO_OPTIONS_FILE),$(SMARTCARDIO_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@@ -852,7 +845,7 @@ httpserverdocs: $(HTTPSERVER_INDEX_HTML)
|
||||
$(HTTPSERVER_INDEX_HTML): GET2DOCSDIR=$(HTTPSERVER2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(HTTPSERVER_INDEX_HTML): $(HTTPSERVER_OPTIONS_FILE) $(HTTPSERVER_PACKAGES_FILE)
|
||||
$(HTTPSERVER_INDEX_HTML): $(HTTPSERVER_OPTIONS_FILE) $(HTTPSERVER_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(HTTPSERVER_OPTIONS_FILE),$(HTTPSERVER_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@@ -887,7 +880,7 @@ ALL_OTHER_TARGETS += mgmtdocs
|
||||
MGMT_DOCDIR := $(JRE_API_DOCSDIR)/management/extension
|
||||
MGMT2COREAPI := ../../$(JDKJRE2COREAPI)
|
||||
JVM_MIB_NAME := JVM-MANAGEMENT-MIB.mib
|
||||
JVM_MIB_SRC := $(CLOSED_SRC)/share/classes/sun/management/snmp/$(JVM_MIB_NAME)
|
||||
JVM_MIB_SRC := $(JDK_TOPDIR)/src/closed/share/classes/sun/management/snmp/$(JVM_MIB_NAME)
|
||||
MGMT_DOCTITLE := Monitoring and Management Interface for the Java$(TRADEMARK) Platform
|
||||
MGMT_WINDOWTITLE := Monitoring and Management Interface for the Java Platform
|
||||
MGMT_HEADER := <strong>Monitoring and Management Interface for the Java Platform</strong>
|
||||
@@ -906,7 +899,7 @@ mgmtdocs: $(MGMT_INDEX_FILE)
|
||||
$(MGMT_INDEX_FILE): GET2DOCSDIR=$(MGMT2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(MGMT_INDEX_FILE): $(MGMT_OPTIONS_FILE) $(MGMT_PACKAGES_FILE)
|
||||
$(MGMT_INDEX_FILE): $(MGMT_OPTIONS_FILE) $(MGMT_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
@if [ -f $(JVM_MIB_SRC) ] ; then \
|
||||
$(ECHO) "$(CP) $(JVM_MIB_SRC) $(@D)/.."; \
|
||||
@@ -963,7 +956,7 @@ attachdocs: $(ATTACH_INDEX_HTML)
|
||||
$(ATTACH_INDEX_HTML): GET2DOCSDIR=$(ATTACH2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(ATTACH_INDEX_HTML): $(ATTACH_OPTIONS_FILE) $(ATTACH_PACKAGES_FILE)
|
||||
$(ATTACH_INDEX_HTML): $(ATTACH_OPTIONS_FILE) $(ATTACH_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(ATTACH_OPTIONS_FILE),$(ATTACH_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@@ -1013,7 +1006,7 @@ jconsoledocs: $(JCONSOLE_INDEX_HTML)
|
||||
$(JCONSOLE_INDEX_HTML): GET2DOCSDIR=$(JCONSOLE2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(JCONSOLE_INDEX_HTML): $(JCONSOLE_OPTIONS_FILE) $(JCONSOLE_PACKAGES_FILE)
|
||||
$(JCONSOLE_INDEX_HTML): $(JCONSOLE_OPTIONS_FILE) $(JCONSOLE_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(JCONSOLE_OPTIONS_FILE),$(JCONSOLE_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@@ -1065,7 +1058,7 @@ treeapidocs: $(TREEAPI_INDEX_HTML)
|
||||
$(TREEAPI_INDEX_HTML): GET2DOCSDIR=$(TREEAPI2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(TREEAPI_INDEX_HTML): $(TREEAPI_OPTIONS_FILE) $(TREEAPI_PACKAGES_FILE)
|
||||
$(TREEAPI_INDEX_HTML): $(TREEAPI_OPTIONS_FILE) $(TREEAPI_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(TREEAPI_OPTIONS_FILE),$(TREEAPI_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@@ -1116,7 +1109,7 @@ sctpdocs: $(SCTPAPI_INDEX_HTML)
|
||||
$(SCTPAPI_INDEX_HTML): GET2DOCSDIR=$(SCTPAPI2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(SCTPAPI_INDEX_HTML): $(SCTPAPI_OPTIONS_FILE) $(SCTPAPI_PACKAGES_FILE)
|
||||
$(SCTPAPI_INDEX_HTML): $(SCTPAPI_OPTIONS_FILE) $(SCTPAPI_PACKAGES_FILE) coredocs
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(SCTPAPI_OPTIONS_FILE),$(SCTPAPI_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
|
||||
@@ -78,7 +78,8 @@ ATTACH_PKGS = com.sun.tools.attach \
|
||||
|
||||
JCONSOLE_PKGS = com.sun.tools.jconsole
|
||||
|
||||
TREEAPI_PKGS = com.sun.source.tree \
|
||||
TREEAPI_PKGS = com.sun.source.doctree \
|
||||
com.sun.source.tree \
|
||||
com.sun.source.util
|
||||
|
||||
SMARTCARDIO_PKGS = javax.smartcardio
|
||||
|
||||
@@ -29,6 +29,29 @@
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
|
||||
void report_error()
|
||||
{
|
||||
LPVOID lpMsgBuf;
|
||||
DWORD dw = GetLastError();
|
||||
|
||||
FormatMessage(
|
||||
FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
||||
FORMAT_MESSAGE_FROM_SYSTEM |
|
||||
FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||
NULL,
|
||||
dw,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
(LPTSTR) &lpMsgBuf,
|
||||
0,
|
||||
NULL);
|
||||
|
||||
fprintf(stderr,
|
||||
"Could not start process! Failed with error %d: %s\n",
|
||||
dw, lpMsgBuf);
|
||||
|
||||
LocalFree(lpMsgBuf);
|
||||
}
|
||||
|
||||
/*
|
||||
* Test if pos points to /cygdrive/_/ where _ can
|
||||
* be any character.
|
||||
@@ -256,7 +279,7 @@ int main(int argc, char **argv)
|
||||
DWORD exitCode;
|
||||
|
||||
if (argc<3 || argv[1][0] != '-' || (argv[1][1] != 'c' && argv[1][1] != 'm')) {
|
||||
fprintf(stderr, "Usage: fixpath -c|m<path@path@...> /cygdrive/c/WINDOWS/notepad.exe /cygdrive/c/x/test.txt");
|
||||
fprintf(stderr, "Usage: fixpath -c|m<path@path@...> /cygdrive/c/WINDOWS/notepad.exe /cygdrive/c/x/test.txt\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -308,11 +331,10 @@ int main(int argc, char **argv)
|
||||
0,
|
||||
&si,
|
||||
&pi);
|
||||
if(!rc)
|
||||
{
|
||||
//Could not start process;
|
||||
fprintf(stderr, "Could not start process!\n");
|
||||
exit(-1);
|
||||
if(!rc) {
|
||||
// Could not start process for some reason. Try to report why:
|
||||
report_error();
|
||||
exit(rc);
|
||||
}
|
||||
|
||||
WaitForSingleObject(pi.hProcess,INFINITE);
|
||||
|
||||
@@ -186,3 +186,18 @@ d54dc53e223ed9ce7d5f4d2cd02ad9d5def3c2db jdk8-b59
|
||||
08afb9c6f44f11c3595b01fd0985db64b29834dd jdk8-b62
|
||||
6ccbf67b68bfed1ab9c44ab8748a5bdc7df33506 jdk8-b63
|
||||
54d599a5b4aad83c235d590652fc81f41c2824fb jdk8-b64
|
||||
5132f7900a8f0c30c3ca7f7a32f9433f4fee7745 jdk8-b65
|
||||
65771ad1ca557ca26e4979d4dc633cf685435cb8 jdk8-b66
|
||||
394515ad2a55d4d54df990b36065505d3e7a3cbb jdk8-b67
|
||||
82000531feaa7baef76b6406099e5cd88943d635 jdk8-b68
|
||||
22ddcac208a8dea894a16887d04f3ca4d3c5d267 jdk8-b69
|
||||
603cceb495c8133d47b26a7502d51c7d8a67d76b jdk8-b70
|
||||
8171d23e914d758836527b80b06debcfdb718f2d jdk8-b71
|
||||
cb40427f47145b01b7e53c3e02b38ff7625efbda jdk8-b72
|
||||
191afde59e7be0e1a1d76d06f2a32ff17444f0ec jdk8-b73
|
||||
2132845cf5f717ff5c240a2431c0c0e03e66e3a5 jdk8-b74
|
||||
d4e68ce17795601017ac2f952baad7272942c36e jdk8-b75
|
||||
58be6ca3c0603882a1ec478724e337aac85e0da0 jdk8-b76
|
||||
35684a40c5845782324dbcc9ac8969528020ff61 jdk8-b77
|
||||
27d6368ae8ba570c31c2f0e696d39c99fa2f4538 jdk8-b78
|
||||
e41fb1aa0329767b2737303c994e38bede1baa07 jdk8-b79
|
||||
|
||||
@@ -35,8 +35,6 @@ include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include IdlCompilation.gmk
|
||||
|
||||
JAVAC_JARS ?= "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \
|
||||
-jar $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar
|
||||
# The Corba sources are old and generates a LOT of warnings.
|
||||
# Disable these using Xlint, until someone cares to fix them.
|
||||
DISABLE_CORBA_WARNINGS:=-Xlint:all,-deprecation,-unchecked,-serial,-fallthrough,-cast,-rawtypes,-static,-dep-ann
|
||||
@@ -46,7 +44,7 @@ DISABLE_CORBA_WARNINGS:=-Xlint:all,-deprecation,-unchecked,-serial,-fallthrough,
|
||||
# Thus we force the target bytecode to the boot jdk bytecode.
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE,\
|
||||
JVM:=$(JAVA),\
|
||||
JAVAC:=$(JAVAC_JARS),\
|
||||
JAVAC:=$(NEW_JAVAC),\
|
||||
FLAGS:=$(BOOT_JDK_SOURCETARGET) -bootclasspath $(BOOT_RTJAR) $(DISABLE_CORBA_WARNINGS),\
|
||||
SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
|
||||
SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
|
||||
@@ -56,7 +54,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE,\
|
||||
# cannot necessarily be run with the boot jdk.
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE,\
|
||||
JVM:=$(JAVA),\
|
||||
JAVAC:=$(JAVAC_JARS),\
|
||||
JAVAC:=$(NEW_JAVAC),\
|
||||
FLAGS:=-cp $(BOOT_TOOLSJAR) -XDignore.symbol.file=true $(DISABLE_CORBA_WARNINGS),\
|
||||
SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
|
||||
SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
#
|
||||
|
||||
# Get clones of all nested repositories
|
||||
sh ./make/scripts/hgforest.sh clone $*
|
||||
sh ./common/bin/hgforest.sh clone "$@" || exit 1
|
||||
|
||||
# Update all existing repositories to the latest sources
|
||||
sh ./make/scripts/hgforest.sh pull -u
|
||||
sh ./common/bin/hgforest.sh pull -u
|
||||
|
||||
|
||||
@@ -293,3 +293,30 @@ acabb5c282f59be7e3238920b2ea06b684ab68f7 jdk8-b63
|
||||
8cb93eadfb6dcab88d91b8e2cd3e0e07d0ac4048 hs25-b08
|
||||
5920f72e799c8133d1066c4a62fa1fafcb729966 jdk8-b64
|
||||
b4ee7b773144a88af8b6b92e4384dea82cb948d8 hs25-b09
|
||||
0f7290a03b24bd562583fa325d3566c21c51fb94 jdk8-b65
|
||||
cfc5309f03b7bd6c1567618b63cf1fc74c0f2a8f hs25-b10
|
||||
01684f7fee1b86222be69bc23841ec2a4416696c jdk8-b66
|
||||
b61d9c88b759d1594b8af1655598e8fa00393672 hs25-b11
|
||||
25bdce771bb3a7ae9825261a284d292cda700122 jdk8-b67
|
||||
a35a72dd2e1255239d31f796f9f693e49b36bc9f hs25-b12
|
||||
121aa71316af6cd877bf455e775fa3fdbcdd4b65 jdk8-b68
|
||||
b6c9c0109a608eedbb6b868d260952990e3c91fe hs25-b13
|
||||
cb8a4e04bc8c104de8a2f67463c7e31232bf8d68 jdk8-b69
|
||||
990bbd393c239d95310ccc38094e57923bbf1d4a hs25-b14
|
||||
e94068d4ff52849c8aa0786a53a59b63d1312a39 jdk8-b70
|
||||
0847210f85480bf3848dc90bc2ab23c0a4791b55 jdk8-b71
|
||||
d5cb5830f570d1304ea4b196dde672a291b55f29 jdk8-b72
|
||||
1e129851479e4f5df439109fca2c7be1f1613522 hs25-b15
|
||||
11619f33cd683c2f1d6ef72f1c6ff3dacf5a9f1c jdk8-b73
|
||||
70c89bd6b895a10d25ca70e08093c09ff2005fda hs25-b16
|
||||
1a3e54283c54aaa8b3437813e8507fbdc966e5b6 jdk8-b74
|
||||
b4391649e91ea8d37f66317a03d6d2573a93d10d hs25-b17
|
||||
6778d0b1659323a506ca47600ca29a9d9f8b383d jdk8-b75
|
||||
20b605466ccb1b3725eb25314d9e8782199630c5 jdk8-b76
|
||||
412d722168bc23f8e6d98995202728678561417f hs25-b18
|
||||
cdb46031e7184d37301288f5719121a63c7054b5 jdk8-b77
|
||||
9f19f4a7d48a4ebe7f616b6068971ea5f8b075fa hs25-b19
|
||||
d5e12e7d2f719144d84903d9151455661c47b476 jdk8-b78
|
||||
555ec35a250783110aa070dbc8a8603f6cabe41f hs25-b20
|
||||
6691814929b606fe0e7954fd6e485dd876505c83 jdk8-b79
|
||||
df5396524152118535c36da5801d828b560d19a2 hs25-b21
|
||||
|
||||
41
hotspot/agent/doc/c2replay.html
Normal file
41
hotspot/agent/doc/c2replay.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
C2 Replay
|
||||
</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>C2 compiler replay</h1>
|
||||
<p>
|
||||
The C2 compiler replay is a function to repeat the compiling process from a crashed java process in compiled method<br>
|
||||
This function only exists in debug version of VM
|
||||
</p>
|
||||
<h2>Usage</h2>
|
||||
<pre>
|
||||
First, use SA to attach to the core file, if suceeded, do
|
||||
clhsdb>dumpreplaydata <address> | -a | <thread_id> [> replay.txt]
|
||||
create file replay.txt, address is address of Method, or nmethod(CodeBlob)
|
||||
clhsdb>buildreplayjars [all | boot | app]
|
||||
create files:
|
||||
all:
|
||||
app.jar, boot.jar
|
||||
boot:
|
||||
boot.jar
|
||||
app:
|
||||
app.jar
|
||||
exit SA now.
|
||||
Second, use the obtained replay text file, replay.txt and jar files, app.jar and boot.jar, using debug version of java
|
||||
java -Xbootclasspath/p:boot.jar -cp app.jar -XX:ReplayDataFile=<datafile> -XX:+ReplayCompiles ....
|
||||
This will replay the compiling process.
|
||||
|
||||
With ReplayCompiles, the replay will recompile all the methods in app.jar, and in boot.jar to emulate the process in java app.
|
||||
|
||||
notes:
|
||||
1) Most time, we don't need the boot.jar which is the classes loaded from JDK. It will be only modified when an agent(JVMDI) is running and modifies the classes.
|
||||
2) If encounter error as "<flag>" not found, that means the SA is using a VMStructs which is different from the one with corefile. In this case, SA has a utility tool vmstructsdump which is located at agent/src/os/<os>/proc/<os_platform>
|
||||
|
||||
Use this tool to dump VM type library:
|
||||
vmstructsdump libjvm.so > <type_name>.db
|
||||
|
||||
set env SA_TYPEDB=<type_name>.db (refer different shell for set envs)
|
||||
@@ -37,12 +37,19 @@ Each CLHSDB command can have zero or more arguments and optionally end with outp
|
||||
Available commands:
|
||||
assert true | false <font color="red">turn on/off asserts in SA code</font>
|
||||
attach pid | exec core <font color="red">attach SA to a process or core</font>
|
||||
buildreplayjars [all | boot | app] <font color="red">build jars for replay, boot.jar for bootclasses, app.jar for application classes</font>
|
||||
class name <font color="red">find a Java class from debuggee and print oop</font>
|
||||
classes <font color="red">print all loaded Java classes with Klass*</font>
|
||||
detach <font color="red">detach SA from current target</font>
|
||||
dis address [ length ] <font color="red">disassemble (sparc/x86) specified number of instructions from given address</font>
|
||||
dissemble address <font color="red">disassemble nmethod</font>
|
||||
dumpcfg -a | id <font color="red">Dump the PhaseCFG for every compiler thread that has one live</font>
|
||||
dumpclass { address | name } [ directory ] <font color="red">dump .class file for given Klass* or class name</font>
|
||||
dumpcodecache <font color="red">dump codecache contents</font>
|
||||
dumpheap [ file ] <font color="red">dump heap in hprof binary format</font>
|
||||
dumpideal -a | id <font color="red">dump ideal graph like debug flag -XX:+PrintIdeal</font>
|
||||
dumpilt -a | id <font color="red">dump inline tree for C2 compilation</font>
|
||||
dumpreplaydata <address> | -a | <thread_id> [>replay.txt] <font color="red">dump replay data into a file</font>
|
||||
echo [ true | false ] <font color="red">turn on/off command echo mode</font>
|
||||
examine [ address/count ] | [ address,address] <font color="red">show contents of memory from given address</font>
|
||||
field [ type [ name fieldtype isStatic offset address ] ] <font color="red">print info about a field of HotSpot type</font>
|
||||
@@ -51,29 +58,35 @@ Available commands:
|
||||
help [ command ] <font color="red">print help message for all commands or just given command</font>
|
||||
history <font color="red">show command history. usual !command-number syntax works.</font>
|
||||
inspect expression <font color="red">inspect a given oop</font>
|
||||
intConstant [ name [ value ] ] <font color="red">print out hotspot integer constant(s)</font>
|
||||
jdis address <font color="red">show bytecode disassembly of a given Method*</font>
|
||||
jhisto <font color="red">show Java heap histogram</font>
|
||||
jseval script <font color="red">evaluate a given string as JavaScript code</font>
|
||||
jsload file <font color="red">load and evaluate a JavaScript file</font>
|
||||
jstack [-v] <font color="red">show Java stack trace of all Java threads. -v is verbose mode</font>
|
||||
livenmethods <font color="red">show all live nmethods</font>
|
||||
longConstant [ name [ value ] ] <font color="red">print out hotspot long constant(s)s</font>
|
||||
mem address [ length ] <font color="red">show contents of memory -- also shows closest ELF/COFF symbol if found</font>
|
||||
pmap <font color="red">show Solaris pmap-like output</font>
|
||||
print expression <font color="red">print given Klass*, Method* or arbitrary address</font>
|
||||
printas type expression <font color="red">print given address as given HotSpot type. eg. print JavaThread <address></font>
|
||||
printmdo -a | expression <font color="red">print method data oop</font>
|
||||
printstatics [ type ] <font color="red">print static fields of given HotSpot type (or all types if none specified)</font>
|
||||
pstack [-v] <font color="red">show mixed mode stack trace for all Java, non-Java threads. -v is verbose mode</font>
|
||||
quit <font color="red">quit CLHSDB tool</font>
|
||||
reattach <font color="red">detach and re-attach SA to current target</font>
|
||||
revptrs <font color="red">find liveness of oops</font>
|
||||
scanoops start end [ type ] <font color="red">scan a Oop from given start to end address</font>
|
||||
search [ heap | codecache | threads ] value <font color="red">search a value in heap or codecache or threads</font>
|
||||
source filename <font color="red">load and execute CLHSDB commands from given file</font>
|
||||
symbol name <font color="red">show address of a given ELF/COFF symbol</font>
|
||||
sysprops <font color="red">show all Java System properties</font>
|
||||
thread id <font color="red">show thread of id</font>
|
||||
threads <font color="red">show all Java threads</font>
|
||||
tokenize ...
|
||||
type [ type [ name super isOop isInteger isUnsigned size ] ] <font color="red">show info. on HotSpot type</font>
|
||||
universe <font color="red">print gc universe</font>
|
||||
vmstructsdump <font color="red">dump hotspot type library in text</font>
|
||||
verbose true | false <font color="red">turn on/off verbose mode</font>
|
||||
versioncheck [ true | false ] <font color="red">turn on/off debuggee VM version check</font>
|
||||
whatis address <font color="red">print info about any arbitrary address</font>
|
||||
@@ -114,5 +127,11 @@ hsdb> jsload test.js
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
<h3>C2 Compilation Replay</h3>
|
||||
<p>
|
||||
When a java process crashes in compiled method, usually a core file is saved.
|
||||
The C2 replay function can reproduce the compiling process in the core.
|
||||
<a href="c2replay.html">c2replay.html</a>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -220,6 +220,12 @@ These scripts are used to run SA remotely.
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>C2 Compilation Replay</h3>
|
||||
<p>
|
||||
When a java process crashes in compiled method, usually a core file is saved.
|
||||
The C2 replay function can reproduce the compiling process in the core.
|
||||
<a href="c2replay.html">c2replay.html</a>
|
||||
|
||||
<h3>Debugging transported core dumps</h3>
|
||||
<p>
|
||||
When a core dump is moved from the machine where it was produced to a
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
# This guards against adding broken .java files to the directory
|
||||
@@ -42,8 +42,6 @@ PKGLIST = \
|
||||
sun.jvm.hotspot \
|
||||
sun.jvm.hotspot.asm \
|
||||
sun.jvm.hotspot.asm.sparc \
|
||||
sun.jvm.hotspot.bugspot \
|
||||
sun.jvm.hotspot.bugspot.tree \
|
||||
sun.jvm.hotspot.c1 \
|
||||
sun.jvm.hotspot.ci \
|
||||
sun.jvm.hotspot.code \
|
||||
@@ -58,10 +56,8 @@ sun.jvm.hotspot.debugger.cdbg.basic \
|
||||
sun.jvm.hotspot.debugger.cdbg.basic.amd64 \
|
||||
sun.jvm.hotspot.debugger.cdbg.basic.x86 \
|
||||
sun.jvm.hotspot.debugger.dummy \
|
||||
sun.jvm.hotspot.debugger.ia64 \
|
||||
sun.jvm.hotspot.debugger.linux \
|
||||
sun.jvm.hotspot.debugger.linux.amd64 \
|
||||
sun.jvm.hotspot.debugger.linux.ia64 \
|
||||
sun.jvm.hotspot.debugger.linux.x86 \
|
||||
sun.jvm.hotspot.debugger.posix \
|
||||
sun.jvm.hotspot.debugger.posix.elf \
|
||||
@@ -77,7 +73,6 @@ sun.jvm.hotspot.debugger.sparc \
|
||||
sun.jvm.hotspot.debugger.win32.coff \
|
||||
sun.jvm.hotspot.debugger.windbg \
|
||||
sun.jvm.hotspot.debugger.windbg.amd64 \
|
||||
sun.jvm.hotspot.debugger.windbg.ia64 \
|
||||
sun.jvm.hotspot.debugger.windbg.x86 \
|
||||
sun.jvm.hotspot.debugger.x86 \
|
||||
sun.jvm.hotspot.gc_implementation \
|
||||
@@ -87,7 +82,6 @@ sun.jvm.hotspot.gc_implementation.shared \
|
||||
sun.jvm.hotspot.gc_interface \
|
||||
sun.jvm.hotspot.interpreter \
|
||||
sun.jvm.hotspot.jdi \
|
||||
sun.jvm.hotspot.livejvm \
|
||||
sun.jvm.hotspot.memory \
|
||||
sun.jvm.hotspot.opto \
|
||||
sun.jvm.hotspot.oops \
|
||||
@@ -97,10 +91,8 @@ sun.jvm.hotspot.runtime.amd64 \
|
||||
sun.jvm.hotspot.runtime.bsd \
|
||||
sun.jvm.hotspot.runtime.bsd_amd64 \
|
||||
sun.jvm.hotspot.runtime.bsd_x86 \
|
||||
sun.jvm.hotspot.runtime.ia64 \
|
||||
sun.jvm.hotspot.runtime.linux \
|
||||
sun.jvm.hotspot.runtime.linux_amd64 \
|
||||
sun.jvm.hotspot.runtime.linux_ia64 \
|
||||
sun.jvm.hotspot.runtime.linux_sparc \
|
||||
sun.jvm.hotspot.runtime.linux_x86 \
|
||||
sun.jvm.hotspot.runtime.posix \
|
||||
@@ -109,7 +101,6 @@ sun.jvm.hotspot.runtime.solaris_sparc \
|
||||
sun.jvm.hotspot.runtime.solaris_x86 \
|
||||
sun.jvm.hotspot.runtime.sparc \
|
||||
sun.jvm.hotspot.runtime.win32_amd64 \
|
||||
sun.jvm.hotspot.runtime.win32_ia64 \
|
||||
sun.jvm.hotspot.runtime.win32_x86 \
|
||||
sun.jvm.hotspot.runtime.x86 \
|
||||
sun.jvm.hotspot.tools \
|
||||
@@ -136,8 +127,6 @@ FILELIST = \
|
||||
sun/jvm/hotspot/*.java \
|
||||
sun/jvm/hotspot/asm/*.java \
|
||||
sun/jvm/hotspot/asm/sparc/*.java \
|
||||
sun/jvm/hotspot/bugspot/*.java \
|
||||
sun/jvm/hotspot/bugspot/tree/*.java \
|
||||
sun/jvm/hotspot/c1/*.java \
|
||||
sun/jvm/hotspot/ci/*.java \
|
||||
sun/jvm/hotspot/code/*.java \
|
||||
@@ -152,7 +141,6 @@ sun/jvm/hotspot/debugger/cdbg/basic/*.java \
|
||||
sun/jvm/hotspot/debugger/cdbg/basic/amd64/*.java \
|
||||
sun/jvm/hotspot/debugger/cdbg/basic/x86/*.java \
|
||||
sun/jvm/hotspot/debugger/dummy/*.java \
|
||||
sun/jvm/hotspot/debugger/ia64/*.java \
|
||||
sun/jvm/hotspot/debugger/linux/*.java \
|
||||
sun/jvm/hotspot/debugger/linux/x86/*.java \
|
||||
sun/jvm/hotspot/debugger/posix/*.java \
|
||||
@@ -168,7 +156,6 @@ sun/jvm/hotspot/debugger/remote/x86/*.java \
|
||||
sun/jvm/hotspot/debugger/sparc/*.java \
|
||||
sun/jvm/hotspot/debugger/win32/coff/*.java \
|
||||
sun/jvm/hotspot/debugger/windbg/*.java \
|
||||
sun/jvm/hotspot/debugger/windbg/ia64/*.java \
|
||||
sun/jvm/hotspot/debugger/windbg/x86/*.java \
|
||||
sun/jvm/hotspot/debugger/x86/*.java \
|
||||
sun/jvm/hotspot/gc_implementation/g1/*.java \
|
||||
@@ -176,7 +163,6 @@ sun/jvm/hotspot/gc_implementation/parallelScavenge/*.java \
|
||||
sun/jvm/hotspot/gc_implementation/shared/*.java \
|
||||
sun/jvm/hotspot/interpreter/*.java \
|
||||
sun/jvm/hotspot/jdi/*.java \
|
||||
sun/jvm/hotspot/livejvm/*.java \
|
||||
sun/jvm/hotspot/memory/*.java \
|
||||
sun/jvm/hotspot/oops/*.java \
|
||||
sun/jvm/hotspot/opto/*.java \
|
||||
@@ -186,10 +172,8 @@ sun/jvm/hotspot/runtime/amd64/*.java \
|
||||
sun/jvm/hotspot/runtime/bsd/*.java \
|
||||
sun/jvm/hotspot/runtime/bsd_amd64/*.java \
|
||||
sun/jvm/hotspot/runtime/bsd_x86/*.java \
|
||||
sun/jvm/hotspot/runtime/ia64/*.java \
|
||||
sun/jvm/hotspot/runtime/linux/*.java \
|
||||
sun/jvm/hotspot/runtime/linux_amd64/*.java \
|
||||
sun/jvm/hotspot/runtime/linux_ia64/*.java \
|
||||
sun/jvm/hotspot/runtime/linux_sparc/*.java \
|
||||
sun/jvm/hotspot/runtime/linux_x86/*.java \
|
||||
sun/jvm/hotspot/runtime/posix/*.java \
|
||||
@@ -198,7 +182,6 @@ sun/jvm/hotspot/runtime/solaris_sparc/*.java \
|
||||
sun/jvm/hotspot/runtime/solaris_x86/*.java \
|
||||
sun/jvm/hotspot/runtime/sparc/*.java \
|
||||
sun/jvm/hotspot/runtime/win32_amd64/*.java \
|
||||
sun/jvm/hotspot/runtime/win32_ia64/*.java \
|
||||
sun/jvm/hotspot/runtime/win32_x86/*.java \
|
||||
sun/jvm/hotspot/runtime/x86/*.java \
|
||||
sun/jvm/hotspot/tools/*.java \
|
||||
@@ -216,7 +199,7 @@ sun/jvm/hotspot/utilities/*.java \
|
||||
sun/jvm/hotspot/utilities/memo/*.java \
|
||||
sun/jvm/hotspot/utilities/soql/*.java \
|
||||
com/sun/java/swing/action/*.java \
|
||||
com/sun/java/swing/ui/*.java
|
||||
com/sun/java/swing/ui/*.java
|
||||
#END FILELIST
|
||||
|
||||
ifneq "x$(ALT_BOOTDIR)" "x"
|
||||
@@ -242,7 +225,7 @@ BUILD_DIR = ../build
|
||||
OUTPUT_DIR = $(BUILD_DIR)/classes
|
||||
DOC_DIR = $(BUILD_DIR)/doc
|
||||
|
||||
# gnumake 3.78.1 does not accept the *s,
|
||||
# gnumake 3.78.1 does not accept the *s,
|
||||
# so use the shell to expand them
|
||||
ALLFILES := $(patsubst %,$(SRC_DIR)/%,$(FILELIST))
|
||||
ALLFILES := $(shell /bin/ls $(ALLFILES))
|
||||
@@ -258,6 +241,7 @@ SA_BUILD_VERSION_PROP = "sun.jvm.hotspot.runtime.VM.saBuildVersion=$(SA_BUILD_VE
|
||||
|
||||
SA_PROPERTIES = $(OUTPUT_DIR)/sa.properties
|
||||
JAVAC = $(JDK_HOME)/bin/javac
|
||||
JAVA = $(JDK_HOME)/bin/java
|
||||
JAVADOC = $(JDK_HOME)/bin/javadoc
|
||||
RMIC = $(JDK_HOME)/bin/rmic
|
||||
|
||||
@@ -298,7 +282,7 @@ filelist: $(ALLFILES)
|
||||
|
||||
.PHONY: natives
|
||||
natives:
|
||||
cd ../src/os/`java -classpath $(OUTPUT_DIR) sun.jvm.hotspot.utilities.PlatformInfo`; $(MAKE) all
|
||||
cd ../src/os/`$(JAVA) -classpath $(OUTPUT_DIR) sun.jvm.hotspot.utilities.PlatformInfo`; $(MAKE) all
|
||||
|
||||
.PHONY: sa-jdi.jar
|
||||
sa-jdi.jar:
|
||||
@@ -313,7 +297,7 @@ sizes: $(ALLFILES)
|
||||
cscope: $(ALLFILES)
|
||||
rm -f java.files
|
||||
echo $(ALLFILES) > java.files
|
||||
cscope -b -i java.files -f java.out
|
||||
cscope -b -i java.files -f java.out
|
||||
rm -f java.files
|
||||
|
||||
.PHONY: sa.jar
|
||||
@@ -323,5 +307,5 @@ sa.jar:
|
||||
|
||||
clean::
|
||||
rm -rf filelist
|
||||
cd ../src/os/`java -classpath $(OUTPUT_DIR) sun.jvm.hotspot.utilities.PlatformInfo`; $(MAKE) clean
|
||||
cd ../src/os/`$(JAVA) -classpath $(OUTPUT_DIR) sun.jvm.hotspot.utilities.PlatformInfo`; $(MAKE) clean
|
||||
rm -rf $(BUILD_DIR)/*
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
REM
|
||||
REM Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
REM
|
||||
REM This code is free software; you can redistribute it and/or modify it
|
||||
REM under the terms of the GNU General Public License version 2 only, as
|
||||
REM published by the Free Software Foundation.
|
||||
REM
|
||||
REM This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
REM ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
REM FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
REM version 2 for more details (a copy is included in the LICENSE file that
|
||||
REM accompanied this code).
|
||||
REM
|
||||
REM You should have received a copy of the GNU General Public License version
|
||||
REM 2 along with this work; if not, write to the Free Software Foundation,
|
||||
REM Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
REM
|
||||
REM Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
REM or visit www.oracle.com if you need additional information or have any
|
||||
REM questions.
|
||||
REM
|
||||
REM
|
||||
|
||||
java -showversion -cp ..\build\classes;..\src\share\lib\js.jar;.\sa.jar;lib\js.jar sun.jvm.hotspot.bugspot.Main
|
||||
@@ -26,14 +26,12 @@
|
||||
|
||||
<ul>
|
||||
<li><code>java -cp classes sun.jvm.hotspot.HSDB</code>
|
||||
<li><code>java -cp classes sun.jvm.hotspot.bugspot.Main</code>
|
||||
</ul>
|
||||
|
||||
<h2>Feedback</h2>
|
||||
<p>
|
||||
Refactoring of package hierarchy. All user interface components should be in
|
||||
the ui package. Perhaps: sun.jvm.hotspot.ui.hsdb.Main for the HSDB and
|
||||
sun.jvm.hotspot.ui.bugspot.Main for BugSpot.
|
||||
the ui package. Perhaps: sun.jvm.hotspot.ui.hsdb.Main for the HSDB.
|
||||
<p>
|
||||
The src\share\vm\agent area seems like a workspace so it should be organized like
|
||||
one. In particular, I'd like to suggest the following directory layout:<br>
|
||||
@@ -47,7 +45,7 @@
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Seems like there is a lot of redundant functionality. Between the HSDB and BugSpot. Perhaps
|
||||
Seems like there is a lot of redundant functionality. Perhaps
|
||||
this can be consolidated with a <code>javax.swing.Actions</code> architecture.
|
||||
|
||||
<h2>Tasklist</h2>
|
||||
@@ -55,11 +53,7 @@
|
||||
<p>
|
||||
<b>Stack memory pane</b>:
|
||||
It's one of the more useful JVM debugging tools in the SA. However, it
|
||||
doesn't support any interaction with the text; the Memory Panel in BugSpot
|
||||
was written afterward (with help from Shannon) and implements proper
|
||||
selection, scrolling, and drag-and-drop, but no annotations. I'm not sure how
|
||||
to integrate the annotations with the JTable that's being used for the memory
|
||||
view; if you have suggestions here please let me know.
|
||||
doesn't support any interaction with the text.
|
||||
<p>
|
||||
<b>Integrations with the NetBeans architecture (plug in).</b> See the
|
||||
<a href="http://openide.netbeans.org">Netbeans Open APIs homepage</a>
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
#import <dlfcn.h>
|
||||
#import <limits.h>
|
||||
#import <errno.h>
|
||||
#import <sys/types.h>
|
||||
#import <sys/ptrace.h>
|
||||
|
||||
jboolean debug = JNI_FALSE;
|
||||
|
||||
@@ -97,7 +99,8 @@ static void throw_new_debugger_exception(JNIEnv* env, const char* errMsg) {
|
||||
* Method: init0
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_init0(JNIEnv *env, jclass cls) {
|
||||
JNIEXPORT void JNICALL
|
||||
Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_init0(JNIEnv *env, jclass cls) {
|
||||
symbolicatorID = (*env)->GetFieldID(env, cls, "symbolicator", "J");
|
||||
taskID = (*env)->GetFieldID(env, cls, "task", "J");
|
||||
CHECK_EXCEPTION;
|
||||
@@ -108,7 +111,11 @@ JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_init0(
|
||||
* Method: lookupByName0
|
||||
* Signature: (Ljava/lang/String;Ljava/lang/String;)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_lookupByName0(JNIEnv *env, jobject this_obj, jstring objectName, jstring symbolName) {
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_lookupByName0(
|
||||
JNIEnv *env, jobject this_obj,
|
||||
jstring objectName, jstring symbolName)
|
||||
{
|
||||
jlong address = 0;
|
||||
|
||||
JNF_COCOA_ENTER(env);
|
||||
@@ -137,7 +144,11 @@ JNF_COCOA_EXIT(env);
|
||||
* Method: readBytesFromProcess0
|
||||
* Signature: (JJ)Lsun/jvm/hotspot/debugger/ReadResult;
|
||||
*/
|
||||
JNIEXPORT jbyteArray JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_readBytesFromProcess0(JNIEnv *env, jobject this_obj, jlong addr, jlong numBytes) {
|
||||
JNIEXPORT jbyteArray JNICALL
|
||||
Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_readBytesFromProcess0(
|
||||
JNIEnv *env, jobject this_obj,
|
||||
jlong addr, jlong numBytes)
|
||||
{
|
||||
if (debug) printf("readBytesFromProcess called. addr = %llx numBytes = %lld\n", addr, numBytes);
|
||||
|
||||
// must allocate storage instead of using former parameter buf
|
||||
@@ -209,12 +220,74 @@ JNIEXPORT jbyteArray JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_
|
||||
return array;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Class: sun_jvm_hotspot_debugger_macosx_MacOSXDebuggerLocal
|
||||
* Method: getThreadIntegerRegisterSet0
|
||||
* Signature: (I)[J
|
||||
* Lookup the thread_t that corresponds to the given thread_id.
|
||||
* The thread_id should be the result from calling thread_info() with THREAD_IDENTIFIER_INFO
|
||||
* and reading the m_ident_info.thread_id returned.
|
||||
* The returned thread_t is the mach send right to the kernel port for the corresponding thread.
|
||||
*
|
||||
* We cannot simply use the OSThread._thread_id field in the JVM. This is set to ::mach_thread_self()
|
||||
* in the VM, but that thread port is not valid for a remote debugger to access the thread.
|
||||
*/
|
||||
JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getThreadIntegerRegisterSet0(JNIEnv *env, jobject this_obj, jint lwp_id) {
|
||||
thread_t
|
||||
lookupThreadFromThreadId(task_t task, jlong thread_id) {
|
||||
if (debug) {
|
||||
printf("lookupThreadFromThreadId thread_id=0x%llx\n", thread_id);
|
||||
}
|
||||
|
||||
thread_array_t thread_list = NULL;
|
||||
mach_msg_type_number_t thread_list_count = 0;
|
||||
thread_t result_thread = 0;
|
||||
int i;
|
||||
|
||||
// get the list of all the send rights
|
||||
kern_return_t result = task_threads(task, &thread_list, &thread_list_count);
|
||||
if (result != KERN_SUCCESS) {
|
||||
if (debug) {
|
||||
printf("task_threads returned 0x%x\n", result);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
for(i = 0 ; i < thread_list_count; i++) {
|
||||
thread_identifier_info_data_t m_ident_info;
|
||||
mach_msg_type_number_t count = THREAD_IDENTIFIER_INFO_COUNT;
|
||||
|
||||
// get the THREAD_IDENTIFIER_INFO for the send right
|
||||
result = thread_info(thread_list[i], THREAD_IDENTIFIER_INFO, (thread_info_t) &m_ident_info, &count);
|
||||
if (result != KERN_SUCCESS) {
|
||||
if (debug) {
|
||||
printf("thread_info returned 0x%x\n", result);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// if this is the one we're looking for, return the send right
|
||||
if (thread_id == m_ident_info.thread_id)
|
||||
{
|
||||
result_thread = thread_list[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
vm_size_t thread_list_size = (vm_size_t) (thread_list_count * sizeof (thread_t));
|
||||
vm_deallocate(mach_task_self(), (vm_address_t) thread_list, thread_list_count);
|
||||
|
||||
return result_thread;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal
|
||||
* Method: getThreadIntegerRegisterSet0
|
||||
* Signature: (J)[J
|
||||
*/
|
||||
JNIEXPORT jlongArray JNICALL
|
||||
Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getThreadIntegerRegisterSet0(
|
||||
JNIEnv *env, jobject this_obj,
|
||||
jlong thread_id)
|
||||
{
|
||||
if (debug)
|
||||
printf("getThreadRegisterSet0 called\n");
|
||||
|
||||
@@ -226,8 +299,9 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_
|
||||
int i;
|
||||
jlongArray registerArray;
|
||||
jlong *primitiveArray;
|
||||
task_t gTask = getTask(env, this_obj);
|
||||
|
||||
tid = lwp_id;
|
||||
tid = lookupThreadFromThreadId(gTask, thread_id);
|
||||
|
||||
result = thread_get_state(tid, HSDB_THREAD_STATE, (thread_state_t)&state, &count);
|
||||
|
||||
@@ -328,19 +402,21 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: sun_jvm_hotspot_debugger_macosx_MacOSXDebuggerLocal
|
||||
* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal
|
||||
* Method: translateTID0
|
||||
* Signature: (I)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_sun_jvm_hotspot_debugger_macosx_MacOSXDebuggerLocal_translateTID0(JNIEnv *env, jobject this_obj, jint tid) {
|
||||
Java_sun_jvm_hotspot_debugger_macosx_MacOSXDebuggerLocal_translateTID0(
|
||||
JNIEnv *env, jobject this_obj, jint tid)
|
||||
{
|
||||
if (debug)
|
||||
printf("translateTID0 called on tid = 0x%x\n", (int)tid);
|
||||
|
||||
kern_return_t result;
|
||||
thread_t foreign_tid, usable_tid;
|
||||
mach_msg_type_name_t type;
|
||||
|
||||
|
||||
foreign_tid = tid;
|
||||
|
||||
task_t gTask = getTask(env, this_obj);
|
||||
@@ -356,19 +432,90 @@ Java_sun_jvm_hotspot_debugger_macosx_MacOSXDebuggerLocal_translateTID0(JNIEnv *e
|
||||
return (jint) usable_tid;
|
||||
}
|
||||
|
||||
|
||||
static bool ptrace_continue(pid_t pid, int signal) {
|
||||
// pass the signal to the process so we don't swallow it
|
||||
int res;
|
||||
if ((res = ptrace(PT_CONTINUE, pid, (caddr_t)1, signal)) < 0) {
|
||||
fprintf(stderr, "attach: ptrace(PT_CONTINUE, %d) failed with %d\n", pid, res);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// waits until the ATTACH has stopped the process
|
||||
// by signal SIGSTOP
|
||||
static bool ptrace_waitpid(pid_t pid) {
|
||||
int ret;
|
||||
int status;
|
||||
while (true) {
|
||||
// Wait for debuggee to stop.
|
||||
ret = waitpid(pid, &status, 0);
|
||||
if (ret >= 0) {
|
||||
if (WIFSTOPPED(status)) {
|
||||
// Any signal will stop the thread, make sure it is SIGSTOP. Otherwise SIGSTOP
|
||||
// will still be pending and delivered when the process is DETACHED and the process
|
||||
// will go to sleep.
|
||||
if (WSTOPSIG(status) == SIGSTOP) {
|
||||
// Debuggee stopped by SIGSTOP.
|
||||
return true;
|
||||
}
|
||||
if (!ptrace_continue(pid, WSTOPSIG(status))) {
|
||||
fprintf(stderr, "attach: Failed to correctly attach to VM. VM might HANG! [PTRACE_CONT failed, stopped by %d]\n", WSTOPSIG(status));
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
fprintf(stderr, "attach: waitpid(): Child process exited/terminated (status = 0x%x)\n", status);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
switch (errno) {
|
||||
case EINTR:
|
||||
continue;
|
||||
break;
|
||||
case ECHILD:
|
||||
fprintf(stderr, "attach: waitpid() failed. Child process pid (%d) does not exist \n", pid);
|
||||
break;
|
||||
case EINVAL:
|
||||
fprintf(stderr, "attach: waitpid() failed. Invalid options argument.\n");
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "attach: waitpid() failed. Unexpected error %d\n",errno);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// attach to a process/thread specified by "pid"
|
||||
static bool ptrace_attach(pid_t pid) {
|
||||
int res;
|
||||
if ((res = ptrace(PT_ATTACH, pid, 0, 0)) < 0) {
|
||||
fprintf(stderr, "ptrace(PT_ATTACH, %d) failed with %d\n", pid, res);
|
||||
return false;
|
||||
} else {
|
||||
return ptrace_waitpid(pid);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal
|
||||
* Method: attach0
|
||||
* Signature: (I)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_attach0__I(JNIEnv *env, jobject this_obj, jint jpid) {
|
||||
JNIEXPORT void JNICALL
|
||||
Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_attach0__I(
|
||||
JNIEnv *env, jobject this_obj, jint jpid)
|
||||
{
|
||||
JNF_COCOA_ENTER(env);
|
||||
if (getenv("JAVA_SAPROC_DEBUG") != NULL)
|
||||
debug = JNI_TRUE;
|
||||
else
|
||||
debug = JNI_FALSE;
|
||||
if (debug) printf("attach0 called for jpid=%d\n", (int)jpid);
|
||||
|
||||
|
||||
// get the task from the pid
|
||||
kern_return_t result;
|
||||
task_t gTask = 0;
|
||||
result = task_for_pid(mach_task_self(), jpid, &gTask);
|
||||
@@ -378,6 +525,13 @@ JNF_COCOA_ENTER(env);
|
||||
}
|
||||
putTask(env, this_obj, gTask);
|
||||
|
||||
// use ptrace to stop the process
|
||||
// on os x, ptrace only needs to be called on the process, not the individual threads
|
||||
if (ptrace_attach(jpid) != true) {
|
||||
mach_port_deallocate(mach_task_self(), gTask);
|
||||
THROW_NEW_DEBUGGER_EXCEPTION("Can't attach to the process");
|
||||
}
|
||||
|
||||
id symbolicator = nil;
|
||||
id jrsSymbolicator = objc_lookUpClass("JRSSymbolicator");
|
||||
if (jrsSymbolicator != nil) {
|
||||
@@ -401,11 +555,29 @@ JNF_COCOA_EXIT(env);
|
||||
* Method: detach0
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_detach0(JNIEnv *env, jobject this_obj) {
|
||||
JNIEXPORT void JNICALL
|
||||
Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_detach0(
|
||||
JNIEnv *env, jobject this_obj)
|
||||
{
|
||||
JNF_COCOA_ENTER(env);
|
||||
if (debug) printf("detach0 called\n");
|
||||
|
||||
task_t gTask = getTask(env, this_obj);
|
||||
|
||||
// detach from the ptraced process causing it to resume execution
|
||||
int pid;
|
||||
kern_return_t k_res;
|
||||
k_res = pid_for_task(gTask, &pid);
|
||||
if (k_res != KERN_SUCCESS) {
|
||||
fprintf(stderr, "detach: pid_for_task(%d) failed (%d)\n", pid, k_res);
|
||||
}
|
||||
else {
|
||||
int res = ptrace(PT_DETACH, pid, 0, 0);
|
||||
if (res < 0) {
|
||||
fprintf(stderr, "detach: ptrace(PT_DETACH, %d) failed (%d)\n", pid, res);
|
||||
}
|
||||
}
|
||||
|
||||
mach_port_deallocate(mach_task_self(), gTask);
|
||||
id symbolicator = getSymbolicator(env, this_obj);
|
||||
if (symbolicator != nil) {
|
||||
@@ -419,10 +591,13 @@ JNF_COCOA_EXIT(env);
|
||||
* Method: load_library
|
||||
* Signature: (Ljava/lang/String;)L
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_sun_jvm_hotspot_asm_Disassembler_load_1library(JNIEnv * env,
|
||||
jclass disclass,
|
||||
jstring jrepath_s,
|
||||
jstring libname_s) {
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_sun_jvm_hotspot_asm_Disassembler_load_1library(
|
||||
JNIEnv * env,
|
||||
jclass disclass,
|
||||
jstring jrepath_s,
|
||||
jstring libname_s)
|
||||
{
|
||||
uintptr_t func = 0;
|
||||
const char* error_message = NULL;
|
||||
const char* java_home;
|
||||
@@ -533,13 +708,16 @@ static int printf_to_env(void* env_pv, const char* format, ...) {
|
||||
* Method: decode
|
||||
* Signature: (Lsun/jvm/hotspot/asm/InstructionVisitor;J[BLjava/lang/String;J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_sun_jvm_hotspot_asm_Disassembler_decode(JNIEnv * env,
|
||||
jobject dis,
|
||||
jobject visitor,
|
||||
jlong startPc,
|
||||
jbyteArray code,
|
||||
jstring options_s,
|
||||
jlong decode_instructions_virtual) {
|
||||
JNIEXPORT void JNICALL
|
||||
Java_sun_jvm_hotspot_asm_Disassembler_decode(
|
||||
JNIEnv * env,
|
||||
jobject dis,
|
||||
jobject visitor,
|
||||
jlong startPc,
|
||||
jbyteArray code,
|
||||
jstring options_s,
|
||||
jlong decode_instructions_virtual)
|
||||
{
|
||||
jboolean isCopy;
|
||||
jbyte* start = (*env)->GetByteArrayElements(env, code, &isCopy);
|
||||
jbyte* end = start + (*env)->GetArrayLength(env, code);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2013, 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
|
||||
@@ -91,6 +91,14 @@ void print_debug(const char* format,...) {
|
||||
}
|
||||
}
|
||||
|
||||
void print_error(const char* format,...) {
|
||||
va_list alist;
|
||||
va_start(alist, format);
|
||||
fputs("ERROR: ", stderr);
|
||||
vfprintf(stderr, format, alist);
|
||||
va_end(alist);
|
||||
}
|
||||
|
||||
bool is_debug() {
|
||||
return _libsaproc_debug;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2013, 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
|
||||
@@ -107,6 +107,7 @@ struct ps_prochandle {
|
||||
int pathmap_open(const char* name);
|
||||
|
||||
void print_debug(const char* format,...);
|
||||
void print_error(const char* format,...);
|
||||
bool is_debug();
|
||||
|
||||
typedef bool (*thread_info_callback)(struct ps_prochandle* ph, pthread_t pid, lwpid_t lwpid);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2013, 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,42 +129,66 @@ static bool process_get_lwp_info(struct ps_prochandle *ph, lwpid_t lwp_id, void
|
||||
return (errno == 0)? true: false;
|
||||
}
|
||||
|
||||
static bool ptrace_continue(pid_t pid, int signal) {
|
||||
// pass the signal to the process so we don't swallow it
|
||||
if (ptrace(PTRACE_CONT, pid, NULL, signal) < 0) {
|
||||
print_debug("ptrace(PTRACE_CONT, ..) failed for %d\n", pid);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// waits until the ATTACH has stopped the process
|
||||
// by signal SIGSTOP
|
||||
static bool ptrace_waitpid(pid_t pid) {
|
||||
int ret;
|
||||
int status;
|
||||
do {
|
||||
// Wait for debuggee to stop.
|
||||
ret = waitpid(pid, &status, 0);
|
||||
if (ret >= 0) {
|
||||
if (WIFSTOPPED(status)) {
|
||||
// Any signal will stop the thread, make sure it is SIGSTOP. Otherwise SIGSTOP
|
||||
// will still be pending and delivered when the process is DETACHED and the process
|
||||
// will go to sleep.
|
||||
if (WSTOPSIG(status) == SIGSTOP) {
|
||||
// Debuggee stopped by SIGSTOP.
|
||||
return true;
|
||||
}
|
||||
if (!ptrace_continue(pid, WSTOPSIG(status))) {
|
||||
print_error("Failed to correctly attach to VM. VM might HANG! [PTRACE_CONT failed, stopped by %d]\n", WSTOPSIG(status));
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
print_debug("waitpid(): Child process exited/terminated (status = 0x%x)\n", status);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
switch (errno) {
|
||||
case EINTR:
|
||||
continue;
|
||||
break;
|
||||
case ECHILD:
|
||||
print_debug("waitpid() failed. Child process pid (%d) does not exist \n", pid);
|
||||
break;
|
||||
case EINVAL:
|
||||
print_debug("waitpid() failed. Invalid options argument.\n");
|
||||
break;
|
||||
default:
|
||||
print_debug("waitpid() failed. Unexpected error %d\n",errno);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} while(true);
|
||||
}
|
||||
|
||||
// attach to a process/thread specified by "pid"
|
||||
static bool ptrace_attach(pid_t pid) {
|
||||
if (ptrace(PT_ATTACH, pid, NULL, 0) < 0) {
|
||||
print_debug("ptrace(PTRACE_ATTACH, ..) failed for %d\n", pid);
|
||||
return false;
|
||||
} else {
|
||||
int ret;
|
||||
int status;
|
||||
do {
|
||||
// Wait for debuggee to stop.
|
||||
ret = waitpid(pid, &status, 0);
|
||||
if (ret >= 0) {
|
||||
if (WIFSTOPPED(status)) {
|
||||
// Debuggee stopped.
|
||||
return true;
|
||||
} else {
|
||||
print_debug("waitpid(): Child process exited/terminated (status = 0x%x)\n", status);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
switch (errno) {
|
||||
case EINTR:
|
||||
continue;
|
||||
break;
|
||||
case ECHILD:
|
||||
print_debug("waitpid() failed. Child process pid (%d) does not exist \n", pid);
|
||||
break;
|
||||
case EINVAL:
|
||||
print_debug("waitpid() failed. Invalid options argument.\n");
|
||||
break;
|
||||
default:
|
||||
print_debug("waitpid() failed. Unexpected error %d\n",errno);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} while(true);
|
||||
return ptrace_waitpid(pid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ JNIEXPORT jbyteArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
|
||||
return (err == PS_OK)? array : 0;
|
||||
}
|
||||
|
||||
#if defined(i386) || defined(ia64) || defined(amd64) || defined(sparc) || defined(sparcv9)
|
||||
#if defined(i386) || defined(amd64) || defined(sparc) || defined(sparcv9)
|
||||
JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0
|
||||
(JNIEnv *env, jobject this_obj, jint lwp_id) {
|
||||
|
||||
@@ -299,9 +299,6 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
|
||||
#ifdef i386
|
||||
#define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG
|
||||
#endif
|
||||
#ifdef ia64
|
||||
#define NPRGREG IA64_REG_COUNT
|
||||
#endif
|
||||
#ifdef amd64
|
||||
#define NPRGREG sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_NPRGREG
|
||||
#endif
|
||||
@@ -336,13 +333,6 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
|
||||
|
||||
#endif /* i386 */
|
||||
|
||||
#if ia64
|
||||
regs = (*env)->GetLongArrayElements(env, array, &isCopy);
|
||||
for (i = 0; i < NPRGREG; i++ ) {
|
||||
regs[i] = 0xDEADDEAD;
|
||||
}
|
||||
#endif /* ia64 */
|
||||
|
||||
#ifdef amd64
|
||||
#define REG_INDEX(reg) sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_##reg
|
||||
|
||||
|
||||
@@ -79,14 +79,6 @@ combination of ptrace and /proc calls.
|
||||
|
||||
*************************************************************************************/
|
||||
|
||||
#ifdef ia64
|
||||
struct user_regs_struct {
|
||||
/* copied from user.h which doesn't define this in a struct */
|
||||
|
||||
#define IA64_REG_COUNT (EF_SIZE/8+32) /* integer and fp regs */
|
||||
unsigned long regs[IA64_REG_COUNT]; /* integer and fp regs */
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(sparc) || defined(sparcv9)
|
||||
#define user_regs_struct pt_regs
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2013, 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,6 +92,14 @@ void print_debug(const char* format,...) {
|
||||
}
|
||||
}
|
||||
|
||||
void print_error(const char* format,...) {
|
||||
va_list alist;
|
||||
va_start(alist, format);
|
||||
fputs("ERROR: ", stderr);
|
||||
vfprintf(stderr, format, alist);
|
||||
va_end(alist);
|
||||
}
|
||||
|
||||
bool is_debug() {
|
||||
return _libsaproc_debug;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2013, 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
|
||||
@@ -105,6 +105,7 @@ struct ps_prochandle {
|
||||
int pathmap_open(const char* name);
|
||||
|
||||
void print_debug(const char* format,...);
|
||||
void print_error(const char* format,...);
|
||||
bool is_debug();
|
||||
|
||||
typedef bool (*thread_info_callback)(struct ps_prochandle* ph, pthread_t pid, lwpid_t lwpid);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2013, 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
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include "libproc_impl.h"
|
||||
@@ -142,46 +143,71 @@ static bool process_get_lwp_regs(struct ps_prochandle* ph, pid_t pid, struct use
|
||||
|
||||
}
|
||||
|
||||
static bool ptrace_continue(pid_t pid, int signal) {
|
||||
// pass the signal to the process so we don't swallow it
|
||||
if (ptrace(PTRACE_CONT, pid, NULL, signal) < 0) {
|
||||
print_debug("ptrace(PTRACE_CONT, ..) failed for %d\n", pid);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// waits until the ATTACH has stopped the process
|
||||
// by signal SIGSTOP
|
||||
static bool ptrace_waitpid(pid_t pid) {
|
||||
int ret;
|
||||
int status;
|
||||
while (true) {
|
||||
// Wait for debuggee to stop.
|
||||
ret = waitpid(pid, &status, 0);
|
||||
if (ret == -1 && errno == ECHILD) {
|
||||
// try cloned process.
|
||||
ret = waitpid(pid, &status, __WALL);
|
||||
}
|
||||
if (ret >= 0) {
|
||||
if (WIFSTOPPED(status)) {
|
||||
// Any signal will stop the thread, make sure it is SIGSTOP. Otherwise SIGSTOP
|
||||
// will still be pending and delivered when the process is DETACHED and the process
|
||||
// will go to sleep.
|
||||
if (WSTOPSIG(status) == SIGSTOP) {
|
||||
// Debuggee stopped by SIGSTOP.
|
||||
return true;
|
||||
}
|
||||
if (!ptrace_continue(pid, WSTOPSIG(status))) {
|
||||
print_error("Failed to correctly attach to VM. VM might HANG! [PTRACE_CONT failed, stopped by %d]\n", WSTOPSIG(status));
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
print_debug("waitpid(): Child process exited/terminated (status = 0x%x)\n", status);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
switch (errno) {
|
||||
case EINTR:
|
||||
continue;
|
||||
break;
|
||||
case ECHILD:
|
||||
print_debug("waitpid() failed. Child process pid (%d) does not exist \n", pid);
|
||||
break;
|
||||
case EINVAL:
|
||||
print_debug("waitpid() failed. Invalid options argument.\n");
|
||||
break;
|
||||
default:
|
||||
print_debug("waitpid() failed. Unexpected error %d\n",errno);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// attach to a process/thread specified by "pid"
|
||||
static bool ptrace_attach(pid_t pid) {
|
||||
if (ptrace(PTRACE_ATTACH, pid, NULL, NULL) < 0) {
|
||||
print_debug("ptrace(PTRACE_ATTACH, ..) failed for %d\n", pid);
|
||||
return false;
|
||||
} else {
|
||||
int ret;
|
||||
int status;
|
||||
do {
|
||||
// Wait for debuggee to stop.
|
||||
ret = waitpid(pid, &status, 0);
|
||||
if (ret == -1 && errno == ECHILD) {
|
||||
// try cloned process.
|
||||
ret = waitpid(pid, &status, __WALL);
|
||||
}
|
||||
if (ret >= 0) {
|
||||
if (WIFSTOPPED(status)) {
|
||||
// Debuggee stopped.
|
||||
return true;
|
||||
} else {
|
||||
print_debug("waitpid(): Child process exited/terminated (status = 0x%x)\n", status);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
switch (errno) {
|
||||
case EINTR:
|
||||
continue;
|
||||
break;
|
||||
case ECHILD:
|
||||
print_debug("waitpid() failed. Child process pid (%d) does not exist \n", pid);
|
||||
break;
|
||||
case EINVAL:
|
||||
print_debug("waitpid() failed. Invalid options argument.\n");
|
||||
break;
|
||||
default:
|
||||
print_debug("waitpid() failed. Unexpected error %d\n",errno);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} while(true);
|
||||
return ptrace_waitpid(pid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,10 +27,7 @@
|
||||
|
||||
#include "sun_jvm_hotspot_debugger_windbg_WindbgDebuggerLocal.h"
|
||||
|
||||
#ifdef _M_IA64
|
||||
#include "sun_jvm_hotspot_debugger_ia64_IA64ThreadContext.h"
|
||||
#define NPRGREG sun_jvm_hotspot_debugger_ia64_IA64ThreadContext_NPRGREG
|
||||
#elif _M_IX86
|
||||
#ifdef _M_IX86
|
||||
#include "sun_jvm_hotspot_debugger_x86_X86ThreadContext.h"
|
||||
#define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG
|
||||
#elif _M_AMD64
|
||||
@@ -375,8 +372,7 @@ static bool attachToProcess(JNIEnv* env, jobject obj, jint pid) {
|
||||
|
||||
We are attaching to a process in 'read-only' mode. i.e., we do not want to
|
||||
put breakpoints, suspend/resume threads etc. For read-only JDI and HSDB kind of
|
||||
usage this should suffice. We are not intending to use this for full-fledged
|
||||
ProcessControl implementation to be used with BugSpotAgent.
|
||||
usage this should suffice.
|
||||
|
||||
Please refer to DEBUG_ATTACH_NONINVASIVE mode source comments from dbgeng.h.
|
||||
In this mode, debug engine does not call DebugActiveProrcess. i.e., we are not
|
||||
@@ -491,92 +487,7 @@ static bool addThreads(JNIEnv* env, jobject obj) {
|
||||
memset(&context, 0, sizeof(CONTEXT));
|
||||
|
||||
#undef REG_INDEX
|
||||
#ifdef _M_IA64
|
||||
#define REG_INDEX(x) sun_jvm_hotspot_debugger_ia64_IA64ThreadContext_##x
|
||||
|
||||
context.ContextFlags = CONTEXT_FULL | CONTEXT_DEBUG;
|
||||
ptrIDebugAdvanced->GetThreadContext(&context, sizeof(CONTEXT));
|
||||
|
||||
ptrRegs[REG_INDEX(GR0)] = 0; // always 0
|
||||
ptrRegs[REG_INDEX(GR1)] = context.IntGp; // r1
|
||||
ptrRegs[REG_INDEX(GR2)] = context.IntT0; // r2-r3
|
||||
ptrRegs[REG_INDEX(GR3)] = context.IntT1;
|
||||
ptrRegs[REG_INDEX(GR4)] = context.IntS0; // r4-r7
|
||||
ptrRegs[REG_INDEX(GR5)] = context.IntS1;
|
||||
ptrRegs[REG_INDEX(GR6)] = context.IntS2;
|
||||
ptrRegs[REG_INDEX(GR7)] = context.IntS3;
|
||||
ptrRegs[REG_INDEX(GR8)] = context.IntV0; // r8
|
||||
ptrRegs[REG_INDEX(GR9)] = context.IntT2; // r9-r11
|
||||
ptrRegs[REG_INDEX(GR10)] = context.IntT3;
|
||||
ptrRegs[REG_INDEX(GR11)] = context.IntT4;
|
||||
ptrRegs[REG_INDEX(GR12)] = context.IntSp; // r12 stack pointer
|
||||
ptrRegs[REG_INDEX(GR13)] = context.IntTeb; // r13 teb
|
||||
ptrRegs[REG_INDEX(GR14)] = context.IntT5; // r14-r31
|
||||
ptrRegs[REG_INDEX(GR15)] = context.IntT6;
|
||||
ptrRegs[REG_INDEX(GR16)] = context.IntT7;
|
||||
ptrRegs[REG_INDEX(GR17)] = context.IntT8;
|
||||
ptrRegs[REG_INDEX(GR18)] = context.IntT9;
|
||||
ptrRegs[REG_INDEX(GR19)] = context.IntT10;
|
||||
ptrRegs[REG_INDEX(GR20)] = context.IntT11;
|
||||
ptrRegs[REG_INDEX(GR21)] = context.IntT12;
|
||||
ptrRegs[REG_INDEX(GR22)] = context.IntT13;
|
||||
ptrRegs[REG_INDEX(GR23)] = context.IntT14;
|
||||
ptrRegs[REG_INDEX(GR24)] = context.IntT15;
|
||||
ptrRegs[REG_INDEX(GR25)] = context.IntT16;
|
||||
ptrRegs[REG_INDEX(GR26)] = context.IntT17;
|
||||
ptrRegs[REG_INDEX(GR27)] = context.IntT18;
|
||||
ptrRegs[REG_INDEX(GR28)] = context.IntT19;
|
||||
ptrRegs[REG_INDEX(GR29)] = context.IntT20;
|
||||
ptrRegs[REG_INDEX(GR30)] = context.IntT21;
|
||||
ptrRegs[REG_INDEX(GR31)] = context.IntT22;
|
||||
|
||||
ptrRegs[REG_INDEX(INT_NATS)] = context.IntNats;
|
||||
ptrRegs[REG_INDEX(PREDS)] = context.Preds;
|
||||
|
||||
ptrRegs[REG_INDEX(BR_RP)] = context.BrRp;
|
||||
ptrRegs[REG_INDEX(BR1)] = context.BrS0; // b1-b5
|
||||
ptrRegs[REG_INDEX(BR2)] = context.BrS1;
|
||||
ptrRegs[REG_INDEX(BR3)] = context.BrS2;
|
||||
ptrRegs[REG_INDEX(BR4)] = context.BrS3;
|
||||
ptrRegs[REG_INDEX(BR5)] = context.BrS4;
|
||||
ptrRegs[REG_INDEX(BR6)] = context.BrT0; // b6-b7
|
||||
ptrRegs[REG_INDEX(BR7)] = context.BrT1;
|
||||
|
||||
ptrRegs[REG_INDEX(AP_UNAT)] = context.ApUNAT;
|
||||
ptrRegs[REG_INDEX(AP_LC)] = context.ApLC;
|
||||
ptrRegs[REG_INDEX(AP_EC)] = context.ApEC;
|
||||
ptrRegs[REG_INDEX(AP_CCV)] = context.ApCCV;
|
||||
ptrRegs[REG_INDEX(AP_DCR)] = context.ApDCR;
|
||||
|
||||
ptrRegs[REG_INDEX(RS_PFS)] = context.RsPFS;
|
||||
ptrRegs[REG_INDEX(RS_BSP)] = context.RsBSP;
|
||||
ptrRegs[REG_INDEX(RS_BSPSTORE)] = context.RsBSPSTORE;
|
||||
ptrRegs[REG_INDEX(RS_RSC)] = context.RsRSC;
|
||||
ptrRegs[REG_INDEX(RS_RNAT)] = context.RsRNAT;
|
||||
|
||||
ptrRegs[REG_INDEX(ST_IPSR)] = context.StIPSR;
|
||||
ptrRegs[REG_INDEX(ST_IIP)] = context.StIIP;
|
||||
ptrRegs[REG_INDEX(ST_IFS)] = context.StIFS;
|
||||
|
||||
ptrRegs[REG_INDEX(DB_I0)] = context.DbI0;
|
||||
ptrRegs[REG_INDEX(DB_I1)] = context.DbI1;
|
||||
ptrRegs[REG_INDEX(DB_I2)] = context.DbI2;
|
||||
ptrRegs[REG_INDEX(DB_I3)] = context.DbI3;
|
||||
ptrRegs[REG_INDEX(DB_I4)] = context.DbI4;
|
||||
ptrRegs[REG_INDEX(DB_I5)] = context.DbI5;
|
||||
ptrRegs[REG_INDEX(DB_I6)] = context.DbI6;
|
||||
ptrRegs[REG_INDEX(DB_I7)] = context.DbI7;
|
||||
|
||||
ptrRegs[REG_INDEX(DB_D0)] = context.DbD0;
|
||||
ptrRegs[REG_INDEX(DB_D1)] = context.DbD1;
|
||||
ptrRegs[REG_INDEX(DB_D2)] = context.DbD2;
|
||||
ptrRegs[REG_INDEX(DB_D3)] = context.DbD3;
|
||||
ptrRegs[REG_INDEX(DB_D4)] = context.DbD4;
|
||||
ptrRegs[REG_INDEX(DB_D5)] = context.DbD5;
|
||||
ptrRegs[REG_INDEX(DB_D6)] = context.DbD6;
|
||||
ptrRegs[REG_INDEX(DB_D7)] = context.DbD7;
|
||||
|
||||
#elif _M_IX86
|
||||
#ifdef _M_IX86
|
||||
#define REG_INDEX(x) sun_jvm_hotspot_debugger_x86_X86ThreadContext_##x
|
||||
|
||||
context.ContextFlags = CONTEXT_FULL | CONTEXT_DEBUG_REGISTERS;
|
||||
|
||||
@@ -33,6 +33,7 @@ import sun.jvm.hotspot.types.Type;
|
||||
import sun.jvm.hotspot.types.Field;
|
||||
import sun.jvm.hotspot.HotSpotTypeDataBase;
|
||||
import sun.jvm.hotspot.types.basic.BasicType;
|
||||
import sun.jvm.hotspot.types.basic.BasicTypeDataBase;
|
||||
import sun.jvm.hotspot.types.CIntegerType;
|
||||
import sun.jvm.hotspot.code.*;
|
||||
import sun.jvm.hotspot.compiler.*;
|
||||
@@ -448,6 +449,112 @@ public class CommandProcessor {
|
||||
}
|
||||
}
|
||||
},
|
||||
new Command("dumpreplaydata", "dumpreplaydata { <address > | -a | <thread_id> }", false) {
|
||||
// This is used to dump replay data from ciInstanceKlass, ciMethodData etc
|
||||
// default file name is replay.txt, also if java crashes in compiler
|
||||
// thread, this file will be dumped in error processing.
|
||||
public void doit(Tokens t) {
|
||||
if (t.countTokens() != 1) {
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
String name = t.nextToken();
|
||||
Address a = null;
|
||||
try {
|
||||
a = VM.getVM().getDebugger().parseAddress(name);
|
||||
} catch (NumberFormatException e) { }
|
||||
if (a != null) {
|
||||
// only nmethod, Method, MethodData and InstanceKlass needed to
|
||||
// dump replay data
|
||||
|
||||
CodeBlob cb = VM.getVM().getCodeCache().findBlob(a);
|
||||
if (cb != null && (cb instanceof NMethod)) {
|
||||
((NMethod)cb).dumpReplayData(out);
|
||||
return;
|
||||
}
|
||||
// assume it is Metadata
|
||||
Metadata meta = Metadata.instantiateWrapperFor(a);
|
||||
if (meta != null) {
|
||||
meta.dumpReplayData(out);
|
||||
} else {
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Not an address
|
||||
boolean all = name.equals("-a");
|
||||
Threads threads = VM.getVM().getThreads();
|
||||
for (JavaThread thread = threads.first(); thread != null; thread = thread.next()) {
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
thread.printThreadIDOn(new PrintStream(bos));
|
||||
if (all || bos.toString().equals(name)) {
|
||||
if (thread instanceof CompilerThread) {
|
||||
CompilerThread ct = (CompilerThread)thread;
|
||||
ciEnv env = ct.env();
|
||||
if (env != null) {
|
||||
env.dumpReplayData(out);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
new Command("buildreplayjars", "buildreplayjars [ all | app | boot ] | [ prefix ]", false) {
|
||||
// This is used to dump jar files of all the classes
|
||||
// loaded in the core. Everything on the bootclasspath
|
||||
// will go in boot.jar and everything else will go in
|
||||
// app.jar. Then the classes can be loaded by the replay
|
||||
// jvm using -Xbootclasspath/p:boot.jar -cp app.jar. boot.jar usually
|
||||
// not needed, unless changed by jvmti.
|
||||
public void doit(Tokens t) {
|
||||
int tcount = t.countTokens();
|
||||
if (tcount > 2) {
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
try {
|
||||
String prefix = "";
|
||||
String option = "all"; // default
|
||||
switch(tcount) {
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
option = t.nextToken();
|
||||
if (!option.equalsIgnoreCase("all") && !option.equalsIgnoreCase("app") &&
|
||||
!option.equalsIgnoreCase("root")) {
|
||||
prefix = option;
|
||||
option = "all";
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
option = t.nextToken();
|
||||
prefix = t.nextToken();
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
if (!option.equalsIgnoreCase("all") && !option.equalsIgnoreCase("app") &&
|
||||
!option.equalsIgnoreCase("boot")) {
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
ClassDump cd = new ClassDump();
|
||||
if (option.equalsIgnoreCase("all") || option.equalsIgnoreCase("boot")) {
|
||||
cd.setClassFilter(new BootFilter());
|
||||
cd.setJarOutput(prefix + "boot.jar");
|
||||
cd.run();
|
||||
}
|
||||
if (option.equalsIgnoreCase("all") || option.equalsIgnoreCase("app")) {
|
||||
cd.setClassFilter(new NonBootFilter());
|
||||
cd.setJarOutput(prefix + "app.jar");
|
||||
cd.run();
|
||||
}
|
||||
} catch (IOException ioe) {
|
||||
ioe.printStackTrace();
|
||||
}
|
||||
}
|
||||
},
|
||||
new Command("findpc", "findpc address", false) {
|
||||
public void doit(Tokens t) {
|
||||
if (t.countTokens() != 1) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,799 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.bugspot;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.net.*;
|
||||
import java.rmi.*;
|
||||
import sun.jvm.hotspot.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.debugger.bsd.*;
|
||||
import sun.jvm.hotspot.debugger.proc.*;
|
||||
import sun.jvm.hotspot.debugger.cdbg.*;
|
||||
import sun.jvm.hotspot.debugger.windbg.*;
|
||||
import sun.jvm.hotspot.debugger.linux.*;
|
||||
import sun.jvm.hotspot.debugger.sparc.*;
|
||||
import sun.jvm.hotspot.debugger.remote.*;
|
||||
import sun.jvm.hotspot.livejvm.*;
|
||||
import sun.jvm.hotspot.memory.*;
|
||||
import sun.jvm.hotspot.oops.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
|
||||
/** <P> This class wraps the basic functionality for connecting to the
|
||||
* target process or debug server. It makes it simple to start up the
|
||||
* debugging system. </P>
|
||||
*
|
||||
* <P> This agent (as compared to the HotSpotAgent) can connect to
|
||||
* and interact with arbitrary processes. If the target process
|
||||
* happens to be a HotSpot JVM, the Java debugging features of the
|
||||
* Serviceability Agent are enabled. Further, if the Serviceability
|
||||
* Agent's JVMDI module is loaded into the target VM, interaction
|
||||
* with the live Java program is possible, specifically the catching
|
||||
* of exceptions and setting of breakpoints. </P>
|
||||
*
|
||||
* <P> The BugSpot debugger requires that the underlying Debugger
|
||||
* support C/C++ debugging via the CDebugger interface. </P>
|
||||
*
|
||||
* <P> FIXME: especially with the addition of remote debugging, this
|
||||
* has turned into a mess; needs rethinking. </P> */
|
||||
|
||||
public class BugSpotAgent {
|
||||
|
||||
private JVMDebugger debugger;
|
||||
private MachineDescription machDesc;
|
||||
private TypeDataBase db;
|
||||
|
||||
private String os;
|
||||
private String cpu;
|
||||
private String fileSep;
|
||||
|
||||
// The system can work in several ways:
|
||||
// - Attaching to local process
|
||||
// - Attaching to local core file
|
||||
// - Connecting to remote debug server
|
||||
// - Starting debug server for process
|
||||
// - Starting debug server for core file
|
||||
|
||||
// These are options for the "client" side of things
|
||||
private static final int PROCESS_MODE = 0;
|
||||
private static final int CORE_FILE_MODE = 1;
|
||||
private static final int REMOTE_MODE = 2;
|
||||
private int startupMode;
|
||||
|
||||
// This indicates whether we are really starting a server or not
|
||||
private boolean isServer;
|
||||
|
||||
// All possible required information for connecting
|
||||
private int pid;
|
||||
private String executableName;
|
||||
private String coreFileName;
|
||||
private String debugServerID;
|
||||
|
||||
// All needed information for server side
|
||||
private String serverID;
|
||||
|
||||
// Indicates whether we are attached to a HotSpot JVM or not
|
||||
private boolean javaMode;
|
||||
|
||||
// Indicates whether we have process control over a live HotSpot JVM
|
||||
// or not; non-null if so.
|
||||
private ServiceabilityAgentJVMDIModule jvmdi;
|
||||
// While handling C breakpoints interactivity with the Java program
|
||||
// is forbidden. Too many invariants are broken while the target is
|
||||
// stopped at a C breakpoint to risk making JVMDI calls.
|
||||
private boolean javaInteractionDisabled;
|
||||
|
||||
private String[] jvmLibNames;
|
||||
private String[] saLibNames;
|
||||
|
||||
// FIXME: make these configurable, i.e., via a dotfile; also
|
||||
// consider searching within the JDK from which this Java executable
|
||||
// comes to find them
|
||||
private static final String defaultDbxPathPrefix = "/net/jano.eng/export/disk05/hotspot/sa";
|
||||
private static final String defaultDbxSvcAgentDSOPathPrefix = "/net/jano.eng/export/disk05/hotspot/sa";
|
||||
|
||||
private static final boolean DEBUG;
|
||||
static {
|
||||
DEBUG = System.getProperty("sun.jvm.hotspot.bugspot.BugSpotAgent.DEBUG")
|
||||
!= null;
|
||||
}
|
||||
|
||||
static void debugPrintln(String str) {
|
||||
if (DEBUG) {
|
||||
System.err.println(str);
|
||||
}
|
||||
}
|
||||
|
||||
static void showUsage() {
|
||||
System.out.println(" You can also pass these -D options to java to specify where to find dbx and the \n" +
|
||||
" Serviceability Agent plugin for dbx:");
|
||||
System.out.println(" -DdbxPathName=<path-to-dbx-executable>\n" +
|
||||
" Default is derived from dbxPathPrefix");
|
||||
System.out.println(" or");
|
||||
System.out.println(" -DdbxPathPrefix=<xxx>\n" +
|
||||
" where xxx is the path name of a dir structure that contains:\n" +
|
||||
" <os>/<arch>/bin/dbx\n" +
|
||||
" The default is " + defaultDbxPathPrefix);
|
||||
System.out.println(" and");
|
||||
System.out.println(" -DdbxSvcAgentDSOPathName=<path-to-dbx-serviceability-agent-module>\n" +
|
||||
" Default is determined from dbxSvcAgentDSOPathPrefix");
|
||||
System.out.println(" or");
|
||||
System.out.println(" -DdbxSvcAgentDSOPathPrefix=<xxx>\n" +
|
||||
" where xxx is the pathname of a dir structure that contains:\n" +
|
||||
" <os>/<arch>/bin/lib/libsvc_agent_dbx.so\n" +
|
||||
" The default is " + defaultDbxSvcAgentDSOPathPrefix);
|
||||
}
|
||||
|
||||
public BugSpotAgent() {
|
||||
// for non-server add shutdown hook to clean-up debugger in case
|
||||
// of forced exit. For remote server, shutdown hook is added by
|
||||
// DebugServer.
|
||||
Runtime.getRuntime().addShutdownHook(new java.lang.Thread(
|
||||
new Runnable() {
|
||||
public void run() {
|
||||
synchronized (BugSpotAgent.this) {
|
||||
if (!isServer) {
|
||||
detach();
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Accessors (once the system is set up)
|
||||
//
|
||||
|
||||
public synchronized Debugger getDebugger() {
|
||||
return debugger;
|
||||
}
|
||||
|
||||
public synchronized CDebugger getCDebugger() {
|
||||
return getDebugger().getCDebugger();
|
||||
}
|
||||
|
||||
public synchronized ProcessControl getProcessControl() {
|
||||
return getCDebugger().getProcessControl();
|
||||
}
|
||||
|
||||
public synchronized TypeDataBase getTypeDataBase() {
|
||||
return db;
|
||||
}
|
||||
|
||||
/** Indicates whether the target process is suspended
|
||||
completely. Equivalent to getProcessControl().isSuspended(). */
|
||||
public synchronized boolean isSuspended() throws DebuggerException {
|
||||
return getProcessControl().isSuspended();
|
||||
}
|
||||
|
||||
/** Suspends the target process completely. Equivalent to
|
||||
getProcessControl().suspend(). */
|
||||
public synchronized void suspend() throws DebuggerException {
|
||||
getProcessControl().suspend();
|
||||
}
|
||||
|
||||
/** Resumes the target process completely. Equivalent to
|
||||
getProcessControl().suspend(). */
|
||||
public synchronized void resume() throws DebuggerException {
|
||||
getProcessControl().resume();
|
||||
}
|
||||
|
||||
/** Indicates whether we are attached to a Java HotSpot virtual
|
||||
machine */
|
||||
public synchronized boolean isJavaMode() {
|
||||
return javaMode;
|
||||
}
|
||||
|
||||
/** Temporarily disables interaction with the target process via
|
||||
JVMDI. This is done while the target process is stopped at a C
|
||||
breakpoint. Can be called even if the JVMDI agent has not been
|
||||
initialized. */
|
||||
public synchronized void disableJavaInteraction() {
|
||||
javaInteractionDisabled = true;
|
||||
}
|
||||
|
||||
/** Re-enables interaction with the target process via JVMDI. This
|
||||
is done while the target process is continued past a C
|
||||
braekpoint. Can be called even if the JVMDI agent has not been
|
||||
initialized. */
|
||||
public synchronized void enableJavaInteraction() {
|
||||
javaInteractionDisabled = false;
|
||||
}
|
||||
|
||||
/** Indicates whether Java interaction has been disabled */
|
||||
public synchronized boolean isJavaInteractionDisabled() {
|
||||
return javaInteractionDisabled;
|
||||
}
|
||||
|
||||
/** Indicates whether we can talk to the Serviceability Agent's
|
||||
JVMDI module to be able to set breakpoints */
|
||||
public synchronized boolean canInteractWithJava() {
|
||||
return (jvmdi != null) && !javaInteractionDisabled;
|
||||
}
|
||||
|
||||
/** Suspends all Java threads in the target process. Can only be
|
||||
called if we are attached to a HotSpot JVM and can connect to
|
||||
the SA's JVMDI module. Must not be called when the target
|
||||
process has been suspended with suspend(). */
|
||||
public synchronized void suspendJava() throws DebuggerException {
|
||||
if (!canInteractWithJava()) {
|
||||
throw new DebuggerException("Could not connect to SA's JVMDI module");
|
||||
}
|
||||
if (jvmdi.isSuspended()) {
|
||||
throw new DebuggerException("Target process already suspended via JVMDI");
|
||||
}
|
||||
jvmdi.suspend();
|
||||
}
|
||||
|
||||
/** Resumes all Java threads in the target process. Can only be
|
||||
called if we are attached to a HotSpot JVM and can connect to
|
||||
the SA's JVMDI module. Must not be called when the target
|
||||
process has been suspended with suspend(). */
|
||||
public synchronized void resumeJava() throws DebuggerException {
|
||||
if (!canInteractWithJava()) {
|
||||
throw new DebuggerException("Could not connect to SA's JVMDI module");
|
||||
}
|
||||
if (!jvmdi.isSuspended()) {
|
||||
throw new DebuggerException("Target process already resumed via JVMDI");
|
||||
}
|
||||
jvmdi.resume();
|
||||
}
|
||||
|
||||
/** Indicates whether the target process has been suspended at the
|
||||
Java language level via the SA's JVMDI module */
|
||||
public synchronized boolean isJavaSuspended() throws DebuggerException {
|
||||
return jvmdi.isSuspended();
|
||||
}
|
||||
|
||||
/** Toggle a Java breakpoint at the given location. */
|
||||
public synchronized ServiceabilityAgentJVMDIModule.BreakpointToggleResult
|
||||
toggleJavaBreakpoint(String srcFileName,
|
||||
String pkgName,
|
||||
int lineNo) {
|
||||
if (!canInteractWithJava()) {
|
||||
throw new DebuggerException("Could not connect to SA's JVMDI module; can not toggle Java breakpoints");
|
||||
}
|
||||
return jvmdi.toggleBreakpoint(srcFileName, pkgName, lineNo);
|
||||
}
|
||||
|
||||
/** Access to JVMDI module's eventPending */
|
||||
public synchronized boolean javaEventPending() throws DebuggerException {
|
||||
if (!canInteractWithJava()) {
|
||||
throw new DebuggerException("Could not connect to SA's JVMDI module; can not poll for Java debug events");
|
||||
}
|
||||
return jvmdi.eventPending();
|
||||
}
|
||||
|
||||
/** Access to JVMDI module's eventPoll */
|
||||
public synchronized Event javaEventPoll() throws DebuggerException {
|
||||
if (!canInteractWithJava()) {
|
||||
throw new DebuggerException("Could not connect to SA's JVMDI module; can not poll for Java debug events");
|
||||
}
|
||||
return jvmdi.eventPoll();
|
||||
}
|
||||
|
||||
/** Access to JVMDI module's eventContinue */
|
||||
public synchronized void javaEventContinue() throws DebuggerException {
|
||||
if (!canInteractWithJava()) {
|
||||
throw new DebuggerException("Could not connect to SA's JVMDI module; can not continue past Java debug events");
|
||||
}
|
||||
jvmdi.eventContinue();
|
||||
}
|
||||
|
||||
|
||||
// FIXME: add other accessors. For example, suspension and
|
||||
// resumption should be done through this interface, as well as
|
||||
// interaction with the live Java process such as breakpoint setting.
|
||||
// Probably should not expose the ServiceabilityAgentJVMDIModule
|
||||
// from this interface.
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Client-side operations
|
||||
//
|
||||
|
||||
/** This attaches to a process running on the local machine. */
|
||||
public synchronized void attach(int processID)
|
||||
throws DebuggerException {
|
||||
if (debugger != null) {
|
||||
throw new DebuggerException("Already attached");
|
||||
}
|
||||
pid = processID;
|
||||
startupMode = PROCESS_MODE;
|
||||
isServer = false;
|
||||
go();
|
||||
}
|
||||
|
||||
/** This opens a core file on the local machine */
|
||||
public synchronized void attach(String executableName, String coreFileName)
|
||||
throws DebuggerException {
|
||||
if (debugger != null) {
|
||||
throw new DebuggerException("Already attached");
|
||||
}
|
||||
if ((executableName == null) || (coreFileName == null)) {
|
||||
throw new DebuggerException("Both the core file name and executable name must be specified");
|
||||
}
|
||||
this.executableName = executableName;
|
||||
this.coreFileName = coreFileName;
|
||||
startupMode = CORE_FILE_MODE;
|
||||
isServer = false;
|
||||
go();
|
||||
}
|
||||
|
||||
/** This attaches to a "debug server" on a remote machine; this
|
||||
remote server has already attached to a process or opened a
|
||||
core file and is waiting for RMI calls on the Debugger object to
|
||||
come in. */
|
||||
public synchronized void attach(String remoteServerID)
|
||||
throws DebuggerException {
|
||||
if (debugger != null) {
|
||||
throw new DebuggerException("Already attached to a process");
|
||||
}
|
||||
if (remoteServerID == null) {
|
||||
throw new DebuggerException("Debug server id must be specified");
|
||||
}
|
||||
|
||||
debugServerID = remoteServerID;
|
||||
startupMode = REMOTE_MODE;
|
||||
isServer = false;
|
||||
go();
|
||||
}
|
||||
|
||||
/** This should only be called by the user on the client machine,
|
||||
not the server machine */
|
||||
public synchronized boolean detach() throws DebuggerException {
|
||||
if (isServer) {
|
||||
throw new DebuggerException("Should not call detach() for server configuration");
|
||||
}
|
||||
return detachInternal();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Server-side operations
|
||||
//
|
||||
|
||||
/** This attaches to a process running on the local machine and
|
||||
starts a debug server, allowing remote machines to connect and
|
||||
examine this process. uniqueID is used to uniquely identify the
|
||||
debuggee */
|
||||
public synchronized void startServer(int processID, String uniqueID)
|
||||
throws DebuggerException {
|
||||
if (debugger != null) {
|
||||
throw new DebuggerException("Already attached");
|
||||
}
|
||||
pid = processID;
|
||||
startupMode = PROCESS_MODE;
|
||||
isServer = true;
|
||||
serverID = uniqueID;
|
||||
go();
|
||||
}
|
||||
|
||||
/** This attaches to a process running on the local machine and
|
||||
starts a debug server, allowing remote machines to connect and
|
||||
examine this process. */
|
||||
public synchronized void startServer(int processID)
|
||||
throws DebuggerException {
|
||||
startServer(processID, null);
|
||||
}
|
||||
|
||||
/** This opens a core file on the local machine and starts a debug
|
||||
server, allowing remote machines to connect and examine this
|
||||
core file. uniqueID is used to uniquely identify the
|
||||
debuggee */
|
||||
public synchronized void startServer(String executableName, String coreFileName,
|
||||
String uniqueID)
|
||||
throws DebuggerException {
|
||||
if (debugger != null) {
|
||||
throw new DebuggerException("Already attached");
|
||||
}
|
||||
if ((executableName == null) || (coreFileName == null)) {
|
||||
throw new DebuggerException("Both the core file name and Java executable name must be specified");
|
||||
}
|
||||
this.executableName = executableName;
|
||||
this.coreFileName = coreFileName;
|
||||
startupMode = CORE_FILE_MODE;
|
||||
isServer = true;
|
||||
serverID = uniqueID;
|
||||
go();
|
||||
}
|
||||
|
||||
/** This opens a core file on the local machine and starts a debug
|
||||
server, allowing remote machines to connect and examine this
|
||||
core file.*/
|
||||
public synchronized void startServer(String executableName, String coreFileName)
|
||||
throws DebuggerException {
|
||||
startServer(executableName, coreFileName, null);
|
||||
}
|
||||
|
||||
/** This may only be called on the server side after startServer()
|
||||
has been called */
|
||||
public synchronized boolean shutdownServer() throws DebuggerException {
|
||||
if (!isServer) {
|
||||
throw new DebuggerException("Should not call shutdownServer() for client configuration");
|
||||
}
|
||||
return detachInternal();
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Internals only below this point
|
||||
//
|
||||
|
||||
private boolean detachInternal() {
|
||||
if (debugger == null) {
|
||||
return false;
|
||||
}
|
||||
if (canInteractWithJava()) {
|
||||
jvmdi.detach();
|
||||
jvmdi = null;
|
||||
}
|
||||
boolean retval = true;
|
||||
if (!isServer) {
|
||||
VM.shutdown();
|
||||
}
|
||||
// We must not call detach() if we are a client and are connected
|
||||
// to a remote debugger
|
||||
Debugger dbg = null;
|
||||
DebuggerException ex = null;
|
||||
if (isServer) {
|
||||
try {
|
||||
RMIHelper.unbind(serverID);
|
||||
}
|
||||
catch (DebuggerException de) {
|
||||
ex = de;
|
||||
}
|
||||
dbg = debugger;
|
||||
} else {
|
||||
if (startupMode != REMOTE_MODE) {
|
||||
dbg = debugger;
|
||||
}
|
||||
}
|
||||
if (dbg != null) {
|
||||
retval = dbg.detach();
|
||||
}
|
||||
|
||||
debugger = null;
|
||||
machDesc = null;
|
||||
db = null;
|
||||
if (ex != null) {
|
||||
throw(ex);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
private void go() {
|
||||
setupDebugger();
|
||||
javaMode = setupVM();
|
||||
}
|
||||
|
||||
private void setupDebugger() {
|
||||
if (startupMode != REMOTE_MODE) {
|
||||
//
|
||||
// Local mode (client attaching to local process or setting up
|
||||
// server, but not client attaching to server)
|
||||
//
|
||||
|
||||
try {
|
||||
os = PlatformInfo.getOS();
|
||||
cpu = PlatformInfo.getCPU();
|
||||
}
|
||||
catch (UnsupportedPlatformException e) {
|
||||
throw new DebuggerException(e);
|
||||
}
|
||||
fileSep = System.getProperty("file.separator");
|
||||
|
||||
if (os.equals("solaris")) {
|
||||
setupDebuggerSolaris();
|
||||
} else if (os.equals("win32")) {
|
||||
setupDebuggerWin32();
|
||||
} else if (os.equals("linux")) {
|
||||
setupDebuggerLinux();
|
||||
} else if (os.equals("bsd")) {
|
||||
setupDebuggerBsd();
|
||||
} else {
|
||||
// Add support for more operating systems here
|
||||
throw new DebuggerException("Operating system " + os + " not yet supported");
|
||||
}
|
||||
if (isServer) {
|
||||
RemoteDebuggerServer remote = null;
|
||||
try {
|
||||
remote = new RemoteDebuggerServer(debugger);
|
||||
}
|
||||
catch (RemoteException rem) {
|
||||
throw new DebuggerException(rem);
|
||||
}
|
||||
RMIHelper.rebind(serverID, remote);
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Remote mode (client attaching to server)
|
||||
//
|
||||
|
||||
// Create and install a security manager
|
||||
|
||||
// FIXME: currently commented out because we were having
|
||||
// security problems since we're "in the sun.* hierarchy" here.
|
||||
// Perhaps a permissive policy file would work around this. In
|
||||
// the long run, will probably have to move into com.sun.*.
|
||||
|
||||
// if (System.getSecurityManager() == null) {
|
||||
// System.setSecurityManager(new RMISecurityManager());
|
||||
// }
|
||||
|
||||
connectRemoteDebugger();
|
||||
}
|
||||
}
|
||||
|
||||
private boolean setupVM() {
|
||||
// We need to instantiate a HotSpotTypeDataBase on both the client
|
||||
// and server machine. On the server it is only currently used to
|
||||
// configure the Java primitive type sizes (which we should
|
||||
// consider making constant). On the client it is used to
|
||||
// configure the VM.
|
||||
|
||||
try {
|
||||
if (os.equals("solaris")) {
|
||||
db = new HotSpotTypeDataBase(machDesc, new HotSpotSolarisVtblAccess(debugger, jvmLibNames),
|
||||
debugger, jvmLibNames);
|
||||
} else if (os.equals("win32")) {
|
||||
db = new HotSpotTypeDataBase(machDesc, new Win32VtblAccess(debugger, jvmLibNames),
|
||||
debugger, jvmLibNames);
|
||||
} else if (os.equals("linux")) {
|
||||
db = new HotSpotTypeDataBase(machDesc, new LinuxVtblAccess(debugger, jvmLibNames),
|
||||
debugger, jvmLibNames);
|
||||
} else if (os.equals("bsd")) {
|
||||
db = new HotSpotTypeDataBase(machDesc, new BsdVtblAccess(debugger, jvmLibNames),
|
||||
debugger, jvmLibNames);
|
||||
} else {
|
||||
throw new DebuggerException("OS \"" + os + "\" not yet supported (no VtblAccess implemented yet)");
|
||||
}
|
||||
}
|
||||
catch (NoSuchSymbolException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (startupMode != REMOTE_MODE) {
|
||||
// Configure the debugger with the primitive type sizes just obtained from the VM
|
||||
debugger.configureJavaPrimitiveTypeSizes(db.getJBooleanType().getSize(),
|
||||
db.getJByteType().getSize(),
|
||||
db.getJCharType().getSize(),
|
||||
db.getJDoubleType().getSize(),
|
||||
db.getJFloatType().getSize(),
|
||||
db.getJIntType().getSize(),
|
||||
db.getJLongType().getSize(),
|
||||
db.getJShortType().getSize());
|
||||
}
|
||||
|
||||
if (!isServer) {
|
||||
// Do not initialize the VM on the server (unnecessary, since it's
|
||||
// instantiated on the client)
|
||||
VM.initialize(db, debugger);
|
||||
}
|
||||
|
||||
try {
|
||||
jvmdi = new ServiceabilityAgentJVMDIModule(debugger, saLibNames);
|
||||
if (jvmdi.canAttach()) {
|
||||
jvmdi.attach();
|
||||
jvmdi.setCommandTimeout(6000);
|
||||
debugPrintln("Attached to Serviceability Agent's JVMDI module.");
|
||||
// Jog VM to suspended point with JVMDI module
|
||||
resume();
|
||||
suspendJava();
|
||||
suspend();
|
||||
debugPrintln("Suspended all Java threads.");
|
||||
} else {
|
||||
debugPrintln("Could not locate SA's JVMDI module; skipping attachment");
|
||||
jvmdi = null;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
jvmdi = null;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// OS-specific debugger setup/connect routines
|
||||
//
|
||||
|
||||
//
|
||||
// Solaris
|
||||
//
|
||||
|
||||
private void setupDebuggerSolaris() {
|
||||
setupJVMLibNamesSolaris();
|
||||
ProcDebuggerLocal dbg = new ProcDebuggerLocal(null, true);
|
||||
debugger = dbg;
|
||||
attachDebugger();
|
||||
|
||||
// Set up CPU-dependent stuff
|
||||
if (cpu.equals("x86")) {
|
||||
machDesc = new MachineDescriptionIntelX86();
|
||||
} else if (cpu.equals("sparc")) {
|
||||
int addressSize = dbg.getRemoteProcessAddressSize();
|
||||
if (addressSize == -1) {
|
||||
throw new DebuggerException("Error occurred while trying to determine the remote process's address size");
|
||||
}
|
||||
|
||||
if (addressSize == 32) {
|
||||
machDesc = new MachineDescriptionSPARC32Bit();
|
||||
} else if (addressSize == 64) {
|
||||
machDesc = new MachineDescriptionSPARC64Bit();
|
||||
} else {
|
||||
throw new DebuggerException("Address size " + addressSize + " is not supported on SPARC");
|
||||
}
|
||||
} else if (cpu.equals("amd64")) {
|
||||
machDesc = new MachineDescriptionAMD64();
|
||||
} else {
|
||||
throw new DebuggerException("Solaris only supported on sparc/sparcv9/x86/amd64");
|
||||
}
|
||||
|
||||
dbg.setMachineDescription(machDesc);
|
||||
}
|
||||
|
||||
private void connectRemoteDebugger() throws DebuggerException {
|
||||
RemoteDebugger remote =
|
||||
(RemoteDebugger) RMIHelper.lookup(debugServerID);
|
||||
debugger = new RemoteDebuggerClient(remote);
|
||||
machDesc = ((RemoteDebuggerClient) debugger).getMachineDescription();
|
||||
os = debugger.getOS();
|
||||
if (os.equals("solaris")) {
|
||||
setupJVMLibNamesSolaris();
|
||||
} else if (os.equals("win32")) {
|
||||
setupJVMLibNamesWin32();
|
||||
} else if (os.equals("linux")) {
|
||||
setupJVMLibNamesLinux();
|
||||
} else if (os.equals("bsd")) {
|
||||
setupJVMLibNamesBsd();
|
||||
} else {
|
||||
throw new RuntimeException("Unknown OS type");
|
||||
}
|
||||
|
||||
cpu = debugger.getCPU();
|
||||
}
|
||||
|
||||
private void setupJVMLibNamesSolaris() {
|
||||
jvmLibNames = new String[] { "libjvm.so", "libjvm_g.so", "gamma_g" };
|
||||
saLibNames = new String[] { "libsa.so", "libsa_g.so" };
|
||||
}
|
||||
|
||||
//
|
||||
// Win32
|
||||
//
|
||||
|
||||
private void setupDebuggerWin32() {
|
||||
setupJVMLibNamesWin32();
|
||||
|
||||
if (cpu.equals("x86")) {
|
||||
machDesc = new MachineDescriptionIntelX86();
|
||||
} else if (cpu.equals("amd64")) {
|
||||
machDesc = new MachineDescriptionAMD64();
|
||||
} else if (cpu.equals("ia64")) {
|
||||
machDesc = new MachineDescriptionIA64();
|
||||
} else {
|
||||
throw new DebuggerException("Win32 supported under x86, amd64 and ia64 only");
|
||||
}
|
||||
|
||||
// Note we do not use a cache for the local debugger in server
|
||||
// mode; it will be taken care of on the client side (once remote
|
||||
// debugging is implemented).
|
||||
|
||||
debugger = new WindbgDebuggerLocal(machDesc, !isServer);
|
||||
|
||||
attachDebugger();
|
||||
}
|
||||
|
||||
private void setupJVMLibNamesWin32() {
|
||||
jvmLibNames = new String[] { "jvm.dll", "jvm_g.dll" };
|
||||
saLibNames = new String[] { "sa.dll", "sa_g.dll" };
|
||||
}
|
||||
|
||||
//
|
||||
// Linux
|
||||
//
|
||||
|
||||
private void setupDebuggerLinux() {
|
||||
setupJVMLibNamesLinux();
|
||||
|
||||
if (cpu.equals("x86")) {
|
||||
machDesc = new MachineDescriptionIntelX86();
|
||||
} else if (cpu.equals("ia64")) {
|
||||
machDesc = new MachineDescriptionIA64();
|
||||
} else if (cpu.equals("amd64")) {
|
||||
machDesc = new MachineDescriptionAMD64();
|
||||
} else if (cpu.equals("sparc")) {
|
||||
if (LinuxDebuggerLocal.getAddressSize()==8) {
|
||||
machDesc = new MachineDescriptionSPARC64Bit();
|
||||
} else {
|
||||
machDesc = new MachineDescriptionSPARC32Bit();
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
machDesc = (MachineDescription)
|
||||
Class.forName("sun.jvm.hotspot.debugger.MachineDescription" +
|
||||
cpu.toUpperCase()).newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new DebuggerException("unsupported machine type");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Note we do not use a cache for the local debugger in server
|
||||
// mode; it will be taken care of on the client side (once remote
|
||||
// debugging is implemented).
|
||||
|
||||
debugger = new LinuxDebuggerLocal(machDesc, !isServer);
|
||||
attachDebugger();
|
||||
}
|
||||
|
||||
private void setupJVMLibNamesLinux() {
|
||||
// same as solaris
|
||||
setupJVMLibNamesSolaris();
|
||||
}
|
||||
|
||||
//
|
||||
// BSD
|
||||
//
|
||||
|
||||
private void setupDebuggerBsd() {
|
||||
setupJVMLibNamesBsd();
|
||||
|
||||
if (cpu.equals("x86")) {
|
||||
machDesc = new MachineDescriptionIntelX86();
|
||||
} else if (cpu.equals("amd64") || (cpu.equals("x86_64"))) {
|
||||
machDesc = new MachineDescriptionAMD64();
|
||||
} else {
|
||||
throw new DebuggerException("Bsd only supported on x86/x86_64. Current arch: " + cpu);
|
||||
}
|
||||
|
||||
// Note we do not use a cache for the local debugger in server
|
||||
// mode; it will be taken care of on the client side (once remote
|
||||
// debugging is implemented).
|
||||
|
||||
debugger = new BsdDebuggerLocal(machDesc, !isServer);
|
||||
attachDebugger();
|
||||
}
|
||||
|
||||
private void setupJVMLibNamesBsd() {
|
||||
// same as solaris
|
||||
setupJVMLibNamesSolaris();
|
||||
}
|
||||
|
||||
/** Convenience routine which should be called by per-platform
|
||||
debugger setup. Should not be called when startupMode is
|
||||
REMOTE_MODE. */
|
||||
private void attachDebugger() {
|
||||
if (startupMode == PROCESS_MODE) {
|
||||
debugger.attach(pid);
|
||||
} else if (startupMode == CORE_FILE_MODE) {
|
||||
debugger.attach(executableName, coreFileName);
|
||||
} else {
|
||||
throw new DebuggerException("Should not call attach() for startupMode == " + startupMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.bugspot;
|
||||
|
||||
import sun.jvm.hotspot.oops.*;
|
||||
|
||||
/** Wrapper class which describes line number information for Java
|
||||
class files. The line number table is converted into this
|
||||
representation on demand. These objects are then sorted by line
|
||||
number for fast lookup when setting breakpoints in a particular
|
||||
source file. */
|
||||
|
||||
public class JavaLineNumberInfo {
|
||||
private InstanceKlass klass;
|
||||
private Method method;
|
||||
private int startBCI;
|
||||
private int lineNumber;
|
||||
|
||||
public JavaLineNumberInfo(InstanceKlass klass,
|
||||
Method method,
|
||||
int startBCI,
|
||||
int lineNumber) {
|
||||
this.klass = klass;
|
||||
this.method = method;
|
||||
this.startBCI = startBCI;
|
||||
this.lineNumber = lineNumber;
|
||||
}
|
||||
|
||||
public InstanceKlass getKlass() { return klass; }
|
||||
public Method getMethod() { return method; }
|
||||
public int getStartBCI() { return startBCI; }
|
||||
public int getLineNumber() { return lineNumber; }
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.bugspot;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import javax.swing.*;
|
||||
|
||||
import sun.jvm.hotspot.ui.*;
|
||||
|
||||
/** The main class for the BugSpot debugger. */
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
JFrame frame = new JFrame("BugSpot");
|
||||
frame.setSize(800, 600);
|
||||
BugSpot db = new BugSpot();
|
||||
db.setMDIMode(true);
|
||||
db.build();
|
||||
frame.setJMenuBar(db.getMenuBar());
|
||||
frame.getContentPane().add(db);
|
||||
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
||||
|
||||
GraphicsUtilities.reshapeToAspectRatio(frame,
|
||||
4.0f/3.0f, 0.85f, Toolkit.getDefaultToolkit().getScreenSize());
|
||||
GraphicsUtilities.centerInContainer(frame,
|
||||
Toolkit.getDefaultToolkit().getScreenSize());
|
||||
frame.setVisible(true);
|
||||
}
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.bugspot;
|
||||
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.debugger.cdbg.*;
|
||||
|
||||
/** Helper class for locating a program counter. Indicates the
|
||||
confidence of the find. */
|
||||
|
||||
public class PCFinder {
|
||||
public static final int LOW_CONFIDENCE = 1;
|
||||
public static final int HIGH_CONFIDENCE = 2;
|
||||
|
||||
public static class Info {
|
||||
private String name;
|
||||
private long offset;
|
||||
private int confidence;
|
||||
|
||||
public Info(String name, long offset, int confidence) {
|
||||
this.name = name;
|
||||
this.offset = offset;
|
||||
this.confidence = confidence;
|
||||
}
|
||||
|
||||
/** May be null */
|
||||
public String getName() { return name; }
|
||||
|
||||
/** If this is -1, a symbol could not be found, and the offset
|
||||
should not be shown */
|
||||
public long getOffset() { return offset; }
|
||||
|
||||
/** PCFinder.LOW_CONFIDENCE or PCFinder.HIGH_CONFIDENCE */
|
||||
public int getConfidence() { return confidence; }
|
||||
}
|
||||
|
||||
/** Passed loadobject may be null in which case the returned Info
|
||||
object has low confidence */
|
||||
public static Info findPC(Address pc, LoadObject lo, CDebugger dbg) {
|
||||
if (lo == null) {
|
||||
return new Info(null, -1, LOW_CONFIDENCE);
|
||||
}
|
||||
|
||||
// First try debug info
|
||||
BlockSym sym = lo.debugInfoForPC(pc);
|
||||
while (sym != null) {
|
||||
if (sym.isFunction()) {
|
||||
// Highest confidence
|
||||
return new Info(sym.toString(), pc.minus(sym.getAddress()), HIGH_CONFIDENCE);
|
||||
}
|
||||
}
|
||||
|
||||
// Now try looking up symbol in loadobject
|
||||
|
||||
// FIXME: must add support for mapfiles on Win32 and try looking
|
||||
// up there first if possible. Should we hide that behind
|
||||
// LoadObject.closestSymbolToPC and have the ClosestSymbol return
|
||||
// confidence? I think so. On Solaris there is no notion of a
|
||||
// mapfile, and the confidence for closestSymbolToPC will be high
|
||||
// instead of low.
|
||||
|
||||
int confidence = HIGH_CONFIDENCE;
|
||||
|
||||
ClosestSymbol cs = lo.closestSymbolToPC(pc);
|
||||
if (cs != null) {
|
||||
// FIXME: currently low confidence (only on Win32)
|
||||
return new Info(cs.getName() + "()", cs.getOffset(), LOW_CONFIDENCE);
|
||||
}
|
||||
|
||||
// Unknown location
|
||||
return new Info(dbg.getNameOfFile(lo.getName()).toUpperCase() +
|
||||
"! " + pc + "()", -1, HIGH_CONFIDENCE);
|
||||
}
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.bugspot;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
/** Scans a .java file for the package that it is in. */
|
||||
|
||||
public class PackageScanner {
|
||||
|
||||
public PackageScanner() {
|
||||
}
|
||||
|
||||
public String scan(String filename) {
|
||||
return scan(new File(filename));
|
||||
}
|
||||
|
||||
/** Returns the String comprising the package name of the classes in
|
||||
this .java file. Returns the (non-null) empty string if any
|
||||
error occurs or if the classes are in the unnamed package. */
|
||||
public String scan(File file) {
|
||||
BufferedReader buf = null;
|
||||
String res = "";
|
||||
try {
|
||||
buf = new BufferedReader(new FileReader(file));
|
||||
StreamTokenizer tok = new StreamTokenizer(buf);
|
||||
tok.slashStarComments(true);
|
||||
tok.slashSlashComments(true);
|
||||
if (tok.nextToken() != StreamTokenizer.TT_WORD) {
|
||||
return res;
|
||||
}
|
||||
if (!tok.sval.equals("package")) {
|
||||
return res;
|
||||
}
|
||||
if (tok.nextToken() != StreamTokenizer.TT_WORD) {
|
||||
return res;
|
||||
}
|
||||
res = tok.sval;
|
||||
return res;
|
||||
} catch (FileNotFoundException e) {
|
||||
return res;
|
||||
} catch (IOException e) {
|
||||
return res;
|
||||
} finally {
|
||||
try {
|
||||
if (buf != null) {
|
||||
buf.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
if (args.length != 1) {
|
||||
usage();
|
||||
}
|
||||
|
||||
System.out.println(new PackageScanner().scan(args[0]));
|
||||
}
|
||||
|
||||
private static void usage() {
|
||||
System.err.println("Usage: java PackageScanner <.java file name>");
|
||||
System.err.println("Prints package the .java file is in to stdout.");
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
@@ -1,173 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.bugspot;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.*;
|
||||
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
|
||||
/** Displays registers in a window. FIXME: this will need more work to
|
||||
understand and handle register windows. */
|
||||
|
||||
public class RegisterPanel extends JPanel {
|
||||
private java.util.List/*<RegisterInfo>*/ registers;
|
||||
private AbstractTableModel dataModel;
|
||||
private boolean valid;
|
||||
private boolean editable;
|
||||
private String nullAddressString;
|
||||
private ThreadProxy curThread;
|
||||
private JTable table;
|
||||
|
||||
static class RegisterInfo {
|
||||
private String name;
|
||||
private Address value;
|
||||
|
||||
RegisterInfo(String name, Address value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
String getName() { return name; }
|
||||
Address getValue() { return value; }
|
||||
}
|
||||
|
||||
public RegisterPanel() {
|
||||
super();
|
||||
|
||||
registers = new ArrayList();
|
||||
|
||||
dataModel = new AbstractTableModel() {
|
||||
public int getColumnCount() { return 2; }
|
||||
public int getRowCount() { return registers.size(); }
|
||||
public String getColumnName(int col) {
|
||||
switch (col) {
|
||||
case 0:
|
||||
return "Register Name";
|
||||
case 1:
|
||||
return "Register Value";
|
||||
default:
|
||||
throw new RuntimeException("Index " + col + " out of bounds");
|
||||
}
|
||||
}
|
||||
public Object getValueAt(int row, int col) {
|
||||
RegisterInfo info = (RegisterInfo) registers.get(row);
|
||||
|
||||
switch (col) {
|
||||
case 0:
|
||||
return info.getName();
|
||||
case 1:
|
||||
if (valid) {
|
||||
Address val = info.getValue();
|
||||
if (val != null) {
|
||||
return val;
|
||||
} else {
|
||||
return nullAddressString;
|
||||
}
|
||||
} else {
|
||||
return "-";
|
||||
}
|
||||
default:
|
||||
throw new RuntimeException("Index (" + col + ", " + row + ") out of bounds");
|
||||
}
|
||||
}
|
||||
public boolean isCellEditable(int row, int col) {
|
||||
if (col == 0) return false;
|
||||
if (!valid) return false;
|
||||
if (curThread == null) return false;
|
||||
if (!curThread.canSetContext()) return false;
|
||||
|
||||
// FIXME: add listener to watch for register changes
|
||||
// return true;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// Build user interface
|
||||
setLayout(new BorderLayout());
|
||||
table = new JTable(dataModel);
|
||||
table.setCellSelectionEnabled(true);
|
||||
table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
|
||||
table.setDragEnabled(true);
|
||||
JTableHeader header = table.getTableHeader();
|
||||
header.setReorderingAllowed(false);
|
||||
JScrollPane scrollPane = new JScrollPane(table);
|
||||
add(scrollPane, BorderLayout.CENTER);
|
||||
}
|
||||
|
||||
|
||||
/** Updates the register panel with the register set from the
|
||||
specified thread. Call this when the process has been suspended
|
||||
and the current thread has been set. FIXME: this interface will
|
||||
need to change to support register windows. */
|
||||
public void update(ThreadProxy curThread) {
|
||||
this.curThread = curThread;
|
||||
ThreadContext context = curThread.getContext();
|
||||
editable = curThread.canSetContext();
|
||||
registers.clear();
|
||||
for (int i = 0; i < context.getNumRegisters(); i++) {
|
||||
String name = context.getRegisterName(i);
|
||||
Address addr = context.getRegisterAsAddress(i);
|
||||
if ((nullAddressString == null) && (addr != null)) {
|
||||
String addrStr = addr.toString();
|
||||
StringBuffer buf = new StringBuffer();
|
||||
buf.append("0x");
|
||||
int len = addrStr.length() - 2;
|
||||
for (int j = 0; j < len; j++) {
|
||||
buf.append("0");
|
||||
}
|
||||
nullAddressString = buf.toString();
|
||||
}
|
||||
registers.add(new RegisterInfo(name, addr));
|
||||
}
|
||||
valid = true;
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
dataModel.fireTableDataChanged();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** Clears the registers' values. Call this when the processs has
|
||||
been resumed. */
|
||||
public void clear() {
|
||||
valid = false;
|
||||
nullAddressString = null;
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
dataModel.fireTableDataChanged();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void setFont(Font font) {
|
||||
super.setFont(font);
|
||||
if (table != null) {
|
||||
table.setFont(font);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.bugspot;
|
||||
|
||||
import sun.jvm.hotspot.debugger.cdbg.*;
|
||||
import sun.jvm.hotspot.oops.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
|
||||
/** This class describes a frame in a stack trace. It abstracts over
|
||||
C/C++ and Java frames. */
|
||||
|
||||
public class StackTraceEntry {
|
||||
private CFrame cFrame;
|
||||
private CDebugger dbg;
|
||||
private JavaVFrame javaFrame;
|
||||
private String value; // What is displayed in a stack trace
|
||||
// For merging C and Java stack traces.
|
||||
// For more precise stack traces, should probably have a way to
|
||||
// convert a CFrame to a sun.jvm.hotspot.runtime.Frame. For now,
|
||||
// doing similar algorithm to jdbx (which does not have intimate
|
||||
// knowledge of the VM).
|
||||
private boolean isUnknownCFrame;
|
||||
|
||||
public StackTraceEntry(CFrame cFrame, CDebugger dbg) {
|
||||
this.cFrame = cFrame;
|
||||
this.dbg = dbg;
|
||||
computeValue();
|
||||
}
|
||||
|
||||
public StackTraceEntry(JavaVFrame javaFrame) {
|
||||
this.javaFrame = javaFrame;
|
||||
computeValue();
|
||||
}
|
||||
|
||||
public boolean isCFrame() { return (cFrame != null); }
|
||||
public boolean isJavaFrame() { return (javaFrame != null); }
|
||||
public CFrame getCFrame() { return cFrame; }
|
||||
public JavaVFrame getJavaFrame() { return javaFrame; }
|
||||
public boolean isUnknownCFrame() { return isUnknownCFrame; }
|
||||
public String toString() {
|
||||
return value;
|
||||
}
|
||||
|
||||
private void computeValue() {
|
||||
isUnknownCFrame = true;
|
||||
value = "<unknown>";
|
||||
if (cFrame != null) {
|
||||
PCFinder.Info info = PCFinder.findPC(cFrame.pc(), cFrame.loadObjectForPC(), dbg);
|
||||
if (info.getName() != null) {
|
||||
value = "(C) " + info.getName();
|
||||
isUnknownCFrame = false;
|
||||
if (info.getConfidence() == PCFinder.LOW_CONFIDENCE) {
|
||||
value = value + " (?)";
|
||||
}
|
||||
if (info.getOffset() >= 0) {
|
||||
value = value + " + 0x" + Long.toHexString(info.getOffset());
|
||||
}
|
||||
}
|
||||
} else if (javaFrame != null) {
|
||||
isUnknownCFrame = false;
|
||||
Method m = javaFrame.getMethod();
|
||||
value = "(J) " + m.externalNameAndSignature();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.bugspot;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.util.*;
|
||||
import javax.swing.*;
|
||||
import sun.jvm.hotspot.debugger.cdbg.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.ui.*;
|
||||
|
||||
/** This panel contains a ListBox with all of the stack frames in a
|
||||
given thread. When a given entry is selected, an event is
|
||||
fired. */
|
||||
|
||||
public class StackTracePanel extends JPanel {
|
||||
public interface Listener {
|
||||
public void frameChanged(CFrame fr, JavaVFrame jfr);
|
||||
}
|
||||
|
||||
class Model extends AbstractListModel implements ComboBoxModel {
|
||||
private Object selectedItem;
|
||||
public Object getElementAt(int index) {
|
||||
if (trace == null) return null;
|
||||
return trace.get(index);
|
||||
}
|
||||
public int getSize() {
|
||||
if (trace == null) return 0;
|
||||
return trace.size();
|
||||
}
|
||||
public Object getSelectedItem() {
|
||||
return selectedItem;
|
||||
}
|
||||
public void setSelectedItem(Object item) {
|
||||
selectedItem = item;
|
||||
}
|
||||
public void dataChanged() {
|
||||
fireContentsChanged(this, 0, trace.size());
|
||||
}
|
||||
}
|
||||
|
||||
private java.util.List trace;
|
||||
private Model model;
|
||||
private JComboBox list;
|
||||
private java.util.List listeners;
|
||||
|
||||
public StackTracePanel() {
|
||||
super();
|
||||
|
||||
model = new Model();
|
||||
|
||||
// Build user interface
|
||||
setLayout(new BorderLayout());
|
||||
setBorder(GraphicsUtilities.newBorder(5));
|
||||
list = new JComboBox(model);
|
||||
list.setPrototypeDisplayValue("ZZZZZZZZZZZZZZZZZZZZZZZZZZZZ");
|
||||
add(list, BorderLayout.CENTER);
|
||||
|
||||
// Add selection listener
|
||||
list.addItemListener(new ItemListener() {
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
if (e.getStateChange() == ItemEvent.SELECTED) {
|
||||
fireFrameChanged();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** Takes a List of StackTraceEntry objects */
|
||||
public void setTrace(java.util.List trace) {
|
||||
this.trace = trace;
|
||||
model.dataChanged();
|
||||
list.setSelectedIndex(0);
|
||||
fireFrameChanged();
|
||||
}
|
||||
|
||||
public void addListener(Listener listener) {
|
||||
if (listeners == null) {
|
||||
listeners = new ArrayList();
|
||||
}
|
||||
listeners.add(listener);
|
||||
}
|
||||
|
||||
protected void fireFrameChanged() {
|
||||
if (listeners != null) {
|
||||
StackTraceEntry entry = (StackTraceEntry) trace.get(list.getSelectedIndex());
|
||||
for (Iterator iter = listeners.iterator(); iter.hasNext(); ) {
|
||||
((Listener) iter.next()).frameChanged(entry.getCFrame(), entry.getJavaFrame());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,237 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.bugspot;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.util.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.*;
|
||||
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.debugger.cdbg.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.ui.*;
|
||||
|
||||
// NOTE: this class was not placed in sun.jvm.hotspot.ui to prevent
|
||||
// mixing components designed for C and C++ debugging with the ones
|
||||
// that work with the core serviceability agent functionality (which
|
||||
// does not require that the CDebugger interface be implemented).
|
||||
|
||||
/** The ThreadListPanel is used for C and C++ debugging and can
|
||||
visualize all threads in the target process. The caller passes in
|
||||
a CDebugger attached to the target process and can request that
|
||||
JavaThreads' associations with these underlying threads be
|
||||
displayed; this option is only valid when attached to a HotSpot
|
||||
JVM and when the {@link sun.jvm.hotspot.runtime.VM} has been
|
||||
initialized. */
|
||||
|
||||
public class ThreadListPanel extends JPanel {
|
||||
/** Listener which can be added to receive "Set Focus" events */
|
||||
public static interface Listener {
|
||||
/** ThreadProxy will always be provided; JavaThread will only be
|
||||
present if displayJavaThreads was specified in the constructor
|
||||
for the panel and the thread was a JavaThread. */
|
||||
public void setFocus(ThreadProxy thread, JavaThread jthread);
|
||||
}
|
||||
|
||||
static class ThreadInfo {
|
||||
private ThreadProxy thread;
|
||||
// Distinguish between PC == null and no top frame
|
||||
private boolean gotPC;
|
||||
private Address pc;
|
||||
private String location;
|
||||
private JavaThread javaThread;
|
||||
private String javaThreadName;
|
||||
|
||||
public ThreadInfo(ThreadProxy thread, CDebugger dbg, JavaThread jthread) {
|
||||
this.thread = thread;
|
||||
this.location = "<unknown>";
|
||||
CFrame fr = dbg.topFrameForThread(thread);
|
||||
if (fr != null) {
|
||||
gotPC = true;
|
||||
pc = fr.pc();
|
||||
PCFinder.Info info = PCFinder.findPC(pc, fr.loadObjectForPC(), dbg);
|
||||
if (info.getName() != null) {
|
||||
location = info.getName();
|
||||
if (info.getConfidence() == PCFinder.LOW_CONFIDENCE) {
|
||||
location = location + " (?)";
|
||||
}
|
||||
if (info.getOffset() < 0) {
|
||||
location = location + " + 0x" + Long.toHexString(info.getOffset());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (jthread != null) {
|
||||
javaThread = jthread;
|
||||
javaThreadName = jthread.getThreadName();
|
||||
}
|
||||
}
|
||||
|
||||
public ThreadProxy getThread() { return thread; }
|
||||
public boolean hasPC() { return gotPC; }
|
||||
public Address getPC() { return pc; }
|
||||
public String getLocation() { return location; }
|
||||
public boolean isJavaThread() { return (javaThread != null); }
|
||||
public JavaThread getJavaThread() { return javaThread; }
|
||||
public String getJavaThreadName() { return javaThreadName; }
|
||||
}
|
||||
|
||||
// List<ThreadInfo>
|
||||
private java.util.List threadList;
|
||||
private JTable table;
|
||||
private AbstractTableModel dataModel;
|
||||
// List<Listener>
|
||||
private java.util.List listeners;
|
||||
|
||||
/** Takes a CDebugger from which the thread list is queried.
|
||||
displayJavaThreads must only be set to true if the debugger is
|
||||
attached to a HotSpot JVM and if the VM has already been
|
||||
initialized. */
|
||||
public ThreadListPanel(CDebugger dbg, final boolean displayJavaThreads) {
|
||||
super();
|
||||
|
||||
Map threadToJavaThreadMap = null;
|
||||
if (displayJavaThreads) {
|
||||
// Collect Java threads from virtual machine and insert them in
|
||||
// table for later querying
|
||||
threadToJavaThreadMap = new HashMap();
|
||||
Threads threads = VM.getVM().getThreads();
|
||||
for (JavaThread thr = threads.first(); thr != null; thr = thr.next()) {
|
||||
threadToJavaThreadMap.put(thr.getThreadProxy(), thr);
|
||||
}
|
||||
}
|
||||
|
||||
java.util.List/*<ThreadProxy>*/ threads = dbg.getThreadList();
|
||||
threadList = new ArrayList(threads.size());
|
||||
for (Iterator iter = threads.iterator(); iter.hasNext(); ) {
|
||||
ThreadProxy thr = (ThreadProxy) iter.next();
|
||||
JavaThread jthr = null;
|
||||
if (displayJavaThreads) {
|
||||
jthr = (JavaThread) threadToJavaThreadMap.get(thr);
|
||||
}
|
||||
threadList.add(new ThreadInfo(thr, dbg, jthr));
|
||||
}
|
||||
|
||||
// Thread ID, current PC, current symbol, Java Thread, [Java thread name]
|
||||
dataModel = new AbstractTableModel() {
|
||||
public int getColumnCount() { return (displayJavaThreads ? 5 : 3); }
|
||||
public int getRowCount() { return threadList.size(); }
|
||||
public String getColumnName(int col) {
|
||||
switch (col) {
|
||||
case 0:
|
||||
return "Thread ID";
|
||||
case 1:
|
||||
return "PC";
|
||||
case 2:
|
||||
return "Location";
|
||||
case 3:
|
||||
return "Java?";
|
||||
case 4:
|
||||
return "Java Thread Name";
|
||||
default:
|
||||
throw new RuntimeException("Index " + col + " out of bounds");
|
||||
}
|
||||
}
|
||||
public Object getValueAt(int row, int col) {
|
||||
ThreadInfo info = (ThreadInfo) threadList.get(row);
|
||||
|
||||
switch (col) {
|
||||
case 0:
|
||||
return info.getThread();
|
||||
case 1:
|
||||
{
|
||||
if (info.hasPC()) {
|
||||
return info.getPC();
|
||||
}
|
||||
return "<no frames on stack>";
|
||||
}
|
||||
case 2:
|
||||
return info.getLocation();
|
||||
case 3:
|
||||
if (info.isJavaThread()) {
|
||||
return "Yes";
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
case 4:
|
||||
if (info.isJavaThread()) {
|
||||
return info.getJavaThreadName();
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
default:
|
||||
throw new RuntimeException("Index (" + col + ", " + row + ") out of bounds");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Build user interface
|
||||
setLayout(new BorderLayout());
|
||||
table = new JTable(dataModel);
|
||||
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||
JTableHeader header = table.getTableHeader();
|
||||
header.setReorderingAllowed(false);
|
||||
table.setRowSelectionAllowed(true);
|
||||
table.setColumnSelectionAllowed(false);
|
||||
JScrollPane scrollPane = new JScrollPane(table);
|
||||
add(scrollPane, BorderLayout.CENTER);
|
||||
if (threadList.size() > 0) {
|
||||
table.setRowSelectionInterval(0, 0);
|
||||
}
|
||||
|
||||
JButton button = new JButton("Set Focus");
|
||||
button.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
int i = table.getSelectedRow();
|
||||
if (i < 0) {
|
||||
return;
|
||||
}
|
||||
ThreadInfo info = (ThreadInfo) threadList.get(i);
|
||||
for (Iterator iter = listeners.iterator(); iter.hasNext(); ) {
|
||||
((Listener) iter.next()).setFocus(info.getThread(), info.getJavaThread());
|
||||
}
|
||||
}
|
||||
});
|
||||
JPanel focusPanel = new JPanel();
|
||||
focusPanel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
|
||||
focusPanel.setLayout(new BoxLayout(focusPanel, BoxLayout.Y_AXIS));
|
||||
focusPanel.add(Box.createGlue());
|
||||
focusPanel.add(button);
|
||||
focusPanel.add(Box.createGlue());
|
||||
add(focusPanel, BorderLayout.EAST);
|
||||
|
||||
// FIXME: make listener model for the debugger so if the user
|
||||
// specifies a mapfile for or path to a given DSO later we can
|
||||
// update our state
|
||||
}
|
||||
|
||||
public void addListener(Listener l) {
|
||||
if (listeners == null) {
|
||||
listeners = new ArrayList();
|
||||
}
|
||||
listeners.add(l);
|
||||
}
|
||||
}
|
||||
@@ -1,252 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.bugspot;
|
||||
|
||||
import java.awt.*;
|
||||
import javax.swing.*;
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.debugger.cdbg.*;
|
||||
import sun.jvm.hotspot.bugspot.tree.*;
|
||||
import sun.jvm.hotspot.oops.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.ui.tree.*;
|
||||
import sun.jvm.hotspot.ui.treetable.*;
|
||||
|
||||
/** Manages display of a set of local variables in a frame, or the
|
||||
contents of the "this" pointer */
|
||||
|
||||
public class VariablePanel extends JPanel {
|
||||
private JTreeTable treeTable;
|
||||
private SimpleTreeTableModel model;
|
||||
private SimpleTreeGroupNode root;
|
||||
|
||||
public VariablePanel() {
|
||||
super();
|
||||
|
||||
model = new SimpleTreeTableModel();
|
||||
model.setValuesEditable(false);
|
||||
root = new SimpleTreeGroupNode();
|
||||
model.setRoot(root);
|
||||
treeTable = new JTreeTable(model);
|
||||
treeTable.setRootVisible(false);
|
||||
treeTable.setShowsRootHandles(true);
|
||||
treeTable.setShowsIcons(false);
|
||||
treeTable.setTreeEditable(false);
|
||||
treeTable.getTableHeader().setReorderingAllowed(false);
|
||||
treeTable.setCellSelectionEnabled(true);
|
||||
treeTable.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
|
||||
treeTable.setDragEnabled(true);
|
||||
JScrollPane sp = new JScrollPane(treeTable);
|
||||
sp.getViewport().setBackground(Color.white);
|
||||
|
||||
setLayout(new BorderLayout());
|
||||
add(sp, BorderLayout.CENTER);
|
||||
}
|
||||
|
||||
/** Clear the contents of this VariablePanel */
|
||||
public void clear() {
|
||||
root.removeAllChildren();
|
||||
model.fireTreeStructureChanged();
|
||||
}
|
||||
|
||||
/** Update the contents of this VariablePanel from the given CFrame */
|
||||
public void update(CFrame fr) {
|
||||
// Collect locals
|
||||
CCollector coll = new CCollector();
|
||||
fr.iterateLocals(coll);
|
||||
update(coll);
|
||||
}
|
||||
|
||||
/** Update the contents of this VariablePanel from the given JavaVFrame */
|
||||
public void update(JavaVFrame jfr) {
|
||||
Method m = jfr.getMethod();
|
||||
if (!m.hasLocalVariableTable()) {
|
||||
return;
|
||||
}
|
||||
int bci = jfr.getBCI();
|
||||
// Get local variable table
|
||||
LocalVariableTableElement[] locals = m.getLocalVariableTable();
|
||||
// Get locals as StackValueCollection
|
||||
StackValueCollection coll = jfr.getLocals();
|
||||
root.removeAllChildren();
|
||||
// See which locals are live
|
||||
for (int i = 0; i < locals.length; i++) {
|
||||
LocalVariableTableElement local = locals[i];
|
||||
if (local.getStartBCI() <= bci && bci < local.getStartBCI() + local.getLength()) {
|
||||
// Valid; add it
|
||||
SimpleTreeNode node = null;
|
||||
Symbol name = null;
|
||||
try {
|
||||
name = m.getConstants().getSymbolAt(local.getNameCPIndex());
|
||||
if (name == null) {
|
||||
System.err.println("Null name at slot " +
|
||||
local.getNameCPIndex() +
|
||||
" for local variable at slot " +
|
||||
local.getSlot());
|
||||
continue;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.err.println("Unable to fetch name at slot " +
|
||||
local.getNameCPIndex() +
|
||||
" for local variable at slot " +
|
||||
local.getSlot());
|
||||
e.printStackTrace();
|
||||
continue;
|
||||
}
|
||||
sun.jvm.hotspot.oops.NamedFieldIdentifier f =
|
||||
new sun.jvm.hotspot.oops.NamedFieldIdentifier(name.asString());
|
||||
Symbol descriptor = null;
|
||||
try {
|
||||
descriptor = m.getConstants().getSymbolAt(local.getDescriptorCPIndex());
|
||||
} catch (Exception e) {
|
||||
System.err.println("Unable to fetch descriptor at slot " +
|
||||
local.getDescriptorCPIndex() +
|
||||
" for local variable " + f.getName() +
|
||||
" at slot " + local.getSlot());
|
||||
e.printStackTrace();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (descriptor != null) {
|
||||
switch (descriptor.getByteAt(0)) {
|
||||
case 'F': {
|
||||
node = new sun.jvm.hotspot.ui.tree.FloatTreeNodeAdapter(coll.floatAt(local.getSlot()), f, true);
|
||||
break;
|
||||
}
|
||||
case 'D': {
|
||||
node = new sun.jvm.hotspot.ui.tree.DoubleTreeNodeAdapter(coll.doubleAt(local.getSlot()), f, true);
|
||||
break;
|
||||
}
|
||||
case 'C': {
|
||||
node = new sun.jvm.hotspot.ui.tree.CharTreeNodeAdapter((char) coll.intAt(local.getSlot()), f, true);
|
||||
break;
|
||||
}
|
||||
case 'B':
|
||||
case 'S':
|
||||
case 'I': {
|
||||
node = new sun.jvm.hotspot.ui.tree.LongTreeNodeAdapter(coll.intAt(local.getSlot()), f, true);
|
||||
break;
|
||||
}
|
||||
case 'Z': {
|
||||
node = new sun.jvm.hotspot.ui.tree.BooleanTreeNodeAdapter(
|
||||
((coll.intAt(local.getSlot()) != 0) ? true : false), f, true
|
||||
);
|
||||
break;
|
||||
}
|
||||
case 'J': {
|
||||
node = new sun.jvm.hotspot.ui.tree.LongTreeNodeAdapter(coll.longAt(local.getSlot()), f, true);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
try {
|
||||
node = new sun.jvm.hotspot.ui.tree.OopTreeNodeAdapter(
|
||||
VM.getVM().getObjectHeap().newOop(coll.oopHandleAt(local.getSlot())), f, true
|
||||
);
|
||||
} catch (AddressException e) {
|
||||
node = new sun.jvm.hotspot.ui.tree.FieldTreeNodeAdapter(f, true) {
|
||||
public int getChildCount() { return 0; }
|
||||
public SimpleTreeNode getChild(int i) { return null; }
|
||||
public boolean isLeaf() { return false; }
|
||||
public int getIndexOfChild(SimpleTreeNode child) { return 0; }
|
||||
public String getValue() {
|
||||
return "<Bad oop>";
|
||||
}
|
||||
};
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (node != null) {
|
||||
root.addChild(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
model.fireTreeStructureChanged();
|
||||
}
|
||||
|
||||
/** Update the contents of this VariablePanel from the given "this"
|
||||
pointer of the given type */
|
||||
public void update(Address thisAddr, Type type) {
|
||||
// Collect fields
|
||||
CCollector coll = new CCollector();
|
||||
type.iterateObject(thisAddr, coll);
|
||||
update(coll);
|
||||
}
|
||||
|
||||
private void update(CCollector coll) {
|
||||
root.removeAllChildren();
|
||||
for (int i = 0; i < coll.getNumChildren(); i++) {
|
||||
root.addChild(coll.getChild(i));
|
||||
}
|
||||
model.fireTreeStructureChanged();
|
||||
}
|
||||
|
||||
static class CCollector extends DefaultObjectVisitor {
|
||||
private java.util.List children;
|
||||
|
||||
public CCollector() {
|
||||
children = new ArrayList();
|
||||
}
|
||||
|
||||
public int getNumChildren() {
|
||||
return children.size();
|
||||
}
|
||||
|
||||
public SimpleTreeNode getChild(int i) {
|
||||
return (SimpleTreeNode) children.get(i);
|
||||
}
|
||||
|
||||
public void doBit(sun.jvm.hotspot.debugger.cdbg.FieldIdentifier f, long val) {
|
||||
children.add(new sun.jvm.hotspot.bugspot.tree.LongTreeNodeAdapter(val, f, true));
|
||||
}
|
||||
public void doInt(sun.jvm.hotspot.debugger.cdbg.FieldIdentifier f, long val) {
|
||||
children.add(new sun.jvm.hotspot.bugspot.tree.LongTreeNodeAdapter(val, f, true));
|
||||
}
|
||||
public void doEnum(sun.jvm.hotspot.debugger.cdbg.FieldIdentifier f, long val, String enumName) {
|
||||
children.add(new sun.jvm.hotspot.bugspot.tree.EnumTreeNodeAdapter(enumName, val, f, true));
|
||||
}
|
||||
public void doFloat(sun.jvm.hotspot.debugger.cdbg.FieldIdentifier f, float val) {
|
||||
children.add(new sun.jvm.hotspot.bugspot.tree.FloatTreeNodeAdapter(val, f, true));
|
||||
}
|
||||
public void doDouble(sun.jvm.hotspot.debugger.cdbg.FieldIdentifier f, double val) {
|
||||
children.add(new sun.jvm.hotspot.bugspot.tree.DoubleTreeNodeAdapter(val, f, true));
|
||||
}
|
||||
public void doPointer(sun.jvm.hotspot.debugger.cdbg.FieldIdentifier f, Address val) {
|
||||
children.add(new sun.jvm.hotspot.bugspot.tree.AddressTreeNodeAdapter(val, f, true));
|
||||
}
|
||||
public void doArray(sun.jvm.hotspot.debugger.cdbg.FieldIdentifier f, Address val) {
|
||||
children.add(new sun.jvm.hotspot.bugspot.tree.AddressTreeNodeAdapter(val, f, true));
|
||||
}
|
||||
public void doRef(sun.jvm.hotspot.debugger.cdbg.FieldIdentifier f, Address val) {
|
||||
children.add(new sun.jvm.hotspot.bugspot.tree.AddressTreeNodeAdapter(val, f, true));
|
||||
}
|
||||
public void doCompound(sun.jvm.hotspot.debugger.cdbg.FieldIdentifier f, Address val) {
|
||||
children.add(new sun.jvm.hotspot.bugspot.tree.ObjectTreeNodeAdapter(val, f, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.bugspot.tree;
|
||||
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.debugger.cdbg.*;
|
||||
import sun.jvm.hotspot.ui.tree.SimpleTreeNode;
|
||||
|
||||
/** Encapsulates a float value in a tree handled by SimpleTreeModel */
|
||||
|
||||
public class AddressTreeNodeAdapter extends FieldTreeNodeAdapter {
|
||||
private Address val;
|
||||
|
||||
public AddressTreeNodeAdapter(Address val, FieldIdentifier id) {
|
||||
this(val, id, false);
|
||||
}
|
||||
|
||||
public AddressTreeNodeAdapter(Address val, FieldIdentifier id, boolean treeTableMode) {
|
||||
super(id, treeTableMode);
|
||||
this.val = val;
|
||||
}
|
||||
|
||||
public int getChildCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public SimpleTreeNode getChild(int index) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isLeaf() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getIndexOfChild(SimpleTreeNode child) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
if (val != null) {
|
||||
return val.toString();
|
||||
}
|
||||
return "NULL";
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.bugspot.tree;
|
||||
|
||||
import sun.jvm.hotspot.debugger.cdbg.*;
|
||||
import sun.jvm.hotspot.ui.tree.SimpleTreeNode;
|
||||
|
||||
/** Encapsulates a double value in a tree handled by SimpleTreeModel */
|
||||
|
||||
public class DoubleTreeNodeAdapter extends FieldTreeNodeAdapter {
|
||||
private double val;
|
||||
|
||||
public DoubleTreeNodeAdapter(double val, FieldIdentifier id) {
|
||||
this(val, id, false);
|
||||
}
|
||||
|
||||
public DoubleTreeNodeAdapter(double val, FieldIdentifier id, boolean treeTableMode) {
|
||||
super(id, treeTableMode);
|
||||
this.val = val;
|
||||
}
|
||||
|
||||
public int getChildCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public SimpleTreeNode getChild(int index) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isLeaf() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getIndexOfChild(SimpleTreeNode child) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return Double.toString(val);
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.bugspot.tree;
|
||||
|
||||
import sun.jvm.hotspot.debugger.cdbg.*;
|
||||
import sun.jvm.hotspot.ui.tree.SimpleTreeNode;
|
||||
|
||||
/** Encapsulates an enumerated value in a tree handled by SimpleTreeModel */
|
||||
|
||||
public class EnumTreeNodeAdapter extends FieldTreeNodeAdapter {
|
||||
private long val;
|
||||
private String enumName;
|
||||
|
||||
public EnumTreeNodeAdapter(String enumName, long val, FieldIdentifier id) {
|
||||
this(enumName, val, id, false);
|
||||
}
|
||||
|
||||
public EnumTreeNodeAdapter(String enumName, long val, FieldIdentifier id, boolean treeTableMode) {
|
||||
super(id, treeTableMode);
|
||||
this.enumName = enumName;
|
||||
this.val = val;
|
||||
}
|
||||
|
||||
public int getChildCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public SimpleTreeNode getChild(int index) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isLeaf() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getIndexOfChild(SimpleTreeNode child) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
if (enumName != null) {
|
||||
return enumName;
|
||||
} else {
|
||||
return Long.toString(val);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.bugspot.tree;
|
||||
|
||||
import sun.jvm.hotspot.debugger.cdbg.*;
|
||||
import sun.jvm.hotspot.ui.tree.SimpleTreeNode;
|
||||
|
||||
/** Abstract base class for all adapters for fields of C/C++ objects */
|
||||
|
||||
public abstract class FieldTreeNodeAdapter implements SimpleTreeNode {
|
||||
private FieldIdentifier id;
|
||||
private boolean treeTableMode;
|
||||
|
||||
/** The identifier may be null, i.e., for the root of the tree */
|
||||
public FieldTreeNodeAdapter(FieldIdentifier id, boolean treeTableMode) {
|
||||
this.id = id;
|
||||
this.treeTableMode = treeTableMode;
|
||||
}
|
||||
|
||||
public FieldIdentifier getID() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/** Defaults to false in subclasses */
|
||||
public boolean getTreeTableMode() {
|
||||
return treeTableMode;
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return getID().getType();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
if (getID() != null) {
|
||||
return getID().toString();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
if (treeTableMode) {
|
||||
return getName();
|
||||
} else {
|
||||
if (getID() != null) {
|
||||
return getName() + ": " + getValue();
|
||||
} else {
|
||||
return getValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.bugspot.tree;
|
||||
|
||||
import sun.jvm.hotspot.debugger.cdbg.*;
|
||||
import sun.jvm.hotspot.ui.tree.SimpleTreeNode;
|
||||
|
||||
/** Encapsulates a long value in a tree handled by SimpleTreeModel */
|
||||
|
||||
public class LongTreeNodeAdapter extends FieldTreeNodeAdapter {
|
||||
private long val;
|
||||
|
||||
public LongTreeNodeAdapter(long val, FieldIdentifier id) {
|
||||
this(val, id, false);
|
||||
}
|
||||
|
||||
public LongTreeNodeAdapter(long val, FieldIdentifier id, boolean treeTableMode) {
|
||||
super(id, treeTableMode);
|
||||
this.val = val;
|
||||
}
|
||||
|
||||
public int getChildCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public SimpleTreeNode getChild(int index) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isLeaf() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getIndexOfChild(SimpleTreeNode child) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return Long.toString(val);
|
||||
}
|
||||
}
|
||||
@@ -1,216 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.bugspot.tree;
|
||||
|
||||
import java.io.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.debugger.cdbg.*;
|
||||
import sun.jvm.hotspot.ui.tree.SimpleTreeNode;
|
||||
|
||||
/** An adapter class which allows C/C++ objects to be displayed in a
|
||||
tree via the SimpleTreeNode interface. */
|
||||
|
||||
public class ObjectTreeNodeAdapter extends FieldTreeNodeAdapter {
|
||||
// Address of object
|
||||
private Address addr;
|
||||
|
||||
/** The address may be null (for object fields of objcets which are
|
||||
null). The FieldIdentifier should not be null. treeTableMode
|
||||
defaults to false. */
|
||||
public ObjectTreeNodeAdapter(Address addr, FieldIdentifier id) {
|
||||
this(addr, id, false);
|
||||
}
|
||||
|
||||
/** The address may be null (for object fields of objcets which are
|
||||
null). The FieldIdentifier should not be null. */
|
||||
public ObjectTreeNodeAdapter(Address addr, FieldIdentifier id, boolean treeTableMode) {
|
||||
super(id, treeTableMode);
|
||||
this.addr = addr;
|
||||
}
|
||||
|
||||
public int getChildCount() {
|
||||
if (addr == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Counter c = new Counter();
|
||||
getType().iterateObject(addr, c);
|
||||
return c.getNumFields();
|
||||
}
|
||||
|
||||
public SimpleTreeNode getChild(int index) {
|
||||
if (addr == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Fetcher f = new Fetcher(index);
|
||||
getType().iterateObject(addr, f);
|
||||
return f.getChild();
|
||||
}
|
||||
|
||||
public boolean isLeaf() {
|
||||
return (addr == null);
|
||||
}
|
||||
|
||||
public int getIndexOfChild(SimpleTreeNode child) {
|
||||
FieldIdentifier id = ((FieldTreeNodeAdapter) child).getID();
|
||||
Finder f = new Finder(id);
|
||||
getType().iterateObject(addr, f);
|
||||
return f.getIndex();
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
if (addr != null) {
|
||||
return addr.toString();
|
||||
}
|
||||
return "NULL";
|
||||
}
|
||||
|
||||
/** Should be used only once, then have the number of fields
|
||||
fetched. */
|
||||
static class Counter extends DefaultObjectVisitor {
|
||||
private int numFields;
|
||||
|
||||
public int getNumFields() {
|
||||
return numFields;
|
||||
}
|
||||
|
||||
public void doBit(FieldIdentifier f, long val) { ++numFields; }
|
||||
public void doInt(FieldIdentifier f, long val) { ++numFields; }
|
||||
public void doEnum(FieldIdentifier f, long val, String enumName) { ++numFields; }
|
||||
public void doFloat(FieldIdentifier f, float val) { ++numFields; }
|
||||
public void doDouble(FieldIdentifier f, double val) { ++numFields; }
|
||||
public void doPointer(FieldIdentifier f, Address val) { ++numFields; }
|
||||
public void doArray(FieldIdentifier f, Address val) { ++numFields; }
|
||||
public void doRef(FieldIdentifier f, Address val) { ++numFields; }
|
||||
public void doCompound(FieldIdentifier f, Address addr) { ++numFields; }
|
||||
}
|
||||
|
||||
/** Creates a new SimpleTreeNode for the given field. */
|
||||
class Fetcher extends DefaultObjectVisitor {
|
||||
private int index;
|
||||
private int curField;
|
||||
private SimpleTreeNode child;
|
||||
|
||||
public Fetcher(int index) {
|
||||
this.index = index;
|
||||
}
|
||||
|
||||
public SimpleTreeNode getChild() {
|
||||
return child;
|
||||
}
|
||||
|
||||
public void doBit(FieldIdentifier f, long val) {
|
||||
if (curField == index) {
|
||||
child = new LongTreeNodeAdapter(val, f, getTreeTableMode());
|
||||
}
|
||||
++curField;
|
||||
}
|
||||
|
||||
public void doInt(FieldIdentifier f, long val) {
|
||||
if (curField == index) {
|
||||
child = new LongTreeNodeAdapter(val, f, getTreeTableMode());
|
||||
}
|
||||
++curField;
|
||||
}
|
||||
|
||||
public void doEnum(FieldIdentifier f, long val, String enumName) {
|
||||
if (curField == index) {
|
||||
child = new EnumTreeNodeAdapter(enumName, val, f, getTreeTableMode());
|
||||
}
|
||||
++curField;
|
||||
}
|
||||
|
||||
public void doFloat(FieldIdentifier f, float val) {
|
||||
if (curField == index) {
|
||||
child = new FloatTreeNodeAdapter(val, f, getTreeTableMode());
|
||||
}
|
||||
++curField;
|
||||
}
|
||||
|
||||
public void doDouble(FieldIdentifier f, double val) {
|
||||
if (curField == index) {
|
||||
child = new DoubleTreeNodeAdapter(val, f, getTreeTableMode());
|
||||
}
|
||||
++curField;
|
||||
}
|
||||
|
||||
public void doPointer(FieldIdentifier f, Address val) {
|
||||
if (curField == index) {
|
||||
child = new AddressTreeNodeAdapter(val, f, getTreeTableMode());
|
||||
}
|
||||
++curField;
|
||||
}
|
||||
|
||||
public void doArray(FieldIdentifier f, Address val) {
|
||||
if (curField == index) {
|
||||
child = new AddressTreeNodeAdapter(val, f, getTreeTableMode());
|
||||
}
|
||||
++curField;
|
||||
}
|
||||
|
||||
public void doRef(FieldIdentifier f, Address val) {
|
||||
if (curField == index) {
|
||||
child = new AddressTreeNodeAdapter(val, f, getTreeTableMode());
|
||||
}
|
||||
++curField;
|
||||
}
|
||||
|
||||
public void doCompound(FieldIdentifier f, Address val) {
|
||||
if (curField == index) {
|
||||
child = new ObjectTreeNodeAdapter(val, f, getTreeTableMode());
|
||||
}
|
||||
++curField;
|
||||
}
|
||||
}
|
||||
|
||||
/** Finds the index of the given FieldIdentifier. */
|
||||
static class Finder extends DefaultObjectVisitor {
|
||||
private FieldIdentifier id;
|
||||
private int curField;
|
||||
private int index = -1;
|
||||
|
||||
public Finder(FieldIdentifier id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/** Returns -1 if not found */
|
||||
public int getIndex() {
|
||||
return index;
|
||||
}
|
||||
|
||||
public void doBit(FieldIdentifier f, long val) { if (f.equals(id)) { index = curField; } ++curField; }
|
||||
public void doInt(FieldIdentifier f, long val) { if (f.equals(id)) { index = curField; } ++curField; }
|
||||
public void doEnum(FieldIdentifier f, long val,
|
||||
String enumName) { if (f.equals(id)) { index = curField; } ++curField; }
|
||||
public void doFloat(FieldIdentifier f, float val) { if (f.equals(id)) { index = curField; } ++curField; }
|
||||
public void doDouble(FieldIdentifier f, double val) { if (f.equals(id)) { index = curField; } ++curField; }
|
||||
public void doPointer(FieldIdentifier f, Address val) { if (f.equals(id)) { index = curField; } ++curField; }
|
||||
public void doArray(FieldIdentifier f, Address val) { if (f.equals(id)) { index = curField; } ++curField; }
|
||||
public void doRef(FieldIdentifier f, Address val) { if (f.equals(id)) { index = curField; } ++curField; }
|
||||
public void doCompound(FieldIdentifier f,
|
||||
Address val) { if (f.equals(id)) { index = curField; } ++curField; }
|
||||
}
|
||||
}
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -50,4 +50,8 @@ public class ciBaseObject extends VMObject {
|
||||
public ciBaseObject(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
out.println("# Unknown ci type " + getAddress().getAddressAt(0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2012, 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
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -60,4 +60,8 @@ public class ciConstant extends VMObject {
|
||||
public ciConstant(Address addr) {
|
||||
super(addr);
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
// Nothing to be done
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2012, 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
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -74,4 +74,29 @@ public class ciEnv extends VMObject {
|
||||
public CompileTask task() {
|
||||
return new CompileTask(taskField.getValue(this.getAddress()));
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
out.println("JvmtiExport can_access_local_variables " +
|
||||
(JvmtiExport.canAccessLocalVariables() ? '1' : '0'));
|
||||
out.println("JvmtiExport can_hotswap_or_post_breakpoint " +
|
||||
(JvmtiExport.canHotswapOrPostBreakpoint() ? '1' : '0'));
|
||||
out.println("JvmtiExport can_post_on_exceptions " +
|
||||
(JvmtiExport.canPostOnExceptions() ? '1' : '0'));
|
||||
|
||||
GrowableArray<ciMetadata> objects = factory().objects();
|
||||
out.println("# " + objects.length() + " ciObject found");
|
||||
for (int i = 0; i < objects.length(); i++) {
|
||||
ciMetadata o = objects.at(i);
|
||||
out.println("# ciMetadata" + i + " @ " + o);
|
||||
o.dumpReplayData(out);
|
||||
}
|
||||
CompileTask task = task();
|
||||
Method method = task.method();
|
||||
int entryBci = task.osrBci();
|
||||
Klass holder = method.getMethodHolder();
|
||||
out.println("compile " + holder.getName().asString() + " " +
|
||||
OopUtilities.escapeString(method.getName().asString()) + " " +
|
||||
method.getSignature().asString() + " " +
|
||||
entryBci);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -80,4 +80,84 @@ public class ciInstanceKlass extends ciKlass {
|
||||
public boolean isInitialized() {
|
||||
return initState() == CLASS_STATE_FULLY_INITIALIZED;
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
InstanceKlass ik = (InstanceKlass)getMetadata();
|
||||
ConstantPool cp = ik.getConstants();
|
||||
|
||||
// Try to record related loaded classes
|
||||
Klass sub = ik.getSubklassKlass();
|
||||
while (sub != null) {
|
||||
if (sub instanceof InstanceKlass) {
|
||||
out.println("instanceKlass " + sub.getName().asString());
|
||||
}
|
||||
sub = sub.getNextSiblingKlass();
|
||||
}
|
||||
|
||||
final int length = (int) cp.getLength();
|
||||
out.print("ciInstanceKlass " + name() + " " + (isLinked() ? 1 : 0) + " " + (isInitialized() ? 1 : 0) + " " + length);
|
||||
for (int index = 1; index < length; index++) {
|
||||
out.print(" " + cp.getTags().at(index));
|
||||
}
|
||||
out.println();
|
||||
if (isInitialized()) {
|
||||
Field[] staticFields = ik.getStaticFields();
|
||||
for (int i = 0; i < staticFields.length; i++) {
|
||||
Field f = staticFields[i];
|
||||
Oop mirror = ik.getJavaMirror();
|
||||
if (f.isFinal() && !f.hasInitialValue()) {
|
||||
out.print("staticfield " + name() + " " +
|
||||
OopUtilities.escapeString(f.getID().getName()) + " " +
|
||||
f.getFieldType().getSignature().asString() + " ");
|
||||
if (f instanceof ByteField) {
|
||||
ByteField bf = (ByteField)f;
|
||||
out.println(bf.getValue(mirror));
|
||||
} else if (f instanceof BooleanField) {
|
||||
BooleanField bf = (BooleanField)f;
|
||||
out.println(bf.getValue(mirror) ? 1 : 0);
|
||||
} else if (f instanceof ShortField) {
|
||||
ShortField bf = (ShortField)f;
|
||||
out.println(bf.getValue(mirror));
|
||||
} else if (f instanceof CharField) {
|
||||
CharField bf = (CharField)f;
|
||||
out.println(bf.getValue(mirror) & 0xffff);
|
||||
} else if (f instanceof IntField) {
|
||||
IntField bf = (IntField)f;
|
||||
out.println(bf.getValue(mirror));
|
||||
} else if (f instanceof LongField) {
|
||||
LongField bf = (LongField)f;
|
||||
out.println(bf.getValue(mirror));
|
||||
} else if (f instanceof FloatField) {
|
||||
FloatField bf = (FloatField)f;
|
||||
out.println(Float.floatToRawIntBits(bf.getValue(mirror)));
|
||||
} else if (f instanceof DoubleField) {
|
||||
DoubleField bf = (DoubleField)f;
|
||||
out.println(Double.doubleToRawLongBits(bf.getValue(mirror)));
|
||||
} else if (f instanceof OopField) {
|
||||
OopField bf = (OopField)f;
|
||||
Oop value = bf.getValue(mirror);
|
||||
if (value == null) {
|
||||
out.println("null");
|
||||
} else if (value.isInstance()) {
|
||||
Instance inst = (Instance)value;
|
||||
if (inst.isA(SystemDictionary.getStringKlass())) {
|
||||
out.println("\"" + OopUtilities.stringOopToEscapedString(inst) + "\"");
|
||||
} else {
|
||||
out.println(inst.getKlass().getName().asString());
|
||||
}
|
||||
} else if (value.isObjArray()) {
|
||||
ObjArray oa = (ObjArray)value;
|
||||
Klass ek = (ObjArrayKlass)oa.getKlass();
|
||||
out.println(oa.getLength() + " " + ek.getName().asString());
|
||||
} else if (value.isTypeArray()) {
|
||||
TypeArray ta = (TypeArray)value;
|
||||
out.println(ta.getLength());
|
||||
} else {
|
||||
out.println(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -88,4 +88,19 @@ public class ciMethod extends ciMetadata {
|
||||
st.printf(" %s::%s", method.getMethodHolder().getName().asString().replace('/', '.'),
|
||||
method.getName().asString());
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
Method method = (Method)getMetadata();
|
||||
NMethod nm = method.getNativeMethod();
|
||||
Klass holder = method.getMethodHolder();
|
||||
out.println("ciMethod " +
|
||||
holder.getName().asString() + " " +
|
||||
OopUtilities.escapeString(method.getName().asString()) + " " +
|
||||
method.getSignature().asString() + " " +
|
||||
method.getInvocationCounter() + " " +
|
||||
method.getBackedgeCounter() + " " +
|
||||
interpreterInvocationCount() + " " +
|
||||
interpreterThrowoutCount() + " " +
|
||||
instructionsSize());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -174,4 +174,52 @@ public class ciMethodData extends ciMetadata {
|
||||
}
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
MethodData mdo = (MethodData)getMetadata();
|
||||
Method method = mdo.getMethod();
|
||||
Klass holder = method.getMethodHolder();
|
||||
out.print("ciMethodData " +
|
||||
holder.getName().asString() + " " +
|
||||
OopUtilities.escapeString(method.getName().asString()) + " " +
|
||||
method.getSignature().asString() + " " +
|
||||
state() + " " + currentMileage());
|
||||
byte[] orig = orig();
|
||||
out.print(" orig " + orig.length);
|
||||
for (int i = 0; i < orig.length; i++) {
|
||||
out.print(" " + (orig[i] & 0xff));
|
||||
}
|
||||
|
||||
long[] data = data();
|
||||
out.print(" data " + data.length);
|
||||
for (int i = 0; i < data.length; i++) {
|
||||
out.print(" 0x" + Long.toHexString(data[i]));
|
||||
}
|
||||
int count = 0;
|
||||
for (int round = 0; round < 2; round++) {
|
||||
if (round == 1) out.print(" oops " + count);
|
||||
ProfileData pdata = firstData();
|
||||
for ( ; isValid(pdata); pdata = nextData(pdata)) {
|
||||
if (pdata instanceof ciReceiverTypeData) {
|
||||
ciReceiverTypeData vdata = (ciReceiverTypeData)pdata;
|
||||
for (int i = 0; i < vdata.rowLimit(); i++) {
|
||||
ciKlass k = vdata.receiverAt(i);
|
||||
if (k != null) {
|
||||
if (round == 0) count++;
|
||||
else out.print(" " + ((vdata.dp() + vdata.cellOffset(vdata.receiverCellIndex(i))) / MethodData.cellSize) + " " + k.name());
|
||||
}
|
||||
}
|
||||
} else if (pdata instanceof ciVirtualCallData) {
|
||||
ciVirtualCallData vdata = (ciVirtualCallData)pdata;
|
||||
for (int i = 0; i < vdata.rowLimit(); i++) {
|
||||
ciKlass k = vdata.receiverAt(i);
|
||||
if (k != null) {
|
||||
if (round == 0) count++;
|
||||
else out.print(" " + ((vdata.dp() + vdata.cellOffset(vdata.receiverCellIndex(i))) / MethodData.cellSize + " " + k.name()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
out.println();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -498,6 +498,42 @@ public class NMethod extends CodeBlob {
|
||||
method.getSignature().asString();
|
||||
}
|
||||
|
||||
public void dumpReplayData(PrintStream out) {
|
||||
HashMap h = new HashMap();
|
||||
for (int i = 1; i < getMetadataLength(); i++) {
|
||||
Metadata meta = Metadata.instantiateWrapperFor(getMetadataAt(i));
|
||||
System.err.println(meta);
|
||||
if (h.get(meta) != null) continue;
|
||||
h.put(meta, meta);
|
||||
if (meta instanceof InstanceKlass) {
|
||||
((InstanceKlass)meta).dumpReplayData(out);
|
||||
} else if (meta instanceof Method) {
|
||||
((Method)meta).dumpReplayData(out);
|
||||
MethodData mdo = ((Method)meta).getMethodData();
|
||||
if (mdo != null) {
|
||||
mdo.dumpReplayData(out);
|
||||
}
|
||||
}
|
||||
}
|
||||
Method method = getMethod();
|
||||
if (h.get(method) == null) {
|
||||
method.dumpReplayData(out);
|
||||
MethodData mdo = method.getMethodData();
|
||||
if (mdo != null) {
|
||||
mdo.dumpReplayData(out);
|
||||
}
|
||||
}
|
||||
if (h.get(method.getMethodHolder()) == null) {
|
||||
((InstanceKlass)method.getMethodHolder()).dumpReplayData(out);
|
||||
}
|
||||
Klass holder = method.getMethodHolder();
|
||||
out.println("compile " + holder.getName().asString() + " " +
|
||||
OopUtilities.escapeString(method.getName().asString()) + " " +
|
||||
method.getSignature().asString() + " " +
|
||||
getEntryBCI());
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Internals only below this point
|
||||
//
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user