Compare commits

...

1845 Commits

Author SHA1 Message Date
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
J. Duke
bb930ae01e Merge 2017-07-05 17:51:25 +02:00
J. Duke
9adbb9c684 Merge 2017-07-05 17:51:22 +02:00
J. Duke
c54e770c42 Merge 2017-07-05 17:51:20 +02:00
J. Duke
b204091ef8 Merge 2017-07-05 17:51:17 +02:00
J. Duke
a85e655e2d Merge 2017-07-05 17:51:14 +02:00
J. Duke
97679d059b Merge 2017-07-05 17:51:12 +02:00
J. Duke
1a597ce85b Merge 2017-07-05 17:51:09 +02:00
J. Duke
c67e801a7e Added tag jdk8-b06 for changeset 429da7734bf4 2017-07-05 17:50:59 +02:00
J. Duke
356b331207 Merge 2017-07-05 17:50:59 +02:00
J. Duke
2d48a3aaeb Merge 2017-07-05 17:50:56 +02:00
J. Duke
970ceeab6d Merge 2017-07-05 17:50:51 +02:00
J. Duke
0a84d5a0ff Merge 2017-07-05 17:50:47 +02:00
J. Duke
fdb677e1ae Merge 2017-07-05 17:50:45 +02:00
J. Duke
1a69c52b9e Merge 2017-07-05 17:50:42 +02:00
J. Duke
f0caacafef Merge 2017-07-05 17:50:32 +02:00
J. Duke
e07eabce2d Added tag jdk8-b05 for changeset c4f9ea1ecb55 2017-07-05 17:50:24 +02:00
J. Duke
4208296685 Merge 2017-07-05 17:50:24 +02:00
J. Duke
261a9bbb27 Merge 2017-07-05 17:50:21 +02:00
J. Duke
93bde6c592 Merge 2017-07-05 17:50:18 +02:00
J. Duke
40967338e9 Merge 2017-07-05 17:50:16 +02:00
J. Duke
67eba2eb97 Merge 2017-07-05 17:50:14 +02:00
J. Duke
ef17da2149 Merge 2017-07-05 17:50:11 +02:00
J. Duke
8b8f7a3a9f Merge 2017-07-05 17:50:08 +02:00
J. Duke
e1ba0b5061 Added tag jdk8-b04 for changeset 31f5c34d7808 2017-07-05 17:50:00 +02:00
J. Duke
f36d48190e Merge 2017-07-05 17:49:59 +02:00
J. Duke
d0e2b8385f Merge 2017-07-05 17:49:56 +02:00
J. Duke
c7ff6513f8 Merge 2017-07-05 17:49:52 +02:00
J. Duke
be386ae31c Merge 2017-07-05 17:49:49 +02:00
J. Duke
d7f9679696 Merge 2017-07-05 17:49:45 +02:00
J. Duke
9abc2c5090 Merge 2017-07-05 17:49:42 +02:00
J. Duke
390bd8fec1 Merge 2017-07-05 17:49:27 +02:00
J. Duke
ba15f14cab Added tag jdk8-b03 for changeset 6815e85bf96d 2017-07-05 17:49:20 +02:00
J. Duke
ce11b33ae7 Merge 2017-07-05 17:49:19 +02:00
J. Duke
ba9dde3c14 Merge 2017-07-05 17:49:17 +02:00
J. Duke
a8e232df58 Merge 2017-07-05 17:49:13 +02:00
J. Duke
b712ff07ec Merge 2017-07-05 17:49:11 +02:00
J. Duke
1ce61e91ea Merge 2017-07-05 17:49:08 +02:00
J. Duke
9cc0a60a59 Merge 2017-07-05 17:49:05 +02:00
J. Duke
848278cace Merge 2017-07-05 17:48:59 +02:00
J. Duke
340113d052 Added tag jdk8-b02 for changeset 1b9d19620eb4 2017-07-05 17:48:42 +02:00
J. Duke
425272b225 Merge 2017-07-05 17:48:41 +02:00
J. Duke
cfe52736c4 Merge 2017-07-05 17:48:39 +02:00
J. Duke
d2ff797f09 Merge 2017-07-05 17:48:36 +02:00
J. Duke
308123c3b4 Merge 2017-07-05 17:48:33 +02:00
J. Duke
d0a4b3e70f Merge 2017-07-05 17:48:30 +02:00
J. Duke
03a99aea44 Merge 2017-07-05 17:48:27 +02:00
J. Duke
998ba47ca1 Merge 2017-07-05 17:48:25 +02:00
J. Duke
ae60008a94 Added tag jdk8-b01 for changeset de9223c94f9c 2017-07-05 17:48:15 +02:00
J. Duke
d2ac7a107e Merge 2017-07-05 17:48:14 +02:00
J. Duke
ac379007a0 Merge 2017-07-05 17:48:11 +02:00
J. Duke
b4f3f1c620 Merge 2017-07-05 17:48:04 +02:00
J. Duke
5b91e55364 Merge 2017-07-05 17:47:59 +02:00
J. Duke
b3c2386a16 Merge 2017-07-05 17:47:56 +02:00
J. Duke
9cda91e98f Merge 2017-07-05 17:47:52 +02:00
J. Duke
1fba1e7db7 Merge 2017-07-05 17:47:31 +02:00
J. Duke
d2ee213f52 Added tag jdk7-b147 for changeset a2a589fc2954 2017-07-05 17:47:06 +02:00
J. Duke
7b2e99178f Merge 2017-07-05 17:47:05 +02:00
J. Duke
c2d3087635 Merge 2017-07-05 17:47:03 +02:00
J. Duke
1a6a28f0bb Merge 2017-07-05 17:47:00 +02:00
J. Duke
4cdda07519 Merge 2017-07-05 17:46:57 +02:00
J. Duke
bc2f346995 Merge 2017-07-05 17:46:55 +02:00
J. Duke
fef4ee7763 Merge 2017-07-05 17:46:52 +02:00
J. Duke
1c3399369f Added tag jdk7-b146 for changeset dca1e8a87e8f 2017-07-05 17:46:42 +02:00
J. Duke
8380be1403 Merge 2017-07-05 17:46:42 +02:00
J. Duke
994a1b643c Merge 2017-07-05 17:46:39 +02:00
J. Duke
fbee29107f Merge 2017-07-05 17:46:33 +02:00
J. Duke
10c6c41190 Merge 2017-07-05 17:46:27 +02:00
J. Duke
c594c9edea Merge 2017-07-05 17:46:25 +02:00
J. Duke
1a417e98cf Merge 2017-07-05 17:46:22 +02:00
J. Duke
612ac4317c Added tag jdk7-b145 for changeset 8294c99e685a 2017-07-05 17:46:03 +02:00
J. Duke
d62d57c36f Merge 2017-07-05 17:46:02 +02:00
J. Duke
0a08682e95 Merge 2017-07-05 17:45:59 +02:00
J. Duke
23ce30aa36 Merge 2017-07-05 17:45:55 +02:00
J. Duke
e17daa170f Merge 2017-07-05 17:45:53 +02:00
J. Duke
a456fa2511 Merge 2017-07-05 17:45:50 +02:00
J. Duke
1ab483c2ba Merge 2017-07-05 17:45:46 +02:00
J. Duke
c8bbde04f3 Added tag jdk7-b144 for changeset 07a8728ad49e 2017-07-05 17:45:28 +02:00
J. Duke
58fb76bbf0 Merge 2017-07-05 17:45:27 +02:00
J. Duke
0f9d5a6200 Merge 2017-07-05 17:45:24 +02:00
J. Duke
8bd6e8e842 Merge 2017-07-05 17:45:21 +02:00
J. Duke
ae0aaab3df Merge 2017-07-05 17:45:18 +02:00
J. Duke
108cc33b5b Merge 2017-07-05 17:45:15 +02:00
J. Duke
e7a4fbc359 Merge 2017-07-05 17:45:12 +02:00
J. Duke
de5fe7d046 Added tag jdk7-b143 for changeset 4a05062d8c4d 2017-07-05 17:45:01 +02:00
J. Duke
7f5de78e6f Merge 2017-07-05 17:45:01 +02:00
J. Duke
a06d3c2511 Merge 2017-07-05 17:44:58 +02:00
J. Duke
195ff6aa76 Merge 2017-07-05 17:44:53 +02:00
J. Duke
2473ca4dfc Merge 2017-07-05 17:44:49 +02:00
J. Duke
946a354565 Merge 2017-07-05 17:44:44 +02:00
J. Duke
13da321e2b Merge 2017-07-05 17:44:41 +02:00
J. Duke
e17e39f075 Merge 2017-07-05 17:44:26 +02:00
J. Duke
75cadd7c0a Added tag jdk7-b142 for changeset 92bf0655022d 2017-07-05 17:44:12 +02:00
J. Duke
1424f2cc9e Merge 2017-07-05 17:44:12 +02:00
J. Duke
5dfcfa7941 Merge 2017-07-05 17:44:09 +02:00
J. Duke
7f0c515e25 Merge 2017-07-05 17:44:02 +02:00
J. Duke
c2eb0f95e4 Merge 2017-07-05 17:43:59 +02:00
J. Duke
b6bdc05724 Merge 2017-07-05 17:43:53 +02:00
J. Duke
4c2a6ef8a1 Merge 2017-07-05 17:43:49 +02:00
J. Duke
034400dca8 Merge 2017-07-05 17:43:24 +02:00
J. Duke
efaf0a0160 Added tag jdk7-b141 for changeset 5d86d0c7692e 2017-07-05 17:43:08 +02:00
J. Duke
7ff3916e57 Merge 2017-07-05 17:43:08 +02:00
J. Duke
6a77f9dc21 Merge 2017-07-05 17:43:05 +02:00
J. Duke
380f105986 Merge 2017-07-05 17:43:00 +02:00
J. Duke
16c88303b4 Merge 2017-07-05 17:42:56 +02:00
J. Duke
4a35d170d8 Merge 2017-07-05 17:42:52 +02:00
J. Duke
4bfef9bf03 Merge 2017-07-05 17:42:48 +02:00
J. Duke
36d63fdbf5 Merge 2017-07-05 17:42:37 +02:00
J. Duke
e15276198f Added tag jdk7-b140 for changeset f4298bc3f4b6 2017-07-05 17:42:20 +02:00
Lana Steuck
ccc8319e5f Merge 2011-12-12 10:08:26 -08: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
Jan Lahoda
7beeeca1de 7119032: (javac) increase visibility of JavacParser methods to improve subtyping
Reviewed-by: jjg
2011-12-09 08:40:40 -08: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
Matherey Nunez
2b9e2e9038 7086015: fix test/tools/javac/parser/netbeans/JavacParserTest.java
Reviewed-by: ksrini, jjg
2011-12-07 10:47:46 -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
Lana Steuck
50319d95be Merge 2011-12-06 16:17:15 -08:00
Lana Steuck
74a4760171 Merge 2011-12-06 16:15:34 -08: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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Gary Adams
29ad75ff83 7067691: java/lang/management/PlatformLoggingMXBean/LoggingMXBeanTest.java failing intermittently
Reviewed-by: alanb, mchung
2011-11-17 15:47:34 -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
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
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
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
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
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
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
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
David Katleman
93cf5130d6 Added tag jdk8-b06 for changeset c579ee9c7624 2011-09-22 16:02:16 -07:00
David Katleman
7b62b4870c Added tag jdk8-b06 for changeset d91b32b59eda 2011-09-22 16:02:08 -07:00
David Katleman
2587f18d1c Added tag jdk8-b06 for changeset 3632c6a1c35c 2011-09-22 16:02:05 -07:00
David Katleman
0761734777 Added tag jdk8-b06 for changeset 301b3b8fc6aa 2011-09-22 16:02:05 -07:00
David Katleman
9ebcc8e000 Added tag jdk8-b06 for changeset d062411f33d7 2011-09-22 16:01:59 -07:00
David Katleman
c055987003 Added tag jdk8-b06 for changeset 553337da9f77 2011-09-22 16:01:56 -07:00
David Katleman
a4515c2fa3 Added tag jdk8-b06 for changeset f6b03ab4a2b6 2011-09-22 16:01:51 -07: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
Lana Steuck
cdc3810c17 Merge 2011-09-19 19:41:46 -07:00
Lana Steuck
2d432bc656 Merge 2011-09-19 19:40:59 -07: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
Suchen Chien
f843db55a4 Added tag jdk8-b05 for changeset deef5f066e00 2011-09-15 18:53:41 -07:00
Suchen Chien
0d44b9c7af Added tag jdk8-b05 for changeset d9917af875f5 2011-09-15 18:53:28 -07:00
Suchen Chien
8ef6c48fcb Added tag jdk8-b05 for changeset 05ac1c050035 2011-09-15 18:53:22 -07:00
Suchen Chien
a3ac3c7ae5 Added tag jdk8-b05 for changeset af07bf5ee3ea 2011-09-15 18:53:21 -07:00
Suchen Chien
c22ae1301d Added tag jdk8-b05 for changeset 2cdf92088fc8 2011-09-15 18:53:14 -07:00
Suchen Chien
f534667145 Added tag jdk8-b05 for changeset 48766c0a793d 2011-09-15 18:53:09 -07:00
Suchen Chien
08f2f9619e Added tag jdk8-b05 for changeset c9501aef849e 2011-09-15 18:53:07 -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
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
Suchen Chien
89e97c18e5 Merge 2011-09-14 15:55:35 -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
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
Lana Steuck
73fe789af2 Merge 2011-09-12 16:59:34 -07:00
Lana Steuck
122ddd54d0 Merge 2011-09-12 15:49:08 -07:00
Tom Rodriguez
1f8f1f79be 7089709: type "jushort" not found
Reviewed-by: kvn, twisti
2011-09-12 13:51:40 -07:00
Jonathan Gibbons
c1efbbc362 Merge 2011-09-12 11:40:07 -07:00
Jonathan Gibbons
8166c2b32b 7068451: Regression: javac compiles fixed sources against previous, not current, version of generated sources
Reviewed-by: mcimadamore
2011-09-12 11:39:08 -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
Lana Steuck
14cdfec16f Merge 2011-09-10 21:31:08 -07:00
Lana Steuck
7189a0b227 Merge 2011-09-10 21:30:20 -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
Alan Bateman
b1fadc8f75 7089131: test/java/lang/invoke/InvokeGenericTest.java does not compile
Reviewed-by: darcy, jrose
2011-09-10 14:55:14 +01:00
Tom Rodriguez
1ebca30d26 7088020: SEGV in JNIHandleBlock::release_block
Reviewed-by: kvn, twisti
2011-09-10 00:11:04 -07:00
Lana Steuck
9d02eadfed Merge 2011-09-09 17:23:05 -07:00
Lana Steuck
4ade26a0ee Merge 2011-09-09 17:22:03 -07:00
Jonathan Gibbons
a0084596d4 7073508: Regression: NullPointerException at com.sun.tools.javac.code.Lint$AugmentVisitor.augment
Reviewed-by: darcy
2011-09-09 17:19:26 -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
Misha Bykov
6d8ffa0972 7087932: Wrong legal notice introduced in the JDK8 changeset a976ff46116b
Reviewed-by: ohair, darcy
2011-09-09 15:21:34 -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
Michael McMahon
d961381c47 7088747: Use multicatch in Socket constructor
Reviewed-by: alanb
2011-09-09 15:24:35 +01:00
Charles Lee
0b8205428e 7024118: possible hardcoded mnemonic for JFileChooser metal and motif l&f
Reviewed-by: alexp
2011-09-09 17:44:11 +04:00
Michael McMahon
2eb4e18d75 Merge 2011-09-09 14:14:01 +01:00
Michael McMahon
518e846e10 7085981: XXSocket types depend on impl finalizer to close if constructor throws exception
Reviewed-by: alanb, chegar
2011-09-09 14:04:44 +01: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
Weijun Wang
700ceee11e 7047200: keytool safe store
Reviewed-by: xuelei
2011-09-09 11:18:18 +08:00
Suchen Chien
c66c50437c Added tag jdk8-b04 for changeset cd423392ab94 2011-09-08 16:59:53 -07:00
Suchen Chien
ae1f9680b6 Added tag jdk8-b04 for changeset d4c5e59b82f8 2011-09-08 16:59:40 -07:00
Suchen Chien
cdfbdfc355 Added tag jdk8-b04 for changeset 03bf33b63d68 2011-09-08 16:59:34 -07:00
Suchen Chien
5a6cbc47b8 Added tag jdk8-b04 for changeset 6332e6ee2b55 2011-09-08 16:59:33 -07:00
Suchen Chien
58c9fc4526 Added tag jdk8-b04 for changeset fed6cacab5cb 2011-09-08 16:59:27 -07:00
Suchen Chien
ddcd67afd9 Added tag jdk8-b04 for changeset e4b998912367 2011-09-08 16:59:21 -07:00
Suchen Chien
01771c74b6 Added tag jdk8-b04 for changeset 3a558ed43088 2011-09-08 16:59:20 -07: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
Weijun Wang
6b8980e983 7087428: move client tests out of jdk_misc
Reviewed-by: alanb, ohair
2011-09-08 09:04:28 +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
Mandy Chung
34e0b54108 7078024: Update JDK service tag for JDK 8
Reviewed-by: paulk
2011-09-07 13:42:34 -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
Vikram Aroskar
732ac029ec 7012783: JFileChooser fails to resolve DFS links on Windows Vista SP2
Changes to code to handle DFS links

Reviewed-by: rupashka
2011-09-07 03:17:21 -07: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
Joe Darcy
a1f5f73508 7086192: (reflect) Have TypeVariable extend AnnotatedElement
Reviewed-by: mcimadamore
2011-09-06 21:19:31 -07: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
Weijun Wang
ba77c3a48f 7067974: multiple ETYPE-INFO-ENTRY with same etype and different salt
Reviewed-by: valeriep
2011-09-07 08:56:55 +08:00
Phil Race
b3aa4cdcba 7050826: Hebrew characters are not rendered on OEL 5.6
Reviewed-by: bae, jgodinez
2011-09-06 13:40:31 -07:00
Joe Darcy
2a22d4691a 6838776: Defer initialization of static fields in java.math.BigInteger
Reviewed-by: mduigou, mduigou
2011-09-06 06:17:52 -07:00
Lana Steuck
3c59a998c6 Merge 2011-09-05 23:58:19 -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
Joe Darcy
59a4dbb95a 7086710: java/util/Formatter/Basic.java failing after 7082971
Reviewed-by: alanb
2011-09-05 08:04:04 -07:00
Denis Fokin
077625bba2 7071248: IME composition window does not disappear when file dialog is closed : Japanese WinXP
Reviewed-by: naoto, art
2011-09-05 18:54:49 +04:00
Sean Coffey
92de2299c5 7049079: NTSYSTEM CLASS IS LEAKING WINDOWS TOKENS
Reviewed-by: weijun
2011-09-05 11:28:23 +01:00
Weijun Wang
b0fb95c8d3 7081411: DSA keypair generation affected by Solaris bug
Reviewed-by: xuelei, mullan, alanb
2011-09-05 18:17:55 +08:00
Weijun Wang
833bcd2277 7081783: jarsigner error when no $HOME/.keystore
Reviewed-by: xuelei
2011-09-05 11:22:27 +08: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
Kurchi Subhra Hazra
179b982e9d 7084032: test/java/net/Inet6Address/B6558853.java fails on Windows XP/2003 if IPv6
Reviewed-by: chegar
2011-09-03 07:46:35 +01: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
Joe Darcy
3d9f3ee2b1 6989067: BigInteger's array copiers should be converted to System.arraycopy()
Reviewed-by: mduigou, forax
2011-09-02 16:06:08 -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
Xueming Shen
9f67707386 6898310: (cs) Charset cache lookups should be synchronized
Synchronize the lookup in iterator

Reviewed-by: alanb
2011-09-02 10:20:08 -07:00
Maurizio Cimadamore
a456f20739 7086261: javac doesn't report error as expected, it only reports ClientCodeWrapper$DiagnosticSourceUnwrapper
Missing override for toString() in ClientCodeUnwrapper.DiagnosticSourceUnwrapper

Reviewed-by: jjg
2011-09-02 17:35:56 +01:00
Bruce Chapman
0da4a58897 7024096: Stack trace has invalid line numbers
Reviewed-by: jjg, darcy
2011-09-02 07:54:16 -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
David Buck
aeec78ab37 7074386: fallback to fontconfig.<major_version>.bfc/properties if fontconfig.<major_version>.<minor_version>
Fallback to fontconfig.<major_version>.bfc/properties if fontconfig.<major_version>.<minor_version>. is not found

Reviewed-by: prr, robm
2011-09-02 04:28:49 -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
Sergey Kuksenko
238bb5d3bb 7082971: More performance tuning of BigDecimal and other java.math classes
Reviewed-by: darcy
2011-09-01 23:00:09 -07:00
Jim Holmlund
7d7c8d7cdf 7086071: tools/javac/7079713/TestCircularClassfile.java fails on windows
Delete file before renaming another file to it

Reviewed-by: jjg
2011-09-01 14:35:59 -07:00
Suchen Chien
fd8978fa75 Added tag jdk8-b03 for changeset df130f34ab4c 2011-09-01 13:54:50 -07:00
Suchen Chien
ea16c13048 Added tag jdk8-b03 for changeset 11c81bbc7690 2011-09-01 13:54:38 -07:00
Suchen Chien
03730b799c Added tag jdk8-b03 for changeset 6126faad61f0 2011-09-01 13:54:32 -07:00
Suchen Chien
a481e029fa Added tag jdk8-b03 for changeset 7a7c32801316 2011-09-01 13:54:31 -07:00
Suchen Chien
463d10d607 Added tag jdk8-b03 for changeset 52cac2467a60 2011-09-01 13:54:24 -07:00
Suchen Chien
e0896d794e Added tag jdk8-b03 for changeset b2c1fbeecd43 2011-09-01 13:54:19 -07:00
Suchen Chien
5f1b3f48fa Added tag jdk8-b03 for changeset 987739a4fab0 2011-09-01 13:54:18 -07:00
Jan Lahoda
6f70d425f2 7073631: (javac) javac parser improvements for error position reporting
JavacParser improvements for NetBeans, improved by LangTools.

Reviewed-by: mcimadamore, jjg
2011-09-01 09:14:25 -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
Denis Fokin
4be64adddd 7081012: REGRESSION:Component.transferFocusBackward invokes clearGlobalFocusOwner()
Reviewed-by: ant
2011-09-01 17:29:37 +04:00
Chris Hegarty
bfeee8da4d 7041800: URI.equals may incorrectly return true with escaped octets
Reviewed-by: alanb, michaelm
2011-09-01 13:53:59 +01: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
Chris Hegarty
db62441424 7014860: Socket.getInputStream().available() not clear for shutdown input
Reviewed-by: alanb, michaelm
2011-09-01 06:45:00 +01:00
Tom Rodriguez
fa7c124af1 7083786: dead various dead chunks of code
Reviewed-by: iveresov, kvn
2011-08-31 16:46:11 -07:00
Jonathan Gibbons
654ae83d8e 7074416: Regression: JSR199: javac doesn't unwrap clientcodewrapper objects
Reviewed-by: mcimadamore
2011-08-31 15:39:00 -07:00
John Coomes
167b4fa4d4 Merge 2011-08-31 13:57:17 -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
Michael Fang
8256d8cf31 Merge 2011-08-31 09:56:44 -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
Maurizio Cimadamore
67f3781cb1 7079713: javac hangs when compiling a class that references a cyclically inherited class
Types.membersClosure needs to handle pathological cases of cyclic inheritance

Reviewed-by: jjg, jjh
2011-08-31 16:15:19 +01:00
Maurizio Cimadamore
68039c2904 7085024: internal error; cannot instantiate Foo
Types.isConvertible does not handle erroneous types correctly

Reviewed-by: jjg
2011-08-31 16:11:28 +01:00
Nils Loodin
2e7a0438c9 7067811: Update demo/sample code to state it should not be used for production
Added comment block after copyright block stating that code is unfit for production.

Reviewed-by: ohair
2011-08-31 13:48:04 +02: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
Weijun Wang
a37d582eec 7083664: test hard code of using c:/temp but this dir might not exist
Reviewed-by: xuelei, ohair
2011-08-31 09:22:50 +08: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
Sebastian Sickelmann
0a9fa0feb2 7084245: Update usages of InternalError to use exception chaining
To use new InternalError constructor with cause chainning

Reviewed-by: alanb, ksrini, xuelei, neugens
2011-08-30 11:53:11 -07:00
Michael McMahon
9d813bf7ac Merge 2011-08-30 14:41:12 +01:00
Jonathan Lu
57fd38b0aa 7084560: Crash in net.dll
Reviewed-by: chegar
2011-08-30 14:40:05 +01:00
Pavel Porvatov
dd72eca1bc 7080281: AbtsractButton.checkVerticalKey()/checkHorizontalKey() methods do not specify returned value
Reviewed-by: alexp
2011-08-30 13:07:13 +04: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
Weijun Wang
5dcff7325d 7083576: add javax/xml/crypto into jdk_security2
Reviewed-by: mullan
2011-08-30 10:46:27 +08: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
Michael Fang
9353ab1e01 Merge 2011-08-29 17:09:35 -07:00
Lana Steuck
c14374f7f5 Merge 2011-08-29 14:29:23 -07:00
Lana Steuck
1a53d47cf9 Merge 2011-08-29 14:27:21 -07:00
Lana Steuck
4d2687b413 Merge 2011-08-29 14:26:11 -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
Sean Mullan
570739157d Merge 2011-08-29 12:23:54 -04:00
Sean Mullan
e96d7e3af4 7024771: "\\<>" in attribute value part of X500Principal constructor parameter makes strange effect
Reviewed-by: vinnie
2011-08-29 12:22:06 -04:00
Xue-Lei Andrew Fan
8e853c8484 7059542: JNDI name operations should be locale independent
Reviewed-by: weijun
2011-08-29 05:55:26 -07:00
Pavel Porvatov
1dbae5e7cf 7030332: Default borders in tables looks incorrect JEditorPane
Reviewed-by: peterz
2011-08-29 16:25:04 +04: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
Alan Bateman
cf6e15a2e3 7060790: (fs) FileSystem.newWatchService error message confusing when maximum inotify descriptors reached
Reviewed-by: forax
2011-08-27 15:40:45 +01:00
Sebastian Sickelmann
ca2767a5d3 7084040: Clearup warning in HttpsURLConnection
Reviewed-by: xuelei
2011-08-27 02:17:33 -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
Alejandro Murillo
d475b8efcb 7083916: Bump the hs22 build number to 03
Reviewed-by: jcoomes
2011-08-26 16:11:25 -07:00
Xueming Shen
580eaf6b7a Merge 2011-08-26 15:40:32 -07:00
Xueming Shen
2825119dca 7077769: (zipfs) ZipFileSystem.writeCEN() writes wrong "data size" for ZIP64 extended information extra field
Fixed the wrong size when writing out the cen table for ZIP64

Reviewed-by: alanb
2011-08-26 15:36:21 -07:00
Kurchi Subhra Hazra
f953b5c397 7060243: (dc) Multicasting tests fail on Windows XP if IPv6 is enabled
Reviewed-by: alanb
2011-08-26 22:24:12 +01: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
Sean Coffey
90502358ad 7024697: SessionRef.dispose() should determine if the token referred to by the token object is still valid
Reviewed-by: valeriep
2011-08-26 10:47:09 +01: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
Vladimir Kozlov
fa7cc07ca0 Merge 2011-08-25 18:56:52 -07:00
Suchen Chien
4198da6308 Added tag jdk8-b02 for changeset 88a0fd8156da 2011-08-25 17:18:25 -07:00
Suchen Chien
103c7b0383 Added tag jdk8-b02 for changeset c36bd96ae005 2011-08-25 17:18:12 -07:00
Suchen Chien
acdf03d87f Added tag jdk8-b02 for changeset 776899fe4bff 2011-08-25 17:18:07 -07:00
Suchen Chien
db1cefbdf4 Added tag jdk8-b02 for changeset 201b3cac405d 2011-08-25 17:18:06 -07:00
Suchen Chien
7e98ef4f0e Added tag jdk8-b02 for changeset 4c6704d59ad1 2011-08-25 17:17:59 -07:00
Suchen Chien
466b62e73a Added tag jdk8-b02 for changeset 7ec2456168bc 2011-08-25 17:17:54 -07:00
Suchen Chien
4506feffa2 Added tag jdk8-b02 for changeset e9e28bfc0fe8 2011-08-25 17:17:52 -07:00
Joe Darcy
099b9b9198 7082727: VirtualMachineError should declare its serialVersionUID
Reviewed-by: alanb
2011-08-25 09:42:50 -07:00
Kurchi Subhra Hazra
72c1f57f87 7044870: java/nio/channels/DatagramChannel/SelectWhenRefused.java failed on SUSE Linux 10
Reviewed-by: alanb, chegar
2011-08-25 16:08:31 +01: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
Suchen Chien
9391671fa7 Merge 2011-08-24 13:50:03 -07:00
Joe Darcy
f31cad1b9e 7082231: Put a @since 1.7 on System.lineSeparator
Reviewed-by: mduigou
2011-08-23 16:35:05 -07:00
Steve Poole
a5751d5e01 7068328: BufferPoolMXBean and PlatformLoggingMXBean getObjectName may return null
Reviewed-by: alanb
2011-08-23 10:35:50 -07:00
Denis Fokin
2e4089a2c2 7072645: Toolkit.addPropertyChangeListener(name, pcl) throws NPE for null name
Reviewed-by: art
2011-08-23 17:56:14 +04:00
Bengt Rutisson
0c6ad2c298 7082220: Visual Studio projects broken after change 7016797: Hotspot: securely/restrictive load dlls and new
Add the psapi.lib library to Visual Studio projects

Reviewed-by: jwilhelm, poonam, kamg
2011-08-23 11:06:30 +02:00
Y. Srinivas Ramakrishna
4df87be52f Merge 2011-08-22 23:57:10 -07:00
Xue-Lei Andrew Fan
243a5f3b79 7081817: test/sun/security/provider/certpath/X509CertPath/IllegalCertiticates.java failing
Reviewed-by: alanb, weijun
2011-08-22 18:21:43 -07:00
Joe Darcy
a0f3a629c5 7080038: (ann) Serializable types in sun.reflect.annotation do not declare serialVersionUIDs
Reviewed-by: alanb
2011-08-22 17:34:30 -07:00
Joe Darcy
d0bd4f51ce 6476261: (reflect) GenericSignatureFormatError When signature includes nested inner classes
6832374: (reflect) malformed signature can cause parser to go into infinite loop
7052898: (reflect) SignatureParser will accept strings outside of the grammar

Various signature parsing fixes; additional review by sonali.goel@oracle.com

Reviewed-by: alanb
2011-08-22 17:12:48 -07:00
Y. Srinivas Ramakrishna
3af2ea16d6 6810861: G1: support -XX:+{PrintClassHistogram,HeapDump}{Before,After}FullGC
Call {pre,post}_full_gc_dump() before and after a STW full gc of G1CollectedHeap. Also adjusted the prefix message, including the addition of missing whitespace.

Reviewed-by: brutisso, tonyp
2011-08-22 12:30:06 -07:00
Sebastian Sickelmann
765c6904e3 7080020: Add conventional constructors to InternalError and VirtualMachineError
Reviewed-by: darcy
2011-08-22 12:16:12 -07:00
Vladimir Kozlov
85b4875e2e 7081926: assert(VM_Version::supports_sse2()) failed: must support
Fix assert, prefetchnta is supported since SSE not SSE2.

Reviewed-by: never
2011-08-22 11:00:39 -07:00
Alan Bateman
92aac562e6 Merge 2011-08-22 16:05:38 +01:00
Alan Bateman
ec94102c63 7081813: ProblemList.txt updates (8/2011)
Reviewed-by: weijun, mchung
2011-08-22 16:04:04 +01:00
Antonios Printezis
2cbacf440a 7081064: G1: remove develop params G1FixedSurvivorSpaceSize, G1FixedTenuringThreshold, and G1FixedEdenSize
Remove three develop parameters we don't use.

Reviewed-by: brutisso, jwilhelm
2011-08-22 10:16:33 -04:00
Sean Chou
3217c0283e 7023713: HttpCookie.domainMatches("hostname.local", "hostname") should return true
Reviewed-by: chegar
2011-08-22 14:09:28 +01:00
Alan Bateman
f072f34631 7081796: (ch) rawtype warning in sun.nio.ch.InheritedChannel
Reviewed-by: chegar
2011-08-22 11:35:11 +01:00
Vladimir Kozlov
b4082c3cd1 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
Run test only on systems with 2Gbyte or more memory. Don't zap heap to reduce execution time.

Reviewed-by: iveresov
2011-08-20 14:03:12 -07:00
Joe Darcy
00983b3008 4748706: typos in java.util.Observable documentation
Reviewed-by: iris
2011-08-19 17:42:24 -07:00
John Coomes
4af11eb3ae 7081251: bump the hs22 build number to 02
Reviewed-by: johnc
2011-08-19 14:22:25 -07:00
John Coomes
af31d0cf27 Merge 2011-08-19 14:08:18 -07:00
Vladimir Kozlov
2cfb876ce7 Merge 2011-08-19 08:55:53 -07:00
Jing LV
03dca291aa 7025938: Add bitmap mime type to content-types.properties
Reviewed-by: chegar, alanb, michaelm
2011-08-19 10:55:05 +01:00
Bengt Rutisson
6fdb1414fa 6814390: G1: remove the concept of non-generational G1
Removed the possibility to turn off generational mode for G1.

Reviewed-by: johnc, ysr, tonyp
2011-08-19 09:30:59 +02:00
Weijun Wang
f09e1c6f2d 7043847: NTML impl of SaslServer throws UnsupportedOperationException from (un)wrap method
7043860: NTML impl of SaslServer doesn't throw ISE from getAuthorizationID() method
7043882: NTML impl of SaslServer doesn't throw ISE from getNegotiatedProperty() method
7043938: NTML impl of SaslClientFactory throws NPE instead of SaslException
7043959: NTML impl of SaslClientFactory throws NPE for null CallBackHandler instance

Reviewed-by: vinnie
2011-08-19 13:42:40 +08:00
Christine Lu
700b93fe42 Added tag jdk8-b01 for changeset cca843a7d258 2011-08-18 18:55:34 -07:00
Christine Lu
e0ebaf2365 Added tag jdk8-b01 for changeset c044acdfb900 2011-08-18 18:55:25 -07:00
Christine Lu
87c82d8088 Added tag jdk8-b01 for changeset f8eee974ce44 2011-08-18 18:55:18 -07:00
Christine Lu
5cd44b95ad Added tag jdk8-b01 for changeset 1df939041fc6 2011-08-18 18:55:17 -07:00
Christine Lu
30265a42fd Added tag jdk8-b01 for changeset 2143c41c2a90 2011-08-18 18:55:12 -07:00
Christine Lu
af2f8f0912 Added tag jdk8-b01 for changeset a3a3c58b415c 2011-08-18 18:55:08 -07:00
Christine Lu
d84f0a188d Added tag jdk8-b01 for changeset dd03729633cc 2011-08-18 18:55:03 -07:00
Vladimir Kozlov
ff4faaab4b 7080431: VM asserts if specified size(x) in .ad is larger than emitted size
Move code from finalize_offsets_and_shorten() to fill_buffer() to restore previous behavior.

Reviewed-by: never
2011-08-18 11:49:33 -07:00
Alan Bateman
9c5193ff42 7015589: (spec) BufferedWriter.close leaves stream open if close of underlying Writer fails
Reviewed-by: forax, mduigou
2011-08-18 16:47:20 +01:00
Lana Steuck
dfb9afd36b Merge 2011-08-17 22:47:49 -07:00
Lana Steuck
c1db9a4de0 Merge 2011-08-17 22:47:37 -07:00
Lana Steuck
7c6bbdcd3e Merge 2011-08-17 22:47:12 -07:00
Xueming Shen
cce243ac06 7066490: @since 1.7 tag is missing for java.util.regex.Matcher.group(java.lang.String)
Added the @since 1.7 tag

Reviewed-by: mduigou, forax
2011-08-17 15:18:16 -07:00
Xueming Shen
2304b235a1 Merge 2011-08-17 14:18:30 -07:00
Michael Fang
614fdf63b3 Merge 2011-08-17 14:18:26 -07:00
Xueming Shen
0ec73ca081 6237353: Remove sun.io package from j2se binary
Removed sun.io package and related test cases

Reviewed-by: alanb
2011-08-17 14:14:21 -07:00
Christian Thalinger
db338313bf 7079769: JSR 292: incorrect size() for CallStaticJavaHandle on sparc
Reviewed-by: never, kvn
2011-08-17 11:52:22 -07:00
Charles Lee
7053ed12e3 7032436: When running with the Nimbus look and feel, the JFileChooser does not display mnemonics
Reviewed-by: alexp
2011-08-17 20:08:28 +04:00
Pavel Porvatov
4883eafc10 7075563: Broken link in "javax.swing.SwingWorker"
Reviewed-by: alexp
2011-08-17 19:35:09 +04:00
Christian Thalinger
fc31a8e0b9 7079626: x64 emits unnecessary REX prefix
Reviewed-by: kvn, iveresov, never
2011-08-17 05:14:43 -07:00
Gary Collins
d164c986b5 Merge 2011-08-17 07:05:42 -04:00
Vladimir Kozlov
90651b2666 7079329: Adjust allocation prefetching for T4
On T4 2 BIS instructions should be issued to prefetch 64 bytes

Reviewed-by: iveresov, phh, twisti
2011-08-16 16:59:46 -07:00
Vladimir Kozlov
080f790edc 7079317: Incorrect branch's destination block in PrintoOptoAssembly output
Save/restore label and block in scratch_emit_size()

Reviewed-by: never
2011-08-16 11:53:57 -07:00
Y. Srinivas Ramakrishna
183a935fcb Merge 2011-08-16 08:02:29 -07:00
Zhengyu Gu
1b7f659a43 Merge 2011-08-16 09:18:47 -04:00
Christian Thalinger
134c40b4db 7071653: JSR 292: call site change notification should be pushed not pulled
Reviewed-by: kvn, never, bdelsart
2011-08-16 04:14:05 -07:00
Weijun Wang
f661cbe157 7079204: add several security and networking tests to problems list
Reviewed-by: smarks
2011-08-16 08:53:03 +08:00
Alexandre Boulgakov
45b0a4eb00 7077389: Reflection classes do not build with javac -Xlint:all -Werror
Reviewed-by: darcy
2011-08-15 17:17:21 -07:00
Jonathan Gibbons
fe76ef7825 Merge 2011-08-17 12:10:53 -07:00
Naoto Sato
9cc89c7e8c 7079486: Locale.getDisplayScript() (no args) does not honor default DISPLAY locale
Reviewed-by: okutsu
2011-08-17 11:09:20 -07:00
Naoto Sato
750b4876ce 7073906: Locale.getDefault() returns wrong Locale for Java SE 7
Reviewed-by: okutsu
2011-08-17 11:09:06 -07:00
Alexandre Boulgakov
0c5879c7e2 7079606: tl nightly build failure due to incomplete generification
Reviewed-by: jjg
2011-08-17 05:41:20 -07:00
Alexandre Boulgakov
598c79031d 7064075: Security libraries don't build with javac -Xlint:all,-deprecation -Werror
Reviewed-by: xuelei, mullan
2011-08-15 11:48:20 -07:00
Joe Darcy
38afb5138c 4850225: Integer.getInteger() : Bad reference to getProperty?
Reviewed-by: lancea
2011-08-15 12:56:01 -07:00
Xue-Lei Andrew Fan
44f30c463a 7063647: To use synchronized map in key manager
Reviewed-by: wetmore, weijun
2011-08-15 00:30:35 -07:00
Yong Jeffrey Huang
f5cc085a5b 7066203: Update currency data to the latest ISO 4217 standard
Reviewed-by: naoto
2011-08-14 23:46:08 -07:00
Weijun Wang
444f4d009b 7079144: concise_jarsigner.sh test often fails on solaris
Reviewed-by: xuelei
2011-08-15 11:43:09 +08:00
Weijun Wang
f769f7067f 7078816: /test/sun/security/pkcs11/KeyStore/SecretKeysBasic.sh failure
Reviewed-by: alanb
2011-08-15 10:42:41 +08:00
Stuart Marks
fb01d942c3 7076526: add test MemoryMXBean/CollectionUsageThreshold to the problem list
Reviewed-by: weijun, alanb
2011-08-12 14:51:48 -07:00
Joe Darcy
0cb631bf43 4900206: Include worst-case rounding tests for Math library functions
Reviewed-by: alanb
2011-08-12 13:36:39 -07:00
Phil Race
0ce97f4ec8 7077423: Enable Xrender by default
Reviewed-by: bae, jgodinez, ceisserer
2011-08-12 09:48:09 -07:00
Antonios Printezis
f482091133 7039627: G1: avoid BOT updates for survivor allocations and dirty survivor regions incrementally
Refactor the allocation code during GC to use the G1AllocRegion abstraction. Use separate subclasses of G1AllocRegion for survivor and old regions. Avoid BOT updates and dirty survivor cards incrementally for the former.

Reviewed-by: brutisso, johnc, ysr
2011-08-12 11:31:06 -04:00
Weijun Wang
16f1845614 7078355: sun/net/www/protocol/file/DirPermissionDenied.sh leaves garbage on some linux systems
Reviewed-by: chegar
2011-08-12 21:04:50 +08:00
Pavel Porvatov
382ff0afff 7071609: javax/swing/JPopupMenu/6694823/bug6694823.java failed on solaris10
Reviewed-by: alexp
2011-08-12 15:53:29 +04:00
Weijun Wang
610c9dd4e3 7055363: jdk_security3 test target cleanup
Reviewed-by: alanb, xuelei
2011-08-12 12:26:31 +08:00
Weijun Wang
d159e01aeb 7076415: sun/security/krb5/runNameEquals.sh failed on sles 10
Reviewed-by: xuelei
2011-08-12 11:20:45 +08:00
Alexandre Boulgakov
fc028c77ba 7077672: jdk8_tl nightly fail in step-2 build on 8/10/11
Reviewed-by: mchung, jjg
2011-08-11 13:34:25 -07:00
Vladimir Kozlov
ac99f413d7 7063629: use cbcond in C2 generated code on T4
Use new short branch instruction in C2 generated code.

Reviewed-by: never
2011-08-11 12:08:11 -07:00
John Cuthbertson
0da9dc64d2 7074579: G1: JVM crash with JDK7 running ATG CRMDemo Fusion App
Handlize MemoryUsage klass oop in createGCInfo routine

Reviewed-by: tonyp, fparain, ysr, jcoomes
2011-08-11 11:36:29 -07:00
Kevin Walls
e6603b37f2 Merge 2011-08-11 14:58:29 +01:00
Sean Coffey
c26005b40e 7047325: Internal API to improve management of direct buffers
Reviewed-by: alanb, mduigou
2011-08-11 12:40:24 +01:00
Vladimir Kozlov
52f678435a 7077439: Possible reference through NULL in loopPredicate.cpp:726
Use cl->is_valid_counted_loop() check.

Reviewed-by: never
2011-08-10 14:06:57 -07:00
Alexandre Boulgakov
1fb6680207 7072353: JNDI libraries do not build with javac -Xlint:all -Werror
Reviewed-by: xuelei
2011-08-10 13:44:58 -07:00
Patrick Reinhart
c7b1e7e929 7077451: SerialLob, SerialClob have the wrong checks for setStream methods
Reviewed-by: alanb
2011-08-10 16:23:56 -04:00
Chris Hegarty
59d409ada5 7076523: TEST_BUG: test/java/net/NetworkInterface/NetParamsTest.java can fail with NPE
Reviewed-by: alanb
2011-08-10 12:30:29 +01:00
Andrew Haley
aefb3a004f 7073913: The fix for 7017193 causes segfaults
Buffer overflow in os::get_line_chars

Reviewed-by: coleenp, dholmes, dcubed
2011-08-10 15:04:21 +04:00
Lana Steuck
a98318b827 Merge 2011-08-09 17:38:52 -07:00
Chris Hegarty
d011e3ddeb 7076756: TEST_BUG: com/sun/jdi/BreakpointWithFullGC.sh fails to cleanup in Cygwin
Reviewed-by: alanb, dcubed
2011-08-09 16:59:44 +01:00
Chris Hegarty
ac490e2fce 7073295: TEST_BUG: test/java/lang/instrument/ManifestTest.sh causing havoc (win)
Reviewed-by: mchung
2011-08-09 16:39:04 +01: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
Mandy Chung
a6a40fcabe 7012365: TEST_BUG: test/java/nio/charset/spi/basic.sh can be run with Cygwin
Reviewed-by: darcy
2011-08-08 16:27:41 -07:00
Mandy Chung
ebe985c1ec 7036518: TEST_BUG: add cygwin support to test/java/nio/charset/coders/CheckSJISMappingProp.sh
7036519: TEST_BUG: add cygwin support to test/demo/zipfs/basic.sh

Reviewed-by: sherman
2011-08-08 16:26:25 -07:00
Joe Darcy
2aa1b6d565 6380161: (reflect) Exception from newInstance() not chained to cause
Reviewed-by: dholmes, lancea, forax
2011-08-08 09:07:43 -07:00
Neil Richards
5acfe8c521 7076215: (jli) jdk/src/share/bin/jli_util.h should include function prototypes for str functions
Reviewed-by: alanb
2011-08-08 13:20:16 +01:00
Lana Steuck
ce5e4f10dd Merge 2011-08-07 17:03:46 -07:00
Joe Darcy
24e63f385c 7075098: Remove unused fdlibm files
Reviewed-by: alanb, mduigou
2011-08-06 14:35:58 -07:00
Kumar Srinivasan
8b16f518cb 7064544: (javadoc) miscellaneous fixes requested by netbeans
Contributed by netbeans team, modified to suit by the langtools team.

Reviewed-by: jjg, bpatel
2011-08-05 19:41:05 -07:00
Andrew John Hughes
c4b791d93a 7060836: RHEL 5.5 and 5.6 should support UseNUMA
Add a wrapper for sched_getcpu() for systems where libc lacks it

Reviewed-by: ysr
2011-08-05 16:50:14 -07:00
Igor Veresov
427c404400 7060842: UseNUMA crash with UseHugreTLBFS running SPECjvm2008
Use mmap() instead of madvise(MADV_DONTNEED) to uncommit pages

Reviewed-by: ysr
2011-08-05 16:44:01 -07:00
Lana Steuck
c25444afe2 Merge 2011-08-05 16:03:00 -07:00
Jonathan Gibbons
4cd6c8c31e 7074189: some javac tests fail with latest jtreg 4.1 b03
Reviewed-by: darcy
2011-08-05 15:57:59 -07:00
Lana Steuck
6f1fb5f81b Merge 2011-08-05 15:35:04 -07:00
Joe Darcy
dba9612ad9 7071246: Enclosing string literal in parenthesis in switch-case crashes javac
Reviewed-by: mcimadamore
2011-08-04 11:15:37 -07:00
Mike Duigou
80af4650a8 7073296: Executable.equalParamTypes() incorrectly returns true when the number of params differs
Reviewed-by: alanb, darcy
2011-08-04 08:53:16 -07:00
Weijun Wang
840e8200ad 7061379: [Kerberos] Cross-realm authentication fails, due to nameType problem
Reviewed-by: valeriep
2011-08-04 18:18:45 +08:00
Pavel Porvatov
f86996535a 7072328: Sun URL in the MetalLookAndFeel.getLayoutStyle() specification should be replaced with Oracle one
Reviewed-by: peterz
2011-08-03 16:59:23 +04:00
John Cuthbertson
f7d3d2b63e 7069863: G1: SIGSEGV running SPECjbb2011 and -UseBiasedLocking
Align the reserved size of the heap and perm to the heap region size to get a preferred heap base that is aligned to the region size, and call the correct heap reservation constructor. Also add a check in the heap reservation code that the reserved space starts at the requested address (if any).

Reviewed-by: kvn, ysr
2011-08-02 12:13:13 -07:00
Roland Westrelin
b543a07b9a 7074017: Introduce MemBarAcquireLock/MemBarReleaseLock nodes for monitor enter/exit code paths
Replace MemBarAcquire/MemBarRelease nodes on the monitor enter/exit code paths with new MemBarAcquireLock/MemBarReleaseLock nodes

Reviewed-by: kvn, twisti
2011-08-02 18:36:40 +02:00
Tom Rodriguez
9cd1a00e3f 7075623: 6990212 broke raiseException in 64 bit
Reviewed-by: kvn, twisti
2011-08-08 13:19:46 -07:00
Chris Phillips
6a54c8a55f 7071823: Zero: zero/shark doesn't build after b147-fcs
Reviewed-by: gbenson, twisti
2011-08-08 05:49:04 -07:00
Vladimir Kozlov
5ad0c2a370 7075559: JPRT windows_x64 build failure
Use SA_CLASSDIR variable instead of dirsctory saclasses.

Reviewed-by: kamg, dcubed
2011-08-06 08:28:08 -07:00
Krystal Mok
24e8905fdf 7072527: CMS: JMM GC counters overcount in some cases
Avoid overcounting when CMS has concurrent mode failure.

Reviewed-by: ysr
2011-08-02 14:37:35 +01:00
Lana Steuck
645d027b78 Merge 2011-08-01 17:40:38 -07:00
John Cuthbertson
144fb9dc25 7068240: G1: Long "parallel other time" and "ext root scanning" when running specific benchmark
In root processing, move the scanning of the reference processor's discovered lists to before RSet updating and scanning. When scanning the reference processor's discovered lists, use a buffering closure so that the time spent copying any reference object is correctly attributed. Also removed a couple of unused and irrelevant timers.

Reviewed-by: ysr, jmasa
2011-08-01 10:04:28 -07:00
Sergey Bylokhov
ceb052fc3f 7068060: closed/java/awt/MenuBar/MenuBarSetFont/MenuBarSetFont.java failed on windows
Reviewed-by: art, dcherepanov
2011-08-01 17:05:16 +04:00
Kurchi Subhra Hazra
8083d3a875 6978200: ServerSocket.toString include "port=0" in the returned String
Removal of "port=0" from ServerSocket.toString method

Reviewed-by: alanb, chegar
2011-07-29 10:55:21 -07:00
Alexandre Boulgakov
abdf98fef8 7072523: java.math should be built with javac -Xlint:all -Werror
Reviewed-by: darcy
2011-07-29 16:45:37 -07:00
Vladimir Kozlov
df8d608ac7 7068051: SIGSEGV in PhaseIdealLoop::build_loop_late_post
Removed predicate cloning from loop peeling optimization and from split fall-in paths.

Reviewed-by: never
2011-07-29 09:16:29 -07:00
Xue-Lei Andrew Fan
2ee0410a0c 7068662: Reserve and restore the default locale
Reviewed-by: alanb, weijun
2011-07-29 02:50:58 -07:00
Alexandre Boulgakov
d5e142fba4 7068616: NIO libraries do not build with javac -Xlint:all,-deprecation -Werror
Reviewed-by: alanb, chegar
2011-07-28 13:34:31 -07:00
Tom Rodriguez
e30a679033 7060619: C1 should respect inline and dontinline directives from CompilerOracle
Reviewed-by: kvn, iveresov
2011-07-28 13:03:39 -07:00
Andrew John Hughes
28383f3e18 7072341: enable hotspot builds on Linux 3.0
Add "3" to list of allowable versions

Reviewed-by: kamg, chrisphi
2011-07-28 14:10:21 -04:00
Pavel Porvatov
eeacd60822 7071166: LayoutStyle.getPreferredGap() - IAE is expected but not thrown
Reviewed-by: peterz
2011-07-28 18:24:54 +04:00
Pavel Porvatov
6abadbf15a 6995769: occasion NPE thrown from SwingUtilities.computeIntersection()
Reviewed-by: alexp
2011-07-28 18:13:17 +04:00
Xerxes Ranby
23b10ec618 7066143: JSR 292: Zero support after regressions from 7009923 and 7009309
Reviewed-by: jrose, twisti
2011-07-28 02:14:44 -07:00
Lana Steuck
6960817595 Merge 2011-07-27 22:42:19 -07:00
Vladimir Kozlov
18329266ea 7069452: Cleanup NodeFlags
Remove flags which duplicate information in Node::NodeClasses.

Reviewed-by: never
2011-07-27 17:28:36 -07:00
Tom Rodriguez
c895368552 7071427: AdapterFingerPrint can hold 8 entries per int
Reviewed-by: kvn
2011-07-27 15:06:35 -07:00
Kumar Srinivasan
53abe0d254 7068902: (javac) allow enabling or disabling of String folding
Contributed by netbeans team, modified to suit by the langtools team.

Reviewed-by: jjg, mcimadamore
2011-07-27 11:53:17 -07:00
Maurizio Cimadamore
5c209a7d2d 7057297: Project Coin: diamond erroneously accepts in array initializer expressions
Diamond in array initializer expressions should be rejected

Reviewed-by: jjg
2011-07-27 19:01:33 +01:00
Maurizio Cimadamore
02802c9449 7046778: Project Coin: problem with diamond and member inner classes
Diamond inference generates spurious error messages when target type is a member inner class

Reviewed-by: jjg
2011-07-27 19:01:08 +01:00
Maurizio Cimadamore
af30a2dbf3 7062745: Regression: difference in overload resolution when two methods are maximally specific
Fix most specific when two methods are maximally specific and only one has non-raw return type

Reviewed-by: jjg, dlsmith
2011-07-27 19:00:53 +01:00
Chris Hegarty
281db94b24 6670868: StackOverFlow with bad authenticated Proxy tunnels
Reviewed-by: michaelm
2011-07-27 18:10:10 +01:00
Vladimir Kozlov
dd43791e4a 7070134: Hotspot crashes with sigsegv from PorterStemmer
Do not move data nodes which are attached to a predicate test to a dominating test.

Reviewed-by: never
2011-07-26 19:35:23 -07:00
Mario Torre
18fbb54873 7071275: Fix jdk7 references in README files, remove Forest Extension mentions
Change documentation to remove reference to forest and reflect update to jdk8.

Reviewed-by: ohair
2011-07-26 21:54:25 +02:00
Mario Torre
e95d21a2bf 7070155: A small refactoring patch for the abstract RenderingEngine
Simplify code by using ReflectiveOperationException instead of 3 ignored catch blocks

Reviewed-by: prr
2011-07-26 21:34:25 +02:00
Alexandre Boulgakov
545b41c9ab 7069870: Parts of the JDK erroneously rely on generic array initializers with diamond
Reviewed-by: ksrini, mcimadamore
2011-07-25 16:20:39 -07:00
Kurchi Subhra Hazra
05387aad77 7035556: DatagramSocket.java:183: warning: unreachable catch clause
Remove redundant catches in bind

Reviewed-by: alanb, michaelm, wetmore, chegar
2011-07-25 14:35:13 -07:00
Abhijit Saha
5fb55770ff 7046794: Configurable behavior for server-side stacktraces
Reviewed-by: ramap
2011-07-25 11:38:25 -07:00
Coleen Phillimore
3e1a7d0e17 Merge 2011-07-23 10:42:20 -04:00
Erik Trimble
98bbf6a045 7070061: Adjust Hotspot make/jprt.properties for new JDK8 settings
Fix so the JPRT can build with -release jdk8 now

Reviewed-by: ohair
2011-07-22 23:42:46 -07:00
Erik Trimble
25bac45a67 7069176: Update the JDK version numbers in Hotspot for JDK 8
Change JDK_MINOR_VER and JDK_PREVIOUS_VERSION to reflect JDK8 values

Reviewed-by: jcoomes
2011-07-22 23:47:17 -07:00
Erik Trimble
4a81ae28b7 Merge 2011-07-23 01:56:51 -07:00
Kelly O'Hair
a6cbb46a23 Merge 2011-07-22 21:31:14 -07:00
Kelly O'Hair
45bcef756e Merge 2011-07-22 21:31:12 -07:00
Kelly O'Hair
f6ad1656c0 Merge 2011-07-22 21:31:05 -07:00
Kelly O'Hair
5ed600c64e 7069993: Adjust make/jprt.properties file for jdk8
Reviewed-by: katleman
2011-07-22 17:35:54 -07:00
Kelly O'Hair
b98e69d69b 7069993: Adjust make/jprt.properties file for jdk8
Reviewed-by: katleman
2011-07-22 17:35:39 -07:00
Kelly O'Hair
a6b33d5a4a 7069993: Adjust make/jprt.properties file for jdk8
Reviewed-by: katleman
2011-07-22 17:35:20 -07:00
Kelly O'Hair
d615775c53 7069993: Adjust make/jprt.properties file for jdk8
Reviewed-by: katleman
2011-07-22 17:35:04 -07:00
Kelly O'Hair
59802b7329 7069993: Adjust make/jprt.properties file for jdk8
Reviewed-by: katleman
2011-07-22 17:34:49 -07:00
Kelly O'Hair
ef74b1c19f 7069993: Adjust make/jprt.properties file for jdk8
Reviewed-by: katleman
2011-07-22 17:34:04 -07:00
Denis Fokin
096686792a 7019773: AWTKeyStroke.ctor is a mutable static
Reviewed-by: art
2011-07-22 21:14:56 +04:00
David Holmes
536904f7d3 7046490: Preallocated OOME objects should obey Throwable stack trace protocol
Update the OOME stacktrace to contain Throwable.UNASSIGNED_STACK when the backtrace is filled in

Reviewed-by: mchung, phh
2011-07-22 00:29:01 -07:00
Weijun Wang
a87de29538 6330275: Rework the PaddingTest regression test
Reviewed-by: wetmore, smarks
2011-07-22 10:25:46 +08:00
Vladimir Kozlov
48c1293916 7063628: Use cbcond on T4
Add new short branch instruction to Hotspot sparc assembler.

Reviewed-by: never, twisti, jrose
2011-07-21 11:25:07 -07:00
Chris Hegarty
b59690c5a0 7068416: Lightweight HTTP Server should support TCP_NODELAY
Reviewed-by: alanb, michaelm
2011-07-21 17:28:10 +01:00
Tom Rodriguez
aa16309657 7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
Reviewed-by: kvn, twisti, jrose
2011-07-21 08:38:25 -07:00
Igor Veresov
aa89b8c08d 7066339: Tiered: policy should make consistent decisions about osr levels
Added feedback disabling flag to common(), fixed handling of TieredStopAtLevel.

Reviewed-by: kvn, never
2011-07-20 18:04:17 -07: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
Alexandre Boulgakov
a9a95f25de 7068617: Core libraries don't build with javac -Xlint:all -Werror
Reviewed-by: darcy
2011-07-20 12:19:41 -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
Andrew Brygin
6a627fd128 7044285: 64 bit VM crashes in Java_sun_java2d_loops_MaskFill_MaskFill
Reviewed-by: jgodinez, prr
2011-07-20 16:18:08 +04:00
Xue-Lei Andrew Fan
7b1c8be3d3 7065972: Some race condition may happen in SSLSocketImpl class
Reviewed-by: wetmore, weijun, dgu
2011-07-19 21:47:23 -07:00
Joe Darcy
f106ea9ed6 7007535: (reflect) Please generalize Constructor and Method
Reviewed-by: mduigou, peterjones, dholmes, andrew
2011-07-19 17:45:11 -07:00
Steve Poole
4ea3a97967 7068471: NPE in sun.font.FontConfigManager.getFontConfigFont() when libfontconfig.so is not installed
Reviewed-by: jgodinez, prr
2011-07-19 14:09:25 -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
2b42b78393 7067922: (launcher) java -jar throws NPE if JAR file does not contain Main-Class attribute
Reviewed-by: darcy, ohair, alanb, mduigou
2011-07-19 10:58:50 -07:00
Xue-Lei Andrew Fan
07381cf2d4 7059709: close the IO in a final block
Reviewed-by: smarks, mullan, wetmore
2011-07-19 08:21:05 -07:00
Chris Hegarty
39aba3b4cf 7021280: SocketPermission should accept wildcards
Reviewed-by: michaelm
2011-07-18 22:25:58 +01:00
Pavel Porvatov
d8fd6d70de 7031941: Use generificated JComboBox and JList in core libraries
Reviewed-by: alexp
2011-07-18 18:21:31 +04:00
Pavel Porvatov
394accda4a 6509273: Password in JPasswordField gets Printed in clear text
Reviewed-by: alexp
2011-07-18 17:40:12 +04:00
Alan Bateman
c51b78d5de 7068059: Update jdk/test/ProblemList.txt
Reviewed-by: mchung, chegar
2011-07-18 13:10:02 +01:00
Joe Darcy
e2b3aaa728 7062430: Minor inconsistency in ulp descriptions
Reviewed-by: smarks, alanb
2011-07-17 18:53:40 -07:00
Coleen Phillimore
0d6e53412e Merge 2011-07-16 22:21:39 -04:00
John R Rose
ee85a30479 6983728: JSR 292 remove argument count limitations
Remove workarounds and limitations from before 6939861.

Reviewed-by: never
2011-07-16 15:47:53 -07:00
John R Rose
8b3e857aab 7058651: JSR 292 unit tests need a refresh
Enhancements to unit tests.

Reviewed-by: never, twisti
2011-07-16 15:44:33 -07:00
John R Rose
30257105cb 7058630: JSR 292 method handle proxy violates contract for Object methods
Reviewed-by: never, twisti
2011-07-16 15:40:13 -07:00
Kumar Srinivasan
a4ca103a59 7062969: java -help still shows http://java.sun.com/javase/reference
Reviewed-by: ohair, darcy
2011-07-15 16:38:41 -07:00
Tom Rodriguez
8acdd5ce55 6990212: JSR 292 JVMTI MethodEnter hook is not called for JSR 292 bootstrap and target methods
Check for single stepping when dispatching invokes from method handles

Reviewed-by: coleenp, twisti, kvn, dsamersoff
2011-07-15 15:35:50 -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
Sergey Bylokhov
100d734981 4717864: setFont() does not update Fonts of Menus already on screen
Reviewed-by: art, bagiras
2011-07-15 19:25:06 +04:00
Sergey Bylokhov
d2567eb057 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
Reviewed-by: art, anthony
2011-07-15 19:24:09 +04:00
Sergey Bylokhov
8dd448e6b8 6596915: JCK-runtime-6a/tests/api/java_awt/Component/index.html tesPaintAll fails
Reviewed-by: art, dcherepanov, anthony
2011-07-15 19:23:03 +04:00
Sergey Bylokhov
787c2d3671 7043815: AWT-XAWT - AWT-EventQueue-0 deadlock
Reviewed-by: art, dcherepanov
2011-07-15 19:19:33 +04:00
Sergey Bylokhov
d027ff2530 7043679: Wrong class name is used in Java_sun_awt_windows_WPrinterJob_initIDs
Reviewed-by: dav, art
2011-07-15 19:18:38 +04:00
Pavel Porvatov
877f2dea32 4909150: WindowsTreeUI can cause NullPointerException occasionally
Reviewed-by: alexp
2011-07-15 14:43:22 +04:00
Lana Steuck
d77b9c2ff6 Merge 2011-07-14 18:58:27 -07:00
Lana Steuck
ad248b8245 Merge 2011-07-14 18:57:55 -07:00
Lana Steuck
17265ac3e3 Merge 2011-07-14 18:56:42 -07:00
Vladimir Kozlov
cf91e8dbca 7067288: compiler regression test Test7052494 timeouts with client VM
Test is modified to reduce number of iterations in test5() and test6().

Reviewed-by: never, iveresov
2011-07-14 15:39:40 -07:00
Vladimir Kozlov
fcc8abec1e Merge 2011-07-13 10:48:42 -07:00
Doug Lea
517763ddf1 7057320: test/java/util/concurrent/Executors/AutoShutdown.java failing intermittently
Add retry/timeout for checking activeCount

Reviewed-by: chegar
2011-07-13 12:24:56 +01:00
John R Rose
8eddf40f8b Merge 2011-07-13 01:40:55 -07:00
Zhengyu Gu
fcba257a74 7065535: Mistyped function name that disabled UseLargePages on Windows
Missing suffix "A" of Windows API LookupPrivilegeValue failed finding function pointer, caused VM to disable UseLargePages option

Reviewed-by: coleenp, phh
2011-07-12 21:13:53 -04:00
John Coomes
abe5e3a903 Merge 2011-07-12 16:32:25 -07:00
Naoto Sato
e3c0616ac7 7022407: Spinning CPU in LocaleObjectCache.get()
Reviewed-by: okutsu
2011-07-12 10:28:37 -07:00
Doug Lea
082623e70e 7058828: test/java/util/concurrent/Phaser/Arrive.java fails intermittently
Reviewed-by: chegar
2011-07-12 15:23:23 +01:00
Pavel Porvatov
c85b06f816 7019963: The goto parent directory button doesn't operate in JFileChooser
Reviewed-by: alexp
2011-07-12 11:41:50 +04:00
Lana Steuck
539b623427 Merge 2011-07-11 16:54:21 -07:00
Yuka Kamiya
53c7e90bff 7051769: java.text.Bidi.toString() output is wrong
Reviewed-by: okutsu
2011-07-12 08:46:49 +09:00
Yuka Kamiya
d3669b49eb 7042148: closed/java/awt/font/TextLayout/CheckLayoutLTR.java failed
Reviewed-by: okutsu
2011-07-12 08:00:12 +09:00
Yuka Kamiya
f0b57adba4 7012364: test/java/util/Locale/LocaleCategory.sh fails on Cygwin
Reviewed-by: okutsu
2011-07-12 07:32:29 +09:00
John Coomes
61e2d7af10 7061212: use o/s low memory notification in embedded builds
Reviewed-by: dholmes, never, jwilhelm, kvn
2011-07-11 14:15:43 -07:00
Oleg Pekhovskiy
7e5574e3f8 7050935: closed/java/awt/Choice/WheelEventsConsumed/WheelEventsConsumed.html fails on win32
Reviewed-by: art, dcherepanov
2011-07-11 15:59:29 +04:00
Igor Veresov
09a3aca98b 7058510: multinewarray with 6 dimensions uncommon traps in server compiler
Pass arguments to runtime via java array for arrays with > 5 dimensions

Reviewed-by: never, kvn, jrose, pbk
2011-07-08 15:33:03 -07:00
Alexandre Boulgakov
ae4c0a9af1 7060849: Eliminate pack200 build warnings
Reviewed-by: ksrini, jjg
2011-07-08 10:25:57 -07:00
Vladimir Kozlov
20a26c54cd 7059034: Use movxtod/movdtox on T4
Use new VIS3 mov instructions on T4 for move data between general and float registers.

Reviewed-by: never, twisti
2011-07-08 09:38:48 -07:00
Coleen Phillimore
f854e0370d Merge 2011-07-07 22:34:34 -04:00
Lana Steuck
c058d2d4c0 Merge 2011-07-07 19:18:01 -07:00
John Coomes
bf486b030a 7053189: remove some unnecessary platform-dependent includes
Reviewed-by: dholmes, never, jwilhelm, kvn
2011-07-07 15:44:34 -07:00
David Schlosnagle
5f2157a8bc 7061125: Proposed javac argument processing performance improvement
Reviewed-by: jjg, dlsmith, mcimadamore, forax
2011-07-07 13:29:31 -07:00
Vladimir Kozlov
9120c1e85c Merge 2011-07-07 10:51:07 -07:00
Tom Rodriguez
d57ae98564 7062856: Disassembler needs to be smarter about finding hsdis after 1.7 launcher changes
Do explicit lookup emulating old LD_LIBRARY_PATH search

Reviewed-by: kvn, jrose
2011-07-06 18:15:21 -07:00
John Coomes
804e3e1d96 7061225: os::print_cpu_info() should support os-specific data
Reviewed-by: dholmes, never, jwilhelm, kvn
2011-07-06 13:02:54 -07:00
John Coomes
73687afa5e 7061204: clean the chunk table synchronously in embedded builds
Reviewed-by: dholmes, never, jwilhelm, kvn
2011-07-06 12:28:07 -07:00
John Coomes
c76b491afb 7061197: ThreadLocalStorage sp map table should be optional
Reviewed-by: dholmes, never, jwilhelm, kvn
2011-07-06 12:22:29 -07:00
John Coomes
769ba74d9c 7061192: option handling adjustments for oracle and embedded builds
Reviewed-by: dholmes, never, jwilhelm, kvn
2011-07-06 12:17:44 -07:00
John Coomes
07d5e13794 7061187: need some includes for arm/ppc
Reviewed-by: dholmes, never, jwilhelm, kvn
2011-07-06 12:03:01 -07:00
Tom Rodriguez
d23654d851 7061101: adlc should complain about mixing block and expression forms of ins_encode
Reviewed-by: kvn
2011-07-06 09:27:54 -07:00
John Coomes
ce3ae66eeb Merge 2011-07-06 08:43:01 -07:00
Sean Mullan
85f75843f3 7054969: Null-check-in-finally pattern in java/security documentation
Reviewed-by: vinnie
2011-07-06 11:08:20 -04:00
Joe Darcy
01ee832f44 7025809: Provided new utility visitors supporting SourceVersion.RELEASE_8
Reviewed-by: jjg, mcimadamore
2011-07-05 16:37:24 -07:00
Tom Rodriguez
2337123692 6478991: C1 NullCheckEliminator yields incorrect exceptions
Reviewed-by: twisti, iveresov
2011-07-05 16:07:54 -07:00
Sean Coffey
c27746be10 7041125: LDAP API does not catch malformed filters that contain two operands for the ! operator
Reviewed-by: weijun, xuelei
2011-07-05 15:25:10 +01:00
David Holmes
1b8996c8b4 7052988: JPRT embedded builds don't set MINIMIZE_RAM_USAGE
Reviewed-by: kamg, dsamersoff
2011-07-02 04:17:12 -04:00
Valerie Peng
e2857af6b5 Merge 2011-07-01 17:12:22 -07:00
Kumar Srinivasan
69c7455330 7060642: (javadoc) improve performance on accessing inlinedTags
Reviewed-by: jjg, bpatel
2011-07-01 14:28:19 -07:00
Kumar Srinivasan
a195753a0c 6735320: StringIndexOutOfBoundsException for empty @serialField tag
Reviewed-by: jjg, bpatel
2011-07-01 13:34:37 -07:00
Erik Trimble
d82d76ad4f 7061691: Fork HS21 to HS22 - renumber Minor and build numbers of JVM
Update the Minor and Build numbers for HS22 fork

Reviewed-by: jcoomes
2011-07-01 13:07:16 -07:00
Lana Steuck
be52f84b3b Merge 2011-07-01 12:26:33 -07:00
Igor Veresov
47caaa4c06 7057120: Tiered: Allow C1 to inline methods with loops
Recompile the enclosing methods without inlining of the method that has OSRed to level 4 or recompile the enclosing method at level 4.

Reviewed-by: kvn, never
2011-07-01 10:37:37 -07:00
Igor Veresov
528a9bb452 7058689: Tiered: Reprofiling doesn't happen in presence of level 4 OSR methods
Take into account current state of profiling before believing that existing higher level versions are valid

Reviewed-by: kvn, never
2011-07-01 10:35:54 -07:00
Valerie Peng
2c1ce646b9 7058133: Javah should use the freshly built classes instead of those from the BOOTDIR jdk
Changed javah to use the newly built classes specified by $(CLASSDESTDIR)

Reviewed-by: vinnie
2011-06-30 18:42:37 -07:00
Alexandre Boulgakov
182cb26581 7058708: Eliminate JDK build tools build warnings
Reviewed-by: ohair, jjg
2011-06-30 17:59:13 -07:00
Alexandre Boulgakov
29583aac86 7061195: Clean up makefiles for JDK 8
Reviewed-by: ohair, jjg
2011-06-30 16:51:35 -07:00
Alexandre Boulgakov
c1deb9188b 7061195: Clean up makefiles for JDK 8
Reviewed-by: ohair, jjg
2011-06-30 16:50:34 -07:00
Alexandre Boulgakov
fa7e844eb4 7061190: Update boot JDK version for JDK 8
Reviewed-by: ohair, jjg
2011-06-30 16:48:44 -07:00
Kumar Srinivasan
37aa419c8a 7059905: (javadoc) promote method visibility for netbeans usage
Reviewed-by: jjg, bpatel
2011-06-30 14:33:45 -07:00
Lana Steuck
1dbd0c3e5e Merge 2011-06-30 14:19:25 -07:00
Lana Steuck
29d2bf8bb4 Merge 2011-06-30 14:18:40 -07:00
Lana Steuck
2e1c7da277 Merge 2011-06-30 14:16:48 -07:00
Jonathan Gibbons
00fd0bdcfd 7060926: Attr.PostAttrAnalyzer misses a case
Reviewed-by: mcimadamore
2011-06-30 12:00:53 -07:00
Ashok Srinivasa Murthy
774aa0130a 6951623: 3/3 possible performance problems in FollowReferences() and GetObjectsWithTags()
Call collect_stack_roots() before collect_simple_roots() as an optimization.

Reviewed-by: ysr, dsamersoff, dcubed
2011-06-29 20:28:58 -07:00
Vladimir Kozlov
b443bf1f4c 7047954: VM crashes with assert(is_Mem()) failed
Cast constant array ptrs to bottom

Reviewed-by: never
2011-06-28 15:50:07 -07:00
Vladimir Kozlov
b3505a88a4 7044738: Loop unroll optimization causes incorrect result
Take into account memory dependencies when clonning nodes in clone_up_backedge_goo().

Reviewed-by: never
2011-06-28 15:24:29 -07:00
Vladimir Kozlov
565f8579ac 6990015: Incorrect Icache line size is used for 64 bit x86
Correct Icache::line_size for x64 and add verification code into vm_version_x86.

Reviewed-by: never, phh
2011-06-28 15:04:39 -07:00
Krystal Mok
976fd97ddf 7058036: FieldsAllocationStyle=2 does not work in 32-bit VM
ParseClassFile() incorrectly uses nonstatic_oop_map_size() method instead of nonstatic_oop_map_count().

Reviewed-by: never
2011-06-28 14:30:27 -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
Bengt Rutisson
3aaa5fb06d 7016112: CMS: crash during promotion testing
Also reviewed by mikael.gerdin@oracle.com; stdlib:qsort() does byte-by-byte swapping on Windows. This leads to pointer shearing. Fix is to implement a quicksort that does full pointer updates.

Reviewed-by: never, coleenp, ysr
2011-06-28 14:23:27 +02:00
Michael McMahon
7d323bf629 Merge 2011-06-28 10:09:56 +01:00
Michael McMahon
f9cb1ca594 7058832: com/sun/net/httpserver/bugs/B6373555.java failing intermittently
Reviewed-by: alanb
2011-06-28 10:07:41 +01:00
David Holmes
5d0d741efe 7039182: PPC: NIO: java.io.IOException: Invalid argument in sun.nio.ch.FileDispatcherImpl.read0
Allow platform specific files to be located at build time instead of generating them

Reviewed-by: alanb, ohair
2011-06-27 20:13:48 -04:00
Suchen Chien
17c7ea1f76 Merge 2011-06-27 14:11:09 -07:00
Suchen Chien
c049f1a014 Merge 2011-06-27 14:10:46 -07:00
Suchen Chien
64c7a2b6f4 Merge 2011-06-27 14:10:24 -07:00
Suchen Chien
38f899e9b3 Merge 2011-06-27 14:10:24 -07:00
Suchen Chien
43b8741d54 Merge 2011-06-27 14:10:09 -07:00
Suchen Chien
cb2baedec2 Merge 2011-06-27 14:10:07 -07:00
Suchen Chien
a3a8789cac Added tag jdk7-b147 for changeset af62a2ace951 2011-06-27 13:21:47 -07:00
Suchen Chien
a72976552e Added tag jdk7-b147 for changeset 807b419805d8 2011-06-27 13:21:34 -07:00
Suchen Chien
06024626ed Added tag jdk7-b147 for changeset c504e1cee58c 2011-06-27 13:21:27 -07:00
Suchen Chien
9d5df3c087 Added tag jdk7-b147 for changeset f2a6a84060f0 2011-06-27 13:21:26 -07:00
Suchen Chien
16bf9cba53 Added tag jdk7-b147 for changeset a80bb2097f8e 2011-06-27 13:21:13 -07:00
Suchen Chien
3baa7ef93a Added tag jdk7-b147 for changeset 1a289b7faf76 2011-06-27 13:21:08 -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
Kumar Srinivasan
afa7a314d2 7046007: (launcher) Improve usage information for -verbose option
Reviewed-by: darcy, alanb
2011-06-27 12:21:44 -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
Michael McMahon
27d3dc1f41 7059777: Remove lang tests from Problemlist.txt
Reviewed-by: alanb
2011-06-27 12:15:27 +01:00
Joe Darcy
faf515b31f 6575445: Update annotation processor to only use java.util.ServiceLoader
Reviewed-by: jjg
2011-06-24 13:52:14 -07:00
Denis Lila
3f2da7c5b6 7049339: AnyBlit is broken with non-rectangular clips
Reviewed-by: flar
2011-06-24 16:22:50 -04:00
Alan Bateman
a02c5e28fb 6965150: TEST_BUG: java/nio/channels/AsynchronousSocketChannel/Basic.java takes too long
Reviewed-by: chegar
2011-06-24 19:30:39 +01:00
Antonios Printezis
4597e4c7a8 7049999: G1: Make the G1PrintHeapRegions output consistent and complete
Extend and make more consistent the output from the G1PrintHeapRegions flag.

Reviewed-by: johnc, jmasa
2011-06-24 12:38:49 -04:00
Ashok Srinivasa Murthy
bc408da53d 7043987: 3/3 JVMTI FollowReferences is slow
VM_HeapWalkOperation::doit() should only reset mark bits when necessary.

Reviewed-by: dsamersoff, ysr, dholmes, dcubed
2011-06-23 20:31:43 -07:00
Lana Steuck
672c2326e2 Merge 2011-06-23 17:30:49 -07:00
Lana Steuck
18fd818639 Merge 2011-06-23 17:21:08 -07:00
John R Rose
8df44305c7 7056328: JSR 292 invocation sometimes fails in adapters for types not on boot class path
Reviewed-by: never
2011-06-23 17:14:06 -07:00
Joe Darcy
392eef08ca 6253144: Long narrowing conversion should describe the algorithm used and implied "risks"
Reviewed-by: mduigou, alanb
2011-06-23 14:57:57 -07:00
Lana Steuck
371dfdfc58 Merge 2011-06-23 14:56:38 -07:00
Alexandre Boulgakov
d44dc19842 7058174: Reduce langtools build warnings
Reviewed-by: jjg
2011-06-23 11:49:27 -07:00
Xue-Lei Andrew Fan
58f8a03a50 7057022: test/sun/security/pkcs11/fips/ClientJSSEServerJSSE.java has invalid jtreg tags
Reviewed-by: weijun
2011-06-23 04:23:50 -07:00
Chris Hegarty
6482ba14aa 7021010: java/lang/Thread/ThreadStateTest.java fails intermittently
Reviewed-by: dholmes, alanb, mchung
2011-06-23 13:15:14 +01:00
Chris Hegarty
d97cf81a2a 7057935: com/sun/nio/sctp tests should be moved out of jdk_nio and into their own target, jdk_sctp
Reviewed-by: alanb
2011-06-23 13:00:14 +01:00
Lana Steuck
2eb3bc1633 Merge 2011-06-22 23:26:00 -07:00
Lana Steuck
69ce407621 Merge 2011-06-22 23:23:58 -07:00
Xue-Lei Andrew Fan
0a90983600 7058271: Remove InterruptedIO.java record from ProblemList.txt
Reviewed-by: weijun
2011-06-22 21:21:33 -07:00
Xue-Lei Andrew Fan
5798f5bb9d 6952814: sun/security/ssl/com/sun/net/ssl/internal/ssl/InputRecord/InterruptedIO.java failing in PIT
Reviewed-by: alanb
2011-06-22 19:37:18 -07:00
Weijun Wang
6619d1aec9 7055362: jdk_security2 test target cleanup
Reviewed-by: alanb
2011-06-23 09:27:11 +08:00
Joe Darcy
55d52a83a8 6449184: Provide JavacProcessingEnvironment.getWriter
Reviewed-by: jjg
2011-06-22 17:07:02 -07:00
Tom Rodriguez
15161b8cd1 7057587: JSR 292 - crash with jruby in test/test_respond_to.rb
Don't skip receiver when GC'ing compiled invokedynamic callsites

Reviewed-by: twisti, kvn, jrose
2011-06-22 14:45:37 -07:00
Lana Steuck
1433317e29 Merge 2011-06-22 12:41:28 -07:00
Lana Steuck
f2ed4f8df5 Merge 2011-06-22 12:41:14 -07:00
Lana Steuck
269df928d8 Merge 2011-06-22 12:41:01 -07:00
Lana Steuck
4f3dac70dd Merge 2011-06-22 12:40:58 -07:00
Lana Steuck
c770fccd64 Merge 2011-06-22 12:40:43 -07:00
Lana Steuck
7dbed2641b Merge 2011-06-22 12:40:39 -07:00
Jeff Dinkins
de7673ad9d 7057046: Add embedded license to THIRD PARTY README
Reviewed-by: lana
2011-06-22 10:11:58 -07:00
Jeff Dinkins
583ed9bc81 7057046: Add embedded license to THIRD PARTY README
Reviewed-by: lana
2011-06-22 10:11:19 -07:00
Jeff Dinkins
bc28936d6b 7057046: Add embedded license to THIRD PARTY README
Reviewed-by: lana
2011-06-22 10:10:54 -07:00
Jeff Dinkins
4aa72cd991 7057046: Add embedded license to THIRD PARTY README
Reviewed-by: lana
2011-06-22 10:10:39 -07:00
Jeff Dinkins
e43b81c035 7057046: Add embedded license to THIRD PARTY README
Reviewed-by: lana
2011-06-22 10:10:25 -07:00
Jeff Dinkins
c755d188f9 7057046: Add embedded license to THIRD PARTY README
Reviewed-by: lana
2011-06-22 10:10:11 -07:00
Jeff Dinkins
b886a23276 7057046: Add embedded license to THIRD PARTY README
Reviewed-by: lana
2011-06-22 10:09:19 -07:00
Alan Bateman
a12aaa8a35 7056447: test/java/lang/management/ManagementFactory/MBeanServerMXBeanUnsupportedTest.java fails in agentvm
Reviewed-by: emcmanus
2011-06-22 15:13:29 +01:00
Antonios Printezis
408e0b1bc1 7046182: G1: remove unnecessary iterations over the collection set
Remove two unnecessary iterations over the collection set which are supposed to prepare the RSet's of the CSet regions for parallel iterations (we'll make sure this is done incrementally). I'll piggyback on this CR the removal of the G1_REM_SET_LOGGING code.

Reviewed-by: brutisso, johnc
2011-06-21 15:23:07 -04: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
Tom Rodriguez
7c1d16f7d3 7056380: VM crashes with SIGSEGV in compiled code
Code was using andq reg, imm instead of addq addr, imm

Reviewed-by: kvn, jrose, twisti
2011-06-21 09:04:55 -07:00
Alan Bateman
3b79194b8b 7056815: test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh times out intermittently on busy machine
Reviewed-by: mchung
2011-06-21 16:11:24 +01:00
Antonios Printezis
7ceee7642b 7055073: G1: code cleanup in the concurrentMark.* files
Only cosmetic changes to make the concurrentMark.* more consistent, code-style-wise, with the rest of the codebase.

Reviewed-by: johnc, ysr
2011-06-20 22:03:13 -04:00
Suchen Chien
2f43bbd50b Merge 2011-06-20 17:39:54 -07:00
Suchen Chien
1806e6b851 Merge 2011-06-20 17:38:27 -07:00
Suchen Chien
7554fec6ba Merge 2011-06-20 17:28:32 -07:00
Suchen Chien
6d9b343adb Merge 2011-06-20 17:28:31 -07:00
Suchen Chien
2766092415 Merge 2011-06-20 17:28:20 -07:00
Suchen Chien
53f92901a8 Merge 2011-06-20 17:28:19 -07:00
Joe Darcy
092c61fcbf 7055295: (reflect) add conventional constructor to GenericSignatureFormatError
Reviewed-by: lancea, mduigou
2011-06-20 17:20:35 -07:00
Vladimir Kozlov
d19a8f6e35 7052494: Eclipse test fails on JDK 7 b142
Keep 'ne' test in Counted loop when we can't guarantee during compilation that init < limit.

Reviewed-by: never
2011-06-20 16:45:35 -07:00
Suchen Chien
372f63f99b Added tag jdk7-b146 for changeset 996242032853 2011-06-20 16:25:52 -07:00
Suchen Chien
45d73fe88c Added tag jdk7-b146 for changeset 5f44e9dc3049 2011-06-20 16:25:32 -07:00
Suchen Chien
4045f34545 Added tag jdk7-b146 for changeset 909731f081e7 2011-06-20 16:25:25 -07:00
Suchen Chien
217a519b3e Added tag jdk7-b146 for changeset dbf30739b207 2011-06-20 16:25:23 -07:00
Suchen Chien
024b378da1 Added tag jdk7-b146 for changeset 52a6defbfaf6 2011-06-20 16:25:02 -07:00
Suchen Chien
6f65c2ba13 Added tag jdk7-b146 for changeset 1051d91efcc2 2011-06-20 16:24:51 -07:00
Y. Srinivas Ramakrishna
45f42598c1 6916968: CMS: freeList.cpp:304 assert(_allocation_stats.prevSweep() + ..., "Conservation Principle")
Fix assert and adjust demand volume computation by adding missing factor.

Reviewed-by: jmasa, tonyp
2011-06-20 09:42:26 -07:00
Weijun Wang
700f4e1951 7054918: jdk_security1 test target cleanup
Reviewed-by: alanb, smarks, vinnie
2011-06-20 19:17:47 +08:00
Doug Lea
58f7b19611 7051516: ThreadLocalRandom seed is never initialized so all instances generate the same sequence
Reviewed-by: chegar, dholmes, mduigou
2011-06-20 12:27:20 +01:00
Weijun Wang
8bdce645f3 7054428: test/java/security/SecureClassLoader/DefineClassByteBuffer.java error
Reviewed-by: alanb
2011-06-20 17:38:15 +08:00
Alan Bateman
4375a5167f 7056489: test/com/sun/jndi/ldap/ReadTimeoutTest.java hangs or times out
Reviewed-by: forax, vinnie
2011-06-19 11:15:37 +01:00
Lana Steuck
de1a62f2b3 Merge 2011-06-18 10:12:58 -07:00
Suchen Chien
811a09b5ff Merge 2011-06-18 09:04:12 -07:00
Dmitry Samersoff
c67f294553 Merge 2011-06-18 13:32:27 +04:00
Bhavesh Patel
a715a4095a Merge 2011-06-17 20:14:05 -07:00
Bhavesh Patel
0982a2586d 7052425: Change the look and feel of the javadoc generate HTML pages using stylesheet
Reviewed-by: jjg
2011-06-17 20:12:46 -07:00
Erik Trimble
3df6e7db16 Merge 2011-06-17 16:25:01 -07:00
Kumar Srinivasan
e5700a0e11 7043125: TEST: tools/launcher/VersionCheck.java fails just against openjdk7 (b141 & b138-nightly) promoted
Reviewed-by: darcy
2011-06-17 15:17:01 -07:00
Joe Darcy
eb2d2e632c 7021922: java.lang.annoation.IncompleteExceptions throws NPE when type is null
Reviewed-by: alanb, forax
2011-06-17 10:34:44 -07:00
Lana Steuck
3a42e735b4 Merge 2011-06-17 10:27:40 -07:00
Alan Bateman
c4f6ba9248 7055508: (aio) EXCEPTION_ACCESS_VIOLATION in AsynchronousSocketChannel.connect on Windows 7
Reviewed-by: chegar
2011-06-17 16:47:16 +01:00
Tom Rodriguez
5d2e4e676b 7055355: JSR 292: crash while throwing WrongMethodTypeException
Reviewed-by: jrose, twisti, bdelsart
2011-06-16 13:46:55 -07:00
Antonios Printezis
937d6ded89 6994322: Remove the is_tlab and is_noref / is_large_noref parameters from the CollectedHeap
Remove two unused parameters from the mem_allocate() method and update its uses accordingly.

Reviewed-by: stefank, johnc
2011-06-16 15:51:57 -04:00
Lana Steuck
6223fc9081 Merge 2011-06-15 16:11:16 -07:00
Lana Steuck
1379c0101b Merge 2011-06-15 16:10:30 -07:00
Lana Steuck
a9b3a28e2d Merge 2011-06-15 16:04:59 -07:00
Abhijit Saha
6af175455a 7055247: Ignore test of # 7020373
Reviewed-by: dcubed
2011-06-15 14:59:55 -07:00
Tom Rodriguez
ca8939dd80 Merge 2011-06-15 10:20:03 -07:00
John Cuthbertson
43d9e95a42 7045751: G1: +ExplicitGCInvokesConcurrent causes excessive single region evacuation pauses
When ExplicitGCInvokesConcurrent is enabled, do not perform an evacuation pause if a marking cycle is already in progress and block the requesting thread until the marking cycle completes.

Reviewed-by: tonyp, ysr
2011-06-15 10:18:04 -07:00
Joe Darcy
a73d3ad1f4 7041252: Use j.u.Objects.equals in security classes
Reviewed-by: weijun
2011-06-15 08:37:11 -07: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
John R Rose
1f3aab409b 7054590: (JSR-292) MethodHandleProxies.asInterfaceInstance() accepts private/protected nested interfaces
Fix non-compliant logic in MethodHandleProxies, fix invalid private classes in MethodHandlesTest

Reviewed-by: twisti, never
2011-06-14 22:47:12 -07:00
John R Rose
9acf4f0284 7052202: JSR 292: Crash in sun.invoke.util.ValueConversions.fillArray
Fix corner cases involving MethodHandles.permuteArguments with long or double argument lists.

Reviewed-by: twisti, never
2011-06-14 22:47:09 -07:00
Tom Rodriguez
a21aad64af Merge 2011-06-14 15:20:55 -07:00
Tom Rodriguez
0c0705ca8c 7052219: JSR 292: Crash in ~BufferBlob::MethodHandles adapters
Reviewed-by: twisti, kvn, jrose
2011-06-14 14:41:33 -07:00
Joe Darcy
98126afc3d 7054669: javadoc warnings from java.awt.Toolkit
Reviewed-by: anthony
2011-06-14 12:31:31 -07:00
Christian Thalinger
5919a613cc 7053520: JSR292: crash in invokedynamic with C1 using tiered and compressed oops
Reviewed-by: iveresov, never
2011-06-14 12:25:05 -07:00
John Cuthbertson
b94d0b830c 7004681: G1: Extend marking verification to Full GCs
Perform a heap verification after the first phase of G1's full GC using objects' mark words to determine liveness. The third parameter of the heap verification routines, which was used in G1 to determine which marking bitmap to use in liveness calculations, has been changed from a boolean to an enum with values defined for using the mark word, and the 'prev' and 'next' bitmaps.

Reviewed-by: tonyp, ysr
2011-06-14 11:01:10 -07:00
Sean Coffey
438b911b29 7049774: UID construction appears to hang if time changed backwards
Reviewed-by: alanb, dholmes, chegar, mduigou
2011-06-14 18:05:42 +01:00
Antonios Printezis
015e872efe 7046558: G1: concurrent marking optimizations
Some optimizations to improve the concurrent marking phase: specialize the main oop closure, make sure a few methods in the fast path are properly inlined, a few more bits and pieces, and some cosmetic fixes.

Reviewed-by: stefank, johnc
2011-06-14 10:33:43 -04:00
Joe Darcy
70b94c5b15 7052122: Update JDK_MINOR_VERSION for JDK 8
Reviewed-by: mr, katleman
2011-06-13 12:17:20 -07:00
Joe Darcy
fe7f869e78 7052122: Update JDK_MINOR_VERSION for JDK 8
Reviewed-by: mr, katleman
2011-06-13 12:17:14 -07:00
Bengt Rutisson
c0d64ac595 6918185: Remove unused code for lost card-marking optimization in BacktraceBuilder
Removed dead code

Reviewed-by: ysr, coleenp, dholmes
2011-06-13 13:48:18 +02:00
Y. Srinivas Ramakrishna
9ca97e4c78 7051430: CMS: ongoing CMS cycle should terminate abruptly to allow prompt JVM termination at exit
It turns out that there is no need to explicitly stop CMS since the JVM is taken down at a terminal safepoint during which CMS threads are (terminally) inactive. This  will need to be revised if and when we evolve in the future to a point where we allow JVM reincarnation in the same process, but those changes will be much more sweeping than just terminating CMS threads. The unused ::stop() methods will be removed in a separate CR. Also include in this CR is the fix for a small typo in the spelling of UseGCLogFileRotation in a message in arguments.cpp, brought to our attention by Rainer Jung and reviewed by minqi.

Reviewed-by: johnc, jwilhelm
2011-06-13 09:58:16 -07:00
Yumin Qi
f79196c54c Merge 2011-06-10 15:44:02 -07:00
Yumin Qi
5d0ad03a55 6941923: RFE: Handling large log files produced by long running Java Applications
Supply optinal flags to realize gc log rotation

Reviewed-by: ysr, jwilhelm
2011-06-10 15:08:36 -07:00
Lana Steuck
76f0e8cd7d Merge 2011-06-10 11:44:34 -07:00
Lana Steuck
9ec31bc4b1 Merge 2011-06-10 11:44:17 -07:00
Lana Steuck
8c7b78e772 Merge 2011-06-10 11:43:15 -07:00
Antonios Printezis
9332c44d84 7045330: G1: Simplify/fix the HeapRegionSeq class
7042285: G1: native memory leak during humongous object allocation
6804436: G1: heap region indices should be size_t

A series of fixes and improvements to the HeapRegionSeq class: a) replace the _regions growable array with a standard C array, b) avoid de-allocating / re-allocating HeapRegion instances when the heap shrinks / grows (fix for 7042285), c) introduce fast method to map address to HeapRegion via a "biased" array pointer, d) embed the _hrs object in G1CollectedHeap, instead of pointing to it via an indirection, e) assume that all the regions added to the HeapRegionSeq instance are contiguous, f) replace int's with size_t's for indexes (and expand that to HeapRegion as part of 6804436), g) remove unnecessary / unused methods, h) rename a couple of fields (_alloc_search_start and _seq_bottom), i) fix iterate_from() not to always start from index 0 irrespective of the region passed to it, j) add a verification method to check the HeapRegionSeq assumptions, k) always call the wrappers for _hrs.iterate(), _hrs_length(), and _hrs.at() from G1CollectedHeap, not those methods directly, and l) unify the code that expands the sequence (by either re-using or creating a new HeapRegion) and make it robust wrt to a HeapRegion allocation failing.

Reviewed-by: stefank, johnc, brutisso
2011-06-10 13:16:40 -04:00
Dag Wanvik
a51853081c 7046557: Changes to the Java DB README files in JDK7
Update <jdkroot>/README.html with correct mention of Java DB, add JDK specific README files to <jdkroot>/db and <jdkroot>/demo/db.

Reviewed-by: ohair
2011-06-10 17:44:43 +02:00
Bradford Wetmore
33be52be86 7052537: java/security/Security/NotInstalledProviders.java is causing -samevm tests to fail
Reviewed-by: valeriep, asaha, alanb
2011-06-09 14:24:09 -07:00
Jim Holmlund
089c11bb9b 7052782: Two langtools regression tests fail due to fix for 7034977 which removed the invokeGeneric method
Change the tests to call invoke instead of invokeGeneric

Reviewed-by: jrose, mcimadamore
2011-06-09 09:13:50 -07:00
Antonios Printezis
6d6d8a571c 7045662: G1: OopsInHeapRegionClosure::set_region() should not be virtual
Make the method non-virtual, remove five unused closures, and fix a couple of copyright typos.

Reviewed-by: stefank, johnc, poonam
2011-06-08 21:48:38 -04:00
John R Rose
bb3a527f9a 7047697: MethodHandle.invokeExact call for wrong method causes VM failure if run with -Xcomp
Reviewed-by: never, twisti
2011-06-08 17:04:06 -07:00
Dmitry Samersoff
62767e93dc Merge 2011-06-09 01:33:42 +04:00
Dmitry Samersoff
a900c1474e Merge 2011-06-09 01:06:09 +04:00
Antonios Printezis
507bff762b 7032531: G1: enhance GC logging to include more accurate eden / survivor size transitions
This changeset extends the logging information generated by +PrintGCDetails to also print out separate size transitions for the eden, survivors, and old regions.

Reviewed-by: ysr, brutisso
2011-06-08 15:31:51 -04:00
Suchen Chien
4137646027 Merge 2011-06-08 10:25:17 -07:00
Suchen Chien
f8409e2ac9 Merge 2011-06-08 10:24:10 -07:00
Suchen Chien
f005f53f26 Merge 2011-06-08 10:21:10 -07:00
Suchen Chien
cc387f340d Merge 2011-06-08 10:21:10 -07:00
Suchen Chien
746f103f50 Merge 2011-06-08 10:20:44 -07:00
Suchen Chien
04e00f760f Merge 2011-06-08 10:20:40 -07:00
Y. Srinivas Ramakrishna
93d9f1ddd9 Merge 2011-06-08 08:39:53 -07:00
Michael McMahon
9ed202225f 7050028: ISE "zip file closed" from JarURLConnection.getInputStream on JDK 7 when !useCaches
Reviewed-by: chegar, alanb
2011-06-08 10:56:11 +01:00
Weijun Wang
9ce9d5e6ba 7043737: klist does not detect non-existing keytab
Reviewed-by: valeriep
2011-06-08 14:01:34 +08:00
Suchen Chien
67cd1c65ef Added tag jdk7-b145 for changeset e4b5be572a36 2011-06-07 14:01:26 -07:00
Suchen Chien
69b450d363 Added tag jdk7-b145 for changeset e271924310f9 2011-06-07 14:01:12 -07:00
Suchen Chien
c4f73fb3cb Added tag jdk7-b145 for changeset 38453b2eac62 2011-06-07 14:01:06 -07:00
Suchen Chien
51f3bcc4c4 Added tag jdk7-b145 for changeset 027c88c4e55f 2011-06-07 14:01:05 -07:00
Suchen Chien
a635feff6e Added tag jdk7-b145 for changeset 18c6a8bc55b0 2011-06-07 14:00:51 -07:00
Suchen Chien
8f03f05654 Added tag jdk7-b145 for changeset fcb5ff9cf5b1 2011-06-07 14:00:46 -07:00
John Coomes
b45fdce61d Merge 2011-06-07 13:17:05 -07:00
Andrei Dmitriev
d735ee65ab 7048568: Crash in Java_sun_awt_Win32GraphicsEnvironment_isVistaOS
Reviewed-by: dcherepanov, art, amenkov
2011-06-07 22:58:24 +04:00
Lana Steuck
4ce35dcaa5 Merge 2011-06-06 19:04:30 -07:00
Abhijit Saha
5232a86479 Merge 2011-06-06 11:08:52 -07:00
Abhijit Saha
dfdc4f4178 Merge 2011-06-06 10:54:31 -07:00
Abhijit Saha
af2ae2bc80 Merge 2011-06-06 10:22:16 -07:00
Abhijit Saha
9cd57f38d5 Merge 2011-06-06 10:19:09 -07:00
Lana Steuck
2391c4d22c Merge 2011-06-04 17:33:13 -07:00
Lana Steuck
80b1670cde Merge 2011-06-04 17:32:21 -07:00
Lana Steuck
0252d1b125 Merge 2011-06-04 17:30:58 -07:00
Andrew Brygin
6c20dab366 7042594: 3 testis api/java_awt/Color/ICC_ProfileRGB/index.html fail against RI b138 OEL6x64
Reviewed-by: prr
2011-06-04 23:08:38 +04:00
Vladimir Kozlov
18dd7131d0 7050280: assert(u->as_Unlock()->is_eliminated()) failed: sanity
Mark all associated (same box and obj) lock and unlock nodes for elimination if some of them marked already.

Reviewed-by: iveresov, never
2011-06-04 10:36:22 -07:00
Sean Mullan
9a2901828f Merge 2011-06-04 06:52:01 -07:00
Sean Mullan
998c791227 7050329: test/java/security/Policy/GetPermissions/JarURL.java fails on Windows
Reviewed-by: alanb
2011-06-04 06:45:17 -07:00
Alan Bateman
360fe38438 7050358: (fs spec) Path.toUri doesn't allow custom providers to use opaque URIs
Reviewed-by: sherman
2011-06-04 11:18:33 +01:00
Tom Rodriguez
a664e486bd 7045514: SPARC assembly code for JSR 292 ricochet frames
Reviewed-by: kvn, jrose
2011-06-03 22:31:43 -07:00
Lana Steuck
b764e8fee1 Merge 2011-06-03 22:14:35 -07:00
Erik Trimble
0589616e2f Merge 2011-06-03 20:13:50 -07:00
Pavel Porvatov
b7c5605096 6977587: GTK L&F: jnlp: java.io.IOException thrown when choosing more than 1 file in the dialog
Reviewed-by: alexp
2011-06-04 01:13:04 +04:00
John R Rose
ad33af1a1c 7051206: JSR 292 method name SwitchPoint.isValid is misleading to unwary users; should be hasBeenInvalidated
Reviewed-by: kvn, never, ysr
2011-06-03 11:20:20 -07:00
Abhijit Saha
440cc6eade Merge 2011-06-03 07:54:41 -07:00
Abhijit Saha
cbdf296926 Merge 2011-06-03 07:54:08 -07:00
Coleen Phillimore
8f2d760f58 Merge 2011-06-02 21:01:48 -07:00
Lana Steuck
e9d626d5ec Merge 2011-06-02 13:38:55 -07:00
Lana Steuck
94891cacc0 Merge 2011-06-02 13:38:28 -07:00
Lana Steuck
a49d8d81eb Merge 2011-06-02 13:37:54 -07:00
Lana Steuck
12e2e2e32e Merge 2011-06-02 13:37:50 -07:00
Lana Steuck
7cecb22a71 Merge 2011-06-02 13:37:32 -07:00
Lana Steuck
2938690aab Merge 2011-06-02 13:37:27 -07:00
Lana Steuck
8c538bf520 Merge 2011-06-02 13:37:04 -07:00
Lana Steuck
84ed289db0 Merge 2011-06-02 13:36:29 -07:00
Tom Rodriguez
e666162b03 7050554: JSR 292 - need optimization for selectAlternative
Reviewed-by: kvn, jrose
2011-06-02 13:36:11 -07:00
Lana Steuck
515f2685fd Merge 2011-06-02 13:35:47 -07:00
Coleen Phillimore
991018b6b2 7049928: VM crashes with "assert(_adapter != NULL) failed: must have" at methodOop.cpp:63
Removed extra change from another bug fix that caused this regression

Reviewed-by: phh, dcubed, kvn, kamg, never
2011-06-02 14:17:48 -04:00
Y. Srinivas Ramakrishna
a893b9dd91 7048782: CMS: assert(last_chunk_index_to_check<= last_chunk_index) failed: parCardTableModRefBS.cpp:359
The LNC array is sized before the start of a scavenge, while the heap may expand during a scavenge. With CMS, the last block of an arbitrary suffice of the LNC array may expand due to coalition with the expansion delta. We now take care not to attempt access past the end of the LNC array. LNC array code will be cleaned up and suitably encapsulated as part of the forthcoming performance RFE 7043675.

Reviewed-by: brutisso
2011-06-02 10:23:36 -07:00
Lance Andersen
82ecc2e8ea 7049107: Cannot call initCause() on BatchUpdateException
Reviewed-by: darcy
2011-06-02 12:02:14 -04:00
John R Rose
c0d9c39aa2 7049122: java/lang/invoke/RicochetTest.java with MAX_ARITY=255 in -Xcomp mode overflows code cache
Reduce the scope of the unit test (mark high water mark of testing with @ignore tags)

Reviewed-by: never
2011-06-01 23:56:51 -07:00
John R Rose
f32795386e 7050328: (jsr-292) findConstructor throws ExceptionInInitializerError if run under SecurityManager
Wrap system property and reflection accesses under doPrivileged.  Ensure constant pool linkage bypasses the SM as specified.

Reviewed-by: kvn, never
2011-06-01 23:56:47 -07:00
John R Rose
d50a168ded 7049415: Failure of resolution of sym.reference to the c.s.s. should be wrapped in BootstrapMethodError
Wrap invokedynamic linkage errors in BootstrapMethodError, as needed.

Reviewed-by: never
2011-06-01 23:56:43 -07:00
Joe Darcy
42cb36b770 7025784: Add SourceVersion.RELEASE_8
7025786: Add -source 8 and -target 8 to javac
7025789: Change javac source and target default to 8

Reviewed-by: jjg
2011-06-01 23:56:31 -07:00
John R Rose
8465226f29 7049410: JSR 292 old method name MethodHandle.invokeGeneric should not be accepted by the JVM
Change the default setting of the flag AllowInvokeGeneric to false

Reviewed-by: never
2011-06-01 23:25:31 -07:00
John R Rose
0ed03852e5 7049415: Failure of resolution of sym.reference to the c.s.s. should be wrapped in BootstrapMethodError
Delegate invokedynamic linkage errors to MethodHandleNatives.raiseException.

Reviewed-by: never
2011-06-01 23:25:20 -07:00
Daniel D. Daugherty
a86407a0b2 7045594: 4/4 fix for 6977677 introduced a ResourceBundle race
Fix Logger.getLogger() ResourceBundle name race.

Reviewed-by: dholmes, mchung
2011-06-01 17:11:23 -07:00
Daniel D. Daugherty
0d21eb970f 7048308: 4/4 LoggingDeadlock3 test timeout is too small
Change timeout for test from 15 seconds to 80 seconds.

Reviewed-by: dholmes
2011-06-01 17:10:30 -07:00
Jonathan Gibbons
8df816992b 7042623: Regression: javac silently crash when attributing non-existent annotation
Reviewed-by: mcimadamore
2011-06-01 11:25:50 -07:00
Suchen Chien
e8d0034042 Merge 2011-06-01 11:16:04 -07:00
Kelly O'Hair
bb42c3904b 7049699: Problem with xml/jax-ws
Reviewed-by: ramap
2011-06-01 10:36:32 -07:00
David Holmes
6bc681d6ff Merge 2011-05-31 17:28:49 -04:00
Michael Fang
8c68250797 Merge 2011-05-31 13:58:56 -07:00
Bradford Wetmore
582efc86b4 7042097: JDK 7's Unlimited Cryptographic Policy bundle text files must be updated
Reviewed-by: valeriep
2011-05-31 12:45:17 -07:00
Vladimir Kozlov
a8556d6c01 6956668: misbehavior of XOR operator (^) with int
Optimize cmp_ne(xor(X,1),0) to cmp_eq(X,0) only for boolean values X.

Reviewed-by: never
2011-05-31 10:05:36 -07:00
Phil Race
7a9f1558cd 7049874: OpenJDK Build breakage fix: freetypescaler.c needs to match updated signature
Reviewed-by: lana, igor
2011-05-30 22:00:37 -07:00
Michael McMahon
0b7f35c9bb 7042550: Reintegrate 6569621
Reviewed-by: chegar, alanb
2011-05-30 23:36:10 +01:00
Vinnie Ryan
5df5bab271 7049173: Replace the software license for ECC native code
Reviewed-by: alanb
2011-05-30 16:37:42 +01:00
Sergey Bylokhov
930f604543 7045193: interactive JCK tests java_awt/interactive/FileDialogTests fail
Reviewed-by: dcherepanov, dav, art, denis
2011-05-30 17:16:21 +04:00
Dmitry Cherepanov
36b98d379e 7045354: Korean IME's Hanja candidate window is not displayed on IMFDemo
Reviewed-by: art, ant
2011-05-30 13:25:02 +04:00
Andrew Brygin
4994ea2e8f 7032904: XRender: Java2Demo : Infinite loop in Java_sun_java2d_loops_MaskBlit_MaskBlit on OEL 5.6 x64
Reviewed-by: prr
2011-05-30 12:05:22 +04:00
Denis Fokin
2f04b56c06 7046325: Broken links in java.awt.Toolkit's javadoc
Reviewed-by: dav, yan
2011-05-28 12:56:52 +04:00
Pavel Porvatov
c6f97c9462 7048204: NPE from NimbusLookAndFeel.addDefault
Reviewed-by: peterz
2011-05-28 11:55:32 +04:00
John Coomes
93196c8b51 Merge 2011-05-27 19:03:03 -07:00
David Holmes
6988092430 7024120: Verify reduced JRE contents for java 7
Stripped all symbols from libs and executables to reduce JRE size. Restored missing classes needed to pass JCK in headless mode

Reviewed-by: bobv, ohair
2011-05-27 19:04:48 -04:00
Jeff Dinkins
fbb2bf7753 Merge 2011-05-27 15:27:52 -07:00
Jeff Dinkins
0cd0c8c54f 7045697: JDK7 THIRD PARTY README update
Reviewed-by: lana
2011-05-27 15:02:39 -07:00
Jeff Dinkins
5f23c009e8 7045697: JDK7 THIRD PARTY README update
Reviewed-by: lana
2011-05-27 15:02:22 -07:00
Jeff Dinkins
ab83556ec3 7045697: JDK7 THIRD PARTY README update
Reviewed-by: lana
2011-05-27 15:01:55 -07:00
Jeff Dinkins
40feccaa7b 7045697: JDK7 THIRD PARTY README update
Reviewed-by: lana
2011-05-27 15:01:43 -07:00
Jeff Dinkins
d862169f36 7045697: JDK7 THIRD PARTY README update
Reviewed-by: lana
2011-05-27 14:58:44 -07:00
Jeff Dinkins
0be1027a42 7045697: JDK7 THIRD PARTY README update
Reviewed-by: lana
2011-05-27 14:57:01 -07:00
Phil Race
991abaa069 7046587: Outlines in OTF/CFF fonts are misclassified as quadratic curves
Reviewed-by: igor
2011-05-27 13:25:54 -07:00
Vladimir Kozlov
c3a7796068 7047069: Array can dynamically change size when assigned to an object field
Fix initialization of a newly-allocated array with arraycopy

Reviewed-by: never
2011-05-27 12:47:48 -07:00
Y. Srinivas Ramakrishna
8a46284b54 7048342: CMS: eob == _limit || fc->isFree() failed: Only a free chunk should allow us to cross over the limit
The freeness bit was being cleared in debug code when it shouldn't have been. Also removed unused FreeChunk methods linkAfterNonNull and clearPrev.

Reviewed-by: brutisso
2011-05-27 10:23:03 -07:00
Oleg Pekhovskiy
df0aefd4ae 7045174: Most of the tests in awt area fails with jdk 7b142 on windows with -Xcheck:jni
Reviewed-by: art, denis
2011-05-27 11:45:08 +04:00
Abhijit Saha
e6d4bdec07 Merge 2011-05-26 21:51:15 -07:00
Abhijit Saha
2cc05fd360 Merge 2011-05-26 21:42:19 -07:00
Abhijit Saha
cfdb3ec24b Merge 2011-05-26 21:37:40 -07:00
Abhijit Saha
386ffdedf1 Merge 2011-05-26 21:36:58 -07:00
Michael Fang
5d0ffc65f8 7045184: GTK L&F doesn't have hotkeys in jdk7 b141, while b139 has
Reviewed-by: yhuang, ogino
2011-05-26 20:32:20 -07:00
Suchen Chien
8e987420b4 Added tag jdk7-b144 for changeset 3e48977e539d 2011-05-26 20:20:16 -07:00
Suchen Chien
abca89ba92 Added tag jdk7-b144 for changeset b33a24d77590 2011-05-26 20:20:03 -07:00
Suchen Chien
43da98bcd5 Added tag jdk7-b144 for changeset 1a67669453f3 2011-05-26 20:19:56 -07:00
Suchen Chien
40eff40fbf Added tag jdk7-b144 for changeset 57cd6696ddb0 2011-05-26 20:19:55 -07:00
Suchen Chien
cfe68c847e Added tag jdk7-b144 for changeset 6fcd25d0c401 2011-05-26 20:19:42 -07:00
Suchen Chien
e0a36096f2 Added tag jdk7-b144 for changeset a0d1548bb83d 2011-05-26 20:19:37 -07:00
Mandy Chung
f0d2f69eed 7048466: Move sun.misc.JavaxSecurityAuthKerberosAccess to sun.security.krb5 package
Reviewed-by: weijun, alanb
2011-05-27 09:01:33 +08:00
John R Rose
025d0aead8 7032323: code changes for JSR 292 EG adjustments to API, through Public Review
API code changes and javadoc changes following JSR 292 Public Review comments, through PFD

Reviewed-by: never
2011-05-26 17:37:36 -07:00
Abhijit Saha
e1bd798f84 Merge 2011-05-26 17:26:13 -07:00
Abhijit Saha
795971940c Merge 2011-05-26 17:25:35 -07:00
Tom Rodriguez
382a3145b9 Merge 2011-05-26 16:39:34 -07:00
Tom Rodriguez
7cf200bd15 7047961: JSR 292 MethodHandleWalk swap args doesn't handle T_LONG and T_DOUBLE properly
Reviewed-by: kvn, jrose
2011-05-26 14:44:41 -07:00
Igor Veresov
193c0ac698 7047491: C1: registers saved incorrectly when calling checkcast_arraycopy stub
Save and restore the argument registers around the call to checkcast_arraycopy

Reviewed-by: never, roland
2011-05-26 13:15:01 -07:00
Miroslaw Niemiec
45f53b91f1 7046882: Regression : JDK 7b123 : Enum exchanged as parameters using CORBA call results in Exception
Reviewed-by: raginip
2011-05-26 13:05:36 -07:00
Vladimir Kozlov
a1e18b9ed3 7048332: Cadd_cmpLTMask doesn't handle 64-bit tmp register properly
Use ins_encode %{ %} form to encode cadd_cmpLTMask() instruction and remove unused code.

Reviewed-by: never
2011-05-25 21:17:07 -07:00
Phil Race
6b60f787a4 7044394: TrueTypeFont inner class DirectoryEntry should be static
Reviewed-by: bae, jgodinez
2011-05-25 19:53:08 -07:00
Tom Rodriguez
f6d95d906a 7046732: JSR 292 assert(result == cpce->f1()) failed: expected result for assembly code
Reviewed-by: kvn, iveresov, jrose
2011-05-25 16:04:09 -07:00
David Katleman
170844d307 7044486: open jdk repos have files with incorrect copyright headers, which can end up in src bundles
Reviewed-by: ohair, trims
2011-05-25 13:32:36 -07:00
David Katleman
f1744917be 7044486: open jdk repos have files with incorrect copyright headers, which can end up in src bundles
Reviewed-by: ohair, trims
2011-05-25 13:32:10 -07:00
David Katleman
c1a8187d76 7044486: open jdk repos have files with incorrect copyright headers, which can end up in src bundles
Reviewed-by: ohair, trims
2011-05-25 13:31:02 -07:00
Vladimir Kozlov
65530c9100 7048030: is_scavengable changes causing compiler to embed more constants
CiObject::can_be_constant() and should_be_constant() should use is_perm() instead of !is_scavengable()

Reviewed-by: never, jrose
2011-05-24 20:24:11 -07:00
Thomas Salter
da271b804e 7046893: LP64 problem with double_quadword in c1_LIRAssembler_x86.cpp
Fixed invalid casts in address computation

Reviewed-by: kvn, never
2011-05-24 15:30:05 -07:00
Mark Reinhold
45e6d77e4d 7048009: Update .jcheck/conf files for JDK 8
Reviewed-by: jjh
2011-05-24 15:28:43 -07:00
Mark Reinhold
80e464755e 7048009: Update .jcheck/conf files for JDK 8
Reviewed-by: jjh
2011-05-24 15:28:39 -07:00
Mark Reinhold
60efa7c218 7048009: Update .jcheck/conf files for JDK 8
Reviewed-by: jjh
2011-05-24 15:28:38 -07:00
Mark Reinhold
44af04a583 7048009: Update .jcheck/conf files for JDK 8
Reviewed-by: jjh
2011-05-24 15:28:35 -07:00
Mark Reinhold
79f6d8076c 7048009: Update .jcheck/conf files for JDK 8
Reviewed-by: jjh
2011-05-24 15:28:32 -07:00
Mark Reinhold
24b47ab2e8 7048009: Update .jcheck/conf files for JDK 8
Reviewed-by: jjh
2011-05-24 15:28:26 -07:00
Mark Reinhold
d418cb71c2 7048009: Update .jcheck/conf files for JDK 8
Reviewed-by: jjh
2011-05-24 15:28:18 -07:00
Sean Mullan
360343c8ed Merge 2011-05-24 14:32:10 -07:00
Deepak Bhole
b49a7d2768 7044443: Permissions resolved incorrectly for jar protocol (Patch from bugs.openjdk.java.net)
Reviewed-by: alanb, chegar
2011-05-24 14:15:14 -07:00
Erik Trimble
52a398ceb4 Merge 2011-05-24 14:11:38 -07:00
Erik Trimble
8826c8bf9f Merge 2011-05-24 14:07:12 -07:00
Erik Trimble
88f5cae01f Added tag hs21-b13 for changeset c59e039b8a59 2011-05-24 14:02:47 -07:00
Vladimir Kozlov
69bcf41540 7047300: VM crashes with assert(_base == InstPtr) failed: Not an object pointer
The code incorrectly used is_instptr() instead of is_oopptr() to get const_oop.

Reviewed-by: never
2011-05-24 12:54:51 -07:00
Abhijit Saha
5d483c81f7 Merge 2011-05-24 11:12:40 -07:00
Abhijit Saha
ba7ff766e3 Merge 2011-05-24 11:11:27 -07:00
Pavel Porvatov
266d3c9585 7045593: Possible Regression : JTextfield cursor placement behavior algorithm has changed
Reviewed-by: peterz
2011-05-24 11:37:09 +04:00
Y. Srinivas Ramakrishna
ed15a87975 7042740: CMS: assert(n> q) failed: Looping at: ... blockOffsetTable.cpp:557
Do a one-step look-ahead, when sweeping free or garbage blocks, to avoid overstepping sweep limit, which may become a non-block-boundary because of a heap expansion delta coalescing with a previously co-terminal free block.

Reviewed-by: brutisso, tonyp
2011-05-23 16:42:14 -07:00
Maurizio Cimadamore
fa196116c7 7046348: Regression: javac complains of missing classfile for a seemingly unrelated interface
Types.implementation forces unnecessary symbol completion on superinterfaces of a given type

Reviewed-by: jjg
2011-05-23 11:55:55 +01:00
Coleen Phillimore
57769e3600 7033141: assert(has_cp_cache(i)) failed: oob
Unrewrite bytecodes for OOM error allocating the constant pool cache.

Reviewed-by: dcubed, acorn, never
2011-05-21 15:39:54 -07:00
Vladimir Kozlov
800a1a0611 7045506: assert(!can_reshape || !new_phi) failed: for igvn new phi should be hooked
Replace the assert in PhiNode::Ideal with check to avoid transformation of new phi.

Reviewed-by: never
2011-05-21 13:59:55 -07:00
Vladimir Kozlov
0aff6e35b8 7045693: java/util/EnumSet/EnumSetBash.java still failing intermittently
New limit for unrolled loop should be set only for zero trip guard and loop iteration test.

Reviewed-by: never
2011-05-21 11:44:31 -07:00
John Coomes
8b76becfe7 Merge 2011-05-20 22:27:48 -07:00
Lana Steuck
04c1ea3f9f Merge 2011-05-20 21:00:06 -07:00
Suchen Chien
94128d3cf0 Added tag jdk7-b143 for changeset 1eab738591a7 2011-05-20 16:04:23 -07:00
Suchen Chien
44f7c58593 Added tag jdk7-b143 for changeset d2ab47373680 2011-05-20 16:04:09 -07:00
Suchen Chien
fa13db19b5 Added tag jdk7-b143 for changeset 2917db2e1e91 2011-05-20 16:04:03 -07:00
Suchen Chien
3d8755bc34 Added tag jdk7-b143 for changeset 9fcad86579e6 2011-05-20 16:04:02 -07:00
Suchen Chien
0b8be06024 Added tag jdk7-b143 for changeset c59e039b8a59 2011-05-20 16:03:55 -07:00
Suchen Chien
a0b94c4dc8 Added tag jdk7-b143 for changeset 9f1dca42bec3 2011-05-20 16:03:49 -07:00
Suchen Chien
0432476b6e Added tag jdk7-b143 for changeset 83db8167c9f6 2011-05-20 16:03:44 -07:00
Vladimir Kozlov
8d44d62173 7046096: SEGV IN C2 WITH 6U25
Missing fail flag set in strings concatenation code.

Reviewed-by: never
2011-05-20 12:46:20 -07:00
Erik Trimble
81013a98d0 7040781: Bump the HS21 build number to 14
Update the HS21 build number to 14

Reviewed-by: jcoomes
2011-05-20 05:24:46 -07:00
Erik Trimble
0840b597d1 Merge 2011-05-20 05:24:32 -07:00
Kelly O'Hair
a3b2fd358d 7044493: Incorrectly formated GPL headers in JDK7 JAXP source drop
Reviewed-by: joehw
2011-05-19 08:38:13 -07:00
Lana Steuck
cef72337b1 Merge 2011-05-18 18:18:04 -07:00
Lana Steuck
02261d9dd8 Merge 2011-05-18 17:18:52 -07:00
Joe Darcy
250f88282b 7045138: OutOfMemoryError thrown without stack trace in jdk7-b142
Reviewed-by: dholmes, mchung
2011-05-18 16:49:20 -07:00
Suchen Chien
fdf41bb6d1 Merge 2011-05-18 16:32:05 -07:00
Tom Rodriguez
b95e28d25a Merge 2011-05-18 11:45:06 -07:00
Keith McGuigan
33cd8e7aa0 Merge 2011-05-18 10:12:31 -04:00
Bengt Rutisson
5417807e7a Merge 2011-05-18 13:19:32 +02:00
John R Rose
8bb387d77e 7044892: JSR 292: API entry points sometimes throw the wrong exceptions or doesn't throw the expected one
Point-fixes for 7038847, 7038860, 7042656, 7042829, 7041853, and several other reports

Reviewed-by: never, kvn
2011-05-17 19:48:19 -07:00
John R Rose
4b011923e2 7032850: MethodHandle.invokeGeneric throws unspecified RuntimeException if parameterized method is called
Implement invocation corner cases, including correct type conversions and interface type enforcement.

Reviewed-by: never
2011-05-17 19:48:14 -07:00
Tom Rodriguez
f5e5b2b6e2 Merge 2011-05-17 19:15:34 -07:00
Tom Rodriguez
c2f2cb75fc 7045513: JSR 292 inlining causes crashes in methodHandleWalk.cpp
Reviewed-by: jrose
2011-05-17 19:11:51 -07:00
John R Rose
807e4b3dcf 7044892: JSR 292: API entry points sometimes throw the wrong exceptions or doesn't throw the expected one
Fix to 7042656: JSR292: invokeExact/Generic doesn't throw UnsupportedOperationException if invoked via Method.invoke

Reviewed-by: never
2011-05-17 15:43:46 -07:00
Erik Trimble
282881dd84 Merge 2011-05-17 14:29:59 -07:00
Vladimir Kozlov
32ead86b1c 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
Fixed tests.

Reviewed-by: iveresov, never
2011-05-17 12:26:33 -07:00
Bertrand Delsart
4b893d695b 7045515: ARM assembly code for JSR 292 ricochet frames
ARM ricochet port and minor fixes in shared debug code

Reviewed-by: jrose, vladidan
2011-05-17 16:50:27 +02:00
David Holmes
0a07595216 Merge 2011-05-17 09:29:56 -04:00
John Cuthbertson
95548aa291 7041440: G1: assert(obj->is_oop_or_null(true )) failed: Error #
During an evacuation pause clear the region fields of any concurrent marking task whose local finger points into the collection set as the values in the region fields will become stale. Clearing these fields causes the concurrent mark task to claim a new region when marking restarts after the pause.

Reviewed-by: tonyp, iveresov
2011-05-17 00:56:01 -07:00
Tom Rodriguez
a16e057c0a 6996747: SIGSEGV in nmethod::cleanup_inline_caches / CompiledIC::verify
Reviewed-by: kvn, iveresov
2011-05-16 22:16:44 -07:00
Lana Steuck
a9493d71a0 Merge 2011-05-16 18:19:34 -07:00
Lana Steuck
92d86d3179 Merge 2011-05-16 18:17:26 -07:00
Lana Steuck
83eed73863 Merge 2011-05-16 18:15:42 -07:00
Phil Race
45986bdcc1 7044682: Image I/O JPEG Metadata spec. should document that PhotoYCC ColorSpace interpretation is optional
Reviewed-by: flar
2011-05-16 15:38:56 -07:00
Vladimir Kozlov
0e10a5ad61 7044725: -XX:-UnrollLimitCheck -Xcomp : Exception: String index out of range: 29488
Fix problems in new RCE code.

Reviewed-by: never
2011-05-16 14:21:16 -07:00
Daniel D. Daugherty
41491be4d6 7041595: 4/4 add lost test for 6487638
Add missing LoggingDeadlock3.java and LoggingDeadlock3.props

Reviewed-by: dsamersoff, never, acorn, mchung
2011-05-16 12:58:48 -07:00
Daniel D. Daugherty
792f2aa15e 7016208: 4/3 null sometimes returned by java.util.logging.Logger.getLogger(String name) in -server -Xcomp
Logger can be GC'ed between LogManager.addLogger() and LogManager.getLogger()

Reviewed-by: dsamersoff, never, acorn, mchung
2011-05-16 12:57:40 -07:00
Daniel D. Daugherty
564b2b7a17 6977677: 3/2 Deadlock on logging subsystem initialization
Over synchronized Logger.getLogger() deadlocks with LogManager.<clinit>via PlatformLogger

Reviewed-by: dsamersoff, never, acorn, mchung
2011-05-16 12:56:29 -07:00
Kelly O'Hair
eebc4b1ee3 7043700: Regression for IcedTea builds
Reviewed-by: dholmes, omajid
2011-05-16 08:40:01 -07:00
Frederic Parain
e075dabb40 7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
Add a JMX notification to GarbageCollectorMXBeans

Reviewed-by: acorn, mchung
2011-05-16 17:28:18 +02:00
Dmitry Cherepanov
f01001207c 7010721: Frame#setMaximizedbounds not working properly on dual screen environment
Reviewed-by: art, anthony
2011-05-16 18:40:10 +04:00
Chris Hegarty
a4dd92fb42 7042679: Phaser javadoc example does not compile
Reviewed-by: dl
2011-05-16 13:10:59 +01:00
Maurizio Cimadamore
1ee0f8da66 7043922: Regression: internal compiler error for nested anonymous inner class featuring varargs constructor
Attributing a constructor call does not clean up the compiler's attribution context

Reviewed-by: jjg
2011-05-16 09:38:04 +01:00
David Holmes
fc79ef453f 7035744: jprt no longer does open-only builds
Added Open (OpenJDK) and Emb (Embedded) build flavours to JPRT. Added a few open builds and basic sanity tests to the normal JDK7 JPRT submission job.

Reviewed-by: ohair, jcoomes, bobv, kvn
2011-05-15 23:57:15 -04:00
Lana Steuck
b5f9d4cad8 Merge 2011-05-14 16:51:25 -07:00
Lana Steuck
2f591422cc Merge 2011-05-14 15:21:38 -07:00
Lana Steuck
ea48ecca85 Merge 2011-05-14 14:55:11 -07:00
Xueming Shen
ceaf51e180 7044849: Constructs for Unicode binary properties should be \p{IsXXX} not p{isXXX}
Fixed the doc typo

Reviewed-by: alanb
2011-05-14 11:55:24 -07:00
Lana Steuck
61fc85e68d Merge 2011-05-14 11:52:15 -07:00
Lana Steuck
40e9a55470 Merge 2011-05-14 11:29:34 -07:00
Lana Steuck
04247c5b48 Merge 2011-05-14 11:24:26 -07:00
Lana Steuck
babc80bdc8 Merge 2011-05-14 10:24:05 -07:00
Lana Steuck
9249a33c97 Merge 2011-05-14 10:24:02 -07:00
Andrei Dmitriev
430ceddfa3 7042537: When press the 'Print' button,the NullPointerException is thrown and printdialog is not pop up
Reviewed-by: dcherepanov, art
2011-05-13 19:49:21 +04:00
Frederic Parain
2804648f95 7031754: javax.management docs need to be updated to replace Java SE 6 occurrences
Remove references to a specific version of the Java Platform

Reviewed-by: mchung, kamg
2011-05-13 13:20:16 +02:00
Erik Trimble
643341dea0 7040780: Bump the HS21 build number to 13
Update the HS21 build number to 13

Reviewed-by: jcoomes
2011-05-12 22:05:08 -07:00
Erik Trimble
ead9ceeca5 Merge 2011-05-12 22:05:04 -07:00
Erik Trimble
14216b3f51 Added tag hs21-b12 for changeset 19acba38f929 2011-05-12 21:42:52 -07:00
Tom Rodriguez
8cdd97938c Merge 2011-05-12 19:39:58 -07:00
John R Rose
9a58e303d7 6939861: JVM should handle more conversion operations
Integrate JDK code with JVM-supplied ricochet frames.

Reviewed-by: never, twisti
2011-05-12 19:27:49 -07:00
John R Rose
eb9632506b 7034977: JSR 292 MethodHandle.invokeGeneric should be renamed MethodHandle.invoke
Rename invokeGeneric to invoke

Reviewed-by: never, twisti
2011-05-12 19:27:33 -07:00
Kelly O'Hair
c02e3d417d Merge 2011-05-12 17:56:36 -07:00
Y. Srinivas Ramakrishna
e69cc568e9 Merge 2011-05-12 17:36:45 -07:00
Suchen Chien
26adfef762 Added tag jdk7-b142 for changeset 4fc57aa6bbab 2011-05-12 17:17:50 -07:00
Suchen Chien
19d2501437 Added tag jdk7-b142 for changeset f09a2b7a4eeb 2011-05-12 17:17:36 -07:00
Suchen Chien
4a5e1727dc Added tag jdk7-b142 for changeset 837252ffce27 2011-05-12 17:17:30 -07:00
Suchen Chien
a852fe1092 Added tag jdk7-b142 for changeset 80cd3986b5de 2011-05-12 17:17:29 -07:00
Suchen Chien
81fa17dbea Added tag jdk7-b142 for changeset 19acba38f929 2011-05-12 17:17:22 -07:00
Suchen Chien
288dc3d0c3 Added tag jdk7-b142 for changeset f1451ca1fca3 2011-05-12 17:17:16 -07:00
Suchen Chien
2f060b40b5 Added tag jdk7-b142 for changeset 70e694b33e64 2011-05-12 17:17:14 -07:00
Tom Rodriguez
a09d6af7ae Merge 2011-05-12 16:24:44 -07:00
Y. Srinivas Ramakrishna
7721092e27 Merge 2011-05-12 15:05:22 -07:00
Christian Thalinger
db9005f0d3 6998541: JSR 292 implement missing return-type conversion for OP_RETYPE_RAW
Reviewed-by: jrose, kvn, never
2011-05-12 14:04:48 -07:00
Tom Rodriguez
3327033b50 Merge 2011-05-12 10:33:17 -07:00
Frederic Parain
b38843c8d9 7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
Add a notification to the GarbageCollectorMXBeans

Reviewed-by: acorn, mchung
2011-05-12 10:30:11 -07:00
Tom Rodriguez
e5357d4bee 7043461: VM crashes in void LinkResolver::runtime_resolve_virtual_method
Reviewed-by: kvn, coleenp
2011-05-12 10:29:02 -07:00
Kelly O'Hair
d3055ef8e0 Merge 2011-05-12 07:28:52 -07:00
Kelly O'Hair
30a20e1d62 7043921: generate java-rmi.cgi on 64 bit platform
Reviewed-by: omajid, katleman
2011-05-12 07:24:37 -07:00
Keith McGuigan
2ba6bd02d2 7044203: Missing @test tag in test/javax/management/timer/StartTest.java
Add tag

Reviewed-by: alanb
2011-05-12 08:17:29 -04:00
Xue-Lei Andrew Fan
36415e8393 7043514: NPE in sun.security.ssl.JsseJce.isEcAvailable
Reviewed-by: weijun, vinnie, wetmore
2011-05-11 20:39:40 -07:00
Suchen Chien
70185c760f Merge 2011-05-11 18:52:46 -07:00
Keith McGuigan
91db4e26f7 6659215: javax.management.timer.Timer frequently fails to start
Copy array to avoid ConcurrentModificationException

Reviewed-by: dcubed, alanb
2011-05-11 20:18:13 -04:00
Jim Graham
b7fbd6c9bf 7043054: REGRESSION: JDK 7 b126 : Wrong userBounds in Paint.createContext()
Reviewed-by: prr
2011-05-11 16:12:01 -07:00
Y. Srinivas Ramakrishna
c40a4d6878 7043891: CMS: assert(_whole_heap.contains(p)) failed: out of bounds access to card marking array
Fixed assertion checking code that was attempting to translate addresses past end of space for card-table slot. Also elaborated some assertion checking messages.

Reviewed-by: iveresov, jmasa, tonyp
2011-05-11 15:47:12 -07:00
Jonathan Gibbons
31ffaa86e5 7043867: docs/jdk/api/javac have html files that have issues with HTML4 compliance
Reviewed-by: darcy
2011-05-11 14:55:02 -07:00
Michael Fang
6df9bf9a41 7044019: LocaleEnhanceTest.java needs to be updated for 7004603
Reviewed-by: naoto
2011-05-11 14:12:50 -07:00
Michael Fang
b1e12ab2ec Merge 2011-05-11 12:55:34 -07:00
Michael Fang
0852628421 7004603: L10n needed for newly added codes in LocaleNames
Reviewed-by: naoto
2011-05-11 12:53:13 -07:00
Keith McGuigan
d2ab644ad1 Merge 2011-05-11 13:19:53 -04:00
Daniel D. Daugherty
1d148aa7d3 7043298: 4/4 fix for 7028172 causes "Label too long: ..." error message
Use '-e' version of sed expressions. Clarify and fix comments

Reviewed-by: never, acorn
2011-05-11 08:59:46 -07:00
Xueming Shen
dcf6e9a4c2 7043234: (fmt) java.util.Formatter links in javadoc to BigDecimal need to be fixed
Fixed the doc miss

Reviewed-by: alanb, emcmanus
2011-05-11 08:54:16 -07:00
Bhavesh Patel
55d817cdad 7043684: Update man pages for JDK 7 tools
Reviewed-by: skannan
2011-05-11 08:30:46 -07:00
Alan Bateman
fa107ec80e 7043788: (fs) PosixFileAttributes.owner() or group() throws NPE if owner/group not in passwd/group database
Reviewed-by: chegar
2011-05-11 15:00:16 +01:00
Alan Bateman
54cdd2715c 7043425: (fc) ClosedByInterruptException thrown but interrupt status not set
Reviewed-by: dholmes, chegar
2011-05-11 14:57:17 +01:00
Anthony Petrov
b14549c78a 7043455: Taking a screenshot may fail on X11 after 6903034
Backout 6903034

Reviewed-by: art, dcherepanov
2011-05-11 17:51:46 +04:00
Maurizio Cimadamore
568387fe02 7041730: Regression: compiler accepts invalid cast from int to Byte
Implementation of cast conversion rules between primitive and boxed types is too liberal

Reviewed-by: jjg
2011-05-11 13:12:11 +02:00
Maurizio Cimadamore
d3d252186b 7042566: Regression: new ambiguity between varargs method
Erroneous ambiguity error when choosing most specific varargs method

Reviewed-by: jjg
2011-05-11 13:10:57 +02:00
Andrei Dmitriev
c0a3fc99bd 7042429: jdk 7 b140: crashes in awt.dll+0xb85fb] Java_sun_awt_Win32GraphicsEnvironment_isVistaOS+0xfdf
Reviewed-by: bae, dcherepanov
2011-05-11 15:00:25 +04:00
Michael Fang
2aeb28d63b Merge 2011-05-10 19:58:00 -07:00
Michael Fang
dcdeba2221 Merge 2011-05-10 19:57:30 -07:00
Michael Fang
821b7a445b Merge 2011-05-10 19:54:53 -07:00
Jonathan Gibbons
831a82e3c1 7043694: printStackTrace call should be removed
Reviewed-by: darcy
2011-05-10 19:53:49 -07:00
Erik Trimble
a4fbf5eda5 Merge 2011-05-10 18:31:47 -07:00
Tom Rodriguez
249ae52324 7043040: JSR292: JRuby bench/shootout/binarytrees.ruby-2.ruby SEGV: constantPoolKlass::oop_follow_contents
Reviewed-by: kvn, ysr
2011-05-10 17:44:14 -07:00
Kelly O'Hair
789ec8e924 Merge 2011-05-10 17:42:57 -07:00
Kelly O'Hair
a364036217 7042773: Integrate JAXWS 2.2.4 update to JDK7
Reviewed-by: ramap
2011-05-10 16:59:15 -07:00
Michael Fang
6908741d9b 7043548: message drop 3 translation integration
Reviewed-by: yhuang
2011-05-10 16:19:40 -07:00
Thomas Ng
7030b0f6fb Merge 2011-05-10 16:12:12 -07:00
Yuka Kamiya
2f96d5c458 7041232: IllegalArgumentException in sun.text.bidi.BidiBase.setLine starting from JDK 7 b64
Reviewed-by: okutsu
2011-05-11 08:02:44 +09:00
Jim Graham
de0dac8ac8 7040717: Test case for 6522514 was not included in bug fix
Reviewed-by: prr
2011-05-10 15:59:01 -07:00
Thomas Ng
dac9fc40f8 Merge 2011-05-10 15:31:39 -07:00
Michael Fang
b0b388c137 7043548: message drop 3 translation integration
Reviewed-by: yhuang
2011-05-10 15:07:08 -07:00
Michael Fang
95f71f8848 7022005: [ja,zh_CN] javadoc, part of navigation bar in generated html are not translated
Reviewed-by: yhuang
2011-05-10 15:04:37 -07:00
Michael Fang
29fd1ea641 7043548: message drop 3 translation integration
Reviewed-by: yhuang
2011-05-10 15:02:38 -07:00
Michael Fang
794e6118a2 7038807: [CCJK] OK button on message dialog of JOptionpane is not translated
Reviewed-by: yhuang
2011-05-10 14:56:33 -07:00
Christopher Gruszka
6137404f00 Merge 2011-05-10 17:56:11 -04:00
Michael Fang
9d5b11b9af 7042475: [ja,zh_CN] extra mnemonic key in jconsole
Reviewed-by: yhuang
2011-05-10 14:53:34 -07:00
Michael Fang
2fbd14ee69 7028447: security-related resources Chinese translation errors
Reviewed-by: weijun
2011-05-10 14:47:10 -07:00
Michael Fang
66230b488e 7042323: [sv, de, es, it] Print dialog has duplicate mnemonic key
Reviewed-by: yhuang
2011-05-10 13:08:08 -07:00
Vladimir Kozlov
70dfd21e87 7043552: regression after 7042327
Generate Opaque2 node only during first unroll.

Reviewed-by: never
2011-05-10 12:57:21 -07:00
Michael Fang
523d29a670 7043580: integrate man page translation drop 2 into jdk7
Reviewed-by: yhuang
2011-05-10 12:31:42 -07:00
Igor Veresov
953f34d325 7043564: compile warning and copyright fixes
Fixed the warning, also fixed copyrights in a bunch of files.

Reviewed-by: johnc, kvn
2011-05-10 12:26:10 -07:00
Mike Duigou
20b1b3d6c1 Merge 2011-05-10 12:14:07 -07:00
Lance Andersen
f3d675ecef 7043443: address missed reason initialization in BatchUpdateException
Reviewed-by: alanb
2011-05-10 14:41:18 -04:00
Mike Duigou
165868a3f6 7043513: Update test for StandardCharsets
Reviewed-by: alanb
2011-05-10 10:16:37 -07:00
Anthony Petrov
cd2f47b0fd 7041387: Introduce new boolean system property java.awt.smartInvalidate
The behavior introduced with 6852592 is now enabled by the new system property only

Reviewed-by: dcherepanov
2011-05-10 18:28:05 +04:00
Oleg Pekhovskiy
ba52c9f91e 7035053: java/awt/event/MouseWheelEvent/DisabledComponent/DisabledComponent.java fails against jdk7 b134
Reviewed-by: art, denis, ant, dcherepanov
2011-05-10 17:56:12 +04:00
Alexander Zuev
8afd78fe59 7034619: Scrollable Tabs don't appear with JDK7 Synth based LaF, different from Java 5/6
Reviewed-by: alexp
2011-05-10 17:06:26 +04:00
Christian Thalinger
fee8d7fca4 7042122: JSR 292: adjust various inline thresholds for JSR 292 API methods and method handle adapters
Reviewed-by: jrose, never, kvn
2011-05-10 00:45:03 -07:00
Y. Srinivas Ramakrishna
8e56205189 6883834: ParNew: assert(!_g->to()->is_in_reserved(obj),"Scanning field twice?") with LargeObjects tests
Fixed process_chunk_boundaries(), used for parallel card scanning when using ParNew/CMS, so as to prevent double-scanning, or worse, non-scanning of imprecisely marked objects exceeding parallel chunk size. Made some sizing parameters for parallel card scanning diagnostic, disabled ParallelGCRetainPLAB, and elaborated and clarified some comments.

Reviewed-by: stefank, johnc
2011-05-10 00:33:21 -07:00
Tom Rodriguez
42e49be1bc 7043301: assert(locals < caller->fp() || locals > (caller->fp() + 16)) failed: locals in save area
Reviewed-by: kvn
2011-05-09 19:45:52 -07:00
Joe Darcy
7edc69abf5 7021645: Project Coin: Minor improvements to java.lang.Throwable
Reviewed-by: mduigou
2011-05-09 17:50:43 -07:00
Weijun Wang
93cc60559c 7041635: GSSContextSpi.java copyright notice error
Reviewed-by: valeriep
2011-05-10 07:00:36 +08:00
Naoto Sato
bce7c82aae 7041950: Fix copyright
Reviewed-by: okutsu
2011-05-09 13:30:12 -07:00
Jennifer Godinez
abe6c8f317 Merge 2011-05-09 12:34:02 -07:00
Jennifer Godinez
271bfc2715 Merge 2011-05-09 12:32:40 -07:00
Jennifer Godinez
1c21c0f406 Merge 2011-05-09 12:26:53 -07:00
Alan Bateman
67fd9e16ef Merge 2011-05-09 18:53:57 +01:00
Alan Bateman
914105d32e 7042979: Rename StandardSocketOption and StandardWatchEventKind
Reviewed-by: forax, chegar
2011-05-09 18:45:33 +01:00
Mike Duigou
8b1efebaa1 7043104: disable test java/lang/invoke/InvokeDynamicPrintArgs.java
Reviewed-by: alanb
2011-05-09 09:13:47 -07:00
Mike Duigou
66f7633b48 Merge 2011-05-09 08:58:00 -07:00
Doug Lea
25ec11dfe6 7042673: LockSupport.getBlocker(null) crashes
Reviewed-by: chegar
2011-05-09 16:36:20 +01:00
Vinnie Ryan
691c55d04a 6987652: VM crashed in sun.security.mscapi.RSAKeyPairGenerator.generateRSAKeyPair(...)
Reviewed-by: alanb
2011-05-09 15:58:25 +01:00
Alan Bateman
6ca19f3995 Merge 2011-05-09 01:57:53 -07:00
Alan Bateman
ca08676916 Merge 2011-05-09 01:57:28 -07:00
Alan Bateman
473f41e4e3 Merge 2011-05-09 01:56:24 -07:00
Alan Bateman
03fbf449cd Merge 2011-05-09 01:47:05 -07:00
Tom Rodriguez
9b9953cb0b Merge 2011-05-06 19:34:55 -07:00
Joe Darcy
d814ae14d1 7011326: Add informative example to @SafeVarargs type or language discussion
Reviewed-by: mcimadamore, mduigou
2011-05-06 17:06:25 -07:00
Tom Rodriguez
6aeaca98d1 6939861: JVM should handle more conversion operations
Reviewed-by: twisti, jrose
2011-05-06 16:33:13 -07:00
Kelly O'Hair
4c74378e6a Merge 2011-05-06 15:49:09 -07:00
Erik Trimble
63c85322b1 7040779: Bump the HS21 build number to 12
Update the HS21 build number to 12

Reviewed-by: jcoomes
2011-05-06 14:41:06 -07:00
Erik Trimble
cee74b9a63 Merge 2011-05-06 14:41:00 -07:00
Abhijit Saha
4e033ce5f2 Merge 2011-05-06 14:33:44 -07:00
Erik Trimble
b9851bd6eb Added tag hs21-b11 for changeset de80080e77a6 2011-05-06 14:10:20 -07:00
Igor Veresov
bb2c21a025 7042153: guarantee(x_compare_res != Constant::not_comparable) failed: incomparable constants in IfOp
Handle IfOps folding properly in case of unloaded constant oop arguments

Reviewed-by: kvn, never
2011-05-06 12:12:29 -07:00
Tom Rodriguez
b73681ae0c Merge 2011-05-06 11:36:25 -07:00
Kelly O'Hair
c940e5a884 Merge 2011-05-06 10:41:14 -07:00
Christine Lu
4a2870a449 Merge 2011-05-06 10:31:40 -07:00
Michael Fang
207f711ac2 7021691: Most log level words are not translated in java logging
Reviewed-by: yhuang
2011-05-06 10:07:42 -07:00
Frederic Parain
186fce71ec 7028071: Add two attributes to the OperatingSystemMXBean to provide CPU Load info
Add getProcessCpuLoad() and getSystemCpuLoad() to the OperatingSystemMXBean

Reviewed-by: acorn, dholmes, mchung
2011-05-06 18:09:33 +02:00
Keith McGuigan
cb6e2c12f4 Merge 2011-05-06 11:25:16 -04:00
Andrei Dmitriev
86b4b082bb 6894541: javax/swing/JTable/6788484/bug6788484.java fails w/ compilation errors
Reviewed-by: alexp
2011-05-06 16:01:17 +04:00
Bengt Rutisson
90ab9d500c Merge 2011-05-06 09:45:18 +02:00
Abhijit Saha
404fbff117 Merge 2011-05-05 22:30:15 -07:00
Abhijit Saha
92df2d2184 Merge 2011-05-05 22:29:05 -07:00
Abhijit Saha
2cce4d0d35 Merge 2011-05-05 22:28:31 -07:00
Vladimir Kozlov
8698030a91 7042327: assert(opaq->outcnt() == 1 && opaq->in(1) == limit)
Separate limit by Opaque2 node when calculating new limit for unrolled loop.

Reviewed-by: never
2011-05-05 21:06:14 -07:00
Andrew John Hughes
24b0b30f9e Merge 2011-05-06 02:27:10 +01:00
David Holmes
8553d963c0 7036525: Disable alternative source mechanism for OPENJDK builds
By default if OPENJDK=true is set then we don't look in the alt-src predefined location. The user can explicitly set HS_ALT_SRC_REL to the desired location in conjunction with OPENJDK=true, if they wish.

Reviewed-by: jcoomes, kamg
2011-05-05 21:20:21 -04:00
Christine Lu
e20a4c4a39 7026163: gzip tar files
Reviewed-by: katleman
2011-05-05 18:05:24 -07:00
Andrew John Hughes
6e40ce24d5 7042040: Remove disk space sanity check
Remove outdated disk space checks using df

Reviewed-by: ohair, omajid
2011-05-06 01:55:29 +01:00
Kelly O'Hair
e4fd8ee0ac Merge 2011-05-05 15:23:20 -07:00
Suchen Chien
eb1839a110 Added tag jdk7-b141 for changeset af4b2168b0f9 2011-05-05 14:02:30 -07:00
Suchen Chien
b56aedf465 Added tag jdk7-b141 for changeset 3d44ee873b9c 2011-05-05 14:02:17 -07:00
Suchen Chien
08faa8037b Added tag jdk7-b141 for changeset 76bb81c6327c 2011-05-05 14:02:11 -07:00
Suchen Chien
31d82bb88b Added tag jdk7-b141 for changeset cb7a3284b15b 2011-05-05 14:02:10 -07:00
Suchen Chien
e554c899e5 Added tag jdk7-b141 for changeset dbc77e0dc173 2011-05-05 14:02:02 -07:00
Suchen Chien
5af1de038e Added tag jdk7-b141 for changeset b24cc3620ee4 2011-05-05 14:01:57 -07:00
Suchen Chien
230aec2f49 Added tag jdk7-b141 for changeset 0f69dca4aa47 2011-05-05 14:01:55 -07:00
Keith McGuigan
d7fa132400 7033669: JVM TI spec has to be changed to not contain URLS to the VM Spec
Update JVMTI source files to remove hyperlinks and add full legal name

Reviewed-by: acorn, dcubed, dholmes
2011-05-05 12:50:42 -04:00
John Coomes
62a8508587 6728025: LinkResolver is missing some ResourceMarks
Reviewed-by: dholmes, coleenp, ysr, kamg
2011-05-05 07:51:05 -07:00
Kevin Walls
64fd535370 Merge 2011-05-05 09:33:14 -04:00
Antonios Printezis
e061c0b0a4 7040450: G1: assert((_g1->evacuation_failed()) || (!_g1->obj_in_cs(obj))) failed: shouldn't still be in ..
There is a race in the evac failure handling code that causes the condition the assert checks not to be true. The fix is to replace the too-strong assert with a more targeted one.

Reviewed-by: johnc, ysr, jcoomes
2011-05-05 09:15:52 -04:00
Vladimir Kozlov
9f0bca3b75 7042070: Typo in Test6796786.java
The test should compare with -0.0f.

Reviewed-by: never, iveresov
2011-05-04 22:41:17 -07:00
Tom Rodriguez
d63a3a993b 7042052: Xcomp crash with PopSynchronousTest
Reviewed-by: kvn, iveresov
2011-05-04 22:31:18 -07:00
David Holmes
ec330e431d Merge 2011-05-04 23:10:58 -04:00
David Holmes
679f58d07c 7041284: arm/ppc Missing launcher mapfiles prevent build
Disable use of launcher mapfiles when cross-compiling

Reviewed-by: ohair, ksrini
2011-05-04 22:16:28 -04:00
Abhijit Saha
1859ff359e Merge 2011-05-04 16:39:05 -07:00
David Holmes
13d8bb1f5d 7036267: c2/arm: mark version number as experimental and disable on unsupported platforms
Change call to Abstract_VM_Version::vm_info_string to VM_Version::vm_info_string so it cna be overridden by the arch specific VM_Version class

Reviewed-by: bobv, phh
2011-05-04 19:16:49 -04:00
Igor Veresov
63f068ad0d 7041501: NUMA: Expand the old gen more aggressively
Expand the old gen in bigger increments

Reviewed-by: jmasa
2011-05-04 15:08:44 -07:00
Vladimir Kozlov
1ac79543d0 5091921: Sign flip issues in loop optimizer
Fix integer overflow problem in the code generated by loop optimizer.

Reviewed-by: never
2011-05-04 13:12:42 -07:00
Vinnie Ryan
87259cf6b3 6738532: Error in Elliptic Curve NamedCurve determination. (related to PKCS11)
Reviewed-by: valeriep
2011-05-04 20:38:45 +01:00
Abhijit Saha
6372176456 Merge 2011-05-04 12:00:57 -07:00
Abhijit Saha
f60139f2af Merge 2011-05-04 12:00:14 -07:00
Alexander Potochkin
b2607ad0a1 7020198: ImageIcon creates Component with null acc
Reviewed-by: rupashka, hawtin
2011-05-04 11:35:46 -07:00
Abhijit Saha
2a4463da40 7035172: Reintroduce LICENSE file in JDK/JRE bundle
Reviewed-by: billyh
2011-05-04 11:11:40 -07:00
Kelly O'Hair
1fdcbe61a1 Merge 2011-05-04 09:25:05 -07:00
Keith McGuigan
cc15f4771e Merge 2011-05-04 11:04:45 -04:00
Andrei Dmitriev
1bde299474 7040577: Default implementation of Toolkit.loadSystemColors(int[]) and many others doesn't throw HE in hl env
Reviewed-by: dcherepanov, denis
2011-05-04 14:46:11 +04:00
Christian Thalinger
1e12174562 Merge 2011-05-04 03:42:58 -07:00
Christian Thalinger
2d91ad91db Merge 2011-05-04 00:46:22 -07:00
Christian Thalinger
488bc73bcd 7041244: JSR 292: Server VM gets a SEGV running a JCK test
Reviewed-by: iveresov, kvn, never
2011-05-04 00:41:48 -07:00
Tom Rodriguez
af178514e2 7041582: set_mode_flags isn't called without -Xmixed specified
Reviewed-by: kvn, iveresov
2011-05-04 00:21:22 -07:00
Pavel Porvatov
116ccec7a0 7031551: Generics: JComboBox
Reviewed-by: alexp, malenkov
2011-05-04 10:20:14 +04:00
Jennifer Godinez
a5846fb547 Merge 2011-05-03 22:17:58 -07:00
Jennifer Godinez
d98cd779b7 Merge 2011-05-03 22:16:58 -07:00
Jennifer Godinez
d320ad28b1 Merge 2011-05-03 22:15:17 -07:00
Jennifer Godinez
647b4aca4b Merge 2011-05-03 22:14:39 -07:00
Jennifer Godinez
1a8987d69e Merge 2011-05-03 22:13:02 -07:00
Jennifer Godinez
da6966ded5 Merge 2011-05-03 22:11:02 -07:00
Tom Rodriguez
676d346314 7041603: standalone SA doesn't build after 7010849
Reviewed-by: dcubed
2011-05-03 20:56:35 -07:00
Tom Rodriguez
c3a8cf7156 Merge 2011-05-03 17:09:05 -07:00
Mike Duigou
b2a0b94b36 7041612: Rename StandardCharset to StandardCharsets
Reviewed-by: alanb, mr, darcy
2011-05-03 16:32:47 -07:00
Erik Trimble
5f044f9de1 Merge 2011-05-03 16:03:37 -07:00
Erik Trimble
3ad5f6532c Added tag hs21-b10 for changeset 33e592b5ff17 2011-05-03 16:00:35 -07:00
Igor Nekrestyanov
97c6e155ad Merge 2011-05-03 15:02:55 -07:00
Daniel D. Daugherty
544652776c 7041410: 5/4 finish removing SOLARIS_7_OR_LATER from HotSpot
Delete use of SOLARIS_7_OR_LATER from sparcWorks.make

Reviewed-by: never
2011-05-03 12:45:54 -07:00
Zhengyu Gu
07cf5c9b40 Merge 2011-05-03 12:19:04 -07:00
Tom Rodriguez
0ecc18851a 6796786: invalid FP identity transform - (a - b) -> b - a
Reviewed-by: iveresov, twisti
2011-05-03 12:11:54 -07:00
Jon Masamitsu
6819e3739e 7041789: 30% perf regression with c2/arm following 7017732
Implement a more accurate is_scavengable()

Reviewed-by: stefank, jcoomes, ysr
2011-05-03 10:30:34 -07:00
Zhengyu Gu
3c624bcfb1 Merge 2011-05-03 10:17:29 -07:00
Zhengyu Gu
56154746f3 6986065: Rebrand exe/dll company names
Fixed Windows exe/dll right-click properties. "Oracle Corporation" for company name in jdk7, but "Sun Microsystems, Inc." for jdk6.

Reviewed-by: phh, acorn
2011-05-03 13:01:41 -04:00
Dmitry Samersoff
dd299ffb44 Merge 2011-05-03 13:01:31 -04:00
Vladimir Kozlov
e1442309e1 7041100: The load in String.equals intrinsic executed before null check
Remove control from loads in String.equals intrinsic and cast argument to not-null.

Reviewed-by: never
2011-05-03 09:10:39 -07:00
Deepak Bhole
fb47d47b6f 7031385: incorrect register allocation in release_store_fence on linux x86
Since gcc 4.5 the inline assembly trying to use r register for an atomic 8-bit exchange and it leads to compilation error

Reviewed-by: dsamersoff, dholmes
2011-05-03 18:43:18 +04:00
Omair Majid
d02acdc62a 7041156: gcc 4.6 doesn't recognise -export-dynamic option
Since -export-dynamic is a linker option, the correct way to pass it is -Xlinker -export-dynamic

Reviewed-by: dsamersoff, dholmes
2011-05-03 18:24:55 +04:00
Sergey Bylokhov
2b767e1070 7016528: Deadlock during mutual initialization of DataTransferer and DataTransferer$DataFlavorComparator
Reviewed-by: dav, art, denis
2011-05-03 15:19:04 +04:00
Tom Rodriguez
33f0e50994 7009361: JSR 292 Invalid value on stack on solaris-sparc with -Xcomp
Reviewed-by: kvn, twisti
2011-05-02 18:53:37 -07:00
Daniel D. Daugherty
50d82a0f69 7028172: 3/4 SA needs to adapt to Solaris libproc change made in 6748307
Support build and runtime configs of old and new interfaces as appropriate.

Reviewed-by: acorn, never
2011-05-02 14:53:49 -07:00
Jim Graham
1003e3e744 6563734: Path2D.Float and Path2D.Double should have final getPathIterator methods
Reviewed-by: prr
2011-05-02 14:38:22 -07:00
Michael Fang
1227c14986 Merge 2011-05-02 13:55:52 -07:00
Michael McMahon
91442afe47 Merge 2011-05-02 20:17:18 +01:00
Michael McMahon
9987e199cc 7041044: InetAddress.getByName(String,InetAddress) added in error
Reviewed-by: alanb
2011-05-02 20:11:18 +01:00
Weijun Wang
61e1313498 7040151: SPNEGO GSS code does not parse tokens in accordance to RFC 2478
Reviewed-by: valeriep
2011-05-03 02:48:59 +08:00
Joe Darcy
0962e85dc0 7041136: Use Objects.equals in JDK platform classes
Reviewed-by: alanb, mduigou
2011-05-02 11:39:46 -07:00
Xueming Shen
371bd92aef 7040220: java/char_encodin Optimize UTF-8 charset for String.getBytes()/new String(byte[])
Implement sun.nio.cs.ArrayEn/Decoer in utf8

Reviewed-by: alanb
2011-05-02 11:42:52 -07:00
Tom Rodriguez
dfc5561910 Merge 2011-05-02 10:51:36 -07:00
Bhavesh Patel
9678eb8476 6553182: Need to modify javadoc doclet for GPL
Reviewed-by: jjg
2011-05-02 10:14:27 -07:00
Bhavesh Patel
a2642b89a7 6553182: Need to modify javadoc doclet for GPL
Reviewed-by: jjg
2011-05-02 10:10:31 -07:00
Suchen Chien
b3cda84f13 Merge 2011-05-02 09:38:22 -07:00
Suchen Chien
45d22ecc12 Merge 2011-05-02 09:37:41 -07:00
Suchen Chien
b89e0cea75 Merge 2011-05-02 09:36:49 -07:00
Suchen Chien
d813ff6aba Merge 2011-05-02 09:36:45 -07:00
Suchen Chien
f2b6bcdcb9 Merge 2011-05-02 09:36:24 -07:00
Suchen Chien
83b5bf8e6c Merge 2011-05-02 09:35:52 -07:00
Suchen Chien
f6d6fa2431 Merge 2011-05-02 09:35:47 -07:00
Maurizio Cimadamore
fbecf91f80 7040883: Compilation error: "length in Array is defined in an inaccessible class or interface"
Fix of 7034511 (now backed out) is causing spurious accessibility errors

Reviewed-by: jjg
2011-05-02 12:05:41 +01:00
Michael McMahon
c050e4251f Merge 2011-05-02 11:47:55 +01:00
Michael McMahon
551c22b433 6569621: Problem with java/classes_net
Reviewed-by: chegar
2011-05-02 11:02:58 +01:00
Bhavesh Patel
746cdfda77 6492694: @deprecated tag doesn't work in package-info files
Reviewed-by: jjg
2011-05-02 02:13:02 -07:00
Christian Thalinger
6bfb306487 6552561: MaxRecursiveInlineLevel flag doesn't operate correctly
Reviewed-by: kvn, never
2011-05-02 00:55:09 -07:00
Xueming Shen
17bd221976 7036522: j.u.r.Pattern documentation errors
Updated the Perl related information

Reviewed-by: alanb
2011-05-01 11:39:32 -07:00
Igor Nekrestyanov
2b924057aa 7040803: regression: bugster fail to start
Reviewed-by: mullan, weijun, ngthomas
2011-05-01 09:14:36 -07:00
Weijun Wang
317bcf10c2 7040916: DynamicKeyTab test fails on Windows
Reviewed-by: xuelei
2011-05-01 14:22:32 +08:00
Lana Steuck
80d69a4f40 Merge 2011-04-30 16:57:18 -07:00
Lana Steuck
abc0e63cbc Merge 2011-04-30 16:55:46 -07:00
Lana Steuck
18602d10f0 Merge 2011-04-30 15:14:44 -07:00
Maurizio Cimadamore
fcbd7a77c4 7039931: Project Coin: diamond inference fail with generic constructor explicit type-arguments
Diamond should be disallowed in cases where explicit generic constructor parameters are specified

Reviewed-by: jjg
2011-04-30 11:57:46 +01:00
Lana Steuck
0d5b47ed3c Merge 2011-04-29 20:15:22 -07:00
Erik Trimble
caba73d1dd 7040777: Bump the HS21 build number to 11
Update the HS21 build number to 11

Reviewed-by: jcoomes
2011-04-29 17:00:19 -07:00
Erik Trimble
c99361768e Merge 2011-04-29 16:55:43 -07:00
Jim Graham
589a17bd79 6982632: closed/java/awt/Graphics2D/MTGraphicsAccessTest/MTGraphicsAccessTest.java fails
Reviewed-by: prr
2011-04-29 16:27:34 -07:00
Lana Steuck
ba45f1edf0 Merge 2011-04-29 16:03:09 -07:00
Jon Masamitsu
0772441e15 Merge 2011-04-29 14:36:21 -07:00
Mike Duigou
3cb767db94 7040572: Fix broken java/nio/charset/StandardCharset/Standard.java and add more tests
Reviewed-by: alanb
2011-04-29 14:09:46 -07:00
Valerie Peng
c23ab1c223 7036252: sunpkcs11-solaris.cfg needs a review
Updated the disabled mechanisms section since Solaris bug 6306708 has been fixed.

Reviewed-by: mullan
2011-04-29 13:31:13 -07:00
Jon Masamitsu
f6dc8f6c3c Merge 2011-04-29 12:33:39 -07:00
Suchen Chien
f1c12a7da4 6903609: Max memory of 896 may be too large for typical windows developer environment
Reviewed-by: ksrini, katleman
2011-04-29 11:52:58 -07:00
Lana Steuck
2ac0a7f59c Merge 2011-04-29 11:27:07 -07:00
Vladimir Kozlov
6d0283ed8e Merge 2011-04-29 11:15:30 -07:00
Jim Graham
6b348af4c0 6522514: Extending Arc2D.Double and serializing the object causes InvalidClassException
Reviewed-by: prr
2011-04-29 10:58:33 -07:00
Kelly O'Hair
344a758c27 7040147: jaxp 1.4.5 jdk7 integration
Reviewed-by: joehw
2011-04-29 10:58:15 -07:00
Dmitry Samersoff
b0269509f1 7019808: build fails on Fedora 14: SELinux run-time check: execution of stack in libjvm.so
Executable flag is set in the elf header of libjvm.so during build, instruct ld to don't do it.

Reviewed-by: acorn, phh
2011-04-29 21:13:00 +04:00
Mandy Chung
be710bc66d 7039809: Remove @ConstructorProperties annotation from java.io.File class
Reviewed-by: alanb, malenkov
2011-04-29 08:51:34 -07:00
Maurizio Cimadamore
ea2c9e0af0 6550655: com.sun.tools.javac.code.Symbol$CompletionFailure
Accessing a non-existing enum constant from an annotation whose class is available results in an internal error

Reviewed-by: jjg
2011-04-29 16:06:28 +01:00
Maurizio Cimadamore
7fb85c5cef 7034495: Javac asserts on usage of wildcards in bounds
Problem with intersection types and wildcards causing javac to crash

Reviewed-by: jjg
2011-04-29 16:05:56 +01:00
Maurizio Cimadamore
e7081dbf6a 7039937: Improved catch analysis fails to handle a common idiom in the libraries
Disable generation of 'unreachable catch' warnings for catch statements catching Exception/Throwable

Reviewed-by: jjg
2011-04-29 16:05:29 +01:00
Maurizio Cimadamore
f7618cbf97 7040104: javac NPE on Object a[]; Object o = (a=null)[0];
When a null literal is found on top of stack, if expected type is 1-dimension array no checkcast is emitted

Reviewed-by: jjg
2011-04-29 16:05:02 +01:00
Lance Andersen
4e98f838c8 7040150: Indexing Error in CachedRowSetImpl.removeCurrentRow
Reviewed-by: smarks
2011-04-29 09:04:03 -04:00
Dmitry Cherepanov
202b18b4f5 7026055: Regression : Cannot use IME on JComboBox Japanese
Reviewed-by: art, ant, naoto
2011-04-29 16:16:25 +04:00
Dmitry Cherepanov
2ab6e13a21 7034291: Regression : Preedit String on active client is committed into unexpected component
Reviewed-by: art, naoto
2011-04-29 16:02:05 +04:00
Jim Graham
e8ad64314e 7020955: No focus point adjustment for RadialGradientPaint
Reviewed-by: prr
2011-04-29 01:40:11 -07:00
Bengt Rutisson
fbffd24fc5 7040068: CMS: Possibly unsafe initialization of BlockOffsetArrayUseUnallocatedBlock
BlockOffsetArrayUseUnallocatedBlock was intended to be turned off as part of BUG 6948538 but a code line in collectorPolicy.cpp actually kept it turned on.

Reviewed-by: jwilhelm, ysr
2011-04-29 09:11:03 +02:00
Jon Masamitsu
c01be49675 Merge 2011-05-02 07:08:53 -07:00
Igor Veresov
5c6475f522 Merge 2011-04-29 20:42:27 -07:00
Igor Veresov
2abb1bbd58 7040485: Use transparent huge page on linux by default
Turn on UseLargePages by default but try only HugeTLBFS method if it is not explicitly specified on the command line.

Reviewed-by: ysr
2011-04-29 12:39:32 -07:00
Antonios Printezis
10f6cc7fc3 7035144: G1: nightly failure: Non-dirty cards in region that should be dirty (failures still exist...)
We should only undirty cards after we decide that they are not on a young region, not before. The fix also includes improvements to the verify_dirty_region() method which print out which cards were not found dirty.

Reviewed-by: johnc, brutisso
2011-04-29 14:59:04 -04:00
Antonios Printezis
8c04c76193 7034139: G1: assert(Thread::current()->is_ConcurrentGC_thread()) failed: only a conc GC thread can call this
We were calling STS join and leave during a STW pause and we are not suppoesed to. I now only call those during  concurrent phase. I also added stress code in the non-product builds to force an overflows (the condition that ws uncovering the bug) to make sure it does not happen again.

Reviewed-by: johnc, brutisso
2011-04-29 12:40:49 -04:00
Michael Fang
8b55d3b501 7040257: [pt_BR,fr] Print dialog has duplicate mnemonic key
Reviewed-by: psun
2011-04-28 21:43:40 -07:00
Xueming Shen
df7a03a4c3 7039066: j.u.rgex does not match TR18 RL1.4 Simple Word Boundaries and RL1.2 Properties
Updated the regex Unicode property support

Reviewed-by: alanb
2011-04-28 20:48:36 -07:00
Xueming Shen
4463efaf61 7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
Updated j.l.c.lsLowerCase/isUpperCase

Reviewed-by: okutsu
2011-04-28 20:18:57 -07:00
Michael Fang
ce5fc02a16 7040228: [zh_TW] extra (C) on cancel button on File Chooser dialog
Reviewed-by: yhuang
2011-04-28 20:15:11 -07:00
Lana Steuck
03214a725d Merge 2011-04-28 17:57:33 -07:00
Joe Darcy
faa5e45f7a 7038843: IIOP serialization fails with NullPointerException when serializing Throwable
Reviewed-by: dholmes, mchung
2011-04-28 17:51:25 -07:00
Suchen Chien
a4dd2f32d7 Added tag jdk7-b140 for changeset c0c0f0374f67 2011-04-28 17:44:47 -07:00
Suchen Chien
bf38109be4 Added tag jdk7-b140 for changeset adbb12180d75 2011-04-28 17:44:34 -07:00
Suchen Chien
12324e11fb Added tag jdk7-b140 for changeset 3202e475f9d9 2011-04-28 17:44:29 -07:00
Suchen Chien
36230d8a90 Added tag jdk7-b140 for changeset 2c31217f748a 2011-04-28 17:44:28 -07:00
Suchen Chien
874944e5bc Added tag jdk7-b140 for changeset 33e592b5ff17 2011-04-28 17:44:24 -07:00
Suchen Chien
6ae3e039ab Added tag jdk7-b140 for changeset 837037533544 2011-04-28 17:44:18 -07:00
Suchen Chien
13cf1a7277 Added tag jdk7-b140 for changeset 90e228752038 2011-04-28 17:44:13 -07:00
Vladimir Kozlov
2683d5390b 7039652: Performance regression after 7004547 changes
Use unrolled_count() to limit unrolling and use the stride check only for initial stride value.

Reviewed-by: never
2011-04-28 16:40:23 -07:00
Vinnie Ryan
f202396944 6578658: Request for raw RSA (NONEwithRSA) Signature support in SunMSCAPI
Reviewed-by: wetmore
2011-04-29 00:21:54 +01:00
John Cuthbertson
5b3550c107 7040410: -Xloggc:<file> incorrectly enables TraceClassUnloading causing tracing on tty
Don't enable TraceClassUnloading whne -Xloggc is specified.

Reviewed-by: tonyp, ysr
2011-04-28 15:29:18 -07:00
Jonathan Gibbons
e29746adb0 7029150: Project Coin: present union types from the tree API through to javax.lang.model
Reviewed-by: mcimadamore
2011-04-28 15:05:36 -07:00
Michael Fang
bb3a24d770 Merge 2011-04-28 14:30:28 -07:00
Tom Rodriguez
eb8db40092 7032162: assert(flat != TypePtr::BOTTOM) failed: cannot alias-analyze an untyped ptr
Reviewed-by: kvn
2011-04-28 14:00:13 -07:00
Mike Duigou
ca62bf6b7a Merge 2011-04-28 10:14:12 -07:00
Mike Duigou
972c4e25d6 7040381: Add StandardCharset.java to FILES_java.gmk
Reviewed-by: alanb
2011-04-28 10:12:02 -07:00
Mandy Chung
d97d48b225 7037081: Remove com.sun.tracing from NON_CORE_PKGS
Reviewed-by: ohair, jjg, jmasa
2011-04-28 08:51:43 -07:00
Mandy Chung
2999ef704d 7037081: Remove com.sun.tracing from NON_CORE_PKGS
Reviewed-by: ohair, jjg, jmasa
2011-04-28 08:46:06 -07:00
Dmitry Cherepanov
ac156aab26 7034766: closed/java/awt/EmbeddedFrame/EmbeddedFrameGrabTest/EmbeddedFrameGrabTest.java failed on jdk7 b134
Reviewed-by: art, ant
2011-04-28 19:39:47 +04:00
Daniel D. Daugherty
7d7755b8a4 7039447: 2/1 java profiling is broken in build 139 (garbage in function name)
The name in a deferred JVM/TI DynamicCodeGenerated event needs to be explicitly saved.

Reviewed-by: acorn, never, dsamersoff, dholmes
2011-04-28 08:24:46 -07:00
Dmitry Cherepanov
1e3fce0242 6853146: Regression: on-the-spot input is broken in AWT Peered components
Reviewed-by: art, ant, naoto
2011-04-28 19:23:44 +04:00
Andrei Dmitriev
c9f3d958ec 6956646: Test: MouseWheelEvent/InfiniteRecursion test receives more MouseWheelEvents than expected
Reviewed-by: serb, dcherepanov
2011-04-28 20:14:30 +04:00
Lance Andersen
6ab11e169d 7038565: address Findbugs issue in BatchUpdateException
Reviewed-by: alanb, forax
2011-04-28 09:46:12 -04:00
Denis Lila
cf97b67aa2 7036754: NaNs in stroked quadratics
Check for them and remove them.

Reviewed-by: flar
2011-04-28 08:55:19 -04:00
Weijun Wang
f32a89adb0 7037201: regression: invalid signed jar file not detected
Reviewed-by: mullan
2011-04-28 20:34:53 +08:00
Dmitry Cherepanov
88ddcf5e65 7032830: GraphicsDevice.setFullScreenWindow() works strange for decorated windows on OEL
7016382: GraphicsDevice.setFullScreenWindow() - spec clarification for exclusive mode for dec/undec Frames

Reviewed-by: art
2011-04-28 13:26:18 +04:00
Michael Fang
9984385316 Merge 2011-04-27 23:28:51 -07:00
Michael Fang
7d2260eaa5 7038803: [CCJK] Incorrect mnemonic key (0) is displayed on cancel button on messagedialog of JOptionPane
Reviewed-by: yhuang
2011-04-27 23:18:20 -07:00
Michael Fang
00ac2f30b8 6501385: ColorChooser demo - two elemets have same mnemonic in it locale, GTK L&F
Reviewed-by: yhuang
2011-04-27 23:11:48 -07:00
Christine Lu
2bde5c0ad9 Merge 2011-04-27 19:24:03 -07:00
Christine Lu
c75e285d73 Merge 2011-04-27 19:23:13 -07:00
Christine Lu
ae2c033a13 Merge 2011-04-27 19:20:46 -07:00
Christine Lu
321c843b19 Merge 2011-04-27 19:20:45 -07:00
Christine Lu
8c555ebbcf Merge 2011-04-27 19:20:31 -07:00
Christine Lu
7dd03b6fa4 Merge 2011-04-27 19:19:43 -07:00
Christine Lu
20c8362770 Merge 2011-04-27 19:19:40 -07:00
Coleen Phillimore
0032ebd4ef Merge 2011-04-27 17:25:45 -07:00
Bhavesh Patel
ff31734237 7028815: Missing styles for some bulleted items in the new stylesheet
Reviewed-by: jjg
2011-04-27 17:13:54 -07:00
Joe Darcy
90c0a645c2 7039822: Project Coin: add explicit tests for the lub of an exception parameter
Reviewed-by: mcimadamore, jjg
2011-04-27 17:03:24 -07:00
Tom Rodriguez
2126589fd0 7029167: add support for conditional card marks
Reviewed-by: iveresov, kvn
2011-04-27 15:40:36 -07:00
John Cuthbertson
b777d36af8 7037756: Deadlock in compiler thread similiar to 6789220
Avoid blocking in CompileBroker::compile_method_base() if the current thread holds the pending list lock.

Reviewed-by: never, brutisso, ysr
2011-04-27 14:40:41 -07:00
Mike Duigou
ed2f711c6d Merge 2011-04-27 14:18:26 -07:00
Kelly O'Hair
ca53ccfc32 7040096: Fix broken hg tip for 'make source'
Reviewed-by: katleman
2011-04-27 14:02:01 -07:00
Vinnie Ryan
5f5ccc0a66 Merge 2011-04-27 20:24:30 +01:00
Vinnie Ryan
8c88165312 6753664: Support SHA256 (and higher) in SunMSCAPI
Reviewed-by: mullan
2011-04-27 20:21:32 +01:00
Andrei Dmitriev
b44f91dc52 6979551: closed/javax/swing/plaf/basic/BasicLabelUI/4798542/bug4798542.java fails
Reviewed-by: art, yan, alexp
2011-04-27 18:15:27 +04:00
Andrei Dmitriev
1f4f92b81d 6888633: test/closed/javax/swing/JPopupMenu/4786415/bug4786415.java fails
Reviewed-by: rupashka, alexp
2011-04-27 17:46:59 +04:00
Zhengyu Gu
6d9bd0f890 Merge 2011-04-27 06:20:00 -07:00
Denis Fokin
ed12b2ab18 6998716: client vm crashes making browser fails to respond under some scenarios
Reviewed-by: art, denis, uta
2011-04-27 17:18:38 +04:00
Zhengyu Gu
865413485d 7036747: 7017009 reappeared, problem with ElfStringTable
Created new "new" operator for CHeapObj that allows malloc to fail without causing fatal error. Also replaced "HeapAllocate" with "os::malloc" in decoder code to allow decoder to handle low memory scenario.

Reviewed-by: coleenp, dholmes
2011-04-27 09:09:57 -04:00
Alan Bateman
bbadc1bb04 7039186: (ch) EPoll based asynchronous I/O implementation should be portable to linux-arm and linux-ppc
Reviewed-by: dholmes
2011-04-27 13:46:22 +01:00
Oleg Pekhovskiy
57f34d2482 7035209: 6u26 ea b01 - running an applet with old plugin crashes in awt.dll
Reviewed-by: art, amenkov
2011-04-27 15:26:38 +04:00
Denis Fokin
f5afc05e60 7020922: java.awt.Toolkit.getPropertyChangeListeners() should mention that it returns proxies
Reviewed-by: malenkov
2011-04-27 14:58:40 +04:00
Pavel Porvatov
aa161ffe8d 7039403: Could not compile test/javax/swing/JLabel/6596966/bug6596966.java
Reviewed-by: malenkov
2011-04-27 13:43:22 +04:00
Weijun Wang
a9a765fdfc 6950929: Failures on Solaris sparc 64bit sun/security/krb5/auto/BadKdc4.java (and linux?)
Reviewed-by: xuelei
2011-04-27 17:11:06 +08:00
Andrew Brygin
d21b9aa7bf 7037091: sun/java2d/pipe/Test7027667.java test is not executed
Reviewed-by: prr
2011-04-27 12:15:34 +04:00
Shinya Ogino
1037728a03 7036955: Japanese man pages in linux should be in utf-8 encoding
Reviewed-by: ohair, mfang
2011-04-26 21:46:20 -07:00
Y. Srinivas Ramakrishna
d86311b13c 7039089: G1: changeset for 7037276 broke heap verification, and related cleanups
In G1 heap verification, we no longer scan perm to G1-collected heap refs as part of process_strong_roots() but rather in a separate explicit oop iteration over the perm gen. This preserves the original perm card-marks. Added a new assertion in younger_refs_iterate() to catch a simple subcase where the user may have forgotten a prior save_marks() call, as happened in the case of G1's attempt to iterate perm to G1 refs when verifying the heap before exit. The assert was deliberately weakened for ParNew+CMS and will be fixed for that combination in a future CR. Also made some (non-G1) cleanups related to code and comments obsoleted by the migration of Symbols to the native heap.

Reviewed-by: iveresov, jmasa, tonyp
2011-04-26 21:17:24 -07:00
Kelly O'Hair
4231fbb3e6 6631003: Add hg tip changeset to build image
Reviewed-by: mduigou
2011-04-26 16:30:00 -07:00
Kelly O'Hair
d2dbecb06b 6631003: Add hg tip changeset to build image
Reviewed-by: mduigou
2011-04-26 16:29:35 -07:00
Kelly O'Hair
a6c3e80878 6631003: Add hg tip changeset to build image
Reviewed-by: mduigou
2011-04-26 16:28:22 -07:00
Kelly O'Hair
5c45b51537 6631003: Add hg tip changeset to build image
Reviewed-by: mduigou
2011-04-26 16:28:05 -07:00
Kelly O'Hair
bb6082b053 6631003: Add hg tip changeset to build image
Reviewed-by: mduigou
2011-04-26 16:27:40 -07:00
Kelly O'Hair
c2bdfcee05 6631003: Add hg tip changeset to build image
Reviewed-by: mduigou
2011-04-26 16:22:41 -07:00
Kelly O'Hair
74225e1f34 6631003: Add hg tip changeset to build image
Reviewed-by: mduigou
2011-04-26 16:20:22 -07:00
Valerie Peng
b0c37f182f 7003952: SEC: securely load DLLs and launch executables using fully qualified path
Enforce full path when specifying library locations.

Reviewed-by: wetmore, ohair
2011-04-26 15:59:51 -07:00
Mike Duigou
a5e37c9377 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets
Reviewed-by: alanb, sherman, darcy
2011-04-26 14:25:42 -07:00
Vladimir Kozlov
6c8fc4b347 7039586: test/java/util/Collections/Rotate.java failing with hs21-b09
A predicate should not be moved in partial peel optimization since it will invalidate jvm state of its uncommon trap.

Reviewed-by: never
2011-04-26 12:14:22 -07:00
Igor Veresov
e3121a5a43 7037939: NUMA: Disable adaptive resizing if SHM large pages are used
Make the NUMA allocator behave properly with SHM and ISM large pages.

Reviewed-by: ysr
2011-04-26 11:46:34 -07:00
Coleen Phillimore
ab86f12c44 7009923: JSR 292: VM crash in JavaThread::last_frame
Handle stack overflow before the first frame is called, by printing out the called method and not walking the stack.

Reviewed-by: dholmes, phh, dsamersoff
2011-04-26 14:04:43 -04:00
Joe Darcy
30bdc40c81 7039369: Limit range of strictfp in FloatingDecimal
Additional reviews by sergey.kuksenko@oracle.com

Reviewed-by: alanb
2011-04-26 10:35:06 -07:00
Nils Loodin
a5e7b8d0d7 7029383: Refresh of non-client demos
Reviewed-by: mchung, ohair
2011-04-26 12:49:34 +02:00
Michael Fang
45c99391f7 Merge 2011-04-25 21:16:54 -07:00
Michael Fang
8b9fe06564 7039493: incorporating WPTG translation bug fixes
Reviewed-by: yhuang
2011-04-25 20:16:46 -07:00
Yuka Kamiya
58aa826b31 7039469: (tz) Support tzdata2011g
Reviewed-by: okutsu
2011-04-26 10:46:19 +09:00
Michael Fang
f23eb2096f 7034259: [all] incorrect mnemonic keys in JCP automatic update advanced settings dialog
Reviewed-by: yhuang
2011-04-25 16:39:49 -07:00
Tom Rodriguez
16d6414619 7030715: JSR 292 JRuby test/test_super_call_site_caching.rb asserts with +DoEscapeAnalysis
Reviewed-by: twisti
2011-04-25 16:25:58 -07:00
Jonathan Gibbons
59b6650614 7038363: cast from object to primitive should be for source >= 1.7
Reviewed-by: mcimadamore
2011-04-25 15:56:09 -07:00
Jonathan Gibbons
94164d4b45 7039019: test cannot run standalone
Reviewed-by: dlsmith
2011-04-25 15:50:30 -07:00
Denis Fokin
5621d404bf 6888182: Readable and permitted to delete files could not be transferred through Clipboard and DnD
Reviewed-by: uta
2011-04-25 20:39:35 +04:00
Andrei Dmitriev
b91701fce6 7030632: Pasting HTML that was copied from MS Word results in IOException
Reviewed-by: uta, denis
2011-04-25 21:08:14 +04:00
John Coomes
385e7253a7 7037250: cscope.make database generation is silently broken
Reviewed-by: stefank
2011-04-23 04:20:09 -07:00
Vladimir Danushevsky
e074254d05 Merge 2011-04-23 00:33:38 -04:00
Phil Race
b5141e63fd 7031011: fallbackfont testing failed on OEL 6
Reviewed-by: igor, jgodinez
2011-04-22 12:59:15 -07:00
Kelly O'Hair
218457a845 6595663: Manifest on jars contain JavaBeans entries
Reviewed-by: alanb, mchung
2011-04-22 10:21:37 -07:00
Alexander Potochkin
6431b121c7 7036871: Some JCK interactive JSplitPane tests that test continuous layout fail with Nimbus L&F
Reviewed-by: rupashka
2011-04-22 20:54:37 +04:00
Jon Masamitsu
9050363747 Merge 2011-04-22 09:26:09 -07:00
Vinnie Ryan
dc6eb040b7 6931562: Support SunMSCAPI Security Provider in Windows 64-bit releases of JVM
Reviewed-by: mullan
2011-04-22 17:03:51 +01:00
Keith McGuigan
5d6ff7b933 Merge 2011-04-22 08:46:51 -07:00
Doug Lea
4071e413e5 7038885: Improved bulk operation disclaimers for concurrent collections
Reviewed-by: chegar
2011-04-22 16:33:23 +01:00
Keith McGuigan
c6e8b72333 Merge 2011-04-22 04:57:48 -07:00
Sean Coffey
c5114e7e0f 7025227: SSLSocketImpl does not close the TCP layer socket if a close notify cannot be sent to the peer
6932403: SSLSocketImpl state issue

Reviewed-by: xuelei
2011-04-22 11:03:39 +01:00
Kelly O'Hair
4e01afab2d 7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber
Reviewed-by: igor
2011-04-21 18:26:04 -07:00
Abhijit Saha
80229d9e45 Merge 2011-04-21 16:42:06 -07:00
Abhijit Saha
eeaa69a09d Merge 2011-04-21 16:16:47 -07:00
Abhijit Saha
6c5d6d08c9 Merge 2011-04-21 16:15:50 -07:00
Joe Darcy
896553f439 6998871: Support making the Throwable.stackTrace field immutable
Reviewed-by: dholmes, mchung, forax
2011-04-21 15:55:59 -07:00
Abhijit Saha
5e79fcc0b9 Merge 2011-04-21 15:43:07 -07:00
Sean Mullan
b4fa027895 Merge 2011-04-21 17:44:55 -04:00
Sean Mullan
2581301798 7038175: Expired PKITS certificates causing CertPathBuilder and CertPathValidator regression test failures
Reviewed-by: xuelei
2011-04-21 17:39:28 -04:00
Lana Steuck
ac99808d5c Merge 2011-04-21 13:32:37 -07:00
Lana Steuck
b92cf6375e Merge 2011-04-21 11:11:20 -07:00
Vinnie Ryan
d617d849a0 6732372: Some MSCAPI native methods not returning correct exceptions
Reviewed-by: mullan
2011-04-21 19:05:29 +01:00
Jon Masamitsu
6663052a88 6946417: G1: Java VisualVM does not support G1 properly
Added counters for jstat

Reviewed-by: tonyp, jwilhelm, stefank, ysr, johnc
2011-04-21 10:23:44 -07:00
Michael Fang
43a37f289e Merge 2011-04-21 09:42:59 -07:00
Doug Lea
9d72155fc5 7038542: Small performace regression in ConcurrentHashMap on c1 since CR 703655
Reviewed-by: chegar
2011-04-21 17:00:23 +01:00
Abhijit Saha
51829716bb Merge 2011-04-21 08:39:52 -07:00
Abhijit Saha
1fadad445c Merge 2011-04-21 08:38:26 -07:00
Abhijit Saha
c9766be52a Merge 2011-04-21 08:37:10 -07:00
Vladimir Danushevsky
7610a8bf75 Merge 2011-04-21 10:12:42 -04:00
Vinnie Ryan
5982362c7d Merge 2011-04-21 14:25:46 +01:00
Vinnie Ryan
c74acca8b0 6888925: SunMSCAPI's Cipher can't use RSA public keys obtained from other sources
Reviewed-by: mullan
2011-04-21 14:23:57 +01:00
Doug Lea
6e092bff6a 7038501: Clarify meaning of "(optional)" in javadoc
Reviewed-by: chegar
2011-04-21 13:53:27 +01:00
Pavel Porvatov
90df638cdc 7021058: The Create folder button produces error in the Details mode (JFileChooser)
Reviewed-by: malenkov
2011-04-21 14:29:23 +04:00
Y. Srinivas Ramakrishna
11badb92aa Merge 2011-04-21 01:16:20 -07:00
Christian Thalinger
868bf68a3e 6993078: JSR 292 too many pushes: Lesp points into register window
Reviewed-by: kvn, never
2011-04-21 00:25:40 -07:00
Michael Fang
c4683891ee Merge 2011-04-20 23:15:59 -07:00
Abhijit Saha
796ac9c83d Merge 2011-04-20 21:24:26 -07:00
Michael Fang
43b343694f 7035843: [zh_CN, ja] JConsole mnemonic keys don't work
Reviewed-by: ogino
2011-04-20 20:15:27 -07:00
Y. Srinivas Ramakrishna
b4d40650b2 7037276: Unnecessary double traversal of dirty card windows
Short-circuited an unnecessary double traversal of dirty card windows when iterating younger refs. Also renamed some cardtable methods for more clarity.

Reviewed-by: jmasa, stefank, poonam
2011-04-20 19:19:30 -07:00
Vladimir Kozlov
abc5f94df7 7026700: regression in 6u24-rev-b23: Crash in C2 compiler in PhaseIdealLoop::build_loop_late_post
Memory slices should be always created for non-static fields after allocation

Reviewed-by: never
2011-04-20 18:29:35 -07:00
Mike Duigou
1a7f59d292 6546713: link the word (optional) in exception specifications to the text which provides explanation and context
Reviewed-by: dholmes, dl
2011-04-20 17:20:00 -07:00
Andrew Haley
cf6f747d17 7034464: Support transparent large pages on Linux
Support transparent huge pages on Linux available since 2.6.38

Reviewed-by: iveresov, ysr
2011-04-20 17:12:04 -07:00
Stuart Marks
7d1c44eae4 6896297: (rmi) fix ConcurrentModificationException causing TCK failure
Reviewed-by: alanb, dholmes, peterjones
2011-04-20 16:30:38 -07:00
Vladimir Danushevsky
46259d93ba 7035861: linux-armsflt: assert(ni->data() == (int)(x + o)) failed: instructions must match
The change avoids generating relocation info entry for the staging area patching stub on systems that don't support movw/movt instructions

Reviewed-by: bdelsart
2011-04-20 14:07:57 -04:00
Abhijit Saha
68c514a747 Merge 2011-04-20 09:31:11 -07:00
Tom Rodriguez
75eac4de0f 7009346: java/dyn/InvokeDynamicPrintArgs.java fails with NPE on solaris-sparc with -Xcomp
Reviewed-by: kvn, jrose, twisti
2011-04-20 09:29:00 -07:00
Jennifer Godinez
f3c1d5f3ea 6989724: font warnings in the build, native code
Reviewed-by: bae, igor
2011-04-20 09:10:36 -07:00
Alex Menkov
e45512128a 7030629: closed/sun/audio/AudioClipClose/AudioClipClose.java test fails just against jdk7 b134
7033899: SoundTestSuite: test050 fails on Ubuntu Linux

Reviewed-by: bae
2011-04-20 16:46:31 +04:00
Michael McMahon
92ba6df81a Merge 2011-04-20 12:05:17 +01:00
Michael McMahon
1b62e08853 7034570: java.lang.Runtime.exec(String[] cmd, String[] env) can not work properly if SystemRoot not inherited
Reviewed-by: dholmes, alanb
2011-04-20 12:03:30 +01:00
Weijun Wang
68d5cd6f23 6894072: always refresh keytab
Reviewed-by: valeriep
2011-04-20 18:41:32 +08:00
Michael Fang
b4398b503d Merge 2011-04-19 21:44:52 -07:00
Shinya Ogino
7a7cba0324 7025070: man page localization broken in jdk7
Reviewed-by: mfang
2011-04-19 20:58:46 -07:00
Antonios Printezis
12d1d9acc1 7011855: G1: non-product flag to artificially grow the heap
It introduces non-product cmd line parameter G1DummyRegionsPerGC which indicates how many "dummy" regions to allocate at the end of each GC. This allows the G1 heap to grow artificially and makes concurrent marking cycles more frequent irrespective of what the application that is running is doing. The dummy regions will be found totally empty during cleanup so this parameter can also be used to stress the concurrent cleanup operation.

Reviewed-by: brutisso, johnc
2011-04-19 15:46:59 -04:00
Mike Duigou
21a2cb6922 7030579: Extra words in documentation of ListIterator may cause confusion
Reviewed-by: dholmes, alanb
2011-04-19 10:47:33 -07:00
Zhengyu Gu
9768f86b74 Merge 2011-04-19 10:26:18 -07:00
Tom Deneau
e8d2ed978f 7037812: few more defaults changes for new AMD processors
Use PREFETCHW as default prefetch instruction, set UseXMMForArrayCopy and UseUnalignedLoadStores to true by default.

Reviewed-by: kvn
2011-04-19 09:30:17 -07:00
Andrei Dmitriev
d097a2cab1 7036733: Regression : NullPointerException when scrolling horizontally on AWT List
Reviewed-by: dcherepanov
2011-04-19 18:52:49 +04:00
Maurizio Cimadamore
95e14306e7 7036906: Scope: CompoundScope.getElements() doesn't pass scope filter to subscopes
CompoundScope.getElements() is not filtering elements according to the ScopeFilter argument

Reviewed-by: jjg
2011-04-19 13:57:25 +01:00
Anthony Petrov
89d504b32f 7036669: Simplify revalidating component hierarchy with multiple validate roots
Introduce Component.revalidate() method

Reviewed-by: art, alexp
2011-04-19 14:44:09 +04:00
Pavel Porvatov
06c379e859 7036025: java.security.AccessControlException when creating JFileChooser in signed applet
Reviewed-by: malenkov
2011-04-19 10:11:58 +04:00
Xueming Shen
2da9c4454a 7027900: (fs) glob syntax under-specified
Clarify how leading dots are treated in nio2 glob

Reviewed-by: alanb
2011-04-18 21:44:03 -07:00
Bhavesh Patel
fbb8954b52 6758050: javadoc handles nested generic types incorrectly
Reviewed-by: jjg
2011-04-18 15:39:16 -07:00
Kevin Walls
4fbaadca47 7005503: Make GuaranteedSafepointInterval a diagnostic flag
Reviewed-by: kamg, ysr
2011-04-18 08:03:45 -07:00
Christian Thalinger
7fb4bcc550 7036960: TemplateTable::fast_aldc in templateTable_x86_64.cpp uses movptr instead of load_klass
Reviewed-by: kvn, iveresov
2011-04-18 06:50:57 -07:00
Christian Thalinger
0b2d972fd3 7018355: JSR 292: VM crash in DefNewGeneration::copy_to_survivor_space
Reviewed-by: kvn, jrose
2011-04-18 01:33:28 -07:00
Keith McGuigan
6d199252f6 6519228: JDWP Spec: need references at capability canRequestMonitorEvents for JDWP 1.6 Monitor* events
Add descriptions in event type table

Reviewed-by: ohair, jjh, acorn, dcubed
2011-04-15 10:17:23 -04:00
Zhengyu Gu
6c5cc4e2d9 7003964: SERV: securely load DLLs and launch executables using fully qualified path
Linked in Windows libraries that are available on jdk7 supported platforms, and used GetModuleHandle instead of LoadLibrary for already loaded Dlls.

Reviewed-by: dcubed, alanb
2011-04-15 09:53:05 -04:00
Zhengyu Gu
462140d52d 7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
Created Windows Dll wrapped to handle jdk6 and jdk7 platform requirements, also provided more restictive Dll search orders for Windows system Dlls.

Reviewed-by: acorn, dcubed, ohair, alanb
2011-04-15 09:34:43 -04:00
Dmitry Cherepanov
ee231d325a 7036952: build warning after the changes for 7003962
Reviewed-by: art, bae
2011-04-15 17:06:21 +04:00
Abhijit Saha
b27b971f1f Merge 2011-04-12 14:23:03 -07:00
Keith McGuigan
222ac81222 7020373: JSR rewriting can overflow memory address size variables
Abort if incoming classfile's parameters would cause overflows

Reviewed-by: coleenp, dcubed, never
2011-04-12 16:42:26 -04:00
Jeff Dinkins
d5438d3e05 7045697: JDK7 THIRD PARTY README update
Reviewed-by: lana
2011-05-27 15:01:07 -07:00
David Katleman
079c89189f 7044486: open jdk repos have files with incorrect copyright headers, which can end up in src bundles
Reviewed-by: ohair, trims
2011-05-25 13:31:51 -07:00
John Coomes
2af4bb66d4 6791672: enable 1G and larger pages on solaris
Reviewed-by: ysr, iveresov, johnc
2011-08-17 10:32:53 -07:00
Abhijit Saha
5b4b78d657 Merge 2011-04-08 10:31:14 -07:00
Abhijit Saha
f8f46ca105 Merge 2011-04-08 10:27:23 -07:00
Dmitry Cherepanov
2049b7016e 7035077: Minor addition to the changes for 7003962
Reviewed-by: chegar
2011-04-08 17:58:18 +04:00
Dmitry Cherepanov
060de52812 7003962: AWT: securely load DLLs and launch executables using fully qualified path
Reviewed-by: art, bae, alanb
2011-04-08 16:44:14 +04:00
Kumar Srinivasan
d9a3f235e2 7032593: DLL_LOADING: Upgrade solution to 7016985 to reflect JDK7 solution
Reviewed-by: mchung, asaha
2011-04-05 16:19:37 -07:00
Chris Hegarty
e33b64329a 7033865: JDK: Add private API for secure/restrictive loading of system dlls
Reviewed-by: alanb
2011-04-05 14:49:03 +01:00
Kumar Srinivasan
7b37da8726 7016985: (launcher) implement safe secure dll loading
Reviewed-by: mchung
2011-03-03 14:16:57 -08:00
Jim Graham
799cba0df4 7016495: Crash in Java 2D transforming an image with scale close to zero
Reviewed-by: prr, bae
2011-03-02 05:35:14 -08:00
Dmitry Cherepanov
a6c14fb512 7012520: Heap overflow vulnerability in FileDialog.show()
Reviewed-by: art, anthony
2011-02-25 15:54:54 +03:00
Chris Hegarty
bbcb5e8be3 7013969: NetworkInterface.toString can reveal bindings
Reviewed-by: alanb, michaelm, hawtin
2011-02-18 13:31:57 +00:00
Andrew Brygin
0c700cc07d 7013519: [parfait] Integer overflows in 2D code
Reviewed-by: prr, valeriep
2011-02-17 12:21:49 +03:00
Weijun Wang
e8b79573d2 6618658: Deserialization allows creation of mutable SignedObject
Reviewed-by: hawtin, mullan
2011-02-09 11:50:29 +08:00
4804 changed files with 333468 additions and 171461 deletions

View File

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

24
.hgtags
View File

@@ -114,3 +114,27 @@ f75a1efb141210901aabe00a834e0fc32bb8b337 jdk7-b135
d1cf7d4ee16c341f5b8c7e7f1d68a8c412b6c693 jdk7-b137
62b8e328f8c8c66c14b0713222116f2add473f3f jdk7-b138
955488f34ca418f6cdab843d61c20d2c615637d9 jdk7-b139
f4298bc3f4b6baa315643be06966f09684290068 jdk7-b140
5d86d0c7692e8f4a58d430d68c03594e2d3403b3 jdk7-b141
92bf0655022d4187e9b49c1400f98fb3392a4630 jdk7-b142
4a05062d8c4dfa3edec3faf1052af28baba5adff jdk7-b143
07a8728ad49ef6dfa469c3a8bf5ab1e9c80bed5c jdk7-b144
8294c99e685a1f6d1d37c45cd97854cf74be771e jdk7-b145
dca1e8a87e8f756f95b99bac8fe795750d42e1b0 jdk7-b146
a2a589fc29543ed32919c78a1810ad93a6fcf5bc jdk7-b147
de9223c94f9c710b3eebb599cd3586f36c8b94a9 jdk8-b01
1b9d19620eb4606a25b1e28f86d66c8bfa867e06 jdk8-b02
6815e85bf96d6d3875954f9777660372cd70d065 jdk8-b03
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

View File

@@ -114,3 +114,26 @@ ddc2fcb3682ffd27f44354db666128827be7e3c3 jdk7-b134
7654afc6a29e43cb0a1343ce7f1287bf690d5e5f jdk7-b137
fc47c97bbbd91b1f774d855c48a7e285eb1a351a jdk7-b138
7ed6d0b9aaa12320832a7ddadb88d6d8d0dda4c1 jdk7-b139
dcfe74f1c6553c556e7d361c30b0b614eb5e40f6 jdk7-b140
c6569c5585851dfd39b8de8e021c3c312f51af12 jdk7-b141
cfbbdb77eac0397b03eb99ee2e07ea00e0a7b81e jdk7-b142
14b8e7eee1058fd4ed5a2700a2ce14b3616278f1 jdk7-b143
7203965666a4fe63bf82f5e4204f41ce6285e716 jdk7-b144
55e9ebf032186c333e5964ed044419830ac02693 jdk7-b145
2d38c2a79c144c30cd04d143d83ee7ec6af40771 jdk7-b146
d91364304d7c4ecd34caffdba2b840aeb0d10b51 jdk7-b147
f42e3d9394b40a423d345b8da22687b5462e5f25 jdk8-b01
69f592185747226a9c765a9fe139c1d34d616f9c jdk8-b02
587bb549dff83131b65f40aa51864f69562f34a7 jdk8-b03
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

View File

@@ -1 +1 @@
project=jdk7
project=jdk8

View File

@@ -25,6 +25,34 @@
BUILD_PARENT_DIRECTORY=.
# Basename of any originally supplied ALT_OUTPUTDIR directory
ifndef ORIG_OUTPUTDIR_BASENAME
ifdef ALT_OUTPUTDIR
ORIG_OUTPUTDIR_BASENAME := $(shell basename $(ALT_OUTPUTDIR))
else
ORIG_OUTPUTDIR_BASENAME = $(PLATFORM)-$(ARCH)
endif
endif
export ORIG_OUTPUTDIR_BASENAME
# The three possible directories created for output (3 build flavors)
OUTPUTDIR_BASENAME- = $(ORIG_OUTPUTDIR_BASENAME)
OUTPUTDIR_BASENAME-debug = $(ORIG_OUTPUTDIR_BASENAME)-debug
OUTPUTDIR_BASENAME-fastdebug = $(ORIG_OUTPUTDIR_BASENAME)-fastdebug
# Relative path to a debug output area
REL_JDK_OUTPUTDIR = ../$(OUTPUTDIR_BASENAME-$(DEBUG_NAME))
# The created jdk image directory
JDK_IMAGE_DIRNAME = j2sdk-image
JDK_IMAGE_DIR = $(OUTPUTDIR)/$(JDK_IMAGE_DIRNAME)
ABS_JDK_IMAGE_DIR = $(ABS_OUTPUTDIR)/$(JDK_IMAGE_DIRNAME)
# Relative path from an output directory to the image directory
REL_JDK_IMAGE_DIR = ../$(OUTPUTDIR_BASENAME-$(DEBUG_NAME))/$(JDK_IMAGE_DIRNAME)
REL_JDK_DEBUG_IMAGE_DIR = ../$(OUTPUTDIR_BASENAME-debug)/$(JDK_IMAGE_DIRNAME)
REL_JDK_FASTDEBUG_IMAGE_DIR = ../$(OUTPUTDIR_BASENAME-fastdebug)/$(JDK_IMAGE_DIRNAME)
ifndef TOPDIR
TOPDIR:=.
endif
@@ -97,9 +125,8 @@ define StopTimer
endef
# Generic build of basic repo series
generic_build_repo_series::
$(MKDIR) -p $(OUTPUTDIR)
$(MKDIR) -p $(OUTPUTDIR)/j2sdk-image
generic_build_repo_series:: $(SOURCE_TIPS)
$(MKDIR) -p $(JDK_IMAGE_DIR)
@$(call StartTimer)
ifeq ($(BUILD_LANGTOOLS), true)
@@ -146,8 +173,8 @@ generic_build_repo_series::
#
# DEBUG_NAME is fastdebug or debug
# ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix
# The resulting j2sdk-image is used by the install makefiles to create a
# debug install bundle jdk-*-debug-** bundle (tar or zip)
# The resulting image directory (j2sdk-image) is used by the install makefiles
# to create a debug install bundle jdk-*-debug-** bundle (tar or zip)
# which will install in the debug or fastdebug subdirectory of the
# normal product install area.
# The install process needs to know what the DEBUG_NAME is, so
@@ -160,8 +187,8 @@ generic_build_repo_series::
# Location of fresh bootdir output
ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
FRESH_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image
FRESH_DEBUG_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-$(DEBUG_NAME)/j2sdk-image
FRESH_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/$(JDK_IMAGE_DIRNAME)
FRESH_DEBUG_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/$(REL_JDK_IMAGE_DIR)
create_fresh_product_bootdir: FRC
$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
@@ -226,7 +253,7 @@ build_product_image:
generic_debug_build:
$(MAKE) \
ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-$(DEBUG_NAME) \
ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)/$(REL_JDK_OUTPUTDIR) \
DEBUG_NAME=$(DEBUG_NAME) \
GENERATE_DOCS=false \
$(BOOT_CYCLE_DEBUG_SETTINGS) \
@@ -243,11 +270,17 @@ product_build:: build_product_image
debug_build:: build_debug_image
fastdebug_build:: build_fastdebug_image
# The source tips are stored with the relative path to the repo.
# This file will be used when constructing the jdk image.
source_tips: $(SOURCE_TIPS)
$(CAT) $<
$(SOURCE_TIPS): FRC
@$(prep-target)
@$(call GetSourceTips)
clobber:: REPORT_BUILD_TIMES=
clobber::
$(RM) -r $(OUTPUTDIR)/*
$(RM) -r $(OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-debug/*
$(RM) -r $(OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-fastdebug/*
-($(RMDIR) -p $(OUTPUTDIR) > $(DEV_NULL) 2>&1; $(TRUE))
clean: clobber
@@ -481,8 +514,8 @@ $(OUTPUTDIR)/test_failures.txt: $(OUTPUTDIR)/test_log.txt
# Get log file of all tests run
JDK_TO_TEST := $(shell \
if [ -d "$(ABS_OUTPUTDIR)/j2sdk-image" ] ; then \
$(ECHO) "$(ABS_OUTPUTDIR)/j2sdk-image"; \
if [ -d "$(ABS_JDK_IMAGE_DIR)" ] ; then \
$(ECHO) "$(ABS_JDK_IMAGE_DIR)"; \
elif [ -d "$(ABS_OUTPUTDIR)/bin" ] ; then \
$(ECHO) "$(ABS_OUTPUTDIR)"; \
elif [ "$(PRODUCT_HOME)" != "" -a -d "$(PRODUCT_HOME)/bin" ] ; then \

15
README
View File

@@ -9,11 +9,14 @@ README:
will be needed.
This one root repository can be obtained with something like:
hg clone http://hg.openjdk.java.net/jdk7/jdk7 openjdk7
To make sure you have all the nested repositories, you can run:
cd openjdk7 && sh ./get_source.sh
(This is identical to using the Mercurial Forest Extension command
'hg fclone http://hg.openjdk.java.net/jdk7/jdk7 openjdk7').
hg clone http://hg.openjdk.java.net/jdk8/jdk8 openjdk8
To make sure you have all the nested repositories, you can run the
get_source.sh script located in the same respository as this file:
cd openjdk8 && sh ./get_source.sh
People unfamiliar with Mercurial should read the first few chapters of
the Mercurial book: http://hgbook.red-bean.com/read/
@@ -22,7 +25,7 @@ README:
Simple Build Instructions:
0. Get the necessary system software/packages installed on your system, see
http://hg.openjdk.java.net/jdk7/build/raw-file/tip/README-builds.html
http://hg.openjdk.java.net/jdk8/build/raw-file/tip/README-builds.html
1. If you don't have a jdk6 installed, download and install a JDK 6 from
http://java.sun.com/javase/downloads/index.jsp

View File

@@ -126,38 +126,15 @@
<a href="http://openjdk.java.net/guide/repositories.html#installConfig">
Developer Guide: Installing and Configuring Mercurial</a>
section for more information.
The Forest Extension is not part of the Mercurial install,
and is optional,
but can be obtained with the following commands:
<blockquote>
<tt>
hg clone https://bitbucket.org/pmezard/hgforest-crew/overview/ <i>YourHgForest</i>
</tt>
</blockquote>
Once you have the file <tt>forest.py</tt>, you need to add these
lines to your <tt>${HOME}/.hgrc</tt> file:
<blockquote>
<tt>
[extensions]
<br>forest = <i>YourHgForest</i>/forest.py
</tt>
</blockquote>
<!-- ------------------------------------------------------ -->
<h3><a name="get_source">Getting the Source</a></h3>
<blockquote>
To get the entire set of OpenJDK Mercurial repositories
using the Forest Extension:
use the script <code>get_source.sh</code> located in the root repository:
<blockquote>
<tt>
hg fclone http://hg.openjdk.java.net/jdk7/jdk7 <i>YourOpenJDK</i>
</tt>
</blockquote>
To get the entire set of OpenJDK Mercurial repositories
without using the Forest Extension:
<blockquote>
<tt>
hg clone http://hg.openjdk.java.net/jdk7/jdk7 <i>YourOpenJDK</i>
hg clone http://hg.openjdk.java.net/jdk8/jdk8 <i>YourOpenJDK</i>
<br>cd <i>YourOpenJDK</i>
<br>sh ./get_source.sh
</tt>
@@ -172,9 +149,6 @@
<br>sh ./make/scripts/hgforest.sh pull -u
</tt>
</blockquote>
You may find this script <tt>make/scripts/hgforest.sh</tt> faster
than the <tt>hg</tt> forest commands provided by the
Forest Extension.
</blockquote>
</blockquote>
@@ -558,7 +532,7 @@
understood that this is not ideal for the open source community.
It is possible this process could change in the future.
<br>
<b>NOTE:</b> The <a href="http://download.java.net/openjdk/jdk7/">
<b>NOTE:</b> The <a href="http://download.java.net/openjdk/jdk8/">
Complete OpenJDK Source Bundles</a> <u>will</u> contain the JAXP and
JAX-WS sources.
</p>
@@ -578,7 +552,7 @@
</li>
<li>
The OpenJDK team copies this new bundle into shared
area (e.g. <tt>/java/devtools/share/jdk7-drops</tt>).
area (e.g. <tt>/java/devtools/share/jdk8-drops</tt>).
Older bundles are never deleted so we retain the history.
</li>
<li>
@@ -1726,7 +1700,7 @@
The location of any source drop bundles
(see <a href="#drops">Managing the Source Drops</a>).
The default will be
<tt>$(ALT_JDK_DEVTOOLS_PATH)/share/jdk7-drops</tt>.
<tt>$(ALT_JDK_DEVTOOLS_PATH)/share/jdk8-drops</tt>.
</dd>
<dt><a name="ALT_UNIXCCS_PATH"><tt>ALT_UNIXCCS_PATH</tt></a></dt>
<dd>
@@ -1931,7 +1905,7 @@
PATH, INCLUDE, LIB, LIBPATH, and WINDOWSSDKDIR
variables set in your shell environment.
These bat files are not easy to use from a shell environment.
However, there is a script placed in the root jdk7 repository called
However, there is a script placed in the root jdk8 repository called
vsvars.sh that can help, it should only be done once in a shell
that will be doing the build, e.g.<br>
<tt>sh ./make/scripts/vsvars.sh -v10 > settings<br>

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,4 @@
^build/
^dist/
/nbproject/private/
^.hgtip

View File

@@ -114,3 +114,26 @@ e0b72ae5dc5e824b342801c8d1d336a55eb54e2c jdk7-b135
a66c01d8bf895261715955df0b95545c000ed6a8 jdk7-b137
78d8cf04697e9df54f7f11e195b7da29b8e345a2 jdk7-b138
60b074ec6fcf5cdf9efce22fdfb02326ed8fa2d3 jdk7-b139
cdf5d19ec142424489549025e9c42e51f32cf688 jdk7-b140
a58635cdd921bafef353f4864184a0481353197b jdk7-b141
a2f340a048c88d10cbedc0504f5cf03d39925a40 jdk7-b142
51ed32f6f4de56f16e910ac54ba6c6f6606f4f17 jdk7-b143
7033a5756ad552d88114594d8e2d2e4dc2c05963 jdk7-b144
77ec0541aa2aa4da27e9e385a118a2e51e7fca24 jdk7-b145
770227a4087e4e401fe87ccd19738440111c3948 jdk7-b146
73323cb3396260d93e0ab731fd2d431096ceed0f jdk7-b147
949fb60ca830364571e7c4c9964e6b351ca929ec jdk8-b01
ed8d94519a87b4adac270c3eec9134ff1f62bff5 jdk8-b02
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

View File

@@ -1 +1 @@
project=jdk7
project=jdk8

File diff suppressed because it is too large Load Diff

View File

@@ -25,12 +25,23 @@
# Properties for jprt
# Use whatever release that the submitted job requests
jprt.tools.default.release=${jprt.submit.release}
# The release to build
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}, \
windows_x64_5.2-{product|fastdebug}
# Directories to be excluded from the source bundles
jprt.bundle.exclude.src.dirs=build dist webrev

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) 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
@@ -405,8 +405,7 @@ public class ObjectStreamClass implements java.io.Serializable {
if (!serializable ||
externalizable ||
forProxyClass ||
name.equals("java.lang.String") ||
isEnum) {
name.equals("java.lang.String")){
fields = NO_FIELDS;
} else if (serializable) {
/* Ask for permission to override field access checks.

View File

@@ -23,9 +23,9 @@
# questions.
#
orbd.usage=Uso: {0} <options> \n\nem que <options> inclui:\n -port porta de ativa\u00E7\u00E3o na qual o ORBD deve ser iniciado, default 1049 (opcional)\n -defaultdb diret\u00F3rio dos arquivos ORBD, default "./orb.db" (opcional)\n -serverid id do servidor para ORBD, default 1 (opcional)\n -ORBInitialPort porta inicial (necess\u00E1rio)\n -ORBInitialHost nome de host inicial (necess\u00E1rio)\n
orbd.usage=Uso: {0} <op\u00E7\u00F5es> \n\nem que <op\u00E7\u00F5es> inclui:\n -port porta de ativa\u00E7\u00E3o na qual o ORBD deve ser iniciado, default 1049 (opcional)\n -defaultdb diret\u00F3rio dos arquivos ORBD, default "./orb.db" (opcional)\n -serverid id do servidor para ORBD, default 1 (opcional)\n -ORBInitialPort porta inicial (obrigat\u00F3rio)\n -ORBInitialHost nome de host inicial (obrigat\u00F3rio)\n
servertool.usage=Uso: {0} <options> \n\nem que <options> inclui:\n -ORBInitialPort porta inicial (necess\u00E1rio)\n -ORBInitialHost nome de host inicial (necess\u00E1rio)\n
servertool.usage=Uso: {0} <op\u00E7\u00F5es> \n\nem que <op\u00E7\u00F5es> inclui:\n -ORBInitialPort porta inicial (obrigat\u00F3rio)\n -ORBInitialHost nome de host inicial (obrigat\u00F3rio)\n
servertool.banner=\n\nBem-vindo \u00E0 Ferramenta de Servidor IDL Java \ninsira os comandos no prompt \n
servertool.shorthelp=\n\n\tComandos Dispon\u00EDveis: \n\t------------------- \n
servertool.baddef=Defini\u00E7\u00E3o do servidor inv\u00E1lida: {0}
@@ -40,23 +40,23 @@ servertool.args=\targs - {0}
servertool.vmargs=\tvmargs - {0}
servertool.serverid=\tserver id - {0}
servertool.servernotrunning=\to servidor n\u00E3o est\u00E1 em execu\u00E7\u00E3o.
servertool.register=\n\n\tregister -server <server class name> \n\t -applicationName <alternate server name> \n\t -classpath <classpath to server> \n\t -args <args to server> \n\t -vmargs <args to server Java VM>\n
servertool.register=\n\n\tregister -server <nome da classe do servidor> \n\t -applicationName <nome do servidor alternativo> \n\t -classpath <classpath para o servidor> \n\t -args <args para o servidor> \n\t -vmargs <args para a VM Java do servidor>\n
servertool.register1=registra um servidor ativ\u00E1vel
servertool.register2=\tservidor registrado (serverid = {0}).
servertool.register3=\tservidor registrado, mas em espera (serverid = {0}).
servertool.register4=\tservidor j\u00E1 registrado (serverid = {0}).
servertool.unregister=\n\tunregister [ -serverid <server id> | -applicationName <name> ] \n
servertool.unregister=\n\tunregister [ -serverid <id do servidor> | -applicationName <nome> ] \n
servertool.unregister1=cancela o registro de um servidor registrado
servertool.unregister2=\tservidor n\u00E3o registrado.
servertool.locate=\n\tlocate [ -serverid <server id> | -applicationName <name> ] [ <-endpointType <endpointType> ] \n
servertool.locate=\n\tlocate [ -serverid <id do servidor> | -applicationName <nome> ] [ <-endpointType <endpointType> ] \n
servertool.locate1=localiza portas de tipo espec\u00EDfico para um servidor registrado
servertool.locate2=\n\n\tNome do Host {0} \n\n\t\tPorta\t\tTipo de Porta\t\tId do ORB\n\t\t----\t\t---------\t\t------\n
servertool.locateorb=\n\tlocateperorb [ -serverid <server id> | -applicationName <name> ] [ -orbid <ORB name> ]\n
servertool.locateorb=\n\tlocateperorb [ -serverid <id do servidor> | -applicationName <nome> ] [ -orbid <nome ORB> ]\n
servertool.locateorb1=localiza portas para um orb espec\u00EDfico de servidor registrado
servertool.locateorb2=\n\n\tNome do Host {0} \n\n\t\tPorta\t\tTipo de Porta\t\tId do ORB\n\t\t----\t\t--------\t\t------\n
servertool.getserverid=\n\tgetserverid [ -applicationName <name> ] \n
servertool.getserverid=\n\tgetserverid [ -applicationName <nome> ] \n
servertool.getserverid1=retorna o id do servidor de um applicationName
servertool.getserverid2=\tID do Servidor de applicationName {0} \u00E9 {1}
@@ -69,33 +69,33 @@ servertool.listappnames=\tlistappnames\n
servertool.listappnames1=lista os applicationNames atualmente definidos
servertool.listappnames2=applicationNames do servidor definidos atualmente:
servertool.shutdown=\n\tshutdown [ -serverid <server id> | -applicationName <name> ]\n
servertool.shutdown=\n\tshutdown [ -serverid <id do servidor> | -applicationName <nome> ]\n
servertool.shutdown1=faz shutdown de um servidor registrado
servertool.shutdown2=\tshutdown do servidor bem-sucedido.
servertool.startserver=\n\tstartup [ -serverid <server id> | -applicationName <name> ]\n
servertool.startserver=\n\tstartup [ -serverid <id do servidor> | -applicationName <nome> ]\n
servertool.startserver1=inicia um servidor registrado
servertool.startserver2=\tservidor iniciado com \u00EAxito.
servertool.quit=\n\tquit\n
servertool.quit1=sai desta ferramenta
servertool.help=\thelp\n\tOR\n\thelp <command name>\n
servertool.help=\thelp\n\tOR\n\thelp <nome do comando>\n
servertool.help1=obt\u00E9m ajuda
servertool.orbidmap=\tUso: orblist [ -serverid <server id> | -applicationName <name> ]\n
servertool.orbidmap=\tUso: orblist [ -serverid <id do servidor> | -applicationName <nome> ]\n
servertool.orbidmap1=lista de nomes de orb e seus mapeamentos
servertool.orbidmap2=\n\tId de ORB\t\tNome de ORB\n\t------\t\t--------\n
pnameserv.success=NameServer Persistente Iniciado com \u00CAxito
bootstrap.usage=Uso: {0} <options> \n\nem que <options> inclui:\n -ORBInitialPort porta inicial (necess\u00E1rio)\n -InitialServicesFile arquivo que cont\u00E9m a lista de servi\u00E7os iniciais (necess\u00E1rio)\n
bootstrap.usage=Uso: {0} <op\u00E7\u00F5es> \n\nem que <op\u00E7\u00F5es> inclui:\n -ORBInitialPort porta inicial (obrigat\u00F3rio)\n -InitialServicesFile arquivo que cont\u00E9m a lista de servi\u00E7os iniciais (obrigat\u00F3rio)\n
bootstrap.success=definindo porta para {0} e lendo servi\u00E7os de {1}
bootstrap.filenotreadable=o arquivo {0} n\u00E3o \u00E9 leg\u00EDvel
bootstrap.filenotfound=arquivo {0} n\u00E3o encontrado
bootstrap.exception=exce\u00E7\u00E3o capturada ao salvar as propriedades no Arquivo {0}: exce\u00E7\u00E3o {1}
tnameserv.exception=uma exce\u00E7\u00E3o capturada ao iniciar o servi\u00E7o de inicializa\u00E7\u00E3o na porta {0}
tnameserv.usage=tente usar outra porta com os argumentos de linha de comandos -ORBInitialPort <portno>
tnameserv.usage=tente usar outra porta com os argumentos de linha de comandos -ORBInitialPort <n\u00BA da porta>
tnameserv.invalidhostoption=ORBInitialHost n\u00E3o \u00E9 uma op\u00E7\u00E3o v\u00E1lida para NameService
tnameserv.orbinitialport0=ORBInitialPort 0 n\u00E3o \u00E9 uma op\u00E7\u00E3o v\u00E1lida para NameService
tnameserv.hs1=Contexto de Nomea\u00E7\u00E3o Inicial:\n{0}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2010 Oracle and/or its affiliates. All rights reserved.
* 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

View File

@@ -5,3 +5,5 @@
^src/share/tools/IdealGraphVisualizer/[a-zA-Z0-9]*/build/
^src/share/tools/IdealGraphVisualizer/build/
^src/share/tools/IdealGraphVisualizer/dist/
^.hgtip
.DS_Store

View File

@@ -166,3 +166,38 @@ bd586e392d93b7ed7a1636dcc8da2b6a4203a102 hs21-b06
0930dc920c185afbf40fed9a655290b8e5b16783 hs21-b08
611e19a16519d6fb5deea9ab565336e6e6ee475d jdk7-b139
611e19a16519d6fb5deea9ab565336e6e6ee475d hs21-b09
d283b82966712b353fa307845a1316da42a355f4 jdk7-b140
d283b82966712b353fa307845a1316da42a355f4 hs21-b10
5d07913abd59261c77f24cc04a759cb75d804099 jdk7-b141
3aea9e9feb073f5500e031be6186666bcae89aa2 hs21-b11
9ad1548c6b63d596c411afc35147ffd5254426d9 jdk7-b142
9ad1548c6b63d596c411afc35147ffd5254426d9 hs21-b12
c149193c768b8b7233da4c3a3fdc0756b975848e hs21-b13
c149193c768b8b7233da4c3a3fdc0756b975848e jdk7-b143
0cc8a70952c368e06de2adab1f2649a408f5e577 jdk8-b01
31e253c1da429124bb87570ab095d9bc89850d0a jdk8-b02
3a2fb61165dfc72e398179a2796d740c8da5b8c0 jdk8-b03
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

View File

@@ -1 +1 @@
project=jdk7
project=jdk8

File diff suppressed because it is too large Load Diff

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 \
@@ -257,7 +271,7 @@ RMIC = $(JDK_HOME)/bin/rmic
all: filelist
@mkdir -p $(OUTPUT_DIR)
@echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
$(JAVAC) -source 1.4 -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist
$(JAVAC) -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist
$(RMIC) -classpath $(OUTPUT_DIR) -d $(OUTPUT_DIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql/sa.js
cp $(SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql
@@ -269,7 +283,7 @@ all: filelist
allprof: filelist
@mkdir -p $(OUTPUT_DIR)
@echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
$(JAVAC) -source 1.4 -J-Xprof -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist
$(JAVAC) -J-Xprof -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist
$(RMIC) -classpath $(OUTPUT_DIR) -d $(OUTPUT_DIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql/sa.js
cp $(SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql

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

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
* 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
@@ -22,34 +22,37 @@
*
*/
#ifndef _PROCLIST_
#define _PROCLIST_
#ifndef _ELFMACROS_H_
#define _ELFMACROS_H_
#include <windows.h>
#include <vector>
#define ELF_NHDR Elf_Note
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);
#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
ULONG getPid();
/** Returns number of WCHAR characters in getName() */
USHORT getNameLength();
WCHAR* getName();
#ifndef ELF_ST_TYPE
#define ELF_ST_TYPE ELF64_ST_TYPE
#endif
private:
ULONG pid;
USHORT nameLength;
WCHAR* name;
void copyFrom(const ProcEntry& arg);
};
#else
typedef std::vector<ProcEntry> ProcEntryList;
void procList(ProcEntryList& processes);
#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
#endif // #defined _PROCLIST_
#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

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
* 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
@@ -22,54 +22,31 @@
*
*/
#include "nt4internals.hpp"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#ifndef _SALIBELF_H_
#define _SALIBELF_H_
namespace NT4 {
#include <elf.h>
#include "elfmacros.h"
#include "libproc_impl.h"
static HMODULE ntDLL = NULL;
// read ELF file header.
int read_elf_header(int fd, ELF_EHDR* ehdr);
HMODULE loadNTDLL() {
if (ntDLL == NULL) {
ntDLL = LoadLibrary("NTDLL.DLL");
}
// is given file descriptor corresponds to an ELF file?
bool is_elf_file(int fd);
assert(ntDLL != NULL);
return ntDLL;
}
// 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);
void unloadNTDLL() {
if (ntDLL != NULL) {
FreeLibrary(ntDLL);
ntDLL = NULL;
}
}
// 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);
} // namespace NT4
// 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);
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;
}
}
// 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

@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
* 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
@@ -21,22 +19,41 @@
* 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 _AWT_MGRSEL_H_
#define _AWT_MGRSEL_H_
#include <stdio.h>
#include <stdlib.h>
#include "libproc.h"
#ifndef HEADLESS
int main(int argc, char** argv) {
struct ps_prochandle* ph;
#include "awt_p.h"
init_libproc(true);
switch (argc) {
case 2: {
// process
ph = Pgrab(atoi(argv[1]));
break;
}
extern void awt_mgrsel_init(void);
extern int awt_mgrsel_processEvent(XEvent *);
case 3: {
// core
ph = Pgrab_core(argv[1], argv[2]);
break;
}
extern const Window * awt_mgrsel_select(const char *, long,
void *,
void (*)(int, XEvent *, void *),
void (*)(int, Window, long *, void *));
default: {
fprintf(stderr, "usage %s <pid> or %s <exec file> <core file>\n", argv[0], argv[0]);
return 1;
}
}
#endif /* !HEADLESS */
#endif /* _AWT_MGRSEL_H_ */
if (ph) {
Prelease(ph);
return 0;
} else {
printf("can't connect to debuggee\n");
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,5 +1,5 @@
/*
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
@@ -420,7 +420,22 @@ extern uintptr_t Ppltdest(struct ps_prochandle *, uintptr_t, int *);
/*
* Stack frame iteration interface.
*/
#ifdef SOLARIS_11_B159_OR_LATER
/* building on Nevada-B159 or later so define the new callback */
typedef int proc_stack_f(
void *, /* the cookie given to Pstack_iter() */
const prgregset_t, /* the frame's registers */
uint_t, /* argc for the frame's function */
const long *, /* argv for the frame's function */
int, /* bitwise flags describing the frame (see below) */
int); /* a signal number */
#define PR_SIGNAL_FRAME 1 /* called by a signal handler */
#define PR_FOUND_SIGNAL 2 /* we found the corresponding signal number */
#else
/* building on Nevada-B158 or earlier so define the old callback */
typedef int proc_stack_f(void *, const prgregset_t, uint_t, const long *);
#endif
extern int Pstack_iter(struct ps_prochandle *,
const prgregset_t, proc_stack_f *, void *);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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
@@ -101,7 +101,23 @@ extern int Pstop(struct ps_prochandle *, uint_t);
/*
* Stack frame iteration interface.
*/
#ifdef SOLARIS_11_B159_OR_LATER
/* building on Nevada-B159 or later so define the new callback */
typedef int proc_stack_f(
void *, /* the cookie given to Pstack_iter() */
const prgregset_t, /* the frame's registers */
uint_t, /* argc for the frame's function */
const long *, /* argv for the frame's function */
int, /* bitwise flags describing the frame (see below) */
int); /* a signal number */
#define PR_SIGNAL_FRAME 1 /* called by a signal handler */
#define PR_FOUND_SIGNAL 2 /* we found the corresponding signal number */
#else
/* building on Nevada-B158 or earlier so define the old callback */
typedef int proc_stack_f(void *, const prgregset_t, uint_t, const long *);
#endif
extern int Pstack_iter(struct ps_prochandle *,
const prgregset_t, proc_stack_f *, void *);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
@@ -24,6 +24,9 @@
#include "salibproc.h"
#include "sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal.h"
#ifndef SOLARIS_11_B159_OR_LATER
#include <sys/utsname.h>
#endif
#include <thread_db.h>
#include <strings.h>
#include <limits.h>
@@ -40,8 +43,22 @@
#define SYMBOL_BUF_SIZE 256
#define ERR_MSG_SIZE (PATH_MAX + 256)
// debug mode
// debug modes
static int _libsaproc_debug = 0;
#ifndef SOLARIS_11_B159_OR_LATER
static bool _Pstack_iter_debug = false;
static void dprintf_2(const char* format,...) {
if (_Pstack_iter_debug) {
va_list alist;
va_start(alist, format);
fputs("Pstack_iter DEBUG: ", stderr);
vfprintf(stderr, format, alist);
va_end(alist);
}
}
#endif // !SOLARIS_11_B159_OR_LATER
static void print_debug(const char* format,...) {
if (_libsaproc_debug) {
@@ -450,6 +467,7 @@ fill_load_object_list(void *cd, const prmap_t* pmp, const char* obj_name) {
return 0;
}
// Pstack_iter() proc_stack_f callback prior to Nevada-B159
static int
fill_cframe_list(void *cd, const prgregset_t regs, uint_t argc, const long *argv) {
DebuggerWith2Objects* dbgo2 = (DebuggerWith2Objects*) cd;
@@ -472,6 +490,14 @@ fill_cframe_list(void *cd, const prgregset_t regs, uint_t argc, const long *argv
return 0;
}
// Pstack_iter() proc_stack_f callback in Nevada-B159 or later
/*ARGSUSED*/
static int
wrapper_fill_cframe_list(void *cd, const prgregset_t regs, uint_t argc,
const long *argv, int frame_flags, int sig) {
return(fill_cframe_list(cd, regs, argc, argv));
}
// part of the class sharing workaround
// FIXME: !!HACK ALERT!!
@@ -970,6 +996,11 @@ JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_fill
TD_THR_ANY_STATE, TD_THR_LOWEST_PRIORITY, TD_SIGNO_MASK, TD_THR_ANY_USER_FLAGS);
}
#ifndef SOLARIS_11_B159_OR_LATER
// building on Nevada-B158 or earlier so more hoops to jump through
static bool has_newer_Pstack_iter = false; // older version by default
#endif
/*
* Class: sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal
* Method: fillCFrameList0
@@ -997,7 +1028,24 @@ JNIEXPORT jobject JNICALL Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_f
env->ReleaseLongArrayElements(regsArray, ptr, JNI_ABORT);
CHECK_EXCEPTION_(0);
Pstack_iter((struct ps_prochandle*) p_ps_prochandle, gregs, fill_cframe_list, &dbgo2);
#ifdef SOLARIS_11_B159_OR_LATER
// building on Nevada-B159 or later so use the new callback
Pstack_iter((struct ps_prochandle*) p_ps_prochandle, gregs,
wrapper_fill_cframe_list, &dbgo2);
#else
// building on Nevada-B158 or earlier so figure out which callback to use
if (has_newer_Pstack_iter) {
// Since we're building on Nevada-B158 or earlier, we have to
// cast wrapper_fill_cframe_list to make the compiler happy.
Pstack_iter((struct ps_prochandle*) p_ps_prochandle, gregs,
(proc_stack_f *)wrapper_fill_cframe_list, &dbgo2);
} else {
Pstack_iter((struct ps_prochandle*) p_ps_prochandle, gregs,
fill_cframe_list, &dbgo2);
}
#endif // SOLARIS_11_B159_OR_LATER
return dbgo2.obj;
}
@@ -1218,6 +1266,102 @@ JNIEXPORT jstring JNICALL Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_d
return res;
}
#ifndef SOLARIS_11_B159_OR_LATER
// Determine if the OS we're running on has the newer version
// of libproc's Pstack_iter.
//
// Set env var PSTACK_ITER_DEBUG=true to debug this logic.
// Set env var PSTACK_ITER_DEBUG_RELEASE to simulate a 'release' value.
// Set env var PSTACK_ITER_DEBUG_VERSION to simulate a 'version' value.
//
// frankenputer 'uname -r -v': 5.10 Generic_141445-09
// jurassic 'uname -r -v': 5.11 snv_164
// lonepeak 'uname -r -v': 5.11 snv_127
//
static void set_has_newer_Pstack_iter(JNIEnv *env) {
static bool done_set = false;
if (done_set) {
// already set has_newer_Pstack_iter
return;
}
struct utsname name;
if (uname(&name) == -1) {
THROW_NEW_DEBUGGER_EXCEPTION("uname() failed!");
}
dprintf_2("release='%s' version='%s'\n", name.release, name.version);
if (_Pstack_iter_debug) {
char *override = getenv("PSTACK_ITER_DEBUG_RELEASE");
if (override != NULL) {
strncpy(name.release, override, SYS_NMLN - 1);
name.release[SYS_NMLN - 2] = '\0';
dprintf_2("overriding with release='%s'\n", name.release);
}
override = getenv("PSTACK_ITER_DEBUG_VERSION");
if (override != NULL) {
strncpy(name.version, override, SYS_NMLN - 1);
name.version[SYS_NMLN - 2] = '\0';
dprintf_2("overriding with version='%s'\n", name.version);
}
}
// the major number corresponds to the old SunOS major number
int major = atoi(name.release);
if (major >= 6) {
dprintf_2("release is SunOS 6 or later\n");
has_newer_Pstack_iter = true;
done_set = true;
return;
}
if (major < 5) {
dprintf_2("release is SunOS 4 or earlier\n");
done_set = true;
return;
}
// some SunOS 5.* build so now check for Solaris versions
char *dot = strchr(name.release, '.');
int minor = 0;
if (dot != NULL) {
// release is major.minor format
*dot = NULL;
minor = atoi(dot + 1);
}
if (minor <= 10) {
dprintf_2("release is Solaris 10 or earlier\n");
done_set = true;
return;
} else if (minor >= 12) {
dprintf_2("release is Solaris 12 or later\n");
has_newer_Pstack_iter = true;
done_set = true;
return;
}
// some Solaris 11 build so now check for internal build numbers
if (strncmp(name.version, "snv_", 4) != 0) {
dprintf_2("release is Solaris 11 post-GA or later\n");
has_newer_Pstack_iter = true;
done_set = true;
return;
}
// version begins with "snv_" so a pre-GA build of Solaris 11
int build = atoi(&name.version[4]);
if (build >= 159) {
dprintf_2("release is Nevada-B159 or later\n");
has_newer_Pstack_iter = true;
} else {
dprintf_2("release is Nevada-B158 or earlier\n");
}
done_set = true;
}
#endif // !SOLARIS_11_B159_OR_LATER
/*
* Class: sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal
* Method: initIDs
@@ -1237,6 +1381,14 @@ JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_init
if (libproc_handle == 0)
THROW_NEW_DEBUGGER_EXCEPTION("can't load libproc.so, if you are using Solaris 5.7 or below, copy libproc.so from 5.8!");
#ifndef SOLARIS_11_B159_OR_LATER
_Pstack_iter_debug = getenv("PSTACK_ITER_DEBUG") != NULL;
set_has_newer_Pstack_iter(env);
CHECK_EXCEPTION;
dprintf_2("has_newer_Pstack_iter=%d\n", has_newer_Pstack_iter);
#endif
p_ps_prochandle_ID = env->GetFieldID(clazz, "p_ps_prochandle", "J");
CHECK_EXCEPTION;

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,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,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,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,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,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,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,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,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,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) {
@@ -1028,7 +1264,12 @@ public class CommandProcessor {
if (AddressOps.equal(val, value)) {
if (!printed) {
printed = true;
blob.printOn(out);
try {
blob.printOn(out);
} catch (Exception e) {
out.println("Exception printing blob at " + base);
e.printStackTrace();
}
}
out.println("found at " + base + "\n");
}
@@ -1306,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) {
@@ -1401,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. */

View File

@@ -87,6 +87,7 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
readVMStructs();
readVMIntConstants();
readVMLongConstants();
readExternalDefinitions();
}
public Type lookupType(String cTypeName, boolean throwException) {
@@ -98,9 +99,9 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
fieldType = (BasicType)lookupType(cTypeName.substring(0, cTypeName.length() - 6), false);
}
if (fieldType == null) {
if (cTypeName.startsWith("GrowableArray<") && cTypeName.endsWith(">*")) {
if (cTypeName.startsWith("GrowableArray<") && cTypeName.endsWith(">")) {
String ttype = cTypeName.substring("GrowableArray<".length(),
cTypeName.length() - 2);
cTypeName.length() - 1);
Type templateType = lookupType(ttype, false);
if (templateType == null && typeNameIsPointerType(ttype)) {
templateType = recursiveCreateBasicPointerType(ttype);
@@ -108,7 +109,21 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
if (templateType == null) {
lookupOrFail(ttype);
}
fieldType = recursiveCreateBasicPointerType(cTypeName);
BasicType basicTargetType = createBasicType(cTypeName, false, false, false);
// transfer fields from GenericGrowableArray to template instance
BasicType generic = lookupOrFail("GenericGrowableArray");
BasicType specific = lookupOrFail("GrowableArray<int>");
basicTargetType.setSize(specific.getSize());
Iterator fields = generic.getFields();
while (fields.hasNext()) {
Field f = (Field)fields.next();
basicTargetType.addField(internalCreateField(basicTargetType, f.getName(),
f.getType(), f.isStatic(),
f.getOffset(), null));
}
fieldType = basicTargetType;
}
}
if (fieldType == null && typeNameIsPointerType(cTypeName)) {
@@ -208,6 +223,156 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
return type;
}
private void readExternalDefinitions() {
String file = System.getProperty("sun.jvm.hotspot.typedb");
if (file != null) {
System.out.println("Reading " + file);
BufferedReader in = null;
try {
StreamTokenizer t = new StreamTokenizer(in = new BufferedReader(new InputStreamReader(new FileInputStream(file))));
t.resetSyntax();
t.wordChars('\u0000','\uFFFF');
t.whitespaceChars(' ', ' ');
t.whitespaceChars('\n', '\n');
t.whitespaceChars('\r', '\r');
t.quoteChar('\"');
t.eolIsSignificant(true);
while (t.nextToken() != StreamTokenizer.TT_EOF) {
if (t.ttype == StreamTokenizer.TT_EOL) {
continue;
}
if (t.sval.equals("field")) {
t.nextToken();
BasicType containingType = (BasicType)lookupType(t.sval);
t.nextToken();
String fieldName = t.sval;
// The field's Type must already be in the database -- no exceptions
t.nextToken();
Type fieldType = lookupType(t.sval);
t.nextToken();
boolean isStatic = Boolean.valueOf(t.sval).booleanValue();
t.nextToken();
long offset = Long.parseLong(t.sval);
t.nextToken();
Address staticAddress = null;
if (isStatic) {
throw new InternalError("static fields not supported");
}
// check to see if the field already exists
Iterator i = containingType.getFields();
boolean defined = false;
while (i.hasNext()) {
Field f = (Field) i.next();
if (f.getName().equals(fieldName)) {
if (f.isStatic() != isStatic) {
throw new RuntimeException("static/nonstatic mismatch: " + fieldName);
}
if (!isStatic) {
if (f.getOffset() != offset) {
throw new RuntimeException("bad redefinition of field offset: " + fieldName);
}
} else {
if (!f.getStaticFieldAddress().equals(staticAddress)) {
throw new RuntimeException("bad redefinition of field location: " + fieldName);
}
}
if (f.getType() != fieldType) {
System.out.println(fieldType);
System.out.println(f.getType());
throw new RuntimeException("bad redefinition of field type: " + fieldName);
}
defined = true;
break;
}
}
if (!defined) {
// Create field by type
createField(containingType,
fieldName, fieldType,
isStatic,
offset,
staticAddress);
}
} else if (t.sval.equals("type")) {
t.nextToken();
String typeName = t.sval;
t.nextToken();
String superclassName = t.sval;
if (superclassName.equals("null")) {
superclassName = null;
}
t.nextToken();
boolean isOop = Boolean.valueOf(t.sval).booleanValue();
t.nextToken();
boolean isInteger = Boolean.valueOf(t.sval).booleanValue();
t.nextToken();
boolean isUnsigned = Boolean.valueOf(t.sval).booleanValue();
t.nextToken();
long size = Long.parseLong(t.sval);
BasicType type = null;
try {
type = (BasicType)lookupType(typeName);
} catch (RuntimeException e) {
}
if (type != null) {
if (type.isOopType() != isOop) {
throw new RuntimeException("oop mismatch in type definition: " + typeName);
}
if (type.isCIntegerType() != isInteger) {
throw new RuntimeException("integer type mismatch in type definition: " + typeName);
}
if (type.isCIntegerType() && (((CIntegerType)type).isUnsigned()) != isUnsigned) {
throw new RuntimeException("unsigned mismatch in type definition: " + typeName);
}
if (type.getSuperclass() == null) {
if (superclassName != null) {
if (type.getSize() == -1) {
type.setSuperclass(lookupType(superclassName));
} else {
throw new RuntimeException("unexpected superclass in type definition: " + typeName);
}
}
} else {
if (superclassName == null) {
throw new RuntimeException("missing superclass in type definition: " + typeName);
}
if (!type.getSuperclass().getName().equals(superclassName)) {
throw new RuntimeException("incorrect superclass in type definition: " + typeName);
}
}
if (type.getSize() != size) {
if (type.getSize() == -1 || type.getSize() == 0) {
type.setSize(size);
} else {
throw new RuntimeException("size mismatch in type definition: " + typeName + ": " + type.getSize() + " != " + size);
}
}
}
if (lookupType(typeName, false) == null) {
// Create type
createType(typeName, superclassName, isOop, isInteger, isUnsigned, size);
}
} else {
throw new InternalError("\"" + t.sval + "\"");
}
}
} catch (IOException ioe) {
ioe.printStackTrace();
} finally {
try {
in.close();
} catch (Exception e) {
}
}
}
}
private void readVMStructs() {
// Get the variables we need in order to traverse the VMStructEntry[]
long structEntryTypeNameOffset;
@@ -504,20 +669,6 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
BasicType basicTargetType = createBasicType(targetTypeName, false, true, true);
basicTargetType.setSize(1);
targetType = basicTargetType;
} else if (targetTypeName.startsWith("GrowableArray<")) {
BasicType basicTargetType = createBasicType(targetTypeName, false, false, false);
// transfer fields from GenericGrowableArray to template instance
BasicType generic = lookupOrFail("GenericGrowableArray");
basicTargetType.setSize(generic.getSize());
Iterator fields = generic.getFields();
while (fields.hasNext()) {
Field f = (Field)fields.next();
basicTargetType.addField(internalCreateField(basicTargetType, f.getName(),
f.getType(), f.isStatic(),
f.getOffset(), null));
}
targetType = basicTargetType;
} else {
if (DEBUG) {
System.err.println("WARNING: missing target type \"" + targetTypeName + "\" for pointer type \"" + typeName + "\"");
@@ -572,7 +723,7 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
// Classes are created with a size of UNINITIALIZED_SIZE.
// Set size if necessary.
if (curType.getSize() == UNINITIALIZED_SIZE) {
if (curType.getSize() == UNINITIALIZED_SIZE || curType.getSize() == 0) {
curType.setSize(size);
} else {
if (curType.getSize() != size) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 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,18 +25,12 @@
package sun.jvm.hotspot;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.debugger.dbx.*;
import sun.jvm.hotspot.debugger.proc.*;
// A test of the debugger backend. This should be used to connect to
// the helloWorld.cpp program.
public class TestDebugger {
// FIXME: make these configurable, i.e., via a dotfile
private static final String dbxPathName = "/export/home/kbr/ws/dbx_61/dev/Derived-sparcv9-S2./src/dbx/dbx";
private static final String[] dbxSvcAgentDSOPathNames =
new String[] {
"/export/home/kbr/main/sa_baseline/src/os/solaris/agent/libsvc_agent_dbx.so"
};
private static void usage() {
System.out.println("usage: java TestDebugger [pid]");
@@ -58,8 +52,7 @@ public class TestDebugger {
usage();
}
JVMDebugger debugger = new DbxDebuggerLocal(new MachineDescriptionSPARC64Bit(),
dbxPathName, dbxSvcAgentDSOPathNames, true);
JVMDebugger debugger = new ProcDebuggerLocal(null, true);
try {
debugger.attach(pid);

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
@@ -34,7 +34,7 @@ import javax.swing.filechooser.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.debugger.cdbg.*;
import sun.jvm.hotspot.debugger.posix.*;
import sun.jvm.hotspot.debugger.win32.*;
import sun.jvm.hotspot.debugger.windbg.*;
import sun.jvm.hotspot.livejvm.*;
import sun.jvm.hotspot.memory.*;
import sun.jvm.hotspot.oops.*;
@@ -604,7 +604,7 @@ public class BugSpot extends JPanel {
throw new DebuggerException("Unsupported CPU \"" + cpu + "\" for Windows");
}
localDebugger = new Win32DebuggerLocal(new MachineDescriptionIntelX86(), true);
localDebugger = new WindbgDebuggerLocal(new MachineDescriptionIntelX86(), true);
} else if (os.equals("linux")) {
if (!cpu.equals("x86")) {
throw new DebuggerException("Unsupported CPU \"" + cpu + "\" for Linux");

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
@@ -29,10 +29,9 @@ import java.net.*;
import java.rmi.*;
import sun.jvm.hotspot.*;
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.cdbg.*;
import sun.jvm.hotspot.debugger.win32.*;
import sun.jvm.hotspot.debugger.windbg.*;
import sun.jvm.hotspot.debugger.linux.*;
import sun.jvm.hotspot.debugger.sparc.*;
@@ -516,6 +515,8 @@ public class BugSpotAgent {
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");
@@ -567,6 +568,9 @@ public class BugSpotAgent {
} else if (os.equals("linux")) {
db = new HotSpotTypeDataBase(machDesc, new LinuxVtblAccess(debugger, jvmLibNames),
debugger, jvmLibNames);
} else if (os.equals("bsd")) {
db = new HotSpotTypeDataBase(machDesc, new BsdVtblAccess(debugger, jvmLibNames),
debugger, jvmLibNames);
} else {
throw new DebuggerException("OS \"" + os + "\" not yet supported (no VtblAccess implemented yet)");
}
@@ -627,104 +631,33 @@ public class BugSpotAgent {
private void setupDebuggerSolaris() {
setupJVMLibNamesSolaris();
String prop = System.getProperty("sun.jvm.hotspot.debugger.useProcDebugger");
if (prop != null && !prop.equals("false")) {
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);
}
private void connectRemoteDebugger() throws DebuggerException {
@@ -739,6 +672,8 @@ public class BugSpotAgent {
setupJVMLibNamesWin32();
} else if (os.equals("linux")) {
setupJVMLibNamesLinux();
} else if (os.equals("bsd")) {
setupJVMLibNamesBsd();
} else {
throw new RuntimeException("Unknown OS type");
}
@@ -772,11 +707,7 @@ public class BugSpotAgent {
// 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();
}
@@ -822,6 +753,34 @@ public class BugSpotAgent {
setupJVMLibNamesSolaris();
}
//
// 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");
}
// Note we do not use a cache for the local debugger in server
// mode; it will be taken care of on the client side (once remote
// debugging is implemented).
debugger = new BsdDebuggerLocal(machDesc, !isServer);
attachDebugger();
}
private void setupJVMLibNamesBsd() {
// same as solaris
setupJVMLibNamesSolaris();
}
/** Convenience routine which should be called by per-platform
debugger setup. Should not be called when startupMode is
REMOTE_MODE. */

View File

@@ -0,0 +1,53 @@
/*
* Copyright (c) 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package sun.jvm.hotspot.ci;
import java.io.PrintStream;
import java.util.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.types.*;
public class ciArrayKlass extends ciKlass {
static {
VM.registerVMInitializedObserver(new Observer() {
public void update(Observable o, Object data) {
initialize(VM.getVM().getTypeDataBase());
}
});
}
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
Type type = db.lookupType("ciArrayKlass");
dimensionField = new IntField(type.getJIntField("_dimension"), 0);
}
private static IntField dimensionField;
public ciArrayKlass(Address addr) {
super(addr);
}
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright (c) 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package sun.jvm.hotspot.ci;
import java.io.PrintStream;
import java.util.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.types.*;
public class ciArrayKlassKlass extends ciKlassKlass {
static {
VM.registerVMInitializedObserver(new Observer() {
public void update(Observable o, Object data) {
initialize(VM.getVM().getTypeDataBase());
}
});
}
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
Type type = db.lookupType("ciArrayKlassKlass");
}
public ciArrayKlassKlass(Address addr) {
super(addr);
}
}

View File

@@ -0,0 +1,63 @@
/*
* Copyright (c) 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package sun.jvm.hotspot.ci;
import java.io.PrintStream;
import java.util.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.types.*;
public class ciConstant extends VMObject {
static {
VM.registerVMInitializedObserver(new Observer() {
public void update(Observable o, Object data) {
initialize(VM.getVM().getTypeDataBase());
}
});
}
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
Type type = db.lookupType("ciConstant");
valueObjectField = type.getAddressField("_value._object");
valueDoubleField = type.getJDoubleField("_value._double");
valueFloatField = type.getJFloatField("_value._float");
valueLongField = type.getJLongField("_value._long");
valueIntField = type.getJIntField("_value._int");
typeField = new CIntField(type.getCIntegerField("_type"), 0);
}
private static AddressField valueObjectField;
private static JDoubleField valueDoubleField;
private static JFloatField valueFloatField;
private static JLongField valueLongField;
private static JIntField valueIntField;
private static CIntField typeField;
public ciConstant(Address addr) {
super(addr);
}
}

View File

@@ -0,0 +1,77 @@
/*
* Copyright (c) 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package sun.jvm.hotspot.ci;
import java.io.PrintStream;
import java.util.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.opto.*;
import sun.jvm.hotspot.compiler.CompileTask;
import sun.jvm.hotspot.prims.JvmtiExport;
import sun.jvm.hotspot.types.*;
import sun.jvm.hotspot.utilities.GrowableArray;
public class ciEnv extends VMObject {
static {
VM.registerVMInitializedObserver(new Observer() {
public void update(Observable o, Object data) {
initialize(VM.getVM().getTypeDataBase());
}
});
}
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
Type type = db.lookupType("ciEnv");
dependenciesField = type.getAddressField("_dependencies");
factoryField = type.getAddressField("_factory");
compilerDataField = type.getAddressField("_compiler_data");
taskField = type.getAddressField("_task");
systemDictionaryModificationCounterField = new CIntField(type.getCIntegerField("_system_dictionary_modification_counter"), 0);
}
private static AddressField dependenciesField;
private static AddressField factoryField;
private static AddressField compilerDataField;
private static AddressField taskField;
private static CIntField systemDictionaryModificationCounterField;
public ciEnv(Address addr) {
super(addr);
}
public Compile compilerData() {
return new Compile(compilerDataField.getValue(this.getAddress()));
}
public ciObjectFactory factory() {
return new ciObjectFactory(factoryField.getValue(this.getAddress()));
}
public CompileTask task() {
return new CompileTask(taskField.getValue(this.getAddress()));
}
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright (c) 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package sun.jvm.hotspot.ci;
import java.util.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.types.*;
public class ciField extends VMObject {
static {
VM.registerVMInitializedObserver(new Observer() {
public void update(Observable o, Object data) {
initialize(VM.getVM().getTypeDataBase());
}
});
}
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
Type type = db.lookupType("ciField");
constantValueField = type.getAddressField("_constant_value");
isConstantField = type.getAddressField("_is_constant");
offsetField = new CIntField(type.getCIntegerField("_offset"), 0);
signatureField = type.getAddressField("_signature");
nameField = type.getAddressField("_name");
holderField = type.getAddressField("_holder");
}
private static AddressField constantValueField;
private static AddressField isConstantField;
private static CIntField offsetField;
private static AddressField signatureField;
private static AddressField nameField;
private static AddressField holderField;
public ciField(Address addr) {
super(addr);
}
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright (c) 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package sun.jvm.hotspot.ci;
import java.io.PrintStream;
import java.util.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.types.*;
public class ciInstance extends ciObject {
static {
VM.registerVMInitializedObserver(new Observer() {
public void update(Observable o, Object data) {
initialize(VM.getVM().getTypeDataBase());
}
});
}
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
Type type = db.lookupType("ciInstance");
}
public ciInstance(Address addr) {
super(addr);
}
}

View File

@@ -0,0 +1,83 @@
/*
* Copyright (c) 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package sun.jvm.hotspot.ci;
import java.io.*;
import java.util.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.memory.SystemDictionary;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.types.Type;
import sun.jvm.hotspot.types.TypeDataBase;
import sun.jvm.hotspot.types.WrongTypeException;
public class ciInstanceKlass extends ciKlass {
static {
VM.registerVMInitializedObserver(new Observer() {
public void update(Observable o, Object data) {
initialize(VM.getVM().getTypeDataBase());
}
});
}
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
Type type = db.lookupType("ciInstanceKlass");
initStateField = new CIntField(type.getCIntegerField("_init_state"), 0);
isSharedField = new CIntField(type.getCIntegerField("_is_shared"), 0);
CLASS_STATE_LINKED = db.lookupIntConstant("instanceKlass::linked").intValue();
CLASS_STATE_FULLY_INITIALIZED = db.lookupIntConstant("instanceKlass::fully_initialized").intValue();
}
private static CIntField initStateField;
private static CIntField isSharedField;
private static int CLASS_STATE_LINKED;
private static int CLASS_STATE_FULLY_INITIALIZED;
public ciInstanceKlass(Address addr) {
super(addr);
}
public int initState() {
int initState = (int)initStateField.getValue(getAddress());
if (isShared() && initState < CLASS_STATE_LINKED) {
InstanceKlass ik = (InstanceKlass)getOop();
initState = ik.getInitStateAsInt();
}
return initState;
}
public boolean isShared() {
return isSharedField.getValue(getAddress()) != 0;
}
public boolean isLinked() {
return initState() >= CLASS_STATE_LINKED;
}
public boolean isInitialized() {
return initState() == CLASS_STATE_FULLY_INITIALIZED;
}
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright (c) 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package sun.jvm.hotspot.ci;
import java.util.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.types.*;
public class ciInstanceKlassKlass extends ciKlassKlass {
static {
VM.registerVMInitializedObserver(new Observer() {
public void update(Observable o, Object data) {
initialize(VM.getVM().getTypeDataBase());
}
});
}
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
Type type = db.lookupType("ciInstanceKlassKlass");
}
public ciInstanceKlassKlass(Address addr) {
super(addr);
}
}

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