Compare commits

...

1670 Commits

Author SHA1 Message Date
J. Duke
ed6697aa20 Merge 2017-07-05 18:06:09 +02:00
J. Duke
bababbe74b Merge 2017-07-05 18:06:06 +02:00
J. Duke
c24c4b5f71 Merge 2017-07-05 18:06:04 +02:00
J. Duke
fd3d95e5f5 Merge 2017-07-05 18:06:01 +02:00
J. Duke
99b0a598c8 Merge 2017-07-05 18:05:59 +02:00
J. Duke
578b7d9671 Merge 2017-07-05 18:05:56 +02:00
J. Duke
c6204fddc8 Merge 2017-07-05 18:05:46 +02:00
J. Duke
c032e73d2d Added tag jdk8-b30 for changeset 23da7804aca0 2017-07-05 18:05:32 +02:00
J. Duke
61bc4ca404 Merge 2017-07-05 18:05:32 +02:00
J. Duke
8e64d3b166 Merge 2017-07-05 18:05:29 +02:00
J. Duke
3559695d9d Merge 2017-07-05 18:05:23 +02:00
J. Duke
07c15d0cad Merge 2017-07-05 18:05:17 +02:00
J. Duke
1933fdced6 Merge 2017-07-05 18:05:13 +02:00
J. Duke
75eddf94d1 Merge 2017-07-05 18:05:09 +02:00
J. Duke
bc6de0086a Merge 2017-07-05 18:04:57 +02:00
J. Duke
e989f7c362 Added tag jdk8-b29 for changeset e070119aa56e 2017-07-05 18:04:46 +02:00
J. Duke
651770b5df Merge 2017-07-05 18:04:46 +02:00
J. Duke
cb0a4b76f5 Merge 2017-07-05 18:04:42 +02:00
J. Duke
e7ceea1e53 Merge 2017-07-05 18:04:37 +02:00
J. Duke
2a504c4c16 Merge 2017-07-05 18:04:27 +02:00
J. Duke
e1d1a88f95 Merge 2017-07-05 18:04:20 +02:00
J. Duke
60349d25cd Merge 2017-07-05 18:04:18 +02:00
J. Duke
dfc4b7f412 Merge 2017-07-05 18:04:10 +02:00
J. Duke
8e4345a87e Added tag jdk8-b28 for changeset 16ba58282d11 2017-07-05 18:03:57 +02:00
J. Duke
abf322bf84 Merge 2017-07-05 18:03:56 +02:00
J. Duke
0c48f0d65b Merge 2017-07-05 18:03:54 +02:00
J. Duke
3e199d591f Merge 2017-07-05 18:03:50 +02:00
J. Duke
02991139fb Merge 2017-07-05 18:03:46 +02:00
J. Duke
f3b8781442 Merge 2017-07-05 18:03:43 +02:00
J. Duke
8feafa20cf Merge 2017-07-05 18:03:39 +02:00
J. Duke
abc61ba12d Merge 2017-07-05 18:03:34 +02:00
J. Duke
111563dc52 Added tag jdk8-b27 for changeset c51754cddc03 2017-07-05 18:03:21 +02:00
J. Duke
2b7ba88d55 Merge 2017-07-05 18:03:20 +02:00
J. Duke
7460f5d8f2 Merge 2017-07-05 18:03:17 +02:00
J. Duke
2fd7bebdb7 Merge 2017-07-05 18:03:12 +02:00
J. Duke
4f54772a87 Merge 2017-07-05 18:03:08 +02:00
J. Duke
f6211bc171 Merge 2017-07-05 18:03:04 +02:00
J. Duke
2bfd92234d Merge 2017-07-05 18:03:01 +02:00
J. Duke
c38cb52efd Merge 2017-07-05 18:02:51 +02:00
J. Duke
96b24787fb Added tag jdk8-b26 for changeset 6c805d8ed4e5 2017-07-05 18:02:34 +02:00
J. Duke
6f539c5cf9 Merge 2017-07-05 18:02:34 +02:00
J. Duke
f81d1132c9 Merge 2017-07-05 18:02:31 +02:00
J. Duke
beb9aa52b3 Merge 2017-07-05 18:02:28 +02:00
J. Duke
e6a321c094 Merge 2017-07-05 18:02:25 +02:00
J. Duke
4ebc538931 Merge 2017-07-05 18:02:22 +02:00
J. Duke
3d033b4e18 Merge 2017-07-05 18:02:19 +02:00
J. Duke
5a5a67d337 Merge 2017-07-05 18:02:16 +02:00
J. Duke
59653c4b36 Added tag jdk8-b25 for changeset 0071a6d64113 2017-07-05 18:02:06 +02:00
J. Duke
69efabad3d Merge 2017-07-05 18:02:06 +02:00
J. Duke
01f717df41 Merge 2017-07-05 18:02:03 +02:00
J. Duke
5803a72162 Merge 2017-07-05 18:01:59 +02:00
J. Duke
6b57ff42fd Merge 2017-07-05 18:01:55 +02:00
J. Duke
448b1098db Merge 2017-07-05 18:01:52 +02:00
J. Duke
0b3b3b9ed6 Merge 2017-07-05 18:01:49 +02:00
J. Duke
c98aa66173 Merge 2017-07-05 18:01:38 +02:00
J. Duke
afcf500d46 Added tag jdk8-b24 for changeset 7d3720d8c595 2017-07-05 18:01:24 +02:00
J. Duke
6e913f4649 Merge 2017-07-05 18:01:24 +02:00
J. Duke
190aa531e4 Merge 2017-07-05 18:01:20 +02:00
J. Duke
9b31b837e2 Merge 2017-07-05 18:01:17 +02:00
J. Duke
199810bcd9 Merge 2017-07-05 18:01:14 +02:00
J. Duke
df63d80a19 Merge 2017-07-05 18:01:11 +02:00
J. Duke
59a52a797c Merge 2017-07-05 18:01:09 +02:00
J. Duke
1ef600adbd Merge 2017-07-05 18:01:07 +02:00
J. Duke
1cbd6b266b Added tag jdk8-b23 for changeset 498124337041 2017-07-05 18:00:53 +02:00
J. Duke
f48f666a63 Merge 2017-07-05 18:00:52 +02:00
J. Duke
a6957aa760 Merge 2017-07-05 18:00:49 +02:00
J. Duke
20fa9b2cc4 Merge 2017-07-05 18:00:45 +02:00
J. Duke
f973f48305 Merge 2017-07-05 18:00:42 +02:00
J. Duke
42525fd863 Merge 2017-07-05 18:00:38 +02:00
J. Duke
f48b1f2e8f Merge 2017-07-05 18:00:35 +02:00
J. Duke
aa612222bd Merge 2017-07-05 18:00:25 +02:00
J. Duke
44e95b7411 Added tag jdk8-b22 for changeset e8f03541af27 2017-07-05 18:00:12 +02:00
J. Duke
a077a5878c Merge 2017-07-05 18:00:12 +02:00
J. Duke
c1cefe0e75 Merge 2017-07-05 18:00:09 +02:00
J. Duke
b77e6762c8 Merge 2017-07-05 18:00:06 +02:00
J. Duke
080c64de24 Merge 2017-07-05 18:00:03 +02:00
J. Duke
baa27d9142 Merge 2017-07-05 18:00:00 +02:00
J. Duke
8eab35131e Merge 2017-07-05 17:59:57 +02:00
J. Duke
6937df0b31 Merge 2017-07-05 17:59:55 +02:00
J. Duke
ce4cb9925d Added tag jdk8-b21 for changeset b3a426170188 2017-07-05 17:59:32 +02:00
J. Duke
4c1a2f6b6e Merge 2017-07-05 17:59:32 +02:00
J. Duke
73cad1123e Merge 2017-07-05 17:59:29 +02:00
J. Duke
e3d70c337d Merge 2017-07-05 17:59:24 +02:00
J. Duke
5adb3a81b5 Merge 2017-07-05 17:59:21 +02:00
J. Duke
dd07ab44f6 Merge 2017-07-05 17:59:18 +02:00
J. Duke
c1d96f4a1f Merge 2017-07-05 17:59:15 +02:00
J. Duke
671f8109d4 Merge 2017-07-05 17:59:08 +02:00
J. Duke
94654f35c9 Added tag jdk8-b20 for changeset 6561530ea757 2017-07-05 17:59:00 +02:00
J. Duke
0d3829a2c5 Merge 2017-07-05 17:59:00 +02:00
J. Duke
f3cdc9320a Merge 2017-07-05 17:58:57 +02:00
J. Duke
0dad6706b4 Merge 2017-07-05 17:58:55 +02:00
J. Duke
3823449fe8 Merge 2017-07-05 17:58:53 +02:00
J. Duke
30b9725a31 Merge 2017-07-05 17:58:50 +02:00
J. Duke
6942ba4479 Merge 2017-07-05 17:58:47 +02:00
J. Duke
50b734a4d8 Merge 2017-07-05 17:58:42 +02:00
J. Duke
fde11e8b69 Added tag jdk8-b19 for changeset 0ff7113a0882 2017-07-05 17:58:34 +02:00
J. Duke
7afb6b5a4a Merge 2017-07-05 17:58:33 +02:00
J. Duke
9489b894a1 Merge 2017-07-05 17:58:30 +02:00
J. Duke
7c9e12c92e Merge 2017-07-05 17:58:25 +02:00
J. Duke
ac06cc168b Merge 2017-07-05 17:58:20 +02:00
J. Duke
5ace67716d Merge 2017-07-05 17:58:16 +02:00
J. Duke
8692686567 Merge 2017-07-05 17:58:11 +02:00
J. Duke
2a12ca457d Merge 2017-07-05 17:58:02 +02:00
J. Duke
ea434b80ea Added tag jdk8-b18 for changeset 885050364691 2017-07-05 17:57:50 +02:00
J. Duke
c6e510d7a0 Merge 2017-07-05 17:57:50 +02:00
J. Duke
077dc1299b Merge 2017-07-05 17:57:47 +02:00
J. Duke
9482818663 Merge 2017-07-05 17:57:44 +02:00
J. Duke
ce5788b0f2 Merge 2017-07-05 17:57:40 +02:00
J. Duke
e93b135cc8 Merge 2017-07-05 17:57:37 +02:00
J. Duke
f49b12233e Merge 2017-07-05 17:57:33 +02:00
J. Duke
3b915b0d62 Merge 2017-07-05 17:57:28 +02:00
J. Duke
cabbc476d3 Added tag jdk8-b17 for changeset f0eccb294698 2017-07-05 17:57:09 +02:00
J. Duke
0f3b43e31b Merge 2017-07-05 17:57:09 +02:00
J. Duke
e35f40ee3a Merge 2017-07-05 17:57:06 +02:00
J. Duke
2deb777286 Added tag jdk8-b16 for changeset 736a63b854f3 2017-07-05 17:56:45 +02:00
J. Duke
b81c3f5efa Merge 2017-07-05 17:56:44 +02:00
J. Duke
e648855012 Merge 2017-07-05 17:56:41 +02:00
J. Duke
8ba6ed54ec Merge 2017-07-05 17:56:38 +02:00
J. Duke
95988b663c Merge 2017-07-05 17:56:35 +02:00
J. Duke
9d7c1fdb62 Merge 2017-07-05 17:56:33 +02:00
J. Duke
c4c18e2921 Merge 2017-07-05 17:56:31 +02:00
J. Duke
338d1cc8f7 Merge 2017-07-05 17:56:29 +02:00
J. Duke
4fc69c38d0 Added tag jdk8-b15 for changeset b5060eae3b32 2017-07-05 17:56:19 +02:00
J. Duke
469f89911f Merge 2017-07-05 17:56:18 +02:00
J. Duke
89506cf1ed Merge 2017-07-05 17:56:16 +02:00
J. Duke
20a158cf24 Merge 2017-07-05 17:56:12 +02:00
J. Duke
5e969c6129 Merge 2017-07-05 17:56:09 +02:00
J. Duke
9ce5ab0278 Merge 2017-07-05 17:56:06 +02:00
J. Duke
6ee0576ad9 Merge 2017-07-05 17:56:02 +02:00
J. Duke
e9700f0a24 Merge 2017-07-05 17:55:53 +02:00
J. Duke
c0377fea31 Added tag jdk8-b14 for changeset 9ffaa48dbfb0 2017-07-05 17:55:40 +02:00
J. Duke
561f5f44de Merge 2017-07-05 17:55:40 +02:00
J. Duke
31b21fc4a4 Merge 2017-07-05 17:55:37 +02:00
J. Duke
2ee549276e Merge 2017-07-05 17:55:30 +02:00
J. Duke
e29c74a68b Merge 2017-07-05 17:55:25 +02:00
J. Duke
c5aef988e3 Merge 2017-07-05 17:55:22 +02:00
J. Duke
6a22949b3e Merge 2017-07-05 17:55:18 +02:00
J. Duke
e505d059ae Merge 2017-07-05 17:55:05 +02:00
J. Duke
700143865e Added tag jdk8-b13 for changeset 4cc0ef72c812 2017-07-05 17:54:56 +02:00
J. Duke
bf689f8a34 Merge 2017-07-05 17:54:55 +02:00
J. Duke
57c71a917b Merge 2017-07-05 17:54:52 +02:00
J. Duke
624dda638e Merge 2017-07-05 17:54:49 +02:00
J. Duke
9cffae904e Merge 2017-07-05 17:54:46 +02:00
J. Duke
4209b88299 Merge 2017-07-05 17:54:44 +02:00
J. Duke
15ff4f278a Merge 2017-07-05 17:54:41 +02:00
J. Duke
38cfd5d70d Merge 2017-07-05 17:54:35 +02:00
J. Duke
c17726339a Added tag jdk8-b12 for changeset 86db042b3385 2017-07-05 17:54:25 +02:00
J. Duke
55168184d6 Merge 2017-07-05 17:54:24 +02:00
J. Duke
d768df399d Merge 2017-07-05 17:54:21 +02:00
J. Duke
509ced946c Merge 2017-07-05 17:54:16 +02:00
J. Duke
3ffc20bf08 Merge 2017-07-05 17:54:13 +02:00
J. Duke
a2902a562c Merge 2017-07-05 17:54:10 +02:00
J. Duke
3a74e0568f Merge 2017-07-05 17:54:07 +02:00
J. Duke
506300d94d Merge 2017-07-05 17:54:00 +02:00
J. Duke
f5a4ed3bcc Added tag jdk8-b11 for changeset cc1f5ce8e504 2017-07-05 17:53:51 +02:00
J. Duke
7c18f827d7 Merge 2017-07-05 17:53:50 +02:00
J. Duke
a079697817 Merge 2017-07-05 17:53:47 +02:00
J. Duke
7ce6c06c44 Merge 2017-07-05 17:53:44 +02:00
J. Duke
4c4686dd55 Merge 2017-07-05 17:53:42 +02:00
J. Duke
070f6f324c Merge 2017-07-05 17:53:39 +02:00
J. Duke
a161f6e198 Merge 2017-07-05 17:53:36 +02:00
J. Duke
c301513708 Merge 2017-07-05 17:53:32 +02:00
J. Duke
cfec5ad9f9 Added tag jdk8-b10 for changeset f651ce871279 2017-07-05 17:53:21 +02:00
J. Duke
e482d16c43 Merge 2017-07-05 17:53:21 +02:00
J. Duke
754d67857b Merge 2017-07-05 17:53:18 +02:00
J. Duke
f3b42bf53d Merge 2017-07-05 17:53:13 +02:00
J. Duke
e77ad65c04 Merge 2017-07-05 17:53:11 +02:00
J. Duke
111b74d777 Merge 2017-07-05 17:53:08 +02:00
J. Duke
7d9ec688e0 Merge 2017-07-05 17:53:04 +02:00
J. Duke
6540497350 Merge 2017-07-05 17:52:56 +02:00
J. Duke
0324f8cbc8 Added tag jdk8-b09 for changeset fbf3cabc9e3b 2017-07-05 17:52:45 +02:00
J. Duke
1cf5ba0b12 Merge 2017-07-05 17:52:45 +02:00
J. Duke
82145dd2fc Merge 2017-07-05 17:52:42 +02:00
J. Duke
395eada57d Merge 2017-07-05 17:52:39 +02:00
J. Duke
57d29c9d2b Merge 2017-07-05 17:52:37 +02:00
J. Duke
25f958342e Merge 2017-07-05 17:52:35 +02:00
J. Duke
d491a9540c Merge 2017-07-05 17:52:33 +02:00
J. Duke
8b9535d068 Merge 2017-07-05 17:52:30 +02:00
J. Duke
453101c15d Added tag jdk8-b08 for changeset 24ee504f8041 2017-07-05 17:52:22 +02:00
J. Duke
48ad07fd2c Merge 2017-07-05 17:52:21 +02:00
J. Duke
326bf79674 Merge 2017-07-05 17:52:18 +02:00
J. Duke
76edb04f74 Merge 2017-07-05 17:52:13 +02:00
J. Duke
c7e37d5eaf Merge 2017-07-05 17:52:09 +02:00
J. Duke
fa2aecf110 Merge 2017-07-05 17:52:05 +02:00
J. Duke
7945521d98 Merge 2017-07-05 17:52:01 +02:00
J. Duke
ca2669bd2f Merge 2017-07-05 17:51:48 +02:00
J. Duke
933fa3f5aa Added tag jdk8-b07 for changeset bc5710332b29 2017-07-05 17:51:26 +02:00
David Katleman
d3a8c491bf Merge 2012-03-21 12:18:56 -07:00
David Katleman
f3883b4d54 Merge 2012-03-21 12:18:06 -07:00
Erik Joelsson
17888bc3c0 7153266: Adjustments to corba strip property utility (neutral to builds)
Fixes to sync up with jdk8 build-infra project.

Reviewed-by: ohair, tbell, ohrstrom
2012-03-19 13:03:37 -07:00
Alejandro Murillo
587e9b4f49 Added tag hs24-b04 for changeset d87d6ad0b075 2012-03-17 00:10:12 -07:00
Alejandro Murillo
09dcdbe0ff Merge 2012-03-17 00:10:12 -07:00
John Coomes
0192f2b6c8 Merge 2012-03-16 23:45:05 -07:00
James Melvin
c3183e79ed 7130404: [macosx] "os.arch" value should be "x86_64" for compatibility with Apple JDK6
On Mac OS X, align system property "os.arch" with Apple legacy JDKs.  Also, improve os.name string matching by using contains() method instead of .startsWith().

Reviewed-by: dcubed, phh, ohair, katleman
2012-03-16 15:13:22 -04:00
Michael Fang
b29242fed4 Merge 2012-03-15 16:04:28 -07:00
David Katleman
ba57c8f33a Added tag jdk8-b30 for changeset 5fc6bf869751 2012-03-15 15:18:24 -07:00
David Katleman
d87a192fe6 Added tag jdk8-b30 for changeset b1e7314664f0 2012-03-15 15:17:02 -07:00
David Katleman
ed057d7f67 Added tag jdk8-b30 for changeset 75a5a7153772 2012-03-15 15:16:27 -07:00
David Katleman
400aa66520 Added tag jdk8-b30 for changeset a32dddd6ba7c 2012-03-15 15:16:15 -07:00
David Katleman
7a0d223ed6 Added tag jdk8-b30 for changeset aa03c70c8688 2012-03-15 15:15:16 -07:00
David Katleman
a77ac5eb39 Added tag jdk8-b30 for changeset f7f3ea6ae9d7 2012-03-15 15:14:52 -07:00
David Katleman
518ec0c168 Added tag jdk8-b30 for changeset c4732b3f0d31 2012-03-15 15:14:36 -07:00
Yong Jeffrey Huang
b3e79c6c6c Merge 2012-03-14 23:19:52 -07:00
Yong Jeffrey Huang
97292b3883 7085757: Currency Data: ISO 4217 Amendment 152
Reviewed-by: naoto
2012-03-14 23:07:21 -07:00
Serguei Spitsyn
7d0f6b051c 7123170: JCK vm/jvmti/ResourceExhausted/resexh001/resexh00101/ tests fails since 7u4 b02
The JVMTI ResourceExhausted events must be generated in all places where OOME is thrown

Reviewed-by: acorn, coleenp, dcubed, dholmes, dsamersoff, jwilhelm, tonyp
2012-03-14 20:06:48 -07:00
David Katleman
69aa6d19c3 Merge 2012-03-14 13:50:37 -07:00
David Katleman
42fca8fd3a Merge 2012-03-14 13:49:09 -07:00
Michael Fang
cffc4ccb30 Merge 2012-03-14 10:25:15 -07:00
Alexey Ragozin
2c9482428f 7068625: Testing 8 bytes of card table entries at a time speeds up card-scanning
Check clean words instead of clean bytes

Reviewed-by: jcoomes, jmasa, jwilhelm, ysr
2012-03-14 12:49:27 +01:00
Bengt Rutisson
4a2a6ebe99 7152954: G1: Native memory leak during full GCs
Add destructor to TruncatedSeq and call delete when necessary

Reviewed-by: johnc, tonyp
2012-03-13 21:12:53 +01:00
Kelly O'Hair
d92843c4dd Merge 2012-03-12 16:41:49 -07:00
Kelly O'Hair
de7785d2e8 Merge 2012-03-12 16:40:38 -07:00
Nils Eliasson
7b7d3507db 7152957: VM crashes with assert(false) failed: bad AD file
Reviewed-by: kvn, never
2012-03-12 15:28:07 -07:00
Igor Veresov
12b4b456cb 7151089: PS NUMA: NUMA allocator should not attempt to free pages when using SHM large pages
Don't attempt to uncommit SHM-based large pages

Reviewed-by: kvn
2012-03-12 13:12:07 -07:00
Alejandro Murillo
db0efee3d4 7152700: new hotspot build - hs24-b04
Reviewed-by: jcoomes
2012-03-09 13:34:45 -08:00
Alejandro Murillo
b8f2831c68 Added tag hs24-b03 for changeset c1a6253f0d55 2012-03-09 13:08:18 -08:00
Alejandro Murillo
323e3ce5ab Merge 2012-03-09 13:08:18 -08:00
Lana Steuck
d5a7ac9412 Merge 2012-03-09 11:59:26 -08:00
Lana Steuck
ae6769c77d Merge 2012-03-09 11:58:08 -08:00
Lana Steuck
37600f669c Merge 2012-03-09 11:57:06 -08:00
Lana Steuck
b819164293 Merge 2012-03-09 11:56:14 -08:00
Lana Steuck
32109cb7cf Merge 2012-03-09 11:56:06 -08:00
Lana Steuck
8a90e1d979 Merge 2012-03-09 11:55:21 -08:00
Michael Fang
72218042af Merge 2012-03-09 10:23:38 -08:00
Maurizio Cimadamore
f6ee974ac7 7151802: compiler update caused sqe test failed
Fix regression caused by 7144506

Reviewed-by: jjg, dlsmith
2012-03-09 17:10:56 +00:00
Tom Rodriguez
b255b0eccc Merge 2012-03-09 08:34:36 -08:00
Karen Kinnear
a0e6b7797c Merge 2012-03-09 00:28:20 -05:00
David Katleman
7c2e062ccb Added tag jdk8-b29 for changeset cc866298b20c 2012-03-08 20:35:26 -08:00
David Katleman
dd9799aaa2 Added tag jdk8-b29 for changeset cad5cb628235 2012-03-08 20:35:09 -08:00
David Katleman
805065faa4 Added tag jdk8-b29 for changeset 756dbb31c9b0 2012-03-08 20:34:58 -08:00
David Katleman
545c4a7aa7 Added tag jdk8-b29 for changeset c7420b6abb44 2012-03-08 20:34:54 -08:00
David Katleman
9dfe7b710e Added tag jdk8-b29 for changeset 463281379d91 2012-03-08 20:34:29 -08:00
David Katleman
924af8d1c0 Added tag jdk8-b29 for changeset 9bf30f58c4bc 2012-03-08 20:34:25 -08:00
David Katleman
99d808ac37 Added tag jdk8-b29 for changeset c4fd9c6f75fb 2012-03-08 20:34:18 -08:00
Kelly O'Hair
9dad666a66 7152425: Fix copyright notices on 12 files in jaxws
Reviewed-by: mbykov
2012-03-08 18:20:15 -08:00
Lana Steuck
76177f7a48 Merge 2012-03-08 15:26:32 -08:00
Mike Duigou
bbd20b347d 7151595: Disable creation of db demos if NO_DEMOS is specified
Reviewed-by: weijun, dholmes
2012-03-08 13:44:33 -08:00
Lana Steuck
b5a0dffd57 Merge 2012-03-08 14:22:15 -08:00
Lana Steuck
086d1992b6 Merge 2012-03-08 08:19:58 -08:00
Lana Steuck
ac3052168c Merge 2012-03-08 08:18:56 -08:00
Joe Darcy
cf99e1e9f8 7151008: Add library support for repeating annotations in java.lang.annotation
Reviewed-by: mcimadamore, jjg
2012-03-08 08:04:52 -08:00
Michael McMahon
57a9560def 7152186: java.awt.HeadlessException when running AWT apps [macosx]
Reviewed-by: anthony
2012-03-08 14:38:26 +00:00
Daniel D. Daugherty
c8ff3bb0cc 7152206: anti-delta the fix for 7152031
Backout the fix for 7152031; the real bug to be fixed in jdk repo.

Reviewed-by: michaelm
2012-03-08 06:33:26 -08:00
Deepak Bhole
1ee1acb94f 7150392: Linux build breaks with GCC 4.7 due to unrecognized option
Remove -mimpure-text option.

Reviewed-by: ohair, dholmes, phh, andrew
2012-03-08 14:04:44 +00:00
Lana Steuck
69ee813add Merge 2012-03-07 22:40:20 -08:00
Lana Steuck
247874eb43 Merge 2012-03-07 22:36:43 -08:00
Lana Steuck
1a29d97330 Merge 2012-03-07 22:36:38 -08:00
David Holmes
7352937e75 7092140: Test: java/util/concurrent/locks/Lock/TimedAcquireLeak.java fails on SE-E due to -XX:-UsePerfData
Add -XX:+UsePerfData to invocation of exec'd JVM

Reviewed-by: alanb, chegar
2012-03-08 00:46:33 -05:00
Daniel D. Daugherty
ec59e22ec0 7152031: Hotspot needs updated xawt path [macosx]
Update to use the right path on MacOS X.

Reviewed-by: michaelm, jcoomes, amurillo
2012-03-07 14:58:17 -08:00
David Katleman
ebc31d93d9 Merge 2012-03-07 13:47:22 -08:00
David Katleman
1741706a00 Merge 2012-03-07 13:46:18 -08:00
David Katleman
15459fceae Merge 2012-03-07 13:45:18 -08:00
Michael Fang
1ca90839e4 Merge 2012-03-07 10:18:10 -08:00
Pavel Porvatov
304f1400f9 7146377: closed/javax/swing/DataTransfer/4876520/bug4876520.java failed since b08 in jdk 8
Reviewed-by: alexp
2012-03-07 20:07:18 +02:00
Alexander Scherbatiy
5f01fd2c54 7132808: [macosx] closed/javax/swing/JFileChooser/4524490/bug4524490.java fails on MacOS
Reviewed-by: alexp
2012-03-07 17:57:12 +04:00
Fredrik Öhrström
d74cd0bff8 7150579: Moved ant code into a separate package, anttasks
To allow langtools to be built without ant, the ant tasks were moved to a separated package. The packages were also renamed to proper lower case package names.

Reviewed-by: jjg
2012-03-07 13:11:27 +01:00
Weijun Wang
0bc11358bb 6961765: Double byte characters corrupted in DN for LDAP referrals
Reviewed-by: vinnie
2012-03-07 10:15:41 +08:00
Tom Rodriguez
9a93f60e34 7150390: JFR test crashed on assert(_jni_lock_count == count) failed: must be equal
Reviewed-by: dholmes, minqi, kvn, coleenp
2012-03-06 16:32:23 -08:00
Kelly O'Hair
bc113af571 7150322: Stop using drop source bundles in jaxws
Reviewed-by: darcy, ohrstrom
2012-03-06 16:09:35 -08:00
Alan Bateman
3269d85838 7113349: Initial changeset for Macosx port to jdk
Co-authored-by: Alexander Potochkin <alexander.potochkin@oracle.com>
Co-authored-by: Alexander Zuev <alexander.zuev@oracle.com>
Co-authored-by: Andrew Brygin <andrew.brygin@oracle.com>
Co-authored-by: Artem Ananiev <artem.ananiev@oracle.com>
Co-authored-by: Alex Strange <astrange@apple.com>
Co-authored-by: Bino George <bino@apple.com>
Co-authored-by: Christine Lu <christine.lu@oracle.com>
Co-authored-by: David Katleman <david.katleman@oracle.com>
Co-authored-by: David Durrence <david_durrence@apple.com>
Co-authored-by: Dmitry Cherepanov <dmitry.cherepanov@oracle.com>
Co-authored-by: Greg Lewis <glewis@eyesbeyond.com>
Co-authored-by: Kevin Miller <kevin_m_miller@apple.com>
Co-authored-by: Kurt Miller <kurt@intricatesoftware.com>
Co-authored-by: Landon Fuller <landonf@plausiblelabs.com>
Co-authored-by: Leonid Romanov <leonid.romanov@oracle.com>
Co-authored-by: Loefty Walkowiak <loefty@apple.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Naoto Sato <naoto.sato@oracle.com>
Co-authored-by: Philip Race <philip.race@oracle.com>
Co-authored-by: Roger Hoover <rhoover@apple.com>
Co-authored-by: Scott Kovatch <scott.kovatch@oracle.com>
Co-authored-by: Sergey ByloKhov <sergey.bylokhov@oracle.com>
Co-authored-by: Mike Swingler <swingler@apple.com>
Co-authored-by: Tomas Hurka <tomas.hurka@oracle.com>
Reviewed-by: jjh, alanb, dholmes, anthony, ohrstrom, ksrini, jrose, weijun, smarks
2012-03-06 20:34:38 +00:00
Alan Bateman
041b97af42 7113349: Initial changeset for Macosx port to jdk
Co-authored-by: Alexander Potochkin <alexander.potochkin@oracle.com>
Co-authored-by: Alexander Zuev <alexander.zuev@oracle.com>
Co-authored-by: Andrew Brygin <andrew.brygin@oracle.com>
Co-authored-by: Artem Ananiev <artem.ananiev@oracle.com>
Co-authored-by: Alex Strange <astrange@apple.com>
Co-authored-by: Bino George <bino@apple.com>
Co-authored-by: Christine Lu <christine.lu@oracle.com>
Co-authored-by: David Katleman <david.katleman@oracle.com>
Co-authored-by: David Durrence <david_durrence@apple.com>
Co-authored-by: Dmitry Cherepanov <dmitry.cherepanov@oracle.com>
Co-authored-by: Greg Lewis <glewis@eyesbeyond.com>
Co-authored-by: Kevin Miller <kevin_m_miller@apple.com>
Co-authored-by: Kurt Miller <kurt@intricatesoftware.com>
Co-authored-by: Landon Fuller <landonf@plausiblelabs.com>
Co-authored-by: Leonid Romanov <leonid.romanov@oracle.com>
Co-authored-by: Loefty Walkowiak <loefty@apple.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Naoto Sato <naoto.sato@oracle.com>
Co-authored-by: Philip Race <philip.race@oracle.com>
Co-authored-by: Roger Hoover <rhoover@apple.com>
Co-authored-by: Scott Kovatch <scott.kovatch@oracle.com>
Co-authored-by: Sergey ByloKhov <sergey.bylokhov@oracle.com>
Co-authored-by: Mike Swingler <swingler@apple.com>
Co-authored-by: Tomas Hurka <tomas.hurka@oracle.com>
Reviewed-by: jjh, alanb, dholmes, anthony, ohrstrom, ksrini, jrose, weijun, smarks
2012-03-06 20:27:12 +00:00
Alan Bateman
597f277dca 7113349: Initial changeset for Macosx port to jdk
Co-authored-by: Alexander Potochkin <alexander.potochkin@oracle.com>
Co-authored-by: Alexander Zuev <alexander.zuev@oracle.com>
Co-authored-by: Andrew Brygin <andrew.brygin@oracle.com>
Co-authored-by: Artem Ananiev <artem.ananiev@oracle.com>
Co-authored-by: Alex Strange <astrange@apple.com>
Co-authored-by: Bino George <bino@apple.com>
Co-authored-by: Christine Lu <christine.lu@oracle.com>
Co-authored-by: David Katleman <david.katleman@oracle.com>
Co-authored-by: David Durrence <david_durrence@apple.com>
Co-authored-by: Dmitry Cherepanov <dmitry.cherepanov@oracle.com>
Co-authored-by: Greg Lewis <glewis@eyesbeyond.com>
Co-authored-by: Kevin Miller <kevin_m_miller@apple.com>
Co-authored-by: Kurt Miller <kurt@intricatesoftware.com>
Co-authored-by: Landon Fuller <landonf@plausiblelabs.com>
Co-authored-by: Leonid Romanov <leonid.romanov@oracle.com>
Co-authored-by: Loefty Walkowiak <loefty@apple.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Naoto Sato <naoto.sato@oracle.com>
Co-authored-by: Philip Race <philip.race@oracle.com>
Co-authored-by: Roger Hoover <rhoover@apple.com>
Co-authored-by: Scott Kovatch <scott.kovatch@oracle.com>
Co-authored-by: Sergey ByloKhov <sergey.bylokhov@oracle.com>
Co-authored-by: Mike Swingler <swingler@apple.com>
Co-authored-by: Tomas Hurka <tomas.hurka@oracle.com>
Reviewed-by: jjh, alanb, dholmes, anthony, ohrstrom, ksrini, jrose, weijun, smarks
2012-03-06 20:26:03 +00:00
Alan Bateman
4b62ceec81 7113349: Initial changeset for Macosx port to jdk
Co-authored-by: Alexander Potochkin <alexander.potochkin@oracle.com>
Co-authored-by: Alexander Zuev <alexander.zuev@oracle.com>
Co-authored-by: Andrew Brygin <andrew.brygin@oracle.com>
Co-authored-by: Artem Ananiev <artem.ananiev@oracle.com>
Co-authored-by: Alex Strange <astrange@apple.com>
Co-authored-by: Bino George <bino@apple.com>
Co-authored-by: Christine Lu <christine.lu@oracle.com>
Co-authored-by: David Katleman <david.katleman@oracle.com>
Co-authored-by: David Durrence <david_durrence@apple.com>
Co-authored-by: Dmitry Cherepanov <dmitry.cherepanov@oracle.com>
Co-authored-by: Greg Lewis <glewis@eyesbeyond.com>
Co-authored-by: Kevin Miller <kevin_m_miller@apple.com>
Co-authored-by: Kurt Miller <kurt@intricatesoftware.com>
Co-authored-by: Landon Fuller <landonf@plausiblelabs.com>
Co-authored-by: Leonid Romanov <leonid.romanov@oracle.com>
Co-authored-by: Loefty Walkowiak <loefty@apple.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Naoto Sato <naoto.sato@oracle.com>
Co-authored-by: Philip Race <philip.race@oracle.com>
Co-authored-by: Roger Hoover <rhoover@apple.com>
Co-authored-by: Scott Kovatch <scott.kovatch@oracle.com>
Co-authored-by: Sergey ByloKhov <sergey.bylokhov@oracle.com>
Co-authored-by: Mike Swingler <swingler@apple.com>
Co-authored-by: Tomas Hurka <tomas.hurka@oracle.com>
Reviewed-by: jjh, alanb, dholmes, anthony, ohrstrom, ksrini, jrose, weijun, smarks
2012-03-06 20:25:43 +00:00
Alan Bateman
ec8aa63648 7113349: Initial changeset for Macosx port to jdk
Co-authored-by: Alexander Potochkin <alexander.potochkin@oracle.com>
Co-authored-by: Alexander Zuev <alexander.zuev@oracle.com>
Co-authored-by: Andrew Brygin <andrew.brygin@oracle.com>
Co-authored-by: Artem Ananiev <artem.ananiev@oracle.com>
Co-authored-by: Alex Strange <astrange@apple.com>
Co-authored-by: Bino George <bino@apple.com>
Co-authored-by: Christine Lu <christine.lu@oracle.com>
Co-authored-by: David Katleman <david.katleman@oracle.com>
Co-authored-by: David Durrence <david_durrence@apple.com>
Co-authored-by: Dmitry Cherepanov <dmitry.cherepanov@oracle.com>
Co-authored-by: Greg Lewis <glewis@eyesbeyond.com>
Co-authored-by: Kevin Miller <kevin_m_miller@apple.com>
Co-authored-by: Kurt Miller <kurt@intricatesoftware.com>
Co-authored-by: Landon Fuller <landonf@plausiblelabs.com>
Co-authored-by: Leonid Romanov <leonid.romanov@oracle.com>
Co-authored-by: Loefty Walkowiak <loefty@apple.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Naoto Sato <naoto.sato@oracle.com>
Co-authored-by: Philip Race <philip.race@oracle.com>
Co-authored-by: Roger Hoover <rhoover@apple.com>
Co-authored-by: Scott Kovatch <scott.kovatch@oracle.com>
Co-authored-by: Sergey ByloKhov <sergey.bylokhov@oracle.com>
Co-authored-by: Mike Swingler <swingler@apple.com>
Co-authored-by: Tomas Hurka <tomas.hurka@oracle.com>
Reviewed-by: jjh, alanb, dholmes, anthony, ohrstrom, ksrini, jrose, weijun, smarks
2012-03-06 20:25:18 +00:00
Maurizio Cimadamore
271ed603e1 7148556: Implementing a generic interface causes a public clone() to become inaccessible
Implementation of Resolve.isOverriddenIn() should distinguish between classes/interfaces

Reviewed-by: jjg
2012-03-06 16:50:32 +00:00
Maurizio Cimadamore
6acf436edc 7151070: NullPointerException in Resolve.isAccessible
Spurious accessibility check in TransTypes

Reviewed-by: jjg
2012-03-06 16:48:29 +00:00
Maurizio Cimadamore
954444af1c 7133238: Merge proto-kind and proto-type into a single result class
Restructure attribution code so that the check-logic can be encapsulated into a single class

Reviewed-by: jjg, dlsmith
2012-03-06 13:29:45 +00:00
Maurizio Cimadamore
d5036d16cd 7144506: Attr.checkMethod should be called after inference variables have been fixed
Unify post-inference sanity check with Attr.checkMethod

Reviewed-by: jjg, dlsmith
2012-03-06 13:28:05 +00:00
Maurizio Cimadamore
21312c5617 7148622: Some diagnostic methods do not go through Log.report
Deferred lint diagnostics ignore Log settings such as deferred diagnostics

Reviewed-by: jjg
2012-03-06 13:26:36 +00:00
Weijun Wang
bba69953cd 7149012: jarsigner needs not warn about cert expiration if the jar has a TSA timestamp
Reviewed-by: xuelei
2012-03-06 10:25:45 +08:00
Nils Eliasson
36efb40d10 6658428: C2 doesn't inline java method if corresponding intrinsic failed to inline
Allow fallback to non-intrinsic inline case

Reviewed-by: kvn, jrose, never
2012-03-05 18:10:31 -08:00
Kurchi Subhra Hazra
4264d66e09 7151348: Build breaks due to warning clean up in sun.rmi.*(7146763)
Undo changes to sun/rmi/rmic/* commited as fix for 7146763

Reviewed-by: smarks
2012-03-05 17:38:01 -08:00
Lana Steuck
1e46927bba Merge 2012-03-05 17:04:48 -08:00
Lana Steuck
d3d427483f Merge 2012-03-05 17:04:10 -08:00
Lana Steuck
33b2586062 Merge 2012-03-05 17:02:11 -08:00
Bengt Rutisson
a77a5ac2a0 Merge 2012-03-05 22:34:18 +01:00
Dean Long
98f297ba23 7150046: SIGILL on sparcv9 fastdebug
Breakpoint needs to do 64-bit compare for pointers on sparcv9

Reviewed-by: coleenp, never
2012-03-05 14:19:00 -05:00
Phil Race
3f9a51509a 7078053: Solaris JDK build: C compiler writing tmp files into the make tree
Reviewed-by: ohair, alanb
2012-03-05 09:33:44 -08:00
Vinnie Ryan
92e8e7960b Merge 2012-03-05 14:15:01 +00:00
Vinnie Ryan
594e178180 7151109: backout CR 6988842
Reviewed-by: mullan
2012-03-05 14:13:29 +00:00
Sergey Malenkov
0f708d90df 7148143: PropertyChangeSupport.addPropertyChangeListener can throw ClassCastException
Reviewed-by: rupashka
2012-03-05 18:01:13 +04:00
Alexander Scherbatiy
a70c2d02ad 7130521: [macosx] closed/javax/swing/JMenuItem/6209975/bug6209975.java failed on macosx
Reviewed-by: rupashka
2012-03-05 16:46:38 +04:00
Kelly O'Hair
13c4ad8e20 7150324: Stop using drop bundles in jaxp
Reviewed-by: prr, joehw
2012-03-04 11:55:34 -08:00
Chris Hegarty
2d9226ff60 7145043: HttpServerProvider.java:81: warning - @code("httpServerProvider") is an unknown tag
Reviewed-by: michaelm
2012-03-04 07:41:34 +00:00
John Coomes
2d0d3e1f63 7150899: remove unused build.targets lines from jprt.properties
Reviewed-by: ohair
2012-03-03 12:45:10 -08:00
John Coomes
20beadbcb1 7150454: add release jdk7u4 to jprt.properties
Reviewed-by: ohair, never
2012-03-03 12:36:35 -08:00
Alejandro Murillo
95bc08f56b 7150327: new hotspot build - hs24-b03
Reviewed-by: jcoomes
2012-03-02 16:56:19 -08:00
Alejandro Murillo
ec659dc825 Added tag hs24-b02 for changeset 6cf227da58e6 2012-03-02 16:27:09 -08:00
Alejandro Murillo
aae19fd69c Merge 2012-03-02 16:27:09 -08:00
Kelly O'Hair
dc71b40a5f 6625113: Add the normalize and rmkw perl script to the openjdk repository or openjdk site?
Reviewed-by: darcy
2012-03-02 15:33:42 -08:00
Kurchi Subhra Hazra
0006ef0cc8 7146763: Warnings cleanup in the sun.rmi and related packages
Cleanup warnings and use jkd7 features in sun.rmi.*

Reviewed-by: smarks, chegar, forax, dmocek
2012-03-02 13:48:43 -08:00
Tom Rodriguez
2e8a110092 Merge 2012-03-02 13:13:25 -08:00
Bill Pittore
0aeb9d9a62 Merge 2012-03-02 14:34:55 -05:00
John Cuthbertson
4bcab49b68 7147806: G1: Crash in vm bootstrap when running with -XX:+UseG1GC -XX:-UsePerfData
Update generation and collector counters only if UsePerfData is enabled.

Reviewed-by: iveresov, tonyp
2012-03-02 10:36:16 -08:00
Michael Fang
a6a7ed5f8c Merge 2012-03-02 10:19:23 -08:00
Vinnie Ryan
1e3b108ef9 6988842: jce/ECC test fails for SunPKCS11 provider using nss library
Reviewed-by: mullan
2012-03-02 17:24:08 +00:00
Tom Rodriguez
dac856d4f2 Merge 2012-03-02 09:13:13 -08:00
Roland Westrelin
607f822b20 6910464: Lookupswitch and Tableswitch default branches not recognized as safepoints
C1 does not recognize the default branch of a lookupswitch or tableswitch bytecode to be a safepoint if backward.

Reviewed-by: kvn, never
2012-03-02 16:04:24 +01:00
Maurizio Cimadamore
2ba2192f6f 7148164: attribution code for diamond should not rely on mutable state
Update attribution code for diamond operator not to rely on mutable state

Reviewed-by: jjg
2012-03-02 12:58:35 +00:00
Maurizio Cimadamore
b10e766b73 7148242: Regression: valid code rejected during generic type well-formedness check
Redundant type-var substitution makes generic-type well-formedness check to fail

Reviewed-by: jjg
2012-03-02 12:57:47 +00:00
Maurizio Cimadamore
f01bc46dfe 7132880: Resolve should support nested resolution contexts
Overload resolution routine should be updated so that it can be called recursively

Reviewed-by: jjg, dlsmith
2012-03-02 12:57:04 +00:00
Alexander Kouznetsov
e44e04a5f5 7130241: [macosx] TransparentRuler demo can not run due to lacking of perpixel transparency support
Reviewed-by: art
2012-03-02 12:24:35 +02:00
Tom Rodriguez
7c2b3c6ab5 7150051: incorrect oopmap in critical native
Reviewed-by: kvn, twisti
2012-03-01 15:31:33 -08:00
David Katleman
2c85ca538e Added tag jdk8-b28 for changeset 6a9e1767fc90 2012-03-01 12:23:33 -08:00
David Katleman
0c33720da2 Added tag jdk8-b28 for changeset cb1d70aa45ad 2012-03-01 12:23:25 -08:00
David Katleman
05b0b4f2ae Added tag jdk8-b28 for changeset 1eae1ee06752 2012-03-01 12:23:20 -08:00
David Katleman
0ca13f7ff6 Added tag jdk8-b28 for changeset afee4474f087 2012-03-01 12:23:19 -08:00
David Katleman
d144cbfe09 Added tag jdk8-b28 for changeset b99bec991962 2012-03-01 12:23:13 -08:00
David Katleman
ef3de8e1f7 Added tag jdk8-b28 for changeset ecb426820bba 2012-03-01 12:23:07 -08:00
David Katleman
3669ad06b0 Added tag jdk8-b28 for changeset 6446faed7091 2012-03-01 12:23:01 -08:00
Mike Duigou
9c64402c80 7149320: Move sun.misc.VM.booted() to the end of System.initializeSystemClass()
Ensure that sun.misc.VM.booted() is the last action in System.initSystemClass()

Reviewed-by: dholmes, alanb
2012-03-01 09:40:18 -08:00
Pavel Tisnovsky
f4e81d2e19 7149785: Minor corrections to ScriptEngineManager javadoc
JavaDoc correction

Reviewed-by: alanb
2012-03-01 14:02:44 +01:00
Dmitry Samersoff
3385cfe8cf 7118280: The gbyc00102 JCK7 test causes an assert in JVM 7.0 fastdebug mode
Assert doesn't respect invokedynamic opcode

Reviewed-by: dcubed, phh
2012-03-01 12:41:13 +04:00
Lana Steuck
00d35d412b Merge 2012-02-29 12:30:55 -08:00
Lana Steuck
4a304171a6 Merge 2012-02-29 12:29:20 -08:00
Michael Fang
1acef3bef8 Merge 2012-02-29 10:18:21 -08:00
Dean Long
9cd12c0bcd 7142641: -Xshared:on fails on ARM
Map read-only pages MAP_PRIVATE instead of MAP_SHARED

Reviewed-by: dcubed, dholmes
2012-02-29 12:58:49 -05:00
Kumar Srinivasan
8f5b808cfe 7148499: Stack size in tools/launcher/Settings.java needs to be increased
Reviewed-by: alanb
2012-02-29 08:20:33 -08:00
Alexander Scherbatiy
cbf5f3e4de 7133573: [macosx] closed/javax/swing/JToolTip/4846413/bug4846413.java fails on MacOS
Reviewed-by: alexp
2012-02-29 18:47:39 +04:00
Lana Steuck
45f7bb6a9f Merge 2012-02-28 19:55:09 -08:00
Lana Steuck
45a7449ceb Merge 2012-02-28 18:04:50 -08:00
Lana Steuck
b697d670cb Merge 2012-02-28 18:01:54 -08:00
Lana Steuck
ee1b80e8e5 Merge 2012-02-28 17:54:33 -08:00
Lana Steuck
30c157894d Merge 2012-02-28 17:52:05 -08:00
Joe Darcy
81b0f3f5c0 7149626: (reflect) Improve javadoc of java.lang.reflect.Executable
Reviewed-by: mduigou
2012-02-28 13:14:47 -08:00
Sonali Goel
959e0b9dfb 7147183: test/tools/javac/apt.sh can be removed from tl/langtools repository
Reviewed-by: jjg
2012-02-28 10:48:04 -08:00
Jonathan Gibbons
9c503c5689 7093891: support multiple task listeners
Reviewed-by: darcy, mcimadamore
2012-02-28 10:33:49 -08:00
Jonathan Gibbons
5707f715aa 7144951: fix minor javadoc issues
Reviewed-by: darcy
2012-02-28 10:25:53 -08:00
Frederic Parain
555b593770 Merge 2012-02-28 07:58:43 -08:00
Dmitry Samersoff
14732a0d27 7149181: sun/management/jmxremote/startstop/JMXStartStopTest.sh failing on all platforms
Disable test until JDK and hotspot changes meet each other.

Reviewed-by: alanb, acorn
2012-02-28 17:00:28 +04:00
Roland Westrelin
ff47163220 6910461: Register allocator may insert spill code at wrong insertion index
When resolving exception edges after register allocation, the C1 register allocator may insert spill code at the wrong insertion position.

Reviewed-by: kvn, never
2012-02-28 09:13:58 +01:00
Tom Rodriguez
825a304b38 7145024: Crashes in ucrypto related to C2
Reviewed-by: kvn
2012-02-28 10:04:01 -08:00
Mike Duigou
0193199d57 7143162: Allow disable building of jdk demos and samples
Reviewed-by: ohair
2012-02-27 18:10:03 -08:00
Mike Duigou
2f6d883fcb 7143162: Allow disable building of jdk demos and samples
Reviewed-by: ohair
2012-02-27 18:09:47 -08:00
Sean Mullan
fd805805a8 Merge 2012-02-27 13:53:25 -05:00
Sean Mullan
48ca85ec46 7147830: NullPointerException in java.security.Policy.implies() when the ProtectionDomain has a null code sou
Reviewed-by: vinnie
2012-02-27 11:44:50 -05:00
Dmitry Samersoff
fe4588a87e 7110104: It should be possible to stop and start JMX Agent at runtime
Added a capability to start and stop JMX Agent by jcmd

Reviewed-by: acorn, mchung
2012-02-27 15:21:18 +04:00
Roland Westrelin
c815908774 7148486: At a method handle call returning with an exception may call the runtime with misaligned stack (x64)
Stack must be realigned when calling the runtime for exception propagation at a call.

Reviewed-by: kvn, never
2012-02-27 11:42:30 +01:00
Roland Westrelin
4012f6cd34 7147740: add assertions to check stack alignment on VM entry from generated code (x64)
Check stack alignment on VM entry on x64.

Reviewed-by: kvn, never
2012-02-27 09:17:44 +01:00
Alan Bateman
6d519d366e 7148921: More ProblemList updates (2/2012)
Reviewed-by: chegar
2012-02-26 17:25:42 +00:00
Michael Fang
5ced594638 Merge 2012-02-25 10:19:26 -08:00
Krystal Mok
84470be578 7148126: ConstantPoolCacheEntry::print prints to wrong stream
Should print to passed in stream not tty

Reviewed-by: dholmes, never
2012-02-25 01:49:34 -05:00
Lana Steuck
9791a38e93 Merge 2012-02-24 18:24:53 -08:00
Lana Steuck
1443b70f4d Merge 2012-02-24 18:24:03 -08:00
Lana Steuck
ac825d35af Merge 2012-02-24 18:22:57 -08:00
Lana Steuck
a3cd82292c Merge 2012-02-24 18:22:55 -08:00
Lana Steuck
c8bd932ff3 Merge 2012-02-24 18:22:48 -08:00
Lana Steuck
8f952922ba Merge 2012-02-24 18:22:44 -08:00
Alejandro Murillo
fafe66921e 7148664: new hotspot build - hs24-b02
Reviewed-by: jcoomes
2012-02-24 18:14:00 -08:00
Alejandro Murillo
7f5093d00d Added tag hs24-b01 for changeset b357c6ebe63e 2012-02-24 18:08:59 -08:00
Alejandro Murillo
a8f637446d Merge 2012-02-24 18:08:58 -08:00
Lana Steuck
f46ebab88c Merge 2012-02-24 17:38:24 -08:00
Abhijit Saha
c3da3a5048 7148758: Resolve merge issue which caused testcase failure
Reviewed-by: alanb, chegar
2012-02-24 17:31:59 -08:00
Vladimir Kozlov
9c6ab6372f 7147416: LogCompilation tool does not work with post parse inlining
Fixed few problems in LogCompilation parser.

Reviewed-by: never
2012-02-24 12:33:31 -08:00
Staffan Larsen
17f17157b9 7079093: TEST_BUG: java/lang/instrument/ManifestTest.sh fails with cygwin
Work around problems in some cygwin installations

Reviewed-by: alanb, sspitsyn
2012-02-24 20:09:49 +01:00
Staffan Larsen
399194bb7a 7073626: RmiBootstrapTest.sh and RmiSslBootstrapTest.sh fail under Cygwin
Detect and handle cygwin correctly

Reviewed-by: alanb, sspitsyn
2012-02-24 20:02:50 +01:00
Jonathan Gibbons
a46962c4c1 7137836: tidy up Names.java
Reviewed-by: mcimadamore
2012-02-24 10:40:32 -08:00
Phil Race
8694cd7c62 7147584: Changing to Nimbus/GTK in SwingSet2 on Solaris 10 Sparc causes malformed menus/layout
Reviewed-by: igor, jgodinez
2012-02-24 09:37:01 -08:00
Oleg Pekhovskiy
d76f84108f 7145980: Dispose method of window.java takes long
Reviewed-by: anthony
2012-02-24 13:50:37 +04:00
Sean Coffey
cecb628970 7144488: Infinite recursion for some equals tests in Collections
Reviewed-by: alanb, dholmes, mduigou
2012-02-24 09:17:46 +00:00
Sean Coffey
27720df27a 7133138: Improve io performance around timezone lookups
Reviewed-by: okutsu
2012-02-24 09:10:27 +00:00
Bill Pittore
ee795ec927 Merge 2012-02-23 21:10:02 -05:00
David Katleman
9d978102bc Added tag jdk8-b27 for changeset bc664cc5f2a0 2012-02-23 12:03:30 -08:00
David Katleman
7835898d92 Added tag jdk8-b27 for changeset 020ee18d16db 2012-02-23 12:03:21 -08:00
David Katleman
5e6beee12c Added tag jdk8-b27 for changeset 0b1b48f6f78d 2012-02-23 12:03:17 -08:00
David Katleman
076a67b1bf Added tag jdk8-b27 for changeset 4506e41cb329 2012-02-23 12:03:16 -08:00
David Katleman
158427237e Added tag jdk8-b27 for changeset 30cf3316d124 2012-02-23 12:03:08 -08:00
David Katleman
663327f408 Added tag jdk8-b27 for changeset 96028882c1dc 2012-02-23 12:03:03 -08:00
David Katleman
aebf95f6f2 Added tag jdk8-b27 for changeset 9f0948ea25eb 2012-02-23 12:03:01 -08:00
Joe Darcy
de52238d06 7148025: javac should not warn about InterrupttedException on the declaration of AutoCloseable itself
Reviewed-by: mcimadamore
2012-02-23 09:53:09 -08:00
Lana Steuck
9c6aee1cdf Merge 2012-02-23 07:54:49 -08:00
Lana Steuck
668e9414d8 Merge 2012-02-23 07:53:54 -08:00
Mikael Gerdin
27c0786c3b 7148152: Add whitebox testing API to HotSpot
Add an internal testing API to HotSpot to enable more targeted testing of vm functionality

Reviewed-by: phh, dholmes
2012-02-23 14:58:35 +01:00
Lana Steuck
cd51c0ed25 Merge 2012-02-23 00:14:45 -08:00
Lana Steuck
b9d5b5cf10 Merge 2012-02-23 00:14:15 -08:00
Lana Steuck
bf8b18f80e Merge 2012-02-22 22:09:53 -08:00
Lana Steuck
ab549924e8 Merge 2012-02-22 16:52:50 -08:00
Michael Fang
b745ee2833 Merge 2012-02-22 10:17:57 -08:00
Frederic Parain
79a5197d1d Merge 2012-02-22 08:19:27 -08:00
Pavel Porvatov
942b3e2aae 7107099: JScrollBar does not show up even if there are enough lebgth of textstring in textField
Reviewed-by: alexp
2012-02-22 14:31:13 +04:00
Erik Joelsson
97612e5913 7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
Reviewed-by: dholmes, ohrstrom, ohair, jcoomes
2012-02-22 09:24:35 +01:00
Dmitry Samersoff
12a9f18dcc Merge 2012-02-22 10:32:29 -08:00
Dmitry Samersoff
e1675f98d4 7110104: It should be possible to stop and start JMX Agent at runtime
Added a capability to start and stop JMX Agent by jcmd

Reviewed-by: acorn, mchung
2012-02-22 19:43:22 +04:00
Vladimir Kozlov
22db6951dc 7146442: assert(false) failed: bad AD file
Take into account only stores captured by Initialize node. Added missing check for Top input in value() methods.

Reviewed-by: never
2012-02-21 11:55:05 -08:00
Jiangli Zhou
3e904497b1 7120481: storeStore barrier in constructor with final field
Issue storestore barrier before constructor return if the constructor write final field.

Reviewed-by: dholmes, jrose, roland, coleenp
2012-02-21 13:14:55 -05:00
Bill Pittore
a94cb97f4a Merge 2012-02-22 14:00:34 -05:00
Charles Lee
df18cb7401 7146572: enableInputMethod(false) does not work in the TextArea and TextField on the linux platform
Peers' constructors shouldn't override user's enableInputMethod() settings

Reviewed-by: anthony
2012-02-21 18:15:14 +04:00
Xue-Lei Andrew Fan
e969599750 7147407: remove never used debug code in DnsClient.java
Reviewed-by: vinnie
2012-02-21 05:44:29 -08:00
Alexander Scherbatiy
58de6a8294 7133581: [macosx] closed/javax/swing/JTree/4330357/bug4330357.java fails on MacOS
Reviewed-by: alexp
2012-02-21 15:34:08 +04:00
Alexander Scherbatiy
7bea3e0303 7133571: [macosx] closed/javax/swing/JToolBar/4247996/bug4247996.java fails on MacOS
Reviewed-by: alexp
2012-02-21 15:03:07 +04:00
Alexander Scherbatiy
8326ba3235 7133566: [macosx] closed/javax/swing/JTable/4220171/bug4220171.java fails on MacOS
Reviewed-by: alexp
2012-02-21 14:19:21 +04:00
Weijun Wang
ace6464105 7147336: clarification on warning of keytool -printcrl
Reviewed-by: xuelei
2012-02-21 15:11:27 +08:00
John Coomes
378bc323c2 Added tag hs23-b16 for changeset 1bfc33519320 2012-02-20 22:32:30 -08:00
Krystal Mok
41f7f6302b 7145358: SA throws ClassCastException for partially loaded ConstantPool
In printValueOn() in ConstantPool.java check if the poolHolder is a valid Klass and only then print it.

Reviewed-by: sla, sspitsyn
2012-02-20 21:27:56 -08:00
Weijun Wang
d21a6ce41f 7144530: KeyTab.getInstance(String) no longer handles keyTabNames with "file:" prefix
Reviewed-by: valeriep
2012-02-21 08:51:26 +08:00
Vladimir Kozlov
5f68d9921d 7147064: assert(allocates2(pc)) failed: not in CodeBuffer memory: 0xffffffff778d9d60 <= 0xffffffff778da69c
Increase size of deopt_blob and uncommon_trap_blob by size of stack bang code (SPARC).

Reviewed-by: azeemj, iveresov, never, phh
2012-02-20 13:11:08 -08:00
Vladimir Kozlov
b4cbe82e26 7147064: assert(allocates2(pc)) failed: not in CodeBuffer memory: 0xffffffff778d9d60 <= 0xffffffff778da69c
Increase size of deopt_blob and uncommon_trap_blob by size of stack bang code (SPARC).

Reviewed-by: azeemj, iveresov, never, phh
2012-02-20 13:11:08 -08:00
Alan Bateman
697f151896 7147087: Remove AWT/Swing/client tests from ProblemList
Reviewed-by: ohair
2012-02-20 19:33:32 +00:00
Abhijit Saha
162d75c68c Merge 2012-02-20 11:31:53 -08:00
Alan Bateman
86410b610b 6346658: (se) Selector briefly spins when asynchronously closing a registered channel [win]
Reviewed-by: chegar, coffeys
2012-02-20 18:55:10 +00:00
Charles Lee
2995eff3e3 7146506: (fc) Add EACCES check to the return of fcntl native method
Add EACCES check according to the spec of fcntl

Reviewed-by: alanb
2012-02-20 11:24:06 +08:00
Rémi Forax
d2449123be 7146152: File.path should be final
Reviewed-by: alanb, dholmes, mduigou
2012-02-19 16:51:35 +00:00
Staffan Larsen
d856a7745c 7132070: Use a mach_port_t as the OSThread thread_id rather than pthread_t on BSD/OSX
Change OSThread to use mach thread_t

Reviewed-by: phh, dcubed
2012-02-19 13:11:39 +01:00
Lana Steuck
e76be10b70 Merge 2012-02-18 16:12:28 -08:00
Lana Steuck
9406a69dc0 Merge 2012-02-18 16:11:47 -08:00
Lana Steuck
acce88acb5 Merge 2012-02-18 16:09:11 -08:00
Daniel D. Daugherty
b0b5725863 7145798: System.loadLibrary does not search current working directory
Append "." to java.library.path on MacOS X to ease migration from Apple's Java6 to OpenJDK7.

Reviewed-by: phh, jmelvin, coleenp
2012-02-17 15:55:27 -08:00
Sonali Goel
ed13841255 7143910: test/tools/apt/Basics/apt.sh fails with 'real' sh
Reviewed-by: darcy
2012-02-17 15:24:40 -08:00
Alejandro Murillo
a908ea8cb5 7146700: new hotspot build - hs24-b01
Reviewed-by: jcoomes
2012-02-17 15:11:32 -08:00
Alejandro Murillo
be21bbbc25 Added tag hs23-b16 for changeset e545d7e1f01e 2012-02-17 15:06:39 -08:00
Alejandro Murillo
c96c4e3fa4 Merge 2012-02-17 15:06:38 -08:00
Abhijit Saha
136be0dd92 Merge 2012-02-17 14:59:41 -08:00
Abhijit Saha
f83ca6dc04 Merge 2012-02-17 14:59:21 -08:00
Abhijit Saha
fa4cc616ff Merge 2012-02-17 14:59:02 -08:00
Abhijit Saha
1fcb6f273a Merge 2012-02-17 14:58:41 -08:00
Abhijit Saha
fc6c57d330 Merge 2012-02-17 14:58:24 -08:00
Tom Rodriguez
7a1487a726 Merge 2012-02-17 12:18:52 -08:00
Tom Rodriguez
0d25b8c4d5 7146729: nightly failure after 7141200: tty is sometimes null during shutdown of main thread
Reviewed-by: kvn
2012-02-17 12:18:10 -08:00
Michael Fang
1f8b7c2711 Merge 2012-02-17 10:18:50 -08:00
Frederic Parain
7ded1f054b Merge 2012-02-17 06:34:49 -08:00
Stefan Karlsson
7daca4fc60 Merge 2012-02-17 13:23:29 +01:00
Xueming Shen
1b32c44aa3 4153167: separate between ANSI and OEM code pages on Windows
To use OEM code page for System.out&err when not redirected

Reviewed-by: alanb
2012-02-16 22:13:10 -08:00
Vladimir Kozlov
867f3ba889 7145346: VerifyStackAtCalls is broken
Replace call_epilog() encoding with macroassembler use. Moved duplicated code to x86.ad. Fixed return_addr() definition.

Reviewed-by: never
2012-02-16 17:12:49 -08:00
Coleen Phillimore
c82d4105ec Merge 2012-02-16 17:19:40 -05:00
John Coomes
5f0143a774 6330863: vm/gc/InfiniteList.java fails intermittently due to timeout
In some cases, allocate from the old gen before doing a full gc

Reviewed-by: stefank, jmasa
2012-02-16 13:13:53 -08:00
John Coomes
6827f384c9 7146343: PS invoke methods should indicate the type of gc done
Reviewed-by: stefank, jmasa
2012-02-16 13:12:25 -08:00
David Katleman
30b3953b45 Added tag jdk8-b26 for changeset 90bc745052c7 2012-02-16 13:01:46 -08:00
David Katleman
d3539e79ca Added tag jdk8-b26 for changeset a9b4578da2a8 2012-02-16 13:01:36 -08:00
David Katleman
7551efdd70 Added tag jdk8-b26 for changeset b51c748f410d 2012-02-16 13:01:33 -08:00
David Katleman
6a8b78d6db Added tag jdk8-b26 for changeset 1d96f9313a4b 2012-02-16 13:01:32 -08:00
David Katleman
5fa0678ef1 Added tag jdk8-b26 for changeset 70e517098d81 2012-02-16 13:01:24 -08:00
David Katleman
36725334b1 Added tag jdk8-b26 for changeset b831ee8beaf8 2012-02-16 13:01:19 -08:00
David Katleman
10397e5d0e Added tag jdk8-b26 for changeset d771ef859fba 2012-02-16 13:01:17 -08:00
James Melvin
ac2ed39761 7146354: Re-enable Compressed OOPs after 7118647 is resolved
Relax the assertion to simply check for COOP mode rather than an exact address.

Reviewed-by: coleenp, kvn, phh, dcubed
2012-02-16 15:52:01 -05:00
Roger Riggs
ac69a5f84a 6708398: Support integer overflow
Added add/sub/multiply/toIntExact methods to j.l.Math and StrictMath classes

Reviewed-by: emcmanus
2012-02-16 11:43:20 -08:00
Tom Rodriguez
9e339b8ded 7144318: GCLocker assert failure: assert(_needs_gc || SafepointSynchronize::is_at_safepoint(
Reviewed-by: kvn, twisti
2012-02-16 11:33:49 -08:00
Paul Hohensee
f33961a1df 7142113: Add Ivy Bridge to the known Intel x86 cpu families
In vm_version_x86.hpp, add and use CPU_MODEL_IVYBRIDGE_EP, and restrict is_intel_tsc_synced_at_init() to EP models.

Reviewed-by: kvn, acorn
2012-02-16 13:50:54 -05:00
Sean Chou
40d87232e6 7089914: Focus on image icons are not visible in javaws cache with high contrast mode
Reviewed-by: rupashka
2012-02-16 17:42:09 +04:00
Roland Westrelin
cb7dbaebc9 7143038: SIGSEGV in assert_equal / LinearScan::assign_reg_num
Forced exit may destory global objects that are still in use.

Reviewed-by: twisti, never, kvn
2012-02-16 09:20:40 +01:00
Xue-Lei Andrew Fan
4c5ba0d841 7145837: a little performance improvement on the usage of SecureRandom
Reviewed-by: chegar, wetmore
2012-02-15 23:45:17 -08:00
Vladimir Kozlov
539616f85a 7125136: SIGILL on linux amd64 in gc/ArrayJuggle/Juggle29
For C2 moved saving EBP after ESP adjustment. For C1 generated 5 byte nop instruction first if needed.

Reviewed-by: never, twisti, azeemj
2012-02-15 21:37:49 -08:00
Vladimir Danushevsky
a1d2da174b 7129401: PPC: runtime/7100935/TestShortArraycopy.java fails
Pass assembler switches for PPC

Reviewed-by: dholmes
2012-02-15 20:26:59 -05:00
Igor Veresov
24b07e7ae6 7142680: default GC affected by jvm path
Removed old tiered code

Reviewed-by: never, kvn
2012-02-15 16:29:40 -08:00
Lana Steuck
7ca7e599a5 Merge 2012-02-15 15:28:15 -08:00
Lana Steuck
72ce1c5159 Merge 2012-02-15 15:21:33 -08:00
Bill Pittore
f9788f6987 Merge 2012-02-15 16:09:49 -05:00
Igor Veresov
b972e52710 7145345: Code cache sweeper must cooperate with safepoints
Safepoint in the sweeper loop in necessary

Reviewed-by: kvn, never
2012-02-15 12:32:03 -08:00
Nils Loodin
510522ff57 7145243: Need additional specializations for argument parsing framework
Reviewed-by: acorn, fparain
2012-02-15 12:17:30 -08:00
Frederic Parain
a1429e482e 7145925: Removing remote access to diagnostic commands in the HotSpotDiagnosticMBean
Reviewed-by: acorn, mchung, phh
2012-02-15 10:46:55 -08:00
Tom Rodriguez
520f6fcc87 7145537: minor tweaks to LogEvents
Reviewed-by: kvn, twisti
2012-02-15 10:12:55 -08:00
Antonios Printezis
be06406cb8 7132029: G1: mixed GC phase lasts for longer than it should
Revamp of the mechanism that chooses old regions for inclusion in the CSet. It simplifies the code and introduces min and max bounds on the number of old regions added to the CSet at each mixed GC to avoid pathological cases. It also ensures that when we do a mixed GC we'll always find old regions to add to the CSet (i.e., it eliminates the case where a mixed GC will collect no old regions which can happen today).

Reviewed-by: johnc, brutisso
2012-02-15 13:06:53 -05:00
Alan Bateman
5f9a26a009 7145910: Remove dependency on apt and com.sun.mirror API (breaks boot cycle builds)
Reviewed-by: ohair
2012-02-15 17:32:56 +00:00
Frederic Parain
ddaeb8933c 7144833: sun/tools/jcmd/jcmd-Defaults.sh failing intermittently
Reviewed-by: alanb
2012-02-15 09:29:05 -08:00
Sean Mullan
191116a62e Merge 2012-02-15 07:52:58 -05:00
Sean Mullan
5977a2d6a7 7024604: OID.1 causes IAE in X500Principal constructor
Reviewed-by: vinnie
2012-02-15 07:45:42 -05:00
Roland Westrelin
e6f3ba89ec 7126041: jdk7u4 b05 and b06 crash with RubyMine 3.2.4, works well with b04
Goto that replaces a If mistaken to be a back branch and triggers erroneous OSR compilation.

Reviewed-by: never, iveresov
2012-02-15 09:43:16 +01:00
Yumin Qi
db677a6f75 Merge 2012-02-14 23:50:12 -08:00
Dean Long
479baa64e5 7140866: assert(covered) failed: Card for end of new region not committed
Resize covered region only after successfully mapping shared archive

Reviewed-by: brutisso, ysr
2012-02-15 00:51:07 -05:00
Keith McGuigan
1f8105e44c Merge 2012-02-15 00:09:31 -05:00
Yumin Qi
3869025575 Merge 2012-02-14 20:54:57 -08:00
Serguei Spitsyn
c25eebd321 7130993: nsk/jdi/ReferenceType/instances/instances004 fails with JFR: assert(ServiceUtil::visible_oop(obj))
Skip reporting invisible refs in iterate_over_object to avoid assert(ServiceUtil::visible_oop(obj))

Reviewed-by: dcubed, mgronlun, rbackman
2012-02-14 17:04:40 -08:00
Keith McGuigan
ccebd55230 7145589: First JSDT provider creation fails
0 is a successful return from an ioctl() call

Reviewed-by: dcubed, phh, dsamersoff
2012-02-14 20:02:19 -05:00
Tom Rodriguez
f9b7a3e692 7143061: nsk/stress/stack/b4525850 crash VM
Reviewed-by: kvn, twisti
2012-02-14 15:43:56 -08:00
Jan Lahoda
3887a6d012 7142086: performance problem in Check.checkOverrideClashes(...)
Code in Check.checkOverrideClashes() causes too many calls to MethodSymbol.overrides

Reviewed-by: jjg
2012-02-14 15:43:52 -08:00
Coleen Phillimore
4bd7be25df Merge 2012-02-14 18:35:19 -05:00
David Buck
1d56fdab49 7143612: improve backwards compatibility of OSIS post-CR6887286
Reviewed-by: flar, prr
2012-02-14 14:16:49 -08:00
Coleen Phillimore
5afc57be8e 7145587: Stack overflows in Java code cause 64-bit JVMs to exit due to SIGSEGV (sparc version)
Increase StackShadowPages to accomodate the JDK changes to increase buffer size in socketWrite

Reviewed-by: acorn, phh, dcubed, kamg, dsamersoff
2012-02-14 16:50:34 -05:00
Keith McGuigan
8a9ec2c624 Merge 2012-02-14 15:52:17 -05:00
Abhijit Saha
f22e2721dc Merge 2012-02-14 10:29:36 -08:00
Abhijit Saha
5da827856c Merge 2012-02-14 10:22:15 -08:00
Abhijit Saha
6000901868 Merge 2012-02-14 10:22:06 -08:00
Abhijit Saha
7bd91cdd6e Merge 2012-02-14 10:21:54 -08:00
Abhijit Saha
299454e654 Merge 2012-02-14 10:21:25 -08:00
Frederic Parain
52739303db 7140868: TEST_BUG: jcmd tests need to use -XX:+UsePerfData
Reviewed-by: fparain, dholmes
2012-02-14 07:28:29 -08:00
Frederic Parain
476ee44449 7143760: Memory leak in GarbageCollectionNotifications
Reviewed-by: dholmes, dcubed, kamg
2012-02-14 06:54:27 -08:00
Alexander Scherbatiy
7c6f3c6cb2 7133577: [macosx] closed/javax/swing/JTree/4314199/bug4314199.java fails on MacOS
Reviewed-by: rupashka
2012-02-14 18:44:57 +04:00
Vinnie Ryan
abfc726cc4 7142888: sun/security/tools/jarsigner/ec.sh fail on sparc
Reviewed-by: xuelei
2012-02-14 11:47:41 +00:00
Roland Westrelin
e7ece2a742 7144405: JumbleGC002 assert(m->offset() == pc_offset) failed: oopmap not found
Oop map needs pc stored in frame anchor in StubGenerator::generate_throw_exception()

Reviewed-by: twisti, never, kvn
2012-02-14 09:43:25 +01:00
Jim Holmlund
df7b871807 7142672: Problems with the value passed to the 'classes' param of JavaCompiler.CompilationTask.getTask(...)
Reviewed-by: jjg
2012-02-13 16:01:43 -08:00
Keith McGuigan
95cfa1c3a7 7069991: Setup make/jprt.properties files for jdk8
Change default release value to jdk8 (but overrideable)

Reviewed-by: phh, jcoomes, dholmes, ohair
2012-02-13 14:03:12 -05:00
Coleen Phillimore
cfdca5342c 7059899: Stack overflows in Java code cause 64-bit JVMs to exit due to SIGSEGV
Increase StackShadowPages to accomodate the JDK changes to increase buffer size in socketWrite

Reviewed-by: acorn, phh
2012-02-13 12:30:47 -05:00
Vinnie Ryan
5f84978261 Merge 2012-02-13 14:31:32 +00:00
Vinnie Ryan
7c7523d968 7142339: PKCS7.java is needlessly creating SHA1PRNG SecureRandom instances when timestamping is not done
Reviewed-by: xuelei, wetmore
2012-02-13 14:26:25 +00:00
Frederic Parain
3008f1f46e Merge 2012-02-13 06:24:44 -08:00
Oleg Pekhovskiy
2ac69799ec 7143070: test/java/awt/print/PaintSetEnabledDeadlock/PaintSetEnabledDeadlock.java freezes on exit
Reviewed-by: anthony
2012-02-13 17:49:23 +04:00
Christian Thalinger
df753a2942 7143766: add ALT_JDK_IMAGE_DIR and improve test_jdk
Reviewed-by: rbackman, jrose, dholmes
2012-02-13 04:30:59 -08:00
Christian Thalinger
425b53e062 7141329: Strange values of stack_size in -XX:+TraceMethodHandles output
Reviewed-by: kvn, never
2012-02-13 02:29:22 -08:00
Mani Sarkar
7abee00e97 7143230: fix warnings in java.util.jar, sun.tools.jar, zipfs demo, etc
Co-authored-by: Michael Barker <mikeb01@gmail.com>
Co-authored-by: Carl Jokl <carl.jokl@gmail.com>
Co-authored-by: Dinuk Weerasinghe <dinuksw@yahoo.com>
Co-authored-by: Markus Stoy <markus.stoy@timgroup.com>
Co-authored-by: Tom Anderson <tom.anderson@timgroup.com>
Reviewed-by: alanb, chegar, lancea, smarks
2012-02-12 21:56:24 -08:00
Poonam Bajaj
e565fbba32 7009098: SA cannot open core files larger than 2GB on Linux 32-bit
Added Large File Support by compiling libsaproc.so with -D_FILE_OFFSET_BITS=64, and a small change with which SA should first load libraries from the path specified with SA_ALTROOT.

Reviewed-by: dholmes, kevinw, dcubed, minqi
2012-02-12 19:33:11 -08:00
Jan Valenta
0073cdd512 7144979: incorrect path separator in make/build.xml for Windows when running jtreg tests
Reviewed-by: jjg
2012-02-12 16:44:13 -08:00
Alan Bateman
6e1303417c 7144895: ProblemList.txt updates (2/2012)
Reviewed-by: darcy, ohair
2012-02-12 21:09:09 +00:00
Chris Hegarty
cfe8581b9b 7133367: ResponseCache.put should not be called when setUseCaches(false)
Reviewed-by: michaelm
2012-02-12 08:47:36 +00:00
Xue-Lei Andrew Fan
7ddcb409b6 7144781: incorrect URLs in JSSE java doc
Reviewed-by: wetmore, skannan
2012-02-10 22:17:44 -08:00
Bradford Wetmore
533795bb75 7142509: Cipher.doFinal(ByteBuffer,ByteBuffer) fails to process when in.remaining() == 0
Reviewed-by: valeriep
2012-02-10 19:07:23 -08:00
Andrew Haley
b33087c6d3 7140985: HSDIS does not handle caller options correctly
Fix typo.

Reviewed-by: jrose, kvn
2012-02-10 17:20:05 -08:00
Vladimir Kozlov
2d533fa2a9 7129284: +DoEscapeAnalysis regression w/ early build of 7u4 (HotSpot 23) on Linux
Removed code which tried to create edges from fields of destination objects of arraycopy to fields of source objects. Added 30 sec time limit for EA graph construction.

Reviewed-by: never
2012-02-10 12:53:43 -08:00
Alejandro Murillo
4659df3c49 7144322: new hotspot build - hs23-b16
Reviewed-by: jcoomes
2012-02-10 11:46:20 -08:00
Alejandro Murillo
46f9604fd6 Added tag hs23-b15 for changeset 323ec1849b7c 2012-02-10 11:41:34 -08:00
Alejandro Murillo
9d5cdc4b03 Merge 2012-02-10 11:41:29 -08:00
Lana Steuck
9fbc16e840 Merge 2012-02-10 10:23:13 -08:00
Bill Pittore
39f063f94d Merge 2012-02-10 10:55:15 -05:00
Alexander Scherbatiy
f67d19788e 7109991: SwingUtilities.isXMouseButton behaves unexpectedly starting from JDK8 b08
Reviewed-by: rupashka
2012-02-10 18:34:43 +04:00
Prasannaa
1cfc57d91b 7144475: fix some warnings in java.awt, javax.print.attribute.standard, and sun.beans.infos
Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>
Co-authored-by: Goerge Albrecht <goerge.albrecht@gmx.net>
Co-authored-by: Graham Allan <grundlefleck@googlemail.com>
Co-authored-by: Iordanis Giannakakis <i.giannakakis@ymail.com>
Co-authored-by: Jose Llarena <jose.llarena@gmail.com>
Co-authored-by: Abrahamn Marin Perez <abraham.marin.perez@gmail.com>
Reviewed-by: chegar, prr, alanb, anthony
2012-02-10 11:03:20 +00:00
Lana Steuck
9ea42aad43 Merge 2012-02-09 23:17:22 -08:00
Lana Steuck
fffeb599f8 Merge 2012-02-09 22:56:13 -08:00
Lana Steuck
13686b8d12 Merge 2012-02-09 22:55:28 -08:00
Lana Steuck
1ac29856e1 Merge 2012-02-09 22:53:25 -08:00
Lana Steuck
38d86a4aa3 Merge 2012-02-09 19:42:39 -08:00
Florian Weimer
9b65dbabc1 6879539: enable empty password support for pkcs12 keystore
Reviewed-by: vinnie, weijun
2012-02-10 11:41:22 +08:00
John R Rose
610e13c424 Merge 2012-02-09 18:01:20 -08:00
Michael Fang
9f0f739be9 Merge 2012-02-09 16:12:58 -08:00
David Katleman
4ccb224ca8 Added tag jdk8-b25 for changeset 5f9506e97a45 2012-02-09 12:56:35 -08:00
David Katleman
9b26ab91a5 Added tag jdk8-b25 for changeset 5e35df9fddb6 2012-02-09 12:56:12 -08:00
David Katleman
ead2757410 Added tag jdk8-b25 for changeset 3ef37abc6e33 2012-02-09 12:55:59 -08:00
David Katleman
3cc3ab97ed Added tag jdk8-b25 for changeset 6d836b7888ea 2012-02-09 12:55:56 -08:00
David Katleman
5d17e0d33e Added tag jdk8-b25 for changeset 5464af66b3ba 2012-02-09 12:55:38 -08:00
David Katleman
76f9c11768 Added tag jdk8-b25 for changeset 58ac5bae81ab 2012-02-09 12:55:29 -08:00
David Katleman
cbebb2687a Added tag jdk8-b25 for changeset b832ef83f076 2012-02-09 12:55:21 -08:00
Michael Fang
3961e49115 Merge 2012-02-09 10:16:24 -08:00
Alan Bateman
9ace5d5b19 7144086: TEST_BUG: java/nio/file/WatchService/SensitivityModifier.java failing intermittently
Reviewed-by: chegar
2012-02-09 16:38:36 +00:00
Zhengyu Gu
b0725ec91a Merge 2012-02-09 07:35:48 -08:00
Zhengyu Gu
e0ec1c804e 7141259: Native stack is missing in hs_err
Code cleanup and creating a private decoder for error handler, since it can be triggered from in signal handler, where no lock can be taken

Reviewed-by: dholmes, kamg, acorn, coleenp
2012-02-09 10:16:26 -05:00
Pavel Porvatov
36a08afe2a 7142955: DefaultTreeCellRenderer doesn't honor 'Tree.rendererFillBackground' LAF property
Reviewed-by: malenkov
2012-02-09 18:26:57 +04:00
Carlos Lucasius
d228d3127c 7114611: (fs) DirectoryStream fails with SIGBUS on some embedded platforms, dirent alignment
Reviewed-by: dholmes, alanb
2012-02-09 13:43:15 +00:00
Pavel Porvatov
ffc91880e1 7143857: Memory leak in javax.swing.plaf.synth.SynthTreeUI
Reviewed-by: alexp
2012-02-09 14:21:53 +04:00
Yumin Qi
3a09f847bb 7131006: java/lang/management/ThreadMXBean/ThreadLists.java
Reviewed-by: dholmes, acorn
2012-02-09 00:51:47 -08:00
David Katleman
0a228eec58 Merge 2012-02-08 19:13:58 -08:00
Michael Fang
59fae43a26 Merge 2012-02-08 10:18:33 -08:00
Oleg Pekhovskiy
ff7281a866 7132367: [macosx] ChoiceMouseWheelTest should be adapted for mac toolkit
Reviewed-by: art
2012-02-08 18:28:10 +04:00
Pavel Porvatov
0b4df63ee2 7138665: JOptionPane.getValue() unexpected change between JRE 1.6 and JRE 1.7
Reviewed-by: alexp
2012-02-08 16:15:12 +04:00
Gary Adams
d53f00fb69 6957683: test/java/util/concurrent/ThreadPoolExecutor/Custom.java failing
Reviewed-by: chegar, dholmes, alanb
2012-02-08 11:19:25 +00:00
Gary Adams
ba9ddb94fa 6736316: Timeout value in java/util/concurrent/locks/Lock/FlakyMutex.java is insufficient
Reviewed-by: chegar, dholmes, alanb
2012-02-08 11:18:29 +00:00
Chris Hegarty
5070eb57b6 7105929: java/util/concurrent/FutureTask/BlockingTaskExecutor.java fails on solaris sparc
Reviewed-by: dholmes
2012-02-08 11:16:52 +00:00
Roland Westrelin
0f2f8f179e 7119286: JSR292: SIGSEGV in JNIHandleBlock::release_block(JNIHandleBlock*, Thread*)+0x3c
Unaligned stack in throw_NullPointerException_at_call_entry().

Reviewed-by: twisti, never, kvn
2012-02-08 09:52:24 +01:00
Weijun Wang
18a83d872b 6880619: reg tests for 6879540
Reviewed-by: valeriep
2012-02-08 11:44:36 +08:00
Joe Darcy
d8c00fda7b 7143629: JDK jar/zip code should use unsigned library support
Reviewed-by: sherman
2012-02-07 17:39:13 -08:00
Vladimir Kozlov
e6015c7c26 7143491: G1 C2 CTW: assert(p2x->outcnt() == 2) failed: expects 2 users: Xor and URShift nodes
Adjust the assert and code in eliminate_card_mark() method for case when stored value is NULL.

Reviewed-by: iveresov, never
2012-02-07 16:33:43 -08:00
Frederic Parain
b70c4be0d9 Merge 2012-02-07 12:34:31 -08:00
Vladimir Kozlov
2856b9535e 7142167: MAC: _get_previous_fp broken on bsd with llvm-gcc
LLVM-GCC (__llvm__) should use the same _get_previous_fp implementation as __clang__ (as is the case for os::current_stack_pointer).

Reviewed-by: twisti, never, dcubed
2012-02-07 11:33:15 -08:00
Lana Steuck
62610f975f Merge 2012-02-07 10:39:26 -08:00
Lana Steuck
6bf7f5b84f Merge 2012-02-07 10:38:49 -08:00
Lana Steuck
c96654e8eb Merge 2012-02-07 10:36:51 -08:00
Alan Bateman
b37db2a9db 7142847: TEST_BUG: java/nio/file/WatchService/SensitivityModifier.java has incorrect @run tag, runs Basic
Reviewed-by: chegar
2012-02-07 13:28:32 +00:00
Yong Jeffrey Huang
adc42f10ab Merge 2012-02-06 18:58:45 -08:00
Yong Jeffrey Huang
4ea71cf959 7129382: change minor unit of VND to 0
Reviewed-by: naoto
2012-02-06 18:56:36 -08:00
Alejandro Murillo
01ee621b40 7143122: new hotspot build - hs23-b15
Reviewed-by: jcoomes
2012-02-06 12:18:24 -08:00
Alejandro Murillo
ce62364df5 Added tag hs23-b14 for changeset 04e30cc559a9 2012-02-06 12:13:56 -08:00
James Melvin
8bd7cfc472 7142616: MAC: Honor ALT_EXPORT_PATH overrides from JDK control builds
Fix EXPORT_PATH overrides on Mac OS X and only change default.

Reviewed-by: phh, dcubed
2012-02-06 14:02:51 -05:00
James Melvin
50daea0824 7142852: MAC: Comment out JPRT jbb tests on Mac OS X until 7142850 is resolved
Comment out JPRT jbb tests on Mac OS X until GUI hang can be fixed

Reviewed-by: dholmes, brutisso, phh
2012-02-06 14:01:53 -05:00
Bill Pittore
8e09c4566e Merge 2012-02-06 10:57:49 -05:00
Erik Joelsson
a1b4a3f698 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
Cleaned up make variables for compilers and linker to consistently use CXX for C++ compiler, CC for C compiler and LD for linker.

Reviewed-by: dholmes, ohrstrom
2012-02-06 09:14:22 +01:00
Joe Darcy
f30ca2fd58 7041249: Remove apt tool and API from the JDK
Reviewed-by: jjg, ohair
2012-02-05 21:59:45 -08:00
Joe Darcy
6667bfa0a9 7041249: Remove apt tool and API from the JDK
Reviewed-by: jjg, ohair
2012-02-05 21:49:45 -08:00
Miroslav Kos
33859eda7a 7140918: Remove dependency on apt and com.sun.mirror API
Co-authored-by: Martin Grebac <martin.grebac@oracle.com>
Reviewed-by: darcy
2012-02-05 12:29:31 +00:00
Miroslav Kos
487391eab6 7140918: Remove dependency on apt and com.sun.mirror API
Co-authored-by: Martin Grebac <martin.grebac@oracle.com>
Reviewed-by: darcy
2012-02-05 12:07:39 +00:00
Chris Hegarty
d0bf1b11b1 Merge 2012-02-04 07:36:29 +00:00
Chris Hegarty
511e7438d7 7041778: Move SCTP implementation out of sun.nio.ch and into its own package
Reviewed-by: alanb
2012-02-04 07:29:11 +00:00
Alejandro Murillo
5071c6aa0a 7142393: new hotspot build - hs23-b14
Reviewed-by: jcoomes
2012-02-03 18:09:14 -08:00
Alejandro Murillo
119aa701d0 Added tag hs23-b13 for changeset c996ca3f8bac 2012-02-03 18:04:11 -08:00
Alejandro Murillo
d639db1a9d Merge 2012-02-03 18:04:09 -08:00
John Coomes
abcd88ab09 Merge 2012-02-03 12:20:11 -08:00
John Coomes
140e8ff0d9 Merge 2012-02-03 12:08:55 -08:00
Frederic Parain
7b1a6d8811 Merge 2012-02-03 14:04:59 -05:00
Phil Race
80e0df803f 7141914: Draw glyph cause JVM crash
Reviewed-by: bae, igor
2012-02-03 09:57:45 -08:00
Pavel Porvatov
a1486e0c08 7071775: javax/swing/JFileChooser/6396844/TwentyThousandTest.java failed on winxp
Reviewed-by: alexp
2012-02-03 18:01:24 +04:00
Pavel Porvatov
314ecdc15a 7141573: JProgressBar resize exception, if setStringPainted in Windows LAF
Reviewed-by: malenkov
2012-02-03 17:57:39 +04:00
John Coomes
39ab213a0a 6679764: enable parallel compaction by default
Reviewed-by: phh, jmasa
2012-02-02 16:05:17 -08:00
Sonali Goel
c750a3e42c 7141141: Add 3 new test scenarios for testing Main-Class attribute in jar manifest file
Reviewed-by: ksrini, darcy
2012-02-02 15:37:22 -08:00
David Katleman
fc851bfb71 Added tag jdk8-b24 for changeset e320a58c5e9a 2012-02-02 09:39:44 -08:00
David Katleman
89ba3aae12 Added tag jdk8-b24 for changeset b0f8f6fd6947 2012-02-02 09:39:36 -08:00
David Katleman
cf9dd9cf3b Added tag jdk8-b24 for changeset b18da790e3ea 2012-02-02 09:39:33 -08:00
David Katleman
1f03218e56 Added tag jdk8-b24 for changeset abbbbaf35c96 2012-02-02 09:39:32 -08:00
David Katleman
9cbc2661e1 Added tag jdk8-b24 for changeset 7e187fc00d45 2012-02-02 09:39:26 -08:00
David Katleman
1e4aa8a7d4 Added tag jdk8-b24 for changeset f920d3637c9f 2012-02-02 09:39:19 -08:00
David Katleman
1540e46180 Added tag jdk8-b24 for changeset b77ae0f8eec8 2012-02-02 09:39:18 -08:00
Volker Simonis
b9fbc2faab 7141637: JSR 292: MH spread invoker crashes with NULL argument on x86_32
Reviewed-by: twisti
2012-02-02 09:14:38 -08:00
Matthew Smith
7313a31b92 7132194: GtkFileDialog does not point to the correct file(s) is Recent Files are used
Handle the file list differently if gtk_file_chooser_get_current_folder() returns NULL

Reviewed-by: anthony
2012-02-02 17:49:10 +04:00
Tom Rodriguez
9599296d97 7013347: allow crypto functions to be called inline to enhance performance
Reviewed-by: kvn
2012-02-01 16:57:08 -08:00
Bradford Wetmore
8ac9bc5858 7141910: Incorrect copyright dates on new test cases
Reviewed-by: mullan
2012-02-01 16:00:39 -08:00
James Melvin
73785e645b 7123386: RFE: Preserve universal builds of HotSpot on Mac OS X
Add support for packaging HotSpot JVM builds in universal binaries

Reviewed-by: dholmes, kamg, dcubed, phh
2012-02-01 15:01:08 -05:00
Tom Rodriguez
5a41427b37 7141200: log some interesting information in ring buffers for crashes
Reviewed-by: kvn, jrose, kevinw, brutisso, twisti, jmasa
2012-02-01 07:59:01 -08:00
Frederic Parain
ec9b7d57ac 7120974: ManagementPermission "control" needs clarification
Reviewed-by: mchung, dholmes
2012-02-01 03:52:37 -08:00
Roland Westrelin
a59952f4c9 7090976: Eclipse/CDT causes a JVM crash while indexing C++ code
Too optimistic inlining decision confuses local value numbering.

Reviewed-by: never
2012-02-01 10:36:58 +01:00
Lana Steuck
9ad29a120a Merge 2012-01-31 19:08:36 -08:00
Lana Steuck
bc231c8c92 Merge 2012-01-31 19:06:48 -08:00
Christian Thalinger
2fd128fe15 7132180: JSR 292: C1 JVM crash with ClassValue/MethodHandle
Reviewed-by: never
2012-01-31 09:53:46 -08:00
Vladimir Kozlov
1b91bcb342 7140924: SIGSEGV in compiled code for sun.awt.X11.XDecoratedPeer.updateMinSizeHints
Use unknown_obj instead of empty_map for NULL or Constant Pool object constants in bytecode Escape Analyzer.

Reviewed-by: iveresov, never
2012-01-31 07:18:03 -08:00
Pavel Porvatov
bd71369ca5 7082443: JComboBox not backward compatible (with Java 6)
Reviewed-by: alexp
2012-01-31 17:30:33 +04:00
Staffan Larsen
d548c65214 Merge 2012-01-31 04:57:20 -08:00
Fredrik Ohrstrom
301215b860 7132779: build-infra merge: Enable ccache to work for most developer builds
When a build number is not specified, the JRE_RELEASE_VERSION define contains a date and timestamp. Thus ccache cannot cache the object files for longer than a minute since the define is passed to the compilation of all source files. This change passes JRE_RELEASE_VERSION only to vm_version.cpp and adds a function jre_release_version() to Abstract_VM_Version. This allows all other source files to be ccached.

Reviewed-by: ohair, rottenha
2012-01-31 13:12:39 +01:00
Paul Hohensee
76dfe7f707 7142586: Cannot build on Solaris 11 due to use of ia_nice
Delete the single use of ia_nice in os_solaris.cpp

Reviewed-by: kamg, kvn
2012-02-03 17:21:52 -05:00
Jonathan Lu
46accc5829 7133301: (process) UNIXProcess_md.c should include sys/wait.h rather than wait.h
Reviewed-by: alanb
2012-01-31 10:31:19 +00:00
Sergey Malenkov
bb9be9ed00 7122138: IAE thrown because Introspector ignores synthetic methods
Reviewed-by: rupashka
2012-01-31 14:20:47 +04:00
Staffan Larsen
c3ee1cf7f9 7132199: sun/management/jmxremote/bootstrap/JvmstatCountersTest.java failing on all platforms
Make sure HotSpot and JDK looks for well-known files in the same location

Reviewed-by: dholmes, dsamersoff
2012-01-31 10:46:34 +01:00
Karen Kinnear
ce074f86c3 7114376: Make system dictionary hashtable bucket array size configurable
7u4 new experimental flag -XX:PredictedClassLoadedCount=#

Reviewed-by: dholmes, phh, dcubed
2012-01-30 23:27:30 -05:00
Igor Veresov
082b8cb318 7141059: 7116795 broke pure c2 builds
Fix pure c2 builds

Reviewed-by: kvn, brutisso, never
2012-01-30 19:37:14 -08:00
Bengt Rutisson
85e4d13987 7140909: Visual Studio project builds broken: need to define INCLUDE_TRACE
Add define of INCLUDE_TRACE

Reviewed-by: sla, kamg
2012-01-30 15:21:57 +01:00
Bengt Rutisson
d5546e27cf Merge 2012-01-30 05:08:09 -08:00
Doug Lea
45569b3a65 7132378: Race in FutureTask if used with explicit set ( not Runnable )
Reviewed-by: chegar, dholmes
2012-01-30 11:44:45 +00:00
Deepak Bhole
ce79f12b7b 7140882: Don't return booleans from methods returning pointers
Changed "return false" to "return NULL"

Reviewed-by: dholmes, rottenha
2012-01-30 12:36:49 +01:00
Alexander Scherbatiy
c0b462dd42 7122149: [macosx] closed/javax/swing/UITest/UITest.java fails on MacOS
Reviewed-by: rupashka
2012-01-30 12:52:53 +04:00
Tom Rodriguez
5721fa222a 7129164: JNI Get/ReleasePrimitiveArrayCritical doesn't scale
Reviewed-by: kvn, iveresov, dholmes
2012-01-29 16:46:04 -08:00
Lana Steuck
d1e88d085e Merge 2012-01-28 22:47:07 -08:00
Lana Steuck
afe805a586 Merge 2012-01-28 22:21:54 -08:00
Lana Steuck
da83df8bb7 Merge 2012-01-28 20:42:11 -08:00
Lana Steuck
0f98d16ad1 Merge 2012-01-28 20:41:27 -08:00
Lana Steuck
1bf74156a2 Merge 2012-01-28 20:36:29 -08:00
Kumar Srinivasan
25f79b38d8 7127906: (launcher) convert the launcher regression tests to java
Reviewed-by: darcy, naoto
2012-01-28 10:46:46 -08:00
Stefan Karlsson
0603a70b79 Merge 2012-01-28 01:15:34 -08:00
Valerie Peng
9b4334593c 7136538: typo in test/Makefile under the jdk_security3 target
Fixed the typo of "secrity".

Reviewed-by: wetmore
2012-01-27 15:25:17 -08:00
Alejandro Murillo
99b8ef66fd 7135385: new hotspot build - hs23-b13
Reviewed-by: jcoomes
2012-01-27 14:49:54 -08:00
Alejandro Murillo
b67bc26c4d Added tag hs23-b12 for changeset 68d6477cc31f 2012-01-27 14:44:20 -08:00
Alejandro Murillo
82da0a1808 Merge 2012-01-27 14:44:19 -08:00
Keith McGuigan
1e318cc920 Merge 2012-01-27 10:42:36 -05:00
Chris Hegarty
036e845b65 7110002: Rename xawt/libmawt.so and headless/libmawt.so so they can be colocated with libawt
Reviewed-by: art, prr, dholmes, alanb
2012-01-27 13:48:40 +00:00
Alexander Scherbatiy
9a010b5d73 7105040: [macosx] closed/javax/swing/JPopupMenu/4966112/bug4966112.java deadlocks on MacOS
Reviewed-by: rupashka
2012-01-27 17:36:35 +04:00
Stefan Karlsson
4ad03aebbb 7134655: Crash in reference processing when doing single-threaded remarking
Temporarily disabled multi-threaded reference discovery when entering a single-threaded remark phase.

Reviewed-by: brutisso, tonyp, jmasa, jcoomes
2012-01-27 14:14:50 +01:00
Alexander Scherbatiy
a70eddca0d 7109962: [macosx] closed/javax/swing/JList/6462008/bug6462008.java fails on MacOS
Reviewed-by: rupashka
2012-01-27 17:00:16 +04:00
Stefan Karlsson
b7d5d72f78 7022100: Method annotations are incorrectly set when redefining classes
Changed to the correct annotation arrays

Reviewed-by: kamg, dholmes, sla
2012-01-27 13:46:24 +01:00
Alexander Scherbatiy
153bd2fc0d 7122173: [macosx] Several Regression tests fail on MacOS
Reviewed-by: rupashka
2012-01-27 16:32:16 +04:00
Bengt Rutisson
172ebc873c Merge 2012-01-27 09:04:57 +01:00
Masayoshi Okutsu
33a5a447a8 7130335: Problem with timezone in a SimpleDateFormat
Reviewed-by: peytoia
2012-01-27 14:58:32 +09:00
John R Rose
e27deedf24 Merge 2012-01-26 19:39:08 -08:00
David Katleman
3d631d7389 Added tag jdk8-b23 for changeset 6662fc41e1c3 2012-01-26 18:23:36 -08:00
David Katleman
1b98d6343f Added tag jdk8-b23 for changeset 412e931c07b9 2012-01-26 18:23:28 -08:00
David Katleman
34ff11cc2f Added tag jdk8-b23 for changeset 11fa98675c2a 2012-01-26 18:23:25 -08:00
David Katleman
c4b15b06e6 Added tag jdk8-b23 for changeset 939aca1c5dac 2012-01-26 18:23:24 -08:00
David Katleman
5e494c370a Added tag jdk8-b23 for changeset af005838b2f8 2012-01-26 18:23:17 -08:00
David Katleman
fbc7f2bbaf Added tag jdk8-b23 for changeset 751387b26353 2012-01-26 18:23:14 -08:00
David Katleman
47bf575dfa Added tag jdk8-b23 for changeset c62b7a0288a4 2012-01-26 18:23:09 -08:00
Bradford Wetmore
08fe131e34 7126889: Incorrect SSLEngine debug output
Reviewed-by: xuelei
2012-01-26 17:16:05 -08:00
Paul Hohensee
09e21afaaa 7082553: Interpret Thread.setPriority(Thread.MAX_PRIORITY) to mean FX60 on Solaris 10 and 11
Add CriticalPriority == MaxPriority+1 and enable scheduling class as well as thread priority to change on Solaris.

Reviewed-by: dholmes, dcubed
2012-01-26 20:06:06 -05:00
Lance Andersen
fa918cde67 7133815: address the findbug errors in CachedRowSetImpl, SerialStruct, BaseRow, SerialInputImpl, SerialOutputImpl
Reviewed-by: forax
2012-01-26 19:41:35 -05:00
John Cuthbertson
179d6df8c0 7133038: G1: Some small profile based optimizations
Some minor profile based optimizations. Reduce the number of branches and branch mispredicts by removing some virtual calls, through closure specalization, and refactoring some conditional statements.

Reviewed-by: brutisso, tonyp
2012-01-26 14:14:55 -08:00
Igor Veresov
84dda879d0 7131259: compile_method and CompilationPolicy::event shouldn't be declared TRAPS
Make sure that CompilationPolicy::event() doesn't throw exceptions

Reviewed-by: kvn, never
2012-01-26 12:15:24 -08:00
Bertrand Delsart
070f9108ff 7120468: SPARC/x86: use frame::describe to enhance trace_method_handle
Improvements of TraceMethodHandles for JSR292

Reviewed-by: never, twisti
2012-01-26 16:49:22 +01:00
Pavel Porvatov
4ae1928609 7010561: Tab text position with Synth based LaF is different to Java 5/6
Reviewed-by: alexp
2012-01-26 17:38:58 +04:00
Rickard Bäckman
804ef2d9ee 7133124: Remove redundant packages from JAR command line
Reviewed-by: acorn, alanb, dholmes, rottenha
2012-01-26 09:51:35 +01:00
Roland Westrelin
de3ed511b1 7123910: Some CTW tests crash VM: is_loaded() && that->is_loaded()
Handle not loaded array klass in Parse::do_checkcast().

Reviewed-by: kvn, never
2012-01-26 09:38:28 +01:00
Yuka Kamiya
844d8fc641 7017458: (cal) Multithreaded deserialization of Calendar leads to ClassCastException
Reviewed-by: okutsu
2012-01-26 17:06:47 +09:00
Bob Vandette
963cefb1bb Merge 2012-01-25 21:30:53 -08:00
John Coomes
3eb017ee50 7112413: JVM Crash, possibly GC-related
Disable UseAdaptiveSizePolicy with the CMS and ParNew

Reviewed-by: johnc, brutisso
2012-01-25 21:14:11 -08:00
Dmitry Samersoff
7ece654913 Merge 2012-01-25 18:58:59 -08:00
Frederic Parain
1b6556acac Merge 2012-01-25 16:33:37 -08:00
David Holmes
ff8aa96e68 Merge 2012-01-25 19:26:35 -05:00
Dmitry Samersoff
a403696909 Merge 2012-01-25 15:03:42 -08:00
Jiangli Zhou
cd85c690df 7132690: InstanceKlass:_reference_type should be u1 type
Change InstanceKlass::_reference_type to u1 type.

Reviewed-by: dholmes, coleenp, acorn
2012-01-25 17:40:51 -05:00
David Katleman
3afc06730d Merge 2012-01-25 13:54:28 -08:00
Alejandro Murillo
89a6bc1ca9 Merge 2012-01-25 12:36:08 -08:00
Jim Holmlund
e1fa8cca42 7133314: The regression test for 7129225 fails when run with jtreg -samevm or jtreg -agentvm
Reviewed-by: jjg
2012-01-25 12:20:05 -08:00
Frederic Parain
6fd2cebd85 7131346: Parsing of boolean arguments to diagnostic commands is broken
Reviewed-by: dholmes, dcubed
2012-01-25 10:32:29 -08:00
Antonios Printezis
802519ea53 7127706: G1: re-enable survivors during the initial-mark pause
Re-enable survivors during the initial-mark pause. Afterwards, the concurrent marking threads have to scan them and mark everything reachable from them. The next GC will have to wait for the survivors to be scanned.

Reviewed-by: brutisso, johnc
2012-01-25 12:58:23 -05:00
Dmitry Samersoff
fdf8f817d3 7132515: Add dcmd to manage UnlockingCommercialFeature flag
Added dcmd to unlock or check status of UnlockingCommercialFeature flag

Reviewed-by: fparain, rottenha
2012-01-25 21:10:08 +04:00
Vladimir Kozlov
51e16a559d Merge 2012-01-25 08:10:04 -08:00
Keith McGuigan
7168e2bfeb Merge 2012-01-25 10:08:40 -05:00
Paul Hohensee
a9d159b065 Merge 2012-01-25 01:16:03 -08:00
Roland Westrelin
f3ce53be67 7116050: C2/ARM: memory stomping error with DivideMcTests
Block::schedule_local() may write beyond end of ready_cnt array

Reviewed-by: never, kvn
2012-01-25 09:31:47 +01:00
Dmitry Samersoff
e5562a8fda Merge 2012-01-24 20:15:56 -08:00
Vladimir Kozlov
3770ecec6f 7132936: guarantee(t != NULL) failed: must be con
Use !higher_equal() check to skip top and values which fit.

Reviewed-by: never
2012-01-24 17:04:51 -08:00
Igor Veresov
7f44e35134 7132945: Tiered: adjust OSR threshold of level 3
Change the value of Tier3BackEdgeThreshold from 7000 to 60000

Reviewed-by: kvn, never
2012-01-24 17:00:51 -08:00
James Melvin
ccf7d491f7 7125793: MAC: test_gamma should always work
Fix gamma launcher on Mac OS X and reconcile test_gamma script on Unix platforms

Reviewed-by: dcubed, ohair, jcoomes, dholmes, ksrini
2012-01-24 19:33:14 -05:00
Jim Holmlund
8f129be7fb 7129225: javac fails to run annotation processors when star import of package of gensrc
Reviewed-by: jjg
2012-01-24 16:31:15 -08:00
Jim Holmlund
139ce2d98a 7126832: com.sun.tools.javac.api.ClientCodeWrapper$WrappedJavaFileManager cannot be cast
Reviewed-by: jjg
2012-01-24 15:51:44 -08:00
Dean Long
7f5b035542 7130319: C2: running with -XX:+PrintOptoAssembly crashes the VM with assert(false) failed: bad tag in log
Relax assert to allow the VMThread to close the log while the compiler thread is still writing to it.

Reviewed-by: dholmes, never
2012-01-24 18:00:54 -05:00
Dmitry Samersoff
501bad4fd6 7066129: GarbageCollectorMXBean#getLastGcInfo leaks native memory
Make GCStatInfo a resource object

Reviewed-by: phh, coleenp
2012-01-25 02:29:05 +04:00
Lana Steuck
9ffd90edcf Merge 2012-01-24 13:44:01 -08:00
Lana Steuck
a863f02fc0 Merge 2012-01-24 13:43:24 -08:00
Lance Andersen
abf04e0d1c 7132879: address Findbugs issue in WebRowSetXmlWriter
Reviewed-by: forax
2012-01-24 15:13:27 -05:00
James Melvin
cba74d6208 7126732: MAC: Require Mac OS X builds/tests for JPRT integrate jobs for HotSpot
Modify jprt.properties to run OSX builds and tests.

Reviewed-by: dcubed, kamg, ohair, dholmes
2012-01-24 14:07:03 -05:00
Kumar Srinivasan
d0df777779 7132270: tools/launcher/DefaultLocaleTestRun.java failing (win)
Reviewed-by: alanb, chegar
2012-01-24 09:58:44 -08:00
Maurizio Cimadamore
d353146b32 7129801: Merge the two method applicability routines
Resolve.java and Infer.java should reuse the same method applicability check routine

Reviewed-by: dlsmith, jjg
2012-01-24 17:52:02 +00:00
Sergey Malenkov
e59111ddf3 7121905: grammatically incorrect apostrophe in BeanInfo javadoc
Reviewed-by: rupashka
2012-01-24 19:40:14 +04:00
Denis Fokin
40dbde3a86 7078460: JDialog is shown as separate icon on the taskbar
Reviewed-by: anthony
2012-01-24 18:46:36 +04:00
Bertrand Delsart
3f08a21500 7120450: complete information dumped by frame_describe
Improvements of frame_describe

Reviewed-by: never, twisti
2012-01-24 15:41:17 +01:00
Rickard Backman
ec891da5a7 7130476: Remove use of #ifdef TRACE_DEFINE_KLASS_TRACE_ID from klass.hpp
Reviewed-by: kamg, phh, dsamersoff
2012-01-24 14:48:22 +01:00
Alan Bateman
c72c2bee4b 7132204: Default testset in JPRT should not run all tests
Reviewed-by: ohair
2012-01-24 09:08:43 +00:00
Coleen Phillimore
d0b33ef971 Merge 2012-01-23 17:45:32 -08:00
Mark Reinhold
77ad1e47c1 7110396: Sound code fails to build with gcc 4.6 on multiarch Linux systems
Reviewed-by: ohair
2012-01-23 12:39:41 -08:00
Denis Fokin
9bf6ef1857 7130140: using horizontal scroll button on mouse causes a message to be printed on stdout
Reviewed-by: art
2012-01-23 17:26:07 +04:00
Alexander Scherbatiy
ea9ee98dd7 7116634: [macosx] closed/javax/swing/JTree/6263446/bug6263446Tree.java fails on MacOS
Reviewed-by: rupashka
2012-01-23 13:53:24 +04:00
Alexander Scherbatiy
2909ee7529 7112854: [macosx] closed/javax/swing/JPopupMenu/Test6827786.java unstable on MacOS
Reviewed-by: rupashka
2012-01-23 13:05:51 +04:00
Tom Rodriguez
52979e6206 7130676: Tiered: assert(bci == 0 || 0<= bci && bci<code_size()) during stack trace construction
Reviewed-by: kvn, iveresov
2012-01-22 14:03:20 -08:00
Bill Pittore
af9f073374 6972759: Step over not working after thrown exception and Pop
Reset jvmtithreadstate exception state after frame pop and forceearlyreturn processed

Reviewed-by: minqi, dholmes, dlong
2012-01-21 23:02:40 -05:00
Alejandro Murillo
63b889aba6 7131979: new hotspot build - hs23-b12
Reviewed-by: jcoomes
2012-01-20 17:07:33 -08:00
Alejandro Murillo
f0908fd16b Added tag hs23-b11 for changeset ad2a7ae4f3b0 2012-01-20 16:56:31 -08:00
Alejandro Murillo
6a27f2c096 Merge 2012-01-20 16:56:31 -08:00
Igor Veresov
55c9a74046 7131028: Switch statement takes wrong path
Pass correct type to branch in LIRGenerator::do_SwitchRanges()

Reviewed-by: kvn, never
2012-01-20 15:02:12 -08:00
Alejandro Murillo
370735f2e4 Merge 2012-01-20 14:31:33 -08:00
David Katleman
8d4b04a365 Added tag jdk8-b22 for changeset e6809c7d1735 2012-01-20 13:08:51 -08:00
David Katleman
6f9ada3843 Added tag jdk8-b22 for changeset 054ae6fb4346 2012-01-20 13:08:48 -08:00
David Katleman
ae6fa39b20 Added tag jdk8-b22 for changeset 0a4b26cf7553 2012-01-20 13:08:45 -08:00
David Katleman
1599f28a1f Added tag jdk8-b22 for changeset 99a092d22c70 2012-01-20 13:08:44 -08:00
David Katleman
106518995c Added tag jdk8-b22 for changeset 8b2993f4f9c6 2012-01-20 13:08:43 -08:00
David Katleman
10e49d5a1e Added tag jdk8-b22 for changeset 5df4cdb80642 2012-01-20 13:08:41 -08:00
David Katleman
a95f19a9f3 Added tag jdk8-b22 for changeset ca3137c9be77 2012-01-20 13:08:40 -08:00
Vladimir Kozlov
5b3f2efc2e 7131302: connode.cpp:205 Error: ShouldNotReachHere()
Add Value() methods to short and byte Load nodes to truncate constants which does not fit.

Reviewed-by: jrose
2012-01-20 09:43:06 -08:00
John R Rose
4e648d883d Merge 2012-01-19 18:35:13 -08:00
John R Rose
02ada73e46 Merge 2012-01-19 17:20:39 -08:00
John R Rose
e323998c19 7111138: delete the obsolete flag -XX:+UseRicochetFrames
Reviewed-by: dholmes, bdelsart, kvn, twisti
2012-01-19 13:00:11 -08:00
Phil Race
b25a3c3f11 7131153: GetDC called way too many times - causes bad performance
Reviewed-by: igor, jgodinez
2012-01-19 12:41:57 -08:00
Igor Veresov
c21cf7cf4b 7131288: COMPILE SKIPPED: deopt handler overflow (retry at different tier)
Fix exception handler stub size, enable guarantees to check for the correct deopt and exception stub sizes in the future

Reviewed-by: kvn, never, twisti
2012-01-19 10:56:51 -08:00
Denis Fokin
d0dfef0321 7121761: creation of java.awt.DataFlavour fails for turkish locale
Reviewed-by: anthony
2012-01-19 14:59:43 +04:00
Lana Steuck
9ccc60ae83 Merge 2012-01-18 20:24:41 -08:00
Lana Steuck
8b5dadd520 Merge 2012-01-18 20:23:33 -08:00
Jim Holmlund
323665eec5 7131308: Three regression tests fail due to bad fix for 7127924
Reviewed-by: jjg
2012-01-18 18:26:36 -08:00
John R Rose
cec41c4c9d 7030453: JSR 292 ClassValue.get method is too slow
Implement ClassValue cooperatively with Class like ThreadLocal with Thread.

Reviewed-by: twisti, mduigou
2012-01-18 17:34:32 -08:00
John R Rose
1c49ad8a03 7077803: java.lang.InternalError in java.lang.invoke.MethodHandleNatives.init
Use correct access token for unreflecting MHs where setAccessible(true)

Reviewed-by: never, twisti
2012-01-18 17:34:30 -08:00
John R Rose
ef856f2fe0 7117167: Misc warnings in java.lang.invoke and sun.invoke.*
Reviewed-by: smarks
2012-01-18 17:34:29 -08:00
Joe Darcy
c569749a21 7130768: Clarify behavior of Element.getEnclosingElements in subtypes
Reviewed-by: mcimadamore, jjg
2012-01-18 16:43:59 -08:00
Lana Steuck
328abbe8d8 Merge 2012-01-18 11:41:13 -08:00
Lana Steuck
5fa3c57f37 Merge 2012-01-18 11:27:56 -08:00
Lana Steuck
92c14834f4 Merge 2012-01-18 11:00:55 -08:00
Lana Steuck
bb8ab4aa4f Merge 2012-01-18 11:00:20 -08:00
John Cuthbertson
fa9d6d7682 7129514: time warp warnings after 7117303
Replace calls to os::javaTimeMillis() that are used to update the milliseconds since the last GC to an equivalent that uses a monotonically non-decreasing time source.

Reviewed-by: ysr, jmasa
2012-01-18 09:50:16 -08:00
Antonios Printezis
6a31970946 7129892: G1: explicit marking cycle initiation might fail to initiate a marking cycle
If we try to schedule an initial-mark GC in order to explicit start a conc mark cycle and it gets pre-empted by antoher GC, we should retry the attempt as long as it's appropriate for the GC cause.

Reviewed-by: brutisso, johnc
2012-02-14 08:21:08 -05:00
Igor Veresov
47d1b9ee33 7144296: PS: Optimize nmethods processing
Prunes scavenge roots in code list every young GC, promote objects directly pointed by the code immediately

Reviewed-by: johnc, jcoomes
2012-02-10 17:40:20 -08:00
Zhengyu Gu
dce4a696bf 7131050: fix for "7071311 Decoder enhancement" does not build on MacOS X
Decoder API changes did not reflect in os_bsd

Reviewed-by: kamg, dcubed
2012-01-18 11:45:14 -05:00
Chris Hegarty
b78021fcd1 7126960: Add property to limit number of request headers to the HTTP Server
Reviewed-by: michaelm
2012-01-18 15:35:06 +00:00
Bertrand Delsart
b11b6e4dda 7120448: Fix FP values for compiled frames in frame::describe
Fix for debug method frame::describe

Reviewed-by: never, kvn
2012-01-18 16:18:31 +01:00
Matt Smith
d5d6252e5b 7130662: GTK file dialog crashes with a NPE
Guard adding a back slash to the directory name with an if (!= null) check

Reviewed-by: anthony, art
2012-01-18 19:09:26 +04:00
Keith McGuigan
14c0efd947 Merge 2012-01-17 21:25:28 -05:00
Jim Holmlund
3d0da40b0d 7127924: langtools regression tests sometimes fail en-masse on windows
Reviewed-by: jjg
2012-01-17 17:14:44 -08:00
Kurchi Subhra Hazra
75e511ab32 7117570: Warnings in sun.mangement.* and its subpackages
Reviewed-by: mchung, dsamersoff
2012-01-17 15:55:40 -08:00
Zhengyu Gu
43bb0877fc 7071311: Decoder enhancement
Made decoder thread-safe

Reviewed-by: coleenp, kamg
2012-01-17 13:08:52 -05:00
Rickard Bäckman
4953b8bfa5 7132386: makefile support for tracing/Java Flight Recorder framework phase I
Co-authored-by: Markus Gronlund <markus.gronlund@oracle.com>
Co-authored-by: Erik Gahlin <erik.gahlin@oracle.com>
Co-authored-by: Nils Loodin <nils.loodin@oracle.com>
Co-authored-by: Staffan Larsen <staffan.larsen@oracle.com>
Reviewed-by: ohair, dholmes, rottenha
2012-01-17 16:20:52 +01:00
Alan Bateman
a2cb0c3029 7132204: Default testset in JPRT should not run all tests
Reviewed-by: ohair
2012-01-24 09:09:08 +00:00
Joe Darcy
032af13e8b 7132338: Use @code friendly idiom for '\' in javadoc
Reviewed-by: alanb
2012-01-23 12:17:30 -08:00
Sean Mullan
20acbf2a93 Merge 2012-01-23 13:23:05 -05:00
Sean Mullan
ced9a44bc8 7131084: XMLDSig XPathFilter2Transform regression involving intersect filter
Reviewed-by: xuelei
2012-01-23 12:17:04 -05:00
Xue-Lei Andrew Fan
830a24d326 7132248: sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/CookieHttpsClientTest.java failing
Reviewed-by: alanb
2012-01-23 04:44:16 -08:00
Joe Darcy
cc5049f41e 4504839: Java libraries should provide support for unsigned integer arithmetic
4215269: Some Integer.toHexString(int) results cannot be decoded back to an int
6322074: Converting integers to string as if unsigned

Reviewed-by: mduigou, emcmanus, flar
2012-01-20 17:56:31 -08:00
Valerie Peng
f105bf6f5b 7092825: javax.crypto.Cipher.Transform.patternCache is synchronizedMap and became scalability bottleneck
Changed patternCache from synchronizedMap to ConcurrentHashMap.

Reviewed-by: mullan
2012-01-19 12:01:57 -08:00
Keith McGuigan
c3f4b6ec1b Merge 2012-01-17 10:16:36 -05:00
Denis Fokin
36b3d034d2 7110590: DnDMerlinQLTestsuite_DnDJTextArea test fails with an java.awt.dnd.InvalidDnDOperationException
Reviewed-by: art
2012-01-17 19:09:32 +04:00
Chris Hegarty
8d3dc3ed37 6671616: TEST_BUG: java/io/File/BlockIsDirectory.java fails when /dev/dsk empty (sol)
Reviewed-by: alanb
2012-01-17 14:10:04 +00:00
Chris Hegarty
c77eb16a79 7129083: CookieManager does not store cookies if url is read before setting cookie manager
Reviewed-by: michaelm
2012-01-16 18:05:29 +00:00
Alan Bateman
3fc15f302b 7130398: ProblemList.txt updates (1/2012)
Reviewed-by: chegar
2012-01-16 16:30:29 +00:00
Sergey Malenkov
e20614ed03 7122740: PropertyDescriptor Performance Slow
Reviewed-by: rupashka
2012-01-16 18:28:56 +04:00
David Buck
e6ade0739d 7083621: Add fontconfig file for OEL6 and rename RH/O EL 5 file so that it is picked up for all 5.x updates
Reviewed-by: bae, prr
2012-01-16 11:52:51 +04:00
Weijun Wang
5cbd245bad 7118809: rcache deadlock
Reviewed-by: valeriep
2012-01-16 10:10:56 +08:00
Alejandro Murillo
b4dae5f577 7129512: new hotspot build - hs23-b11
Reviewed-by: jcoomes
2012-01-14 00:52:39 -08:00
Alejandro Murillo
e30e21cdf5 Added tag hs23-b10 for changeset 4412a0411174 2012-01-14 00:47:46 -08:00
Alejandro Murillo
a362528b38 Merge 2012-01-14 00:47:46 -08:00
Vladimir Kozlov
de9f63b920 Merge 2012-01-13 14:21:14 -08:00
Phil Race
3b8a1fee1d 7127827: JRE8: javaws fails to launch on oracle linux due to XRender
Reviewed-by: bae, jgodinez
2012-01-13 13:11:08 -08:00
Vladimir Kozlov
b9cba282ee 7129618: assert(obj_node->eqv_uncast(obj),"");
Relax verification and locks elimination checks for new implementation (EliminateNestedLocks).

Reviewed-by: iveresov
2012-01-13 12:58:26 -08:00
David Katleman
8765748af2 Added tag jdk8-b21 for changeset 9d026cb0fb2f 2012-01-13 10:05:53 -08:00
David Katleman
f7d05ab615 Added tag jdk8-b21 for changeset 0287f9a11368 2012-01-13 10:05:45 -08:00
David Katleman
ec17932998 Added tag jdk8-b21 for changeset e1dd9987d5a7 2012-01-13 10:05:42 -08:00
David Katleman
25236e8d34 Added tag jdk8-b21 for changeset bcda986cbc2e 2012-01-13 10:05:41 -08:00
David Katleman
35bca52095 Added tag jdk8-b21 for changeset d4711a3a19f6 2012-01-13 10:05:33 -08:00
David Katleman
6f619e30b6 Added tag jdk8-b21 for changeset ee4b0991718c 2012-01-13 10:05:30 -08:00
David Katleman
0bff632023 Added tag jdk8-b21 for changeset 4482b9090d5e 2012-01-13 10:05:28 -08:00
Bengt Rutisson
d2f69b4d5d Merge 2012-01-13 06:18:47 -08:00
Charles Lee
5c8b083c66 7129029: (fs) Unix file system provider should be buildable on platforms that don't support O_NOFOLLOW
Reviewed-by: alanb
2012-01-13 13:20:02 +00:00
Bengt Rutisson
1b06646e3f Merge 2012-01-13 01:55:22 -08:00
John R Rose
9eaf76fc72 Merge 2012-01-13 00:51:43 -08:00
Alexander Scherbatiy
30f7f59109 7121765: closed/javax/swing/JTextArea/4697612/bug4697612.java fails on MacOS on Aqua L&F
Reviewed-by: rupashka
2012-01-13 12:39:23 +04:00
John R Rose
9dfbcbea7a Merge 2012-01-13 00:27:53 -08:00
Valerie Peng
8b0a1174bd Merge 2012-01-12 18:49:33 -08:00
Weijun Wang
c4f77e41b6 7090565: Move test/closed/javax/security/auth/x500/X500Principal/Parse.java to open tests
Reviewed-by: mullan
2012-01-13 09:50:19 +08:00
Valerie Peng
eafb7ad68c 7088989: Improve the performance for T4 by utilizing the newly provided crypto APIs
Added the OracleUcrypto provider for utilizing the Solaris ucrypto API.

Reviewed-by: weijun
2012-01-12 16:04:03 -08:00
Vladimir Kozlov
337666a80c 7128355: assert(!nocreate) failed: Cannot build a phi for a block already parsed
Do not common BoxLock nodes and avoid creating phis of boxes.

Reviewed-by: never
2012-01-12 14:45:04 -08:00
Vladimir Kozlov
f3f36ae094 7064302: JDK7 build 147 crashed after testing my java 6-compiled web app
Don't split CMove node if it's control edge is different from split region.

Reviewed-by: never
2012-01-12 12:28:59 -08:00
Maurizio Cimadamore
1b000de186 7123100: javac fails with java.lang.StackOverflowError
Inference of under-constrained type-variables creates erroneous recursive wildcard types

Reviewed-by: jjg
2012-01-12 15:28:34 +00:00
Keith McGuigan
4671b2e4e2 Merge 2012-01-12 09:59:55 -05:00
Xue-Lei Andrew Fan
8b5551f1eb 7106773: 512 bits RSA key cannot work with SHA384 and SHA512
Reviewed-by: weijun
2012-01-12 03:39:37 -08:00
John Cuthbertson
0fa6fc2279 6484965: G1: piggy-back liveness accounting phase on marking
Remove the separate counting phase of concurrent marking by tracking the amount of marked bytes and the cards spanned by marked objects in marking task/worker thread local data structures, which are updated as individual objects are marked.

Reviewed-by: brutisso, tonyp
2012-01-12 00:06:47 -08:00
Antonios Printezis
8861552c07 7132398: G1: java.lang.IllegalArgumentException: Invalid threshold: 9223372036854775807 > max (1073741824)
Was not passing the right old pool max to the memory pool constructor in the fix for 7078465.

Reviewed-by: brutisso, johnc
2012-01-24 17:08:58 -05:00
Bengt Rutisson
4e395f3ddd 7132311: G1: assert((s == klass->oop_size(this)) || (Universe::heap()->is_gc_active() && ((is_typeArray()..
Move the check for when to call collect() to before we do a humongous object allocation

Reviewed-by: stefank, tonyp
2012-01-23 20:36:16 +01:00
Bengt Rutisson
7946306583 7131791: G1: Asserts in nightly testing due to 6976060
Create a handle and fake an object to make sure that we don't loose the memory we just allocated

Reviewed-by: tonyp, stefank
2012-01-20 18:01:32 +01:00
Antonios Printezis
c90c187756 7078465: G1: Don't use the undefined value (-1) for the G1 old memory pool max size
Reviewed-by: johnc, brutisso
2012-01-19 09:13:58 -05:00
John Cuthbertson
43a30ad483 7129271: G1: Interference from multiple threads in PrintGC/PrintGCDetails output
During an initial mark pause, signal the Concurrent Mark thread after the pause output from PrintGC/PrintGCDetails is complete.

Reviewed-by: tonyp, brutisso
2012-01-17 10:21:43 -08:00
Antonios Printezis
c9eb103b7f 7097586: G1: improve the per-space output when using jmap -heap
Extend the jmap -heap output for G1 to include some more G1-specific information.

Reviewed-by: brutisso, johnc, poonam
2012-01-18 10:30:12 -05:00
Bengt Rutisson
c11ba93098 6976060: G1: humongous object allocations should initiate marking cycles when necessary
Reviewed-by: tonyp, johnc
2012-01-16 22:10:05 +01:00
Bengt Rutisson
af0211c200 7130334: G1: Change comments and error messages that refer to CMS in g1/concurrentMark.cpp/hpp
Removed references to CMS in the concurrentMark.cpp/hpp files.

Reviewed-by: tonyp, jmasa, johnc
2012-01-16 11:21:21 +01:00
John Cuthbertson
dac656c955 7121547: G1: High number mispredicted branches while iterating over the marking bitmap
There is a high number of mispredicted branches associated with calling BitMap::iteratate() from within CMBitMapRO::iterate(). Implement a version of CMBitMapRO::iterate() directly using inline-able routines.

Reviewed-by: tonyp, iveresov
2012-01-13 13:27:48 -08:00
Jiangli Zhou
6bc84f7865 7129240: backout fix for 7102776 until 7128770 is resolved
Reviewed-by: phh, bobv, coleenp, dcubed
2012-01-11 19:54:34 -08:00
David Katleman
a742ba1ba3 Merge 2012-01-11 16:13:21 -08:00
David Katleman
ebf8d79496 Merge 2012-01-11 16:12:55 -08:00
Paul Hohensee
8efd785f67 Merge 2012-01-11 17:58:26 -05:00
Markus Gronlund
007126d010 7115199: Add event tracing hooks and Java Flight Recorder infrastructure
Added a nop tracing infrastructure, JFR makefile changes and other infrastructure used only by JFR.

Reviewed-by: acorn, sspitsyn
2012-01-11 17:34:02 -05:00
Maurizio Cimadamore
2c453c5844 7126754: Generics compilation failure casting List<? extends Set...> to List<Set...>
Problems with Types.rewriteQuantifiers not preserving variance

Reviewed-by: jjg
2012-01-11 18:23:24 +00:00
Kumar Srinivasan
86fa49b707 7125442: jar application located in two bytes character named folder cannot be run with JRE 7 u1/u2
Reviewed-by: sherman, mchung, darcy
2012-01-11 08:14:47 -08:00
Alan Bateman
69a71c999c 7068856: (fs) Typo in Files.isSameFile() javadoc
7099208: (fs) Files.newBufferedReader has typo in javadoc

Reviewed-by: forax
2012-01-11 13:07:15 +00:00
Chris Hegarty
1f16d123b1 7128648: HttpURLConnection.getHeaderFields should return an unmodifiable Map
Reviewed-by: michaelm
2012-01-11 10:52:25 +00:00
Vladimir Kozlov
791afc42da 7128352: assert(obj_node == obj) failed
Compare uncasted object nodes.

Reviewed-by: never
2012-01-10 18:05:38 -08:00
Joe Darcy
cd63594f4a 7128931: Bad HTML escaping in java.lang.Throwable javadoc
Reviewed-by: mduigou
2012-01-10 17:46:46 -08:00
Joe Darcy
d3428db5c5 7112008: Javadoc for j.l.Object.finalize() vs JLS 12.6 Finalization of Class Instances
Reviewed-by: mduigou
2012-01-10 17:12:11 -08:00
Antonios Printezis
1d3b26e52b 6888336: G1: avoid explicitly marking and pushing objects in survivor spaces
This change simplifies the interaction between GC and concurrent marking. By disabling survivor spaces during the initial-mark pause we don't need to propagate marks of objects we copy during each GC (since we never need to copy an explicitly marked object).

Reviewed-by: johnc, brutisso
2012-01-10 18:58:13 -05:00
Keith McGuigan
5c89631aef Merge 2012-01-10 15:47:19 -05:00
Bengt Rutisson
2bf3afe882 7128532: G1: Change default value of G1DefaultMaxNewGenPercent to 80
Reviewed-by: tonyp, jmasa
2012-01-10 20:02:41 +01:00
Alexander Scherbatiy
a6f9704a91 6505523: NullPointerException in BasicTreeUI when a node is removed by expansion listener
Reviewed-by: rupashka
2012-01-10 17:11:10 +04:00
Krystal Mok
a5c9da18fb 7128584: Typo in sun.misc.VM's private directMemory field comment
Reviewed-by: forax, chegar
2012-01-10 12:48:08 +00:00
Alexander Scherbatiy
59c8f5f79f 7110815: closed/javax/swing/JSplitPane/4885629/bug4885629.java unstable on MacOS
Reviewed-by: kizune
2012-01-10 15:46:30 +04:00
Brandon Passanisi
f44b5b5812 7123415: Some cases of network interface indexes being read incorrectly
Reviewed-by: chegar
2012-01-10 10:57:12 +00:00
Xue-Lei Andrew Fan
74fcfe6c7e 7123519: problems with certification path
Also including the contribution from Dennis Gu

Reviewed-by: mullan, weijun
2012-01-09 20:55:52 -08:00
Antonios Printezis
30bfc8f549 7125281: G1: heap expansion code is replicated
Reviewed-by: brutisso, johnc
2012-01-09 23:50:41 -05:00
Joe Darcy
a821772a15 7128512: Javadoc typo in java.lang.invoke.MethodHandle
Reviewed-by: mduigou
2012-01-09 20:14:15 -08:00
Lana Steuck
09e2e03986 Merge 2012-01-09 19:13:08 -08:00
Lana Steuck
d29ac175d5 Merge 2012-01-09 19:12:44 -08:00
Neil Richards
d51673ed91 7123229: (coll) EnumMap.containsValue(null) returns true
Java.util.EnumMap.NULL equals() must only be true for itself

Reviewed-by: alanb, mduigou
2012-01-10 00:07:13 +00:00
Martin Desruisseaux
f8400651e0 7128441: StrictMath performance improvement note shared with Math
Reviewed-by: darcy
2012-01-09 15:54:44 -08:00
Gary Adams
6eb76c4598 7030573: test/java/io/FileInputStream/LargeFileAvailable.java fails when there is insufficient disk space
Reviewed-by: alanb
2012-01-09 19:33:02 +00:00
Kelly O'Hair
a3a11340ee 7096063: /META-INF/mimetypes.default missing in jre\lib\resources.jar
Reviewed-by: dholmes
2012-01-09 09:22:54 -08:00
Jonathan Lu
467c036ccf 7128320: Fix freetype sanity check to make it more generic
Reviewed-by: luchsh, katleman
2012-01-09 09:18:37 -08:00
Frederic Parain
849571d5b3 7120511: Add diagnostic commands
Reviewed-by: acorn, phh, dcubed, sspitsyn
2012-01-09 10:27:24 +01:00
Vladimir Kozlov
94927c382b 7125896: Eliminate nested locks
Nested locks elimination done before lock nodes expansion by looking for outer locks of the same object.

Reviewed-by: never, twisti
2012-01-07 13:26:43 -08:00
Vladimir Kozlov
f99fb50071 7110824: ctw/jarfiles/GUI3rdParty_jar/ob_mask_DateField crashes VM
Change yank_if_dead() to recursive method to remove all dead inputs.

Reviewed-by: never
2012-01-07 10:39:23 -08:00
Antonios Printezis
90cdae9775 7121623: G1: always be able to reliably calculate the length of a forwarded chunked array
Store the "next chunk start index" in the length field of the to-space object, instead of the from-space object, so that we can always reliably read the size of all from-space objects.

Reviewed-by: johnc, ysr, jmasa
2012-01-07 00:43:59 -05:00
Vladimir Kozlov
b93ca70b9b Merge 2012-01-06 20:09:20 -08:00
Joe Darcy
57096116d9 7123649: Remove public modifier from Math.powerOfTwoF
Reviewed-by: smarks, alanb
2012-01-06 18:47:43 -08:00
Daniel D. Daugherty
74c45d049e Merge 2012-01-06 16:18:29 -08:00
Valerie Peng
12558e2ef9 7033170: Cipher.getMaxAllowedKeyLength(String) throws NoSuchAlgorithmException
Changed to always use full transformation as provider properties.

Reviewed-by: mullan
2012-01-06 16:06:41 -08:00
Valerie Peng
c83fa3fdfc Merge 2012-01-06 11:02:31 -08:00
Alan Bateman
5fa281c0ee 7127235: (fs) NPE in Files.walkFileTree if cached attributes are GC'ed
Reviewed-by: forax, chegar
2012-01-06 15:00:22 +00:00
Jon Masamitsu
156b0a12aa Merge 2012-01-05 21:02:05 -08:00
Valerie Peng
1081efba4f 6414899: P11Digest should support cloning
Enhanced the PKCS11 Digest implementation to support cloning

Reviewed-by: vinnie
2012-01-05 18:18:04 -08:00
Igor Veresov
72f3f7db44 7119294: Two command line options cause JVM to crash
Setup thread register in MacroAssembler::incr_allocated_bytes() on x64

Reviewed-by: kvn
2012-01-05 17:25:58 -08:00
Paul Hohensee
66388c03c9 Merge 2012-01-05 17:16:13 -05:00
Paul Hohensee
2cd87d4e3a 7126480: Make JVM start time in milliseconds since the Java epoch available
Expose existing Management::_begin_vm_creation_time via new accessor Management::begin_vm_creation_time().

Reviewed-by: acorn, dcubed
2012-01-05 17:14:52 -05:00
David Katleman
abee2d7726 Added tag jdk8-b20 for changeset 075cd2a7d88e 2012-01-05 08:42:49 -08:00
David Katleman
43b9e261ed Added tag jdk8-b20 for changeset e069ef26f072 2012-01-05 08:42:40 -08:00
David Katleman
30b95117d5 Added tag jdk8-b20 for changeset 90e14ec89395 2012-01-05 08:42:37 -08:00
David Katleman
f33bdc967a Added tag jdk8-b20 for changeset 4296421cf07a 2012-01-05 08:42:36 -08:00
David Katleman
f03bd3541a Added tag jdk8-b20 for changeset a0bd97631679 2012-01-05 08:42:29 -08:00
David Katleman
e89e1b79bf Added tag jdk8-b20 for changeset 7ed0c3890bb7 2012-01-05 08:42:25 -08:00
David Katleman
a0d920bae5 Added tag jdk8-b20 for changeset 87d3111b6629 2012-01-05 08:42:22 -08:00
Frederic Parain
1de4ad84a2 7125594: C-heap growth issue in ThreadService::find_deadlocks_at_safepoint
Reviewed-by: sspitsyn, dcubed, mchung, dholmes
2012-01-05 07:26:44 -08:00
Daniel D. Daugherty
743a35d2dc 7127032: fix for 7122253 adds a JvmtiThreadState earlier than necessary
Use JavaThread::jvmti_thread_state() instead of JvmtiThreadState::state_for().

Reviewed-by: coleenp, poonam, acorn
2012-01-05 06:24:52 -08:00
Kelly O'Hair
892dcc25fc 7127104: Build issue with prtconf and zones, also using := to avoid extra execs
Reviewed-by: katleman
2012-01-04 17:42:25 -08:00
Lana Steuck
2836fc5d02 Merge 2012-01-04 10:58:12 -08:00
Lana Steuck
a43e73eb81 Merge 2012-01-04 10:57:39 -08:00
Jiangli Zhou
e6157688b4 Merge 2012-01-04 12:36:07 -05:00
Jon Masamitsu
95b987c3ac Merge 2012-01-04 07:56:13 -08:00
Frederic Parain
d1c86caeaa 7104647: Adding a diagnostic command framework
Reviewed-by: mchung, dholmes
2012-01-04 03:49:35 -08:00
Jim Holmlund
799afd934d 7046929: tools/javac/api/T6397104.java fails
Reviewed-by: jjg
2012-01-03 17:18:10 -08:00
Erik Gahlin
5782866b28 7126185: Clean up lasterror handling, add os::get_last_error()
Add os::get_last_error(), replace getLastErrorString() by os::lasterror() in os_windows.cpp.

Reviewed-by: kamg, dholmes
2012-01-03 15:11:31 -05:00
Jonathan Gibbons
a3f0f7b59c 4881269: improve diagnostic for ill-formed tokens
Reviewed-by: mcimadamore
2012-01-03 11:37:00 -08:00
Christopher Gruszka
66d59b683f Merge 2012-01-03 14:34:08 -05:00
Jon Masamitsu
d07885c3c6 Merge 2012-01-03 10:22:19 -08:00
Kumar Srinivasan
6274287b95 7124443: (launcher) test DefaultsLocaleTest fails with Windows shells
Reviewed-by: darcy
2012-01-03 08:33:30 -08:00
Kumar Srinivasan
3890c64b86 7123582: (launcher) display the -version and -XshowSettings
Reviewed-by: alanb
2012-01-03 08:27:37 -08:00
Stefan Karlsson
e0ae7fac7c 7125503: Compiling collectedHeap.cpp fails with -Werror=int-to-pointer-cast with g++ 4.6.1
Used uintptr_t and void* for all the casts and checks in test_is_in.

Reviewed-by: tonyp, jmasa
2012-01-02 10:01:46 +01:00
Karen Kinnear
c323bcdca8 7125934: Add a fast unordered timestamp capability to Hotspot on x86/x64
Add rdtsc detection and inline generation.

Reviewed-by: kamg, dholmes
2012-01-01 11:17:59 -05:00
Chris Hegarty
1d37e604b0 7125055: ContentHandler.getContent API changed in error
Reviewed-by: alanb
2012-01-01 09:24:00 +00:00
Vladimir Kozlov
05ec1c0816 7125879: assert(proj != NULL) failed: must be found
Leave i_o attached to slow allocation call when there are no i_o users after the call.

Reviewed-by: iveresov, twisti
2011-12-30 11:43:06 -08:00
Vladimir Danushevsky
8a8eafcc47 Merge 2011-12-29 20:09:24 -05:00
Stuart Marks
79235d3197 7122061: add -Xlint:all -Werror to warning-free build steps
Reviewed-by: chegar, alanb, dholmes, ohair
2011-12-29 16:39:51 -08:00
David Katleman
d09c9a8fd3 Added tag jdk8-b19 for changeset 8e546b2b9dd0 2011-12-29 15:14:53 -08:00
David Katleman
cb15ac68aa Added tag jdk8-b19 for changeset d0ec48636c58 2011-12-29 15:14:45 -08:00
David Katleman
1209eff35b Added tag jdk8-b19 for changeset 3bf50beb6cfb 2011-12-29 15:14:41 -08:00
David Katleman
da097641d1 Added tag jdk8-b19 for changeset 5d3d2bd1dfd1 2011-12-29 15:14:40 -08:00
David Katleman
9fc4c79d3f Added tag jdk8-b19 for changeset a8d0b94dcf7c 2011-12-29 15:14:33 -08:00
David Katleman
689eb5c788 Added tag jdk8-b19 for changeset d7beecd46eba 2011-12-29 15:14:28 -08:00
David Katleman
a639e6c992 Added tag jdk8-b19 for changeset 13a20c009f86 2011-12-29 15:14:26 -08:00
Vladimir Kozlov
b6828ac542 Merge 2011-12-29 11:37:50 -08:00
Stefan Karlsson
24e4bf6a80 7125516: G1: ~ConcurrentMark() frees incorrectly
Replaced the code with a ShouldNotReachHere

Reviewed-by: tonyp, jmasa
2011-12-29 07:37:23 +01:00
David Katleman
6ddf2df795 Merge 2011-12-28 15:14:24 -08:00
Lana Steuck
99e6dce2a2 Merge 2011-12-28 10:52:11 -08:00
Lana Steuck
3419a755d7 Merge 2011-12-28 10:51:24 -08:00
Jiangli Zhou
0671e90755 7123315: instanceKlass::_static_oop_field_count and instanceKlass::_java_fields_count should be u2 type
Change instanceKlass::_static_oop_field_count and instanceKlass::_java_fields_count to u2 type.

Reviewed-by: never, bdelsart, dholmes
2011-12-28 12:15:57 -05:00
Oleg Pekhovskiy
152a77b4f6 7121482: some sun/java2d and sun/awt tests failed with InvalidPipeException since 1.7.0_03b02, 6u31b02
Reviewed-by: art, bae
2011-12-28 14:26:03 +04:00
Aleksey Ignatenko
c7ec06ba8e 7124829: NUMA: memory leak on Linux with large pages
In os::free_memory() use mmap with the same attributes as for the heap space

Reviewed-by: kvn
2011-12-27 16:43:49 -08:00
Vladimir Kozlov
f96f3e5e85 7123954: Some CTW test crash with SIGSEGV
Correct Allocate expansion code to preserve i_o when only slow call is generated.

Reviewed-by: iveresov
2011-12-27 15:08:43 -08:00
Jon Masamitsu
3c164a7525 Merge 2011-12-27 12:38:49 -08:00
Vladimir Danushevsky
2b6f4a741d Merge 2011-12-26 20:36:01 -05:00
Lana Steuck
9e264f222c Merge 2011-12-23 16:39:22 -08:00
Lana Steuck
2c60c1d450 Merge 2011-12-23 16:38:34 -08:00
Lana Steuck
93603c443d Merge 2011-12-23 16:36:35 -08:00
Lana Steuck
08c6d2dba6 Merge 2011-12-23 16:36:33 -08:00
Lana Steuck
c2f3bed087 Merge 2011-12-23 16:36:23 -08:00
Lana Steuck
f93e67f60f Merge 2011-12-23 16:36:17 -08:00
Alejandro Murillo
059e06b49f 7123810: new hotspot build - hs23-b10
Reviewed-by: jcoomes
2011-12-23 15:29:34 -08:00
Alejandro Murillo
b928899267 Added tag hs23-b09 for changeset 1020a9a071b7 2011-12-23 15:24:44 -08:00
Alejandro Murillo
e1c4fbda9a Merge 2011-12-23 15:24:43 -08:00
Vladimir Kozlov
6c38bc48ca 7110832: ctw/.../org_apache_avalon_composition_util_StringHelper crashes the VM
Distance is too large for one short branch in string_indexofC8().

Reviewed-by: iveresov
2011-12-23 15:24:36 -08:00
Jonathan Gibbons
42b9d6bc2e 7124605: typos in javac comments
Reviewed-by: ksrini
2011-12-23 22:30:33 +00:00
John Cuthbertson
39d61f89a2 7121496: G1: do the per-region evacuation failure handling work in parallel
Parallelize the removal of self forwarding pointers etc. by wrapping in a HeapRegion closure, which is then wrapped inside an AbstractGangTask.

Reviewed-by: tonyp, iveresov
2011-12-23 11:14:18 -08:00
Jon Masamitsu
c18293c806 Merge 2012-01-05 21:21:55 -08:00
Antonios Printezis
3c0eb44a7c 7113006: G1: excessive ergo output when an evac failure happens
Introduce a flag that is set when a heap expansion attempt during a GC fails so that we do not consantly attempt to expand the heap when it's going to fail anyway. This not only prevents the excessive ergo output (which is generated when a region allocation fails) but also avoids excessive and ultimately unsuccessful expansion attempts.

Reviewed-by: jmasa, johnc
2012-01-05 05:54:01 -05:00
Christopher Gruszka
29d2647a0a Merge 2011-12-23 10:43:48 -05:00
Roland Westrelin
59b883333b 7123253: C1: in store check code, usage of registers may be incorrect
Fix usage of input register in assembly code for store check.

Reviewed-by: never
2011-12-23 09:36:23 +01:00
Christine Lu
d69e5e7e94 Added tag jdk8-b18 for changeset ff9cf1de21fa 2011-12-22 19:00:58 -08:00
Christine Lu
c3b4f37dce Added tag jdk8-b18 for changeset 18c0332b5a94 2011-12-22 19:00:41 -08:00
Christine Lu
6f93677a16 Added tag jdk8-b18 for changeset 70e192b61669 2011-12-22 19:00:27 -08:00
Christine Lu
1fba5dd495 Added tag jdk8-b18 for changeset 9bdd4ab27689 2011-12-22 19:00:26 -08:00
Christine Lu
80a5e57301 Added tag jdk8-b18 for changeset c1d8be9305ad 2011-12-22 19:00:20 -08:00
Christine Lu
a786537995 Added tag jdk8-b18 for changeset 7669801cfef1 2011-12-22 19:00:13 -08:00
Christine Lu
8b65c43971 Added tag jdk8-b18 for changeset 73359e35e507 2011-12-22 19:00:11 -08:00
Daniel D. Daugherty
937ae45cd8 7121600: Instrumentation.redefineClasses() leaks class bytes
Call JNI ReleaseByteArrayElements() on memory returned by JNI GetByteArrayElements(). Also push test for 7122253.

Reviewed-by: acorn, poonam
2011-12-22 18:35:48 -08:00
Daniel D. Daugherty
c210a09fdf 7122253: Instrumentation.retransformClasses() leaks class bytes
Change ClassFileParser::parseClassFile() to use the instanceKlass:_cached_class_file_bytes field to avoid leaking the cache.

Reviewed-by: coleenp, acorn, poonam
2011-12-22 12:50:42 -08:00
Vladimir Danushevsky
6446da199d Merge 2011-12-22 12:01:46 -05:00
Stephen Flores
a046e398d5 7076310: (file) AclEntry.Builder setFlags throws IllegalArgumentException if set argument is empty
Reviewed-by: alanb
2011-12-22 10:52:17 +00:00
Roland Westrelin
c10042bc68 7123108: C1: assert(if_state != NULL) failed: states do not match up
In CEE, ensure if and common successor state are at the same inline level

Reviewed-by: never
2011-12-22 10:55:53 +01:00
Weijun Wang
440adedd51 7122169: TcpTimeout fail for various reasons
Reviewed-by: alanb
2011-12-22 15:35:55 +08:00
Coleen Phillimore
5232221c68 Merge 2011-12-21 18:22:14 -08:00
Valerie Peng
9b7ddf1602 6839886: Array overrun in pkcs11
Fix the wrong value when dealing w/ month and day.

Reviewed-by: mullan
2011-12-21 14:08:00 -08:00
Thomas Wuerthinger
a4f6289b4f 7064927: retransformClasses() does not pass in LocalVariableTable of a method
Handle LVT attribute in the class file reconstitutor.

Reviewed-by: phh, coleenp
2011-12-21 16:41:15 -05:00
Bengt Rutisson
056282a67b 7113021: G1: automatically enable young gen size auto-tuning when -Xms==-Xmx
Use a percentage of -Xms as min and another percentage of -Xmx as max for the young gen size

Reviewed-by: tonyp, johnc
2011-12-21 22:13:31 +01:00
Erik Gahlin
5657eb0c6c 7091417: recvfrom's 6th input should be of type socklen_t
Revamp class os's socket method formal args to match socket.h, insert casts in appropriate places, and copyin-copyout int*'s that s/b socklen_t*'s in jvm.cpp.

Co-authored-by: Rickard Backman <rickard.backman@oracle.com>
Co-authored-by: Nils Loodin <nils.loodin@oracle.com>
Co-authored-by: Markus Gronlund <markus.gronlund@oracle.com>
Reviewed-by: coleenp, dholmes
2011-12-21 15:48:16 -05:00
Brandon Passanisi
e4dad47833 7078386: NetworkInterface.getNetworkInterfaces() may return corrupted results on linux
Reviewed-by: michaelm, alanb, chegar
2011-12-21 10:06:32 +00:00
Masayoshi Okutsu
c15d5acd01 7122054: (tz) Windows-only: tzmappings needs update for KB2633952
Reviewed-by: peytoia
2011-12-21 17:09:39 +09:00
Lana Steuck
3f5f0b4dc0 Merge 2011-12-20 15:27:55 -08:00
Lana Steuck
6d9634a306 Merge 2011-12-20 15:26:23 -08:00
Jon Masamitsu
a9c2b784c2 Merge 2011-12-20 12:27:31 -08:00
Roland Westrelin
97439fb4ff 7121140: Allocation paths require explicit memory synchronization operations for RMO systems
Adds store store barrier after initialization of header and body of objects.

Reviewed-by: never, kvn
2011-12-20 16:56:50 +01:00
Bertrand Delsart
82a0e26723 7116216: StackOverflow GC crash
GC crash for explicit stack overflow checks after a C2I transition.

Co-authored-by: Yang Wang <yang02.wang@sap.com>
Reviewed-by: coleenp, never
2011-12-20 12:33:05 +01:00
Anthony Petrov
b3582e243e 7122796: SunToolkit constructor should create the EventQueue for the Main AppContext
Always create an EQ for the main AppContext in SunToolkit constructor

Reviewed-by: art
2011-12-20 12:48:01 +03:00
Paul Hohensee
577403d2ca Merge 2011-12-19 21:38:51 -08:00
Stephen Flores
a8ad56bd5c 6990617: Regular expression doesn't match if unicode character next to a digit
Updated RemoveQEQuotation() to deal with this case correctly

Reviewed-by: sherman
2011-12-19 14:14:14 -08:00
Paul Hohensee
2c192911dd 7122880: Extend vendor-specific command interface to include manageable switches
Add Flag::external_ext()/writable_ext(), both return false.

Reviewed-by: coleenp, zgu
2011-12-19 15:50:47 -05:00
Volker Simonis
f49894d78c 7122939: TraceBytecodes broken with UseCompressedOops
Disable verify_heapbase on sparc if TraceBytecodes because the latter uses r12 as a temp register

Reviewed-by: coleenp, phh
2011-12-19 15:34:09 -05:00
Igor Nekrestyanov
30c9b2b165 Merge 2011-12-19 10:06:23 -08:00
John Cuthbertson
870bea622a 7117303: VM uses non-monotonic time source and complains that it is non-monotonic
Replaces calls to os::javaTimeMillis(), which does not (and cannot) guarantee monotonicity, in GC code to an equivalent expression that uses os::javaTimeNanos(). os::javaTimeNanos is guaranteed monotonically non-decreasing if the underlying platform provides a monotonic time source. Changes in OS files are to make use of the newly defined constants in globalDefinitions.hpp.

Reviewed-by: dholmes, ysr
2011-12-19 10:02:05 -08:00
Denis Fokin
1258946332 7117011: Reduce number of warnings in sun/awt/windows and sun/awt/datatransfer
Reviewed-by: art
2011-12-19 16:44:36 +04:00
Maurizio Cimadamore
61ee75c9d4 7120463: Fix method reference parser support in order to avoid ambiguities
Add lookahead routine to disambiguate between method reference in method context and binary expression

Reviewed-by: jjg, dlsmith
2011-12-19 12:07:07 +00:00
Oleg Pekhovskiy
3704715569 7117334: Warnings cleanup day: reduce number of javac warnings in the java.awt package
Reviewed-by: art, denis, alexsch
2011-12-19 15:21:35 +04:00
Dmeetry Degrave
2829f07b30 7046238: new InitialContext(); hangs
Synchronization on a single monitor for contactInfo parameters with identical hashCode()

Reviewed-by: robm, skoppar
2011-12-18 22:12:41 +04:00
Brandon Passanisi
6702bf177f 7087549: (fs) Files.newInputStream throws UOE for custom provider options
Reviewed-by: alanb
2011-12-17 20:07:14 +00:00
Stuart Marks
be40fd7800 7122235: stop the build if javac fails
Reviewed-by: chegar, dholmes, mcimadamore, ohair
2011-12-17 08:21:23 -08:00
Jim Holmlund
441d03061d 7122342: testPrintProcessorInfo/TestWithXstdout.java failed for JDK8 nightly build at 12/16/2011
Do not pass empty args to javac

Reviewed-by: jjg
2011-12-16 16:41:00 -08:00
Jiangli Zhou
6e894d5474 Merge 2011-12-16 17:33:08 -05:00
Jonathan Gibbons
e559289081 7121961: javadoc is missing a resource property
Reviewed-by: bpatel
2011-12-16 13:49:44 -08:00
Alejandro Murillo
106a949bb5 7122001: new hotspot build - hs23-b09
Reviewed-by: jcoomes
2011-12-16 12:46:17 -08:00
Alejandro Murillo
8fa69349e2 Added tag hs23-b08 for changeset 40104529a61f 2011-12-16 12:37:38 -08:00
Alejandro Murillo
9102dfec84 Merge 2011-12-16 12:38:00 -08:00
Lana Steuck
ea01b60d82 Merge 2011-12-16 12:12:17 -08:00
Christopher Gruszka
928809708d Merge 2011-12-16 15:01:55 -05:00
John Cuthbertson
2768349b41 7120038: G1: ParallelGCThreads==0 is broken
Running G1 with ParallelGCThreads==0 results in various crashes and asserts. Most of these are caused by unguarded references to the worker threads array or an incorrect number of active workers.

Reviewed-by: jmasa, tonyp
2011-12-16 11:40:00 -08:00
Chris Hegarty
d680725432 7095980: Ensure HttpURLConnection (and supporting APIs) don't expose HttpOnly cookies
Reviewed-by: michaelm
2011-12-16 16:09:41 +00:00
Antonios Printezis
8b05b38909 7113012: G1: rename not-fully-young GCs as "mixed"
Renamed partially-young GCs as mixed and fully-young GCs as young. Change all external output that includes those terms (GC log and GC ergo log) as well as any comments, fields, methods, etc. The changeset also includes very minor code tidying up (added some curly brackets).

Reviewed-by: johnc, brutisso
2011-12-16 02:14:27 -05:00
Lana Steuck
1289447ac4 Merge 2011-12-15 19:53:04 -08:00
Lana Steuck
f1c7c499bf Merge 2011-12-15 19:52:13 -08:00
Lana Steuck
fad054567f Merge 2011-12-15 19:49:58 -08:00
Lana Steuck
c81bf9bf17 Merge 2011-12-15 19:49:53 -08:00
Lana Steuck
b6bd9844c4 Merge 2011-12-15 19:49:16 -08:00
Lana Steuck
a6e7001098 Merge 2011-12-15 19:49:11 -08:00
David Katleman
28ab3c9991 Merge 2011-12-15 15:57:51 -08:00
David Katleman
662d105a15 Merge 2011-12-15 15:55:53 -08:00
David Katleman
35d80f6a3a Merge 2011-12-15 15:54:50 -08:00
David Katleman
8d7fa09ac3 Merge 2011-12-15 15:54:22 -08:00
David Katleman
9bfccebaa3 Merge 2011-12-15 15:52:58 -08:00
David Katleman
d0a2e6776c Merge 2011-12-15 15:52:09 -08:00
David Katleman
9119f29f16 Merge 2011-12-15 15:51:50 -08:00
David Katleman
59128f6107 Added tag jdk8-b16 for changeset 3b5651ae449e 2011-12-15 15:47:47 -08:00
David Katleman
64a4e00654 Added tag jdk8-b16 for changeset 9b857545922a 2011-12-15 15:47:31 -08:00
David Katleman
199b7bc5b2 Added tag jdk8-b16 for changeset 76e4bc65bb65 2011-12-15 15:47:26 -08:00
David Katleman
d71f8f6c11 Added tag jdk8-b16 for changeset 235fd08346ca 2011-12-15 15:47:25 -08:00
David Katleman
53b8114278 Added tag jdk8-b16 for changeset 161820e6113e 2011-12-15 15:47:18 -08:00
David Katleman
ec4a2991dc Added tag jdk8-b16 for changeset 76782d63dda5 2011-12-15 15:47:15 -08:00
David Katleman
85b827115f Added tag jdk8-b16 for changeset a13e5e6f9ad0 2011-12-15 15:47:06 -08:00
Xueming Shen
8514873d3d 7118283: Better input parameter checking in zip file processing
Fixed off-by-one bug in zip_util.c

Reviewed-by: alanb
2011-12-15 14:18:56 -08:00
David Katleman
a98e5a19c0 Added tag jdk8-b17 for changeset 27c6c6c32d01 2011-12-15 12:16:55 -08:00
David Katleman
00b5a73ca2 Added tag jdk8-b17 for changeset f93045767e5d 2011-12-15 12:16:36 -08:00
David Katleman
974838e972 Added tag jdk8-b17 for changeset 76e4bc65bb65 2011-12-15 12:16:29 -08:00
David Katleman
c5b3a96b64 Added tag jdk8-b17 for changeset 235fd08346ca 2011-12-15 12:16:26 -08:00
David Katleman
02818b03d5 Added tag jdk8-b17 for changeset 161820e6113e 2011-12-15 12:16:15 -08:00
David Katleman
c3cc27b1d8 Added tag jdk8-b17 for changeset 76782d63dda5 2011-12-15 12:16:09 -08:00
David Katleman
5a902e85b6 Added tag jdk8-b17 for changeset a13e5e6f9ad0 2011-12-15 12:16:02 -08:00
Michael Fang
638f43b009 Merge 2011-12-15 11:29:58 -08:00
Jonathan Gibbons
e850a9fde0 7121682: remove obsolete import
Reviewed-by: jjh
2011-12-14 21:52:59 -08:00
Jonathan Gibbons
b771185497 7121681: compiler message file broken for javac -fullversion
Reviewed-by: jjh
2011-12-14 17:52:41 -08:00
John Cuthbertson
4976ad0ccf 7119908: G1: Cache CSet start region for each worker for subsequent reuse
Cache workers' calculated starting heap region, used for parallel iteration over the collcection set, for subsequent reuse.

Reviewed-by: tonyp, brutisso
2011-12-14 17:43:55 -08:00
Vladimir Danushevsky
958178facc Merge 2011-12-14 20:06:21 -05:00
Jonathan Gibbons
9a127e2710 7111022: javac no long prints last round of processing
7121323: Sqe tests using -Xstdout option fail with an invalid flag error message

Reviewed-by: darcy
2011-12-14 16:16:04 -08:00
Jon Masamitsu
0ebc10bb13 7121618: Change type of number of GC workers to unsigned int
Change variables representing the number of GC workers to uint from int and size_t.  Change the parameter in work(int i) to work(uint worker_id).

Reviewed-by: brutisso, tonyp
2011-12-14 13:34:57 -08:00
Antonios Printezis
1de50427de 7119027: G1: use atomics to update RS length / predict time of inc CSet
Make sure that the updates to the RS length and inc CSet predicted time are updated in an MT-safe way.

Reviewed-by: brutisso, iveresov
2011-12-21 07:53:53 -05:00
Jon Masamitsu
49878e46f3 Merge 2011-12-20 20:29:35 -08:00
Antonios Printezis
9427bd6eec 7123165: G1: output during parallel verification can get messed up
Serialize the worker threads that are generating output during parallel heap verification to make sure the output is consistent.

Reviewed-by: brutisso, johnc, jmasa
2011-12-20 12:59:28 -05:00
Frederic Parain
85db00acd6 7104647: Adding a diagnostic command framework
Reviewed-by: phh, dcubed
2011-12-14 04:30:57 -08:00
Stefan Karlsson
a3943834e1 7121373: Clean up CollectedHeap::is_in
Fixed G1CollectedHeap::is_in, added tests, cleaned up comments and made Space::is_in pure virtual.

Reviewed-by: brutisso, tonyp, jcoomes
2011-12-14 12:15:26 +01:00
Oleg Pekhovskiy
53ea54c90f 7112642: Incorrect checking for graphics rendering object
Reviewed-by: art, bae
2011-12-14 14:43:44 +04:00
Masayoshi Okutsu
666bd54f80 6351654: Problem with java/classes_util_i18n
Reviewed-by: hawtin, coffeys
2011-12-14 11:23:21 +09:00
Naoto Sato
f31e66f99c 4808233: "Locale" not thread-safe
Reviewed-by: okutsu
2011-12-13 15:41:47 -08:00
Jonathan Gibbons
0707071217 7121164: renamed files not committed
Reviewed-by: ksrini
2011-12-13 14:33:39 -08:00
Jonathan Gibbons
ea7f040a8e 7120736: refactor javac option handling
Reviewed-by: mcimadamore
2011-12-13 11:21:28 -08:00
Alexander Scherbatiy
7acd8858d0 7116950: Reduce number of warnings in swing
Reviewed-by: art
2011-12-13 18:38:39 +04:00
Alexander Scherbatiy
84ee878ee3 7120869: javax/swing/JScrollBar/4708809/bug4708809.java fails on Windows
The robot auto-delay is increased to fix the test failing on Windows.

Reviewed-by: alexp
2011-12-13 17:30:21 +04:00
Alexander Scherbatiy
b633dc9918 7112931: closed/javax/swing/JTabbedPane/6416920/bug6416920.java fails on MacOS
Reviewed-by: alexp
2011-12-13 15:32:28 +04:00
Yong Jeffrey Huang
092bb45d80 7003124: In Bulgarian Locale DateFormat is wrong
Reviewed-by: naoto, peytoia
2011-12-12 18:21:42 -08:00
Lana Steuck
ccc8319e5f Merge 2011-12-12 10:08:26 -08:00
Kelly O'Hair
f5bfcb05b2 7119829: Adjust default jprt testing configuration
Reviewed-by: alanb
2011-12-12 08:17:28 -08:00
Kelly O'Hair
daca795ff4 7119829: Adjust default jprt testing configuration
Reviewed-by: alanb
2011-12-12 08:15:32 -08:00
Kelly O'Hair
67b3e95477 7119829: Adjust default jprt testing configuration
Reviewed-by: alanb
2011-12-12 08:15:10 -08:00
Kelly O'Hair
3892973c2b 7119829: Adjust default jprt testing configuration
Reviewed-by: alanb
2011-12-12 08:13:56 -08:00
Kelly O'Hair
5683b67955 7117110: Remove target 1.5 from jaxp and jaxws repo builds for mac
Reviewed-by: alanb
2011-12-12 08:13:22 -08:00
Kelly O'Hair
bf884c6dff 7119829: Adjust default jprt testing configuration
Reviewed-by: alanb
2011-12-12 08:12:38 -08:00
Kelly O'Hair
877c60e798 7117110: Remove target 1.5 from jaxp and jaxws repo builds for mac
Reviewed-by: alanb
2011-12-12 08:12:20 -08:00
Kelly O'Hair
c0323a859a 7119829: Adjust default jprt testing configuration
Reviewed-by: alanb
2011-12-12 08:11:05 -08:00
Chris Hegarty
1c95ce5e42 Merge 2011-12-12 03:54:42 -08:00
Charles Lee
622ac75d6b 7118907: InetAddress.isReachable() should return false if sendto fails with EHOSTUNREACH
Reviewed-by: alanb, chegar
2011-12-12 11:41:10 +00:00
Alexander Scherbatiy
43c224b608 7105890: closed/javax/swing/JScrollBar/4708809/bug4708809.java deadlocks on MacOS
Reviewed-by: alexp
2011-12-12 15:33:49 +04:00
Doug Lea
87062ca29f 7118066: Warnings in java.util.concurrent package
Reviewed-by: chegar, dholmes
2011-12-12 10:45:54 +00:00
Maurizio Cimadamore
bf0106a903 7120266: javac fails to compile hotspot code
Parser changes for method references cause bad intercation with method call syntax

Reviewed-by: jjg
2011-12-11 17:48:25 +00:00
Kumar Srinivasan
d7cfaf1336 7119487: JavacParserTest.java test fails on Windows platforms
Reviewed-by: jjg
2011-12-10 17:44:46 -08:00
Jon Masamitsu
714e978aac 7119584: UseParallelGC barrier task can be overwritten
Provoke a GC for a metadata allocation failure.

Reviewed-by: johnc, iveresov
2011-12-09 19:28:34 -08:00
Jim Holmlund
6d0e8939c1 7117053: Fix build warnings in com/sun/tools/jdi/*
Warnings fixed.  Also reviewed by serguei.spitsyn@oracle.com, who is not yet an openjdk reviewer

Reviewed-by: ksrini
2011-12-09 12:56:22 -08:00
Jiangli Zhou
fafb59a0dc Merge 2011-12-09 11:29:05 -08:00
Jan Lahoda
7beeeca1de 7119032: (javac) increase visibility of JavacParser methods to improve subtyping
Reviewed-by: jjg
2011-12-09 08:40:40 -08:00
Jon Masamitsu
bb40d3f9f4 Merge 2011-12-09 06:46:57 -08:00
Stuart Marks
5eaf5ed9bc 7118546: fix warnings in javax.xml.crypto, javax.script
Reviewed-by: mullan
2011-12-08 14:57:13 -08:00
Omair Majid
d312aad0c1 7117612: Miscellaneous warnings in java.lang
Reviewed-by: smarks, dholmes, alanb, darcy
2011-12-08 13:48:54 -05:00
Vladimir Kozlov
98ac731a94 Merge 2011-12-08 10:27:33 -08:00
Vladimir Danushevsky
f930f9f6f6 7050298: ARM: SIGSEGV in JNIHandleBlock::allocate_handle
Missing release barrier in Monitor::IUnlock

Reviewed-by: dholmes, dice
2011-12-07 16:47:08 -05:00
David Katleman
bf6c7ea1f7 Merge 2011-12-07 13:02:35 -08:00
David Katleman
569c7fb353 Merge 2011-12-07 13:02:34 -08:00
Prasannaa
92f2120b41 7117249: fix warnings in java.util.jar, .logging, .prefs, .zip
Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>
Co-authored-by: Goerge Albrecht <goerge.albrecht@gmx.net>
Co-authored-by: Graham Allan <grundlefleck@googlemail.com>
Co-authored-by: Michael Barker <mikeb01@gmail.com>
Reviewed-by: alanb, dholmes, forax, sherman, smarks
2011-12-07 12:12:50 -08:00
Matherey Nunez
2b9e2e9038 7086015: fix test/tools/javac/parser/netbeans/JavacParserTest.java
Reviewed-by: ksrini, jjg
2011-12-07 10:47:46 -08:00
Antonios Printezis
4799ed65a4 7118202: G1: eden size unnecessarily drops to a minimum
An integer underflow can cause the RSet lengths to be massively overpredicted which forces the eden size to the minimum.

Reviewed-by: brutisso, johnc
2011-12-07 12:54:51 -05:00
Daniel D. Daugherty
2a6a2b2d0a 7118648: disable compressed oops by default on MacOS X until 7118647 is fixed
UseCompressedOops is false by default on MacOS X; can still be set manually

Reviewed-by: jmelvin, kvn, dholmes
2011-12-07 07:27:09 -08:00
Artem Ananiev
277bb6b756 7117008: Warnings cleanup day: reduce number of javac warnings in the sun.awt package
Reviewed-by: anthony, denis, bagiras
2011-12-07 17:45:22 +04:00
Stefan Karlsson
e057d60ca1 7118863: Move sizeof(klassOopDesc) into the *Klass::*_offset_in_bytes() functions
Moved sizeof(klassOopDesc), changed the return type to ByteSize and removed the _in_bytes suffix.

Reviewed-by: never, bdelsart, coleenp, jrose
2011-12-07 11:35:03 +01:00
Vladimir Kozlov
dc542c9909 7121648: Use 3-operands SIMD instructions on x86 with AVX
Use 3-operands SIMD instructions in C2 generated code for machines with AVX.

Reviewed-by: never
2011-12-20 00:55:02 -08:00
Tom Rodriguez
2928feab6a 7121073: secondary_super_cache memory slice has incorrect bounds in flatten_alias_type
Reviewed-by: kvn
2011-12-19 14:16:23 -08:00
Vladimir Kozlov
b7f5d60a7e 7116452: Add support for AVX instructions
Added support for AVX extension to the x86 instruction set.

Reviewed-by: never
2011-12-14 14:54:38 -08:00
Igor Veresov
11dbaed93f 7121111: -server -Xcomp -XX:+TieredCompilation does not invoke C2 compiler
Exercise C2 more in tiered mode with Xcomp

Reviewed-by: kvn, never
2011-12-13 17:10:52 -08:00
Roland Westrelin
ebdae40c34 7114106: C1: assert(goto_state->is_same(sux_state)) failed: states must match now
Fix C1's CEE to take inlining into account when the stacks in states are compared.

Reviewed-by: iveresov, never
2011-12-13 10:54:47 +01:00
Igor Veresov
d447f02608 7119730: Tiered: SIGSEGV in AdvancedThresholdPolicy::is_method_profiled(methodOop)
Added handles for references to methods in select_task()

Reviewed-by: twisti, kvn
2011-12-12 12:44:08 -08:00
Lana Steuck
0b862d6dc1 Merge 2011-12-06 20:26:09 -08:00
Lana Steuck
2850e97062 Merge 2011-12-06 20:25:20 -08:00
Igor Nekrestyanov
1d6ad94698 Merge 2011-12-06 16:31:58 -08:00
Lana Steuck
50319d95be Merge 2011-12-06 16:17:15 -08:00
Lana Steuck
74a4760171 Merge 2011-12-06 16:15:34 -08:00
Jiangli Zhou
f9f4ba0203 7117052: instanceKlass::_init_state can be u1 type
Change instanceKlass::_init_state field to u1 type.

Reviewed-by: bdelsart, coleenp, dholmes, phh, never
2011-12-06 18:28:51 -05:00
Vladimir Danushevsky
545cea9371 Merge 2011-12-06 16:35:04 -05:00
Brandon Passanisi
c7a1eec197 7116997: fix warnings in java.util.PropertyPermission
Reviewed-by: smarks
2011-12-06 10:14:02 -08:00
David Katleman
f8deb3b653 7117162: jdk8/jaxws/Makefile default DROPS_DIR should set to jdk8-drops
Reviewed-by: ohair, xdono, mchung
2011-12-06 08:43:57 -08:00
David Katleman
58672f238e 7117162: jdk8/jaxws/Makefile default DROPS_DIR should set to jdk8-drops
Reviewed-by: ohair, xdono, mchung
2011-12-06 08:43:27 -08:00
Daniel D. Daugherty
66ebef88a0 Merge 2011-12-06 05:28:17 -08:00
Naoto Sato
272537ad66 7117469: Warning cleanup for j.u.Currency and j.u.Locale related classes
Reviewed-by: okutsu, smarks
2011-12-05 17:08:52 -08:00
Danesh Dadachanji
95afca84d2 7116993: fix warnings in java.applet
Reviewed-by: art, smarks
2011-12-05 16:30:32 -08:00
Yuka Kamiya
8c1b558a38 7116914: Miscellaneous warnings (sun.text)
Reviewed-by: smarks, okutsu
2011-12-06 08:39:02 +09:00
Daniel D. Daugherty
8e680b0d66 7117748: SA_APPLE_BOOT_JAVA and ALWAYS_PASS_TEST_GAMMA settings should not be required on MacOS X
Replace SA_APPLE_BOOT_JAVA with logic that checks the boot JDK for the location of JDI classes. ALWAYS_PASS_TEST_GAMMA is true by default on Darwin.

Reviewed-by: kvn, swingler
2011-12-05 14:55:16 -08:00
Brandon Passanisi
4744f6dd1d 5063455: (fmt) MissingFormatArgumentException.getFormatSpecifier() incorrect return value
Updated the incorrect StringBuilder constructor usage

Reviewed-by: dholmes, sherman
2011-12-05 10:50:14 -08:00
Paul Hohensee
6532572c0b 7117389: Add a framework for vendor-specific command line switch extensions to Hotspot
Add a file, globals_ext.hpp, containing a null interface, to be replaced by a vendor in altsrc as needed.

Reviewed-by: coleenp, kamg, dholmes, johnc, jrose
2011-12-05 12:50:00 -05:00
Christopher Gruszka
85b77bf993 Merge 2011-12-05 12:41:38 -05:00
Doug Lea
c5cb5b2ac5 7117360: Warnings in java.util.concurrent.atomic package
Reviewed-by: chegar, dholmes
2011-12-05 13:58:44 +00:00
Sergey Bylokhov
34876429cb 7115400: jdk 8 awt-gate build fails in headless toolkit on solaris
Reviewed-by: prr, art, bae
2011-12-05 17:11:57 +04:00
Alan Bateman
226dc93377 Merge 2011-12-05 12:24:17 +00:00
Alan Bateman
5751fb4a86 7117717: (aio) Tests failing due to implementation bug 7052549
Reviewed-by: weijun, chegar
2011-12-05 12:23:46 +00:00
Weijun Wang
3e1629b963 7116857: Warnings in javax.security and some sun.misc
Reviewed-by: smarks
2011-12-05 10:19:13 +08:00
Phil Race
2bea67436c 7117199: Fix javac warnings in src/share/classes/java/awt/font
Reviewed-by: jgodinez, bae
2011-12-03 16:26:08 -08:00
Mario Torre
163d5239e1 7117914: Fix javac warnings in src/share/classes/sun/java2d
Fix some javac warnings in java2d related code for the Warning Cleanup Day.

Reviewed-by: prr, flar
2011-12-03 15:40:49 +01:00
Vladimir Kozlov
78034a3d3b 7117282: assert(base == NULL || t_adr->isa_rawptr() || !phase->type(base)
Delay memory node transformation until the memory is processed.

Reviewed-by: iveresov, never
2011-12-02 21:37:19 -08:00
John Coomes
8efc0954af 7117536: new hotspot build - hs23-b08
Reviewed-by: johnc
2011-12-02 21:10:45 -08:00
Masayoshi Okutsu
6dbd0de785 7117487: Warnings Cleanup: some i18n classes in java.util and sun.util
Reviewed-by: lancea, naoto
2011-12-03 10:58:19 +09:00
Lance Andersen
1c74eea15d 7116445: Miscellaneous warnings in the JDBC/RowSet classes
Reviewed-by: smarks, chegar
2011-12-02 19:33:54 -05:00
Jon VanAlten
d69cbad3f9 7117585: Eliminate java.lang.instrument, java.lang.management warnings
Reviewed-by: mchung
2011-12-02 16:29:19 -08:00
Darryl Mocek
689ccf050d 5035850: (str) String.CASE_INSENSITIVE_ORDER should override readResolve()
Fix to ensure singleton property of String.CaseInsensitiveComparator is maintained through de/serialization.

Reviewed-by: alanb, forax, smarks, dholmes
2011-12-02 16:25:35 -08:00
Naoto Sato
99fe6f9a78 7117465: Warning cleanup for IMF classes
Reviewed-by: okutsu
2011-12-02 16:04:16 -08:00
John Coomes
958027e9e5 Added tag hs23-b07 for changeset 3ba6557b91f7 2011-12-02 15:11:40 -08:00
John Coomes
33078ffeba Merge 2011-12-02 15:11:18 -08:00
Alan Bateman
2b5cf7aebd 7117357: Warnings in sun.instrument, tools and other sun.* classes
Reviewed-by: lancea, chegar
2011-12-02 17:37:30 +00:00
Chris Hegarty
6303a14f1a 7116957: javax.script.ScriptEngineManager should use java.util.ServiceLoader to lookup service providers
Reviewed-by: alanb, lancea
2011-12-02 14:17:08 +00:00
Antonios Printezis
dc409847c8 Merge 2011-12-02 08:52:53 -05:00
Chris Hegarty
445a917081 7116946: JSSecurityManager should use java.util.ServiceLoader to lookup service providers
Reviewed-by: prr
2011-12-02 11:39:48 +00:00
Yuka Kamiya
ed8a1e0c94 7056472: Speed up test/java/util/ResourceBundle/Control/ExpirationTest.sh
Reviewed-by: okutsu
2011-12-02 16:09:14 +09:00
Sebastian Sickelmann
dc1cd38b85 7116890: additional warnings fixes for java.io
Reviewed-by: alanb, smarks
2011-12-01 16:14:41 -08:00
Coleen Phillimore
61c91a521d Merge 2011-12-01 13:42:41 -05:00
Maurizio Cimadamore
b4263161d9 7116954: Misc warnings in java.beans/java.beans.context
Remove generic warnings form java.beans and java.beans.context

Reviewed-by: alanb, chegar
2011-12-01 18:34:23 +00:00
David Katleman
d115f54e18 Added tag jdk8-b15 for changeset 14b0b1e3dd43 2011-12-01 10:33:34 -08:00
David Katleman
250c83949b Added tag jdk8-b15 for changeset 64fbc4786179 2011-12-01 10:33:26 -08:00
David Katleman
8161661bbb Added tag jdk8-b15 for changeset 0c8bd2a7ecb9 2011-12-01 10:33:23 -08:00
David Katleman
c66f24bf21 Added tag jdk8-b15 for changeset ab11a4dcb014 2011-12-01 10:33:22 -08:00
David Katleman
69c6b12309 Added tag jdk8-b15 for changeset 2e0d0fb7ccc8 2011-12-01 10:33:15 -08:00
David Katleman
b4354d6d72 Added tag jdk8-b15 for changeset e82c66df0a41 2011-12-01 10:33:11 -08:00
David Katleman
a8e5c16716 Added tag jdk8-b15 for changeset a31cbe56aacf 2011-12-01 10:33:09 -08:00
Chris Hegarty
02a9029229 7116722: Miscellaneous warnings sun.misc ( and related classes )
Reviewed-by: alanb, darcy, forax, hawtin, lancea
2011-12-01 11:09:54 +00:00
Igor Veresov
e60b163500 7116795: Tiered: enable by default for server
Enable tiered compilation on server VM by default

Reviewed-by: kvn, never
2011-11-30 17:35:51 -08:00
Stuart Marks
af629d027c 7116322: enhance javac make rule with a little bit of instrumentation
Reviewed-by: dholmes, ohair
2011-11-30 13:11:16 -08:00
Lana Steuck
cb909e068c Merge 2011-11-30 12:06:49 -08:00
Paul Hohensee
5e1d1487de 7116730: Revert 7116481: Commercial features in Hotspot must be gated by a switch
Revert 7116481 to current hsx/hotspot-main

Reviewed-by: kamg
2011-11-30 12:48:52 -05:00
Alexandr Scherbatiy
407d05d5e8 7115357: closed/javax/swing/JTable/6263446/bug6263446Table.java fails on MacOS
Reviewed-by: rupashka
2011-11-30 19:38:56 +04:00
Alexandr Scherbatiy
988204b65e 7110440: closed/javax/swing/JScrollBar/4865918/bug4865918.java fails on Aqua L&F
Reviewed-by: rupashka
2011-11-30 16:54:27 +04:00
Alan Bateman
8b11c10364 7116404: Miscellaneous warnings (java.rmi.**, serialization, some core classes)
Reviewed-by: lancea, chegar, smarks
2011-11-30 12:42:26 +00:00
Alan Bateman
cff2cf5eaf 7030624: size_t usages in src/windows/native/java/io/io_util_md.c need to be re-visited
Reviewed-by: lancea, chegar
2011-11-30 10:57:51 +00:00
Lana Steuck
5a5111e51f Merge 2011-11-29 15:57:33 -08:00
Paul Hohensee
1372b916ff 7116481: Commercial features in Hotspot must be gated by a switch
Add -XX:+UnlockCommercialVMOptions to gate use of commercial feature switches in the same way as -XX:UnlockDiagnosticVMOptions gates use of diagnostic feature switches.

Reviewed-by: jwilhelm, kamg
2011-11-29 17:00:46 -05:00
Lana Steuck
cde4fd9054 Merge 2011-11-29 13:49:18 -08:00
Xueming Shen
8df2ceb118 7109837: Provide a mechanism for computing an Adler32 checksum for the contents of a ByteBuffer
Added methods Adler32/CRC32.update(ByteBuffer)

Reviewed-by: alanb
2011-11-29 13:05:35 -08:00
Lana Steuck
a7460d5856 Merge 2011-11-29 12:04:55 -08:00
Bob Vandette
8e81e037e7 Merge 2011-11-29 14:44:44 -05:00
Xueming Shen
5b3d1ed37b 7110149: Update the JDK8 bundled zlib library to the latest version 1.2.5
Updated to zlib-1.2.5

Reviewed-by: alanb
2011-11-29 11:39:59 -08:00
Michael McMahon
31933d1f8f 7116189: Export JVM_SetNativeThreadName from Hotspot
Added JVM_SetNativeThreadName to linker mapfiles on Solaris and Linux.

Reviewed-by: dcubed, dholmes
2011-11-29 09:21:02 -05:00
Alexandr Scherbatiy
6087c7f96c 7112925: closed/javax/swing/JTabbedPane/4624207/bug4624207.java fails on MacOS
Reviewed-by: rupashka
2011-11-29 12:47:30 +03:00
David Holmes
ac8579d7f8 7109092: Wrong computation results with double at armsflt
Need to link to custom soft-float library with required FP accuracy

Reviewed-by: alanb, ohair
2011-11-29 00:26:22 -05:00
Vladimir Kozlov
e187503af0 7112478: after 7105605 JRuby bench_define_method_methods.rb fails with NPE
Fixed several EA issues with Connection Graph construction.

Reviewed-by: never, twisti
2011-11-28 15:46:31 -08:00
Lana Steuck
95e9cd174d Merge 2011-11-28 15:15:50 -08:00
Maurizio Cimadamore
b0a9998899 7115052: Add parser support for method references
Add support for parsing method references to JavacParser

Reviewed-by: jjg
2011-11-28 16:05:46 +00:00
Maurizio Cimadamore
4ac518143c 7115050: Add parser support for lambda expressions
Add support for parsing lambda expressions to JavacParser

Reviewed-by: jjg
2011-11-28 15:56:42 +00:00
Stefan Karlsson
78d7be03bf 7116081: USE_PRECOMPILED_HEADER=0 triggers a single threaded build of the JVM
Changed the conditional to see if the precompiled header has been specified. Also, removed the unused PrecompiledOption.

Reviewed-by: dholmes, brutisso
2011-11-28 14:58:31 +01:00
Stefan Karlsson
fcdf022370 7112034: Parallel CMS fails to properly mark reference objects
Enabled reference processing when work stealing during concurrent marking

Reviewed-by: jmasa, brutisso
2011-11-28 10:19:26 +01:00
Antonios Printezis
a551d5bf05 Merge 2011-12-05 12:26:40 -05:00
John Cuthbertson
a71320f229 7114095: G1: assert(obj == oopDesc::load_decode_heap_oop(p)) failed: p should still be pointing to obj
As a result of  the changes for 4965777, the G1 reference field scanning closure could be applied to the discovered field of a reference object twice. The failing assert is too strong if the result of the first application of the closure is stolen, and the referenced object, evacuated by another worker thread.

Reviewed-by: ysr, tonyp
2011-12-02 12:39:23 -08:00
Alexandr Scherbatiy
e8cf8cce56 7113337: Swing closed test tries to click in the area reserved for resize by Mac OS X
Reviewed-by: rupashka
2011-11-25 11:52:23 +03:00
Maurizio Cimadamore
86e6e6be73 7115049: Add AST node for method references
Add tree nodes for representing method/constructor references and update relevant visitors interfaces

Reviewed-by: jjg
2011-11-24 13:38:40 +00:00
Maurizio Cimadamore
41a3a6c5d3 7115046: Add AST node for lambda expressions
Add tree nodes for representing lambda expressions and update relevant visitors interfaces

Reviewed-by: jjg
2011-11-24 13:36:20 +00:00
Lana Steuck
664095be9f Merge 2011-11-23 11:37:18 -08:00
Sean Coffey
aba5b47101 7102369: remove java.rmi.server.codebase property parsing from registyimpl
7094468: rmiregistry clean up

Reviewed-by: smarks
2011-11-23 14:55:01 +00:00
Gary Adams
6ffc2c3b69 6776144: java/lang/ThreadGroup/NullThreadName.java fails with Thread group is not destroyed ,fastdebug LINUX
Reviewed-by: chegar, dholmes
2011-11-23 12:30:19 +00:00
Xue-Lei Andrew Fan
7115a56a21 7113275: compatibility issue with MD2 trust anchor and old X509TrustManager
Also reviewed by Dennis.Gu@oracle.com

Reviewed-by: mullan
2011-11-23 03:40:12 -08:00
Jon Masamitsu
71ed60ac69 7112997: Remove obsolete code ResetObjectsClosure and VerifyUpdateClosure
Remove obsolete code.

Reviewed-by: brutisso, ysr, jcoomes
2011-11-22 14:59:34 -08:00
Jon Masamitsu
404bb0d0ac 7106024: CMS: Removed unused code for precleaning in remark phase
Remove dead code.

Reviewed-by: stefank, ysr
2011-11-22 14:18:39 -08:00
Sean Mullan
2616d09d07 Merge 2011-11-22 09:17:45 -05:00
Sean Mullan
1703c46f8b Merge 2011-11-22 09:00:52 -05:00
Sean Mullan
82c2945b95 7093090: Reduce synchronization in java.security.Policy.getPolicyNoCheck
Reviewed-by: valeriep
2011-11-22 08:58:31 -05:00
Neil Richards
a3e56c5b67 7114558: Inet4AddressImpl should use memset (rather than bzero) and NI_MAXHOST (rather than MAXHOSTNAMELEN)
Reviewed-by: chegar
2011-11-22 09:51:30 +00:00
Roland Westrelin
07d9df5a7f 7090968: Allow adlc register class to depend on runtime conditions
Allow reg_class definition as a function.

Reviewed-by: kvn, never
2011-11-22 09:45:57 +01:00
Coleen Phillimore
800499ac95 Merge 2011-11-21 10:22:04 -05:00
Alexandr Scherbatiy
20168f092c 7109085: Test use hotkeys not intended for Mac
Reviewed-by: rupashka
2011-11-21 18:22:30 +04:00
Gary Adams
dbdf12e6a5 7114125: TEST_BUG: java/util/Timer/KillThread.java should use volatile cross thread variable declaration
Reviewed-by: dholmes, alanb
2011-11-21 12:57:36 +00:00
Gary Adams
0a416094b6 7084033: TEST_BUG: test/java/lang/ThreadGroup/Stop.java fails intermittently
Reviewed-by: forax, chegar, dholmes
2011-11-21 12:51:30 +00:00
Rickard Backman
069f218a98 7112308: Fix Visual Studio build for precompiled header
Add the new path to precompiled.hpp in the project make file

Reviewed-by: coleenp, dholmes, brutisso
2011-11-21 08:02:40 +01:00
Jim Holmlund
5349d9af9a 7110611: compiler message file broken for javac -fullversion
Reviewed-by: jjg
2011-11-19 15:54:04 -08:00
Gary Adams
325b9e4abb 6860309: TEST_BUG: Insufficient sleep time in java/lang/Runtime/exec/StreamsSurviveDestroy.java
Reviewed-by: alanb, dholmes, forax
2011-11-19 20:03:00 +00:00
Gary Adams
e0de33a847 6731620: TEST_BUG: java/util/Timer/Args.java is too optimistic about the execution time of System.out.printf
Reviewed-by: dholmes, forax
2011-11-19 19:59:33 +00:00
Gary Adams
673ab99f16 6818464: TEST_BUG: java/util/Timer/KillThread.java failing intermittently
Reviewed-by: dholmes, alanb, forax
2011-11-19 19:55:19 +00:00
Alejandro Murillo
e53317616f 7113503: Bump the hs23 build number to 07
Reviewed-by: johnc
2011-11-18 17:39:40 -08:00
John Coomes
6da51f66cd Merge 2011-11-18 16:57:01 -08:00
Lana Steuck
034a5cae42 Merge 2011-11-18 16:16:15 -08:00
Lana Steuck
7bcad978ba Merge 2011-11-18 15:49:09 -08:00
John Coomes
b9ff98b776 Added tag hs23-b06 for changeset 6b882ec466cd 2011-11-18 15:15:54 -08:00
John Coomes
df1266ed6e Merge 2011-11-18 15:15:13 -08:00
Coleen Phillimore
4f63d5b7d5 Merge 2011-11-18 17:26:49 -05:00
Lana Steuck
a8308c6690 Merge 2011-11-18 11:12:21 -08:00
Lana Steuck
9240eb2ee9 Merge 2011-11-18 11:11:11 -08:00
Lana Steuck
9c6fd0a346 Merge 2011-11-18 11:01:41 -08:00
Andy Herrick
638a8b7435 Merge 2011-11-18 06:35:36 -05:00
Neil Richards
c125edce88 7094995: Trailing daemon thread causes continuous GC in agentvm mode
Shutdown GcInducingThread once test (successfully) finishes

Reviewed-by: alanb, chegar, dholmes, darcy
2011-11-18 09:03:43 +00:00
Jonathan Lu
dfda4bf46a 7115070: (fs) lookupPrincipalByName/lookupPrincipalByGroupName should treat ESRCH as not found
Reviewed-by: alanb
2011-11-24 11:34:31 +00:00
Xue-Lei Andrew Fan
b806440fe3 7115524: sun.security.provider.certpath.ssl.SSLServerCertStore no longer works
Reviewed-by: weijun
2011-11-28 02:35:19 -08:00
Weijun Wang
687f622f95 7115744: Do not call File::deleteOnExit in security tests
Reviewed-by: xuelei
2011-11-28 18:16:29 +08:00
Krystal Mok
c04d87b88b 7115586: Suppress creation of SocketImpl in SocketAdaptor's constructor
Reviewed-by: chegar, alanb
2011-11-25 13:46:28 +00:00
Chris Hegarty
6742077be9 7115150: java.net.HttpCookie code cleanup, style, formatting, typos
Reviewed-by: michaelm
2011-11-25 10:34:05 +00:00
Weijun Wang
9111a2a768 7077172: KerberosTime does not take into account system clock adjustement
Reviewed-by: valeriep
2011-11-18 16:13:39 +08:00
Christopher Gruszka
383070b5f8 Merge 2011-11-18 01:03:03 -05:00
Gary Adams
29ad75ff83 7067691: java/lang/management/PlatformLoggingMXBean/LoggingMXBeanTest.java failing intermittently
Reviewed-by: alanb, mchung
2011-11-17 15:47:34 -08:00
Stuart Marks
348fa7b88e 7112267: clean up fix for 7110700
Reviewed-by: dmeetry
2011-11-17 15:04:46 -08:00
Christopher Gruszka
f1a031d983 Merge 2011-11-17 16:57:00 -05:00
John Cuthbertson
a3311881b5 7112743: G1: Reduce overhead of marking closure during evacuation pauses
Parallelize the serial code that was used to mark objects reachable from survivor objects in the collection set. Some minor improvments in the timers used to track the freeing of the collection set along with some tweaks to PrintGCDetails.

Reviewed-by: tonyp, brutisso
2011-11-17 12:40:15 -08:00
John Cuthbertson
861168c82e 7114303: G1: assert(_g1->mark_in_progress()) failed: shouldn't be here otherwise
Race between the VM thread reading G1CollectedHeap::_mark_in_progress and it being set by the concurrent mark thread when concurrent marking is aborted by a full GC. Have the concurrent mark thread join the SuspendibleThreadSet before changing the marking state.

Reviewed-by: tonyp, brutisso
2011-11-28 09:49:05 -08:00
Sean Coffey
2142a46875 7110704: Issues with some method in corba
Reviewed-by: mbankal
2011-11-17 10:51:17 -08:00
David Katleman
9fbb77c394 Added tag jdk8-b14 for changeset aab57958af8d 2011-11-17 10:46:10 -08:00
David Katleman
67feae118c Added tag jdk8-b14 for changeset 21d97162fe47 2011-11-17 10:46:02 -08:00
David Katleman
f9f73b74a4 Added tag jdk8-b14 for changeset 9b823c528db3 2011-11-17 10:46:00 -08:00
David Katleman
4246239742 Added tag jdk8-b14 for changeset 8f64d0e75d9e 2011-11-17 10:45:59 -08:00
David Katleman
32a189c4f9 Added tag jdk8-b14 for changeset a4a9e5c60f0a 2011-11-17 10:45:53 -08:00
David Katleman
a61df2e304 Added tag jdk8-b14 for changeset 21889dc8d0c4 2011-11-17 10:45:48 -08:00
David Katleman
fd76da6d21 Added tag jdk8-b14 for changeset dcafb43249cf 2011-11-17 10:45:47 -08:00
Charles Lee
add77dda1a 7113017: Use POSIX compliant include file headers in sun/awt/medialib/mlib_types.h
Reviewed-by: prr, bae
2011-11-17 10:32:05 -08:00
Antonios Printezis
4964702bad Merge 2011-11-17 13:14:49 -05:00
Jiangli Zhou
ee88278d34 7102776: Pack instanceKlass boolean fields into single u1 field
Reduce class runtime memory usage by packing 4 instanceKlass boolean fields into single u1 field. Save 4-byte for each loaded class.

Reviewed-by: dholmes, bobv, phh, twisti, never, coleenp
2011-11-17 12:53:59 -05:00
Chris Hegarty
9a65ac929d 7110017: is_headless_jre should be updated to reflect the new location of awt toolkit libraries
Reviewed-by: dholmes, dsamersoff
2011-11-16 20:38:24 -05:00
Poonam Bajaj
9b428e449c 7110428: Crash during HeapDump operation
Reviewed-by: ysr, dholmes
2011-11-16 16:27:29 -08:00
Kumar Srinivasan
70b9eef84e 7112160: jdk8 javadoc failure in jdk/make/docs javadoc: error - java.lang.OutOfMemoryError
Reviewed-by: ohair, katleman
2011-11-16 12:23:53 -08:00
Oleg Pekhovskiy
3cf1d6ac15 7108598: Pogo Table Games freeze with JDK 7
Reviewed-by: art, ant
2011-11-16 15:40:59 +04:00
Thomas Ng
fe50fa5abf 7112298: remove security baseline sanity check
Reviewed-by: ccheung, igor, ohair
2011-11-15 23:33:49 -08:00
Masayoshi Okutsu
84c0953dfa Merge 2011-11-16 13:17:44 +09:00
Masayoshi Okutsu
7e7549fdeb 7111903: (tz) Windows-only: tzmappings needs update for KB2570791
Reviewed-by: peytoia
2011-11-16 12:57:54 +09:00
Weijun Wang
44dd83da70 7111579: klist starttime, renewtill, ticket etype
Reviewed-by: mullan
2011-11-16 11:53:40 +08:00
Bengt Rutisson
ed1e70076b 7110152: assert(size_in_words <= (julong)max_jint) failed: no overflow
Reduce what arrayOopDesc::max_array_length() returns to avoid int overflow

Reviewed-by: kvn, dholmes, tonyp
2011-11-15 20:17:33 +01:00
Coleen Phillimore
0eb37550d3 Merge 2011-11-15 12:40:55 -05:00
Lana Steuck
3fc6cda1a6 Merge 2011-11-14 18:18:59 -08:00
Lana Steuck
9fb09f41b6 Merge 2011-11-14 18:18:22 -08:00
Lana Steuck
2107f2eeec Merge 2011-11-14 18:16:47 -08:00
Lana Steuck
e2900aaf68 Merge 2011-11-14 18:16:46 -08:00
Lana Steuck
20852f81df Merge 2011-11-14 18:16:31 -08:00
Lana Steuck
0033948814 Merge 2011-11-14 18:16:28 -08:00
Lana Steuck
674fadf1b3 Merge 2011-11-14 18:16:13 -08:00
Lana Steuck
613e94ca6f Merge 2011-11-14 18:15:37 -08:00
Kumar Srinivasan
b7094ba03c 7106166: (javac) re-factor EndPos parser
Reviewed-by: jjg
2011-11-14 15:11:10 -08:00
Abhijit Saha
f03cbcc678 Merge 2011-11-14 11:52:09 -08:00
Kumar Srinivasan
ca1deee4d3 7110974: (javac) add coding conventions and style checkers for langtools
Reviewed-by: jjg
2011-11-14 08:09:47 -08:00
Kurchi Subhra Hazra
1dc8937659 7107020: java.net.PlainSocketImpl.socketSetOption() calls itself
Reviewed-by: alanb, chegar
2011-11-14 10:06:56 +00:00
Xue-Lei Andrew Fan
ab7852e129 7111548: unexpected debug log message
Reviewed-by: wetmore
2011-11-14 01:21:20 -08:00
Thomas Ng
f622d7c806 7109885: security baseline for 7u2 or above is not set correctly
Reviewed-by: ccheung, igor, ohair
2011-11-13 21:39:57 -08:00
Sergey Bylokhov
c007822f02 6996291: command line selection of MToolkit by -Dawt.toolkit=sun.awt.motif.MToolkit fails from jdk7 b21 on
Reviewed-by: art, dcherepanov, bae, prr
2011-11-12 04:13:38 +04:00
Sergey Malenkov
1612a6cb79 7110521: Regression test failed: Introspector/TestTypeResolver.java
Reviewed-by: rupashka
2011-11-14 14:38:36 +04:00
Alexandr Scherbatiy
1131098297 7109617: Test was writed for Metal L&F but not set it
Reviewed-by: rupashka
2011-11-14 14:00:05 +04:00
Stuart Marks
d6e13af09c 7110700: Enhance exception throwing mechanism in ObjectStreamClass
Reviewed-by: dmeetry, hawtin
2011-11-11 15:22:11 -08:00
Charles Lee
5f797b5bda 7112670: Inet4AddressImpl should use getaddrinfo/getnameinfo
Reviewed-by: chegar, alanb, mduigou, ngmr
2011-11-11 14:40:18 +00:00
Danesh Dadachanji
ca86a52a6c 7103610: _NET_WM_PID and WM_CLIENT_MACHINE are not set
Set the properties to all top-level windows

Reviewed-by: anthony
2011-11-11 15:17:51 +03:00
Sean Coffey
ff772aece8 7091388: Regular unexplained npe's from corba libs after system has been running for days
Reviewed-by: alanb
2011-11-11 10:16:17 +00:00
Sean Coffey
9e42e3d20a 7105952: Improve finalisation for FileInputStream/FileOutputStream/RandomAccessFile
Reviewed-by: alanb
2011-11-11 10:08:40 +00:00
Abhijit Saha
b83a25de97 7110676: Update jaf source download url for jaxws
Reviewed-by: ramap
2011-11-10 13:38:47 -08:00
David Katleman
1269b98a27 Added tag jdk8-b13 for changeset 7e7229cae97b 2011-11-10 11:47:25 -08:00
David Katleman
5ffc202206 Added tag jdk8-b13 for changeset 8f6f084a8666 2011-11-10 11:46:54 -08:00
David Katleman
c39cff6af7 Added tag jdk8-b13 for changeset d4e4b5f54af7 2011-11-10 11:46:33 -08:00
David Katleman
fc6d47bc5c Added tag jdk8-b13 for changeset 5002669612fc 2011-11-10 11:46:28 -08:00
David Katleman
6e1ccb9a07 Added tag jdk8-b13 for changeset 660da5b5870e 2011-11-10 11:46:05 -08:00
David Katleman
75f0f16626 Added tag jdk8-b13 for changeset e0e566b9d2b2 2011-11-10 11:45:56 -08:00
David Katleman
0357c1c077 Added tag jdk8-b13 for changeset c3b8ec8ea08d 2011-11-10 11:45:41 -08:00
Martin Desruisseaux
f6f5a14a32 7110111: Minor Java SE javadoc & Constructor clean up
Reviewed-by: alanb, darcy
2011-11-10 11:41:27 -05:00
Michael McMahon
b53840e998 Merge 2011-11-10 15:41:49 +00:00
Michael McMahon
bac4f6c7ac 7110484: HttpServer.stop() not closing selector
Reviewed-by: chegar
2011-11-10 15:30:45 +00:00
Sergey Malenkov
6a9b345420 7087429: Constructor of java.beans.PropertyChangeEvent should declare thrown NPE for null source
Reviewed-by: rupashka
2011-11-10 17:37:29 +04:00
Sergey Malenkov
cc590754f3 7092744: XMLEncoder fails to encode and breaks backward compatibility
Reviewed-by: rupashka
2011-11-10 17:35:16 +04:00
Sergey Malenkov
4ec2080620 7087876: java/beans/PropertyDescriptor.html#createPropertyEditor() throws RE if editor cannot be created
Reviewed-by: rupashka
2011-11-10 17:32:20 +04:00
Sergey Malenkov
0fdddc243e 7064279: Introspector.getBeanInfo() should release some resources in timely manner
Reviewed-by: art, alexp
2011-11-10 17:27:40 +04:00
Sergey Malenkov
66bc904d36 7057459: Regression: Performance degradation with java.beans.XMLEncoder
Reviewed-by: rupashka
2011-11-10 17:15:15 +04:00
Christian Thalinger
3de3451b3a Merge 2011-11-10 04:46:08 -08:00
Doug Lea
26cb79b7bb 7107516: LinkedBlockingQueue/Deque.drainTo(Collection, int) returns 'maxElements' if its value is negative
Reviewed-by: chegar, mduigou, dholmes
2011-11-10 12:21:49 +00:00
David Holmes
ae1d532799 7108264: Fix for 7104173 is insufficient
Disable PrintVMOptions by default for all builds

Reviewed-by: dsamersoff, twisti
2011-11-10 06:23:48 -05:00
Charles Lee
2eda2d142d 6938583: Unexpected NullPointerException by InputContext.endComposition()
Reviewed-by: rupashka
2011-11-10 14:10:54 +04:00
Bengt Rutisson
911637a272 7110190: GCCause::to_string missing case for _adaptive_size_policy
Added case for _adaptive_size_policy

Reviewed-by: johnc, ysr
2011-11-09 23:21:00 +01:00
David Katleman
da3c1a9eba Merge 2011-11-09 13:46:53 -08:00
Vladimir Kozlov
09b7902e14 7107042: assert(no_dead_loop) failed: dead loop detected
Use dead nodes elimination code in PhaseIdealLoop before executing EA.

Reviewed-by: never, twisti
2011-11-09 07:25:51 -08:00
Vladimir Kozlov
dc1f4fe50e 7109887: java/util/Arrays/CopyMethods.java fails with -XX:+DeoptimizeALot
Zero array when compiled code is deoptimized.

Reviewed-by: never, twisti
2011-11-09 06:14:32 -08:00
Anthony Petrov
248bde3e58 7045370: Java Statically Determines Display Size on Linux platforms
Listen to ConfigureNotify events on the root window and update the current screen size accordingly

Reviewed-by: art, bae
2011-11-09 13:43:39 +03:00
Christian Thalinger
82266506f2 7109063: JSR 292: fix for 7085860 is incomplete
Reviewed-by: iveresov, alanb, jrose
2011-11-09 00:46:13 -08:00
Christian Thalinger
423972a7d8 7087727: JSR 292: C2 crash if ScavengeRootsInCode=2 when "static final" MethodHandle constants are in use
Reviewed-by: jrose, kvn, never
2011-11-09 00:42:33 -08:00
Weijun Wang
54229dbc54 7109096: keytool -genkeypair needn't call -selfcert
Reviewed-by: xuelei
2011-11-09 15:51:18 +08:00
Tom Rodriguez
89ccd723ce 7108242: jinfo -permstat shouldn't report interned strings as part of perm
Reviewed-by: kvn, twisti
2011-11-08 20:42:26 -08:00
Weijun Wang
890f9e2884 7107019: sun.security.krb5.internal.ccache.CCacheInputStream.readCred does not use auth data
Reviewed-by: valeriep
2011-11-09 09:30:13 +08:00
Tom Rodriguez
087c7441f7 7105305: assert check_method_context proper context
Reviewed-by: jrose, kvn
2011-11-08 17:29:57 -08:00
Jonathan Gibbons
ebe950642c 7108669: cleanup Log methods for direct printing to streams
Reviewed-by: mcimadamore
2011-11-08 17:06:58 -08:00
Jonathan Gibbons
738aef1b75 7108668: allow Log to be initialized and used earlier
Reviewed-by: mcimadamore
2011-11-08 17:06:08 -08:00
Lana Steuck
6621aee4c0 Merge 2011-11-08 15:38:58 -08:00
Lana Steuck
431fcd571a Merge 2011-11-08 15:37:37 -08:00
Vicente Romero
399b71b9f0 6921494: provide way to print javac tree tag values
Reviewed-by: jjg, mcimadamore
2011-11-08 11:51:05 -08:00
Tom Rodriguez
051c64ad4d 7104960: JSR 292: +VerifyMethodHandles in product JVM can overflow buffer
Reviewed-by: kvn, jrose, twisti
2011-11-08 10:31:53 -08:00
Alexandr Scherbatiy
856768a6c0 7107585: Test incorrect calculate position of object on frame
Reviewed-by: rupashka
2011-11-08 14:36:50 +03:00
Abhijit Saha
7cdb3e5017 Merge 2011-11-07 21:52:09 -08:00
Abhijit Saha
7b092df554 Merge 2011-11-07 21:48:05 -08:00
Abhijit Saha
ad6da56fde Merge 2011-11-07 21:47:57 -08:00
Abhijit Saha
f5f73282c8 Merge 2011-11-07 21:45:32 -08:00
Abhijit Saha
ec1afe7a29 Merge 2011-11-07 21:45:19 -08:00
Antonios Printezis
44b419af51 7099849: G1: include heap region information in hs_err files
Reviewed-by: johnc, brutisso, poonam
2011-11-08 00:41:28 -05:00
Antonios Printezis
83958f54fb 7092309: G1: introduce old region set
Keep track of all the old regions in the heap with a heap region set.

Reviewed-by: brutisso, johnc
2011-11-07 22:11:12 -05:00
Vladimir Kozlov
0bc2963b7d 7059047: EA: can't find initializing store with several CheckCastPP
Split adjust_escape_state() method into two methods to find initializing stores.

Reviewed-by: never
2011-11-07 14:33:57 -08:00
Xueming Shen
b1408532df 7096080: UTF8 update and new CESU-8 charset
7082884: Incorrect UTF8 conversion for sequence ED 31
7082883: Incorrect UTF8 conversion for sequence fc 80 80 8f bf bf

Updated UTF8 and added CESU-8 to following the latest Standard

Reviewed-by: alanb
2011-11-07 13:46:02 -08:00
Lana Steuck
6e582b4002 Merge 2011-11-07 10:26:52 -08:00
Pavel Porvatov
a346c5d21d 7080203: JTree.getSelectionPaths() now returns empty array instead of null
Reviewed-by: malenkov
2011-11-07 16:50:41 +04:00
Lana Steuck
bea72b4aae Merge 2011-11-05 14:27:47 -07:00
Lana Steuck
e31aa294c3 Merge 2011-11-05 00:02:33 -07:00
Lana Steuck
2152b58b60 Merge 2011-11-05 00:00:43 -07:00
Alejandro Murillo
9d6d4e292b 7108553: Bump the hs23 build number to 06
Reviewed-by: johnc
2011-11-04 14:06:09 -07:00
Andreas Schoesser
93fbade63d 6636110: unaligned stackpointer leads to crash during deoptimization
Reviewed-by: never, kvn
2011-11-04 13:55:31 -07:00
John Coomes
232b9d793f Added tag hs23-b05 for changeset 38f5bbc6cd8d 2011-11-04 12:43:41 -07:00
John Coomes
9aca39d006 Merge 2011-11-04 12:40:55 -07:00
Kelly O'Hair
47d1996c00 Merge 2011-11-04 10:34:11 -07:00
Maurizio Cimadamore
be5a83c8ce 7104201: Refactor DocCommentScanner
Add new Comment helper class to parse contents of comments in source code

Reviewed-by: jjg
2011-11-04 12:36:40 +00:00
Michael Fang
01d2aff838 Merge 2011-11-03 17:34:41 -07:00
Darryl Mocek
bc99763494 4533691: Add Collections.emptySortedSet()
Reviewed-by: mduigou, alanb, dholmes
2011-11-03 13:26:57 -07:00
David Katleman
524b8ef2fe Added tag jdk8-b12 for changeset 5ec6698ec5a9 2011-11-03 10:32:39 -07:00
David Katleman
7982aae1c4 Added tag jdk8-b12 for changeset 7e570cc378fb 2011-11-03 10:32:29 -07:00
David Katleman
4af82ec887 Added tag jdk8-b12 for changeset cc748b263c6f 2011-11-03 10:32:24 -07:00
David Katleman
ab91a77f0c Added tag jdk8-b12 for changeset 043062d0d76a 2011-11-03 10:32:23 -07:00
David Katleman
169afafaf7 Added tag jdk8-b12 for changeset dbb81ca736fc 2011-11-03 10:32:16 -07:00
David Katleman
c7cad98c9d Added tag jdk8-b12 for changeset 0023f3816a1f 2011-11-03 10:32:11 -07:00
David Katleman
acf5a65a36 Added tag jdk8-b12 for changeset f0f8f1159227 2011-11-03 10:32:05 -07:00
Christian Thalinger
9740abac58 7106944: assert(_pc == *pc_addr) failed may be too strong
Reviewed-by: kvn, never
2011-11-03 04:12:49 -07:00
Christian Thalinger
5a4de97cf0 7106774: JSR 292: nightly test inlineMHTarget fails with wrong result
Reviewed-by: kvn
2011-11-03 01:43:26 -07:00
Christian Thalinger
b8587b3878 7085860: JSR 292: implement CallSite.setTargetNormal and setTargetVolatile as native methods
Reviewed-by: jrose, never
2011-11-02 02:03:30 -07:00
Bengt Rutisson
b47310ebf8 7106751: G1: gc/gctests/nativeGC03 crashes VM with SIGSEGV
_cset_rs_update_cl[] was indexed with values beyond what it is set up to handle.

Reviewed-by: ysr, jmasa, johnc
2011-11-02 08:04:23 +01:00
Jim Holmlund
dae561e3ea 7101933: langtools jtreg tests do not work with jprt on windows
Fixed langtools/test/Makefile to work on cygwin. Updated jtreg to 4.1 and JCK to JCK8.

Reviewed-by: jjg, ohair
2011-11-01 15:49:45 -07:00
Rickard Backman
2c5cec930a 7106766: Move the precompiled header from the src/share/vm directory
Moved precompiled.hpp to src/share/vm/precompiled

Reviewed-by: coleenp, dholmes
2011-11-01 13:44:40 +01:00
Yong Jeffrey Huang
7a1eea097c Merge 2011-10-31 21:45:23 -07:00
Yong Jeffrey Huang
65916660b9 7101495: In Latvia first day of week is Monday
Reviewed-by: naoto, peytoia
2011-10-31 21:43:07 -07:00
Yong Jeffrey Huang
8118725827 Merge 2011-10-31 21:38:12 -07:00
Yong Jeffrey Huang
0db43a9227 6755060: Collator.compare() does not compare correctly for the Thai locale
Reviewed-by: naoto
2011-10-31 21:30:11 -07:00
Yong Jeffrey Huang
c24783568e 7077119: remove past transition dates from CurrencyData.properties file
Reviewed-by: naoto
2011-10-31 20:14:12 -07:00
Y. Srinivas Ramakrishna
e9207384c5 4243978: (ref) Race condition in Reference.enqueue()
4268317: (ref) Reference.isEnqueued() can return true when instance not enqueued

The reference handler now declares, and assumes, that the discovered field, rather than the next field, is (to be) used to link the entries in the pending list, thus allowing a reference object to be safely enqueued even while it is in the pending state. Also added slightly modified regression tests from the two bug reports.

Reviewed-by: mchung, alanb, jcoomes
2011-10-31 17:38:15 -07:00
Bradford Wetmore
becccc16ec 7053252: New regression test does not compile on windows-amd64
Reviewed-by: valeriep
2011-10-31 16:23:43 -07:00
Vladimir Kozlov
b354aa367c 7106907: 64 bit VM fails test compiler/6865265/StackOverflowBug.java
Use -Xss224k instead of -Xss128k.

Reviewed-by: never
2011-10-31 15:52:11 -07:00
Bradford Wetmore
089b5b16e3 7105780: Add SSLSocket client/SSLEngine server to templates directory
Reviewed-by: xuelei
2011-10-31 11:54:19 -07:00
Christian Thalinger
5ffce97ffc 7104561: UseRDPCForConstantTableBase doesn't work after shorten branches changes
Reviewed-by: never, kvn
2011-10-31 03:06:42 -07:00
Bengt Rutisson
c444c3eee7 7102044: G1: VM crashes with assert(old_end != new_end) failed: don't call this otherwise
ArrayOopDesc::max_array_length() should return a value that does not overflow a size_t if it is converted to bytes.

Reviewed-by: kvn, dholmes
2011-10-31 08:01:20 +01:00
Xue-Lei Andrew Fan
665445dae9 7106277: Brokenness in the seqNumberOverflow of MAC
Reviewed-by: wetmore
2011-10-30 20:07:45 -07:00
David Holmes
75883dceb1 Merge 2011-10-30 18:40:48 -07:00
Mike Skells
247532bf34 7103889: (fs) Reduce String concatenation when iterating over directory
Reviewed-by: alanb
2011-10-30 14:53:43 +00:00
Alejandro Murillo
84066778b8 7106092: Bump the hs23 build number to 05
Reviewed-by: johnc
2011-10-28 18:30:47 -07:00
Lana Steuck
6f4a99a81f Merge 2011-10-28 17:49:36 -07:00
Lana Steuck
61d275095c Merge 2011-10-28 17:49:02 -07:00
John Coomes
d61593bed3 Added tag hs23-b04 for changeset 721977078d6e 2011-10-28 15:41:29 -07:00
John Coomes
42c5e60cdc Merge 2011-10-28 15:36:16 -07:00
Tom Rodriguez
6bcf877494 7103261: crash with jittester on sparc
Reviewed-by: iveresov, kvn
2011-10-28 14:44:52 -07:00
Antonios Printezis
3da2f5af5d Merge 2011-10-28 13:04:10 -04:00
Antonios Printezis
c9d91bd0a8 Merge 2011-10-28 12:49:16 -04:00
Xue-Lei Andrew Fan
bdb9312b86 7105940: Test regression: KeyStore must be from provider SunPKCS11-NSSKeyStore
Reviewed-by: weijun
2011-10-28 07:18:54 -07:00
Vladimir Kozlov
762ad9c51c 7105611: Set::print() is broken
Reimplemented class VSetI_ to restore Set::print().

Reviewed-by: never
2011-10-27 18:20:50 -07:00
David Holmes
ad3a8d2791 7104173: sun/tools tests fail with debug build after 7012206
Disable PrintVMOptions in embedded debug builds so tests are unaffected by extra output

Reviewed-by: twisti, coleenp, phh, fparain, dsamersoff
2011-10-27 18:04:25 -04:00
Igor Veresov
5a2f55d0e0 7104177: Tiered: -XX:+PrintCanonicalization doesn't work with -XX:+TieredCompilation
Initialize printable_bci of instruction when passed to Canonicalizer

Reviewed-by: kvn, never
2011-10-27 14:40:25 -07:00
David Katleman
31ff82c1c8 Added tag jdk8-b11 for changeset b44e4293ec86 2011-10-27 13:54:50 -07:00
David Katleman
83c35d376a Added tag jdk8-b11 for changeset 7116fbba4c13 2011-10-27 13:54:42 -07:00
David Katleman
e0e7783359 Added tag jdk8-b11 for changeset df5d402bd8f5 2011-10-27 13:54:38 -07:00
David Katleman
96ca36886a Added tag jdk8-b11 for changeset 1c9f26d85678 2011-10-27 13:54:37 -07:00
David Katleman
d471bfae9b Added tag jdk8-b11 for changeset 719fbe1902a0 2011-10-27 13:54:31 -07:00
David Katleman
467fe2be80 Added tag jdk8-b11 for changeset 30a16214b365 2011-10-27 13:54:26 -07:00
David Katleman
b58a00d805 Added tag jdk8-b11 for changeset 541e4b0cf4f9 2011-10-27 13:54:24 -07:00
Vladimir Kozlov
a6318f2dcd 7105364: JDK8 b10 hotspot: src/share/vm/ci/ciMethodHandle.cpp Error: Use "." or "->"
Define ciMethodHandle::print_chain_impl() and ciMethodHandle::print_chain() bodies only in debug builds.

Reviewed-by: never, twisti
2011-10-27 09:39:24 -07:00
Sean Mullan
17c6b98e84 Merge 2011-10-27 11:01:15 -04:00
Sean Mullan
65b1500ae5 7094155: JSR105 code throws javax.xml.crypto.URIReferenceException when running into Java 7 VM
Reviewed-by: xuelei
2011-10-27 10:57:35 -04:00
Christian Thalinger
6d1f314a4b 7102657: JSR 292: C1 deoptimizes unlinked invokedynamic call sites infinitely
Reviewed-by: never, bdelsart
2011-10-27 04:43:37 -07:00
Sean Coffey
f65db39c04 7099658: Properties.loadFromXML fails with ClassCastException
Reviewed-by: alanb, mchung
2011-10-27 10:32:08 +01:00
Weijun Wang
3cd4eaa1f0 7104161: test/sun/tools/jinfo/Basic.sh fails on Ubuntu
Reviewed-by: alanb
2011-10-27 17:23:25 +08:00
Y. Srinivas Ramakrishna
f5af1323da 7105163: CMS: some mentions of MinChunkSize should be IndexSetStart
Fixed the instances that were missed in the changeset for 7099817.

Reviewed-by: stefank
2011-10-26 21:07:52 -07:00
Lana Steuck
4f4ddb6e5f Merge 2011-10-26 12:29:22 -07:00
Lana Steuck
dedae49531 Merge 2011-10-26 12:28:51 -07:00
Yuka Kamiya
b5b00d6b8f 7090046: Lots of invalid link in java.text.BreakIterator comments
Reviewed-by: okutsu
2011-10-26 22:16:13 +09:00
Vladimir Kozlov
669fa7396d 7097546: Optimize use of CMOVE instructions
Avoid CMove in a loop if possible. May generate CMove if it could be moved outside a loop.

Reviewed-by: never
2011-10-26 06:08:56 -07:00
Chris Hegarty
15d761f763 7104650: rawtype warnings in several net, nio and security source files
Also reviewed by Ulf.Zibis@gmx.de

Reviewed-by: mcimadamore, alanb, dholmes
2011-10-26 13:58:46 +01:00
Alex Menkov
159d2cd692 7088367: JavaSound security issue (12865443)
Reviewed-by: denis
2011-10-26 14:00:18 +04:00
Bengt Rutisson
868cfdb5f4 7102191: G1: assert(_min_desired_young_length <= initial_region_num) failed: Initial young gen size too small
Initial_region_num actually not needed.

Reviewed-by: tonyp, johnc
2011-10-26 08:44:53 +02:00
Lana Steuck
2c50355271 Merge 2011-10-25 21:55:25 -07:00
Lana Steuck
4ed6125359 Merge 2011-10-25 21:54:49 -07:00
Lana Steuck
adfdb3ed81 Merge 2011-10-25 21:53:54 -07:00
Y. Srinivas Ramakrishna
9181202876 7099817: CMS: +FLSVerifyLists +FLSVerifyIndexTable asserts: odd slot non-empty, chunk not on free list
Suitably weaken asserts that were in each case a tad too strong; fix up some loose uses of parameters in code related to size-indexed free list table.

Reviewed-by: jmasa, brutisso, stefank
2011-10-25 20:15:41 -07:00
Jim Holmlund
b171ddacd0 7104905: Java SE build fails on call to CreateSymbols
Reviewed-by: jjg
2011-10-25 19:18:32 -07:00
Vladimir Kozlov
952f0b9b81 7059039: EA: don't change non-escaping state of NULL pointer
NULL pointers do not escape but escape state propagation may change it leading to worser results.

Reviewed-by: never
2011-10-25 12:51:13 -07:00
Lana Steuck
a4d1ec9d5f Merge 2011-10-25 10:52:03 -07:00
Lana Steuck
022b52007c Merge 2011-10-25 10:51:17 -07:00
Jonathan Gibbons
d20f9f51bc 7104039: refactor/cleanup javac Paths class
Reviewed-by: mcimadamore
2011-10-25 10:48:05 -07:00
Omair Majid
160ad3376d 7103224: collision between __LEAF define in interfaceSupport.hpp and /usr/include/sys/cdefs.h with gcc
Reviewed-by: never
2011-10-25 08:17:15 -07:00
Maurizio Cimadamore
1469ebc6da 7104618: MessageInfo.java is failing after lexer changes
Two langtools regression tests cannot be built due to a bad import statement

Reviewed-by: jjg
2011-10-25 15:40:34 +01:00
Christian Thalinger
3336939f08 7101642: JSR 292: SIGSEGV in java.lang.invoke.MethodHandleImpl$FieldAccessor.getFieldI(Ljava/lang/Object;)I
Reviewed-by: kvn, iveresov
2011-10-25 04:07:20 -07:00
Alan Bateman
616b1a997f 7104577: Changes for 7104209 cause many RMI tests to fail
Reviewed-by: chegar
2011-10-25 09:27:20 +01:00
Christian Thalinger
249b9c657d 7094138: JSR 292: JRuby junit test fails in CallSite.setTargetNormal: obj->is_oop() failed: sanity check
Reviewed-by: iveresov, never
2011-10-25 00:55:10 -07:00
Chris Hegarty
f5ff85a77a 7103549: Remove dependencies on libjava and libjvm from security libraries
Reviewed-by: vinnie, ohair, alanb, dholmes
2011-10-24 21:03:41 +01:00
Chris Hegarty
de7b261476 7104209: Cleanup and remove librmi (native library)
Reviewed-by: mduigou, alanb
2011-10-24 20:55:08 +01:00
Jennifer Godinez
51c07ae53a 6604109: javax.print.PrintServiceLookup.lookupPrintServices fails SOMETIMES for Cups
Reviewed-by: bae, prr
2011-10-24 09:58:47 -07:00
Christian Thalinger
ae64d0bc30 7090904: JSR 292: JRuby junit test crashes in PSScavengeRootsClosure::do_oop
Reviewed-by: kvn, never, jrose
2011-10-24 07:53:17 -07:00
Maurizio Cimadamore
7873cba6b2 7098660: Write better overload resolution/inference tests
Add overload/inference debug diagnostics - added test harness using annotations to check outcome of overload resolution/inference

Reviewed-by: jjg
2011-10-24 13:00:30 +01:00
Maurizio Cimadamore
063b622daf 7096014: Javac tokens should retain state
Refactor javac tokens from enum constants to stateful instances (to keep track of position, comments, etc.)

Reviewed-by: jjg
2011-10-24 13:00:20 +01:00
Tom Rodriguez
b030a36386 Merge 2011-10-23 23:57:39 -07:00
John Cuthbertson
72c2cfef4f 7096030: G1: PrintGCDetails enhancements
7102445: G1: Unnecessary Resource allocations during RSet scanning

Add a new per-worker thread line in the PrintGCDetails output. GC Worker Other is the difference between the elapsed time for the parallel phase of the evacuation pause and the sum of the times of the sub-phases (external root scanning, mark stack scanning, RSet updating, RSet scanning, object copying, and termination) for that worker. During RSet scanning, stack allocate DirtyCardToOopClosure objects; allocating these in a resource area was causing abnormally high GC Worker Other times while the worker thread freed ResourceArea chunks.

Reviewed-by: tonyp, jwilhelm, brutisso
2011-10-23 23:06:06 -07:00
Tom Rodriguez
5dc4f00ff5 7103784: enable some flags by default
Reviewed-by: kvn
2011-10-23 20:23:14 -07:00
Tom Rodriguez
8b1bd284bc 7103380: assertion failure with -XX:+PrintNativeNMethods
Reviewed-by: kvn, iveresov
2011-10-23 12:31:20 -07:00
Alejandro Murillo
1c38082fcc 7103619: Bump the hs23 build number to 04
Reviewed-by: johnc
2011-10-21 16:00:50 -07:00
Jim Holmlund
5955806228 7098530: tools/javac/javazip/Test.sh can fail on Windows
Fix cygpath command to properly convert path

Reviewed-by: jjg
2011-10-21 14:14:29 -07:00
John Coomes
3ff8da7657 Added tag hs23-b03 for changeset 0e5b229f9d70 2011-10-21 10:27:33 -07:00
John Coomes
6abc189f69 Merge 2011-10-21 10:27:32 -07:00
Antonios Printezis
01ba4cd795 Merge 2011-10-21 07:24:06 -04:00
Yuka Kamiya
27ae28ada0 7103405: Correct display names for Pacific/Apia timezone
Reviewed-by: okutsu
2011-10-21 18:01:01 +09:00
Igor Veresov
e9bfe21bdf Merge 2011-10-21 00:58:30 -07:00
Yuka Kamiya
2f1ee9427a 7103108: (tz) Support tzdata2011l
Reviewed-by: okutsu
2011-10-21 15:56:24 +09:00
John Cuthbertson
c8143a724e 7099824: G1: we should take the pending list lock before doing the remark pause
Acquire the pending list lock in the prologue method of G1's concurrent VM_Operation and release the lock in the epilogue() method. The locking/unlocking order of the pending list lock and the Heap_lock should match that in the prologue and epilogue methods of VM_GC_Operation.

Reviewed-by: tonyp, ysr
2011-10-20 12:06:20 -07:00
Antonios Printezis
0615005089 Merge 2011-10-21 12:42:42 -04:00
David Katleman
7cab00227f Added tag jdk8-b10 for changeset 371ba3560eaf 2011-10-20 10:32:56 -07:00
David Katleman
7c5f436a8a Added tag jdk8-b10 for changeset 0c1ab928e08c 2011-10-20 10:32:47 -07:00
David Katleman
1513128fe7 Added tag jdk8-b10 for changeset dbbb34e9fb90 2011-10-20 10:32:44 -07:00
David Katleman
45d8e3cd09 Added tag jdk8-b10 for changeset e99452c9ff04 2011-10-20 10:32:43 -07:00
David Katleman
620632fa7b Added tag jdk8-b10 for changeset 2e5282ba5c7c 2011-10-20 10:32:37 -07:00
David Katleman
0fb0730525 Added tag jdk8-b10 for changeset 4ae1c2114056 2011-10-20 10:32:31 -07:00
David Katleman
1eec62606e Added tag jdk8-b10 for changeset 94322bddfb4a 2011-10-20 10:32:30 -07:00
Bengt Rutisson
8fb3eec82e 7097516: G1: assert(0<= from_card && from_card<HeapRegion::CardsPerRegion) failed: Must be in range
Introduced a version of is_in_reserved() that looks at _orig_end as opposed to _end.

Reviewed-by: tonyp, stefank
2011-10-20 10:21:35 +02:00
Jonathan Gibbons
6c299173e1 7101146: Paths should more directly managed by BaseFileManager
Reviewed-by: mcimadamore
2011-10-19 15:29:46 -07:00
Axel Siebenborn
96500c22d7 7100935: win32: memmove is not atomic but is used for pd_conjoint_*_atomic operations
Replace the call to memmove by a simple copy loop

Co-authored-by: Volker Simonis <volker.simonis@gmail.com>
Reviewed-by: dholmes, kvn, never
2011-10-19 10:52:30 -07:00
Maurizio Cimadamore
747169f70e 7102515: javac running very very long and not returning
Verbose resolution diagnostics slow down with operator resolution

Reviewed-by: jjg
2011-10-19 16:56:05 +01:00
Christopher Gruszka
0929b68ecc 7099017: jdk7u2-dev does not build
Changes to skip demo/DEMOS_LICENSE and sample/SAMPLES_LICENSE when building OPENJDK

Reviewed-by: ohair, billyh
2011-10-18 14:21:47 -04:00
Tom Rodriguez
bf203dac41 7098528: crash with java -XX:+ExtendedDTraceProbes
Reviewed-by: kvn
2011-10-17 21:38:29 -07:00
Lana Steuck
501fe865e8 Merge 2011-10-17 19:07:26 -07:00
Lana Steuck
2e49137b38 Merge 2011-10-17 19:06:53 -07:00
Tom Rodriguez
7749aaf387 7093690: JSR292: SA-JDI AssertionFailure: Expected raw sp likely got real sp, value was
Reviewed-by: kvn, twisti
2011-10-17 11:00:41 -07:00
John Cuthbertson
cab4072f8d 7095243: Disambiguate ReferenceProcessor::_discoveredSoftRefs
Add a new, separate, pointer to the base of the array of discovered reference lists and use this new pointer in places where we iterate over the entire array.

Reviewed-by: ysr, brutisso
2011-10-17 09:57:41 -07:00
Maurizio Cimadamore
d3efececf3 7093325: Redundant entry in bytecode exception table
Inlining of finalizers does not update gaps list accordingly

Reviewed-by: jjg
2011-10-17 12:57:36 +01:00
Maurizio Cimadamore
1a335eb047 7097436: Project Coin: duplicate varargs warnings on method annotated with @SafeVarargs
Duplicate aliasing check during subtyping leads to spurious varargs diagnostic

Reviewed-by: jjg
2011-10-17 12:54:33 +01:00
Andrew Brygin
8863ec439e 6997116: The case automatically failed due to java.lang.ClassCastException
Reviewed-by: jgodinez, prr
2011-10-17 15:20:51 +04:00
David Holmes
c45d65f8eb Merge 2011-10-17 01:40:27 -04:00
Igor Veresov
fafabe6da0 Merge 2011-10-16 02:59:24 -07:00
Alejandro Murillo
c9021fc009 7101096: Bump the hs23 build number to 03
Reviewed-by: johnc
2011-10-14 21:45:37 -07:00
John Coomes
02c6e31091 Added tag hs23-b02 for changeset e597a451dc88 2011-10-14 18:21:47 -07:00
John Coomes
56eac0155c Merge 2011-10-14 18:17:01 -07:00
Vladimir Kozlov
2407655ab1 7100757: The BitSet.nextSetBit() produces incorrect result in 32bit VM on Sparc
Instruction countTrailingZerosL() should use iRegIsafe dst register since it is used in long arithmetic.

Reviewed-by: never, twisti
2011-10-14 10:07:28 -07:00
Antonios Printezis
81bdd2ccc6 7088680: G1: Cleanup in the G1CollectorPolicy class
Removed unused fields and methods, removed the G1CollectoryPolicy_BestRegionsFirst class and folded its functionality into the G1CollectorPolicy class.

Reviewed-by: ysr, brutisso, jcoomes
2011-10-14 11:12:24 -04:00
Tom Rodriguez
a8a4b778ca 7100165: JSR 292: leftover printing code in methodHandleWalk.cpp
Reviewed-by: kvn, twisti
2011-10-13 14:08:15 -07:00
Antonios Printezis
d1c6787aa1 7098085: G1: partially-young GCs not initiated under certain circumstances
Reviewed-by: ysr, brutisso
2011-10-13 13:54:29 -04:00
David Katleman
5839368eee Added tag jdk8-b09 for changeset 0169651a48bf 2011-10-13 10:35:50 -07:00
David Katleman
70a4d09791 Added tag jdk8-b09 for changeset 8b314218e3ab 2011-10-13 10:35:43 -07:00
David Katleman
f524534650 Added tag jdk8-b09 for changeset 8124579f60fd 2011-10-13 10:35:40 -07:00
David Katleman
7a7270c0bd Added tag jdk8-b09 for changeset 072884311758 2011-10-13 10:35:39 -07:00
David Katleman
5219fbb397 Added tag jdk8-b09 for changeset fad441085165 2011-10-13 10:35:32 -07:00
David Katleman
9acc701280 Added tag jdk8-b09 for changeset 44d496c3c830 2011-10-13 10:35:29 -07:00
David Katleman
1175eb8a27 Added tag jdk8-b09 for changeset 56ae1c1e8584 2011-10-13 10:35:24 -07:00
Christos Zoulas
32708baef1 7098194: integrate macosx-port changes
Integrate bsd-port/hotspot and macosx-port/hotspot changes as of 2011.09.29.

Co-authored-by: Greg Lewis <glewis@eyesbeyond.com>
Co-authored-by: Kurt Miller <kurt@intricatesoftware.com>
Co-authored-by: Alexander Strange <astrange@apple.com>
Co-authored-by: Mike Swingler <swingler@apple.com>
Co-authored-by: Roger Hoover <rhoover@apple.com>
Co-authored-by: Victor Hernandez <vhernandez@apple.com>
Co-authored-by: Pratik Solanki <psolanki@apple.com>
Reviewed-by: kvn, dholmes, never, phh
2011-10-13 09:35:42 -07:00
Charles Lee
16b47aa177 7107957: AWT: Native code should include fcntl.h and unistd.h rather than sys/fcntl.h and sys/unistd.h
Use POSIX defined includes for unistd.h and fcntl.h

Reviewed-by: anthony, ngmr
2011-10-13 13:02:37 +01:00
Alexandr Scherbatiy
bd73f1cc1d 6955919: Intermittent ClassCastException in bug4492274 test
Reviewed-by: rupashka
2011-11-03 14:14:36 +04:00
Sean Chou
c59424668d 7049024: DnD fails with JTextArea and JTextField
Reviewed-by: rupashka
2011-11-02 23:53:16 +03:00
Alexander Kouznetsov
34c1a2b716 7074853: TransparentRuler demos Readme should mention the correct jar file name
Reviewed-by: rupashka
2011-11-02 17:39:30 +04:00
Alexandr Scherbatiy
6612f2a7e6 6624077: Regression test fails: closed/javax/swing/ToolTipManager/6256140/bug6256140.java
Reviewed-by: rupashka
2011-11-02 14:17:16 +04:00
Federico Tello Gentile
d3cb1a4bdd 7105529: XAWT: Optimize getFieldsAsString() methods generated by WrapperGenerator
Replace string concatenation with StringBuilder.append()

Reviewed-by: anthony, son
2011-11-01 18:03:56 +03:00
Federico Tello Gentile
60689cf49b 7104625: sun.awt.X11.XEvent is creating 600 MB of char[] for no good reason
Wrap logging calls with if(){} statements

Reviewed-by: anthony, son
2011-11-01 18:01:58 +03:00
David Buck
756974b448 6887286: StackOverflowError at sun.awt.image.ImageWatched$WeakLink.isWatcher
Fixed OffScreenImageSource to call imageComplete() with SINGLEFAMEDONE, not STATICIMAGEDONE. This fixed memory leak (that caused SOFE when we use recursion to iterate over linked list).

Reviewed-by: bae
2011-10-17 19:06:24 -07:00
Alexandr Scherbatiy
45109520ef 7077293: javax/swing/JComponent/4337267/bug4337267.java failed on windows 2003
Reviewed-by: rupashka
2011-10-17 17:19:43 +04:00
Alexandr Scherbatiy
0819253023 7100004: javax.swing.JTable.setAutoCreateRowSorter(boolean autoCreateRowSorter) should mention default value
Reviewed-by: rupashka
2011-10-17 16:40:34 +04:00
Alexandr Scherbatiy
224bf60e30 7099251: javax.swing.text.html.HTMLDocument.insertAfterStart(null, something) throws NPE
Reviewed-by: rupashka
2011-10-17 15:10:42 +04:00
Charles Lee
448e208ddb 7100054: (porting) Native code should include fcntl.h and unistd.h rather than sys/fcntl.h and sys/unistd.h
Use POSIX defined includes for unistd.h and fcntl.h

Reviewed-by: dholmes, alanb, chegar, ngmr
2011-10-13 12:30:51 +01:00
Michael McMahon
75c70b068f Merge 2011-10-20 09:26:20 +01:00
Michael McMahon
0ec5b82c85 7102665: Move tests to Problemlist
Reviewed-by: chegar, alanb
2011-10-20 09:21:03 +01:00
Kurchi Subhra Hazra
ed977156e5 7102704: test/java/net/DatagramSocket/ChangingAddress.java failing
Reviewed-by: chegar
2011-10-20 09:08:38 +01:00
Darryl Mocek
8d1c6cf60e 5029031: Add Collections.checkedQueue()
Reviewed-by: mduigou
2011-10-19 14:17:47 -07:00
Sean Mullan
fd5b382022 Merge 2011-10-19 10:16:22 -04:00
Sean Mullan
f1f3aad11c 7102686: Restructure timestamp code so that jars and modules can more easily share the same code
Reviewed-by: mchung
2011-10-19 10:15:23 -04:00
Bradford Wetmore
d25a9c128f 7031830: bad_record_mac failure on TLSv1.2 enabled connection with SSLEngine
Reviewed-by: xuelei, weijun, asaha
2011-10-18 11:58:57 -07:00
Sean Mullan
6e1235fe09 Merge 2011-10-18 10:15:08 -04:00
Sean Mullan
9852219b7e 7092897: sun.security.util.Cache should be generified
Reviewed-by: xuelei
2011-10-18 10:12:14 -04:00
Weijun Wang
ab1010388d 7099399: cannot deal with CRL file larger than 16MB
Reviewed-by: xuelei, mullan
2011-10-17 17:11:26 +08:00
Sean Mullan
8dd8726505 Merge 2011-10-13 13:53:13 -04:00
Sean Mullan
4bc227715b 6953295: Move few sun.security.{util, x509, pkcs} classes used by keytool/jarsigner to another package
Reviewed-by: mchung
2011-10-13 13:50:17 -04:00
Vinnie Ryan
e6e820c647 7099228: Use a PKCS11 config attribute to control encoding of an EC point
Reviewed-by: valeriep, mullan
2011-10-13 12:00:51 +01:00
Christian Thalinger
02db22f7e7 7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
Reviewed-by: jrose, never
2011-10-12 21:00:13 -07:00
Lana Steuck
5cbdf8db6c Merge 2011-10-12 12:26:38 -07:00
Lana Steuck
8eac661507 Merge 2011-10-12 12:26:03 -07:00
Lana Steuck
9e05d4f813 Merge 2011-10-12 12:25:03 -07:00
Naoto Sato
f54e7ec9bc 7027061: Testcase failure: java/util/Locale/Bug6989440.java - java.util.ConcurrentModificationException
Reviewed-by: dholmes, chegar
2011-10-12 12:12:25 -07:00
John Cuthbertson
4738ed88a5 7098282: G1: assert(interval >= 0) failed: Sanity check, referencePolicy.cpp: 76
There is a race between one thread successfully forwarding and copying the klass mirror for the SoftReference class (including the static master clock) and another thread attempting to use the master clock while attempting to discover a soft reference object. Maintain a shadow copy of the soft reference master clock and use the shadow during reference discovery and reference processing.

Reviewed-by: tonyp, brutisso, ysr
2011-10-12 10:25:51 -07:00
Doug Lea
e088fb2b1a 7082299: AtomicReferenceArray should ensure that array is Object[]
Reviewed-by: chegar, dholmes, alanb
2011-10-12 16:33:48 +01:00
Alexandr Scherbatiy
6fb68448cc 7076791: closed/javax/swing/JColorChooser/Test6827032.java failed on windows
Reviewed-by: rupashka
2011-10-11 15:22:40 +04:00
Christian Thalinger
de00cc778c 7081938: JSR292: assert(magic_number_2() == MAGIC_NUMBER_2) failed
Reviewed-by: never, bdelsart
2011-10-11 02:19:37 -07:00
Bengt Rutisson
7fa7f8a597 7099454: /bin/sh does not support syntax used in the src/os/posix/launcher/launcher.script shell script
Also reviewed by mikael.gerdin@oracle.com; Changed to the `` syntax instead. Also changed "source" to ".".

Reviewed-by: never, stefank, dsamersoff, rottenha
2011-10-11 10:21:36 +02:00
David Holmes
e9b8f2bab4 7096278: Update the VM name to indicate it is an embedded build
Reviewed-by: kvn, never, jcoomes, bobv
2011-10-10 21:01:36 -04:00
Y. Srinivas Ramakrishna
8fbb0e0f4a Merge 2011-10-10 08:40:34 -07:00
Bertrand Delsart
fa43b0cdd8 7096366: PPC: corruption of floating-point values with DeoptimizeALot
Fix for a deoptimization found on PPC, which could impact other big endian platforms

Reviewed-by: roland, dholmes
2011-10-07 13:28:44 +02:00
Y. Srinivas Ramakrishna
a7dc867057 7095236: G1: _markedRegions never contains NULL regions
Removed the code for skipping over NULL regions in _markedRegions, replacing it with an assertion that a NULL region is never encountered; removed dead methods, remove() and remove_region(), and inlined a simplified addRegion() directly into fillCache().

Reviewed-by: brutisso, tonyp
2011-10-06 18:56:47 -07:00
David Katleman
0b92e7c70b Added tag jdk8-b08 for changeset c9fb751a1f21 2011-10-06 14:01:45 -07:00
David Katleman
1d6d5772d7 Added tag jdk8-b08 for changeset 88f1603ed2de 2011-10-06 14:01:37 -07:00
David Katleman
a8ca4c2947 Added tag jdk8-b08 for changeset c074b109d708 2011-10-06 14:01:34 -07:00
David Katleman
6d08c900c4 Added tag jdk8-b08 for changeset c6ec1d396a6f 2011-10-06 14:01:33 -07:00
David Katleman
bc8656528c Added tag jdk8-b08 for changeset 410b29777a51 2011-10-06 14:01:26 -07:00
David Katleman
7e4cbf7ede Added tag jdk8-b08 for changeset 21c3dca02af5 2011-10-06 14:01:21 -07:00
David Katleman
e0ebf7426d Added tag jdk8-b08 for changeset 29f7779184ad 2011-10-06 14:01:13 -07:00
Maurizio Cimadamore
b6f671b41e 7090499: missing rawtypes warnings in anonymous inner class
Javac does not detect raw types inside anonymous inner classes

Reviewed-by: jjg
2011-10-06 18:39:31 +01:00
Antonios Printezis
78662d3b17 Merge 2011-10-06 13:28:09 -04:00
John Cuthbertson
6513930e7a 7095194: G1: HeapRegion::GrainBytes, GrainWords, and CardsPerRegion should be size_t
Declare GrainBytes, GrainWords, and CardsPerRegion as size_t.

Reviewed-by: jcoomes, tonyp, jmasa
2011-10-05 08:44:10 -07:00
Pavel Porvatov
72f4cfb2e7 7072167: The "root" field in BufferStrategyPaintManager leaks memory
Reviewed-by: alexp
2011-10-05 18:21:23 +04:00
Volker Simonis
e3c38523b2 6865265: JVM crashes with "missing exception handler" error
Retry the call to fast_exception_handler_bci_for() after it returned with a pending exception. Don't cache the exception handler pc computed by compute_compiled_exc_handler() if the handler is for another (nested) exception.

Reviewed-by: kamg, kvn
2011-10-04 14:30:04 -07:00
John Coomes
92bbff7143 Merge 2011-10-04 12:39:42 -07:00
Igor Veresov
a4975758bb 7097679: Tiered: events with bad bci to Gotos reduced from Ifs
Save bci of instruction that produced Goto and use it to call back to runtime

Reviewed-by: kvn, never
2011-10-04 10:07:07 -07:00
Lana Steuck
2346a1c754 Merge 2011-10-03 18:26:59 -07:00
Lana Steuck
8401a88197 Merge 2011-10-03 18:26:01 -07:00
Lana Steuck
4a7dc9240b Merge 2011-10-03 18:22:43 -07:00
Alejandro Murillo
91823a458f 7096124: Bump the hs23 build number to 02
Reviewed-by: johnc
2011-09-30 22:54:43 -07:00
Xue-Lei Andrew Fan
3c41c66fb1 7096936: issue in jsse/runtime
7096937: TEST: com/sun/net/ssl/internal/ssl/GenSSLConfigs/main.java need modification as a result of TLS fix

Reviewed-by: wetmore, jdn, xuelei
2011-09-30 18:47:53 -07:00
John Coomes
b731247c38 Added tag hs23-b01 for changeset cca3c612bd14 2011-09-30 18:27:43 -07:00
John Coomes
ef5fc6d83d Merge 2011-09-30 18:27:39 -07:00
John Coomes
5bd84d92a1 Merge 2011-09-30 17:20:56 -07:00
Igor Veresov
7f01a4d4f5 Merge 2011-09-30 13:48:17 -07:00
Roland Westrelin
8ae50d45a4 7096010: c2: running with +PrintOptoAssembly crashes the VM when $constanttablebase is used
ADLC generates code to prepare the register string to be printed in a char array but then calls print without the char array as an argument.

Reviewed-by: never
2011-09-30 13:47:26 +02:00
Igor Veresov
0219cf5423 7096639: Tiered: Incorrect counter overflow handling for inlined methods
Enable invocation events for inlinees

Reviewed-by: kvn
2011-09-29 23:09:54 -07:00
David Katleman
4749de17ea Added tag jdk8-b07 for changeset 64ad92439924 2011-09-29 18:54:01 -07:00
David Katleman
723ea00e0c Added tag jdk8-b07 for changeset 3286cf6d9881 2011-09-29 18:53:53 -07:00
David Katleman
bede38196b Added tag jdk8-b07 for changeset 2b6c60642ad8 2011-09-29 18:53:49 -07:00
David Katleman
34db0587a4 Added tag jdk8-b07 for changeset dff0b2eda2a8 2011-09-29 18:53:48 -07:00
David Katleman
f5d9fec70d Added tag jdk8-b07 for changeset 3793fe38dc85 2011-09-29 18:53:42 -07:00
David Katleman
5be998e5ce Added tag jdk8-b07 for changeset 24e2df5cb0b0 2011-09-29 18:53:38 -07:00
David Katleman
261f588e13 Added tag jdk8-b07 for changeset 5b03d68a6a38 2011-09-29 18:53:33 -07:00
Xue-Lei Andrew Fan
73b50710f0 7064341: jsse/runtime security problem
Reviewed-by: wetmore
2011-09-29 17:31:30 -07:00
Volker Simonis
812f619214 7096016: SA build still produces "arg list too long" errors
Reviewed-by: kvn, never
2011-09-29 13:47:57 -07:00
Tom Rodriguez
f103a0e31f 7092278: "jmap -finalizerinfo" throws "sun.jvm.hotspot.utilities.AssertionFailure: invalid cp index 0 137"
Reviewed-by: kvn
2011-09-29 09:53:56 -07:00
Kurchi Subhra Hazra
e83fde21ff 7092375: Security Libraries don't build with javac -Werror
Changes to security related java and make files to remove warnings

Reviewed-by: xuelei
2011-09-28 15:10:02 -07:00
Chris Hegarty
08d82ca044 7099488: TwoStacksPlainSocketImpl should invoke super.create(stream), typo in fix for 7098719
Reviewed-by: coffeys
2011-10-11 12:06:46 +01:00
Neil Richards
bbcff1b792 Merge 2011-10-10 16:13:38 +01:00
Chris Hegarty
e92787f075 7098755: test/sun/misc/JarIndex/metaInfFilenames/Basic.java should use supported compiler interface
Reviewed-by: mcimadamore
2011-10-10 15:29:24 +01:00
Steve Poole
9a2fc5f236 7099119: Remove unused dlinfo local variable in launcher code
Reviewed-by: ohair, chegar, ngmr
2011-10-10 14:50:51 +01:00
Chris Hegarty
214254cac5 7098719: -Dsun.net.maxDatagramSockets and Socket constructor does not work correctly with System.gc()
Reviewed-by: michaelm
2011-10-10 10:38:35 +01:00
Vinnie Ryan
a3fcc12dc8 7094377: Com.sun.jndi.ldap.read.timeout doesn't work with ldaps
Reviewed-by: chegar
2011-10-07 14:09:53 +01:00
Naoto Sato
7af669ecc0 7098394: JDK8 TL repo build fails in src/solaris/native/java/util/TimeZone_md.c
Reviewed-by: chegar
2011-10-06 17:40:16 -07:00
Chris Hegarty
d5e5ad5996 7090499: missing rawtypes warnings in anonymous inner class
Fix anonymous inner classes with raw types currently being built in the jdk with -Werror

Reviewed-by: mcimadamore, alanb
2011-10-06 12:15:07 +01:00
Masayoshi Okutsu
a9ef11a8d4 7092679: (tz) Java getting wrong timezone/DST info on Solaris 11
6984762: Invalid close of file descriptor '-1' in findZoneinfoFile

Reviewed-by: coffeys, ohair, naoto, peytoia
2011-10-05 15:13:40 +09:00
Chris Hegarty
1d5bbbec86 7095949: java/net/URLConnection/RedirectLimit.java and Redirect307Test fail intermittently
Reviewed-by: alanb
2011-10-04 16:37:08 +01:00
Kurchi Subhra Hazra
ebd4f912d7 6953455: CookieStore.add() cannot handle null URI parameter, contrary to the API
Reviewed-by: chegar, mduigou
2011-10-04 13:48:41 +01:00
Bengt Rutisson
cfe349b1e0 7005808: G1: re-enable ReduceInitialCardMarks for G1
Remove the extra guard to allow G1 to use ReduceInitialCardMarks

Reviewed-by: jmasa, tonyp, johnc, ysr
2011-09-28 08:21:30 +02:00
Weijun Wang
650bd8320d 7077646: gssapi wrap for CFX per-message tokens always set FLAG_ACCEPTOR_SUBKEY
Reviewed-by: valeriep
2011-09-28 14:21:11 +08:00
Weijun Wang
a912e7557c 7077640: gss wrap for cfx doesn't handle rrc != 0
Reviewed-by: valeriep
2011-09-28 14:21:10 +08:00
Weijun Wang
a099202006 7089889: Krb5LoginModule.login() throws an exception if used without a keytab
Reviewed-by: xuelei, valeriep
2011-09-28 14:21:10 +08:00
Oleg Pekhovskiy
45df73bc12 7073337: Crash after playing Java game on Pogo
Reviewed-by: art, uta
2011-09-27 13:38:29 +04:00
Kurchi Subhra Hazra
09ff856431 7088502: Security libraries don't build with javac -Werror
Changes to files in src/share/classes/com/sun/org/apache/xml/internal/security and its subpackages to remove warnings

Reviewed-by: mullan
2011-09-26 17:20:45 -07:00
David Buck
daa2552a25 7029903: Splash screen is not shown in 64-bit Linux with 16-bit color depth
Added Xflush() call after splash screen is updated to ensure update is no stuck in client side buffer until JVM starts up. See JET review request 4154 for details.

Reviewed-by: kevinw, anthony
2011-09-26 15:40:05 -07:00
Lana Steuck
3ae6cc4f7e Merge 2011-09-26 14:33:34 -07:00
Lana Steuck
3d1e626d8f Merge 2011-09-26 14:32:38 -07:00
Lana Steuck
238736e33d Merge 2011-09-26 14:31:05 -07:00
Lana Steuck
9f70387b50 Merge 2011-09-26 14:30:38 -07:00
Lana Steuck
79c9b7b711 Merge 2011-09-26 14:29:34 -07:00
Kurchi Subhra Hazra
8987ea2bdf 7084030: DatagramSocket.getLocalAddress inconsistent on XP/2003 when IPv6 enabled and socket is connected
Use family of connected IP address to retrieve desired local address of the datagram socket

Reviewed-by: chegar
2011-09-26 11:48:37 -07:00
Vladimir Kozlov
47e357e16f 7081933: Use zeroing elimination optimization for large array
Don't zero new typeArray during runtime call if the allocation is followed by arraycopy into it.

Reviewed-by: twisti
2011-09-26 10:24:05 -07:00
Denis Fokin
89371ad57d 7080289: AWTKeystroke class registers a subclass factory during deserialization
Reviewed-by: serb
2011-09-26 18:18:29 +04:00
Chris Hegarty
2d492ea7e1 7094141: test/sun/misc/JarIndex/metaInfFilenames/Basic.java no longer compiles
Reviewed-by: alanb
2011-09-26 15:04:59 +01:00
Clemens Eisserer
20558b33b9 7081670: Disposing an AppContext can lead to a spinning EventDispatchThread
Reviewed-by: art, anthony, dholmes
2011-09-26 17:59:52 +04:00
Pavel Porvatov
3cfef23dff 7088744: SwingUtilities.isMiddleMouseButton does not work with ALT/Meta keys
Reviewed-by: alexp
2011-09-26 17:37:08 +04:00
Weijun Wang
0ac639e5b0 7094842: test/javax/security/auth/Subject/{Synch.java,Synch2.java,Synch3.java} loop forever in agentvm mode
Reviewed-by: alanb
2011-09-26 17:13:47 +08:00
Kurt Miller
95c56a472b 7089790: integrate bsd-port changes
Co-authored-by: Greg Lewis <glewis@eyesbeyond.com>
Co-authored-by: Jung-uk Kim <jkim@freebsd.org>
Co-authored-by: Christos Zoulas <christos@zoulas.com>
Co-authored-by: Landon Fuller <landonf@plausible.coop>
Co-authored-by: The FreeBSD Foundation <board@freebsdfoundation.org>
Co-authored-by: Michael Franz <mvfranz@gmail.com>
Co-authored-by: Roger Hoover <rhoover@apple.com>
Co-authored-by: Alexander Strange <astrange@apple.com>
Reviewed-by: kvn, twisti, jrose
2011-09-25 16:03:29 -07:00
Lana Steuck
d941d29b0c Merge 2011-09-23 23:30:31 -07:00
Lana Steuck
633ccfc791 Merge 2011-09-23 23:29:56 -07:00
Lana Steuck
1c1cfca47c Merge 2011-09-23 23:25:30 -07:00
Lana Steuck
f13c56e8aa Merge 2011-09-23 16:51:29 -07:00
Lana Steuck
f181b4c76d Merge 2011-09-23 16:50:37 -07:00
Neil Richards
2a7fbdb25b 7105640: Unix printing does not check the result of exec'd lpr/lp command
Add checking, exception for spool process failure

Reviewed-by: prr, jgodinez
2011-09-23 15:18:32 +01:00
Lana Steuck
e869a890ad Merge 2011-10-26 17:59:13 -07:00
Doug Lea
2d19ea519b 7091003: ScheduledExecutorService never executes Runnable with corePoolSize of zero
Reviewed-by: dholmes, chegar
2011-09-23 14:24:04 +01:00
Jonathan Gibbons
4a8efe66a5 7075721: javac should have public enum for exit codes
Reviewed-by: mcimadamore
2011-09-22 09:24:01 -07:00
Kevin Walls
f4e1298403 7051189: Need to suppress info message if -xcheck:jni used with libjsig.so
Reviewed-by: coleenp, minqi
2011-09-22 16:48:41 +01:00
Joe Darcy
82e488e3ae 7092404: Add Math.nextDown and Double.isFinite
Reviewed-by: mduigou
2011-09-21 23:22:11 -07:00
Jonathan Gibbons
ff7362918f 7092965: javac should not close processorClassLoader before end of compilation
Reviewed-by: darcy
2011-09-21 21:56:53 -07:00
Weijun Wang
035522bd7a 7092627: use agentvm mode instead of samevm in regtests
Reviewed-by: alanb, dsamersoff
2011-09-22 12:05:26 +08:00
Stuart Marks
6f12fe9039 7092186: adjust package access in rmiregistry
Reviewed-by: asaha, coffeys
2011-09-21 15:37:52 -07:00
Michael McMahon
9486648fdf Merge 2011-09-21 14:54:38 +01:00
Michael McMahon
98f96fac17 7079012: test/java/net/NetworkInterface/NetParamsTest.java fails with SocketException getting mac address
Reviewed-by: chegar, alanb
2011-09-21 14:51:01 +01:00
Charles Lee
daed5f0dd3 7032018: The file list in JFileChooser does not have an accessible name
Reviewed-by: rupashka
2011-09-21 17:08:02 +04:00
Tom Rodriguez
52f0eccb24 7092236: java/util/EnumSet/EnumSetBash.java fails
Reviewed-by: kvn, twisti, jrose
2011-09-20 23:50:16 -07:00
David Holmes
d9b7e6c18c 7012206: ~20 tools tests failing due to -XX:-UsePerfData default in Java SE Embedded
Explicitly enable UsePerfData for the tools that require it to be enabled

Reviewed-by: alanb, ohair
2011-09-20 22:20:05 -04:00
Daniel D. Daugherty
43b11a7dca 7085944: 3/3 FDS: gdb does not find debug symbols for libjsig link
Add support for importing .debuginfo files from HSX.

Reviewed-by: phh
2011-09-20 19:16:21 -07:00
Joe Darcy
17af9b241a 6268216: Boolean.getBoolean() throws SecurityException
Reviewed-by: mduigou
2011-09-20 18:33:25 -07:00
Mike Duigou
b9c11d661e 7074264: Switches to packages tree view and adds unit tests to sources
Reviewed-by: igor
2011-09-20 12:27:45 -07:00
Jonathan Gibbons
1577e0f073 7030473: Remove dead field JCCompilationUnit.flags
Reviewed-by: dlsmith
2011-09-20 12:08:48 -07:00
Vladimir Kozlov
a46128d0dd 7081842: assert(Compile::current()->unique() < (uint)MaxNodeLimit) failed: Node limit exceeded
Add missing node limit check in IGVN optimizer

Reviewed-by: iveresov, never
2011-09-20 08:39:40 -07:00
Weijun Wang
4d4a89de9b 7091290: fails to build jdk8 b05 Embedded build
Reviewed-by: xuelei, dholmes
2011-09-20 12:40:23 +08:00
Igor Veresov
9661feecbc 7091764: Tiered: enable aastore profiling
Turn on aastore profiling

Reviewed-by: jrose, twisti
2011-09-19 15:21:03 -07:00
Daniel D. Daugherty
55bfd400ca Merge 2011-09-19 12:18:46 -07:00
Michael McMahon
b88865d91f 7091369: DatagramSocket/Limit.java failing on 8 and 7u2
Reviewed-by: chegar, alanb
2011-09-19 15:14:17 +01:00
Andrew Brygin
b89d40e747 7088287: libpng need to be updated
Reviewed-by: jgodinez, prr
2011-09-19 05:56:44 -07:00
Joe Darcy
5b7643e258 7091682: Move sun.misc.FpUtils code into java.lang.Math
Reviewed-by: alanb
2011-09-18 18:14:07 -07:00
Alan Bateman
19f1338ae9 7091935: (fs) Polling based WatchService not used on Linux
Reviewed-by: forax
2011-09-18 12:33:56 +01:00
John Coomes
e3faa527bd 7091545: hs23 - set hotspot version & build number
Reviewed-by: tonyp, never, phh, jmasa
2011-09-16 21:35:06 -07:00
Daniel D. Daugherty
d381d4b0b4 7071904: 4/4 HotSpot: Full Debug Symbols
Add support for .debuginfo files for HSX libraries.

Reviewed-by: poonam, dholmes, never
2011-09-16 16:21:20 -07:00
Jonathan Gibbons
51763c43f7 7091528: javadoc attempts to parse .class files
Reviewed-by: darcy
2011-09-16 16:18:46 -07:00
Kurchi Subhra Hazra
3580661098 7090158: Networking Libraries don't build with javac -Werror
Minor changes to networking java files to remove warnings

Co-authored-by: Alexandre Boulgakov <sasha_bu@hotmail.com>
Reviewed-by: chegar, weijun, hawtin
2011-09-16 12:09:04 -07:00
Maurizio Cimadamore
bd420dc94e 7086586: Inference producing null type argument
Inference should fail in 15.12.2.7 when inference variables with 'nulltype' upper bounds are found

Reviewed-by: dlsmith
2011-09-16 14:16:11 +01:00
John Coomes
854ad24077 Added tag hs22-b06 for changeset 9de632dc424b 2011-09-15 20:56:24 -07:00
Alejandro Murillo
303c03e2ea 7091255: Bump the hs22 build number to 06
Reviewed-by: johnc
2011-09-15 20:56:24 -07:00
John Coomes
86b01d9960 7091294: disable quicksort tests
Reviewed-by: jmasa, ysr, kvn
2011-09-15 20:30:12 -07:00
John Coomes
db1c1037b5 Merge 2011-09-15 19:33:39 -07:00
Igor Veresov
0e0ba86cd8 Merge 2011-09-15 12:44:09 -07:00
Sean Chou
40ce6ba310 6988099: jvmti demos missing Publisher (COMPANY resource) in dlls/exes on windows
Add creation/linking of resource data to link step for demos on Windows

Reviewed-by: dcubed, zgu, ngmr, ohair
2011-09-15 19:29:07 +01:00
Christopher Gruszka
64c2502a16 7066713: Separate demos from the bundles on Solaris and Linux
Add new license files to demos and samples, new directory for bundling

Reviewed-by: katleman, ohair, billyh
2011-09-15 13:59:13 -04:00
Michael McMahon
49849e0dcf Merge 2011-09-15 14:10:30 +01:00
Michael McMahon
f9cd96b19b 7073491: -Dsun.net.maxDatagramSockets=1 does not work correctly with system.gc()
Reviewed-by: ngmr
2011-09-15 13:50:30 +01:00
Pavel Porvatov
782f6f887e 7090007: Missing style.css in nimbus/doc-files/properties.html
Reviewed-by: alexp
2011-09-15 16:43:25 +04:00
Yuka Kamiya
0594a39498 7090843: (tz) Support tzdata2011j
Reviewed-by: okutsu
2011-09-15 15:02:05 +09:00
Yuka Kamiya
3674ebe6e6 7090844: Support a timezone whose offset is changed more than once in the future
Reviewed-by: okutsu
2011-09-15 14:45:35 +09:00
Mala Bankal
6624a6c8d1 Merge 2011-09-14 22:36:02 -07:00
Mala Bankal
d9777d76bd 7049963: DISTINGUISHED NAMES FOR CERT ARE ESCAPED IN JROCKIT 1.6(NOT COMPATIBLE WITH JROC
Reviewed-by: mullan
2011-09-14 21:43:42 -07:00
Jonathan Gibbons
4589920917 7068437: Regression: Filer.getResource(SOURCE_OUTPUT, ...) no longer works in JDK 7 w/o -s
Reviewed-by: darcy
2011-09-14 18:26:57 -07:00
Jonathan Gibbons
afaeb37bb5 7090700: fix for 7080267 breaks two tests
Reviewed-by: ksrini
2011-09-14 15:49:54 -07:00
Tom Rodriguez
a300a41ea1 7090654: nightly failures after 7086585
Reviewed-by: kvn
2011-09-14 13:57:32 -07:00
Joe Darcy
2c3a780b41 7088500: there is no @since tag on SafeVarargs
Reviewed-by: mduigou
2011-09-14 13:09:15 -07:00
Jonathan Gibbons
2bbf651156 7090249: IllegalStateException from Trees.getScope when called from JSR 199
Reviewed-by: mcimadamore
2011-09-14 12:14:30 -07:00
Jonathan Gibbons
1ec8f70fdd 7080267: Call to toString() from an ExpressionStatementTree doesn't take in consideration the ";" at the end
Reviewed-by: mcimadamore
2011-09-14 12:07:50 -07:00
Joe Darcy
30d2b45bd8 6879143: java.math.BigInteger misses the xxxValueExact methods
Reviewed-by: alanb
2011-09-14 11:32:11 -07:00
Mandy Chung
16a24a909d 6915797: Remove sun.tools.jar.JarImageSource that is not used
7090178: Move java.util.XMLUtils to another package to avoid split package

Reviewed-by: alanb, sherman
2011-09-14 08:33:34 -07:00
Bertrand Delsart
bc855ff2e0 7077806: ARM: java.lang.InternalError: bound subword value does not fit into the subword type
Shared fix necessary for ARM/PPC

Reviewed-by: twisti, roland
2011-09-14 16:28:39 +02:00
Bertrand Delsart
fcc31d9741 7057978: improve robustness of c1 ARM back-end wrt non encodable constants
ARM only, avoid assertion failures for huge constants generated by C1 shared code

Reviewed-by: never, vladidan
2011-09-14 10:40:13 +02:00
Roland Westrelin
9d8e44db59 7077312: Provide a CALL effect for instruct declaration in the ad file
Abstracted way to declare that the MachNode has the effect of a call (kills caller save registers, preserves callee save registers)

Reviewed-by: twisti, never
2011-09-14 09:22:51 +02:00
Christian Thalinger
89d4179a4b 7110058: change default for ScavengeRootsInCode to 2
Reviewed-by: kvn, never
2011-11-21 00:57:43 -08:00
Tom Rodriguez
4511ca18de 7110489: C1: 64-bit tiered with ForceUnreachable: assert(reachable(src)) failed: Address should be reachable
Reviewed-by: kvn, iveresov, twisti
2011-11-18 10:29:27 -08:00
Christian Thalinger
ed9a60ae02 7108383: JSR 292: JRuby bench_define_method_methods.rb: assert(slow_jvms != NULL) failed: miss path must not
Reviewed-by: kvn, never
2011-11-17 04:07:30 -08:00
Igor Veresov
b6ce13798b 7112085: assert(fr.interpreter_frame_expression_stack_size()==0) failed: only handle empty stacks
Move the inlinee invoke notification callback into inlinee preamble

Reviewed-by: kvn, never
2011-11-16 19:42:58 -08:00
Vladimir Kozlov
8d2ee23293 6890673: Eliminate allocations immediately after EA
Try to eliminate allocations and related locks immediately after escape analysis.

Reviewed-by: never
2011-11-16 09:13:57 -08:00
Christian Thalinger
81c085a1e2 7003454: order constants in constant table by number of references in code
Reviewed-by: kvn, never, bdelsart
2011-11-16 01:39:50 -08:00
Vladimir Kozlov
6b52dbceb0 7105605: Use EA info to optimize pointers compare
Optimize pointers compare using EA information.

Reviewed-by: never, twisti
2011-11-14 18:38:03 -08:00
Vladimir Kozlov
157ba53d27 7110586: C2 generates incorrect results
Exact limit of empty loop calculated incorrectly.

Reviewed-by: iveresov, never
2011-11-10 20:17:05 -08:00
Vladimir Kozlov
f99084037a 7090259: Fix hotspot sources to build with old compilers
Fixed warnings which prevent building VM with old compilers.

Reviewed-by: never
2011-09-13 20:28:00 -07:00
Igor Veresov
9b101c8ba6 7090069: Java launcher hangs in infinite loop on windows when UseNUMA[Interleaving] is specified
Fix _numa_used_node_list array size specification

Reviewed-by: kvn, johnc, jmasa, ysr
2011-09-13 16:58:35 -07:00
Mandy Chung
12a0dac949 7090297: Remove com.sun.tools.javac.Launcher from tools.jar
Reviewed-by: jjg
2011-09-13 16:37:09 -07:00
Vladimir Kozlov
e756c96259 7089632: assert(machtmp->outcnt() == 1) failed: expected for a MachTemp
Replace assert with check to delete MachTemp nodes only when they are really dead.

Reviewed-by: never
2011-09-13 11:46:51 -07:00
Antonios Printezis
7d850203b9 7089625: G1: policy for how many old regions to add to the CSet (when young gen is fixed) is broken
When refactoring the code for a previous fix, a condition was not correctly negated which prevents the G1 policy from adding the correct number of old regions to the CSet when the young gen size is fixed. The changeset also fixes a small syntactical issue in g1ErgoVerbose.hpp which is causing compiler warnings.

Reviewed-by: brutisso, ysr
2011-09-13 12:40:14 -04:00
Lana Steuck
c755492882 Merge 2011-09-13 08:37:34 -07:00
Maurizio Cimadamore
08619c2e9c 7086601: Error message bug: cause for method mismatch is 'null'
Inference error during lub() does not set 'cause' for method resolution diagnostic

Reviewed-by: jjg
2011-09-13 14:15:39 +01:00
Maurizio Cimadamore
0208d38b3c 7003595: IncompatibleClassChangeError with unreferenced local class with subclass
Compiler omits unreferenced local inner classes from the InnerClasses attribute

Reviewed-by: jjg
2011-09-13 14:15:22 +01:00
Maurizio Cimadamore
8db2f8de59 7086595: Error message bug: name of initializer is 'null'
Implementation of MethodSymbol.location() should take into account static/instance initializers

Reviewed-by: jjg
2011-09-13 14:14:57 +01:00
Sean Coffey
81d33c4727 7082769: FileInputStream/FileOutputStream/RandomAccessFile allow file descriptor be closed when still in use
Reviewed-by: alanb
2011-09-13 11:21:51 +01:00
Tom Rodriguez
1f8f1f79be 7089709: type "jushort" not found
Reviewed-by: kvn, twisti
2011-09-12 13:51:40 -07:00
Stefan Karlsson
a4523cfc7f 7021322: assert(object_end <= top()) failed: Object crosses promotion LAB boundary
Pass the same object size value to both allocate and unallocate_object

Reviewed-by: ysr, brutisso
2011-09-12 16:09:50 +02:00
Antonios Printezis
75685a273a 7097048: G1: extend the G1 SA changes to print per-heap space information
Reviewed-by: brutisso, johnc
2011-10-03 19:04:14 -04:00
John Cuthbertson
02e9894454 7097053: G1: assert(da ? referent->is_oop() : referent->is_oop_or_null()) failed: referenceProcessor.cpp:1054
During remembered set scanning, the reference processor could discover a reference object whose referent was in the process of being copied and so may not be completely initialized. Do not perform reference discovery during remembered set scanning.

Reviewed-by: tonyp, ysr
2011-10-03 12:49:53 -07:00
John Cuthbertson
bbfe9c6e25 7086533: G1: assert(!_g1->is_obj_dead(obj)): We should not be preserving dead objs: g1CollectedHeap.cpp:3835
Some objects may not be marked in the event of an evacuation failure in a partially young GC, during a marking cycle. Avoid this situation by not allowing partially young GCs during a marking cycle.

Reviewed-by: tonyp, ysr, brutisso
2011-09-28 10:36:31 -07:00
Bengt Rutisson
cc177fd515 7091366: re-enable quicksort tests
Added extern "C" to make it build with JDK6 compilers

Reviewed-by: jwilhelm, kvn
2011-09-26 10:14:30 +02:00
Antonios Printezis
55c503aea2 7075646: G1: fix inconsistencies in the monitoring data
Fixed a few inconsistencies in the monitoring data, in particular when reported from jstat.

Reviewed-by: jmasa, brutisso, johnc
2011-09-23 16:07:49 -04:00
John Cuthbertson
1b62d10b4b 6484982: G1: process references during evacuation pauses
G1 now uses two reference processors - one is used by concurrent marking and the other is used by STW GCs (both full and incremental evacuation pauses). In an evacuation pause, the reference processor is embedded into the closures used to scan objects. Doing so causes causes reference objects to be 'discovered' by the reference processor. At the end of the evacuation pause, these discovered reference objects are processed - preserving (and copying) referent objects (and their reachable graphs) as appropriate.

Reviewed-by: ysr, jwilhelm, brutisso, stefank, tonyp
2011-09-22 10:57:37 -07:00
Antonios Printezis
70bb8e788e 7092238: G1: Uninitialized field gc_efficiency in G1PrintRegionLivenessInfo output
Reviewed-by: jcoomes, johnc
2011-09-22 07:18:51 -04:00
John Cuthbertson
08bdb35a29 7092245: G1: Wrong format specifier in G1PrintRegionLivenessInfo header output
Cast HeapRegion::GrainBytes to size_t in output statement.

Reviewed-by: ysr, brutisso, pbk, tonyp
2011-09-21 15:24:07 -07:00
Antonios Printezis
0f7ff53cce 7091032: G1: assert failure when NewRatio is used
The desired min / max heap sizes are miscalculated at initialization when NewRatio is used. The changeset also includes an additional small change to turn a print statement into a warning.

Reviewed-by: johnc, jmasa, ysr, brutisso
2011-09-21 13:36:37 -04:00
John Cuthbertson
2f83b52706 7068215: G1: Print reference processing time during remark
Displays the elapsed time taken to perform reference processing during remark as part of the PrintGCDetails output.

Reviewed-by: ysr
2011-09-21 10:04:45 -07:00
Antonios Printezis
c5b2025c02 7045232: G1: pool names are inconsistent with other collectors (don't have 'Space')
Make sure the eden and survivor pools have "Space" in their name.

Reviewed-by: jmasa, ysr
2011-09-21 01:27:20 -04:00
John Cuthbertson
3ae9021b59 7092412: G1: Some roots not marked during an initial mark that gets an evacuation failure
As a result of the changes for 7080389, an evacuation failure during an initial mark pause may result in some root objects not being marked. Pass whether the caller is a root scanning closure into the evacuation failure handling code so that the thread that successfully forwards an object to itself also marks the object.

Reviewed-by: ysr, brutisso, tonyp
2011-09-20 15:39:17 -07:00
Antonios Printezis
95832db2e5 7059019: G1: add G1 support to the SA
Extend the SA to recognize the G1CollectedHeap and implement any code that's needed by our serviceability tools (jmap, jinfo, jstack, etc.) that depend on the SA.

Reviewed-by: never, poonam, johnc
2011-09-20 09:59:59 -04:00
Tom Rodriguez
e3afdf10ad 7088955: add C2 IR support to the SA
Reviewed-by: kvn
2011-09-11 14:48:24 -07:00
Tom Rodriguez
e39ba1a5fe 7086585: make Java field injection more flexible
Reviewed-by: jrose, twisti, kvn, coleenp
2011-09-10 17:29:02 -07:00
Tom Rodriguez
1ebca30d26 7088020: SEGV in JNIHandleBlock::release_block
Reviewed-by: kvn, twisti
2011-09-10 00:11:04 -07:00
John Coomes
d6fd9c2339 Added tag hs22-b05 for changeset 2787676b53cf 2011-09-09 16:33:13 -07:00
Alejandro Murillo
8ad902f1ed 7088991: Bump ths hs22 build number to 05
Reviewed-by: johnc
2011-09-09 16:24:12 -07:00
John Coomes
8bc1babb6d Merge 2011-09-09 16:17:16 -07:00
Vladimir Kozlov
92b2b44b18 7035946: Up to 15% regression on JDK 7 b136 vs b135 on specjvm2008.crypto.rsa on x64
Revert changes which caused regression.

Reviewed-by: never
2011-09-09 13:47:11 -07:00
Igor Veresov
67ba51cae8 Merge 2011-09-09 12:44:37 -07:00
Stefan Karlsson
bfa7e324d9 Merge 2011-09-09 14:44:43 +02:00
Antonios Printezis
1a9d9b84f8 7087717: G1: make the G1PrintRegionLivenessInfo parameter diagnostic
Reviewed-by: brutisso, ysr
2011-09-09 05:20:58 -04:00
Bengt Rutisson
0be11c915c 6929868: G1: introduce min / max young gen size bounds
Make G1 handle young gen size command line flags more consistently

Reviewed-by: tonyp, jwilhelm
2011-09-08 16:29:41 +02:00
Robert Ottenhag
b62fb1de97 Merge 2011-09-08 06:36:31 -07:00
Antonios Printezis
d96de580b6 7084509: G1: fix inconsistencies and mistakes in the young list target length calculations
Fixed inconsistencies and mistakes in the young list target length calculations so that a) the calculated target length is optimal (before, it was not), b) other parameters like max survivor size and max gc locker eden expansion are always consistent with the calculated target length (before, they were not always), and c) the resulting target length was always bound by desired min and max values (before, it was not).

Reviewed-by: brutisso, johnc
2011-09-08 05:16:49 -04:00
Roland Westrelin
499732d316 7087453: PhaseChaitin::yank_if_dead() should handle MachTemp inputs
PhaseChaitin::yank_if_dead() should be able to handle MachTemp inputs as a special case and yank them.

Reviewed-by: never, kvn
2011-09-08 09:35:41 +02:00
Vladimir Kozlov
42c3c5cb7b 7087947: Add regression test for 7068051
Add regression test.

Reviewed-by: never
2011-09-08 12:44:04 -07:00
Christian Thalinger
439b75eb12 7085860: JSR 292: implement CallSite.setTargetNormal and setTargetVolatile as native methods
Reviewed-by: jrose, never
2011-09-08 05:11:31 -07:00
Bertrand Delsart
6141a568aa 7087445: Improve platform independence of JSR292 shared code
Changes necessary for some JSR292 ports

Reviewed-by: jrose, dholmes
2011-09-08 10:12:25 +02:00
Tom Rodriguez
50bc4343b3 7082631: JSR 292: need profiling support in GWTs
Add CountingMethodHandle

Reviewed-by: twisti, jrose
2011-09-07 21:05:24 -07:00
Igor Veresov
1940a13d31 7086226: UseNUMA fails on old versions of windows
Return correct answers from os::numa_*() for UMA machines or if NUMA API is not supported

Reviewed-by: johnc
2011-09-07 18:58:33 -07:00
Weijun Wang
83b6b7ace1 7087428: move client tests out of jdk_misc
Reviewed-by: ohair, alanb
2011-09-08 09:06:09 +08:00
Y. Srinivas Ramakrishna
ed72e31727 4965777: GC changes to support use of discovered field for pending references
If and when the reference handler thread is able to use the discovered field to link reference objects in its pending list, so will GC. In that case, GC will scan through this field once a reference object has been placed on the pending list, but not scan that field before that stage, as the field is used by the concurrent GC thread to link discovered objects. When ReferenceHandleR thread does not use the discovered field for the purpose of linking the elements in the pending list, as would be the case in older JDKs, the JVM will fall back to the old behaviour of using the next field for that purpose.

Reviewed-by: jcoomes, mchung, stefank
2011-09-07 13:55:42 -07:00
Y. Srinivas Ramakrishna
ec13301b32 Merge 2011-09-07 15:00:13 -07:00
Vladimir Kozlov
61068411fa 7054211: No loop unrolling done in jdk7b144 for a test update() while loop
Restore unrolling code for CaffeineMark.

Reviewed-by: never
2011-09-07 12:58:42 -07:00
Igor Veresov
315ec64dce Merge 2011-09-07 11:52:00 -07:00
Antonios Printezis
24eb07061e 7050392: G1: Introduce flag to generate a log of the G1 ergonomic decisions
It introduces ergonomic decision logging in G1 for the following heuristics: heap sizing, collection set construction, concurrent cycle initiation, and partially-young GC start/end. The code has a bit of refactoring in a few places to make the decision logging possible. It also replaces alternative ad-hoc logging that we have under different parameters and switches (G1_DEBUG, G1PolicyVerbose).

Reviewed-by: johnc, ysr
2011-09-07 12:21:23 -04:00
Roland Westrelin
90844ca5dc 7085012: ARM: com/sun/jdi/PopSynchronousTest.java still fails
InterpreterRuntime::popframe_move_outgoing_args() is required for the ARM interpreter.

Reviewed-by: kvn, twisti
2011-09-07 14:15:07 +02:00
Roland Westrelin
48ecf5dfe4 7086394: c2/arm: enable UseFPUForSpilling
ARM has instructions to move data directly between the fpu and integer registers.

Reviewed-by: kvn, never
2011-09-07 09:35:52 +02:00
Igor Veresov
a9cd50a1c8 7087583: Hotspot fails to allocate heap with mmap(MAP_HUGETLB)
Try using small pages when transparent huge pages allocation fails

Reviewed-by: ysr
2011-09-06 21:03:51 -07:00
Tom Rodriguez
edb7b9514a 7051798: SA-JDI: NPE in Frame.addressOfStackSlot(Frame.java:244)
Reviewed-by: kvn
2011-09-05 17:09:05 -07:00
Vladimir Kozlov
dece7fbfec 7086560: 7085404 changes broke VM with -XX:-EnableInvokeDynamic
Add check that ciEnv::_CallSite_klass is initialized.

Reviewed-by: jrose
2011-09-03 14:03:54 -07:00
Tom Rodriguez
b13890a199 Merge 2011-09-03 09:56:57 -07:00
Tom Rodriguez
d4d5856fd4 7016881: JSR 292: JDI: sun.jvm.hotspot.utilities.AssertionFailure: index out of bounds
Reviewed-by: kvn, twisti
2011-09-02 22:00:49 -07:00
John Coomes
4a09997f51 Merge 2011-09-02 21:33:57 -07:00
Tom Rodriguez
32fd1b087d 7071307: MethodHandle bimorphic inlining should consider the frequency
Reviewed-by: twisti, roland, kvn, iveresov
2011-09-02 20:58:21 -07:00
John Coomes
c8c58542b3 Added tag hs22-b04 for changeset 741bcb34b337 2011-09-02 15:52:03 -07:00
Vladimir Kozlov
f7d7a6071a 7039731: arraycopy could use prefetch on SPARC
Use BIS and prefetch in arraycopy stubs for Sparc (BIS for T4 only).

Reviewed-by: never, iveresov
2011-09-02 12:13:33 -07:00
Christian Thalinger
1038fed51d 7071709: JSR 292: switchpoint invalidation should be pushed not pulled
Reviewed-by: never
2011-09-02 04:28:59 -07:00
Alejandro Murillo
096ba80aea 7086589: bump the hs22 build number to 04
Reviewed-by: johnc
2011-09-02 03:49:30 -07:00
John Coomes
d42d7de7ff Added tag hs22-b03 for changeset 52cac2467a60 2011-09-02 15:47:43 -07:00
John Coomes
87501184d9 Added tag hs22-b02 for changeset 7adf55aec150 2011-09-02 15:47:43 -07:00
John Coomes
b57839cc49 Added tag hs22-b01 for changeset 2143c41c2a90 2011-09-02 15:47:42 -07:00
Christian Thalinger
db44acbeb4 7085404: JSR 292: VolatileCallSites should have push notification too
Reviewed-by: never, kvn
2011-09-02 00:36:18 -07:00
Stefan Karlsson
5b6ba4e611 7085906: Replace the permgen allocated sentinelRef with a self-looped end
Remove the sentinelRef and let the last Reference in a discovered chain point back to itself.

Reviewed-by: ysr, jmasa
2011-09-01 16:18:17 +02:00
Christian Thalinger
fcc2a86582 7079673: JSR 292: C1 should inline bytecoded method handle adapters
Reviewed-by: never
2011-09-01 01:31:25 -07:00
Y. Srinivas Ramakrishna
74b5a420d5 Merge 2011-08-31 23:55:58 -07:00
Tom Rodriguez
fa7c124af1 7083786: dead various dead chunks of code
Reviewed-by: iveresov, kvn
2011-08-31 16:46:11 -07:00
John Cuthbertson
6c8c4fb321 7066841: remove MacroAssembler::br_on_reg_cond() on sparc
Remove the macro assembler routine br_on_reg_cond() and replace the remaining calls to that routine with an equivalent.

Reviewed-by: kvn, iveresov
2011-08-31 10:16:02 -07:00
Vladimir Kozlov
9c87ea9062 7085137: -XX:+VerifyOops is broken
Replace set() with patchable_set() to generate 8 instructions always.

Reviewed-by: iveresov, never, roland
2011-08-31 09:48:21 -07:00
Christian Thalinger
05b60b3662 7078382: JSR 292: don't count method handle adapters against inlining budgets
Reviewed-by: kvn, never
2011-08-31 01:40:45 -07:00
Igor Veresov
5903a384b4 7085279: C1 overflows code buffer with VerifyOops and CompressedOops
Increase the limit of code emitted per LIR instruction, increase the max size of the nmethod generated by C1

Reviewed-by: never, kvn, johnc
2011-08-30 19:01:58 -07:00
Stuart Marks
97583c8f0d 7083012: fix for RMI Registry
Reviewed-by: jdn, valeriep
2011-08-30 17:29:36 -07:00
Stuart Marks
fcee5390db 7077466: fix for RMI DGC
Reviewed-by: valeriep
2011-08-30 14:30:03 -07:00
Tom Rodriguez
cebdce4479 7082263: Reflection::resolve_field/field_get/field_set are broken
Reviewed-by: kvn, dholmes, stefank, coleenp
2011-08-30 00:54:09 -07:00
Igor Veresov
d8fd276e35 7082645: Hotspot doesn't compile on old linuxes after 7060836
Move syscall ids definitions into os_linux.cpp

Reviewed-by: johnc
2011-08-29 17:42:39 -07:00
John Cuthbertson
1bec3a1bd3 7080389: G1: refactor marking code in evacuation pause copy closures
Refactor code marking code in the evacuation pause copy closures so that an evacuated object is only marked by the thread that successfully copies it.

Reviewed-by: stefank, brutisso, tonyp
2011-08-29 10:13:06 -07:00
Christian Thalinger
e3342531b4 7083184: JSR 292: don't store context class argument with call site dependencies
Reviewed-by: jrose, never
2011-08-29 05:07:35 -07:00
Igor Veresov
ec3f90d1b4 6591247: C2 cleans up the merge point too early during SplitIf
Remove region self reference last

Reviewed-by: kvn, never
2011-08-27 00:23:47 -07:00
Vladimir Kozlov
6446205688 7059037: Use BIS for zeroing on T4
Use BIS for zeroing new allocated big (2Kb and more) objects and arrays.

Reviewed-by: never, twisti, ysr
2011-08-26 08:52:22 -07:00
Tom Rodriguez
19f7fb98b8 7082949: JSR 292: missing ResourceMark in methodOopDesc::make_invoke_method
Reviewed-by: kvn, twisti
2011-08-25 20:29:30 -07:00
Tom Deneau
06d05b7c47 7082969: NUMA interleaving
Support interleaving on NUMA systems for collectors that don't have NUMA-awareness.

Reviewed-by: iveresov, ysr
2011-08-25 02:57:46 -07:00
Jon Masamitsu
15070123fa 6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
Select number of GC threads dynamically based on heap usage and number of Java threads

Reviewed-by: johnc, ysr, jcoomes
2011-08-09 10:16:01 -07:00
Antonios Printezis
098ed89645 Merge 2011-11-22 04:47:10 -05:00
John Cuthbertson
a03f061ca2 7111795: G1: Various cleanups identified during walk through of changes for 6484965
Various cleanups and formatting changes identified during a code walk through of the changes for 6484965 ("G1: piggy-back liveness accounting phase on marking").

Reviewed-by: brutisso, tonyp
2011-11-18 12:27:10 -08:00
John Cuthbertson
6d0e0064bf 7110173: GCNotifier::pushNotification publishes stale data
GCNotifier::pushNotification() references GCMemoryManager::_last_gc_stat but is called from GCMemoryManager::gc_end() before GCMemoryManager::_last_gc_stat is set up using the values in GCMemoryManager::_current_gc_stat. As a result the GC notification code accesses unitialized or stale data. Move the notification call after GCMemoryManager::_las_gc_stat is set, but inside the same if-block.

Reviewed-by: poonam, dholmes, fparain, mchung
2011-11-21 09:24:56 -08:00
Bengt Rutisson
40c94189f7 7110718: -XX:MarkSweepAlwaysCompactCount=0 crashes the JVM
Interpret MarkSweepAlwaysCompactCount < 1 as never do full compaction

Reviewed-by: ysr, tonyp, jmasa, johnc
2011-11-21 07:47:34 +01:00
Antonios Printezis
3cd36270b7 7097002: G1: remove a lot of unused / redundant code from the G1CollectorPolicy class
Major cleanup of the G1CollectorPolicy class. It removes a lot of unused fields and methods and also consolidates replicated information (mainly various ways of counting the number of CSet regions) into one copy.

Reviewed-by: johnc, brutisso
2011-11-18 12:52:27 -05:00
Mala Bankal
28a1130e8e 7055902: Oracle Java IIOP Deserialization Type Confusion Remote Code Execution Vulnerability
Reviewed-by: coffeys
2011-08-09 05:39:54 -07:00
Abhijit Saha
5fb55770ff 7046794: Configurable behavior for server-side stacktraces
Reviewed-by: ramap
2011-07-25 11:38:25 -07:00
Denis Fokin
096686792a 7019773: AWTKeyStroke.ctor is a mutable static
Reviewed-by: art
2011-07-22 21:14:56 +04:00
Abhijit Saha
fa11842c27 7023640: calculation for malloc size in TransformHelper.c could overflow an integer
Reviewed-by: flar
2011-07-20 14:45:44 -07:00
Abhijit Saha
7faffd3edc 7032417: Fix for 6981922 does not address multiple VM case
Reviewed-by: michaelm
2011-07-20 09:01:04 -07:00
Abhijit Saha
b620085c34 Merge 2011-07-19 11:05:57 -07:00
Abhijit Saha
8fa5c69658 Merge 2011-07-19 11:04:28 -07:00
Abhijit Saha
0f59afe906 Merge 2011-07-19 11:03:54 -07:00
Abhijit Saha
c9fdb110ab Merge 2011-07-19 11:03:46 -07:00
Abhijit Saha
cbc4f20d71 Merge 2011-07-19 11:03:26 -07:00
Abhijit Saha
41613facec Merge 2011-07-19 11:03:08 -07:00
Kumar Srinivasan
0a5bf67eff 7057857: SIGSEGV [libunpack.so] store_Utf8_char(signed char*, unsigned short) in java.util.jar.pack200
Reviewed-by: jrose, asaha, hawtin
2011-07-15 13:57:57 -07:00
Abhijit Saha
5e1834681a Merge 2011-06-28 08:39:58 -07:00
Abhijit Saha
74da3063dc Merge 2011-06-28 08:39:36 -07:00
Abhijit Saha
3e8100800a Merge 2011-06-28 08:39:06 -07:00
Abhijit Saha
66a728edea Merge 2011-06-28 08:38:58 -07:00
Abhijit Saha
87caad995c Merge 2011-06-28 08:38:30 -07:00
Abhijit Saha
c50d00f9c1 Merge 2011-06-28 08:38:14 -07:00
Abhijit Saha
63f2c9dfc8 Merge 2011-06-27 12:35:31 -07:00
Alan Bateman
c3c22d1d74 7059259: (process) ProcessBuilder.start permission check should be improved when redirecting output to append
Reviewed-by: hawtin
2011-06-27 20:30:40 +01:00
Abhijit Saha
a4aedf8336 Merge 2011-06-27 12:30:30 -07:00
Abhijit Saha
6b2f8098cf Merge 2011-06-27 12:29:18 -07:00
Abhijit Saha
7f16ba284e Merge 2011-06-27 11:46:58 -07:00
Abhijit Saha
d4979eff5b Merge 2011-06-27 11:46:49 -07:00
Abhijit Saha
294b5f66f6 Merge 2011-06-27 11:45:52 -07:00
Abhijit Saha
69ea97abed Merge 2011-06-27 11:45:14 -07:00
Anthony Petrov
a2a420e7de 7022113: Security icon can be moved behind the window using the com.sun.SecurityWarning.setPosition() method
Reviewed-by: art, dcherepanov
2011-06-21 20:20:58 +04:00
Alan Bateman
80da503482 7000600: InputStream.skip() makes sensitive data accessible to malicious code
Reviewed-by: hawtin, chegar
2011-06-15 14:49:25 +01:00
9345 changed files with 1422919 additions and 127191 deletions

View File

@@ -3,3 +3,4 @@
/nbproject/private/
^webrev
^.hgtip
.DS_Store

24
.hgtags
View File

@@ -128,3 +128,27 @@ de9223c94f9c710b3eebb599cd3586f36c8b94a9 jdk8-b01
31f5c34d78081572ad9a2401c0bb0c6b9711dd65 jdk8-b04
c4f9ea1ecb55ff44e0dd21d2888ead308c86a3aa jdk8-b05
429da7734bf491bccde2a752fae97e9f225896dc jdk8-b06
bc5710332b294676661103bb20d47d2ea3ba8def jdk8-b07
24ee504f80412770c6874836cd9e55b536427b1d jdk8-b08
fbf3cabc9e3bb1fcf710941d777cb0400505fbe6 jdk8-b09
f651ce87127980c58e3599daba964eba2f3b4026 jdk8-b10
cc1f5ce8e504d350e0b0c28c5f84333f8d540132 jdk8-b11
86db042b3385c338e17f7664447fdc7d406dd19e jdk8-b12
4cc0ef72c812943743ef4765f1100e2fbe2b1a08 jdk8-b13
9ffaa48dbfb0f5936c2b789867d0785faec7071d jdk8-b14
b5060eae3b32fd9f884a09774338cd8186d7fafa jdk8-b15
736a63b854f321c7824b7e47890135f80aee05e3 jdk8-b16
f0eccb2946986fb9626efde7d8ed9c8192623f5c jdk8-b17
885050364691ac1ac978305c63f3368a197fb04d jdk8-b18
0ff7113a0882ec82d642cb9f0297b4e497807ced jdk8-b19
6561530ea757c3f3a6fb171c9cc7b3885cdeca85 jdk8-b20
b3a426170188f52981cf4573a2f14d487fddab0d jdk8-b21
e8f03541af27e38aafb619b96863e17f65ffe53b jdk8-b22
498124337041ad53cbaa7eb110f3d7acd6d4eac4 jdk8-b23
7d3720d8c595d1519c31e9ff7366203fc2c61350 jdk8-b24
0071a6d64113a35ba345bb1580c256de5ce17d3e jdk8-b25
6c805d8ed4e5449ea5e4d158c7bdbd7b0b70efd1 jdk8-b26
c51754cddc037b9609e202b9ed38363d8683e7a8 jdk8-b27
16ba58282d117247f480aae7a79b88141ade52a3 jdk8-b28
e070119aa56ee4dc5506c19d2c4d2eecab8ad429 jdk8-b29
23da7804aca0c9c4e6e86532a1453125a76d95ee jdk8-b30

View File

@@ -128,3 +128,27 @@ f42e3d9394b40a423d345b8da22687b5462e5f25 jdk8-b01
0b66a233bfb9ba2ebda1e5cdfdb0373d6c1e3c69 jdk8-b04
b910aac18c772b823b1f7da03e2c6528725cc6de jdk8-b05
28cf2aec4dd7c3c75efc1c15078522467c781a6d jdk8-b06
0db7ae9f2b1017124c779bccd016c976928859a0 jdk8-b07
fb1bc13260d76447e269e843859eb593fe2a8ab2 jdk8-b08
8adb70647b5af5273dfe6a540f07be667cd50216 jdk8-b09
a6c4c248e8fa350c35014fa94bab5ac1a1ac3299 jdk8-b10
1defbc57940a56f0aa41e9dee87b71e8c8b71103 jdk8-b11
8e2104d565baee473895d5eba20e39f85ab4bf9f jdk8-b12
26fb81a1e9ceb9baffba216acd9ded62e9e9d5ab jdk8-b13
23aa7f2c80a2fa354c80decf03e7c2018177ef4e jdk8-b14
a4f28069d44a379cda99dd1d921d19f819726d22 jdk8-b15
4e06ae613e99549835896720c7a68c29ad5543f5 jdk8-b17
4e06ae613e99549835896720c7a68c29ad5543f5 jdk8-b16
7010bd24cdd07bc7daef80702f39124854dec36c jdk8-b18
237bc29afbfc6f56a4fe4a6008e2befb59c44bac jdk8-b19
5a5eaf6374bcbe23530899579fed17a05b7705f3 jdk8-b20
cc771d92284f71765eca14d6d08703c4af254c04 jdk8-b21
7ad075c809952e355d25030605da6af30456ed74 jdk8-b22
60d6f64a86b1e511169d264727f6d51415978df0 jdk8-b23
1a5f1d6b98d6827cdb529a4abe6e52a886d944f4 jdk8-b24
221a378e06a326f45e5d89e2123cd6323e0181d1 jdk8-b25
2accafff224ae39caf5f532c305251ba624bf2c0 jdk8-b26
1533dfab9903e4edcfead3b0192643f38c418b9b jdk8-b27
6e2541d60f4e342b5b67140271d7611643929dc3 jdk8-b28
41460de042580bc4a4ce3f863779c66f39cb8578 jdk8-b29
6cea54809b51db92979c22fd8aa8fcb1cb13d12e jdk8-b30

View File

@@ -2,3 +2,4 @@
^dist/
/nbproject/private/
^.hgtip
.DS_Store

View File

@@ -128,3 +128,27 @@ cd0da00694fbce642db9be936d3e4909a71d911d jdk8-b03
60a68d688e24473cf84dedd1e60901a61ab82555 jdk8-b04
cc1b599b986a37cb57de4584c5e58169766ca535 jdk8-b05
45c43dde7ba7f176333a51a98f086275478836fa jdk8-b06
3d61f0856f349e2163bf98146465dab3b7437f63 jdk8-b07
0d52b1c87aa8fdea7fdc9c4126ea58f95ca6b351 jdk8-b08
a891732c1a83082177ff7a4cf1506068d9cc0a47 jdk8-b09
cda87f7fefcee3b89742a57ce5ad9b03a54c210d jdk8-b10
0199e4fef5cc2bd234c65b93220459ef7a3bb3b1 jdk8-b11
31d70911b712c6b4e580a3110363d5f044cfed7a jdk8-b12
5b9d9b839d3d7fe02347827221c97c6d242a6f96 jdk8-b13
e59c47de1ad8982ff3b0e843773a6902b36c2337 jdk8-b14
7da69e7175a7c7564ee6d0e52255cbb8a57ef577 jdk8-b15
82dc033975bb9b553b4ef97b6d483eda8de32e0f jdk8-b17
82dc033975bb9b553b4ef97b6d483eda8de32e0f jdk8-b16
312cf15d16577ef198b033d2a4cc0a52369b7343 jdk8-b18
e1366c5d84ef984095a332bcee70b3938232d07d jdk8-b19
51d8b6cb18c0978ecfa4f33e1537d35ee01b69fa jdk8-b20
f157fc2a71a38ce44007a6f18d5b011824dce705 jdk8-b21
a11d0062c445d5f36651c78650ab88aa594bcbff jdk8-b22
5218eb256658442b62b05295aafa5b5f35252972 jdk8-b23
b98f0e6dddf987df565029a1f58417fc1844c3f3 jdk8-b24
e45d6b406d5f91ff5256a5c82456ab1e7eb8becd jdk8-b25
79f709a099f40c08f76567fa6d813f9009a69826 jdk8-b26
4fffe75e4edd39a2517f10b743941bf94edb143d jdk8-b27
2082eb35d49a9c2aab90b8d4fd31cefb7a23b82e jdk8-b28
6117395d422682f89d228347e319fcaac7edc729 jdk8-b29
4605f8418bf562e78be79b25b6b8a5110281acae jdk8-b30

View File

@@ -0,0 +1,46 @@
#
# Copyright (c) 1999, 2010, 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.
#
#
# Makefile to specify compiler flags for programs and libraries
# targeted to BSD. Should not contain any rules.
#
# Warning: the following variables are overriden by Defs.gmk. Set
# values will be silently ignored:
# CFLAGS (set $(OTHER_CFLAGS) instead)
# CPPFLAGS (set $(OTHER_CPPFLAGS) instead)
# CXXFLAGS (set $(OTHER_CXXFLAGS) instead)
# LDFLAGS (set $(OTHER_LDFAGS) instead)
# LDLIBS (set $(EXTRA_LIBS) instead)
# LDLIBS_COMMON (set $(EXTRA_LIBS) instead)
# Get shared JDK settings
include $(BUILDDIR)/common/shared/Defs.gmk
ifndef PLATFORM_SRC
PLATFORM_SRC = $(TOPDIR)/src/solaris
endif # PLATFORM_SRC

View File

@@ -149,8 +149,8 @@ strip_prop_options_clean:
# Strip the properties files
strip_all_props: $(STRIPPROPERTIES_JARFILE) $(STRIP_PROP_options)
@if [ -s $(STRIP_PROP_options) ] ; then \
$(ECHO) "$(BOOT_JAVA_CMD) -jar $(STRIPPROPERTIES_JARFILE) -optionsfile $(STRIP_PROP_options)" ; \
$(BOOT_JAVA_CMD) -jar $(STRIPPROPERTIES_JARFILE) -optionsfile $(STRIP_PROP_options) ; \
$(ECHO) "$(BOOT_JAVA_CMD) -jar $(STRIPPROPERTIES_JARFILE) @$(STRIP_PROP_options)" ; \
$(BOOT_JAVA_CMD) -jar $(STRIPPROPERTIES_JARFILE) @$(STRIP_PROP_options) ; \
fi
@$(java-vm-cleanup)

View File

@@ -0,0 +1,131 @@
#
# Copyright (c) 2005, 2010, 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.
#
#
# Definitions for Bsd.
#
# Default for COMPILER_WARNINGS_FATAL on Bsd (C & C++ compiler warnings)
ifndef COMPILER_WARNINGS_FATAL
COMPILER_WARNINGS_FATAL=false
endif
# Bsd should use parallel compilation for best build times
ifndef COMPILE_APPROACH
COMPILE_APPROACH = parallel
endif
# Indication that we are doing an incremental build.
# This may trigger the creation of make depend files.
ifndef INCREMENTAL_BUILD
INCREMENTAL_BUILD = false
endif
# FullPath just makes sure it never ends with a / and no duplicates
define FullPath
$(shell cd $1 2> $(DEV_NULL) && pwd)
endef
# OptFullPath: Absolute path name of a dir that might not initially exist.
define OptFullPath
$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
endef
# Location on system where jdk installs might be
USRJDKINSTANCES_PATH =$(PACKAGE_PATH)
# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
ifneq "$(origin ALT_UNIXCOMMAND_PATH)" "undefined"
UNIXCOMMAND_PATH :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH))
else
UNIXCOMMAND_PATH = /bin/
endif
# USRBIN_PATH: path to where the most common Unix commands are.
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
ifneq "$(origin ALT_USRBIN_PATH)" "undefined"
USRBIN_PATH :=$(call PrefixPath,$(ALT_USRBIN_PATH))
else
USRBIN_PATH = /usr/bin/
endif
# UNIXCCS_PATH: path to where the Solaris ported UNIX commands can be found
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
ifneq "$(origin ALT_UNIXCCS_PATH)" "undefined"
UNIXCCS_PATH :=$(call PrefixPath,$(ALT_UNIXCCS_PATH))
else
UNIXCCS_PATH = /usr/ccs/bin/
endif
# SLASH_JAVA: location of all network accessable files
ifdef ALT_SLASH_JAVA
SLASH_JAVA :=$(ALT_SLASH_JAVA)
else
SLASH_JAVA := $(call DirExists,/java,/java,/NOT-SET)
endif
# JDK_DEVTOOLS_DIR: common path for all the java devtools
ifdef ALT_JDK_DEVTOOLS_DIR
JDK_DEVTOOLS_DIR =$(ALT_JDK_DEVTOOLS_DIR)
else
JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
endif
# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH))
else
DEVTOOLS_PATH =$(PACKAGE_PATH)/bin/
endif
# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
# _BOOTDIR2: Second choice
ifndef ALT_BOOTDIR
_BOOTDIR1 =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
_BOOTDIR2 =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
endif
# Import JDK images allow for partial builds, components not built are
# imported (or copied from) these import areas when needed.
# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
# multiple platforms, e.g. windows-i586, solaris-sparc, bsd-586, etc.
ifdef ALT_BUILD_JDK_IMPORT_PATH
BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
else
BUILD_JDK_IMPORT_PATH = $(PROMOTED_BUILD_BINARIES)
endif
BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
# JDK_IMPORT_PATH: location of JDK install tree (this version) to import
ifdef ALT_JDK_IMPORT_PATH
JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
else
JDK_IMPORT_PATH = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
endif
JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)

View File

@@ -31,7 +31,7 @@
# These input UTILS_* variables can be defined at anytime, ideally once.
# Unix Commands: Normally /bin/, /usr/bin/. or C:/mksnt/mksnt/
# UTILS_COMMAND_PATH
# /usr/bin/
# /usr/bin/
# UTILS_USR_BIN_PATH
# /usr/ccs/bin/ (sccs, m4, lex, yacc, as, ar, strip, mcs)
# UTILS_CCS_BIN_PATH
@@ -53,6 +53,13 @@ ifeq ($(PLATFORM),linux)
UTILS_DEVTOOL_PATH=$(USRBIN_PATH)
endif
ifeq ($(PLATFORM),bsd)
UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH)
UTILS_USR_BIN_PATH=$(USRBIN_PATH)
UTILS_CCS_BIN_PATH=$(USRBIN_PATH)
UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH)
endif
ifeq ($(PLATFORM),solaris)
UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH)
UTILS_USR_BIN_PATH=$(UNIXCOMMAND_PATH)
@@ -166,15 +173,15 @@ ifeq ($(PLATFORM),linux)
# Also, some distribution (Ubuntu, Debian, others?) place the rpm command
# itself in /usr/bin rather than it's traditional home in /bin.
RPM=$(firstword $(wildcard $(UTILS_COMMAND_PATH)rpm) \
$(wildcard $(UTILS_USR_BIN_PATH)rpm))
$(wildcard $(UTILS_USR_BIN_PATH)rpm))
RPMBUILD=$(firstword $(wildcard $(UTILS_COMMAND_PATH)rpmbuild) \
$(wildcard $(UTILS_USR_BIN_PATH)rpmbuild) \
$(wildcard $(UTILS_COMMAND_PATH)rpm) \
$(wildcard $(UTILS_USR_BIN_PATH)rpm))
$(wildcard $(UTILS_USR_BIN_PATH)rpmbuild) \
$(wildcard $(UTILS_COMMAND_PATH)rpm) \
$(wildcard $(UTILS_USR_BIN_PATH)rpm))
# Most Linux distros have "sort" in /bin. Ubuntu, Debian and perhaps
# others have it in /usr/bin.
SORT=$(firstword $(wildcard $(UTILS_COMMAND_PATH)sort) \
$(wildcard $(UTILS_USR_BIN_PATH)sort))
$(wildcard $(UTILS_USR_BIN_PATH)sort))
NAWK = $(USRBIN_PATH)gawk
# Intrinsic unix command, with backslash-escaped character interpretation
ECHO = /bin/echo -e
@@ -198,3 +205,34 @@ ifeq ($(PLATFORM),solaris)
ECHO = /usr/bin/echo
endif
# BSD specific
ifeq ($(PLATFORM),bsd)
BASENAME = $(UTILS_USR_BIN_PATH)basename
EGREP = $(UTILS_USR_BIN_PATH)egrep
EXPR = $(UTILS_COMMAND_PATH)expr
FMT = $(UTILS_USR_BIN_PATH)fmt
GREP = $(UTILS_USR_BIN_PATH)grep
GUNZIP = $(UTILS_USR_BIN_PATH)gunzip
ID = $(UTILS_USR_BIN_PATH)id
MSGFMT = $(UTILS_DEVTOOL_PATH)msgfmt
SED = $(UTILS_USR_BIN_PATH)sed
SORT = $(UTILS_USR_BIN_PATH)sort
TEST = $(UTILS_COMMAND_PATH)test
TOUCH = $(UTILS_USR_BIN_PATH)touch
TRUE = $(UTILS_USR_BIN_PATH)true
UNAME = $(UTILS_USR_BIN_PATH)uname
# BSD OS_VENDOR specific
ifeq ($(OS_VENDOR), Apple)
NAWK = $(UTILS_USR_BIN_PATH)awk
UNZIPSFX = $(UTILS_USR_BIN_PATH)unzipsfx
ZIPEXE = $(UTILS_USR_BIN_PATH)zip
else
UNZIP = $(UTILS_DEVTOOL_PATH)unzip
endif
ifeq ($(OS_VENDOR), OpenBSD)
NAWK = $(UTILS_USR_BIN_PATH)awk
else
CPIO = $(UTILS_USR_BIN_PATH)cpio
TAR = $(UTILS_USR_BIN_PATH)tar
endif
endif

View File

@@ -62,8 +62,8 @@ PLATFORM_SHARED=done
# CLASSPATH_SEPARATOR separator in classpath, ; or :
# BUNDLE_FILE_SUFFIX suffix for bundles: .tar or .tar.gz
# ISA_DIR solaris only: /sparcv9 or /amd64
# REQUIRED_WINDOWS_NAME windows only: basic name of windows
# REQUIRED_WINDOWS_VERSION windows only: specific version of windows
# REQUIRED_WINDOWS_NAME windows only: basic name of windows
# REQUIRED_WINDOWS_VERSION windows only: specific version of windows
# USING_CYGWIN windows only: true or false
# WINDOWS_NT_VERSION_STRING windows only: long version name
# REQUIRED_OS_VERSION required OS version, e.g. 5.10, 2.4
@@ -135,7 +135,7 @@ ifeq ($(SYSTEM_UNAME), SunOS)
BUNDLE_FILE_SUFFIX=.tar
# Required Solaris version
REQUIRED_OS_VERSION = 5.10
# Minimum disk space needed as determined by running 'du -sk' on
# Minimum disk space needed as determined by running 'du -sk' on
# a fully built workspace.
ifeq ($(ARCH_FAMILY), sparc)
REQUIRED_FREE_SPACE=1300000
@@ -207,7 +207,7 @@ ifeq ($(SYSTEM_UNAME), Linux)
# Suffix for file bundles used in previous release
BUNDLE_FILE_SUFFIX=.tar.gz
# Minimum disk space needed as determined by running 'du -sk' on
# Minimum disk space needed as determined by running 'du -sk' on
# a fully built workspace.
REQUIRED_FREE_SPACE=1460000
LINUX_VERSION_INFO = /etc/redhat-release
@@ -231,6 +231,98 @@ ifeq ($(SYSTEM_UNAME), Linux)
MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2)
endif
ifeq ($(SYSTEM_UNAME), FreeBSD)
PLATFORM = bsd
OS_NAME = freebsd
OS_VENDOR = FreeBSD
REQUIRED_OS_VERSION = 6.0
endif
ifeq ($(SYSTEM_UNAME), Darwin)
PLATFORM = bsd
OS_NAME = darwin
OS_VENDOR = Apple
REQUIRED_OS_VERSION = 8.0
endif
ifeq ($(SYSTEM_UNAME), NetBSD)
PLATFORM = bsd
OS_NAME = netbsd
OS_VENDOR = NetBSD
REQUIRED_OS_VERSION = 3.0
endif
ifeq ($(SYSTEM_UNAME), OpenBSD)
PLATFORM = bsd
OS_NAME = openbsd
OS_VENDOR = OpenBSD
REQUIRED_OS_VERSION = 4.9
endif
# Platform settings specific to BSD
ifeq ($(PLATFORM), bsd)
OS_VERSION := $(shell uname -r)
# Arch and OS name/version
mach := $(shell uname -m)
archExpr = case "$(mach)" in \
i[3-9]86) \
echo i586 \
;; \
sparc64) \
echo sparcv9 \
;; \
sparc*) \
echo sparc \
;; \
x86_64) \
echo amd64 \
;; \
"Power Macintosh") \
echo ppc \
;; \
*) \
echo $(mach) \
;; \
esac
ARCH := $(shell $(archExpr) )
ARCH_FAMILY := $(ARCH)
# Darwin x86 builds are i386/amd64 universal.
ifeq ($(SYSTEM_UNAME), Darwin)
ifneq ($(ARCH), ppc)
ARCH=universal
endif
endif
# i586, sparc, and ppc are 32 bit, amd64 and sparc64 are 64
ifneq (,$(findstring $(ARCH), i586 sparc ppc universal))
ARCH_DATA_MODEL=32
else
ARCH_DATA_MODEL=64
endif
ifeq ($(ARCH), i586)
LIBARCH = i386
else
LIBARCH = $(ARCH)
endif
# Value of Java os.arch property
ARCHPROP = $(LIBARCH)
# Suffix for file bundles used in previous release
BUNDLE_FILE_SUFFIX=.tar.gz
# Minimum disk space needed as determined by running 'du -sk' on
# a fully built workspace.
REQUIRED_FREE_SPACE=1500000
# How much RAM does this machine have:
ifeq ($(OS_VENDOR), OpenBSD)
MB_OF_MEMORY=$(shell sysctl -n hw.physmem | awk '{print int($$NF / 1048576); }' )
else
MB_OF_MEMORY=$(shell (sysctl -n hw.physmem64 2> /dev/null || sysctl -n hw.physmem) | awk '{print int($$NF / 1048576); }' )
endif
endif
# Windows with and without CYGWIN will be slightly different
ifeq ($(SYSTEM_UNAME), Windows_NT)
PLATFORM = windows
@@ -327,7 +419,7 @@ ifeq ($(PLATFORM), windows)
endif
# Suffix for file bundles used in previous release
BUNDLE_FILE_SUFFIX=.tar
# Minimum disk space needed as determined by running 'du -sk' on
# Minimum disk space needed as determined by running 'du -sk' on
# a fully built workspace.
REQUIRED_FREE_SPACE=500000
# How much RAM does this machine have:
@@ -335,8 +427,8 @@ ifeq ($(PLATFORM), windows)
MB_OF_MEMORY := $(shell \
if [ -f "C:/cygwin/bin/free.exe" ] ; then \
( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \
grep Mem: | \
sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \
grep Mem: | \
sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \
else \
echo "512"; \
fi)
@@ -392,7 +484,7 @@ ifneq ($(PLATFORM), windows)
# Where is unwanted output to be delivered?
DEV_NULL = /dev/null
export DEV_NULL
# Character used between entries in classpath
# Character used between entries in classpath
CLASSPATH_SEPARATOR = :
# User name determination (set _USER)
ifndef USER

View File

@@ -25,21 +25,21 @@
# Properties for jprt
# The release to build
# Locked down to jdk8
jprt.tools.default.release=jdk8
# The different build flavors we want, we override here so we just get these 2
jprt.build.flavors=product,fastdebug
# Standard list of jprt build targets for this source tree
jprt.build.targets= \
solaris_sparc_5.10-{product|fastdebug}, \
solaris_sparcv9_5.10-{product|fastdebug}, \
solaris_i586_5.10-{product|fastdebug}, \
solaris_x64_5.10-{product|fastdebug}, \
linux_i586_2.6-{product|fastdebug}, \
linux_x64_2.6-{product|fastdebug}, \
windows_i586_5.1-{product|fastdebug}, \
jprt.build.targets= \
solaris_sparc_5.10-{product|fastdebug}, \
solaris_sparcv9_5.10-{product|fastdebug}, \
solaris_i586_5.10-{product|fastdebug}, \
solaris_x64_5.10-{product|fastdebug}, \
linux_i586_2.6-{product|fastdebug}, \
linux_x64_2.6-{product|fastdebug}, \
windows_i586_5.1-{product|fastdebug}, \
windows_x64_5.2-{product|fastdebug}
# Directories to be excluded from the source bundles

View File

@@ -1,280 +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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package build.tools.stripproperties;
import java.io.BufferedInputStream;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.Properties;
/**
* Reads a properties file from standard input and writes an equivalent
* properties file without comments to standard output.
*/
public class StripProperties {
private static void error(String msg, Exception e) {
System.err.println("ERROR: stripproperties: " + msg);
if ( e != null ) {
System.err.println("EXCEPTION: " + e.toString());
e.printStackTrace();
}
}
private static List<String> parseOptions(String args[]) {
List<String> files = new ArrayList<String>();
for ( int i = 0; i < args.length ; i++ ) {
if ( "-optionsfile".equals(args[i]) && i+1 < args.length ) {
String filename = args[++i];
FileInputStream finput = null;
byte contents[] = null;
try {
finput = new FileInputStream(filename);
int byteCount = finput.available();
if ( byteCount <= 0 ) {
error("The -optionsfile file is empty", null);
files = null;
} else {
contents = new byte[byteCount];
int bytesRead = finput.read(contents);
if ( byteCount != bytesRead ) {
error("Cannot read all of -optionsfile file", null);
files = null;
}
}
} catch ( IOException e ) {
error("cannot open " + filename, e);
files = null;
}
if ( finput != null ) {
try {
finput.close();
} catch ( IOException e ) {
files = null;
error("cannot close " + filename, e);
}
}
if ( files != null && contents != null ) {
String tokens[] = (new String(contents)).split("\\s+");
if ( tokens.length > 0 ) {
List<String> ofiles = parseOptions(tokens);
if ( ofiles != null ) {
files.addAll(ofiles);
} else {
error("No files found in file", null);
files = null;
}
}
}
if ( files == null ) {
break;
}
} else {
files.add(args[i]);
}
}
return files;
}
private static boolean stripFiles(List<String> files) {
boolean ok = true;
for ( String file : files ) {
Properties prop = new Properties();
InputStream in = null;
try {
in = new BufferedInputStream(new FileInputStream(file));
prop.load(in);
} catch ( FileNotFoundException e ) {
error("Cannot access file " + file, e);
ok = false;
} catch ( IOException e ) {
error("IO exception processing file " + file, e);
ok = false;
}
if ( in != null ) {
try {
in.close();
} catch ( IOException e ) {
error("IO exception closing file " + file, e);
ok = false;
}
}
if ( !ok ) {
break;
}
OutputStream out = null;
try {
out = new FileOutputStream(file);
storeProperties(prop, out);
out.flush();
} catch ( IOException e ) {
error("IO exception processing file " + file, e);
ok = false;
}
if ( out != null ) {
try {
out.close();
} catch ( IOException e ) {
error("IO exception closing file " + file, e);
ok = false;
}
}
if ( !ok ) {
break;
}
}
return ok;
}
/**
* Strip the properties filenames supplied, replacing their contents.
* @param args Names of properties files to process and replace contents
*/
public static void main(String args[]) {
List<String> files = parseOptions(args);
if ( files == null || !stripFiles(files) ) {
System.exit(1);
}
}
// --- code below here is adapted from java.util.Properties ---
private static final String specialSaveChars = "=: \t\r\n\f#!";
/*
* Converts unicodes to encoded &#92;uxxxx
* and writes out any of the characters in specialSaveChars
* with a preceding slash
*/
private static String saveConvert(String theString, boolean escapeSpace) {
int len = theString.length();
StringBuffer outBuffer = new StringBuffer(len*2);
for(int x=0; x<len; x++) {
char aChar = theString.charAt(x);
switch(aChar) {
case ' ':
if (x == 0 || escapeSpace) {
outBuffer.append('\\');
}
outBuffer.append(' ');
break;
case '\\':
outBuffer.append('\\');
outBuffer.append('\\');
break;
case '\t':
outBuffer.append('\\');
outBuffer.append('t');
break;
case '\n':
outBuffer.append('\\');
outBuffer.append('n');
break;
case '\r':
outBuffer.append('\\');
outBuffer.append('r');
break;
case '\f':
outBuffer.append('\\');
outBuffer.append('f');
break;
default:
if ((aChar < 0x0020) || (aChar == 0x007e) || (aChar > 0x00ff)) {
outBuffer.append('\\');
outBuffer.append('u');
outBuffer.append(toHex((aChar >> 12) & 0xF));
outBuffer.append(toHex((aChar >> 8) & 0xF));
outBuffer.append(toHex((aChar >> 4) & 0xF));
outBuffer.append(toHex( aChar & 0xF));
} else {
if (specialSaveChars.indexOf(aChar) != -1) {
outBuffer.append('\\');
}
outBuffer.append(aChar);
}
}
}
return outBuffer.toString();
}
/**
* Writes the content of <code>properties</code> to <code>out</code>.
* The format is that of Properties.store with the following modifications:
* <ul>
* <li>No header or date is written
* <li>Latin-1 characters are written as single bytes, not escape sequences
* <li>Line breaks are indicated by a single \n independent of platform
* <ul>
*/
private static void storeProperties(Properties properties, OutputStream out)
throws IOException {
BufferedWriter awriter;
awriter = new BufferedWriter(new OutputStreamWriter(out, "8859_1"));
for (Enumeration e = properties.keys(); e.hasMoreElements();) {
String key = (String)e.nextElement();
String val = (String)properties.get(key);
key = saveConvert(key, true);
/* No need to escape embedded and trailing spaces for value, hence
* pass false to flag.
*/
val = saveConvert(val, false);
writeln(awriter, key + "=" + val);
}
awriter.flush();
}
private static void writeln(BufferedWriter bw, String s) throws IOException {
bw.write(s);
bw.write("\n");
}
/**
* Convert a nibble to a hex character
* @param nibble the nibble to convert.
*/
private static char toHex(int nibble) {
return hexDigit[(nibble & 0xF)];
}
/** A table of hex digits */
private static final char[] hexDigit = {
'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
};
}

View File

@@ -0,0 +1,288 @@
/*
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package build.tools.stripproperties;
import java.io.BufferedInputStream;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
/**
* Reads a properties file from standard input and writes an equivalent
* properties file without comments to standard output.
*/
public class StripPropertiesCorba {
private static void error(String msg, Exception e) {
System.err.println("ERROR: stripproperties: " + msg);
if ( e != null ) {
System.err.println("EXCEPTION: " + e.toString());
e.printStackTrace();
}
}
private static List<String> infiles = new ArrayList<String>();
private static List<String> outfiles = new ArrayList<String>();
private static boolean parseOptions(String args[]) {
boolean ok = true;
for ( int i = 0; i < args.length ; i++ ) {
if ( "-clean".equals(args[i]) && i+2 < args.length ) {
infiles.add(args[++i]);
outfiles.add(args[++i]);
} else if ( args[i].charAt(0)=='@') {
String filename = args[i].substring(1);
FileInputStream finput = null;
byte contents[] = null;
try {
finput = new FileInputStream(filename);
int byteCount = finput.available();
if ( byteCount <= 0 ) {
error("The @file is empty", null);
ok = false;
} else {
contents = new byte[byteCount];
int bytesRead = finput.read(contents);
if ( byteCount != bytesRead ) {
error("Cannot read all of @file", null);
ok = false;
}
}
} catch ( IOException e ) {
error("cannot open " + filename, e);
ok = false;
}
if ( finput != null ) {
try {
finput.close();
} catch ( IOException e ) {
ok = false;
error("cannot close " + filename, e);
}
}
if ( ok && contents != null ) {
String tokens[] = (new String(contents)).split("\\s+");
if ( tokens.length > 0 ) {
ok = parseOptions(tokens);
}
}
if ( !ok ) {
break;
}
} else {
infiles.add(args[i]);
outfiles.add(args[i]);
}
}
return ok;
}
private static boolean stripFiles(List<String> infiles, List<String> outfiles) {
boolean ok = true;
Iterator<String> inIter = infiles.iterator();
Iterator<String> outIter = outfiles.iterator();
for (; inIter.hasNext(); ) {
String infile = inIter.next();
String outfile = outIter.next();
Properties prop = new Properties();
InputStream in = null;
try {
in = new BufferedInputStream(new FileInputStream(infile));
prop.load(in);
} catch ( FileNotFoundException e ) {
error("Cannot access file " + infile, e);
ok = false;
} catch ( IOException e ) {
error("IO exception processing file " + infile, e);
ok = false;
}
if ( in != null ) {
try {
in.close();
} catch ( IOException e ) {
error("IO exception closing file " + infile, e);
ok = false;
}
}
if ( !ok ) {
break;
}
OutputStream out = null;
try {
out = new FileOutputStream(outfile);
storeProperties(prop, out);
out.flush();
} catch ( IOException e ) {
error("IO exception processing file " + outfile, e);
ok = false;
}
if ( out != null ) {
try {
out.close();
} catch ( IOException e ) {
error("IO exception closing file " + outfile, e);
ok = false;
}
}
if ( !ok ) {
break;
}
}
return ok;
}
/**
* Strip the properties filenames supplied, replacing their contents.
* @param args Names of properties files to process and replace contents
*/
public static void main(String args[]) {
boolean ok = parseOptions(args);
if ( !ok || !stripFiles(infiles, outfiles) ) {
System.exit(1);
}
}
// --- code below here is adapted from java.util.Properties ---
private static final String specialSaveChars = "=: \t\r\n\f#!";
/*
* Converts unicodes to encoded &#92;uxxxx
* and writes out any of the characters in specialSaveChars
* with a preceding slash
*/
private static String saveConvert(String theString, boolean escapeSpace) {
int len = theString.length();
StringBuffer outBuffer = new StringBuffer(len*2);
for(int x=0; x<len; x++) {
char aChar = theString.charAt(x);
switch(aChar) {
case ' ':
if (x == 0 || escapeSpace) {
outBuffer.append('\\');
}
outBuffer.append(' ');
break;
case '\\':
outBuffer.append('\\');
outBuffer.append('\\');
break;
case '\t':
outBuffer.append('\\');
outBuffer.append('t');
break;
case '\n':
outBuffer.append('\\');
outBuffer.append('n');
break;
case '\r':
outBuffer.append('\\');
outBuffer.append('r');
break;
case '\f':
outBuffer.append('\\');
outBuffer.append('f');
break;
default:
if ((aChar < 0x0020) || (aChar == 0x007e) || (aChar > 0x00ff)) {
outBuffer.append('\\');
outBuffer.append('u');
outBuffer.append(toHex((aChar >> 12) & 0xF));
outBuffer.append(toHex((aChar >> 8) & 0xF));
outBuffer.append(toHex((aChar >> 4) & 0xF));
outBuffer.append(toHex( aChar & 0xF));
} else {
if (specialSaveChars.indexOf(aChar) != -1) {
outBuffer.append('\\');
}
outBuffer.append(aChar);
}
}
}
return outBuffer.toString();
}
/**
* Writes the content of <code>properties</code> to <code>out</code>.
* The format is that of Properties.store with the following modifications:
* <ul>
* <li>No header or date is written
* <li>Latin-1 characters are written as single bytes, not escape sequences
* <li>Line breaks are indicated by a single \n independent of platform
* <ul>
*/
private static void storeProperties(Properties properties, OutputStream out)
throws IOException {
BufferedWriter awriter;
awriter = new BufferedWriter(new OutputStreamWriter(out, "8859_1"));
for (Enumeration<Object> e = properties.keys(); e.hasMoreElements();) {
String key = (String)e.nextElement();
String val = (String)properties.get(key);
key = saveConvert(key, true);
/* No need to escape embedded and trailing spaces for value, hence
* pass false to flag.
*/
val = saveConvert(val, false);
writeln(awriter, key + "=" + val);
}
awriter.flush();
}
private static void writeln(BufferedWriter bw, String s) throws IOException {
bw.write(s);
bw.write("\n");
}
/**
* Convert a nibble to a hex character
* @param nibble the nibble to convert.
*/
private static char toHex(int nibble) {
return hexDigit[(nibble & 0xF)];
}
/** A table of hex digits */
private static final char[] hexDigit = {
'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
};
}

View File

@@ -34,7 +34,7 @@ PROGRAM = stripproperties
include $(BUILDDIR)/common/Defs.gmk
BUILDTOOL_SOURCE_ROOT = $(BUILDDIR)/tools/src
BUILDTOOL_MAIN = $(PKGDIR)/StripProperties.java
BUILDTOOL_MAIN = $(PKGDIR)/StripPropertiesCorba.java
#
# Build tool jar rules.

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2011, 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
@@ -82,6 +82,6 @@ public class DynAnyFactoryImpl
private String[] __ids = { "IDL:omg.org/DynamicAny/DynAnyFactory:1.0" };
public String[] _ids() {
return __ids;
return (String[]) __ids.clone();
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2011, 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
@@ -195,6 +195,6 @@ abstract class DynAnyImpl extends org.omg.CORBA.LocalObject implements DynAny
private String[] __ids = { "IDL:omg.org/DynamicAny/DynAny:1.0" };
public String[] _ids() {
return __ids;
return (String[]) __ids.clone();
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2011, 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
@@ -423,6 +423,13 @@ public abstract class CDRInputStream
impl.setByteBufferWithInfo(bbwi);
}
/**
* return true if our ByteBuffer is sharing/equal to bb
*/
protected final boolean isSharing(ByteBuffer bb) {
return (getByteBuffer() == bb);
}
public final int getBufferLength() {
return impl.getBufferLength();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2011, 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
@@ -2412,7 +2412,6 @@ public class CDRInputStream_1_0 extends CDRInputStreamBase
if (bbwi != null && getByteBuffer() != null)
{
int bbHash = System.identityHashCode(bbwi.byteBuffer);
MessageMediator messageMediator = parent.getMessageMediator();
if (messageMediator != null)
{
@@ -2420,19 +2419,12 @@ public class CDRInputStream_1_0 extends CDRInputStreamBase
(CDROutputObject)messageMediator.getOutputObject();
if (outputObj != null)
{
ByteBuffer outputBb = outputObj.getByteBuffer();
int oBbHash = 0;
if (outputBb != null)
if (outputObj.isSharing(getByteBuffer()))
{
oBbHash = System.identityHashCode(outputBb);
if (bbHash == oBbHash) // shared?
{
// Set OutputStream's ByteBuffer and bbwi to null
// so its ByteBuffer cannot be released to the pool
outputObj.setByteBuffer(null);
outputObj.setByteBufferWithInfo(null);
}
// Set OutputStream's ByteBuffer and bbwi to null
// so its ByteBuffer cannot be released to the pool
outputObj.setByteBuffer(null);
outputObj.setByteBufferWithInfo(null);
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2011, 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
@@ -357,6 +357,13 @@ public abstract class CDROutputStream
impl.setByteBuffer(byteBuffer);
}
/**
* return true if our ByteBuffer is sharing/equal to bb
*/
protected final boolean isSharing(ByteBuffer bb) {
return (getByteBuffer() == bb);
}
public final boolean isLittleEndian() {
return impl.isLittleEndian();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2011, 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
@@ -1902,7 +1902,6 @@ public class CDROutputStream_1_0 extends CDROutputStreamBase
if (getByteBufferWithInfo() != null && getByteBuffer() != null)
{
int bbHash = System.identityHashCode(bbwi.byteBuffer);
MessageMediator messageMediator = parent.getMessageMediator();
if (messageMediator != null)
{
@@ -1910,19 +1909,12 @@ public class CDROutputStream_1_0 extends CDROutputStreamBase
(CDRInputObject)messageMediator.getInputObject();
if (inputObj != null)
{
ByteBuffer inputBb = inputObj.getByteBuffer();
int iBbHash = 0;
if (inputBb != null)
if (inputObj.isSharing(getByteBuffer()))
{
iBbHash = System.identityHashCode(inputBb);
if (bbHash == iBbHash) // shared?
{
// Set InputStream's ByteBuffer and bbwi to null
// so its ByteBuffer cannot be released to the pool
inputObj.setByteBuffer(null);
inputObj.setByteBufferWithInfo(null);
}
// Set InputStream's ByteBuffer and bbwi to null
// so its ByteBuffer cannot be released to the pool
inputObj.setByteBuffer(null);
inputObj.setByteBufferWithInfo(null);
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2011, 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
@@ -2243,6 +2243,10 @@ public class IIOPInputStream
}
try {
Class fieldCl = fields[i].getClazz();
if (objectValue != null && !fieldCl.isInstance(objectValue)) {
throw new IllegalArgumentException();
}
bridge.putObject( o, fields[i].getFieldID(), objectValue ) ;
// reflective code: fields[i].getField().set( o, objectValue ) ;
} catch (IllegalArgumentException e) {
@@ -2553,6 +2557,10 @@ public class IIOPInputStream
{
try {
Field fld = c.getDeclaredField( fieldName ) ;
Class fieldCl = fld.getType();
if(v != null && !fieldCl.isInstance(v)) {
throw new Exception();
}
long key = bridge.objectFieldOffset( fld ) ;
bridge.putObject( o, key, v ) ;
} catch (Exception e) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -113,6 +113,9 @@ import com.sun.corba.se.impl.protocol.giopmsgheaders.ReferenceAddr;
import com.sun.corba.se.impl.transport.CorbaContactInfoListIteratorImpl;
import com.sun.corba.se.impl.util.JDKBridge;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentHashMap;
/**
* ClientDelegate is the RMI client-side subcontract or representation
* It implements RMI delegate as well as our internal ClientRequestDispatcher
@@ -122,6 +125,9 @@ public class CorbaClientRequestDispatcherImpl
implements
ClientRequestDispatcher
{
private ConcurrentMap<ContactInfo, Object> locks =
new ConcurrentHashMap<ContactInfo, Object>();
public OutputObject beginRequest(Object self, String opName,
boolean isOneWay, ContactInfo contactInfo)
{
@@ -148,8 +154,21 @@ public class CorbaClientRequestDispatcherImpl
// This locking is done so that multiple connections are not created
// for the same endpoint
//6929137 - Synchronized on contactInfo to avoid blocking across multiple endpoints
synchronized (contactInfo) {
// 7046238 - Synchronization on a single monitor for contactInfo parameters
// with identical hashCode(), so we lock on same monitor for equal parameters
// (which can refer to equal (in terms of equals()) but not the same objects)
Object lock = locks.get(contactInfo);
if (lock == null) {
Object newLock = new Object();
lock = locks.putIfAbsent(contactInfo, newLock);
if (lock == null) {
lock = newLock;
}
}
synchronized (lock) {
if (contactInfo.isConnectionBased()) {
if (contactInfo.shouldCacheConnection()) {
connection = (CorbaConnection)
@@ -254,7 +273,7 @@ public class CorbaClientRequestDispatcherImpl
registerWaiter(messageMediator);
// Do connection reclaim now
synchronized (contactInfo) {
synchronized (lock) {
if (contactInfo.isConnectionBased()) {
if (contactInfo.shouldCacheConnection()) {
OutboundConnectionCache connectionCache =

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2011, 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
@@ -138,7 +138,7 @@ public abstract class _CodeBaseImplBase extends org.omg.CORBA.portable.ObjectImp
public String[] _ids ()
{
return __ids;
return (String[]) __ids.clone();
}

View File

@@ -6,3 +6,4 @@
^src/share/tools/IdealGraphVisualizer/build/
^src/share/tools/IdealGraphVisualizer/dist/
^.hgtip
.DS_Store

View File

@@ -180,3 +180,55 @@ c149193c768b8b7233da4c3a3fdc0756b975848e jdk7-b143
0fa3ace511fe98fe948e751531f3e2b7c60c8376 jdk8-b04
dce7d24674f4d0bed00de24f00119057fdce7cfb jdk8-b05
0db80d8e77fccddf5e6fa49963226b54ac7d0f62 jdk8-b06
3f0cf875af83f55ec5e1a5cea80455315f9322a2 jdk8-b07
0cc8a70952c368e06de2adab1f2649a408f5e577 hs22-b01
7c29742c41b44fb0cd5a13c7ac8834f3f2ca649e hs22-b02
3a2fb61165dfc72e398179a2796d740c8da5b8c0 hs22-b03
ce9bde819dcba4a5d2822229d9183e69c74326ca hs22-b04
513a84dd0f8b56dc0836b4e0bdd5dd0a778fc634 hs22-b05
650d15d8f37255d3b805aa00c5bd1c30984b203d hs22-b06
da883b9e6d3788057f9577e72712998ed82c9b7e hs23-b01
49ed7eacfd16616166ff066493143889741097af jdk8-b08
7c20d272643f47195478708eff593a9cce40fec4 jdk8-b09
e4f412d2b75d2c797acff965aa2c420e3d358f09 hs23-b02
d815de2e85e511b7deab2a83cf80c0224d011da9 jdk8-b10
4d3850d9d326ac3a9bee2d867727e954322d014e hs23-b03
4538caeef7b6cbd4302bebced805d65e68ccf301 jdk8-b11
6534482ff68ad79066dfe15dfb6d8905f09681bd hs23-b04
1d3900713a67a0a39faf4e12c9c158d55aebef87 jdk8-b12
3e609627e780736f372eb14d29bb9b5e53b21fbf hs23-b05
b92ca8e229d29004f840c67e620833d23a346761 jdk8-b13
088d09a130ff02d8f5f05e92256baabe412f0439 jdk8-b14
6c2a55d4902f202e1c2de1df17b7da083a2c31e8 hs23-b06
fde2a39ed7f39233b287fbc278f437aac06c275b jdk8-b15
d1f29d4e0bc60e8bd7ae961f1306d8ab33290212 jdk8-b17
d1f29d4e0bc60e8bd7ae961f1306d8ab33290212 jdk8-b16
6de8c9ba5907e4c5ca05ac4b8d84a8e2cbd92399 hs23-b07
a2fef924d8e6f37dac2a887315e3502876cc8e24 hs23-b08
61165f53f1656b9f99e4fb806429bf98b99d59c3 jdk8-b18
4bcf61041217f8677dcec18e90e9196acc945bba hs23-b09
9232e0ecbc2cec54dcc8f93004fb00c214446460 jdk8-b19
fe2c8764998112b7fefcd7d41599714813ae4327 jdk8-b20
9952d1c439d64c5fd4ad1236a63a62bd5a49d4c3 jdk8-b21
513351373923f74a7c91755748b95c9771e59f96 hs23-b10
24727fb37561779077fdfa5a33342246f20e5c0f jdk8-b22
dcc292399a39113957eebbd3e487b7e05e2c79fc hs23-b11
e850d8e7ea54b91c7aa656e297f0f9f38dd4c296 jdk8-b23
9e177d44b10fe92ecffa965fef9c5ac5433c1b46 hs23-b12
a80fd4f45d7aaa154ed2f86a129f3c9c4035ec7a jdk8-b24
b22de824749922986ce4d442bed029916b832807 hs23-b13
64b46f975ab82948c1e021e17775ff4fab8bc40e hs23-b14
9ad8feb5afbddec46d3cfe29fb5f73c2e99d5a43 jdk8-b25
d71e662fe03741b6de498ca2077220148405a978 hs23-b15
fd3060701216a11c0df6dcd053c6fd7c2b17a42c jdk8-b26
f92a171cf0071ca6c3fa8231d7d570377f8b2f4d hs23-b16
f92a171cf0071ca6c3fa8231d7d570377f8b2f4d hs23-b16
931e5f39e365a0d550d79148ff87a7f9e864d2e1 hs23-b16
3b24e7e01d20ca590d0f86b1222bb7c3f1a2aa2d jdk8-b27
975c4105f1e2ef1190a75b77124033f1fd4290b5 hs24-b01
b183b0863611b85dbac16f3b08b40ba978756d19 jdk8-b28
030b5306d60f140e822e4a6d301744cb110ff0c8 hs24-b02
b45b5c564098c58ea69e7cff3f7d341f0254dd1d jdk8-b29
d61761bf305031c94f7f8eca49abd978b7d3c5da jdk8-b30
dfae0140457cfb2c381d7679735fbedbae862c62 hs24-b03
f4767e53d6e0d5da7e3f1775904076cce54247c1 hs24-b04

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2000, 2011, 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,17 +48,18 @@ sun.jvm.hotspot.asm.x86 \
sun.jvm.hotspot.bugspot \
sun.jvm.hotspot.bugspot.tree \
sun.jvm.hotspot.c1 \
sun.jvm.hotspot.ci \
sun.jvm.hotspot.code \
sun.jvm.hotspot.compiler \
sun.jvm.hotspot.debugger \
sun.jvm.hotspot.debugger.amd64 \
sun.jvm.hotspot.debugger.bsd \
sun.jvm.hotspot.debugger.bsd.amd64 \
sun.jvm.hotspot.debugger.bsd.x86 \
sun.jvm.hotspot.debugger.cdbg \
sun.jvm.hotspot.debugger.cdbg.basic \
sun.jvm.hotspot.debugger.cdbg.basic.amd64 \
sun.jvm.hotspot.debugger.cdbg.basic.x86 \
sun.jvm.hotspot.debugger.dbx \
sun.jvm.hotspot.debugger.dbx.sparc \
sun.jvm.hotspot.debugger.dbx.x86 \
sun.jvm.hotspot.debugger.dummy \
sun.jvm.hotspot.debugger.ia64 \
sun.jvm.hotspot.debugger.linux \
@@ -76,7 +77,6 @@ sun.jvm.hotspot.debugger.remote.amd64 \
sun.jvm.hotspot.debugger.remote.sparc \
sun.jvm.hotspot.debugger.remote.x86 \
sun.jvm.hotspot.debugger.sparc \
sun.jvm.hotspot.debugger.win32 \
sun.jvm.hotspot.debugger.win32.coff \
sun.jvm.hotspot.debugger.windbg \
sun.jvm.hotspot.debugger.windbg.amd64 \
@@ -84,6 +84,7 @@ sun.jvm.hotspot.debugger.windbg.ia64 \
sun.jvm.hotspot.debugger.windbg.x86 \
sun.jvm.hotspot.debugger.x86 \
sun.jvm.hotspot.gc_implementation \
sun.jvm.hotspot.gc_implementation.g1 \
sun.jvm.hotspot.gc_implementation.parallelScavenge \
sun.jvm.hotspot.gc_implementation.shared \
sun.jvm.hotspot.gc_interface \
@@ -91,9 +92,14 @@ sun.jvm.hotspot.interpreter \
sun.jvm.hotspot.jdi \
sun.jvm.hotspot.livejvm \
sun.jvm.hotspot.memory \
sun.jvm.hotspot.opto \
sun.jvm.hotspot.oops \
sun.jvm.hotspot.prims \
sun.jvm.hotspot.runtime \
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 \
@@ -139,17 +145,18 @@ sun/jvm/hotspot/asm/x86/*.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 \
sun/jvm/hotspot/compiler/*.java \
sun/jvm/hotspot/debugger/*.java \
sun/jvm/hotspot/debugger/amd64/*.java \
sun/jvm/hotspot/debugger/bsd/*.java \
sun/jvm/hotspot/debugger/bsd/amd64/*.java \
sun/jvm/hotspot/debugger/bsd/x86/*.java \
sun/jvm/hotspot/debugger/cdbg/*.java \
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/dbx/*.java \
sun/jvm/hotspot/debugger/dbx/sparc/*.java \
sun/jvm/hotspot/debugger/dbx/x86/*.java \
sun/jvm/hotspot/debugger/dummy/*.java \
sun/jvm/hotspot/debugger/ia64/*.java \
sun/jvm/hotspot/debugger/linux/*.java \
@@ -165,19 +172,26 @@ sun/jvm/hotspot/debugger/remote/amd64/*.java \
sun/jvm/hotspot/debugger/remote/sparc/*.java \
sun/jvm/hotspot/debugger/remote/x86/*.java \
sun/jvm/hotspot/debugger/sparc/*.java \
sun/jvm/hotspot/debugger/win32/*.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 \
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 \
sun/jvm/hotspot/prims/*.java \
sun/jvm/hotspot/runtime/*.java \
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 \

View File

@@ -70,6 +70,14 @@ fi
SA_CLASSPATH=$STARTDIR/../build/classes:$STARTDIR/../src/share/lib/js.jar:$STARTDIR/sa.jar:$STARTDIR/lib/js.jar
if [ ! -z "$SA_TYPEDB" ]; then
if [ ! -f $SA_TYPEDB ]; then
echo "$SA_TYPEDB is unreadable"
exit 1
fi
OPTIONS="-Dsun.jvm.hotspot.typedb=$SA_TYPEDB ${OPTIONS}"
fi
OPTIONS="-Djava.system.class.loader=sun.jvm.hotspot.SALauncherLoader ${OPTIONS}"
SA_JAVA_CMD="$SA_PREFIX_CMD $SA_JAVA -showversion ${OPTIONS} -cp $SA_CLASSPATH $SA_OPTIONS"

View File

@@ -67,6 +67,14 @@ fi
SA_CLASSPATH=$STARTDIR/../build/classes:$STARTDIR/../src/share/lib/js.jar:$STARTDIR/sa.jar::$STARTDIR/lib/js.jar
if [ ! -z "$SA_TYPEDB" ]; then
if [ ! -f $SA_TYPEDB ]; then
echo "$SA_TYPEDB is unreadable"
exit 1
fi
OPTIONS="-Dsun.jvm.hotspot.typedb=$SA_TYPEDB ${OPTIONS}"
fi
OPTIONS="-Djava.system.class.loader=sun.jvm.hotspot.SALauncherLoader ${OPTIONS}"
SA_JAVA_CMD="$SA_PREFIX_CMD $SA_JAVA -d64 -showversion ${OPTIONS} -cp $SA_CLASSPATH $SA_OPTIONS"

View File

@@ -0,0 +1,413 @@
/*
* Copyright (c) 2002, 2007, 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.
*
*/
#include <stdlib.h>
#include <jni.h>
#include "libproc.h"
#if defined(x86_64) && !defined(amd64)
#define amd64 1
#endif
#ifdef i386
#include "sun_jvm_hotspot_debugger_x86_X86ThreadContext.h"
#endif
#ifdef amd64
#include "sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext.h"
#endif
#if defined(sparc) || defined(sparcv9)
#include "sun_jvm_hotspot_debugger_sparc_SPARCThreadContext.h"
#endif
static jfieldID p_ps_prochandle_ID = 0;
static jfieldID threadList_ID = 0;
static jfieldID loadObjectList_ID = 0;
static jmethodID createClosestSymbol_ID = 0;
static jmethodID createLoadObject_ID = 0;
static jmethodID getThreadForThreadId_ID = 0;
static jmethodID listAdd_ID = 0;
#define CHECK_EXCEPTION_(value) if ((*env)->ExceptionOccurred(env)) { return value; }
#define CHECK_EXCEPTION if ((*env)->ExceptionOccurred(env)) { return;}
#define THROW_NEW_DEBUGGER_EXCEPTION_(str, value) { throw_new_debugger_exception(env, str); return value; }
#define THROW_NEW_DEBUGGER_EXCEPTION(str) { throw_new_debugger_exception(env, str); return;}
static void throw_new_debugger_exception(JNIEnv* env, const char* errMsg) {
(*env)->ThrowNew(env, (*env)->FindClass(env, "sun/jvm/hotspot/debugger/DebuggerException"), errMsg);
}
static struct ps_prochandle* get_proc_handle(JNIEnv* env, jobject this_obj) {
jlong ptr = (*env)->GetLongField(env, this_obj, p_ps_prochandle_ID);
return (struct ps_prochandle*)(intptr_t)ptr;
}
/*
* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal
* Method: init0
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_init0
(JNIEnv *env, jclass cls) {
jclass listClass;
if (init_libproc(getenv("LIBSAPROC_DEBUG") != NULL) != true) {
THROW_NEW_DEBUGGER_EXCEPTION("can't initialize libproc");
}
// fields we use
p_ps_prochandle_ID = (*env)->GetFieldID(env, cls, "p_ps_prochandle", "J");
CHECK_EXCEPTION;
threadList_ID = (*env)->GetFieldID(env, cls, "threadList", "Ljava/util/List;");
CHECK_EXCEPTION;
loadObjectList_ID = (*env)->GetFieldID(env, cls, "loadObjectList", "Ljava/util/List;");
CHECK_EXCEPTION;
// methods we use
createClosestSymbol_ID = (*env)->GetMethodID(env, cls, "createClosestSymbol",
"(Ljava/lang/String;J)Lsun/jvm/hotspot/debugger/cdbg/ClosestSymbol;");
CHECK_EXCEPTION;
createLoadObject_ID = (*env)->GetMethodID(env, cls, "createLoadObject",
"(Ljava/lang/String;JJ)Lsun/jvm/hotspot/debugger/cdbg/LoadObject;");
CHECK_EXCEPTION;
getThreadForThreadId_ID = (*env)->GetMethodID(env, cls, "getThreadForThreadId",
"(J)Lsun/jvm/hotspot/debugger/ThreadProxy;");
CHECK_EXCEPTION;
// java.util.List method we call
listClass = (*env)->FindClass(env, "java/util/List");
CHECK_EXCEPTION;
listAdd_ID = (*env)->GetMethodID(env, listClass, "add", "(Ljava/lang/Object;)Z");
CHECK_EXCEPTION;
}
JNIEXPORT jint JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getAddressSize
(JNIEnv *env, jclass cls)
{
#ifdef _LP64
return 8;
#else
return 4;
#endif
}
static void fillThreadsAndLoadObjects(JNIEnv* env, jobject this_obj, struct ps_prochandle* ph) {
int n = 0, i = 0;
// add threads
n = get_num_threads(ph);
for (i = 0; i < n; i++) {
jobject thread;
jobject threadList;
lwpid_t lwpid;
lwpid = get_lwp_id(ph, i);
thread = (*env)->CallObjectMethod(env, this_obj, getThreadForThreadId_ID,
(jlong)lwpid);
CHECK_EXCEPTION;
threadList = (*env)->GetObjectField(env, this_obj, threadList_ID);
CHECK_EXCEPTION;
(*env)->CallBooleanMethod(env, threadList, listAdd_ID, thread);
CHECK_EXCEPTION;
}
// add load objects
n = get_num_libs(ph);
for (i = 0; i < n; i++) {
uintptr_t base;
const char* name;
jobject loadObject;
jobject loadObjectList;
base = get_lib_base(ph, i);
name = get_lib_name(ph, i);
loadObject = (*env)->CallObjectMethod(env, this_obj, createLoadObject_ID,
(*env)->NewStringUTF(env, name), (jlong)0, (jlong)base);
CHECK_EXCEPTION;
loadObjectList = (*env)->GetObjectField(env, this_obj, loadObjectList_ID);
CHECK_EXCEPTION;
(*env)->CallBooleanMethod(env, loadObjectList, listAdd_ID, loadObject);
CHECK_EXCEPTION;
}
}
/*
* 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) {
struct ps_prochandle* ph;
if ( (ph = Pgrab(jpid)) == NULL) {
THROW_NEW_DEBUGGER_EXCEPTION("Can't attach to the process");
}
(*env)->SetLongField(env, this_obj, p_ps_prochandle_ID, (jlong)(intptr_t)ph);
fillThreadsAndLoadObjects(env, this_obj, ph);
}
/*
* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal
* Method: attach0
* Signature: (Ljava/lang/String;Ljava/lang/String;)V
*/
JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_attach0__Ljava_lang_String_2Ljava_lang_String_2
(JNIEnv *env, jobject this_obj, jstring execName, jstring coreName) {
const char *execName_cstr;
const char *coreName_cstr;
jboolean isCopy;
struct ps_prochandle* ph;
execName_cstr = (*env)->GetStringUTFChars(env, execName, &isCopy);
CHECK_EXCEPTION;
coreName_cstr = (*env)->GetStringUTFChars(env, coreName, &isCopy);
CHECK_EXCEPTION;
if ( (ph = Pgrab_core(execName_cstr, coreName_cstr)) == NULL) {
(*env)->ReleaseStringUTFChars(env, execName, execName_cstr);
(*env)->ReleaseStringUTFChars(env, coreName, coreName_cstr);
THROW_NEW_DEBUGGER_EXCEPTION("Can't attach to the core file");
}
(*env)->SetLongField(env, this_obj, p_ps_prochandle_ID, (jlong)(intptr_t)ph);
(*env)->ReleaseStringUTFChars(env, execName, execName_cstr);
(*env)->ReleaseStringUTFChars(env, coreName, coreName_cstr);
fillThreadsAndLoadObjects(env, this_obj, ph);
}
/*
* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal
* Method: detach0
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_detach0
(JNIEnv *env, jobject this_obj) {
struct ps_prochandle* ph = get_proc_handle(env, this_obj);
if (ph != NULL) {
Prelease(ph);
}
}
/*
* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal
* 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) {
const char *objectName_cstr, *symbolName_cstr;
jlong addr;
jboolean isCopy;
struct ps_prochandle* ph = get_proc_handle(env, this_obj);
objectName_cstr = NULL;
if (objectName != NULL) {
objectName_cstr = (*env)->GetStringUTFChars(env, objectName, &isCopy);
CHECK_EXCEPTION_(0);
}
symbolName_cstr = (*env)->GetStringUTFChars(env, symbolName, &isCopy);
CHECK_EXCEPTION_(0);
addr = (jlong) lookup_symbol(ph, objectName_cstr, symbolName_cstr);
if (objectName_cstr != NULL) {
(*env)->ReleaseStringUTFChars(env, objectName, objectName_cstr);
}
(*env)->ReleaseStringUTFChars(env, symbolName, symbolName_cstr);
return addr;
}
/*
* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal
* Method: lookupByAddress0
* Signature: (J)Lsun/jvm/hotspot/debugger/cdbg/ClosestSymbol;
*/
JNIEXPORT jobject JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_lookupByAddress0
(JNIEnv *env, jobject this_obj, jlong addr) {
uintptr_t offset;
const char* sym = NULL;
struct ps_prochandle* ph = get_proc_handle(env, this_obj);
sym = symbol_for_pc(ph, (uintptr_t) addr, &offset);
if (sym == NULL) return 0;
return (*env)->CallObjectMethod(env, this_obj, createClosestSymbol_ID,
(*env)->NewStringUTF(env, sym), (jlong)offset);
}
/*
* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal
* 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) {
jboolean isCopy;
jbyteArray array;
jbyte *bufPtr;
ps_err_e err;
array = (*env)->NewByteArray(env, numBytes);
CHECK_EXCEPTION_(0);
bufPtr = (*env)->GetByteArrayElements(env, array, &isCopy);
CHECK_EXCEPTION_(0);
err = ps_pread(get_proc_handle(env, this_obj), (psaddr_t) (uintptr_t)addr, bufPtr, numBytes);
(*env)->ReleaseByteArrayElements(env, array, bufPtr, 0);
return (err == PS_OK)? array : 0;
}
JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getThreadIntegerRegisterSet0
(JNIEnv *env, jobject this_obj, jint lwp_id) {
struct reg gregs;
jboolean isCopy;
jlongArray array;
jlong *regs;
struct ps_prochandle* ph = get_proc_handle(env, this_obj);
if (get_lwp_regs(ph, lwp_id, &gregs) != true) {
THROW_NEW_DEBUGGER_EXCEPTION_("get_thread_regs failed for a lwp", 0);
}
#undef NPRGREG
#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
#if defined(sparc) || defined(sparcv9)
#define NPRGREG sun_jvm_hotspot_debugger_sparc_SPARCThreadContext_NPRGREG
#endif
array = (*env)->NewLongArray(env, NPRGREG);
CHECK_EXCEPTION_(0);
regs = (*env)->GetLongArrayElements(env, array, &isCopy);
#undef REG_INDEX
#ifdef i386
#define REG_INDEX(reg) sun_jvm_hotspot_debugger_x86_X86ThreadContext_##reg
regs[REG_INDEX(GS)] = (uintptr_t) gregs.r_gs;
regs[REG_INDEX(FS)] = (uintptr_t) gregs.r_fs;
regs[REG_INDEX(ES)] = (uintptr_t) gregs.r_es;
regs[REG_INDEX(DS)] = (uintptr_t) gregs.r_ds;
regs[REG_INDEX(EDI)] = (uintptr_t) gregs.r_edi;
regs[REG_INDEX(ESI)] = (uintptr_t) gregs.r_esi;
regs[REG_INDEX(FP)] = (uintptr_t) gregs.r_ebp;
regs[REG_INDEX(SP)] = (uintptr_t) gregs.r_isp;
regs[REG_INDEX(EBX)] = (uintptr_t) gregs.r_ebx;
regs[REG_INDEX(EDX)] = (uintptr_t) gregs.r_edx;
regs[REG_INDEX(ECX)] = (uintptr_t) gregs.r_ecx;
regs[REG_INDEX(EAX)] = (uintptr_t) gregs.r_eax;
regs[REG_INDEX(PC)] = (uintptr_t) gregs.r_eip;
regs[REG_INDEX(CS)] = (uintptr_t) gregs.r_cs;
regs[REG_INDEX(SS)] = (uintptr_t) gregs.r_ss;
#endif /* i386 */
#if ia64
regs = (*env)->GetLongArrayElements(env, array, &isCopy);
int i;
for (i = 0; i < NPRGREG; i++ ) {
regs[i] = 0xDEADDEAD;
}
#endif /* ia64 */
#ifdef amd64
#define REG_INDEX(reg) sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_##reg
regs[REG_INDEX(R15)] = gregs.r_r15;
regs[REG_INDEX(R14)] = gregs.r_r14;
regs[REG_INDEX(R13)] = gregs.r_r13;
regs[REG_INDEX(R12)] = gregs.r_r12;
regs[REG_INDEX(RBP)] = gregs.r_rbp;
regs[REG_INDEX(RBX)] = gregs.r_rbx;
regs[REG_INDEX(R11)] = gregs.r_r11;
regs[REG_INDEX(R10)] = gregs.r_r10;
regs[REG_INDEX(R9)] = gregs.r_r9;
regs[REG_INDEX(R8)] = gregs.r_r8;
regs[REG_INDEX(RAX)] = gregs.r_rax;
regs[REG_INDEX(RCX)] = gregs.r_rcx;
regs[REG_INDEX(RDX)] = gregs.r_rdx;
regs[REG_INDEX(RSI)] = gregs.r_rsi;
regs[REG_INDEX(RDI)] = gregs.r_rdi;
regs[REG_INDEX(RIP)] = gregs.r_rip;
regs[REG_INDEX(CS)] = gregs.r_cs;
regs[REG_INDEX(RSP)] = gregs.r_rsp;
regs[REG_INDEX(SS)] = gregs.r_ss;
// regs[REG_INDEX(FSBASE)] = gregs.fs_base;
// regs[REG_INDEX(GSBASE)] = gregs.gs_base;
// regs[REG_INDEX(DS)] = gregs.ds;
// regs[REG_INDEX(ES)] = gregs.es;
// regs[REG_INDEX(FS)] = gregs.fs;
// regs[REG_INDEX(GS)] = gregs.gs;
#endif /* amd64 */
#if defined(sparc) || defined(sparcv9)
#define REG_INDEX(reg) sun_jvm_hotspot_debugger_sparc_SPARCThreadContext_##reg
#ifdef _LP64
regs[REG_INDEX(R_PSR)] = gregs.tstate;
regs[REG_INDEX(R_PC)] = gregs.tpc;
regs[REG_INDEX(R_nPC)] = gregs.tnpc;
regs[REG_INDEX(R_Y)] = gregs.y;
#else
regs[REG_INDEX(R_PSR)] = gregs.psr;
regs[REG_INDEX(R_PC)] = gregs.pc;
regs[REG_INDEX(R_nPC)] = gregs.npc;
regs[REG_INDEX(R_Y)] = gregs.y;
#endif
regs[REG_INDEX(R_G0)] = 0 ;
regs[REG_INDEX(R_G1)] = gregs.u_regs[0];
regs[REG_INDEX(R_G2)] = gregs.u_regs[1];
regs[REG_INDEX(R_G3)] = gregs.u_regs[2];
regs[REG_INDEX(R_G4)] = gregs.u_regs[3];
regs[REG_INDEX(R_G5)] = gregs.u_regs[4];
regs[REG_INDEX(R_G6)] = gregs.u_regs[5];
regs[REG_INDEX(R_G7)] = gregs.u_regs[6];
regs[REG_INDEX(R_O0)] = gregs.u_regs[7];
regs[REG_INDEX(R_O1)] = gregs.u_regs[8];
regs[REG_INDEX(R_O2)] = gregs.u_regs[ 9];
regs[REG_INDEX(R_O3)] = gregs.u_regs[10];
regs[REG_INDEX(R_O4)] = gregs.u_regs[11];
regs[REG_INDEX(R_O5)] = gregs.u_regs[12];
regs[REG_INDEX(R_O6)] = gregs.u_regs[13];
regs[REG_INDEX(R_O7)] = gregs.u_regs[14];
#endif /* sparc */
(*env)->ReleaseLongArrayElements(env, array, regs, JNI_COMMIT);
return array;
}

View File

@@ -0,0 +1,406 @@
/*
* Copyright (c) 2002, 2007, 2011, 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.
*
*/
#include <objc/objc-runtime.h>
#import <Foundation/Foundation.h>
#import <JavaNativeFoundation/JavaNativeFoundation.h>
#include <JavaVM/jni.h>
#import <mach/mach.h>
#import <mach/mach_types.h>
#import <sys/sysctl.h>
#import <stdlib.h>
jboolean debug = JNI_FALSE;
static jfieldID symbolicatorID = 0; // set in _init0
static jfieldID taskID = 0; // set in _init0
static void putSymbolicator(JNIEnv *env, jobject this_obj, id symbolicator) {
(*env)->SetLongField(env, this_obj, symbolicatorID, (jlong)(intptr_t)symbolicator);
}
static id getSymbolicator(JNIEnv *env, jobject this_obj) {
jlong ptr = (*env)->GetLongField(env, this_obj, symbolicatorID);
return (id)(intptr_t)ptr;
}
static void putTask(JNIEnv *env, jobject this_obj, task_t task) {
(*env)->SetLongField(env, this_obj, taskID, (jlong)task);
}
static task_t getTask(JNIEnv *env, jobject this_obj) {
jlong ptr = (*env)->GetLongField(env, this_obj, taskID);
return (task_t)ptr;
}
#define CHECK_EXCEPTION_(value) if ((*env)->ExceptionOccurred(env)) { return value; }
#define CHECK_EXCEPTION if ((*env)->ExceptionOccurred(env)) { return;}
#define THROW_NEW_DEBUGGER_EXCEPTION_(str, value) { throw_new_debugger_exception(env, str); return value; }
#define THROW_NEW_DEBUGGER_EXCEPTION(str) { throw_new_debugger_exception(env, str); return;}
static void throw_new_debugger_exception(JNIEnv* env, const char* errMsg) {
(*env)->ThrowNew(env, (*env)->FindClass(env, "sun/jvm/hotspot/debugger/DebuggerException"), errMsg);
}
#if defined(__i386__)
#define hsdb_thread_state_t x86_thread_state32_t
#define hsdb_float_state_t x86_float_state32_t
#define HSDB_THREAD_STATE x86_THREAD_STATE32
#define HSDB_FLOAT_STATE x86_FLOAT_STATE32
#define HSDB_THREAD_STATE_COUNT x86_THREAD_STATE32_COUNT
#define HSDB_FLOAT_STATE_COUNT x86_FLOAT_STATE32_COUNT
#elif defined(__x86_64__)
#define hsdb_thread_state_t x86_thread_state64_t
#define hsdb_float_state_t x86_float_state64_t
#define HSDB_THREAD_STATE x86_THREAD_STATE64
#define HSDB_FLOAT_STATE x86_FLOAT_STATE64
#define HSDB_THREAD_STATE_COUNT x86_THREAD_STATE64_COUNT
#define HSDB_FLOAT_STATE_COUNT x86_FLOAT_STATE64_COUNT
#else
#error "Unsupported architecture"
#endif
/*
* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal
* Method: init0
* Signature: ()V
*/
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;
}
/*
* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal
* 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) {
jlong address = 0;
JNF_COCOA_ENTER(env);
NSString *symbolNameString = JNFJavaToNSString(env, symbolName);
if (debug) {
printf("lookupInProcess called for %s\n", [symbolNameString UTF8String]);
}
id symbolicator = getSymbolicator(env, this_obj);
if (symbolicator != nil) {
uint64_t (*dynamicCall)(id, SEL, NSString *) = (uint64_t (*)(id, SEL, NSString *))&objc_msgSend;
address = (jlong) dynamicCall(symbolicator, @selector(addressForSymbol:), symbolNameString);
}
if (debug) {
printf("address of symbol %s = %llx\n", [symbolNameString UTF8String], address);
}
JNF_COCOA_EXIT(env);
return address;
}
/*
* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal
* 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) {
if (debug) printf("readBytesFromProcess called. addr = %llx numBytes = %lld\n", addr, numBytes);
// must allocate storage instead of using former parameter buf
jboolean isCopy;
jbyteArray array;
jbyte *bufPtr;
array = (*env)->NewByteArray(env, numBytes);
CHECK_EXCEPTION_(0);
unsigned long alignedAddress;
unsigned long alignedLength;
kern_return_t result;
vm_offset_t *pages;
int *mapped;
long pageCount;
uint byteCount;
int i;
unsigned long remaining;
alignedAddress = trunc_page(addr);
if (addr != alignedAddress) {
alignedLength += addr - alignedAddress;
}
alignedLength = round_page(numBytes);
pageCount = alignedLength/vm_page_size;
// Allocate storage for pages and flags.
pages = malloc(pageCount * sizeof(vm_offset_t));
mapped = calloc(pageCount, sizeof(int));
task_t gTask = getTask(env, this_obj);
// Try to read each of the pages.
for (i = 0; i < pageCount; i++) {
result = vm_read(gTask, alignedAddress + i*vm_page_size, vm_page_size,
&pages[i], &byteCount);
mapped[i] = (result == KERN_SUCCESS);
// assume all failures are unmapped pages
}
if (debug) fprintf(stderr, "%ld pages\n", pageCount);
remaining = numBytes;
for (i = 0; i < pageCount; i++) {
unsigned long len = vm_page_size;
unsigned long start = 0;
if (i == 0) {
start = addr - alignedAddress;
len = vm_page_size - start;
}
if (i == (pageCount - 1)) {
len = remaining;
}
if (mapped[i]) {
if (debug) fprintf(stderr, "page %d mapped (len %ld start %ld)\n", i, len, start);
(*env)->SetByteArrayRegion(env, array, 0, len, ((jbyte *) pages[i] + start));
vm_deallocate(mach_task_self(), pages[i], vm_page_size);
}
remaining -= len;
}
free (pages);
free (mapped);
return array;
}
/*
* Class: sun_jvm_hotspot_debugger_macosx_MacOSXDebuggerLocal
* Method: getThreadIntegerRegisterSet0
* Signature: (I)[J
*/
JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getThreadIntegerRegisterSet0(JNIEnv *env, jobject this_obj, jint lwp_id) {
if (debug)
printf("getThreadRegisterSet0 called\n");
kern_return_t result;
thread_t tid;
mach_msg_type_number_t count = HSDB_THREAD_STATE_COUNT;
hsdb_thread_state_t state;
unsigned int *r;
int i;
jlongArray registerArray;
jlong *primitiveArray;
tid = lwp_id;
result = thread_get_state(tid, HSDB_THREAD_STATE, (thread_state_t)&state, &count);
if (result != KERN_SUCCESS) {
if (debug)
printf("getregs: thread_get_state(%d) failed (%d)\n", tid, result);
return NULL;
}
// 40 32-bit registers on ppc, 16 on x86.
// Output order is the same as the order in the ppc_thread_state/i386_thread_state struct.
#if defined(__i386__)
r = (unsigned int *)&state;
registerArray = (*env)->NewLongArray(env, 8);
primitiveArray = (*env)->GetLongArrayElements(env, registerArray, NULL);
primitiveArray[0] = r[0]; // eax
primitiveArray[1] = r[2]; // ecx
primitiveArray[2] = r[3]; // edx
primitiveArray[3] = r[1]; // ebx
primitiveArray[4] = r[7]; // esp
primitiveArray[5] = r[6]; // ebp
primitiveArray[6] = r[5]; // esi
primitiveArray[7] = r[4]; // edi
(*env)->ReleaseLongArrayElements(env, registerArray, primitiveArray, 0);
#elif defined(__x86_64__)
/* From AMD64ThreadContext.java
public static final int R15 = 0;
public static final int R14 = 1;
public static final int R13 = 2;
public static final int R12 = 3;
public static final int R11 = 4;
public static final int R10 = 5;
public static final int R9 = 6;
public static final int R8 = 7;
public static final int RDI = 8;
public static final int RSI = 9;
public static final int RBP = 10;
public static final int RBX = 11;
public static final int RDX = 12;
public static final int RCX = 13;
public static final int RAX = 14;
public static final int TRAPNO = 15;
public static final int ERR = 16;
public static final int RIP = 17;
public static final int CS = 18;
public static final int RFL = 19;
public static final int RSP = 20;
public static final int SS = 21;
public static final int FS = 22;
public static final int GS = 23;
public static final int ES = 24;
public static final int DS = 25;
public static final int FSBASE = 26;
public static final int GSBASE = 27;
*/
// 64 bit
if (debug) printf("Getting threads for a 64-bit process\n");
registerArray = (*env)->NewLongArray(env, 28);
primitiveArray = (*env)->GetLongArrayElements(env, registerArray, NULL);
primitiveArray[0] = state.__r15;
primitiveArray[1] = state.__r14;
primitiveArray[2] = state.__r13;
primitiveArray[3] = state.__r12;
primitiveArray[4] = state.__r11;
primitiveArray[5] = state.__r10;
primitiveArray[6] = state.__r9;
primitiveArray[7] = state.__r8;
primitiveArray[8] = state.__rdi;
primitiveArray[9] = state.__rsi;
primitiveArray[10] = state.__rbp;
primitiveArray[11] = state.__rbx;
primitiveArray[12] = state.__rdx;
primitiveArray[13] = state.__rcx;
primitiveArray[14] = state.__rax;
primitiveArray[15] = 0; // trapno ?
primitiveArray[16] = 0; // err ?
primitiveArray[17] = state.__rip;
primitiveArray[18] = state.__cs;
primitiveArray[19] = state.__rflags;
primitiveArray[20] = state.__rsp;
primitiveArray[21] = 0; // We don't have SS
primitiveArray[22] = state.__fs;
primitiveArray[23] = state.__gs;
primitiveArray[24] = 0;
primitiveArray[25] = 0;
primitiveArray[26] = 0;
primitiveArray[27] = 0;
if (debug) printf("set registers\n");
(*env)->ReleaseLongArrayElements(env, registerArray, primitiveArray, 0);
#else
#error Unsupported architecture
#endif
return registerArray;
}
/*
* Class: sun_jvm_hotspot_debugger_macosx_MacOSXDebuggerLocal
* Method: translateTID0
* Signature: (I)I
*/
JNIEXPORT jint JNICALL
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);
result = mach_port_extract_right(gTask, foreign_tid,
MACH_MSG_TYPE_COPY_SEND,
&usable_tid, &type);
if (result != KERN_SUCCESS)
return -1;
if (debug)
printf("translateTID0: 0x%x -> 0x%x\n", foreign_tid, usable_tid);
return (jint) usable_tid;
}
/*
* 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) {
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);
kern_return_t result;
task_t gTask = 0;
result = task_for_pid(mach_task_self(), jpid, &gTask);
if (result != KERN_SUCCESS) {
fprintf(stderr, "attach: task_for_pid(%d) failed (%d)\n", (int)jpid, result);
THROW_NEW_DEBUGGER_EXCEPTION("Can't attach to the process");
}
putTask(env, this_obj, gTask);
id symbolicator = nil;
id jrsSymbolicator = objc_lookUpClass("JRSSymbolicator");
if (jrsSymbolicator != nil) {
id (*dynamicCall)(id, SEL, pid_t) = (id (*)(id, SEL, pid_t))&objc_msgSend;
symbolicator = dynamicCall(jrsSymbolicator, @selector(symbolicatorForPid:), (pid_t)jpid);
}
if (symbolicator != nil) {
CFRetain(symbolicator); // pin symbolicator while in java heap
}
putSymbolicator(env, this_obj, symbolicator);
if (symbolicator == nil) {
THROW_NEW_DEBUGGER_EXCEPTION("Can't attach symbolicator to the process");
}
JNF_COCOA_EXIT(env);
}
/*
* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal
* Method: detach0
* Signature: ()V
*/
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);
mach_port_deallocate(mach_task_self(), gTask);
id symbolicator = getSymbolicator(env, this_obj);
if (symbolicator != nil) {
CFRelease(symbolicator);
}
JNF_COCOA_EXIT(env);
}

View File

@@ -0,0 +1,77 @@
#
# Copyright (c) 2002, 2009, 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.
#
#
ARCH := $(shell if ([ `uname -m` = "ia64" ]) ; then echo ia64 ; elif ([ `uname -m` = "amd64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo i386 ; fi )
GCC = gcc
JAVAH = ${JAVA_HOME}/bin/javah
SOURCES = salibelf.c \
symtab.c \
libproc_impl.c \
ps_proc.c \
ps_core.c \
BsdDebuggerLocal.c
INCLUDES = -I${JAVA_HOME}/include -I${JAVA_HOME}/include/$(shell uname -s | tr "[:upper:]" "[:lower:]")
OBJS = $(SOURCES:.c=.o)
LIBS = -lutil -lthread_db
CFLAGS = -c -fPIC -g -Wall -D_ALLBSD_SOURCE -D_GNU_SOURCE -D$(ARCH) $(INCLUDES)
LIBSA = $(ARCH)/libsaproc.so
all: $(LIBSA)
BsdDebuggerLocal.o: BsdDebuggerLocal.c
$(JAVAH) -jni -classpath ../../../../../build/bsd-i586/hotspot/outputdir/bsd_i486_compiler2/generated/saclasses \
sun.jvm.hotspot.debugger.x86.X86ThreadContext \
sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext
$(GCC) $(CFLAGS) $<
.c.obj:
$(GCC) $(CFLAGS)
ifndef LDNOMAP
LFLAGS_LIBSA = -Xlinker --version-script=mapfile
endif
$(LIBSA): $(OBJS) mapfile
if [ ! -d $(ARCH) ] ; then mkdir $(ARCH) ; fi
$(GCC) -shared $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS)
test.o: $(LIBSA) test.c
$(GCC) -c -o test.o -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) test.c
test: test.o
$(GCC) -o test test.o -L$(ARCH) -lsaproc $(LIBS)
clean:
rm -f $(LIBSA)
rm -f $(OBJS)
rm -f test.o
-rmdir $(ARCH)

View File

@@ -0,0 +1,120 @@
/*
* Copyright (c) 2009, 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.
*
*/
#include <stdlib.h>
#include <jni.h>
#define CHECK_EXCEPTION_(value) if ((*env)->ExceptionOccurred(env)) { return value; }
#define CHECK_EXCEPTION if ((*env)->ExceptionOccurred(env)) { return;}
#define THROW_NEW_DEBUGGER_EXCEPTION_(str, value) { throw_new_debugger_exception(env, str); return value; }
#define THROW_NEW_DEBUGGER_EXCEPTION(str) { throw_new_debugger_exception(env, str); return;}
static void throw_new_debugger_exception(JNIEnv* env, const char* errMsg) {
(*env)->ThrowNew(env, (*env)->FindClass(env, "sun/jvm/hotspot/debugger/DebuggerException"), errMsg);
}
/*
* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal
* Method: init0
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_init0
(JNIEnv *env, jclass cls) {
}
JNIEXPORT jint JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getAddressSize
(JNIEnv *env, jclass cls)
{
#ifdef _LP64
return 8;
#else
return 4;
#endif
}
/*
* 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) {
THROW_NEW_DEBUGGER_EXCEPTION("Can't attach to the process");
}
/*
* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal
* Method: attach0
* Signature: (Ljava/lang/String;Ljava/lang/String;)V
*/
JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_attach0__Ljava_lang_String_2Ljava_lang_String_2
(JNIEnv *env, jobject this_obj, jstring execName, jstring coreName) {
THROW_NEW_DEBUGGER_EXCEPTION("Can't attach to the core file");
}
/*
* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal
* Method: detach0
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_detach0
(JNIEnv *env, jobject this_obj) {
}
/*
* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal
* 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) {
return 0;
}
/*
* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal
* Method: lookupByAddress0
* Signature: (J)Lsun/jvm/hotspot/debugger/cdbg/ClosestSymbol;
*/
JNIEXPORT jobject JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_lookupByAddress0
(JNIEnv *env, jobject this_obj, jlong addr) {
return 0;
}
/*
* Class: sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal
* 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) {
return 0;
}
JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getThreadIntegerRegisterSet0
(JNIEnv *env, jobject this_obj, jint lwp_id) {
return 0;
}

View File

@@ -0,0 +1,58 @@
/*
* Copyright (c) 2003, 2006, 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.
*
*/
#ifndef _ELFMACROS_H_
#define _ELFMACROS_H_
#define ELF_NHDR Elf_Note
#if defined(_LP64)
#define ELF_EHDR Elf64_Ehdr
#define ELF_SHDR Elf64_Shdr
#define ELF_PHDR Elf64_Phdr
#define ELF_SYM Elf64_Sym
#define ELF_DYN Elf64_Dyn
#define ELF_ADDR Elf64_Addr
#ifndef ELF_ST_TYPE
#define ELF_ST_TYPE ELF64_ST_TYPE
#endif
#else
#define ELF_EHDR Elf32_Ehdr
#define ELF_SHDR Elf32_Shdr
#define ELF_PHDR Elf32_Phdr
#define ELF_SYM Elf32_Sym
#define ELF_DYN Elf32_Dyn
#define ELF_ADDR Elf32_Addr
#ifndef ELF_ST_TYPE
#define ELF_ST_TYPE ELF32_ST_TYPE
#endif
#endif
#endif /* _ELFMACROS_H_ */

View File

@@ -0,0 +1,127 @@
/*
* Copyright (c) 2003, 2007, 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.
*
*/
#ifndef _LIBPROC_H_
#define _LIBPROC_H_
#include <unistd.h>
#include <stdint.h>
#include <machine/reg.h>
#include <proc_service.h>
#if defined(sparc) || defined(sparcv9)
/*
If _LP64 is defined ptrace.h should be taken from /usr/include/asm-sparc64
otherwise it should be from /usr/include/asm-sparc
These two files define pt_regs structure differently
*/
#ifdef _LP64
#include "asm-sparc64/ptrace.h"
#else
#include "asm-sparc/ptrace.h"
#endif
#endif //sparc or sparcv9
/************************************************************************************
0. This is very minimal subset of Solaris libproc just enough for current application.
Please note that the bulk of the functionality is from proc_service interface. This
adds Pgrab__ and some missing stuff. We hide the difference b/w live process and core
file by this interface.
1. pthread_id is unique. We store this in OSThread::_pthread_id in JVM code.
2. All threads see the same pid when they call getpid().
We used to save the result of ::getpid() call in OSThread::_thread_id.
Because gettid returns actual pid of thread (lwp id), this is
unique again. We therefore use OSThread::_thread_id as unique identifier.
3. There is a unique LWP id under both thread libraries. libthread_db maps pthread_id
to its underlying lwp_id under both the thread libraries. thread_info.lwp_id stores
lwp_id of the thread. The lwp id is nothing but the actual pid of clone'd processes. But
unfortunately libthread_db does not work very well for core dumps. So, we get pthread_id
only for processes. For core dumps, we don't use libthread_db at all (like gdb).
4. ptrace operates on this LWP id under both the thread libraries. When we say 'pid' for
ptrace call, we refer to lwp_id of the thread.
5. for core file, we parse ELF files and read data from them. For processes we use
combination of ptrace and /proc calls.
*************************************************************************************/
// This C bool type must be int for compatibility with BSD calls and
// it would be a mistake to equivalence it to C++ bool on many platforms
typedef int bool;
#define true 1
#define false 0
struct ps_prochandle;
// attach to a process
struct ps_prochandle* Pgrab(pid_t pid);
// attach to a core dump
struct ps_prochandle* Pgrab_core(const char* execfile, const char* corefile);
// release a process or core
void Prelease(struct ps_prochandle* ph);
// functions not directly available in Solaris libproc
// initialize libproc (call this only once per app)
// pass true to make library verbose
bool init_libproc(bool verbose);
// get number of threads
int get_num_threads(struct ps_prochandle* ph);
// get lwp_id of n'th thread
lwpid_t get_lwp_id(struct ps_prochandle* ph, int index);
// get regs for a given lwp
bool get_lwp_regs(struct ps_prochandle* ph, lwpid_t lid, struct reg* regs);
// get number of shared objects
int get_num_libs(struct ps_prochandle* ph);
// get name of n'th lib
const char* get_lib_name(struct ps_prochandle* ph, int index);
// get base of lib
uintptr_t get_lib_base(struct ps_prochandle* ph, int index);
// returns true if given library is found in lib list
bool find_lib(struct ps_prochandle* ph, const char *lib_name);
// symbol lookup
uintptr_t lookup_symbol(struct ps_prochandle* ph, const char* object_name,
const char* sym_name);
// address->nearest symbol lookup. return NULL for no symbol
const char* symbol_for_pc(struct ps_prochandle* ph, uintptr_t addr, uintptr_t* poffset);
#endif //__LIBPROC_H_

View File

@@ -0,0 +1,452 @@
/*
* Copyright (c) 2003, 2010, 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.
*
*/
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <thread_db.h>
#include "libproc_impl.h"
static const char* alt_root = NULL;
static int alt_root_len = -1;
#define SA_ALTROOT "SA_ALTROOT"
static void init_alt_root() {
if (alt_root_len == -1) {
alt_root = getenv(SA_ALTROOT);
if (alt_root) {
alt_root_len = strlen(alt_root);
} else {
alt_root_len = 0;
}
}
}
int pathmap_open(const char* name) {
int fd;
char alt_path[PATH_MAX + 1];
init_alt_root();
fd = open(name, O_RDONLY);
if (fd >= 0) {
return fd;
}
if (alt_root_len > 0) {
strcpy(alt_path, alt_root);
strcat(alt_path, name);
fd = open(alt_path, O_RDONLY);
if (fd >= 0) {
print_debug("path %s substituted for %s\n", alt_path, name);
return fd;
}
if (strrchr(name, '/')) {
strcpy(alt_path, alt_root);
strcat(alt_path, strrchr(name, '/'));
fd = open(alt_path, O_RDONLY);
if (fd >= 0) {
print_debug("path %s substituted for %s\n", alt_path, name);
return fd;
}
}
}
return -1;
}
static bool _libsaproc_debug;
void print_debug(const char* format,...) {
if (_libsaproc_debug) {
va_list alist;
va_start(alist, format);
fputs("libsaproc DEBUG: ", stderr);
vfprintf(stderr, format, alist);
va_end(alist);
}
}
bool is_debug() {
return _libsaproc_debug;
}
// initialize libproc
bool init_libproc(bool debug) {
// init debug mode
_libsaproc_debug = debug;
// initialize the thread_db library
if (td_init() != TD_OK) {
print_debug("libthread_db's td_init failed\n");
return false;
}
return true;
}
static void destroy_lib_info(struct ps_prochandle* ph) {
lib_info* lib = ph->libs;
while (lib) {
lib_info *next = lib->next;
if (lib->symtab) {
destroy_symtab(lib->symtab);
}
free(lib);
lib = next;
}
}
static void destroy_thread_info(struct ps_prochandle* ph) {
thread_info* thr = ph->threads;
while (thr) {
thread_info *next = thr->next;
free(thr);
thr = next;
}
}
// ps_prochandle cleanup
// ps_prochandle cleanup
void Prelease(struct ps_prochandle* ph) {
// do the "derived class" clean-up first
ph->ops->release(ph);
destroy_lib_info(ph);
destroy_thread_info(ph);
free(ph);
}
lib_info* add_lib_info(struct ps_prochandle* ph, const char* libname, uintptr_t base) {
return add_lib_info_fd(ph, libname, -1, base);
}
lib_info* add_lib_info_fd(struct ps_prochandle* ph, const char* libname, int fd, uintptr_t base) {
lib_info* newlib;
if ( (newlib = (lib_info*) calloc(1, sizeof(struct lib_info))) == NULL) {
print_debug("can't allocate memory for lib_info\n");
return NULL;
}
strncpy(newlib->name, libname, sizeof(newlib->name));
newlib->base = base;
if (fd == -1) {
if ( (newlib->fd = pathmap_open(newlib->name)) < 0) {
print_debug("can't open shared object %s\n", newlib->name);
free(newlib);
return NULL;
}
} else {
newlib->fd = fd;
}
// check whether we have got an ELF file. /proc/<pid>/map
// gives out all file mappings and not just shared objects
if (is_elf_file(newlib->fd) == false) {
close(newlib->fd);
free(newlib);
return NULL;
}
newlib->symtab = build_symtab(newlib->fd);
if (newlib->symtab == NULL) {
print_debug("symbol table build failed for %s\n", newlib->name);
}
else {
print_debug("built symbol table for %s\n", newlib->name);
}
// even if symbol table building fails, we add the lib_info.
// This is because we may need to read from the ELF file for core file
// address read functionality. lookup_symbol checks for NULL symtab.
if (ph->libs) {
ph->lib_tail->next = newlib;
ph->lib_tail = newlib;
} else {
ph->libs = ph->lib_tail = newlib;
}
ph->num_libs++;
return newlib;
}
// lookup for a specific symbol
uintptr_t lookup_symbol(struct ps_prochandle* ph, const char* object_name,
const char* sym_name) {
// ignore object_name. search in all libraries
// FIXME: what should we do with object_name?? The library names are obtained
// by parsing /proc/<pid>/maps, which may not be the same as object_name.
// What we need is a utility to map object_name to real file name, something
// dlopen() does by looking at LD_LIBRARY_PATH and /etc/ld.so.cache. For
// now, we just ignore object_name and do a global search for the symbol.
lib_info* lib = ph->libs;
while (lib) {
if (lib->symtab) {
uintptr_t res = search_symbol(lib->symtab, lib->base, sym_name, NULL);
if (res) return res;
}
lib = lib->next;
}
print_debug("lookup failed for symbol '%s' in obj '%s'\n",
sym_name, object_name);
return (uintptr_t) NULL;
}
const char* symbol_for_pc(struct ps_prochandle* ph, uintptr_t addr, uintptr_t* poffset) {
const char* res = NULL;
lib_info* lib = ph->libs;
while (lib) {
if (lib->symtab && addr >= lib->base) {
res = nearest_symbol(lib->symtab, addr - lib->base, poffset);
if (res) return res;
}
lib = lib->next;
}
return NULL;
}
// add a thread to ps_prochandle
thread_info* add_thread_info(struct ps_prochandle* ph, pthread_t pthread_id, lwpid_t lwp_id) {
thread_info* newthr;
if ( (newthr = (thread_info*) calloc(1, sizeof(thread_info))) == NULL) {
print_debug("can't allocate memory for thread_info\n");
return NULL;
}
// initialize thread info
newthr->pthread_id = pthread_id;
newthr->lwp_id = lwp_id;
// add new thread to the list
newthr->next = ph->threads;
ph->threads = newthr;
ph->num_threads++;
return newthr;
}
// struct used for client data from thread_db callback
struct thread_db_client_data {
struct ps_prochandle* ph;
thread_info_callback callback;
};
// callback function for libthread_db
static int thread_db_callback(const td_thrhandle_t *th_p, void *data) {
struct thread_db_client_data* ptr = (struct thread_db_client_data*) data;
td_thrinfo_t ti;
td_err_e err;
memset(&ti, 0, sizeof(ti));
err = td_thr_get_info(th_p, &ti);
if (err != TD_OK) {
print_debug("libthread_db : td_thr_get_info failed, can't get thread info\n");
return err;
}
print_debug("thread_db : pthread %d (lwp %d)\n", ti.ti_tid, ti.ti_lid);
if (ptr->callback(ptr->ph, (pthread_t)ti.ti_tid, ti.ti_lid) != true)
return TD_ERR;
return TD_OK;
}
// read thread_info using libthread_db
bool read_thread_info(struct ps_prochandle* ph, thread_info_callback cb) {
struct thread_db_client_data mydata;
td_thragent_t* thread_agent = NULL;
if (td_ta_new(ph, &thread_agent) != TD_OK) {
print_debug("can't create libthread_db agent\n");
return false;
}
mydata.ph = ph;
mydata.callback = cb;
// we use libthread_db iterator to iterate thru list of threads.
if (td_ta_thr_iter(thread_agent, thread_db_callback, &mydata,
TD_THR_ANY_STATE, TD_THR_LOWEST_PRIORITY,
TD_SIGNO_MASK, TD_THR_ANY_USER_FLAGS) != TD_OK) {
td_ta_delete(thread_agent);
return false;
}
// delete thread agent
td_ta_delete(thread_agent);
return true;
}
// get number of threads
int get_num_threads(struct ps_prochandle* ph) {
return ph->num_threads;
}
// get lwp_id of n'th thread
lwpid_t get_lwp_id(struct ps_prochandle* ph, int index) {
int count = 0;
thread_info* thr = ph->threads;
while (thr) {
if (count == index) {
return thr->lwp_id;
}
count++;
thr = thr->next;
}
return -1;
}
// get regs for a given lwp
bool get_lwp_regs(struct ps_prochandle* ph, lwpid_t lwp_id, struct reg* regs) {
return ph->ops->get_lwp_regs(ph, lwp_id, regs);
}
// get number of shared objects
int get_num_libs(struct ps_prochandle* ph) {
return ph->num_libs;
}
// get name of n'th solib
const char* get_lib_name(struct ps_prochandle* ph, int index) {
int count = 0;
lib_info* lib = ph->libs;
while (lib) {
if (count == index) {
return lib->name;
}
count++;
lib = lib->next;
}
return NULL;
}
// get base address of a lib
uintptr_t get_lib_base(struct ps_prochandle* ph, int index) {
int count = 0;
lib_info* lib = ph->libs;
while (lib) {
if (count == index) {
return lib->base;
}
count++;
lib = lib->next;
}
return (uintptr_t)NULL;
}
bool find_lib(struct ps_prochandle* ph, const char *lib_name) {
lib_info *p = ph->libs;
while (p) {
if (strcmp(p->name, lib_name) == 0) {
return true;
}
p = p->next;
}
return false;
}
//--------------------------------------------------------------------------
// proc service functions
// ps_pglobal_lookup() looks up the symbol sym_name in the symbol table
// of the load object object_name in the target process identified by ph.
// It returns the symbol's value as an address in the target process in
// *sym_addr.
ps_err_e ps_pglobal_lookup(struct ps_prochandle *ph, const char *object_name,
const char *sym_name, psaddr_t *sym_addr) {
*sym_addr = (psaddr_t) lookup_symbol(ph, object_name, sym_name);
return (*sym_addr ? PS_OK : PS_NOSYM);
}
// read "size" bytes info "buf" from address "addr"
ps_err_e ps_pread(struct ps_prochandle *ph, psaddr_t addr,
void *buf, size_t size) {
return ph->ops->p_pread(ph, (uintptr_t) addr, buf, size)? PS_OK: PS_ERR;
}
// write "size" bytes of data to debuggee at address "addr"
ps_err_e ps_pwrite(struct ps_prochandle *ph, psaddr_t addr,
const void *buf, size_t size) {
return ph->ops->p_pwrite(ph, (uintptr_t)addr, buf, size)? PS_OK: PS_ERR;
}
// fill in ptrace_lwpinfo for lid
ps_err_e ps_linfo(struct ps_prochandle *ph, lwpid_t lwp_id, void *linfo) {
return ph->ops->get_lwp_info(ph, lwp_id, linfo)? PS_OK: PS_ERR;
}
// needed for when libthread_db is compiled with TD_DEBUG defined
void
ps_plog (const char *format, ...)
{
va_list alist;
va_start(alist, format);
vfprintf(stderr, format, alist);
va_end(alist);
}
// ------------------------------------------------------------------------
// Functions below this point are not yet implemented. They are here only
// to make the linker happy.
ps_err_e ps_lsetfpregs(struct ps_prochandle *ph, lwpid_t lid, const prfpregset_t *fpregs) {
print_debug("ps_lsetfpregs not implemented\n");
return PS_OK;
}
ps_err_e ps_lsetregs(struct ps_prochandle *ph, lwpid_t lid, const prgregset_t gregset) {
print_debug("ps_lsetregs not implemented\n");
return PS_OK;
}
ps_err_e ps_lgetfpregs(struct ps_prochandle *ph, lwpid_t lid, prfpregset_t *fpregs) {
print_debug("ps_lgetfpregs not implemented\n");
return PS_OK;
}
ps_err_e ps_lgetregs(struct ps_prochandle *ph, lwpid_t lid, prgregset_t gregset) {
print_debug("ps_lgetfpregs not implemented\n");
return PS_OK;
}
ps_err_e ps_lstop(struct ps_prochandle *ph, lwpid_t lid) {
print_debug("ps_lstop not implemented\n");
return PS_OK;
}
ps_err_e ps_pcontinue(struct ps_prochandle *ph) {
print_debug("ps_pcontinue not implemented\n");
return PS_OK;
}

View File

@@ -0,0 +1,130 @@
/*
* Copyright (c) 2003, 2005, 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.
*
*/
#ifndef _LIBPROC_IMPL_H_
#define _LIBPROC_IMPL_H_
#include <unistd.h>
#include <limits.h>
#include "libproc.h"
#include "symtab.h"
// data structures in this file mimic those of Solaris 8.0 - libproc's Pcontrol.h
#define BUF_SIZE (PATH_MAX + NAME_MAX + 1)
// list of shared objects
typedef struct lib_info {
char name[BUF_SIZE];
uintptr_t base;
struct symtab* symtab;
int fd; // file descriptor for lib
struct lib_info* next;
} lib_info;
// list of threads
typedef struct thread_info {
lwpid_t lwp_id;
pthread_t pthread_id; // not used cores, always -1
struct reg regs; // not for process, core uses for caching regset
struct thread_info* next;
} thread_info;
// list of virtual memory maps
typedef struct map_info {
int fd; // file descriptor
off_t offset; // file offset of this mapping
uintptr_t vaddr; // starting virtual address
size_t memsz; // size of the mapping
struct map_info* next;
} map_info;
// vtable for ps_prochandle
typedef struct ps_prochandle_ops {
// "derived class" clean-up
void (*release)(struct ps_prochandle* ph);
// read from debuggee
bool (*p_pread)(struct ps_prochandle *ph,
uintptr_t addr, char *buf, size_t size);
// write into debuggee
bool (*p_pwrite)(struct ps_prochandle *ph,
uintptr_t addr, const char *buf , size_t size);
// get integer regset of a thread
bool (*get_lwp_regs)(struct ps_prochandle* ph, lwpid_t lwp_id, struct reg* regs);
// get info on thread
bool (*get_lwp_info)(struct ps_prochandle *ph, lwpid_t lwp_id, void *linfo);
} ps_prochandle_ops;
// the ps_prochandle
struct core_data {
int core_fd; // file descriptor of core file
int exec_fd; // file descriptor of exec file
int interp_fd; // file descriptor of interpreter (ld-elf.so.1)
// part of the class sharing workaround
int classes_jsa_fd; // file descriptor of class share archive
uintptr_t dynamic_addr; // address of dynamic section of a.out
uintptr_t ld_base_addr; // base address of ld.so
size_t num_maps; // number of maps.
map_info* maps; // maps in a linked list
// part of the class sharing workaround
map_info* class_share_maps;// class share maps in a linked list
map_info** map_array; // sorted (by vaddr) array of map_info pointers
};
struct ps_prochandle {
ps_prochandle_ops* ops; // vtable ptr
pid_t pid;
int num_libs;
lib_info* libs; // head of lib list
lib_info* lib_tail; // tail of lib list - to append at the end
int num_threads;
thread_info* threads; // head of thread list
struct core_data* core; // data only used for core dumps, NULL for process
};
int pathmap_open(const char* name);
void print_debug(const char* format,...);
bool is_debug();
typedef bool (*thread_info_callback)(struct ps_prochandle* ph, pthread_t pid, lwpid_t lwpid);
// reads thread info using libthread_db and calls above callback for each thread
bool read_thread_info(struct ps_prochandle* ph, thread_info_callback cb);
// adds a new shared object to lib list, returns NULL on failure
lib_info* add_lib_info(struct ps_prochandle* ph, const char* libname, uintptr_t base);
// adds a new shared object to lib list, supply open lib file descriptor as well
lib_info* add_lib_info_fd(struct ps_prochandle* ph, const char* libname, int fd,
uintptr_t base);
// adds a new thread to threads list, returns NULL on failure
thread_info* add_thread_info(struct ps_prochandle* ph, pthread_t pthread_id, lwpid_t lwp_id);
// a test for ELF signature without using libelf
bool is_elf_file(int fd);
#endif //_LIBPROC_IMPL_H_

View File

@@ -0,0 +1,66 @@
#
#
# Copyright (c) 2003, 2006, 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.
#
#
# Define public interface.
SUNWprivate_1.1 {
global:
# native methods of BsdDebuggerLocal class
Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_init0;
Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getAddressSize;
Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_attach0__I;
Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_attach0__Ljava_lang_String_2Ljava_lang_String_2;
Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_detach0;
Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_lookupByName0;
Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_lookupByAddress0;
Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_readBytesFromProcess0;
Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getThreadIntegerRegisterSet0;
# proc_service.h functions - to be used by libthread_db
ps_getpid;
ps_pglobal_lookup;
ps_pread;
ps_pwrite;
ps_lsetfpregs;
ps_lsetregs;
ps_lgetfpregs;
ps_lgetregs;
ps_lcontinue;
ps_lgetxmmregs;
ps_lsetxmmregs;
ps_lstop;
ps_linfo;
# used by attach test program
init_libproc;
Pgrab;
Pgrab_core;
Prelease;
local:
*;
};

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,444 @@
/*
* Copyright (c) 2003, 2010, 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.
*
*/
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/ptrace.h>
#include <sys/param.h>
#include <sys/user.h>
#include <elf.h>
#include <sys/elf_common.h>
#include <sys/link_elf.h>
#include <libutil.h>
#include "libproc_impl.h"
#include "elfmacros.h"
// This file has the libproc implementation specific to live process
// For core files, refer to ps_core.c
static inline uintptr_t align(uintptr_t ptr, size_t size) {
return (ptr & ~(size - 1));
}
// ---------------------------------------------
// ptrace functions
// ---------------------------------------------
// read "size" bytes of data from "addr" within the target process.
// unlike the standard ptrace() function, process_read_data() can handle
// unaligned address - alignment check, if required, should be done
// before calling process_read_data.
static bool process_read_data(struct ps_prochandle* ph, uintptr_t addr, char *buf, size_t size) {
int rslt;
size_t i, words;
uintptr_t end_addr = addr + size;
uintptr_t aligned_addr = align(addr, sizeof(int));
if (aligned_addr != addr) {
char *ptr = (char *)&rslt;
errno = 0;
rslt = ptrace(PT_READ_D, ph->pid, (caddr_t) aligned_addr, 0);
if (errno) {
print_debug("ptrace(PT_READ_D, ..) failed for %d bytes @ %lx\n", size, addr);
return false;
}
for (; aligned_addr != addr; aligned_addr++, ptr++);
for (; ((intptr_t)aligned_addr % sizeof(int)) && aligned_addr < end_addr;
aligned_addr++)
*(buf++) = *(ptr++);
}
words = (end_addr - aligned_addr) / sizeof(int);
// assert((intptr_t)aligned_addr % sizeof(int) == 0);
for (i = 0; i < words; i++) {
errno = 0;
rslt = ptrace(PT_READ_D, ph->pid, (caddr_t) aligned_addr, 0);
if (errno) {
print_debug("ptrace(PT_READ_D, ..) failed for %d bytes @ %lx\n", size, addr);
return false;
}
*(int *)buf = rslt;
buf += sizeof(int);
aligned_addr += sizeof(int);
}
if (aligned_addr != end_addr) {
char *ptr = (char *)&rslt;
errno = 0;
rslt = ptrace(PT_READ_D, ph->pid, (caddr_t) aligned_addr, 0);
if (errno) {
print_debug("ptrace(PT_READ_D, ..) failed for %d bytes @ %lx\n", size, addr);
return false;
}
for (; aligned_addr != end_addr; aligned_addr++)
*(buf++) = *(ptr++);
}
return true;
}
// null implementation for write
static bool process_write_data(struct ps_prochandle* ph,
uintptr_t addr, const char *buf , size_t size) {
return false;
}
// "user" should be a pointer to a reg
static bool process_get_lwp_regs(struct ps_prochandle* ph, pid_t pid, struct reg *user) {
// we have already attached to all thread 'pid's, just use ptrace call
// to get regset now. Note that we don't cache regset upfront for processes.
if (ptrace(PT_GETREGS, pid, (caddr_t) user, 0) < 0) {
print_debug("ptrace(PTRACE_GETREGS, ...) failed for lwp %d\n", pid);
return false;
}
return true;
}
// fill in ptrace_lwpinfo for lid
static bool process_get_lwp_info(struct ps_prochandle *ph, lwpid_t lwp_id, void *linfo) {
errno = 0;
ptrace(PT_LWPINFO, lwp_id, linfo, sizeof(struct ptrace_lwpinfo));
return (errno == 0)? true: false;
}
// 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);
}
}
// -------------------------------------------------------
// functions for obtaining library information
// -------------------------------------------------------
// callback for read_thread_info
static bool add_new_thread(struct ps_prochandle* ph, pthread_t pthread_id, lwpid_t lwp_id) {
return add_thread_info(ph, pthread_id, lwp_id) != NULL;
}
#if defined(__FreeBSD__) && __FreeBSD_version < 701000
/*
* TEXT_START_ADDR from binutils/ld/emulparams/<arch_spec>.sh
* Not the most robust but good enough.
*/
#if defined(amd64) || defined(x86_64)
#define TEXT_START_ADDR 0x400000
#elif defined(i386)
#define TEXT_START_ADDR 0x8048000
#else
#error TEXT_START_ADDR not defined
#endif
#define BUF_SIZE (PATH_MAX + NAME_MAX + 1)
uintptr_t linkmap_addr(struct ps_prochandle *ph) {
uintptr_t ehdr_addr, phdr_addr, dyn_addr, dmap_addr, lmap_addr;
ELF_EHDR ehdr;
ELF_PHDR *phdrs, *phdr;
ELF_DYN *dyns, *dyn;
struct r_debug dmap;
unsigned long hdrs_size;
unsigned int i;
/* read ELF_EHDR at TEXT_START_ADDR and validate */
ehdr_addr = (uintptr_t)TEXT_START_ADDR;
if (process_read_data(ph, ehdr_addr, (char *)&ehdr, sizeof(ehdr)) != true) {
print_debug("process_read_data failed for ehdr_addr %p\n", ehdr_addr);
return (0);
}
if (!IS_ELF(ehdr) ||
ehdr.e_ident[EI_CLASS] != ELF_TARG_CLASS ||
ehdr.e_ident[EI_DATA] != ELF_TARG_DATA ||
ehdr.e_ident[EI_VERSION] != EV_CURRENT ||
ehdr.e_phentsize != sizeof(ELF_PHDR) ||
ehdr.e_version != ELF_TARG_VER ||
ehdr.e_machine != ELF_TARG_MACH) {
print_debug("not an ELF_EHDR at %p\n", ehdr_addr);
return (0);
}
/* allocate space for all ELF_PHDR's and read */
phdr_addr = ehdr_addr + ehdr.e_phoff;
hdrs_size = ehdr.e_phnum * sizeof(ELF_PHDR);
if ((phdrs = malloc(hdrs_size)) == NULL)
return (0);
if (process_read_data(ph, phdr_addr, (char *)phdrs, hdrs_size) != true) {
print_debug("process_read_data failed for phdr_addr %p\n", phdr_addr);
return (0);
}
/* find PT_DYNAMIC section */
for (i = 0, phdr = phdrs; i < ehdr.e_phnum; i++, phdr++) {
if (phdr->p_type == PT_DYNAMIC)
break;
}
if (i >= ehdr.e_phnum) {
print_debug("PT_DYNAMIC section not found!\n");
free(phdrs);
return (0);
}
/* allocate space and read in ELF_DYN headers */
dyn_addr = phdr->p_vaddr;
hdrs_size = phdr->p_memsz;
free(phdrs);
if ((dyns = malloc(hdrs_size)) == NULL)
return (0);
if (process_read_data(ph, dyn_addr, (char *)dyns, hdrs_size) != true) {
print_debug("process_read_data failed for dyn_addr %p\n", dyn_addr);
free(dyns);
return (0);
}
/* find DT_DEBUG */
dyn = dyns;
while (dyn->d_tag != DT_DEBUG && dyn->d_tag != DT_NULL) {
dyn++;
}
if (dyn->d_tag != DT_DEBUG) {
print_debug("failed to find DT_DEBUG\n");
free(dyns);
return (0);
}
/* read struct r_debug into dmap */
dmap_addr = (uintptr_t)dyn->d_un.d_ptr;
free(dyns);
if (process_read_data(ph, dmap_addr, (char *)&dmap, sizeof(dmap)) != true) {
print_debug("process_read_data failed for dmap_addr %p\n", dmap_addr);
return (0);
}
lmap_addr = (uintptr_t)dmap.r_map;
return (lmap_addr);
}
#endif // __FreeBSD__ && __FreeBSD_version < 701000
static bool read_lib_info(struct ps_prochandle* ph) {
#if defined(__FreeBSD__) && __FreeBSD_version >= 701000
struct kinfo_vmentry *freep, *kve;
int i, cnt;
freep = kinfo_getvmmap(ph->pid, &cnt);
if (freep == NULL) {
print_debug("can't get vm map for pid\n", ph->pid);
return false;
}
for (i = 0; i < cnt; i++) {
kve = &freep[i];
if ((kve->kve_flags & KVME_FLAG_COW) &&
kve->kve_path != NULL &&
strlen(kve->kve_path) > 0) {
if (find_lib(ph, kve->kve_path) == false) {
lib_info* lib;
if ((lib = add_lib_info(ph, kve->kve_path,
(uintptr_t) kve->kve_start)) == NULL)
continue; // ignore, add_lib_info prints error
// we don't need to keep the library open, symtab is already
// built. Only for core dump we need to keep the fd open.
close(lib->fd);
lib->fd = -1;
}
}
}
free(freep);
return true;
#else
char *l_name;
struct link_map *lmap;
uintptr_t lmap_addr;
if ((l_name = malloc(BUF_SIZE)) == NULL)
return false;
if ((lmap = malloc(sizeof(*lmap))) == NULL) {
free(l_name);
return false;
}
lmap_addr = linkmap_addr(ph);
if (lmap_addr == 0) {
free(l_name);
free(lmap);
return false;
}
do {
if (process_read_data(ph, lmap_addr, (char *)lmap, sizeof(*lmap)) != true) {
print_debug("process_read_data failed for lmap_addr %p\n", lmap_addr);
free (l_name);
free (lmap);
return false;
}
if (process_read_data(ph, (uintptr_t)lmap->l_name, l_name,
BUF_SIZE) != true) {
print_debug("process_read_data failed for lmap->l_name %p\n",
lmap->l_name);
free (l_name);
free (lmap);
return false;
}
if (find_lib(ph, l_name) == false) {
lib_info* lib;
if ((lib = add_lib_info(ph, l_name,
(uintptr_t) lmap->l_addr)) == NULL)
continue; // ignore, add_lib_info prints error
// we don't need to keep the library open, symtab is already
// built. Only for core dump we need to keep the fd open.
close(lib->fd);
lib->fd = -1;
}
lmap_addr = (uintptr_t)lmap->l_next;
} while (lmap->l_next != NULL);
free (l_name);
free (lmap);
return true;
#endif
}
// detach a given pid
static bool ptrace_detach(pid_t pid) {
if (pid && ptrace(PT_DETACH, pid, (caddr_t)1, 0) < 0) {
print_debug("ptrace(PTRACE_DETACH, ..) failed for %d\n", pid);
return false;
} else {
return true;
}
}
static void process_cleanup(struct ps_prochandle* ph) {
ptrace_detach(ph->pid);
}
static ps_prochandle_ops process_ops = {
.release= process_cleanup,
.p_pread= process_read_data,
.p_pwrite= process_write_data,
.get_lwp_regs= process_get_lwp_regs,
.get_lwp_info= process_get_lwp_info
};
// attach to the process. One and only one exposed stuff
struct ps_prochandle* Pgrab(pid_t pid) {
struct ps_prochandle* ph = NULL;
thread_info* thr = NULL;
if ( (ph = (struct ps_prochandle*) calloc(1, sizeof(struct ps_prochandle))) == NULL) {
print_debug("can't allocate memory for ps_prochandle\n");
return NULL;
}
if (ptrace_attach(pid) != true) {
free(ph);
return NULL;
}
// initialize ps_prochandle
ph->pid = pid;
// initialize vtable
ph->ops = &process_ops;
// read library info and symbol tables, must do this before attaching threads,
// as the symbols in the pthread library will be used to figure out
// the list of threads within the same process.
if (read_lib_info(ph) != true) {
ptrace_detach(pid);
free(ph);
return NULL;
}
// read thread info
read_thread_info(ph, add_new_thread);
return ph;
}

View File

@@ -0,0 +1,126 @@
/*
* Copyright (c) 2003, 2006, 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.
*
*/
#include "salibelf.h"
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
extern void print_debug(const char*,...);
// ELF file parsing helpers. Note that we do *not* use libelf here.
int read_elf_header(int fd, ELF_EHDR* ehdr) {
if (pread(fd, ehdr, sizeof (ELF_EHDR), 0) != sizeof (ELF_EHDR) ||
memcmp(&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG) != 0 ||
ehdr->e_version != EV_CURRENT) {
return 0;
}
return 1;
}
bool is_elf_file(int fd) {
ELF_EHDR ehdr;
return read_elf_header(fd, &ehdr);
}
// read program header table of an ELF file
ELF_PHDR* read_program_header_table(int fd, ELF_EHDR* hdr) {
ELF_PHDR* phbuf = 0;
// allocate memory for program header table
size_t nbytes = hdr->e_phnum * hdr->e_phentsize;
if ((phbuf = (ELF_PHDR*) malloc(nbytes)) == NULL) {
print_debug("can't allocate memory for reading program header table\n");
return NULL;
}
if (pread(fd, phbuf, nbytes, hdr->e_phoff) != nbytes) {
print_debug("ELF file is truncated! can't read program header table\n");
free(phbuf);
return NULL;
}
return phbuf;
}
// read section header table of an ELF file
ELF_SHDR* read_section_header_table(int fd, ELF_EHDR* hdr) {
ELF_SHDR* shbuf = 0;
// allocate memory for section header table
size_t nbytes = hdr->e_shnum * hdr->e_shentsize;
if ((shbuf = (ELF_SHDR*) malloc(nbytes)) == NULL) {
print_debug("can't allocate memory for reading section header table\n");
return NULL;
}
if (pread(fd, shbuf, nbytes, hdr->e_shoff) != nbytes) {
print_debug("ELF file is truncated! can't read section header table\n");
free(shbuf);
return NULL;
}
return shbuf;
}
// read a particular section's data
void* read_section_data(int fd, ELF_EHDR* ehdr, ELF_SHDR* shdr) {
void *buf = NULL;
if (shdr->sh_type == SHT_NOBITS || shdr->sh_size == 0) {
return buf;
}
if ((buf = calloc(shdr->sh_size, 1)) == NULL) {
print_debug("can't allocate memory for reading section data\n");
return NULL;
}
if (pread(fd, buf, shdr->sh_size, shdr->sh_offset) != shdr->sh_size) {
free(buf);
print_debug("section data read failed\n");
return NULL;
}
return buf;
}
uintptr_t find_base_address(int fd, ELF_EHDR* ehdr) {
uintptr_t baseaddr = (uintptr_t)-1;
int cnt;
ELF_PHDR *phbuf, *phdr;
// read program header table
if ((phbuf = read_program_header_table(fd, ehdr)) == NULL) {
goto quit;
}
// the base address of a shared object is the lowest vaddr of
// its loadable segments (PT_LOAD)
for (phdr = phbuf, cnt = 0; cnt < ehdr->e_phnum; cnt++, phdr++) {
if (phdr->p_type == PT_LOAD && phdr->p_vaddr < baseaddr) {
baseaddr = phdr->p_vaddr;
}
}
quit:
if (phbuf) free(phbuf);
return baseaddr;
}

View File

@@ -0,0 +1,52 @@
/*
* Copyright (c) 2003, 2005, 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.
*
*/
#ifndef _SALIBELF_H_
#define _SALIBELF_H_
#include <elf.h>
#include "elfmacros.h"
#include "libproc_impl.h"
// read ELF file header.
int read_elf_header(int fd, ELF_EHDR* ehdr);
// is given file descriptor corresponds to an ELF file?
bool is_elf_file(int fd);
// read program header table of an ELF file. caller has to
// free the result pointer after use. NULL on failure.
ELF_PHDR* read_program_header_table(int fd, ELF_EHDR* hdr);
// read section header table of an ELF file. caller has to
// free the result pointer after use. NULL on failure.
ELF_SHDR* read_section_header_table(int fd, ELF_EHDR* hdr);
// read a particular section's data. caller has to free the
// result pointer after use. NULL on failure.
void* read_section_data(int fd, ELF_EHDR* ehdr, ELF_SHDR* shdr);
// find the base address at which the library wants to load itself
uintptr_t find_base_address(int fd, ELF_EHDR* ehdr);
#endif /* _SALIBELF_H_ */

View File

@@ -0,0 +1,249 @@
/*
* Copyright (c) 2003, 2010, 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.
*
*/
#include <unistd.h>
#include <search.h>
#include <stdlib.h>
#include <string.h>
#include <db.h>
#include <fcntl.h>
#include "symtab.h"
#include "salibelf.h"
// ----------------------------------------------------
// functions for symbol lookups
// ----------------------------------------------------
struct elf_section {
ELF_SHDR *c_shdr;
void *c_data;
};
struct elf_symbol {
char *name;
uintptr_t offset;
uintptr_t size;
};
typedef struct symtab {
char *strs;
size_t num_symbols;
struct elf_symbol *symbols;
DB* hash_table;
} symtab_t;
// read symbol table from given fd.
struct symtab* build_symtab(int fd) {
ELF_EHDR ehdr;
struct symtab* symtab = NULL;
// Reading of elf header
struct elf_section *scn_cache = NULL;
int cnt = 0;
ELF_SHDR* shbuf = NULL;
ELF_SHDR* cursct = NULL;
ELF_PHDR* phbuf = NULL;
int symtab_found = 0;
int dynsym_found = 0;
uint32_t symsection = SHT_SYMTAB;
uintptr_t baseaddr = (uintptr_t)-1;
lseek(fd, (off_t)0L, SEEK_SET);
if (! read_elf_header(fd, &ehdr)) {
// not an elf
return NULL;
}
// read ELF header
if ((shbuf = read_section_header_table(fd, &ehdr)) == NULL) {
goto quit;
}
baseaddr = find_base_address(fd, &ehdr);
scn_cache = calloc(ehdr.e_shnum, sizeof(*scn_cache));
if (scn_cache == NULL) {
goto quit;
}
for (cursct = shbuf, cnt = 0; cnt < ehdr.e_shnum; cnt++) {
scn_cache[cnt].c_shdr = cursct;
if (cursct->sh_type == SHT_SYMTAB ||
cursct->sh_type == SHT_STRTAB ||
cursct->sh_type == SHT_DYNSYM) {
if ( (scn_cache[cnt].c_data = read_section_data(fd, &ehdr, cursct)) == NULL) {
goto quit;
}
}
if (cursct->sh_type == SHT_SYMTAB)
symtab_found++;
if (cursct->sh_type == SHT_DYNSYM)
dynsym_found++;
cursct++;
}
if (!symtab_found && dynsym_found)
symsection = SHT_DYNSYM;
for (cnt = 1; cnt < ehdr.e_shnum; cnt++) {
ELF_SHDR *shdr = scn_cache[cnt].c_shdr;
if (shdr->sh_type == symsection) {
ELF_SYM *syms;
int j, n;
size_t size;
// FIXME: there could be multiple data buffers associated with the
// same ELF section. Here we can handle only one buffer. See man page
// for elf_getdata on Solaris.
// guarantee(symtab == NULL, "multiple symtab");
symtab = calloc(1, sizeof(*symtab));
if (symtab == NULL) {
goto quit;
}
// the symbol table
syms = (ELF_SYM *)scn_cache[cnt].c_data;
// number of symbols
n = shdr->sh_size / shdr->sh_entsize;
// create hash table, we use berkeley db to
// manipulate the hash table.
symtab->hash_table = dbopen(NULL, O_CREAT | O_RDWR, 0600, DB_HASH, NULL);
// guarantee(symtab->hash_table, "unexpected failure: dbopen");
if (symtab->hash_table == NULL)
goto bad;
// shdr->sh_link points to the section that contains the actual strings
// for symbol names. the st_name field in ELF_SYM is just the
// string table index. we make a copy of the string table so the
// strings will not be destroyed by elf_end.
size = scn_cache[shdr->sh_link].c_shdr->sh_size;
symtab->strs = malloc(size);
if (symtab->strs == NULL)
goto bad;
memcpy(symtab->strs, scn_cache[shdr->sh_link].c_data, size);
// allocate memory for storing symbol offset and size;
symtab->num_symbols = n;
symtab->symbols = calloc(n , sizeof(*symtab->symbols));
if (symtab->symbols == NULL)
goto bad;
// copy symbols info our symtab and enter them info the hash table
for (j = 0; j < n; j++, syms++) {
DBT key, value;
char *sym_name = symtab->strs + syms->st_name;
// skip non-object and non-function symbols
int st_type = ELF_ST_TYPE(syms->st_info);
if ( st_type != STT_FUNC && st_type != STT_OBJECT)
continue;
// skip empty strings and undefined symbols
if (*sym_name == '\0' || syms->st_shndx == SHN_UNDEF) continue;
symtab->symbols[j].name = sym_name;
symtab->symbols[j].offset = syms->st_value - baseaddr;
symtab->symbols[j].size = syms->st_size;
key.data = sym_name;
key.size = strlen(sym_name) + 1;
value.data = &(symtab->symbols[j]);
value.size = sizeof(void *);
(*symtab->hash_table->put)(symtab->hash_table, &key, &value, 0);
}
}
}
goto quit;
bad:
destroy_symtab(symtab);
symtab = NULL;
quit:
if (shbuf) free(shbuf);
if (phbuf) free(phbuf);
if (scn_cache) {
for (cnt = 0; cnt < ehdr.e_shnum; cnt++) {
if (scn_cache[cnt].c_data != NULL) {
free(scn_cache[cnt].c_data);
}
}
free(scn_cache);
}
return symtab;
}
void destroy_symtab(struct symtab* symtab) {
if (!symtab) return;
if (symtab->strs) free(symtab->strs);
if (symtab->symbols) free(symtab->symbols);
if (symtab->hash_table) {
(*symtab->hash_table->close)(symtab->hash_table);
}
free(symtab);
}
uintptr_t search_symbol(struct symtab* symtab, uintptr_t base,
const char *sym_name, int *sym_size) {
DBT key, value;
int ret;
// library does not have symbol table
if (!symtab || !symtab->hash_table)
return 0;
key.data = (char*)(uintptr_t)sym_name;
key.size = strlen(sym_name) + 1;
ret = (*symtab->hash_table->get)(symtab->hash_table, &key, &value, 0);
if (ret == 0) {
struct elf_symbol *sym = value.data;
uintptr_t rslt = (uintptr_t) ((char*)base + sym->offset);
if (sym_size) *sym_size = sym->size;
return rslt;
}
return 0;
}
const char* nearest_symbol(struct symtab* symtab, uintptr_t offset,
uintptr_t* poffset) {
int n = 0;
if (!symtab) return NULL;
for (; n < symtab->num_symbols; n++) {
struct elf_symbol* sym = &(symtab->symbols[n]);
if (sym->name != NULL &&
offset >= sym->offset && offset < sym->offset + sym->size) {
if (poffset) *poffset = (offset - sym->offset);
return sym->name;
}
}
return NULL;
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright (c) 2003, 2010, 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.
*
*/
#ifndef _SYMTAB_H_
#define _SYMTAB_H_
#include <stdint.h>
// interface to manage ELF symbol tables
struct symtab;
// build symbol table for a given ELF file descriptor
struct symtab* build_symtab(int fd);
// destroy the symbol table
void destroy_symtab(struct symtab* symtab);
// search for symbol in the given symbol table. Adds offset
// to the base uintptr_t supplied. Returns NULL if not found.
uintptr_t search_symbol(struct symtab* symtab, uintptr_t base,
const char *sym_name, int *sym_size);
// look for nearest symbol for a given offset (not address - base
// subtraction done by caller
const char* nearest_symbol(struct symtab* symtab, uintptr_t offset,
uintptr_t* poffset);
#endif /*_SYMTAB_H_*/

View File

@@ -0,0 +1,59 @@
/*
* Copyright (c) 2003, 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.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include "libproc.h"
int main(int argc, char** argv) {
struct ps_prochandle* ph;
init_libproc(true);
switch (argc) {
case 2: {
// process
ph = Pgrab(atoi(argv[1]));
break;
}
case 3: {
// core
ph = Pgrab_core(argv[1], argv[2]);
break;
}
default: {
fprintf(stderr, "usage %s <pid> or %s <exec file> <core file>\n", argv[0], argv[0]);
return 1;
}
}
if (ph) {
Prelease(ph);
return 0;
} else {
printf("can't connect to debuggee\n");
return 1;
}
}

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
# 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
@@ -40,7 +40,7 @@ OBJS = $(SOURCES:.c=.o)
LIBS = -lthread_db
CFLAGS = -c -fPIC -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES)
CFLAGS = -c -fPIC -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) -D_FILE_OFFSET_BITS=64
LIBSA = $(ARCH)/libsaproc.so

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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
@@ -50,10 +50,6 @@ int pathmap_open(const char* name) {
char alt_path[PATH_MAX + 1];
init_alt_root();
fd = open(name, O_RDONLY);
if (fd >= 0) {
return fd;
}
if (alt_root_len > 0) {
strcpy(alt_path, alt_root);
@@ -73,6 +69,11 @@ int pathmap_open(const char* name) {
return fd;
}
}
} else {
fd = open(name, O_RDONLY);
if (fd >= 0) {
return fd;
}
}
return -1;

View File

@@ -24,9 +24,7 @@
all:
cd dbx; $(MAKE) all
cd proc; $(MAKE) all
clean:
cd dbx; $(MAKE) clean
cd proc; $(MAKE) clean

View File

@@ -1,91 +0,0 @@
#
# Copyright (c) 2000, 2003, 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.
#
#
# Targets are:
# 32bit: Build the 32 bit version in ./32bit
# 64bit: Build the 64 bit version in ./64bit
# helloWorld: Build the helloWorld test program
# all: Build all of the above. This is the default.
#
# NOTE: This makefile uses IOBuf.cpp, IOBuf.hpp, Buffer.cpp, and
# Buffer.hpp from the src/os/win32/agent directory.
.PHONY: 32bit 64bit
ARCH_ORIG = $(shell uname -p)
# C++ := /java/devtools/$(ARCH_ORIG)/SUNWspro/SC6.1/bin/CC
C++ := CC
RM := /usr/bin/rm
MKDIRS := /usr/bin/mkdir -p
WIN32_DIR := ../../win32
ARCH := $(subst i386,i486,$(ARCH_ORIG))
# INCLUDES := -I/net/sparcworks.eng/export/set/sparcworks5/dbx_62_intg/dev/src/dbx -I$(WIN32_DIR)
INCLUDES := -I. -I$(WIN32_DIR)
CFLAGS_32bit := -xarch=v8
CFLAGS_64bit := -xarch=v9
CFLAGS := -PIC -xO3 $(INCLUDES)
LIBS := -lsocket -lnsl -lrtld_db
LDFLAGS := -G
ifneq "$(ARCH)" "i486"
CFLAGS += $(CFLAGS_$(VERSION))
LDFLAGS += $(CFLAGS_$(VERSION))
endif
# We use IOBuf.hpp, IOBuf.cpp, Buffer.hpp, and Buffer.cpp from the win32 dir.
vpath %.cpp .:$(WIN32_DIR)
vpath %.hpp .:$(WIN32_DIR)
OBJS = $(VERSION)/svc_agent_dbx.o $(VERSION)/IOBuf.o $(VERSION)/Buffer.o
# The default is to make both 32 bit and 64 bit versions.
all:: 32bit 64bit
32bit 64bit::
$(MKDIRS) $@
$(MAKE) $@/libsvc_agent_dbx.so helloWorld VERSION=$@
$(VERSION)/IOBuf.o: IOBuf.hpp
$(VERSION)/Buffer.o: Buffer.hpp
$(VERSION)/svc_agent_dbx.o: svc_agent_dbx.hpp
$(VERSION)/%.o: %.cpp
$(C++) $(CFLAGS) -c $< -o $@
$(VERSION)/libsvc_agent_dbx.so:: $(OBJS)
$(C++) $(LDFLAGS) -o $(VERSION)/libsvc_agent_dbx.so $(OBJS) $(LIBS)
# Would be nice to move this into a shared directory
helloWorld:: helloWorld.cpp
$(C++) -g $< -o $@
clean::
$(RM) -rf 32bit 64bit *.o helloWorld

View File

@@ -1,9 +0,0 @@
shell_impl.h
proc_service_2.h
The above files are captured from the dbx build environment.
Rather then use a -I that points to stuff in .eng domain that
may not be accessible in other domains these files are just
copied here so local builds in other domains will work.
These files rarely change so the fact that we might have to
strobe in new ones on rare occasions is no big deal.

View File

@@ -1,82 +0,0 @@
This import module uses a largely text-based protocol, except for
certain bulk data transfer operations. All text is in single-byte
US-ASCII.
Commands understood:
address_size ::= <int result>
Returns 32 if attached to 32-bit process, 64 if 64-bit.
peek_fail_fast <bool arg> ::=
Indicates whether "peek" requests should "fail fast"; that is, if
any of the addresses in the requested range are unmapped, report
the entire range as unmapped. This is substantially faster than
the alternative, which is to read the entire range byte-by-byte.
However, it should only be used when it is guaranteed by the
client application that peeks come from at most one page. The
default is that peek_fast_fail is not enabled.
peek <address addr> <unsigned int numBytes> ::=
B<binary char success>
[<binary unsigned int len> <binary char isMapped> [<binary char data>]...]...
NOTE that the binary portion of this message is prefixed by the
uppercase US-ASCII letter 'B', allowing easier synchronization by
clients. There is no data between the 'B' and the rest of the
message.
May only be called once attached. Reads the address space of the
target process starting at the given address (see below for format
specifications) and extending the given number of bytes. Whether
the read succeeded is indicated by a single byte containing a 1 or
0 (success or failure). If successful, the return result is given
in a sequence of ranges. _len_, the length of each range, is
indicated by a 32-bit unsigned integer transmitted with big-endian
byte ordering (i.e., most significant byte first). _isMapped_
indicates whether the range is mapped or unmapped in the target
process's address space, and will contain the value 1 or 0 for
mapped or unmapped, respectively. If the range is mapped,
_isMapped_ is followed by _data_, containing the raw binary data
for the range. The sum of all ranges' lengths is guaranteed to be
equivalent to the number of bytes requested.
poke <address addr> <int numBytes> B[<binary char data>]... ::= <bool result>
NOTE that the binary portion of this message is prefixed by the
uppercase US-ASCII letter 'B', allowing easier synchronization by
clients. There is no data between the 'B' and the rest of the
message.
Writes the given data to the target process starting at the given
address. Returns 1 on success, 0 on failure (i.e., one or more of
target addresses were unmapped).
mapped <address addr> <int numBytes> ::= <bool result>
Returns 1 if entire address range [address...address + int arg) is
mapped in target process's address space, 0 if not
lookup <symbol objName> <symbol sym> ::= <address addr>
First symbol is object name; second is symbol to be looked up.
Looks up symbol in target process's symbol table and returns
address. Returns NULL (0x0) if symbol is not found.
thr_gregs <int tid> ::= <int numAddresses> <address...>
Fetch the "general" (integer) register set for the given thread.
Returned as a series of hexidecimal values. NOTE: the meaning of
the return value is architecture-dependent. In general it is the
contents of the prgregset_t.
exit ::=
Exits the serviceability agent dbx module, returning control to
the dbx prompt.
// Data formats and example values:
<address> ::= 0x12345678[9ABCDEF0] /* up to 64-bit hex value */
<unsigned int> ::= 5 /* up to 32-bit integer number; no leading sign */
<bool> ::= 1 /* ASCII '0' or '1' */

View File

@@ -1,59 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#include <stdio.h>
#include <inttypes.h>
extern "C" {
const char* helloWorldString = "Hello, world!";
// Do not change these values without changing TestDebugger.java as well
// FIXME: should make these jbyte, jshort, etc...
volatile int8_t testByte = 132;
volatile int16_t testShort = 27890;
volatile int32_t testInt = 1020304050;
volatile int64_t testLong = 102030405060708090LL;
volatile float testFloat = 35.4F;
volatile double testDouble = 1.23456789;
volatile int helloWorldTrigger = 0;
}
int
main(int, char**) {
while (1) {
while (helloWorldTrigger == 0) {
}
fprintf(stderr, "%s\n", helloWorldString);
fprintf(stderr, "testByte=%d\n", testByte);
fprintf(stderr, "testShort=%d\n", testShort);
fprintf(stderr, "testInt=%d\n", testInt);
fprintf(stderr, "testLong=%d\n", testLong);
fprintf(stderr, "testFloat=%d\n", testFloat);
fprintf(stderr, "testDouble=%d\n", testDouble);
while (helloWorldTrigger != 0) {
}
}
}

View File

@@ -1,172 +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.
*
*/
#ifndef _PROC_SERVICE_2_H
#define _PROC_SERVICE_2_H
/*
* Types, function definitions for the provider of services beyond
* proc_service. This interface will be used by import modules like
* BAT/prex, NEO debugger etc.
*/
/*
CCR info
Version history:
1.0 - Initial CCR release
1.1 - Changes for GLUE/neo.
New entry points ps_svnt_generic() and ps_svc_generic()
- New entry point ps_getpid()
Release information for automatic CCR updates:
BEGIN RELEASE NOTES: (signifies what gets put into CCR release notes)
1.2 - Changes to support Solaris 2.7
END RELEASE NOTES: (signifies what gets put into CCR release notes)
Following is used for CCR version number:
#define CCR_PROC_SERVICE_2_VERSION 1.2
*/
#include <proc_service.h>
#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
#endif
struct ps_loadobj {
int objfd; /* fd of the load object or executable
* -1 implies its not available.
* This file decriptor is live only during the
* particular call to ps_iter_f(). If you
* need it beyond that you need to dup() it.
*/
psaddr_t
text_base; /* address where text of loadobj was mapped */
psaddr_t
data_base; /* address where data of loadobj was mapped */
const char *objname; /* loadobj name */
};
typedef int ps_iter_f(const struct ps_prochandle *, const struct ps_loadobj *,
void *cd);
/*
* Returns the ps_prochandle for the current process under focus. Returns
* NULL if there is none.
*/
const struct ps_prochandle *
ps_get_prochandle(void);
/*
* Returns the ps_prochandle for the current process(allows core files to
* be specified) under focus. Returns NULL if there is none.
*/
const struct ps_prochandle *
ps_get_prochandle2(int cores_too);
/*
* Returns the pid of the process referred to by the ps_prochandle.
*
* 0 is returned in case the ps_prochandle is not valid or refers to dead
* process.
*
*/
pid_t
ps_getpid(const struct ps_prochandle *);
/*
* Iteration function that iterates over all load objects *and the
* executable*
*
* If the callback routine returns:
* 0 - continue processing link objects
* non zero - stop calling the callback function
*
*/
ps_err_e
ps_loadobj_iter(const struct ps_prochandle *, ps_iter_f *, void *clnt_data);
/*
* Address => function name mapping
*
* Given an address, returns a pointer to the function's
* linker name (null terminated).
*/
ps_err_e
ps_find_fun_name(const struct ps_prochandle *, psaddr_t addr,
const char **name);
/*
* Interface to LD_PRELOAD. LD_PRELOAD given library across the
* program 'exec'.
*
*/
/*
* Append/Prepend the 'lib' (has to be library name as understood by LD_PRELOAD)
* to the LD_PRELOAD variable setting to be used by the debugee
* Returns a cookie (in id).
*/
ps_err_e
ps_ld_preload_append(const char *lib, int *id);
ps_err_e
ps_ld_preload_prepend(const char *lib, int *id);
/*
* Remove the library associated with 'id' from the LD_PRELOAD setting.
*
*/
ps_err_e
ps_ld_preload_remove(int id);
#ifdef __cplusplus
}
#endif
/*
* The following are C++ only interfaces
*/
#ifdef __cplusplus
/*
* classes ServiceDbx and ServantDbx and defined in "gp_dbx_svc.h" which is
* accessed via CCR
*/
extern class ServantDbx *ps_svnt_generic();
extern class ServiceDbx *ps_svc_generic();
#endif
#endif /* _PROC_SERVICE_2_H */

View File

@@ -1,164 +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.
*
*/
#ifndef SHELL_IMP_H
#define SHELL_IMP_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
/*
CCR info
Vesrion history:
1.0 - Initial CCR release
Release information for automatic CCR updates:
BEGIN RELEASE NOTES: (signifies what gets put into CCR release notes)
1.1
- Entry points for va_list style msgs; new shell_imp_vmsg()
and shell_imp_verrmsg()
- shell_imp_env_checker() is now shell_imp_var_checker().
Also the var_checker callback gets passed interp.
1.2 - interposition framework (used by jdbx)
- access to input FILE pointer.
END RELEASE NOTES: (signifies what gets put into CCR release notes)
Following is used as a CCR version number:
#define CCR_SHELL_IMP_VERSION 1.1
*/
#include <stdarg.h>
#define SHELL_IMP_MAJOR 1
#define SHELL_IMP_MINOR 2
#define SHELL_IMP_FLAG_GLOB 0x1
#define SHELL_IMP_FLAG_ARGQ 0x2
typedef void *shell_imp_interp_t;
typedef void *shell_imp_command_t;
typedef int shell_imp_fun_t(shell_imp_interp_t, int, char **, void *);
int
shell_imp_init(
int, /* major version number */
int, /* minor version number */
shell_imp_interp_t, /* interpreter */
int, /* argc */
char *[] /* argv */
);
int
shell_imp_fini(shell_imp_interp_t);
shell_imp_command_t
shell_imp_define_command(char *, /* command name e.g. "tnf" */
shell_imp_fun_t *, /* callback function */
int, /* SHELL_IMP_FLAG_* bit vector */
void *, /* client_data Passed as last arg to
/* callback function */
char * /* help message, e.g. */
/* "enable the specified tnf probes" */
);
int
shell_imp_undefine_command(shell_imp_command_t);
int
shell_imp_var_checker(shell_imp_interp_t,
const char *, /* var name */
int (*)(shell_imp_interp_t, const char*) /* env checker */
);
int
shell_imp_execute(shell_imp_interp_t, const char *);
const char *
shell_imp_get_var(shell_imp_interp_t, const char *);
void
shell_imp_msg(shell_imp_interp_t, const char *, ...);
void
shell_imp_errmsg(shell_imp_interp_t, const char *, ...);
void
shell_imp_vmsg(shell_imp_interp_t, const char *, va_list);
void
shell_imp_verrmsg(shell_imp_interp_t, const char *, va_list);
/*
* Stuff added for 1.2
*/
struct shell_imp_interposition_info_t {
shell_imp_fun_t *
new_func;
void * new_client_data;
shell_imp_fun_t *
original_func;
void * original_client_data;
int original_flags;
};
typedef int shell_imp_dispatcher_t(shell_imp_interp_t, int, char **,
shell_imp_interposition_info_t *);
shell_imp_command_t
shell_imp_interpose(char *name,
shell_imp_fun_t *new_func,
int flags,
void *client_data,
char * description,
shell_imp_dispatcher_t *);
int shell_imp_uninterpose(shell_imp_command_t);
int
shell_imp_dispatch_interposition(shell_imp_interp_t,
shell_imp_interposition_info_t *,
int argc, char *argv[]);
int
shell_imp_dispatch_original(shell_imp_interp_t,
shell_imp_interposition_info_t *,
int argc, char *argv[]);
FILE *
shell_imp_cur_input(shell_imp_interp_t);
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,188 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#include "shell_imp.h"
#include "IOBuf.hpp"
#include <sys/time.h>
#include <thread_db.h>
typedef td_err_e td_init_fn_t();
typedef td_err_e td_ta_new_fn_t(struct ps_prochandle *, td_thragent_t **);
typedef td_err_e td_ta_delete_fn_t(td_thragent_t *);
typedef td_err_e td_ta_map_id2thr_fn_t(const td_thragent_t *, thread_t, td_thrhandle_t *);
typedef td_err_e td_thr_getgregs_fn_t(const td_thrhandle_t *, prgregset_t);
class ServiceabilityAgentDbxModule {
public:
ServiceabilityAgentDbxModule(int major, int minor,
shell_imp_interp_t interp, int argc, char *argv[]);
~ServiceabilityAgentDbxModule();
bool install();
bool uninstall();
/* This is invoked through the dbx command interpreter. It listens
on a socket for commands and does not return until it receives an
"exit" command. At that point control is returned to dbx's main
loop, at which point if the user sends an exit command to dbx's
shell the dbx process will exit. Returns true if completed
successfully, false if an error occurred while running (for
example, unable to bind listening socket). */
bool run();
private:
// This must be shared between the Java and C layers
static const int PORT = 21928;
// Command handlers
bool handleAddressSize(char* data);
bool handlePeekFailFast(char* data);
bool handlePeek(char* data);
bool handlePoke(char* data);
bool handleMapped(char* data);
bool handleLookup(char* data);
bool handleThrGRegs(char* data);
// Input routines
// May mutate addr argument even if result is false
bool scanAddress(char** data, psaddr_t* addr);
// May mutate num argument even if result is false
bool scanUnsignedInt(char** data, unsigned int* num);
// Returns NULL if error occurred while scanning. Otherwise, returns
// newly-allocated character array which must be freed with delete[].
char* scanSymbol(char** data);
// Helper routine: converts ASCII to 4-bit integer. Returns true if
// character is in range, false otherwise.
bool charToNibble(char ascii, int* value);
// Output routines
// Writes an int with no leading or trailing spaces
bool writeInt(int val, int fd);
// Writes an address in hex format with no leading or trailing
// spaces
bool writeAddress(psaddr_t addr, int fd);
// Writes a register in hex format with no leading or trailing
// spaces (addresses and registers might be of different size)
bool writeRegister(prgreg_t reg, int fd);
// Writes a space to given file descriptor
bool writeSpace(int fd);
// Writes carriage return to given file descriptor
bool writeCR(int fd);
// Writes a bool as [0|1]
bool writeBoolAsInt(bool val, int fd);
// Helper routine: converts low 4 bits to ASCII [0..9][A..F]
char nibbleToChar(unsigned char nibble);
// Base routine called by most of the above
bool writeString(const char* str, int fd);
// Writes a binary character
bool writeBinChar(char val, int fd);
// Writes a binary unsigned int in network (big-endian) byte order
bool writeBinUnsignedInt(unsigned int val, int fd);
// Writes a binary buffer
bool writeBinBuf(char* buf, int size, int fd);
// Routine to flush the socket
bool flush(int client_socket);
void cleanup(int client_socket);
// The shell interpreter on which we can invoke commands (?)
shell_imp_interp_t _interp;
// The "command line" arguments passed to us by dbx (?)
int _argc;
char **_argv;
// The installed command in the dbx shell
shell_imp_command_t _command;
// Access to libthread_db (dlsym'ed to be able to pick up the
// version loaded by dbx)
td_init_fn_t* td_init_fn;
td_ta_new_fn_t* td_ta_new_fn;
td_ta_delete_fn_t* td_ta_delete_fn;
td_ta_map_id2thr_fn_t* td_ta_map_id2thr_fn;
td_thr_getgregs_fn_t* td_thr_getgregs_fn;
// Our "thread agent" -- access to libthread_db
td_thragent_t* _tdb_agent;
// Path to libthread.so in target process; free with delete[]
char* libThreadName;
// Handle to dlopen'ed libthread_db.so
void* libThreadDB;
// Helper callback for finding libthread_db.so
friend int findLibThreadCB(const rd_loadobj_t* lo, void* data);
// Support for reading C strings out of the target process (so we
// can find the correct libthread_db). Returns newly-allocated char*
// which must be freed with delete[], or null if the read failed.
char* readCStringFromProcess(psaddr_t addr);
IOBuf myComm;
// Output buffer support (used by writeString, writeChar, flush)
char* output_buffer;
int output_buffer_size;
int output_buffer_pos;
// "Fail fast" flag
bool peek_fail_fast;
// Commands
static const char* CMD_ADDRESS_SIZE;
static const char* CMD_PEEK_FAIL_FAST;
static const char* CMD_PEEK;
static const char* CMD_POKE;
static const char* CMD_MAPPED;
static const char* CMD_LOOKUP;
static const char* CMD_THR_GREGS;
static const char* CMD_EXIT;
};
// For profiling. Times reported are in milliseconds.
class Timer {
public:
Timer();
~Timer();
void start();
void stop();
long total();
long average();
void reset();
private:
struct timeval startTime;
long long totalMicroseconds; // stored internally in microseconds
int counter;
long long timevalDiff(struct timeval* startTime, struct timeval* endTime);
};

View File

@@ -1,66 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#ifndef _BASIC_LIST_
#define _BASIC_LIST_
#include <vector>
template<class T>
class BasicList {
protected:
typedef std::vector<T> InternalListType;
InternalListType internalList;
public:
BasicList() {
}
virtual ~BasicList() {
}
void add(T arg) {
internalList.push_back(arg);
}
bool remove(T arg) {
for (InternalListType::iterator iter = internalList.begin();
iter != internalList.end(); iter++) {
if (*iter == arg) {
internalList.erase(iter);
return true;
}
}
return false;
}
int size() {
return internalList.size();
}
T get(int index) {
return internalList[index];
}
};
#endif // #defined _BASIC_LIST_

View File

@@ -1,110 +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.
*
*/
#include "Buffer.hpp"
#include <string.h>
Buffer::Buffer(int bufSize) {
buf = new char[bufSize];
sz = bufSize;
fill = 0;
drain = 0;
}
Buffer::~Buffer() {
delete[] buf;
}
char*
Buffer::fillPos() {
return buf + fill;
}
int
Buffer::remaining() {
return sz - fill;
}
int
Buffer::size() {
return sz;
}
bool
Buffer::incrFillPos(int amt) {
if (fill + amt >= sz) {
return false;
}
fill += amt;
return true;
}
int
Buffer::readByte() {
if (drain < fill) {
return buf[drain++] & 0xFF;
} else {
return -1;
}
}
int
Buffer::readBytes(char* data, int len) {
int numRead = 0;
while (numRead < len) {
int c = readByte();
if (c < 0) break;
data[numRead++] = (char) c;
}
return numRead;
}
char*
Buffer::drainPos() {
return buf + drain;
}
int
Buffer::drainRemaining() {
return fill - drain;
}
bool
Buffer::incrDrainPos(int amt) {
if (drainRemaining() < amt) {
return false;
}
drain += amt;
return true;
}
void
Buffer::compact() {
// Copy down data
memmove(buf, buf + drain, fill - drain);
// Adjust positions
fill -= drain;
drain = 0;
}

View File

@@ -1,68 +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.
*
*/
#ifndef _BUFFER_
#define _BUFFER_
// A Buffer is the backing store for the IOBuf abstraction and
// supports producer-consumer filling and draining.
class Buffer {
public:
Buffer(int bufSize);
~Buffer();
char* fillPos(); // Position of the place where buffer should be filled
int remaining(); // Number of bytes that can be placed starting at fillPos
int size(); // Size of the buffer
// Move up fill position by amount (decreases remaining()); returns
// false if not enough space
bool incrFillPos(int amt);
// Read single byte (0..255); returns -1 if no data available.
int readByte();
// Read multiple bytes, non-blocking (this buffer does not define a
// fill mechanism), into provided buffer. Returns number of bytes read.
int readBytes(char* buf, int len);
// Access to drain position. Be very careful using this.
char* drainPos();
int drainRemaining();
bool incrDrainPos(int amt);
// Compact buffer, removing already-consumed input. This must be
// called periodically to yield the illusion of an infinite buffer.
void compact();
private:
Buffer(const Buffer&);
Buffer& operator=(const Buffer&);
char* buf;
int sz;
int fill;
int drain;
};
#endif // #defined _BUFFER_

View File

@@ -1,115 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#include <stdio.h>
#include <string.h>
#include "dispatcher.hpp"
const char* CMD_ASCII = "ascii";
const char* CMD_UNICODE = "unicode";
const char* CMD_PROCLIST = "proclist";
const char* CMD_ATTACH = "attach";
const char* CMD_DETACH = "detach";
const char* CMD_LIBINFO = "libinfo";
const char* CMD_PEEK = "peek";
const char* CMD_POKE = "poke";
const char* CMD_THREADLIST = "threadlist";
const char* CMD_DUPHANDLE = "duphandle";
const char* CMD_CLOSEHANDLE = "closehandle";
const char* CMD_GETCONTEXT = "getcontext";
const char* CMD_SETCONTEXT = "setcontext";
const char* CMD_SELECTORENTRY = "selectorentry";
const char* CMD_SUSPEND = "suspend";
const char* CMD_RESUME = "resume";
const char* CMD_POLLEVENT = "pollevent";
const char* CMD_CONTINUEEVENT = "continueevent";
const char* CMD_EXIT = "exit";
// Uncomment the #define below to get messages on stderr
// #define DEBUGGING
void
Dispatcher::dispatch(char* cmd, Handler* handler) {
if (!strncmp(cmd, CMD_ASCII, strlen(CMD_ASCII))) {
handler->ascii(cmd + strlen(CMD_ASCII));
} else if (!strncmp(cmd, CMD_UNICODE, strlen(CMD_UNICODE))) {
handler->unicode(cmd + strlen(CMD_UNICODE));
} else if (!strncmp(cmd, CMD_PROCLIST, strlen(CMD_PROCLIST))) {
handler->procList(cmd + strlen(CMD_PROCLIST));
} else if (!strncmp(cmd, CMD_ATTACH, strlen(CMD_ATTACH))) {
handler->attach(cmd + strlen(CMD_ATTACH));
} else if (!strncmp(cmd, CMD_DETACH, strlen(CMD_DETACH))) {
handler->detach(cmd + strlen(CMD_DETACH));
} else if (!strncmp(cmd, CMD_LIBINFO, strlen(CMD_LIBINFO))) {
handler->libInfo(cmd + strlen(CMD_LIBINFO));
} else if (!strncmp(cmd, CMD_PEEK, strlen(CMD_PEEK))) {
handler->peek(cmd + strlen(CMD_PEEK));
} else if (!strncmp(cmd, CMD_POKE, strlen(CMD_POKE))) {
handler->poke(cmd + strlen(CMD_POKE));
} else if (!strncmp(cmd, CMD_THREADLIST, strlen(CMD_THREADLIST))) {
handler->threadList(cmd + strlen(CMD_THREADLIST));
} else if (!strncmp(cmd, CMD_DUPHANDLE, strlen(CMD_DUPHANDLE))) {
handler->dupHandle(cmd + strlen(CMD_DUPHANDLE));
} else if (!strncmp(cmd, CMD_CLOSEHANDLE, strlen(CMD_CLOSEHANDLE))) {
handler->closeHandle(cmd + strlen(CMD_CLOSEHANDLE));
} else if (!strncmp(cmd, CMD_GETCONTEXT, strlen(CMD_GETCONTEXT))) {
handler->getContext(cmd + strlen(CMD_GETCONTEXT));
} else if (!strncmp(cmd, CMD_SETCONTEXT, strlen(CMD_SETCONTEXT))) {
handler->setContext(cmd + strlen(CMD_SETCONTEXT));
} else if (!strncmp(cmd, CMD_SELECTORENTRY, strlen(CMD_SELECTORENTRY))) {
handler->selectorEntry(cmd + strlen(CMD_SELECTORENTRY));
} else if (!strncmp(cmd, CMD_SUSPEND, strlen(CMD_SUSPEND))) {
handler->suspend(cmd + strlen(CMD_SUSPEND));
} else if (!strncmp(cmd, CMD_RESUME, strlen(CMD_RESUME))) {
handler->resume(cmd + strlen(CMD_RESUME));
} else if (!strncmp(cmd, CMD_POLLEVENT, strlen(CMD_POLLEVENT))) {
handler->pollEvent(cmd + strlen(CMD_POLLEVENT));
} else if (!strncmp(cmd, CMD_CONTINUEEVENT, strlen(CMD_CONTINUEEVENT))) {
handler->continueEvent(cmd + strlen(CMD_CONTINUEEVENT));
} else if (!strcmp(cmd, CMD_EXIT)) {
handler->exit(cmd + strlen(CMD_EXIT));
}
#ifdef DEBUGGING
else fprintf(stderr, "Ignoring illegal command \"%s\"\n", cmd);
#endif
}

View File

@@ -1,38 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#ifndef _DISPATCHER_
#define _DISPATCHER_
#include "Handler.hpp"
/** This class understands the commands supported by the system and
calls the appropriate handler routines. */
class Dispatcher {
public:
static void dispatch(char* cmd, Handler* handler);
};
#endif // #defined _DISPATCHER_

View File

@@ -1,53 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#ifndef _HANDLER_
#define _HANDLER_
/** An abstract base class encapsulating the handlers for all commands
understood by the system. */
class Handler {
public:
virtual void ascii(char* arg) = 0;
virtual void unicode(char* arg) = 0;
virtual void procList(char* arg) = 0;
virtual void attach(char* arg) = 0;
virtual void detach(char* arg) = 0;
virtual void libInfo(char* arg) = 0;
virtual void peek(char* arg) = 0;
virtual void poke(char* arg) = 0;
virtual void threadList(char* arg) = 0;
virtual void dupHandle(char* arg) = 0;
virtual void closeHandle(char* arg) = 0;
virtual void getContext(char* arg) = 0;
virtual void setContext(char* arg) = 0;
virtual void selectorEntry(char* arg) = 0;
virtual void suspend(char* arg) = 0;
virtual void resume(char* arg) = 0;
virtual void pollEvent(char* arg) = 0;
virtual void continueEvent(char* arg) = 0;
virtual void exit(char* arg) = 0;
};
#endif // #defined _HANDLER_

View File

@@ -1,490 +0,0 @@
/*
* Copyright (c) 2000, 2003, 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.
*
*/
#include <stdio.h>
// This file is currently used for os/solaris/agent too. At some point in time
// the source will be reorganized to avoid these ifdefs.
#ifdef __sun
#include <string.h>
#include <inttypes.h>
#include <sys/byteorder.h>
#endif
#include "IOBuf.hpp"
// Formats for printing pointers
#ifdef _LP64
# define INTPTR_FORMAT "0x%016lx"
#else /* ! _LP64 */
# define INTPTR_FORMAT "0x%08lx"
#endif /* _LP64 */
// Uncomment the #define below to get messages on stderr
// #define DEBUGGING
IOBuf::IOBuf(int inLen, int outLen) {
inBuf = new Buffer(inLen);
outBuf = new Buffer(outLen);
fd = INVALID_SOCKET;
outHandle = NULL;
usingSocket = true;
reset();
}
IOBuf::~IOBuf() {
delete inBuf;
delete outBuf;
}
void
IOBuf::setSocket(SOCKET sock) {
fd = sock;
usingSocket = true;
}
// Reading/writing files is only needed and used on windows.
#ifdef WIN32
void
IOBuf::setOutputFileHandle(HANDLE handle) {
outHandle = handle;
usingSocket = false;
}
#endif
void
IOBuf::reset() {
gotDataLastTime = false;
state = TEXT_STATE;
binPos = 0;
binLength = 0;
}
IOBuf::ReadLineResult
IOBuf::tryReadLine() {
return doReadLine(false);
}
char*
IOBuf::readLine() {
ReadLineResult rr = doReadLine(true);
if (rr != RL_GOT_DATA) {
return NULL;
}
return getLine();
}
IOBuf::ReadLineResult
IOBuf::doReadLine(bool shouldWait) {
if (!usingSocket) {
return IOBuf::RL_ERROR;
}
if (gotDataLastTime) {
curLine.clear();
}
int c;
do {
c = readChar(shouldWait);
if (c >= 0) {
Action act = processChar((char) c);
if (act == GOT_LINE) {
curLine.push_back('\0');
gotDataLastTime = true;
return IOBuf::RL_GOT_DATA;
} else if (act == SKIP_EOL_CHAR) {
// Do nothing
} else {
curLine.push_back((char) c);
}
}
} while (shouldWait || c >= 0);
gotDataLastTime = false;
return IOBuf::RL_NO_DATA;
}
bool
IOBuf::flushImpl(bool moreDataToCome) {
int numWritten = 0;
#ifdef WIN32
// When running on Windows and using IOBufs for inter-process
// communication, we need to write metadata into the stream
// indicating how many bytes are coming down. Five bytes are written
// per flush() call, four containing the integer number of bytes
// coming (not including the five-byte header) and one (a 0 or 1)
// indicating whether there is more data coming.
if (!usingSocket) {
int numToWrite = outBuf->drainRemaining();
char moreToCome = (moreDataToCome ? 1 : 0);
DWORD numBytesWritten;
if (!WriteFile(outHandle, &numToWrite, sizeof(int), &numBytesWritten, NULL)) {
return false;
}
if (numBytesWritten != sizeof(int)) {
return false;
}
if (!WriteFile(outHandle, &moreToCome, 1, &numBytesWritten, NULL)) {
return false;
}
if (numBytesWritten != 1) {
return false;
}
}
#endif
while (outBuf->drainRemaining() != 0) {
#ifdef DEBUGGING
fprintf(stderr, "Flushing %d bytes\n", outBuf->drainRemaining());
#endif
if (usingSocket) {
numWritten = send(fd, outBuf->drainPos(), outBuf->drainRemaining(), 0);
} else {
#ifdef WIN32
DWORD numBytesWritten;
if (!WriteFile(outHandle, outBuf->drainPos(), outBuf->drainRemaining(), &numBytesWritten, NULL)) {
numWritten = -1;
} else {
numWritten = numBytesWritten;
}
#endif
}
if (numWritten != -1) {
#ifdef DEBUGGING
fprintf(stderr, "Flushed %d bytes\n", numWritten);
#endif
outBuf->incrDrainPos(numWritten);
} else {
return false;
}
}
outBuf->compact();
return true;
}
int
IOBuf::readChar(bool block) {
do {
int c = inBuf->readByte();
if (c >= 0) {
return c;
}
// See whether we need to compact the input buffer
if (inBuf->remaining() < inBuf->size() / 2) {
inBuf->compact();
}
// See whether socket is ready
fd_set fds;
FD_ZERO(&fds);
FD_SET(fd, &fds);
struct timeval timeout;
timeout.tv_sec = 0;
timeout.tv_usec = 0;
if (block || select(1 + fd, &fds, NULL, NULL, &timeout) > 0) {
if (block || FD_ISSET(fd, &fds)) {
#ifdef DEBUGGING
int b = (block ? 1 : 0);
fprintf(stderr, "calling recv: block = %d\n", b);
#endif
// Read data from socket
int numRead = recv(fd, inBuf->fillPos(), inBuf->remaining(), 0);
if (numRead < 0) {
#ifdef DEBUGGING
fprintf(stderr, "recv failed\n");
#endif
return -1;
}
inBuf->incrFillPos(numRead);
}
}
} while (block);
return inBuf->readByte();
}
char*
IOBuf::getLine() {
#ifdef DEBUGGING
fprintf(stderr, "Returning (first 10 chars) \"%.10s\"\n", curLine.begin());
#endif
return curLine.begin();
}
bool
IOBuf::flush() {
return flushImpl(false);
}
bool
IOBuf::writeString(const char* str) {
int len = strlen(str);
if (len > outBuf->size()) {
return false;
}
if (len > outBuf->remaining()) {
if (!flushImpl(true)) {
return false;
}
}
// NOTE we do not copy the null terminator of the string.
strncpy(outBuf->fillPos(), str, len);
outBuf->incrFillPos(len);
return true;
}
bool
IOBuf::writeInt(int val) {
char buf[128];
sprintf(buf, "%d", val);
return writeString(buf);
}
bool
IOBuf::writeUnsignedInt(unsigned int val) {
char buf[128];
sprintf(buf, "%u", val);
return writeString(buf);
}
bool
IOBuf::writeBoolAsInt(bool val) {
if (val) {
return writeString("1");
} else {
return writeString("0");
}
}
bool
IOBuf::writeAddress(void* val) {
char buf[128];
sprintf(buf, INTPTR_FORMAT, val);
return writeString(buf);
}
bool
IOBuf::writeSpace() {
return writeString(" ");
}
bool
IOBuf::writeEOL() {
return writeString("\n\r");
}
bool
IOBuf::writeBinChar(char c) {
return writeBinBuf((char*) &c, sizeof(c));
}
bool
IOBuf::writeBinUnsignedShort(unsigned short i) {
i = htons(i);
return writeBinBuf((char*) &i, sizeof(i));
}
bool
IOBuf::writeBinUnsignedInt(unsigned int i) {
i = htonl(i);
return writeBinBuf((char*) &i, sizeof(i));
}
bool
IOBuf::writeBinBuf(char* buf, int size) {
while (size > 0) {
int spaceRemaining = outBuf->remaining();
if (spaceRemaining == 0) {
if (!flushImpl(true)) {
return false;
}
spaceRemaining = outBuf->remaining();
}
int toCopy = (size > spaceRemaining) ? spaceRemaining : size;
memcpy(outBuf->fillPos(), buf, toCopy);
outBuf->incrFillPos(toCopy);
buf += toCopy;
size -= toCopy;
if (size > 0) {
if (!flushImpl(true)) {
return false;
}
}
}
return true;
}
#ifdef WIN32
IOBuf::FillState
IOBuf::fillFromFileHandle(HANDLE fh, DWORD* numBytesRead) {
int totalToRead;
char moreToCome;
outBuf->compact();
DWORD numRead;
if (!ReadFile(fh, &totalToRead, sizeof(int), &numRead, NULL)) {
return FAILED;
}
if (numRead != sizeof(int)) {
return FAILED;
}
if (!ReadFile(fh, &moreToCome, 1, &numRead, NULL)) {
return FAILED;
}
if (numRead != 1) {
return FAILED;
}
if (outBuf->remaining() < totalToRead) {
return FAILED;
}
int tmp = totalToRead;
while (totalToRead > 0) {
if (!ReadFile(fh, outBuf->fillPos(), totalToRead, &numRead, NULL)) {
return FAILED;
}
outBuf->incrFillPos((int) numRead);
totalToRead -= numRead;
}
*numBytesRead = tmp;
return ((moreToCome == 0) ? DONE : MORE_DATA_PENDING);
}
#endif
bool
IOBuf::isBinEscapeChar(char c) {
return (c == '|');
}
IOBuf::Action
IOBuf::processChar(char c) {
Action action = NO_ACTION;
switch (state) {
case TEXT_STATE: {
// Looking for text char, bin escape char, or EOL
if (isBinEscapeChar(c)) {
#ifdef DEBUGGING
fprintf(stderr, "[a: '%c'] ", inBuf[0]);
#endif
binPos = 0;
#ifdef DEBUGGING
fprintf(stderr, "[b: '%c'] ", inBuf[0]);
#endif
binLength = 0;
#ifdef DEBUGGING
fprintf(stderr, "[c: '%c'] ", inBuf[0]);
#endif
state = BIN_STATE;
#ifdef DEBUGGING
fprintf(stderr, "[d: '%c'] ", inBuf[0]);
#endif
#ifdef DEBUGGING
fprintf(stderr, "\nSwitching to BIN_STATE\n");
#endif
} else if (isEOL(c)) {
state = EOL_STATE;
action = GOT_LINE;
#ifdef DEBUGGING
fprintf(stderr, "\nSwitching to EOL_STATE (GOT_LINE)\n");
#endif
}
#ifdef DEBUGGING
else {
fprintf(stderr, "'%c' ", c);
fflush(stderr);
}
#endif
break;
}
case BIN_STATE: {
// Seeking to finish read of input
if (binPos < 4) {
int cur = c & 0xFF;
binLength <<= 8;
binLength |= cur;
++binPos;
} else {
#ifdef DEBUGGING
fprintf(stderr, "Reading binary byte %d of %d\n",
binPos - 4, binLength);
#endif
++binPos;
if (binPos == 4 + binLength) {
state = TEXT_STATE;
#ifdef DEBUGGING
fprintf(stderr, "Switching to TEXT_STATE\n");
#endif
}
}
break;
}
case EOL_STATE: {
// More EOL characters just cause us to re-enter this state
if (isEOL(c)) {
action = SKIP_EOL_CHAR;
} else if (isBinEscapeChar(c)) {
binPos = 0;
binLength = 0;
state = BIN_STATE;
} else {
state = TEXT_STATE;
#ifdef DEBUGGING
fprintf(stderr, "'%c' ", c);
fflush(stderr);
#endif
}
break;
}
} // switch
return action;
}
bool
IOBuf::isEOL(char c) {
#ifdef WIN32
return ((c == '\n') || (c == '\r'));
#elif defined(__sun)
return c == '\n';
#else
#error Please port isEOL() to your platform
return false;
#endif
}

View File

@@ -1,222 +0,0 @@
/*
* Copyright (c) 2000, 2003, 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.
*
*/
#ifndef _IO_BUF_
#define _IO_BUF_
// This file is currently used for os/solaris/agent/ too. At some point in time
// the source will be reorganized to avoid these ifdefs.
// Note that this class can read/write from a file as well as a socket. This
// file capability is only implemented on win32.
#ifdef WIN32
#include <winsock2.h>
#else
#include <sys/types.h>
#include <sys/socket.h>
// These are from win32 winsock2.h
typedef unsigned int SOCKET;
typedef void * HANDLE;
typedef unsigned long DWORD;
#define INVALID_SOCKET (SOCKET)(~0)
#endif
#include <vector>
#include "Buffer.hpp"
/** Manages an input/output buffer pair for a socket or file handle. */
class IOBuf {
public:
IOBuf(int inBufLen, int outBufLen);
~IOBuf();
enum ReadLineResult {
RL_GOT_DATA,
RL_NO_DATA,
RL_ERROR
};
/** Change the socket with which this buffer is associated */
void setSocket(SOCKET sock);
// Reading/writing files is only supported on windows.
#ifdef WIN32
/** Change the output file handle with which this buffer is
associated. Currently IOBufs can not be used to read from a file
handle. */
void setOutputFileHandle(HANDLE handle);
#endif
/** Reset the input and output buffers, without flushing the output
data to the socket */
void reset();
/** Try to read a line of data from the given socket without
blocking. If was able to read a complete line of data, returns a
character pointer to the beginning of the (null-terminated)
string. If not, returns NULL, but maintains enough state that
subsequent calls to tryReadLine() will not ignore the data
already read. NOTE: this skips end-of-line characters (typically
CR/LF) as defined by "isEOL()". When switching back and forth
between binary and text modes, to be sure no data is lost, pad
the beginning and end of the binary transmission with bytes
which can not be confused with these characters. */
ReadLineResult tryReadLine();
/** Read a line of data from the given socket, blocking until a
line, including EOL, appears. Return the line, or NULL if
something goes wrong. */
char *readLine();
/** Get the pointer to the beginning of the (null-terminated) line.
This should only be called if tryReadLine() has returned
RL_GOT_DATA. This sets the "parsing cursor" to the beginning of
the line. */
char* getLine();
// NOTE: any further data-acquisition routines must ALWAYS call
// fixupData() at the beginning!
//----------------------------------------------------------------------
// Output routines
//
/** Flush the output buffer to the socket. Returns true if
succeeded, false if write error occurred. */
bool flush();
/** Write the given string to the output buffer. May flush if output
buffer becomes too full to store the data. Not guaranteed to
work if string is longer than the size of the output buffer.
Does not include the null terminator of the string. Returns true
if succeeded, false if write error occurred. */
bool writeString(const char* str);
/** Write the given int to the output buffer. May flush if output
buffer becomes too full to store the data. Returns true if
succeeded, false if write error occurred. */
bool writeInt(int val);
/** Write the given unsigned int to the output buffer. May flush if
output buffer becomes too full to store the data. Returns true
if succeeded, false if write error occurred. */
bool writeUnsignedInt(unsigned int val);
/** Write the given boolean to the output buffer. May flush if
output buffer becomes too full to store the data. Returns true
if succeeded, false if write error occurred. */
bool writeBoolAsInt(bool val);
/** Write the given address to the output buffer. May flush if
output buffer becomes too full to store the data. Returns true
if succeeded, false if write error occurred. */
bool writeAddress(void* val);
/** Writes a space to the output buffer. May flush if output buffer
becomes too full to store the data. Returns true if succeeded,
false if write error occurred. */
bool writeSpace();
/** Writes an end-of-line sequence to the output buffer. May flush
if output buffer becomes too full to store the data. Returns
true if succeeded, false if write error occurred. */
bool writeEOL();
/** Writes a binary character to the output buffer. */
bool writeBinChar(char c);
/** Writes a binary unsigned short in network (big-endian) byte
order to the output buffer. */
bool writeBinUnsignedShort(unsigned short i);
/** Writes a binary unsigned int in network (big-endian) byte order
to the output buffer. */
bool writeBinUnsignedInt(unsigned int i);
/** Writes a binary buffer to the output buffer. */
bool writeBinBuf(char* buf, int size);
#ifdef WIN32
enum FillState {
DONE = 1,
MORE_DATA_PENDING = 2,
FAILED = 3
};
/** Very specialized routine; fill the output buffer from the given
file handle. Caller is responsible for ensuring that there is
data to be read on the file handle. */
FillState fillFromFileHandle(HANDLE fh, DWORD* numRead);
#endif
/** Binary utility routine (for poke) */
static bool isBinEscapeChar(char c);
private:
IOBuf(const IOBuf&);
IOBuf& operator=(const IOBuf&);
// Returns -1 if non-blocking and no data available
int readChar(bool block);
// Line-oriented reading
std::vector<char> curLine;
bool gotDataLastTime;
ReadLineResult doReadLine(bool);
bool flushImpl(bool moreDataToCome);
SOCKET fd;
HANDLE outHandle;
bool usingSocket;
// Buffers
Buffer* inBuf;
Buffer* outBuf;
// Simple finite-state machine to handle binary data
enum State {
TEXT_STATE,
BIN_STATE,
EOL_STATE
};
enum Action {
NO_ACTION,
GOT_LINE, // TEXT_STATE -> EOL_STATE transition
SKIP_EOL_CHAR // EOL_STATE -> EOL_STATE transition
};
State state;
Action processChar(char c);
// Handling incoming binary buffers (poke command)
int binPos; // Number of binary characters read so far;
// total number to read is binLength + 4
int binLength; // Number of binary characters in message;
// not valid until binPos >= 4
bool isEOL(char c);
};
#endif // #defined _IO_BUF_

View File

@@ -1,54 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#ifndef _LOCKABLE_LIST_
#define _LOCKABLE_LIST_
#include <windows.h>
#include "BasicList.hpp"
template<class T>
class LockableList : public BasicList<T> {
private:
CRITICAL_SECTION crit;
public:
LockableList() {
InitializeCriticalSection(&crit);
}
~LockableList() {
DeleteCriticalSection(&crit);
}
void lock() {
EnterCriticalSection(&crit);
}
void unlock() {
LeaveCriticalSection(&crit);
}
};
#endif // #defined _LOCKABLE_LIST_

View File

@@ -1,80 +0,0 @@
#
# Copyright (c) 2000, 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.
#
#
SERVER=SwDbgSrv.exe
SUBPROCESS=SwDbgSub.exe
SERVER_SOURCES = \
Buffer.cpp \
Dispatcher.cpp \
initWinsock.cpp \
IOBuf.cpp \
ioUtils.cpp \
isNT4.cpp \
nt4internals.cpp \
procList.cpp \
Reaper.cpp \
SwDbgSrv.cpp \
serverLists.cpp \
toolHelp.cpp
SUBPROCESS_SOURCES = \
SwDbgSub.cpp \
Buffer.cpp \
IOBuf.cpp \
isNT4.cpp \
libInfo.cpp \
Monitor.cpp \
nt4internals.cpp \
toolHelp.cpp
SERVER_OBJS = $(SERVER_SOURCES:.cpp=.obj)
SUBPROCESS_OBJS = $(SUBPROCESS_SOURCES:.cpp=.obj)
CPP=cl.exe
LINK32=link.exe
# These do not need to be optimized (don't run a lot of code) and it
# will be useful to have the assertion checks in place
CFLAGS=/nologo /MD /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
LIBS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib \
odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386
default: $(SERVER) $(SUBPROCESS)
$(SERVER): $(SERVER_OBJS)
$(LINK32) /out:$@ $(SERVER_OBJS) $(LIBS)
$(SUBPROCESS): $(SUBPROCESS_OBJS)
$(LINK32) /out:$@ $(SUBPROCESS_OBJS) $(LIBS)
clean:
rm -f *.obj *.idb *.pch *.pdb *.ncb *.opt *.plg *.exe *.ilk
.cpp.obj:
@ $(CPP) $(CFLAGS) /o $@ $<

View File

@@ -1,123 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#ifndef _MESSAGE_
#define _MESSAGE_
// These are the commands sent from the server to the child processes
// over the child processes' stdin pipes. A subset of the commands
// understood by the overall system, these require responses from the
// child process. Having a data structure rather than sending text
// simplifies parsing on the child side. The child replies by sending
// back fully-formatted replies which are copied by the server process
// to the clients' sockets.
struct PeekArg {
DWORD address;
DWORD numBytes;
};
// NOTE: when sending a PokeArg to the child process, we handle the
// buffer specially
struct PokeArg {
DWORD address;
DWORD numBytes;
void* data;
};
// Used for continueevent
struct BoolArg {
bool val;
};
// Used for duphandle, closehandle, and getcontext
struct HandleArg {
HANDLE handle;
};
// Used for setcontext
const int NUM_REGS_IN_CONTEXT = 22;
struct SetContextArg {
HANDLE handle;
DWORD Eax;
DWORD Ebx;
DWORD Ecx;
DWORD Edx;
DWORD Esi;
DWORD Edi;
DWORD Ebp;
DWORD Esp;
DWORD Eip;
DWORD Ds;
DWORD Es;
DWORD Fs;
DWORD Gs;
DWORD Cs;
DWORD Ss;
DWORD EFlags;
DWORD Dr0;
DWORD Dr1;
DWORD Dr2;
DWORD Dr3;
DWORD Dr6;
DWORD Dr7;
};
// Used for selectorentry
struct SelectorEntryArg {
HANDLE handle;
DWORD selector;
};
struct Message {
typedef enum {
ATTACH,
DETACH,
LIBINFO,
PEEK,
POKE,
THREADLIST,
DUPHANDLE,
CLOSEHANDLE,
GETCONTEXT,
SETCONTEXT,
SELECTORENTRY,
SUSPEND,
RESUME,
POLLEVENT,
CONTINUEEVENT
} Type;
Type type;
union {
PeekArg peekArg;
PokeArg pokeArg;
BoolArg boolArg;
HandleArg handleArg;
SetContextArg setContextArg;
SelectorEntryArg selectorArg;
};
};
#endif // #defined _MESSAGE_

View File

@@ -1,176 +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.
*
*/
#include <stdio.h>
#include <assert.h>
#include "Monitor.hpp"
Monitor::Monitor() {
_lock_count = -1; // No threads have entered the critical section
_owner = NULL;
_lock_event = CreateEvent(NULL, false, false, NULL);
_wait_event = CreateEvent(NULL, true, false, NULL);
_counter = 0;
_tickets = 0;
_waiters = 0;
}
Monitor::~Monitor() {
assert(_owner == NULL); // Otherwise, owned monitor being deleted
assert(_lock_count == -1); // Otherwise, monitor being deleted with non -1 lock count
CloseHandle(_lock_event);
CloseHandle(_wait_event);
}
void
Monitor::lock() {
if (InterlockedIncrement(&_lock_count) == 0) {
// Success, we now own the lock
} else {
DWORD dwRet = WaitForSingleObject((HANDLE)_lock_event, INFINITE);
assert(dwRet == WAIT_OBJECT_0); // Unexpected return value from WaitForSingleObject
}
assert(owner() == NULL); // Otherwise, lock count and owner are inconsistent
setOwner(GetCurrentThread());
}
void
Monitor::unlock() {
setOwner(NULL);
if (InterlockedDecrement(&_lock_count) >= 0) {
// Wake a waiting thread up
DWORD dwRet = SetEvent(_lock_event);
assert(dwRet != 0); // Unexpected return value from SetEvent
}
}
bool
Monitor::wait(long timeout) {
assert(owner() != NULL);
assert(owner() == GetCurrentThread());
// 0 means forever. Convert to Windows specific code.
DWORD timeout_value = (timeout == 0) ? INFINITE : timeout;
DWORD which;
long c = _counter;
bool retry = false;
_waiters++;
// Loop until condition variable is signaled. The event object is
// set whenever the condition variable is signaled, and tickets will
// reflect the number of threads which have been notified. The counter
// field is used to make sure we don't respond to notifications that
// have occurred *before* we started waiting, and is incremented each
// time the condition variable is signaled.
while (true) {
// Leave critical region
unlock();
// If this is a retry, let other low-priority threads have a chance
// to run. Make sure that we sleep outside of the critical section.
if (retry) {
Sleep(1);
} else {
retry = true;
}
which = WaitForSingleObject(_wait_event, timeout_value);
// Enter critical section
lock();
if (_tickets != 0 && _counter != c) break;
if (which == WAIT_TIMEOUT) {
--_waiters;
return true;
}
}
_waiters--;
// If this was the last thread to be notified, then we need to reset
// the event object.
if (--_tickets == 0) {
ResetEvent(_wait_event);
}
return false;
}
// Notify a single thread waiting on this monitor
bool
Monitor::notify() {
assert(ownedBySelf()); // Otherwise, notify on unknown thread
if (_waiters > _tickets) {
if (!SetEvent(_wait_event)) {
return false;
}
_tickets++;
_counter++;
}
return true;
}
// Notify all threads waiting on this monitor
bool
Monitor::notifyAll() {
assert(ownedBySelf()); // Otherwise, notifyAll on unknown thread
if (_waiters > 0) {
if (!SetEvent(_wait_event)) {
return false;
}
_tickets = _waiters;
_counter++;
}
return true;
}
HANDLE
Monitor::owner() {
return _owner;
}
void
Monitor::setOwner(HANDLE owner) {
if (owner != NULL) {
assert(_owner == NULL); // Setting owner thread of already owned monitor
assert(owner == GetCurrentThread()); // Else should not be doing this
} else {
HANDLE oldOwner = _owner;
assert(oldOwner != NULL); // Removing the owner thread of an unowned mutex
assert(oldOwner == GetCurrentThread());
}
_owner = owner;
}
bool
Monitor::ownedBySelf() {
return (_owner == GetCurrentThread());
}

View File

@@ -1,58 +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.
*
*/
#ifndef _MONITOR_
#define _MONITOR_
#include <windows.h>
class Monitor {
public:
Monitor();
~Monitor();
void lock();
void unlock();
// Default time is forever (i.e, zero). Returns true if it times-out, otherwise
// false.
bool wait(long timeout = 0);
bool notify();
bool notifyAll();
private:
HANDLE owner();
void setOwner(HANDLE owner);
bool ownedBySelf();
HANDLE _owner;
long _lock_count;
HANDLE _lock_event; // Auto-reset event for blocking in lock()
HANDLE _wait_event; // Manual-reset event for notifications
long _counter; // Current number of notifications
long _waiters; // Number of threads waiting for notification
long _tickets; // Number of waiters to be notified
};
#endif // #defined _MONITOR_

View File

@@ -1,246 +0,0 @@
This debug server uses a largely text-based protocol, except for
certain bulk data transfer operations. All text is in single-byte
US-ASCII except for the strings returned in "proclist".
NOTE that the character '|' (vertical bar) is used as an escape
character to switch the incoming data stream to the debug server into
binary mode, so no text command may contain that character.
Commands understood:
ascii <EOL> ::=
Changes to ASCII mode. This affects all outgoing strings. At
startup the system is in unicode mode.
unicode <EOL> ::=
Changes to UNICODE mode. This affects all outgoing strings. This
is the default mode upon startup.
proclist <EOL> ::=
<int num> [<unsigned int pid> <int charSize> <int numChars> [<binary char_t name>]...]... <EOL>
Returns integer indicating number of processes to follow, followed
by (pid, name) pairs. Names are given by (charSize, numChars,
[char_t]...) tuples; charSize indicates the size of each character
in bytes, numChars the number of characters in the string, and
name the raw data for the string. Each individual character of the
string, if multi-byte, is transmitted in network byte order.
numChars and name are guaranteed to be separated by precisely one
US-ASCII space. If process list is not available because of
limitations of the underlying operating system, number of
processes returned is 0.
attach <int pid> <EOL> ::= <bool result> <EOL>
Attempts to attach to the specified process. Returns 1 if
successful, 0 if not. Will fail if already attached or if the
process ID does not exist. Attaching to a process causes the
process to be suspended.
detach <EOL> ::= <bool result> <EOL>
Detaches from the given process. Attaching and detaching multiple
times during a debugging session is allowed. Detaching causes the
process to resume execution.
libinfo <EOL> ::=
<int numLibs> [<int charSize> <int numChars> [<binary char_t name>]... <address baseAddr>]... <EOL>
May only be called once attached and the target process must be
suspended; otherwise, returns 0. Returns list of the full path
names of all of the loaded modules (including the executable
image) in the target process, as well as the base address at which
each module was relocated. See proclist for format of strings, but
NOTE that charSize is ALWAYS 1 for this particular routine,
regardless of the setting of ASCII/UNICODE.
peek <address addr> <unsigned int numBytes> <EOL> ::=
B<binary char success>
[<binary unsigned int len> <binary char isMapped> [<binary char data>]...]...
NOTE that the binary portion of this message is prefixed by the
uppercase US-ASCII letter 'B', allowing easier synchronization by
clients. There is no data between the 'B' and the rest of the
message.
May only be called once attached. Reads the address space of the
target process starting at the given address (see below for format
specifications) and extending the given number of bytes. Whether
the read succeeded is indicated by a single byte containing a 1 or
0 (success or failure). If successful, the return result is given
in a sequence of ranges. _len_, the length of each range, is
indicated by a 32-bit unsigned integer transmitted with big-endian
byte ordering (i.e., most significant byte first). _isMapped_
indicates whether the range is mapped or unmapped in the target
process's address space, and will contain the value 1 or 0 for
mapped or unmapped, respectively. If the range is mapped,
_isMapped_ is followed by _data_, containing the raw binary data
for the range. The sum of all ranges' lengths is guaranteed to be
equivalent to the number of bytes requested.
poke <address addr> |[<binary unsigned int len> [<binary char data>]] <EOL> ::=
<bool result> <EOL>
NOTE that the binary portion of this message is prefixed by the
uppercase US-ASCII character '|' (vertical bar), allowing easier
synchronization by the server. There is no data between the '|'
and the rest of the message. ('B' is not used here because
addresses can contain that letter; no alphanumeric characters are
used because some of the parsing routines are used by the Solaris
SA port, and in that port any alphanumeric character can show up
as a part of a symbol being looked up.)
May only be called once attached. Writes the address space of the
target process starting at the given address (see below for format
specifications), extending the given number of bytes, and
containing the given data. The number of bytes is a 32-bit
unsigned integer transmitted with big-endian byte ordering (i.e.,
most significant byte first). This is followed by the raw binary
data to be placed at that address. The number of bytes of data
must match the number of bytes specified in the message.
Returns true if the write succeeded; false if it failed, for
example because a portion of the region was not mapped in the
target address space.
threadlist <EOL> ::= <int numThreads> [<address threadHandle>...] <EOL>
May only be called once attached and the target process must be
suspended; otherwise, returns 0. If available, returns handles for
all of the threads in the target process. These handles may be
used as arguments to the getcontext and selectorentry
commands. They do not need to be (and should not be) duplicated
via the duphandle command and must not be closed via the
closehandle command.
duphandle <address handle> <EOL> ::=
<bool success> [<address duplicate>] <EOL>
Duplicates a HANDLE read from the target process's address space.
HANDLE is a Windows construct (typically typedef'd to void *).
The returned handle should ultimately be closed via the
closehandle command; failing to do so can cause resource leaks.
The purpose of this command is to allow the debugger to read the
value of a thread handle from the target process and query its
register set and thread selector entries via the getcontext and
selectorentry commands, below; such use implies that the target
program has its own notion of the thread list, and further, that
the debugger has a way of locating that thread list.
closehandle <address handle> <EOL> ::=
Closes a handle retrieved via the duphandle command, above.
getcontext <address threadHandle> <EOL> ::= <bool success> [<context>] <EOL>
Returns the context for the given thread. The handle must either
be one of the handles returned from the threadlist command or the
result of duplicating a thread handle out of the target process
via the duphandle command. The target process must be suspended.
The context is returned as a series of hex values which represent
the following x86 registers in the following order:
EAX, EBX, ECX, EDX, ESI, EDI, EBP, ESP, EIP, DS, ES, FS, GS,
CS, SS, EFLAGS, DR0, DR1, DR2, DR3, DR6, DR7
FIXME: needs to be generalized and/or specified for other
architectures.
setcontext <address threadHandle> <context> ::= <bool success> <EOL>
Sets the context of the given thread. The target process must be
suspended. See the getcontext command for the ordering of the
registers in the context.
Even if the setcontext command succeeds, some of the bits in some
of the registers (like the global enable bits in the debug
registers) may be overridden by the operating system. To ensure
the debugger's notion of the register set is up to date, it is
recommended to follow up a setcontext with a getcontext.
selectorentry <address threadHandle> <int selector> <EOL> ::=
<bool success>
[<address limitLow> <address baseLow>
<address baseMid> <address flags1>
<address flags2> <address baseHi>] <EOL>
Retrieves a descriptor table entry for the given thread and
selector. This data structure allows conversion of a
segment-relative address to a linear virtual address. It is most
useful for locating the Thread Information Block for a given
thread handle to be able to find that thread's ID, to be able to
understand whether two different thread handles in fact refer to
the same underlying thread.
This command will only work on the X86 architecture and will
return false for the success flag (with no additional information
sent) on other architectures.
suspend ::=
Suspends the target process. Must be attached to a target process.
A process is suspended when attached to via the attach command. If
the target process is already suspended then this command has no
effect.
resume ::=
Resumes the target process without detaching from it. Must be
attached to a target process. After resuming a target process, the
debugger client must be prepared to poll for events from the
target process fairly frequently in order for execution in the
target process to proceed normally. If the target process is
already resumed then this command has no effect.
pollevent ::=
<bool eventPresent> [<address threadHandle> <unsigned int eventCode>]
Additional entries in result for given eventCode:
LOAD/UNLOAD_DLL_DEBUG_EVENT: <address baseOfDLL>
EXCEPTION_DEBUG_EVENT: <unsigned int exceptionCode> <address faultingPC>
Additional entries for given exceptionCode:
EXCEPTION_ACCESS_VIOLATION: <bool wasWrite> <address faultingAddress>
<EOL>
Polls once to see whether a debug event has been generated by the
target process. If none is present, returns 0 immediately.
Otherwise, returns 1 along with a series of textual information
about the event. The event is not cleared, and the thread resumed,
until the continueevent command is sent, or the debugger client
detaches from the target process.
Typically a debugger client will suspend the target process upon
reception of a debug event. Otherwise, it is not guaranteed that
all threads will be suspended upon reception of a debug event, and
any operations requiring that threads be suspended (including
fetching the context for the thread which generated the event)
will fail.
continueevent <bool passEventToClient> ::= <bool success> <EOL>
Indicates that the current debug event has been used by the
debugger client and that the target process should be resumed. The
passEventToClient flag indicates whether the event should be
propagated to the target process. Breakpoint and single-step
events should not be propagated to the target. Returns false if
there was no pending event, true otherwise.
exit <EOL>
Exits this debugger session.
Format specifications:
// Data formats and example values:
<EOL> ::= end of line (typically \n on Unix platforms, or \n\r on Windows)
<address> ::= 0x12345678[9ABCDEF0] /* up to 64-bit hex value */
<unsigned int> ::= 5 /* up to 32-bit integer number; no leading sign */
<bool> ::= 1 /* ASCII '0' or '1' */
<context> ::= <address> ...

View File

@@ -1,64 +0,0 @@
This is a "Simple Windows Debug Server" written for the purpose of
enabling the Serviceability Agent on Win32. It has backends both for
Windows NT 4.0 (using internal Windows APIs for a few routines) as
well as for 95/98/ME/2000 via the Tool Help APIs.
The reason this debug server is necessary is that the Win32 debug APIs
by design tear down the target process when the debugger exits (see
knowledge base article Q164205 on msdn.microsoft.com). On Solaris, one
can attach to and detach from a process with no effect; this is key to
allowing dbx and gcore to work.
The Simple Windows Debug Server effectively implements attach/detach
functionality for arbitrary debug clients. This allows the SA to
attach non-destructively to a process, and will enable gcore for Win32
to be written shortly. While the debugger (the "client" in all of the
source code) is attached, the target process is suspended. (Note that
the debug server could be extended to support resumption of the target
process and transmission of debug events over to the debugger, but
this has been left for the future.)
The makefile (type "nmake") builds two executables: SwDbgSrv.exe,
which is the server process, and SwDbgSub.exe, which is forked by the
server and should not be directly invoked by the user.
The intent is that these two executables can be installed into
C:\WINNT\SYSTEM32 and SwDbgSrv installed to run as a service (on NT),
for example using ServiceInstaller (http://www.kcmultimedia.com/smaster/).
However, SwDbgSrv can also be run from the command line. It generates
no text output unless the source code is changed to enable debugging
printouts. As long as any processes which have been attached to by the
SA are alive, the SwDbgSrv and any forked SwDbgSub processes must be
left running. Terminating them will cause termination of the target
processes.
The debug server opens port 27000 and accepts incoming connections
from localhost only. The security model assumes that if one can run a
process on the given machine then one basically has access to most or
all of the machine's facilities; this seems to be in line with the
standard Windows security model. The protocol used is text-based, so
one can debug the debug server using telnet. See README-commands.txt
for documentation on the supported commands.
Testing indicates that the performance impact of attaching to a
process (and therefore permanently attaching a debugger) is minimal.
Some serious performance problems had been seen which ultimately
appeared to be a lack of physical memory on the machine running the
system.
Bugs:
This debug server is fundamentally incompatible with the Visual C++
debugger. Once the debug server is used to attach to a process, the
Visual C++ IDE will not be able to attach to the same process (even if
the debug server is "detached" from that process). Note that this
system is designed to work with the same primitives that C and C++
debuggers use (like "symbol lookup" and "read from process memory")
and exposes these primitives to Java, so in the long term we could
solve this problem by implementing platform-specific debug symbol
parsing and a platform-independent C++ debugger in Java.
Note:
The files IOBuf.cpp and IOBuf.hpp are also used in
building src/os/solaris/agent.

View File

@@ -1,159 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#include <iostream>
#include "Reaper.hpp"
using namespace std;
Reaper::Reaper(ReaperCB* cb) {
InitializeCriticalSection(&crit);
event = CreateEvent(NULL, TRUE, FALSE, NULL);
this->cb = cb;
active = false;
shouldShutDown = false;
}
bool
Reaper::start() {
bool result = false;
EnterCriticalSection(&crit);
if (!active) {
DWORD id;
HANDLE reaper = CreateThread(NULL, 0, &Reaper::reaperThreadEntry,
this, 0, &id);
if (reaper != NULL) {
result = true;
}
}
LeaveCriticalSection(&crit);
return result;
}
bool
Reaper::stop() {
bool result = false;
EnterCriticalSection(&crit);
if (active) {
shouldShutDown = true;
SetEvent(event);
while (active) {
Sleep(1);
}
shouldShutDown = false;
result = true;
}
LeaveCriticalSection(&crit);
return result;
}
void
Reaper::registerProcess(HANDLE processHandle, void* userData) {
ProcessInfo info;
info.handle = processHandle;
info.userData = userData;
EnterCriticalSection(&crit);
procInfo.push_back(info);
SetEvent(event);
LeaveCriticalSection(&crit);
}
void
Reaper::reaperThread() {
while (!shouldShutDown) {
// Take atomic snapshot of the current process list and user data
EnterCriticalSection(&crit);
int num = procInfo.size();
HANDLE* handleList = new HANDLE[1 + num];
void** dataList = new void*[num];
for (int i = 0; i < num; i++) {
handleList[i] = procInfo[i].handle;
dataList[i] = procInfo[i].userData;
}
LeaveCriticalSection(&crit);
// Topmost handle becomes the event object, so other threads can
// signal this one to notice differences in the above list (or
// shut down)
handleList[num] = event;
// Wait for these objects
DWORD idx = WaitForMultipleObjects(1 + num, handleList,
FALSE, INFINITE);
if ((idx >= WAIT_OBJECT_0) && (idx <= WAIT_OBJECT_0 + num)) {
idx -= WAIT_OBJECT_0;
if (idx < num) {
// A process exited (i.e., it wasn't that we were woken up
// just because the event went off)
(*cb)(dataList[idx]);
// Remove this process from the list (NOTE: requires that
// ordering does not change, i.e., that all additions are to
// the back of the process list)
EnterCriticalSection(&crit);
std::vector<ProcessInfo>::iterator iter = procInfo.begin();
iter += idx;
procInfo.erase(iter);
LeaveCriticalSection(&crit);
} else {
// Notification from other thread
ResetEvent(event);
}
} else {
// Unexpected return value. For now, warn.
cerr << "Reaper::reaperThread(): unexpected return value "
<< idx << " from WaitForMultipleObjects" << endl;
}
// Clean up these lists
delete[] handleList;
delete[] dataList;
}
// Time to shut down
active = false;
}
DWORD WINAPI
Reaper::reaperThreadEntry(LPVOID data) {
Reaper* reaper = (Reaper*) data;
reaper->reaperThread();
return 0;
}

View File

@@ -1,90 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#ifndef _REAPER_
#define _REAPER_
#include <vector>
#include <windows.h>
typedef void ReaperCB(void* userData);
/** A Reaper maintains a thread which waits for child processes to
terminate; upon termination it calls a user-specified ReaperCB to
clean up resources associated with those child processes. */
class Reaper {
private:
Reaper& operator=(const Reaper&);
Reaper(const Reaper&);
public:
Reaper(ReaperCB*);
~Reaper();
// Start the reaper thread.
bool start();
// Stop the reaper thread. This is called automatically in the
// reaper's destructor. It is not thread safe and should be called
// by at most one thread at a time.
bool stop();
// Register a given child process with the reaper. This should be
// called by the application's main thread. When that process
// terminates, the cleanup callback will be called with the
// specified userData in the context of the reaper thread. Callbacks
// are guaranteed to be called serially, so they can safely refer to
// static data as well as the given user data.
void registerProcess(HANDLE processHandle, void* userData);
private:
// For thread safety of register()
CRITICAL_SECTION crit;
ReaperCB* cb;
// State variables
volatile bool active;
volatile bool shouldShutDown;
struct ProcessInfo {
HANDLE handle;
void* userData;
};
// Bookkeeping
std::vector<ProcessInfo> procInfo;
// Synchronization between application thread and reaper thread
HANDLE event;
// Entry point for reaper thread
void reaperThread();
// Static function which is actual thread entry point
static DWORD WINAPI reaperThreadEntry(LPVOID data);
};
#endif // #defined _REAPER_

File diff suppressed because it is too large Load Diff

View File

@@ -1,146 +0,0 @@
# Microsoft Developer Studio Project File - Name="SwDbgSrv" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=SwDbgSrv - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "SwDbgSrv.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "SwDbgSrv.mak" CFG="SwDbgSrv - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "SwDbgSrv - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "SwDbgSrv - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "SwDbgSrv - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /machine:I386
!ELSEIF "$(CFG)" == "SwDbgSrv - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "SwDbgSrv___Win32_Debug"
# PROP BASE Intermediate_Dir "SwDbgSrv___Win32_Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "SwDbgSrv - Win32 Release"
# Name "SwDbgSrv - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\Buffer.cpp
# End Source File
# Begin Source File
SOURCE=.\Dispatcher.cpp
# End Source File
# Begin Source File
SOURCE=.\initWinsock.cpp
# End Source File
# Begin Source File
SOURCE=.\IOBuf.cpp
# End Source File
# Begin Source File
SOURCE=.\ioUtils.cpp
# End Source File
# Begin Source File
SOURCE=.\isNT4.cpp
# End Source File
# Begin Source File
SOURCE=.\nt4internals.cpp
# End Source File
# Begin Source File
SOURCE=.\procList.cpp
# End Source File
# Begin Source File
SOURCE=.\Reaper.cpp
# End Source File
# Begin Source File
SOURCE=.\serverLists.cpp
# End Source File
# Begin Source File
SOURCE=.\SwDbgSrv.cpp
# End Source File
# Begin Source File
SOURCE=.\toolHelp.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@@ -1,41 +0,0 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "SwDbgSrv"=.\SwDbgSrv.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "SwDbgSub"=.\SwDbgSub.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -1,883 +0,0 @@
/*
* Copyright (c) 2000, 2003, 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.
*
*/
// This is the source code for the subprocess forked by the Simple
// Windows Debug Server. It assumes most of the responsibility for the
// debug session, and processes all of the commands sent by clients.
// Disable too-long symbol warnings
#pragma warning ( disable : 4786 )
#include <iostream>
#include <vector>
#include <stdlib.h>
#include <assert.h>
// Must come before windows.h
#include <winsock2.h>
#include <windows.h>
#include "IOBuf.hpp"
#include "libInfo.hpp"
#include "LockableList.hpp"
#include "Message.hpp"
#include "Monitor.hpp"
#include "nt4internals.hpp"
// Uncomment the #define below to get messages on stderr
// #define DEBUGGING
using namespace std;
DWORD pid;
HANDLE procHandle;
IOBuf* ioBuf;
// State flags indicating whether the attach to the remote process
// definitively succeeded or failed
volatile bool attachFailed = false;
volatile bool attachSucceeded = false;
// State flag indicating whether the target process is suspended.
// Modified by suspend()/resume(), viewed by debug thread, but only
// under cover of the threads lock.
volatile bool suspended = false;
// State flags indicating whether we are considered to be attached to
// the target process and are therefore queuing up events to be sent
// back to the debug server. These flags are only accessed and
// modified under the cover of the eventLock.
Monitor* eventLock;
// The following is set to true when a client is attached to this process
volatile bool generateDebugEvents = false;
// Pointer to current debug event; non-NULL indicates a debug event is
// waiting to be sent to the client. Main thread sets this to NULL to
// indicate that the event has been consumed; also sets
// passEventToClient, below.
volatile DEBUG_EVENT* curDebugEvent = NULL;
// Set by main thread to indicate whether the most recently posted
// debug event should be passed on to the target process.
volatile bool passEventToClient = true;
void conditionalPostDebugEvent(DEBUG_EVENT* ev, DWORD* continueOrNotHandledFlag) {
// FIXME: make it possible for the client to enable and disable
// certain types of events (have to do so in a platform-independent
// manner)
switch (ev->dwDebugEventCode) {
case EXCEPTION_DEBUG_EVENT:
switch (ev->u.Exception.ExceptionRecord.ExceptionCode) {
case EXCEPTION_BREAKPOINT: break;
case EXCEPTION_SINGLE_STEP: break;
case EXCEPTION_ACCESS_VIOLATION: break;
default: return;
}
}
eventLock->lock();
if (generateDebugEvents) {
curDebugEvent = ev;
while (curDebugEvent != NULL) {
eventLock->wait();
}
if (passEventToClient) {
*continueOrNotHandledFlag = DBG_EXCEPTION_NOT_HANDLED;
} else {
*continueOrNotHandledFlag = DBG_CONTINUE;
}
}
eventLock->unlock();
}
//----------------------------------------------------------------------
// Module list
//
vector<LibInfo> libs;
//----------------------------------------------------------------------
// Thread list
//
struct ThreadInfo {
DWORD tid;
HANDLE thread;
ThreadInfo(DWORD tid, HANDLE thread) {
this->tid = tid;
this->thread = thread;
}
};
class ThreadList : public LockableList<ThreadInfo> {
public:
bool removeByThreadID(DWORD tid) {
for (InternalListType::iterator iter = internalList.begin();
iter != internalList.end(); iter++) {
if ((*iter).tid == tid) {
internalList.erase(iter);
return true;
}
}
return false;
}
HANDLE threadIDToHandle(DWORD tid) {
for (InternalListType::iterator iter = internalList.begin();
iter != internalList.end(); iter++) {
if ((*iter).tid == tid) {
return (*iter).thread;
}
}
return NULL;
}
};
ThreadList threads;
//----------------------------------------------------------------------
// INITIALIZATION AND TERMINATION
//
void
printError(const char* prefix) {
DWORD detail = GetLastError();
LPTSTR message;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM,
0,
detail,
0,
(LPTSTR) &message,
1,
NULL);
// FIXME: This is signaling an error: "The handle is invalid." ?
// Do I have to do all of my WaitForDebugEvent calls from the same thread?
cerr << prefix << ": " << message << endl;
LocalFree(message);
}
void
endProcess(bool waitForProcess = true) {
NT4::unloadNTDLL();
if (waitForProcess) {
// Though we're exiting because of an error, do not tear down the
// target process.
WaitForSingleObject(procHandle, INFINITE);
}
CloseHandle(procHandle);
exit(0);
}
DWORD WINAPI
debugThreadEntry(void*) {
#ifdef DEBUGGING
DWORD lastMsgId = 0;
int count = 0;
#endif
if (!DebugActiveProcess(pid)) {
attachFailed = true;
return 0;
}
// Wait for debug events. We keep the information from some of these
// on the side in anticipation of later queries by the client. NOTE
// that we leave the process running. The main thread is responsible
// for suspending and resuming all currently-active threads upon
// client attach and detach.
while (true) {
DEBUG_EVENT ev;
if (!WaitForDebugEvent(&ev, INFINITE)) {
#ifdef DEBUGGING
if (++count < 10) {
// FIXME: This is signaling an error: "The handle is invalid." ?
// Do I have to do all of my WaitForDebugEvent calls from the same thread?
printError("WaitForDebugEvent failed");
}
#endif
} else {
#ifdef DEBUGGING
if (ev.dwDebugEventCode != lastMsgId) {
lastMsgId = ev.dwDebugEventCode;
count = 0;
cerr << "Debug thread received event " << ev.dwDebugEventCode << endl;
} else {
if (++count < 10) {
cerr << "Debug thread received event " << ev.dwDebugEventCode << endl;
}
}
#endif
DWORD dbgContinueMode = DBG_CONTINUE;
switch (ev.dwDebugEventCode) {
case LOAD_DLL_DEBUG_EVENT:
conditionalPostDebugEvent(&ev, &dbgContinueMode);
break;
case UNLOAD_DLL_DEBUG_EVENT:
conditionalPostDebugEvent(&ev, &dbgContinueMode);
break;
case CREATE_PROCESS_DEBUG_EVENT:
threads.lock();
// FIXME: will this deal properly with child processes? If
// not, is it possible to make it do so?
#ifdef DEBUGGING
cerr << "CREATE_PROCESS_DEBUG_EVENT " << ev.dwThreadId
<< " " << ev.u.CreateProcessInfo.hThread << endl;
#endif
if (ev.u.CreateProcessInfo.hThread != NULL) {
threads.add(ThreadInfo(ev.dwThreadId, ev.u.CreateProcessInfo.hThread));
}
threads.unlock();
break;
case CREATE_THREAD_DEBUG_EVENT:
threads.lock();
#ifdef DEBUGGING
cerr << "CREATE_THREAD_DEBUG_EVENT " << ev.dwThreadId
<< " " << ev.u.CreateThread.hThread << endl;
#endif
if (suspended) {
// Suspend this thread before adding it to the thread list
SuspendThread(ev.u.CreateThread.hThread);
}
threads.add(ThreadInfo(ev.dwThreadId, ev.u.CreateThread.hThread));
threads.unlock();
break;
case EXIT_THREAD_DEBUG_EVENT:
threads.lock();
#ifdef DEBUGGING
cerr << "EXIT_THREAD_DEBUG_EVENT " << ev.dwThreadId << endl;
#endif
threads.removeByThreadID(ev.dwThreadId);
threads.unlock();
break;
case EXCEPTION_DEBUG_EVENT:
// cerr << "EXCEPTION_DEBUG_EVENT" << endl;
switch (ev.u.Exception.ExceptionRecord.ExceptionCode) {
case EXCEPTION_BREAKPOINT:
// cerr << "EXCEPTION_BREAKPOINT" << endl;
if (!attachSucceeded && !attachFailed) {
attachSucceeded = true;
}
break;
default:
dbgContinueMode = DBG_EXCEPTION_NOT_HANDLED;
break;
}
conditionalPostDebugEvent(&ev, &dbgContinueMode);
break;
case EXIT_PROCESS_DEBUG_EVENT:
endProcess(false);
// NOT REACHED
break;
default:
#ifdef DEBUGGING
cerr << "Received debug event " << ev.dwDebugEventCode << endl;
#endif
break;
}
ContinueDebugEvent(ev.dwProcessId, ev.dwThreadId, dbgContinueMode);
}
}
}
bool
attachToProcess() {
// Create event lock
eventLock = new Monitor();
// Get a process handle for later
procHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
if (procHandle == NULL) {
return false;
}
// Start up the debug thread
DWORD debugThreadId;
if (CreateThread(NULL, 0, &debugThreadEntry, NULL, 0, &debugThreadId) == NULL) {
// Failed to make background debug thread. Fail.
return false;
}
while ((!attachSucceeded) && (!attachFailed)) {
Sleep(1);
}
if (attachFailed) {
return false;
}
assert(attachSucceeded);
return true;
}
bool
readMessage(Message* msg) {
DWORD numRead;
if (!ReadFile(GetStdHandle(STD_INPUT_HANDLE),
msg,
sizeof(Message),
&numRead,
NULL)) {
return false;
}
if (numRead != sizeof(Message)) {
return false;
}
// For "poke" messages, must follow up by reading raw data
if (msg->type == Message::POKE) {
char* dataBuf = new char[msg->pokeArg.numBytes];
if (dataBuf == NULL) {
return false;
}
if (!ReadFile(GetStdHandle(STD_INPUT_HANDLE),
dataBuf,
msg->pokeArg.numBytes,
&numRead,
NULL)) {
delete[] dataBuf;
return false;
}
if (numRead != msg->pokeArg.numBytes) {
delete[] dataBuf;
return false;
}
msg->pokeArg.data = (void *) dataBuf;
}
return true;
}
void
handlePeek(Message* msg) {
#ifdef DEBUGGING
cerr << "Entering handlePeek()" << endl;
#endif
char* memBuf = new char[msg->peekArg.numBytes];
if (memBuf == NULL) {
ioBuf->writeString("B");
ioBuf->writeBinChar(0);
ioBuf->flush();
delete[] memBuf;
return;
}
// Try fast case first
DWORD numRead;
BOOL res = ReadProcessMemory(procHandle,
(LPCVOID) msg->peekArg.address,
memBuf,
msg->peekArg.numBytes,
&numRead);
if (res && (numRead == msg->peekArg.numBytes)) {
// OK, complete success. Phew.
#ifdef DEBUGGING
cerr << "Peek success case" << endl;
#endif
ioBuf->writeString("B");
ioBuf->writeBinChar(1);
ioBuf->writeBinUnsignedInt(numRead);
ioBuf->writeBinChar(1);
ioBuf->writeBinBuf(memBuf, numRead);
} else {
#ifdef DEBUGGING
cerr << "*** Peek slow case ***" << endl;
#endif
ioBuf->writeString("B");
ioBuf->writeBinChar(1);
// Use VirtualQuery to speed things up a bit
DWORD numLeft = msg->peekArg.numBytes;
char* curAddr = (char*) msg->peekArg.address;
while (numLeft > 0) {
MEMORY_BASIC_INFORMATION memInfo;
VirtualQueryEx(procHandle, curAddr, &memInfo, sizeof(memInfo));
DWORD numToRead = memInfo.RegionSize;
if (numToRead > numLeft) {
numToRead = numLeft;
}
DWORD numRead;
if (memInfo.State == MEM_COMMIT) {
// Read the process memory at this address for this length
// FIXME: should check the result of this read
ReadProcessMemory(procHandle, curAddr, memBuf,
numToRead, &numRead);
// Write this out
#ifdef DEBUGGING
cerr << "*** Writing " << numToRead << " bytes as mapped ***" << endl;
#endif
ioBuf->writeBinUnsignedInt(numToRead);
ioBuf->writeBinChar(1);
ioBuf->writeBinBuf(memBuf, numToRead);
} else {
// Indicate region is free
#ifdef DEBUGGING
cerr << "*** Writing " << numToRead << " bytes as unmapped ***" << endl;
#endif
ioBuf->writeBinUnsignedInt(numToRead);
ioBuf->writeBinChar(0);
}
curAddr += numToRead;
numLeft -= numToRead;
}
}
ioBuf->flush();
delete[] memBuf;
#ifdef DEBUGGING
cerr << "Exiting handlePeek()" << endl;
#endif
}
void
handlePoke(Message* msg) {
#ifdef DEBUGGING
cerr << "Entering handlePoke()" << endl;
#endif
DWORD numWritten;
BOOL res = WriteProcessMemory(procHandle,
(LPVOID) msg->pokeArg.address,
msg->pokeArg.data,
msg->pokeArg.numBytes,
&numWritten);
if (res && (numWritten == msg->pokeArg.numBytes)) {
// Success
ioBuf->writeBoolAsInt(true);
#ifdef DEBUGGING
cerr << " (Succeeded)" << endl;
#endif
} else {
// Failure
ioBuf->writeBoolAsInt(false);
#ifdef DEBUGGING
cerr << " (Failed)" << endl;
#endif
}
ioBuf->writeEOL();
ioBuf->flush();
// We clean up the data
char* dataBuf = (char*) msg->pokeArg.data;
delete[] dataBuf;
#ifdef DEBUGGING
cerr << "Exiting handlePoke()" << endl;
#endif
}
bool
suspend() {
if (suspended) {
return false;
}
// Before we suspend, we must take a snapshot of the loaded module
// names and base addresses, since acquiring this snapshot requires
// starting and exiting a thread in the remote process (at least on
// NT 4).
libs.clear();
#ifdef DEBUGGING
cerr << "Starting suspension" << endl;
#endif
libInfo(pid, libs);
#ifdef DEBUGGING
cerr << " Got lib info" << endl;
#endif
threads.lock();
#ifdef DEBUGGING
cerr << " Got thread lock" << endl;
#endif
suspended = true;
int j = 0;
for (int i = 0; i < threads.size(); i++) {
j++;
SuspendThread(threads.get(i).thread);
}
#ifdef DEBUGGING
cerr << "Suspended " << j << " threads" << endl;
#endif
threads.unlock();
return true;
}
bool
resume() {
if (!suspended) {
return false;
}
threads.lock();
suspended = false;
for (int i = 0; i < threads.size(); i++) {
ResumeThread(threads.get(i).thread);
}
threads.unlock();
#ifdef DEBUGGING
cerr << "Resumed process" << endl;
#endif
return true;
}
int
main(int argc, char **argv)
{
if (argc != 2) {
// Should only be used by performing CreateProcess within SwDbgSrv
exit(1);
}
if (sscanf(argv[1], "%u", &pid) != 1) {
exit(1);
}
// Try to attach to process
if (!attachToProcess()) {
// Attach failed. Notify parent by writing result to stdout file
// handle.
char res = 0;
DWORD numBytes;
WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), &res, sizeof(res),
&numBytes, NULL);
exit(1);
}
// Server is expecting success result back.
char res = 1;
DWORD numBytes;
WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), &res, sizeof(res),
&numBytes, NULL);
// Initialize our I/O buffer
ioBuf = new IOBuf(32768, 131072);
ioBuf->setOutputFileHandle(GetStdHandle(STD_OUTPUT_HANDLE));
// At this point we are attached. Enter our main loop which services
// requests from the server. Note that in order to handle attach/
// detach properly (i.e., resumption of process upon "detach") we
// will need another thread which handles debug events.
while (true) {
// Read a message from the server
Message msg;
if (!readMessage(&msg)) {
endProcess();
}
#ifdef DEBUGGING
cerr << "Main thread read message: " << msg.type << endl;
#endif
switch (msg.type) {
// ATTACH and DETACH messages MUST come in pairs
case Message::ATTACH:
suspend();
eventLock->lock();
generateDebugEvents = true;
eventLock->unlock();
break;
case Message::DETACH:
eventLock->lock();
generateDebugEvents = false;
// Flush remaining event if any
if (curDebugEvent != NULL) {
curDebugEvent = NULL;
eventLock->notifyAll();
}
eventLock->unlock();
resume();
break;
case Message::LIBINFO:
{
if (!suspended) {
ioBuf->writeInt(0);
} else {
// Send back formatted text
ioBuf->writeInt(libs.size());
for (int i = 0; i < libs.size(); i++) {
ioBuf->writeSpace();
ioBuf->writeInt(1);
ioBuf->writeSpace();
ioBuf->writeInt(libs[i].name.size());
ioBuf->writeSpace();
ioBuf->writeString(libs[i].name.c_str());
ioBuf->writeSpace();
ioBuf->writeAddress(libs[i].base);
}
}
ioBuf->writeEOL();
ioBuf->flush();
break;
}
case Message::PEEK:
handlePeek(&msg);
break;
case Message::POKE:
handlePoke(&msg);
break;
case Message::THREADLIST:
{
if (!suspended) {
ioBuf->writeInt(0);
} else {
threads.lock();
ioBuf->writeInt(threads.size());
for (int i = 0; i < threads.size(); i++) {
ioBuf->writeSpace();
ioBuf->writeAddress((void*) threads.get(i).thread);
}
threads.unlock();
}
ioBuf->writeEOL();
ioBuf->flush();
break;
}
case Message::DUPHANDLE:
{
HANDLE dup;
if (DuplicateHandle(procHandle,
msg.handleArg.handle,
GetCurrentProcess(),
&dup,
0,
FALSE,
DUPLICATE_SAME_ACCESS)) {
ioBuf->writeBoolAsInt(true);
ioBuf->writeSpace();
ioBuf->writeAddress((void*) dup);
} else {
ioBuf->writeBoolAsInt(false);
}
ioBuf->writeEOL();
ioBuf->flush();
break;
}
case Message::CLOSEHANDLE:
{
CloseHandle(msg.handleArg.handle);
break;
}
case Message::GETCONTEXT:
{
if (!suspended) {
ioBuf->writeBoolAsInt(false);
} else {
CONTEXT context;
context.ContextFlags = CONTEXT_FULL | CONTEXT_DEBUG_REGISTERS;
if (GetThreadContext(msg.handleArg.handle, &context)) {
ioBuf->writeBoolAsInt(true);
// EAX, EBX, ECX, EDX, ESI, EDI, EBP, ESP, EIP, DS, ES, FS, GS,
// CS, SS, EFLAGS, DR0, DR1, DR2, DR3, DR6, DR7
// See README-commands.txt
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.Eax);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.Ebx);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.Ecx);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.Edx);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.Esi);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.Edi);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.Ebp);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.Esp);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.Eip);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.SegDs);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.SegEs);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.SegFs);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.SegGs);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.SegCs);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.SegSs);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.EFlags);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.Dr0);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.Dr1);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.Dr2);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.Dr3);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.Dr6);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) context.Dr7);
} else {
ioBuf->writeBoolAsInt(false);
}
}
ioBuf->writeEOL();
ioBuf->flush();
break;
}
case Message::SETCONTEXT:
{
if (!suspended) {
ioBuf->writeBoolAsInt(false);
} else {
CONTEXT context;
context.ContextFlags = CONTEXT_FULL | CONTEXT_DEBUG_REGISTERS;
context.Eax = msg.setContextArg.Eax;
context.Ebx = msg.setContextArg.Ebx;
context.Ecx = msg.setContextArg.Ecx;
context.Edx = msg.setContextArg.Edx;
context.Esi = msg.setContextArg.Esi;
context.Edi = msg.setContextArg.Edi;
context.Ebp = msg.setContextArg.Ebp;
context.Esp = msg.setContextArg.Esp;
context.Eip = msg.setContextArg.Eip;
context.SegDs = msg.setContextArg.Ds;
context.SegEs = msg.setContextArg.Es;
context.SegFs = msg.setContextArg.Fs;
context.SegGs = msg.setContextArg.Gs;
context.SegCs = msg.setContextArg.Cs;
context.SegSs = msg.setContextArg.Ss;
context.EFlags = msg.setContextArg.EFlags;
context.Dr0 = msg.setContextArg.Dr0;
context.Dr1 = msg.setContextArg.Dr1;
context.Dr2 = msg.setContextArg.Dr2;
context.Dr3 = msg.setContextArg.Dr3;
context.Dr6 = msg.setContextArg.Dr6;
context.Dr7 = msg.setContextArg.Dr7;
if (SetThreadContext(msg.setContextArg.handle, &context)) {
ioBuf->writeBoolAsInt(true);
} else {
ioBuf->writeBoolAsInt(false);
}
}
ioBuf->writeEOL();
ioBuf->flush();
break;
}
case Message::SELECTORENTRY:
{
LDT_ENTRY entry;
if (GetThreadSelectorEntry(msg.selectorArg.handle,
msg.selectorArg.selector,
&entry)) {
ioBuf->writeBoolAsInt(true);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) entry.LimitLow);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) entry.BaseLow);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) entry.HighWord.Bytes.BaseMid);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) entry.HighWord.Bytes.Flags1);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) entry.HighWord.Bytes.Flags2);
ioBuf->writeSpace(); ioBuf->writeAddress((void*) entry.HighWord.Bytes.BaseHi);
} else {
ioBuf->writeBoolAsInt(false);
}
ioBuf->writeEOL();
ioBuf->flush();
break;
}
case Message::SUSPEND:
suspend();
break;
case Message::RESUME:
resume();
break;
case Message::POLLEVENT:
eventLock->lock();
if (curDebugEvent == NULL) {
ioBuf->writeBoolAsInt(false);
} else {
ioBuf->writeBoolAsInt(true);
ioBuf->writeSpace();
threads.lock();
ioBuf->writeAddress((void*) threads.threadIDToHandle(curDebugEvent->dwThreadId));
threads.unlock();
ioBuf->writeSpace();
ioBuf->writeUnsignedInt(curDebugEvent->dwDebugEventCode);
// Figure out what else to write
switch (curDebugEvent->dwDebugEventCode) {
case LOAD_DLL_DEBUG_EVENT:
ioBuf->writeSpace();
ioBuf->writeAddress(curDebugEvent->u.LoadDll.lpBaseOfDll);
break;
case UNLOAD_DLL_DEBUG_EVENT:
ioBuf->writeSpace();
ioBuf->writeAddress(curDebugEvent->u.UnloadDll.lpBaseOfDll);
break;
case EXCEPTION_DEBUG_EVENT:
{
DWORD code = curDebugEvent->u.Exception.ExceptionRecord.ExceptionCode;
ioBuf->writeSpace();
ioBuf->writeUnsignedInt(code);
ioBuf->writeSpace();
ioBuf->writeAddress(curDebugEvent->u.Exception.ExceptionRecord.ExceptionAddress);
switch (curDebugEvent->u.Exception.ExceptionRecord.ExceptionCode) {
case EXCEPTION_ACCESS_VIOLATION:
ioBuf->writeSpace();
ioBuf->writeBoolAsInt(curDebugEvent->u.Exception.ExceptionRecord.ExceptionInformation[0] != 0);
ioBuf->writeSpace();
ioBuf->writeAddress((void*) curDebugEvent->u.Exception.ExceptionRecord.ExceptionInformation[1]);
break;
default:
break;
}
break;
}
default:
break;
}
}
eventLock->unlock();
ioBuf->writeEOL();
ioBuf->flush();
break;
case Message::CONTINUEEVENT:
eventLock->lock();
if (curDebugEvent == NULL) {
ioBuf->writeBoolAsInt(false);
} else {
curDebugEvent = NULL;
passEventToClient = msg.boolArg.val;
ioBuf->writeBoolAsInt(true);
eventLock->notify();
}
eventLock->unlock();
ioBuf->writeEOL();
ioBuf->flush();
break;
}
}
endProcess();
// NOT REACHED
return 0;
}

View File

@@ -1,130 +0,0 @@
# Microsoft Developer Studio Project File - Name="SwDbgSub" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=SwDbgSub - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "SwDbgSub.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "SwDbgSub.mak" CFG="SwDbgSub - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "SwDbgSub - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "SwDbgSub - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "SwDbgSub - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /machine:I386
!ELSEIF "$(CFG)" == "SwDbgSub - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "SwDbgSub___Win32_Debug"
# PROP BASE Intermediate_Dir "SwDbgSub___Win32_Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "SwDbgSub - Win32 Release"
# Name "SwDbgSub - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\Buffer.cpp
# End Source File
# Begin Source File
SOURCE=.\IOBuf.cpp
# End Source File
# Begin Source File
SOURCE=.\isNT4.cpp
# End Source File
# Begin Source File
SOURCE=.\libInfo.cpp
# End Source File
# Begin Source File
SOURCE=.\Monitor.cpp
# End Source File
# Begin Source File
SOURCE=.\nt4internals.cpp
# End Source File
# Begin Source File
SOURCE=.\SwDbgSub.cpp
# End Source File
# Begin Source File
SOURCE=.\toolHelp.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@@ -1,71 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#include <iostream>
#include <winsock2.h>
using namespace std;
void
initWinsock()
{
static int initted = 0;
WORD wVersionRequested;
WSADATA wsaData;
int err;
if (!initted) {
wVersionRequested = MAKEWORD( 2, 0 );
err = WSAStartup( wVersionRequested, &wsaData );
if ( err != 0 ) {
{
/* Tell the user that we couldn't find a usable */
/* WinSock DLL. */
cerr << "SocketBase::SocketBase: unable to find usable "
<< "WinSock DLL" << endl;
exit(1);
}
}
/* Confirm that the WinSock DLL supports 2.0.*/
/* Note that if the DLL supports versions greater */
/* than 2.0 in addition to 2.0, it will still return */
/* 2.0 in wVersion since that is the version we */
/* requested. */
if ( LOBYTE( wsaData.wVersion ) != 2 ||
HIBYTE( wsaData.wVersion ) != 0 ) {
/* Tell the user that we couldn't find a usable */
/* WinSock DLL. */
{
cerr << "Unable to find suitable version of WinSock DLL" << endl;
WSACleanup( );
exit(1);
}
}
initted = 1;
}
}

View File

@@ -1,30 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#ifndef _INIT_WINSOCK_
#define _INIT_WINSOCK_
void initWinsock();
#endif // #defined _INIT_WINSOCK_

View File

@@ -1,156 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#include <ctype.h>
#include <string.h>
#include "ioUtils.hpp"
#include "IOBuf.hpp"
bool
scanInt(char** data, int* num) {
*num = 0;
// Skip whitespace
while ((**data != 0) && (isspace(**data))) {
++*data;
}
if (**data == 0) {
return false;
}
while ((**data != 0) && (!isspace(**data))) {
char cur = **data;
if ((cur < '0') || (cur > '9')) {
return false;
}
*num *= 10;
*num += cur - '0';
++*data;
}
return true;
}
bool
scanUnsignedLong(char** data, unsigned long* num) {
*num = 0;
// Skip whitespace
while ((**data != 0) && (isspace(**data))) {
++*data;
}
if (**data == 0) {
return false;
}
while ((**data != 0) && (!isspace(**data))) {
char cur = **data;
if ((cur < '0') || (cur > '9')) {
return false;
}
*num *= 10;
*num += cur - '0';
++*data;
}
return true;
}
bool
charToNibble(char ascii, int* value) {
if (ascii >= '0' && ascii <= '9') {
*value = ascii - '0';
return true;
} else if (ascii >= 'A' && ascii <= 'F') {
*value = 10 + ascii - 'A';
return true;
} else if (ascii >= 'a' && ascii <= 'f') {
*value = 10 + ascii - 'a';
return true;
}
return false;
}
bool
scanAddress(char** data, unsigned long* addr) {
*addr = 0;
// Skip whitespace
while ((**data != 0) && (isspace(**data))) {
++*data;
}
if (**data == 0) {
return false;
}
if (strncmp(*data, "0x", 2) != 0) {
return false;
}
*data += 2;
while ((**data != 0) && (!isspace(**data))) {
int val;
bool res = charToNibble(**data, &val);
if (!res) {
return false;
}
*addr <<= 4;
*addr |= val;
++*data;
}
return true;
}
bool
scanAndSkipBinEscapeChar(char** data) {
// Skip whitespace
while ((**data != 0) && (isspace(**data))) {
++*data;
}
if (!IOBuf::isBinEscapeChar(**data)) {
return false;
}
++*data;
return true;
}
bool
scanBinUnsignedLong(char** data, unsigned long* num) {
*num = 0;
for (int i = 0; i < 4; i++) {
unsigned char val = (unsigned char) **data;
*num = (*num << 8) | val;
++*data;
}
return true;
}

View File

@@ -1,36 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#ifndef _IO_UTILS_
#define _IO_UTILS_
bool scanInt(char** data, int* num);
bool scanUnsignedLong(char** data, unsigned long* num);
bool scanAddress(char** data, unsigned long* addr);
// Binary utils (for poke)
bool scanAndSkipBinEscapeChar(char** data);
bool scanBinUnsignedLong(char** data, unsigned long* num);
#endif // #defined _IO_UTILS_

View File

@@ -1,39 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#include "isNT4.hpp"
#include <windows.h>
bool
isNT4() {
OSVERSIONINFO info;
info.dwOSVersionInfoSize = sizeof(info);
if (!GetVersionEx(&info)) {
return false;
}
return ((info.dwPlatformId == VER_PLATFORM_WIN32_NT) &&
(info.dwMajorVersion == 4));
}

View File

@@ -1,34 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#ifndef _ISNT4_H_
#define _ISNT4_H_
// We need to special-case the Windows NT 4.0 implementations of some
// of the debugging routines because the Tool Help API is not
// available on this platform.
bool isNT4();
#endif // #defined _ISNT4_H_

View File

@@ -1,186 +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.
*
*/
// Disable too-long symbol warnings
#pragma warning ( disable : 4786 )
#include "libInfo.hpp"
#include "nt4internals.hpp"
#include "isNT4.hpp"
#include "toolHelp.hpp"
#include <assert.h>
using namespace std;
typedef void LibInfoImplFunc(DWORD pid, vector<LibInfo>& info);
static void libInfoImplNT4(DWORD pid, vector<LibInfo>& info);
static void libInfoImplToolHelp(DWORD pid, vector<LibInfo>& info);
void
libInfo(DWORD pid, vector<LibInfo>& info) {
static LibInfoImplFunc* impl = NULL;
if (impl == NULL) {
// See which operating system we're on
impl = (isNT4() ? &libInfoImplNT4 : &libInfoImplToolHelp);
}
assert(impl != NULL);
(*impl)(pid, info);
}
static ULONG
ModuleCount(NT4::PDEBUG_BUFFER db) {
return db->ModuleInformation ? *PULONG(db->ModuleInformation) : 0;
}
#define MAX2(a, b) (((a) < (b)) ? (b) : (a))
static void
libInfoImplNT4(DWORD pid, vector<LibInfo>& info) {
static EnumProcessModulesFunc* enumFunc = NULL;
static GetModuleFileNameExFunc* fnFunc = NULL;
static GetModuleInformationFunc* infoFunc = NULL;
if (enumFunc == NULL) {
HMODULE dll = loadPSAPIDLL();
enumFunc = (EnumProcessModulesFunc*) GetProcAddress(dll, "EnumProcessModules");
fnFunc = (GetModuleFileNameExFunc*) GetProcAddress(dll, "GetModuleFileNameExA");
infoFunc = (GetModuleInformationFunc*) GetProcAddress(dll, "GetModuleInformation");
assert(enumFunc != NULL);
assert(fnFunc != NULL);
assert(infoFunc != NULL);
}
static HMODULE* mods = new HMODULE[256];
static int numMods = 256;
if (mods == NULL) {
mods = new HMODULE[numMods];
if (mods == NULL) {
return;
}
}
bool done = false;
HANDLE proc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
if (proc == NULL) {
return;
}
do {
DWORD bufSize = numMods * sizeof(HMODULE);
DWORD neededSize;
if (!(*enumFunc)(proc, mods, bufSize, &neededSize)) {
// Enum failed
CloseHandle(proc);
return;
}
int numFetched = neededSize / sizeof(HMODULE);
if (numMods < numFetched) {
// Grow buffer
numMods = MAX2(numFetched, 2 * numMods);
delete[] mods;
mods = new HMODULE[numMods];
if (mods == NULL) {
CloseHandle(proc);
return;
}
} else {
char filename[MAX_PATH];
MODULEINFO modInfo;
// Iterate through and fetch each one's info
for (int i = 0; i < numFetched; i++) {
if (!(*fnFunc)(proc, mods[i], filename, MAX_PATH)) {
CloseHandle(proc);
return;
}
if (!(*infoFunc)(proc, mods[i], &modInfo, sizeof(MODULEINFO))) {
CloseHandle(proc);
return;
}
info.push_back(LibInfo(string(filename), (void*) modInfo.lpBaseOfDll));
}
done = true;
}
} while (!done);
CloseHandle(proc);
return;
}
void
libInfoImplToolHelp(DWORD pid, vector<LibInfo>& info) {
using namespace ToolHelp;
static CreateToolhelp32SnapshotFunc* snapshotFunc = NULL;
static Module32FirstFunc* firstFunc = NULL;
static Module32NextFunc* nextFunc = NULL;
if (snapshotFunc == NULL) {
HMODULE dll = loadDLL();
snapshotFunc =
(CreateToolhelp32SnapshotFunc*) GetProcAddress(dll,
"CreateToolhelp32Snapshot");
firstFunc = (Module32FirstFunc*) GetProcAddress(dll,
"Module32First");
nextFunc = (Module32NextFunc*) GetProcAddress(dll,
"Module32Next");
assert(snapshotFunc != NULL);
assert(firstFunc != NULL);
assert(nextFunc != NULL);
}
HANDLE snapshot = (*snapshotFunc)(TH32CS_SNAPMODULE, pid);
if (snapshot == (HANDLE) -1) {
// Error occurred during snapshot
return;
}
// Iterate
MODULEENTRY32 module;
if ((*firstFunc)(snapshot, &module)) {
do {
info.push_back(LibInfo(string(module.szExePath), (void*) module.modBaseAddr));
} while ((*nextFunc)(snapshot, &module));
}
CloseHandle(snapshot);
}

View File

@@ -1,44 +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.
*
*/
#ifndef _LIBINFO_
#define _LIBINFO_
#include <vector>
#include <string>
#include <windows.h>
struct LibInfo {
std::string name;
void* base;
LibInfo(const std::string& name, void* base) {
this->name = name;
this->base = base;
}
};
void libInfo(DWORD pid, std::vector<LibInfo>& info);
#endif // #defined _LIBINFO_

View File

@@ -1,75 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#include "nt4internals.hpp"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
namespace NT4 {
static HMODULE ntDLL = NULL;
HMODULE loadNTDLL() {
if (ntDLL == NULL) {
ntDLL = LoadLibrary("NTDLL.DLL");
}
assert(ntDLL != NULL);
return ntDLL;
}
void unloadNTDLL() {
if (ntDLL != NULL) {
FreeLibrary(ntDLL);
ntDLL = NULL;
}
}
} // namespace NT4
static HMODULE psapiDLL = NULL;
HMODULE
loadPSAPIDLL() {
if (psapiDLL == NULL) {
psapiDLL = LoadLibrary("PSAPI.DLL");
}
if (psapiDLL == NULL) {
fprintf(stderr, "Simple Windows Debug Server requires PSAPI.DLL on Windows NT 4.0.\n");
fprintf(stderr, "Please install this DLL from the SDK and restart the server.\n");
exit(1);
}
return psapiDLL;
}
void
unloadPSAPIDLL() {
if (psapiDLL != NULL) {
FreeLibrary(psapiDLL);
psapiDLL = NULL;
}
}

View File

@@ -1,273 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#ifndef _NT4INTERNALS_H_
#define _NT4INTERNALS_H_
#include <windows.h>
namespace NT4 {
extern "C" {
// Data structures and constants required to be able to get necessary
// debugging-related information on Windows NT 4.0 through internal
// (i.e., non-public) APIs. These are adapted from those in the
// _Windows NT/2000 Native API Reference_ by Gary Nebbett, Macmillan
// Technical Publishing, 201 West 103rd Street, Indianapolis, IN
// 46290, 2000.
typedef LONG NTSTATUS;
typedef LONG KPRIORITY;
#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
#define NTAPI __stdcall
#else
#define _cdecl
#define NTAPI
#endif
#define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xC0000004L)
typedef enum _SYSTEM_INFORMATION_CLASS {
SystemProcessesAndThreadsInformation = 5
} SYSTEM_INFORMATION_CLASS;
typedef struct _UNICODE_STRING {
USHORT Length;
USHORT MaximumLength;
PWSTR Buffer;
} UNICODE_STRING;
typedef struct _VM_COUNTERS {
ULONG PeakVirtualSize;
ULONG VirtualSize;
ULONG PageFaultCount;
ULONG PeakWorkingSetSize;
ULONG WorkingSetSize;
ULONG QuotaPeakPagedPoolUsage;
ULONG QuotaPagedPoolUsage;
ULONG QuotaPeakNonPagedPoolUsage;
ULONG QuotaNonPagedPoolUsage;
ULONG PagefileUsage;
ULONG PeakPagefileUsage;
} VM_COUNTERS, *PVM_COUNTERS;
typedef struct _IO_COUNTERS {
LARGE_INTEGER ReadOperationCount;
LARGE_INTEGER WriteOperationCount;
LARGE_INTEGER OtherOperationCount;
LARGE_INTEGER ReadTransferCount;
LARGE_INTEGER WriteTransferCount;
LARGE_INTEGER OtherTransferCount;
} IO_COUNTERS, *PIO_COUNTERS;
typedef struct _CLIENT_ID {
HANDLE UniqueProcess;
HANDLE UniqueThread;
} CLIENT_ID, *PCLIENT_ID;
typedef enum {
StateInitialized,
StateReady,
StateRunning,
StateStandby,
StateTerminated,
StateWait,
StateTransition,
StateUnknown
} THREAD_STATE;
typedef enum {
Executive,
FreePage,
PageIn,
PoolAllocation,
DelayExecution,
Suspended,
UserRequest,
WrExecutive,
WrFreePage,
WrPageIn,
WrPoolAllocation,
WrDelayExecution,
WrSuspended,
WrUserRequest,
WrEventPair,
WrQueue,
WrLpcReceive,
WrLpcReply,
WrVirtualMemory,
WrPageOut,
WrRendezvous,
Spare2,
Spare3,
Spare4,
Spare5,
Spare6,
WrKernel
} KWAIT_REASON;
typedef struct _SYSTEM_THREADS {
LARGE_INTEGER KernelTime;
LARGE_INTEGER UserTime;
LARGE_INTEGER CreateTime;
ULONG WaitTime;
PVOID StartAddress;
CLIENT_ID ClientId;
KPRIORITY Priority;
KPRIORITY BasePriority;
ULONG ContextSwitchCount;
THREAD_STATE State;
KWAIT_REASON WaitReason;
} SYSTEM_THREADS, *PSYSTEM_THREADS;
typedef struct _SYSTEM_PROCESSES { // Information class 5
ULONG NextEntryDelta;
ULONG ThreadCount;
ULONG Reserved1[6];
LARGE_INTEGER CreateTime;
LARGE_INTEGER UserTime;
LARGE_INTEGER KernelTime;
UNICODE_STRING ProcessName;
KPRIORITY BasePriority;
ULONG ProcessId;
ULONG InheritedFromProcessId;
ULONG HandleCount;
ULONG Reserved2[2];
ULONG PrivatePageCount;
VM_COUNTERS VmCounters;
IO_COUNTERS IoCounters; // Windows 2000 only
SYSTEM_THREADS Threads[1];
} SYSTEM_PROCESSES, *PSYSTEM_PROCESSES;
typedef NTSTATUS NTAPI
ZwQuerySystemInformationFunc(IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
IN OUT PVOID SystemInformation,
IN ULONG SystemInformationLength,
OUT PULONG ReturnLength OPTIONAL
);
typedef struct _DEBUG_BUFFER {
HANDLE SectionHandle;
PVOID SectionBase;
PVOID RemoteSectionBase;
ULONG SectionBaseDelta;
HANDLE EventPairHandle;
ULONG Unknown[2];
HANDLE RemoteThreadHandle;
ULONG InfoClassMask;
ULONG SizeOfInfo;
ULONG AllocatedSize;
ULONG SectionSize;
PVOID ModuleInformation;
PVOID BackTraceInformation;
PVOID HeapInformation;
PVOID LockInformation;
PVOID Reserved[8];
} DEBUG_BUFFER, *PDEBUG_BUFFER;
typedef PDEBUG_BUFFER NTAPI
RtlCreateQueryDebugBufferFunc(IN ULONG Size,
IN BOOLEAN EventPair);
#define PDI_MODULES 0x01 // The loaded modules of the process
#define PDI_BACKTRACE 0x02 // The heap stack back traces
#define PDI_HEAPS 0x04 // The heaps of the process
#define PDI_HEAP_TAGS 0x08 // The heap tags
#define PDI_HEAP_BLOCKS 0x10 // The heap blocks
#define PDI_LOCKS 0x20 // The locks created by the process
typedef struct _DEBUG_MODULE_INFORMATION { // c.f. SYSTEM_MODULE_INFORMATION
ULONG Reserved[2];
ULONG Base;
ULONG Size;
ULONG Flags;
USHORT Index;
USHORT Unknown;
USHORT LoadCount;
USHORT ModuleNameOffset;
CHAR ImageName[256];
} DEBUG_MODULE_INFORMATION, *PDEBUG_MODULE_INFORMATION;
// Flags
#define LDRP_STATIC_LINK 0x00000002
#define LDRP_IMAGE_DLL 0x00000004
#define LDRP_LOAD_IN_PROGRESS 0x00001000
#define LDRP_UNLOAD_IN_PROGRESS 0x00002000
#define LDRP_ENTRY_PROCESSED 0x00004000
#define LDRP_ENTRY_INSERTED 0x00008000
#define LDRP_CURRENT_LOAD 0x00010000
#define LDRP_FAILED_BUILTIN_LOAD 0x00020000
#define LDRP_DONT_CALL_FOR_THREADS 0x00040000
#define LDRP_PROCESS_ATTACH_CALLED 0x00080000
#define LDRP_DEBUG_SYMBOLS_LOADED 0x00100000
#define LDRP_IMAGE_NOT_AT_BASE 0x00200000
#define LDRP_WX86_IGNORE_MACHINETYPE 0x00400000
// NOTE that this will require creating a thread in the target
// process, implying that we can not call this while the process is
// suspended. May have to run this command in the child processes
// rather than the server.
typedef NTSTATUS NTAPI
RtlQueryProcessDebugInformationFunc(IN ULONG ProcessId,
IN ULONG DebugInfoClassMask,
IN OUT PDEBUG_BUFFER DebugBuffer);
typedef NTSTATUS NTAPI
RtlDestroyQueryDebugBufferFunc(IN PDEBUG_BUFFER DebugBuffer);
// Routines to load and unload NTDLL.DLL.
HMODULE loadNTDLL();
// Safe to call even if has not been loaded
void unloadNTDLL();
} // extern "C"
} // namespace NT4
//----------------------------------------------------------------------
// On NT 4 only, we now use PSAPI to enumerate the loaded modules in
// the target processes. RtlQueryProcessDebugInformation creates a
// thread in the target process, which causes problems when we are
// handling events like breakpoints in the debugger. The dependence on
// an external DLL which might not be present is unfortunate, but we
// can either redistribute this DLL (if allowed) or refuse to start on
// NT 4 if it is not present.
typedef struct _MODULEINFO {
LPVOID lpBaseOfDll;
DWORD SizeOfImage;
LPVOID EntryPoint;
} MODULEINFO, *LPMODULEINFO;
typedef BOOL (WINAPI EnumProcessModulesFunc)(HANDLE, HMODULE *, DWORD, LPDWORD);
typedef DWORD (WINAPI GetModuleFileNameExFunc)(HANDLE, HMODULE, LPTSTR, DWORD);
typedef BOOL (WINAPI GetModuleInformationFunc)(HANDLE, HMODULE, LPMODULEINFO, DWORD);
// Routines to load and unload PSAPI.DLL.
HMODULE loadPSAPIDLL();
// Safe to call even if has not been loaded
void unloadPSAPIDLL();
#endif // #defined _NT4INTERNALS_H_

View File

@@ -1,32 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#ifndef _PORTS_H_
#define _PORTS_H_
// This is the "public" port which end-user clients can connect to
// with an arbitrary application, including telnet.
const short CLIENT_PORT = 27000;
#endif // #defined _PORTS_H_

View File

@@ -1,190 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#include "procList.hpp"
#include "nt4internals.hpp"
#include "isNT4.hpp"
#include "toolHelp.hpp"
#include <assert.h>
using namespace std;
using namespace NT4;
typedef void ProcListImplFunc(ProcEntryList& processes);
void procListImplNT4(ProcEntryList& processes);
void procListImplToolHelp(ProcEntryList& processes);
ProcEntry::ProcEntry(ULONG pid, USHORT nameLength, WCHAR* name) {
this->pid = pid;
this->nameLength = nameLength;
this->name = new WCHAR[nameLength];
memcpy(this->name, name, nameLength * sizeof(WCHAR));
}
ProcEntry::ProcEntry(ULONG pid, USHORT nameLength, char* name) {
this->pid = pid;
this->nameLength = nameLength;
this->name = new WCHAR[nameLength];
int j = 0;
for (int i = 0; i < nameLength; i++) {
// FIXME: what is the proper promotion from ASCII to UNICODE?
this->name[i] = name[i] & 0xFF;
}
}
ProcEntry::ProcEntry(const ProcEntry& arg) {
name = NULL;
copyFrom(arg);
}
ProcEntry&
ProcEntry::operator=(const ProcEntry& arg) {
copyFrom(arg);
return *this;
}
ProcEntry::~ProcEntry() {
delete[] name;
}
void
ProcEntry::copyFrom(const ProcEntry& arg) {
if (name != NULL) {
delete[] name;
}
pid = arg.pid;
nameLength = arg.nameLength;
name = new WCHAR[nameLength];
memcpy(name, arg.name, nameLength * sizeof(WCHAR));
}
ULONG
ProcEntry::getPid() {
return pid;
}
USHORT
ProcEntry::getNameLength() {
return nameLength;
}
WCHAR*
ProcEntry::getName() {
return name;
}
void
procList(ProcEntryList& processes) {
static ProcListImplFunc* impl = NULL;
if (impl == NULL) {
// See which operating system we're on
impl = (isNT4() ? &procListImplNT4 : &procListImplToolHelp);
}
assert(impl != NULL);
(*impl)(processes);
}
void
procListImplNT4(ProcEntryList& processes) {
using namespace NT4;
static ZwQuerySystemInformationFunc* query = NULL;
if (query == NULL) {
HMODULE ntDLL = loadNTDLL();
query =
(ZwQuerySystemInformationFunc*) GetProcAddress(ntDLL,
"ZwQuerySystemInformation");
assert(query != NULL);
}
ULONG n = 0x100;
PSYSTEM_PROCESSES sp = new SYSTEM_PROCESSES[n];
while ((*query)(SystemProcessesAndThreadsInformation,
sp, n * sizeof(SYSTEM_PROCESSES), 0) == STATUS_INFO_LENGTH_MISMATCH) {
delete[] sp;
n *= 2;
sp = new SYSTEM_PROCESSES[n];
}
bool done = false;
for (PSYSTEM_PROCESSES p = sp; !done;
p = PSYSTEM_PROCESSES(PCHAR(p) + p->NextEntryDelta)) {
processes.push_back(ProcEntry(p->ProcessId,
p->ProcessName.Length / 2,
p->ProcessName.Buffer));
done = p->NextEntryDelta == 0;
}
}
void
procListImplToolHelp(ProcEntryList& processes) {
using namespace ToolHelp;
static CreateToolhelp32SnapshotFunc* snapshotFunc = NULL;
static Process32FirstFunc* firstFunc = NULL;
static Process32NextFunc* nextFunc = NULL;
if (snapshotFunc == NULL) {
HMODULE dll = loadDLL();
snapshotFunc =
(CreateToolhelp32SnapshotFunc*) GetProcAddress(dll,
"CreateToolhelp32Snapshot");
firstFunc = (Process32FirstFunc*) GetProcAddress(dll,
"Process32First");
nextFunc = (Process32NextFunc*) GetProcAddress(dll,
"Process32Next");
assert(snapshotFunc != NULL);
assert(firstFunc != NULL);
assert(nextFunc != NULL);
}
HANDLE snapshot = (*snapshotFunc)(TH32CS_SNAPPROCESS, 0 /* ignored */);
if (snapshot == (HANDLE) -1) {
// Error occurred during snapshot
return;
}
// Iterate
PROCESSENTRY32 proc;
if ((*firstFunc)(snapshot, &proc)) {
do {
// FIXME: could make this uniform to the NT version by cutting
// off the path name just before the executable name
processes.push_back(ProcEntry(proc.th32ProcessID,
strlen(proc.szExeFile),
proc.szExeFile));
} while ((*nextFunc)(snapshot, &proc));
}
CloseHandle(snapshot);
}

View File

@@ -1,55 +0,0 @@
/*
* Copyright (c) 2000, 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.
*
*/
#ifndef _PROCLIST_
#define _PROCLIST_
#include <windows.h>
#include <vector>
class ProcEntry {
public:
/** name may not be NULL */
ProcEntry(ULONG pid, USHORT nameLength, wchar_t* name);
ProcEntry(ULONG pid, USHORT nameLength, char* name);
~ProcEntry();
ProcEntry(const ProcEntry& arg);
ProcEntry& operator=(const ProcEntry& arg);
ULONG getPid();
/** Returns number of WCHAR characters in getName() */
USHORT getNameLength();
WCHAR* getName();
private:
ULONG pid;
USHORT nameLength;
WCHAR* name;
void copyFrom(const ProcEntry& arg);
};
typedef std::vector<ProcEntry> ProcEntryList;
void procList(ProcEntryList& processes);
#endif // #defined _PROCLIST_

View File

@@ -1,270 +0,0 @@
/*
* Copyright (c) 2000, 2003, 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.
*
*/
#include <assert.h>
#include "serverLists.hpp"
//----------------------------------------------------------------------
// Lists
//
CRITICAL_SECTION Lists::crit;
void
Lists::init() {
InitializeCriticalSection(&crit);
}
void
Lists::lock() {
EnterCriticalSection(&crit);
}
void
Lists::unlock() {
LeaveCriticalSection(&crit);
}
//----------------------------------------------------------------------
// ListsLocker
//
ListsLocker::ListsLocker() {
Lists::lock();
}
ListsLocker::~ListsLocker() {
Lists::unlock();
}
//----------------------------------------------------------------------
// ChildInfo
//
ChildInfo::ChildInfo(DWORD pid, HANDLE childProcessHandle,
HANDLE writeToStdinHandle, HANDLE readFromStdoutHandle,
HANDLE auxHandle1, HANDLE auxHandle2) {
this->pid = pid;
this->childProcessHandle = childProcessHandle;
this->writeToStdinHandle = writeToStdinHandle;
this->readFromStdoutHandle = readFromStdoutHandle;
this->auxHandle1 = auxHandle1;
this->auxHandle2 = auxHandle2;
client = NULL;
}
DWORD
ChildInfo::getPid() {
return pid;
}
HANDLE
ChildInfo::getChildProcessHandle() {
return childProcessHandle;
}
HANDLE
ChildInfo::getWriteToStdinHandle() {
return writeToStdinHandle;
}
HANDLE
ChildInfo::getReadFromStdoutHandle() {
return readFromStdoutHandle;
}
void
ChildInfo::setClient(ClientInfo* clientInfo) {
client = clientInfo;
}
ClientInfo*
ChildInfo::getClient() {
return client;
}
void
ChildInfo::closeAll() {
CloseHandle(childProcessHandle);
CloseHandle(writeToStdinHandle);
CloseHandle(readFromStdoutHandle);
CloseHandle(auxHandle1);
CloseHandle(auxHandle2);
}
//----------------------------------------------------------------------
// ChildList
//
ChildList::ChildList() {
}
ChildList::~ChildList() {
}
void
ChildList::addChild(ChildInfo* info) {
// Could store these in binary sorted order by pid for efficiency
childList.push_back(info);
}
ChildInfo*
ChildList::removeChild(HANDLE childProcessHandle) {
for (ChildInfoList::iterator iter = childList.begin(); iter != childList.end();
iter++) {
ChildInfo* info = *iter;
if (info->getChildProcessHandle() == childProcessHandle) {
childList.erase(iter);
return info;
}
}
assert(false);
return NULL;
}
void
ChildList::removeChild(ChildInfo* info) {
for (ChildInfoList::iterator iter = childList.begin(); iter != childList.end();
iter++) {
if (*iter == info) {
childList.erase(iter);
return;
}
}
assert(false);
}
ChildInfo*
ChildList::getChildByPid(DWORD pid) {
for (ChildInfoList::iterator iter = childList.begin(); iter != childList.end();
iter++) {
ChildInfo* info = *iter;
if (info->getPid() == pid) {
return info;
}
}
return NULL;
}
int
ChildList::size() {
return childList.size();
}
ChildInfo*
ChildList::getChildByIndex(int index) {
return childList[index];
}
//----------------------------------------------------------------------
// ClientInfo
//
ClientInfo::ClientInfo(SOCKET dataSocket) {
this->dataSocket = dataSocket;
buf = new IOBuf(32768, 131072);
buf->setSocket(dataSocket);
target = NULL;
}
ClientInfo::~ClientInfo() {
delete buf;
}
SOCKET
ClientInfo::getDataSocket() {
return dataSocket;
}
IOBuf*
ClientInfo::getIOBuf() {
return buf;
}
void
ClientInfo::setTarget(ChildInfo* childInfo) {
target = childInfo;
}
ChildInfo*
ClientInfo::getTarget() {
return target;
}
void
ClientInfo::closeAll() {
shutdown(dataSocket, SD_BOTH);
closesocket(dataSocket);
dataSocket = INVALID_SOCKET;
}
//----------------------------------------------------------------------
// ClientList
//
ClientList::ClientList() {
}
ClientList::~ClientList() {
}
void
ClientList::addClient(ClientInfo* info) {
clientList.push_back(info);
}
bool
ClientList::isAnyDataSocketSet(fd_set* fds, ClientInfo** out) {
for (ClientInfoList::iterator iter = clientList.begin(); iter != clientList.end();
iter++) {
ClientInfo* info = *iter;
if (FD_ISSET(info->getDataSocket(), fds)) {
*out = info;
return true;
}
}
return false;
}
void
ClientList::removeClient(ClientInfo* client) {
for (ClientInfoList::iterator iter = clientList.begin(); iter != clientList.end();
iter++) {
if (*iter == client) {
clientList.erase(iter);
return;
}
}
assert(false);
}
int
ClientList::size() {
return clientList.size();
}
ClientInfo*
ClientList::get(int num) {
return clientList[num];
}

View File

@@ -1,204 +0,0 @@
/*
* Copyright (c) 2000, 2003, 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.
*
*/
#ifndef _SERVER_LISTS_
#define _SERVER_LISTS_
#include <vector>
#include <winsock2.h>
#include "IOBuf.hpp"
//
// NOTE:
//
// All of these lists are guarded by the global lock managed by the
// Lists class. Lists::init() must be called at the start of the
// program.
//
class Lists {
friend class ListsLocker;
public:
static void init();
private:
static void lock();
static void unlock();
static CRITICAL_SECTION crit;
};
// Should be allocated on stack. Ensures proper locking/unlocking
// pairing.
class ListsLocker {
public:
ListsLocker();
~ListsLocker();
};
// We must keep track of all of the child processes we have forked to
// handle attaching to a target process. This is necessary because we
// allow clients to detach from processes, but the child processes we
// fork must necessarily stay alive for the duration of the target
// application. A subsequent attach operation to the target process
// results in the same child process being reused. For this reason,
// child processes are known to be in one of two states: attached and
// detached.
class ClientInfo;
class ChildInfo {
public:
/** The pid of the ChildInfo indicates the process ID of the target
process which the subprocess was created to debug, not the pid
of the subprocess itself. */
ChildInfo(DWORD pid, HANDLE childProcessHandle,
HANDLE writeToStdinHandle, HANDLE readFromStdoutHandle,
HANDLE auxHandle1, HANDLE auxHandle2);
DWORD getPid();
HANDLE getChildProcessHandle();
HANDLE getWriteToStdinHandle();
HANDLE getReadFromStdoutHandle();
/** Set the client which is currently attached to the target process
via this child process. Set this to NULL to indicate that the
child process is ready to accept another attachment. */
void setClient(ClientInfo* clientInfo);
ClientInfo* getClient();
/** This is NOT automatically called in the destructor */
void closeAll();
private:
DWORD pid;
HANDLE childProcessHandle;
HANDLE writeToStdinHandle;
HANDLE readFromStdoutHandle;
HANDLE auxHandle1;
HANDLE auxHandle2;
ClientInfo* client;
};
// We keep track of a list of child debugger processes, each of which
// is responsible for debugging a certain target process. These
// debugger processes can serve multiple clients during their
// lifetime. When a client detaches from a given process or tells the
// debugger to "exit", the debug server is notified that the child
// process is once again available to accept connections from clients.
class ChildList {
private:
typedef std::vector<ChildInfo*> ChildInfoList;
public:
ChildList();
~ChildList();
void addChild(ChildInfo*);
/** Removes and returns the ChildInfo* associated with the given
child process handle. */
ChildInfo* removeChild(HANDLE childProcessHandle);
/** Removes the given ChildInfo. */
void removeChild(ChildInfo* info);
/** Return the ChildInfo* associated with a given process ID without
removing it from the list. */
ChildInfo* getChildByPid(DWORD pid);
/** Iteration support */
int size();
/** Iteration support */
ChildInfo* getChildByIndex(int index);
private:
ChildInfoList childList;
};
// We also keep a list of clients whose requests we are responsible
// for serving. Clients can attach and detach from child processes.
class ClientInfo {
public:
ClientInfo(SOCKET dataSocket);
~ClientInfo();
SOCKET getDataSocket();
/** Gets an IOBuf configured for the data socket, which should be
used for all communication with the client. */
IOBuf* getIOBuf();
/** Set the information for the process to which this client is
attached. Set this to NULL to indicate that the client is not
currently attached to any target process. */
void setTarget(ChildInfo* childInfo);
/** Get the information for the process to which this client is
currently attached, or NULL if none. */
ChildInfo* getTarget();
/** Close down the socket connection to this client. This is NOT
automatically called by the destructor. */
void closeAll();
private:
SOCKET dataSocket;
IOBuf* buf;
ChildInfo* target;
};
class ClientList {
private:
typedef std::vector<ClientInfo*> ClientInfoList;
public:
ClientList();
~ClientList();
/** Adds a client to the list. */
void addClient(ClientInfo* info);
/** Check to see whether the parent socket of any of the ClientInfo
objects is readable in the given fd_set. If so, returns TRUE and
sets the given ClientInfo* (a non-NULL pointer to which must be
given) appropriately. */
bool isAnyDataSocketSet(fd_set* fds, ClientInfo** info);
/** Removes a client from the list. User is responsible for deleting
the ClientInfo* using operator delete. */
void removeClient(ClientInfo* client);
/** Iteration support. */
int size();
/** Iteration support. */
ClientInfo* get(int num);
private:
ClientInfoList clientList;
};
#endif // #defined _SERVER_LISTS_

View File

@@ -1,48 +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.
*
*/
#include "toolHelp.hpp"
#include <assert.h>
namespace ToolHelp {
static HMODULE kernelDLL = NULL;
HMODULE loadDLL() {
if (kernelDLL == NULL) {
kernelDLL = LoadLibrary("KERNEL32.DLL");
}
assert(kernelDLL != NULL);
return kernelDLL;
}
void unloadDLL() {
if (kernelDLL != NULL) {
FreeLibrary(kernelDLL);
kernelDLL = NULL;
}
}
} // namespace ToolHelp

View File

@@ -1,75 +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.
*
*/
#ifndef _TOOLHELP_H_
#define _TOOLHELP_H_
#include <windows.h>
#include <tlhelp32.h>
namespace ToolHelp {
extern "C" {
///////////////
// Snapshots //
///////////////
typedef HANDLE WINAPI
CreateToolhelp32SnapshotFunc(DWORD dwFlags, DWORD th32ProcessID);
//////////////////
// Process List //
//////////////////
typedef BOOL WINAPI Process32FirstFunc(HANDLE hSnapshot,
LPPROCESSENTRY32 lppe);
typedef BOOL WINAPI Process32NextFunc(HANDLE hSnapshot,
LPPROCESSENTRY32 lppe);
// NOTE: although these routines are defined in TLHELP32.H, they
// seem to always return false (maybe only under US locales)
typedef BOOL WINAPI Process32FirstWFunc(HANDLE hSnapshot,
LPPROCESSENTRY32W lppe);
typedef BOOL WINAPI Process32NextWFunc(HANDLE hSnapshot,
LPPROCESSENTRY32W lppe);
/////////////////
// Module List //
/////////////////
typedef BOOL WINAPI
Module32FirstFunc(HANDLE hSnapshot, LPMODULEENTRY32 lpme);
typedef BOOL WINAPI
Module32NextFunc (HANDLE hSnapshot, LPMODULEENTRY32 lpme);
// Routines to load and unload KERNEL32.DLL.
HMODULE loadDLL();
// Safe to call even if has not been loaded
void unloadDLL();
} // extern "C"
} // namespace "ToolHelp"
#endif // #defined _TOOLHELP_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright (c) 2002, 2003, 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;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.types.*;
import sun.jvm.hotspot.types.basic.*;
public class BsdVtblAccess extends BasicVtblAccess {
private String vt;
public BsdVtblAccess(SymbolLookup symbolLookup,
String[] dllNames) {
super(symbolLookup, dllNames);
if (symbolLookup.lookup("libjvm.so", "__vt_10JavaThread") != null ||
symbolLookup.lookup("libjvm_g.so", "__vt_10JavaThread") != null) {
// old C++ ABI
vt = "__vt_";
} else {
// new C++ ABI
vt = "_ZTV";
}
}
protected String vtblSymbolForType(Type type) {
return vt + type.getName().length() + type;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2011, 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
@@ -170,6 +170,7 @@ public class CLHSDB {
final String errMsg = formatMessage(e.getMessage(), 80);
System.err.println("Unable to connect to process ID " + pid + ":\n\n" + errMsg);
agent.detach();
e.printStackTrace();
return;
}
}
@@ -191,6 +192,7 @@ public class CLHSDB {
final String errMsg = formatMessage(e.getMessage(), 80);
System.err.println("Unable to open core file\n" + corePath + ":\n\n" + errMsg);
agent.detach();
e.printStackTrace();
return;
}
}
@@ -209,6 +211,7 @@ public class CLHSDB {
final String errMsg = formatMessage(e.getMessage(), 80);
System.err.println("Unable to connect to machine \"" + remoteMachineName + "\":\n\n" + errMsg);
agent.detach();
e.printStackTrace();
return;
}
}

View File

@@ -40,6 +40,8 @@ import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.interpreter.*;
import sun.jvm.hotspot.memory.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.opto.*;
import sun.jvm.hotspot.ci.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.utilities.*;
import sun.jvm.hotspot.utilities.soql.*;
@@ -48,6 +50,8 @@ import sun.jvm.hotspot.ui.tree.*;
import sun.jvm.hotspot.tools.*;
import sun.jvm.hotspot.tools.ObjectHistogram;
import sun.jvm.hotspot.tools.StackTrace;
import sun.jvm.hotspot.tools.jcore.ClassDump;
import sun.jvm.hotspot.tools.jcore.ClassFilter;
public class CommandProcessor {
public abstract static class DebuggerInterface {
@@ -59,6 +63,27 @@ public class CommandProcessor {
public abstract void reattach();
}
public static class BootFilter implements ClassFilter {
public boolean canInclude(InstanceKlass kls) {
return kls.getClassLoader() == null;
}
}
public static class NonBootFilter implements ClassFilter {
private HashMap emitted = new HashMap();
public boolean canInclude(InstanceKlass kls) {
if (kls.getClassLoader() == null) return false;
if (emitted.get(kls.getName()) != null) {
// Since multiple class loaders are being shoved
// together duplicate classes are a possibilty. For
// now just ignore them.
return false;
}
emitted.put(kls.getName(), kls);
return true;
}
}
static class Tokens {
final String input;
int i;
@@ -258,9 +283,14 @@ public class CommandProcessor {
}
void dumpFields(Type type) {
dumpFields(type, true);
}
void dumpFields(Type type, boolean allowStatic) {
Iterator i = type.getFields();
while (i.hasNext()) {
Field f = (Field) i.next();
if (!allowStatic && f.isStatic()) continue;
out.print("field ");
quote(type.getName());
out.print(" ");
@@ -458,13 +488,18 @@ public class CommandProcessor {
});
}
},
new Command("flags", "flags [ flag ]", false) {
new Command("flags", "flags [ flag | -nd ]", false) {
public void doit(Tokens t) {
int tokens = t.countTokens();
if (tokens != 0 && tokens != 1) {
usage();
} else {
String name = tokens > 0 ? t.nextToken() : null;
boolean nonDefault = false;
if (name != null && name.equals("-nd")) {
name = null;
nonDefault = true;
}
VM.Flag[] flags = VM.getVM().getCommandLineFlags();
if (flags == null) {
@@ -474,7 +509,12 @@ public class CommandProcessor {
for (int f = 0; f < flags.length; f++) {
VM.Flag flag = flags[f];
if (name == null || flag.getName().equals(name)) {
out.println(flag.getName() + " = " + flag.getValue());
if (nonDefault && flag.getOrigin() == 0) {
// only print flags which aren't their defaults
continue;
}
out.println(flag.getName() + " = " + flag.getValue() + " " + flag.getOrigin());
printed = true;
}
}
@@ -586,6 +626,158 @@ public class CommandProcessor {
}
}
},
new Command("printmdo", "printmdo [ -a | expression ]", false) {
// Print every MDO in the heap or the one referenced by expression.
public void doit(Tokens t) {
if (t.countTokens() != 1) {
usage();
} else {
String s = t.nextToken();
if (s.equals("-a")) {
HeapVisitor iterator = new DefaultHeapVisitor() {
public boolean doObj(Oop obj) {
if (obj instanceof MethodData) {
Method m = ((MethodData)obj).getMethod();
out.println("MethodData " + obj.getHandle() + " for " +
"method " + m.getMethodHolder().getName().asString() + "." +
m.getName().asString() +
m.getSignature().asString() + "@" + m.getHandle());
((MethodData)obj).printDataOn(out);
}
return false;
}
};
VM.getVM().getObjectHeap().iteratePerm(iterator);
} else {
Address a = VM.getVM().getDebugger().parseAddress(s);
OopHandle handle = a.addOffsetToAsOopHandle(0);
MethodData mdo = (MethodData)VM.getVM().getObjectHeap().newOop(handle);
mdo.printDataOn(out);
}
}
}
},
new Command("dumpideal", "dumpideal { -a | id }", false) {
// Do a full dump of the nodes reachabile from root in each compiler thread.
public void doit(Tokens t) {
if (t.countTokens() != 1) {
usage();
} else {
String name = t.nextToken();
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;
out.println(ct);
ciEnv env = ct.env();
if (env != null) {
Compile c = env.compilerData();
c.root().dump(9999, out);
} else {
out.println(" not compiling");
}
}
}
}
}
}
},
new Command("dumpcfg", "dumpcfg { -a | id }", false) {
// Dump the PhaseCFG for every compiler thread that has one live.
public void doit(Tokens t) {
if (t.countTokens() != 1) {
usage();
} else {
String name = t.nextToken();
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;
out.println(ct);
ciEnv env = ct.env();
if (env != null) {
Compile c = env.compilerData();
c.cfg().dump(out);
}
}
}
}
}
}
},
new Command("dumpilt", "dumpilt { -a | id }", false) {
// dumps the InlineTree of a C2 compile
public void doit(Tokens t) {
if (t.countTokens() != 1) {
usage();
} else {
String name = t.nextToken();
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) {
Compile c = env.compilerData();
InlineTree ilt = c.ilt();
if (ilt != null) {
ilt.print(out);
}
}
}
}
}
}
}
},
new Command("vmstructsdump", "vmstructsdump", false) {
public void doit(Tokens t) {
if (t.countTokens() != 0) {
usage();
return;
}
// Dump a copy of the type database in a form that can
// be read back.
Iterator i = agent.getTypeDataBase().getTypes();
// Make sure the types are emitted in an order than can be read back in
HashSet emitted = new HashSet();
Stack pending = new Stack();
while (i.hasNext()) {
Type n = (Type)i.next();
if (emitted.contains(n.getName())) {
continue;
}
while (n != null && !emitted.contains(n.getName())) {
pending.push(n);
n = n.getSuperclass();
}
while (!pending.empty()) {
n = (Type)pending.pop();
dumpType(n);
emitted.add(n.getName());
}
}
i = agent.getTypeDataBase().getTypes();
while (i.hasNext()) {
dumpFields((Type)i.next(), false);
}
}
},
new Command("inspect", "inspect expression", false) {
public void doit(Tokens t) {
if (t.countTokens() != 1) {
@@ -760,6 +952,50 @@ public class CommandProcessor {
}
}
},
new Command("intConstant", "intConstant [ name [ value ] ]", true) {
public void doit(Tokens t) {
if (t.countTokens() != 1 && t.countTokens() != 0 && t.countTokens() != 2) {
usage();
return;
}
HotSpotTypeDataBase db = (HotSpotTypeDataBase)agent.getTypeDataBase();
if (t.countTokens() == 1) {
out.println("intConstant " + name + " " + db.lookupIntConstant(name));
} else if (t.countTokens() == 0) {
Iterator i = db.getIntConstants();
while (i.hasNext()) {
String name = (String)i.next();
out.println("intConstant " + name + " " + db.lookupIntConstant(name));
}
} else if (t.countTokens() == 2) {
String name = t.nextToken();
Integer value = Integer.valueOf(t.nextToken());
db.addIntConstant(name, value);
}
}
},
new Command("longConstant", "longConstant [ name [ value ] ]", true) {
public void doit(Tokens t) {
if (t.countTokens() != 1 && t.countTokens() != 0 && t.countTokens() != 2) {
usage();
return;
}
HotSpotTypeDataBase db = (HotSpotTypeDataBase)agent.getTypeDataBase();
if (t.countTokens() == 1) {
out.println("longConstant " + name + " " + db.lookupLongConstant(name));
} else if (t.countTokens() == 0) {
Iterator i = db.getLongConstants();
while (i.hasNext()) {
String name = (String)i.next();
out.println("longConstant " + name + " " + db.lookupLongConstant(name));
}
} else if (t.countTokens() == 2) {
String name = t.nextToken();
Long value = Long.valueOf(t.nextToken());
db.addLongConstant(name, value);
}
}
},
new Command("field", "field [ type [ name fieldtype isStatic offset address ] ]", true) {
public void doit(Tokens t) {
if (t.countTokens() != 1 && t.countTokens() != 0 && t.countTokens() != 6) {
@@ -1311,13 +1547,13 @@ public class CommandProcessor {
return;
}
executeCommand(ln);
executeCommand(ln, prompt);
}
}
static Pattern historyPattern = Pattern.compile("((!\\*)|(!\\$)|(!!-?)|(!-?[0-9][0-9]*)|(![a-zA-Z][^ ]*))");
public void executeCommand(String ln) {
public void executeCommand(String ln, boolean putInHistory) {
if (ln.indexOf('!') != -1) {
int size = history.size();
if (size == 0) {
@@ -1406,7 +1642,7 @@ public class CommandProcessor {
Tokens t = new Tokens(ln);
if (t.hasMoreTokens()) {
boolean error = false;
history.add(ln);
if (putInHistory) history.add(ln);
int len = t.countTokens();
if (len > 2) {
String r = t.at(len - 2);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2011, 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,7 +25,6 @@
package sun.jvm.hotspot;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.debugger.dbx.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.oops.*;

View File

@@ -1740,7 +1740,7 @@ public class HSDB implements ObjectHistogramPanel.Listener, SAListener {
else if (f.isCompiledFrame()) { tty.print("compiled"); }
else if (f.isEntryFrame()) { tty.print("entry"); }
else if (f.isNativeFrame()) { tty.print("native"); }
else if (f.isGlueFrame()) { tty.print("glue"); }
else if (f.isRuntimeFrame()) { tty.print("runtime"); }
else { tty.print("external"); }
tty.print(" frame with PC = " + f.getPC() + ", SP = " + f.getSP() + ", FP = " + f.getFP());
if (f.isSignalHandlerFrameDbg()) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,9 @@ import java.io.PrintStream;
import java.net.*;
import java.rmi.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.debugger.dbx.*;
import sun.jvm.hotspot.debugger.bsd.*;
import sun.jvm.hotspot.debugger.proc.*;
import sun.jvm.hotspot.debugger.remote.*;
import sun.jvm.hotspot.debugger.win32.*;
import sun.jvm.hotspot.debugger.windbg.*;
import sun.jvm.hotspot.debugger.linux.*;
import sun.jvm.hotspot.memory.*;
@@ -337,6 +336,8 @@ public class HotSpotAgent {
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");
@@ -392,6 +393,10 @@ public class HotSpotAgent {
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 yet)");
}
@@ -436,113 +441,35 @@ public class HotSpotAgent {
private void setupDebuggerSolaris() {
setupJVMLibNamesSolaris();
if(System.getProperty("sun.jvm.hotspot.debugger.useProcDebugger") != null) {
ProcDebuggerLocal dbg = new ProcDebuggerLocal(null, true);
debugger = dbg;
attachDebugger();
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");
// 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");
}
dbg.setMachineDescription(machDesc);
return;
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 {
String dbxPathName;
String dbxPathPrefix;
String dbxSvcAgentDSOPathName;
String dbxSvcAgentDSOPathPrefix;
String[] dbxSvcAgentDSOPathNames = null;
// use path names/prefixes specified on command
dbxPathName = System.getProperty("dbxPathName");
if (dbxPathName == null) {
dbxPathPrefix = System.getProperty("dbxPathPrefix");
if (dbxPathPrefix == null) {
dbxPathPrefix = defaultDbxPathPrefix;
}
dbxPathName = dbxPathPrefix + fileSep + os + fileSep + cpu + fileSep + "bin" + fileSep + "dbx";
}
dbxSvcAgentDSOPathName = System.getProperty("dbxSvcAgentDSOPathName");
if (dbxSvcAgentDSOPathName != null) {
dbxSvcAgentDSOPathNames = new String[] { dbxSvcAgentDSOPathName } ;
} else {
dbxSvcAgentDSOPathPrefix = System.getProperty("dbxSvcAgentDSOPathPrefix");
if (dbxSvcAgentDSOPathPrefix == null) {
dbxSvcAgentDSOPathPrefix = defaultDbxSvcAgentDSOPathPrefix;
}
if (cpu.equals("sparc")) {
dbxSvcAgentDSOPathNames = new String[] {
// FIXME: bad hack for SPARC v9. This is necessary because
// there are two dbx executables on SPARC, one for v8 and one
// for v9, and it isn't obvious how to tell the two apart
// using the dbx command line. See
// DbxDebuggerLocal.importDbxModule().
dbxSvcAgentDSOPathPrefix + fileSep + os + fileSep + cpu + "v9" + fileSep + "lib" +
fileSep + "libsvc_agent_dbx.so",
dbxSvcAgentDSOPathPrefix + fileSep + os + fileSep + cpu + fileSep + "lib" +
fileSep + "libsvc_agent_dbx.so",
};
} else {
dbxSvcAgentDSOPathNames = new String[] {
dbxSvcAgentDSOPathPrefix + fileSep + os + fileSep + cpu + fileSep + "lib" +
fileSep + "libsvc_agent_dbx.so"
};
}
}
// Note we do not use a cache for the local debugger in server
// mode; it's taken care of on the client side
DbxDebuggerLocal dbg = new DbxDebuggerLocal(null, dbxPathName, dbxSvcAgentDSOPathNames, !isServer);
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. It's possible that the Serviceability Agent's dbx module failed to " +
"initialize. Examine the standard output and standard error streams from the dbx " +
"process for more information.");
}
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");
}
}
dbg.setMachineDescription(machDesc);
throw new DebuggerException("Solaris only supported on sparc/sparcv9/x86/amd64");
}
dbg.setMachineDescription(machDesc);
return;
}
private void connectRemoteDebugger() throws DebuggerException {
@@ -557,6 +484,8 @@ public class HotSpotAgent {
setupJVMLibNamesWin32();
} else if (os.equals("linux")) {
setupJVMLibNamesLinux();
} else if (os.equals("bsd")) {
setupJVMLibNamesBsd();
} else {
throw new RuntimeException("Unknown OS type");
}
@@ -589,11 +518,7 @@ public class HotSpotAgent {
// mode; it will be taken care of on the client side (once remote
// debugging is implemented).
if (System.getProperty("sun.jvm.hotspot.debugger.useWindbgDebugger") != null) {
debugger = new WindbgDebuggerLocal(machDesc, !isServer);
} else {
debugger = new Win32DebuggerLocal(machDesc, !isServer);
}
debugger = new WindbgDebuggerLocal(machDesc, !isServer);
attachDebugger();
@@ -638,6 +563,31 @@ public class HotSpotAgent {
jvmLibNames = new String[] { "libjvm.so", "libjvm_g.so" };
}
//
// BSD
//
private void setupDebuggerBsd() {
setupJVMLibNamesBsd();
if (cpu.equals("x86")) {
machDesc = new MachineDescriptionIntelX86();
} else if (cpu.equals("amd64")) {
machDesc = new MachineDescriptionAMD64();
} else {
throw new DebuggerException("BSD only supported on x86/amd64");
}
BsdDebuggerLocal dbg = new BsdDebuggerLocal(machDesc, !isServer);
debugger = dbg;
attachDebugger();
}
private void setupJVMLibNamesBsd() {
jvmLibNames = new String[] { "libjvm.so", "libjvm_g.so" };
}
/** Convenience routine which should be called by per-platform
debugger setup. Should not be called when startupMode is
REMOTE_MODE. */

Some files were not shown because too many files have changed in this diff Show More