Merge

Wed, 19 Feb 2014 20:12:43 -0800

author
kvn
date
Wed, 19 Feb 2014 20:12:43 -0800
changeset 6506
f040cf9fc9c0
parent 6505
2fcab8ba885a
parent 6301
abdce12c4543
child 6507
752ba2e5f6d0

Merge

src/cpu/sparc/vm/sparc.ad file | annotate | diff | comparison | revisions
src/cpu/x86/vm/x86_32.ad file | annotate | diff | comparison | revisions
src/cpu/x86/vm/x86_64.ad file | annotate | diff | comparison | revisions
src/share/vm/opto/c2_globals.hpp file | annotate | diff | comparison | revisions
src/share/vm/runtime/arguments.cpp file | annotate | diff | comparison | revisions
src/share/vm/runtime/globals.hpp file | annotate | diff | comparison | revisions
src/share/vm/runtime/os.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/.hgtags	Thu Jan 30 14:30:01 2014 +0100
     1.2 +++ b/.hgtags	Wed Feb 19 20:12:43 2014 -0800
     1.3 @@ -410,4 +410,17 @@
     1.4  591135a7d6f96c0ef281d078cee9a8d8c342d45c jdk8-b123
     1.5  c89630a122b43d0eabd78b74f6498a1c3cf04ca3 jdk8u20-b00
     1.6  c89630a122b43d0eabd78b74f6498a1c3cf04ca3 hs25.20-b00
     1.7 +9b9816164447214f21b06ccf646893c281c76a42 hs25-b66
     1.8 +df333ee12bba67e2e928f8ce1da37afd9bf95b48 jdk8-b124
     1.9 +3585183c191aa6b4d0375ea659515335e1804417 hs25-b67
    1.10 +df333ee12bba67e2e928f8ce1da37afd9bf95b48 jdk8-b125
    1.11 +c8218f1072a0370f3ce4714469ced0613ee543ab jdk8-b126
    1.12 +d45454002494d147c0761e6b37d8a73064f3cf92 hs25-b68
    1.13 +32f017489ba5dd1bedabb9fa1d26bcc74d0a72b6 hs25-b69
    1.14 +35038da7bb9ddd367a0a6bf926dfb281aee1d554 jdk8-b127
    1.15 +874c0b4a946c362bbf20d37c2a564b39093152e6 jdk8-b128
    1.16 +cb39165c4a65bbff8db356df411e762f9e5423b8 jdk8-b129
    1.17  412d3b5fe90e54c0ff9d9ac7374b98607c561d5a hs25.20-b01
    1.18 +4638c4d7ff106db0f29ef7f18b128dd7e69bc470 hs25.20-b02
    1.19 +e56d11f8cc2158d4280f80e56d196193349c150a hs25.20-b03
    1.20 +757fe22ae90681e2b6cff50699c5abbe2563dd2c jdk8u20-b01
     2.1 --- a/.jcheck/conf	Thu Jan 30 14:30:01 2014 +0100
     2.2 +++ b/.jcheck/conf	Wed Feb 19 20:12:43 2014 -0800
     2.3 @@ -1,1 +1,2 @@
     2.4  project=jdk8
     2.5 +bugids=dup
     3.1 --- a/THIRD_PARTY_README	Thu Jan 30 14:30:01 2014 +0100
     3.2 +++ b/THIRD_PARTY_README	Wed Feb 19 20:12:43 2014 -0800
     3.3 @@ -2,11 +2,12 @@
     3.4  -----------------------------
     3.5  
     3.6  %% This notice is provided with respect to ASM Bytecode Manipulation 
     3.7 -Framework v3.1, which is included with JRE 7, JDK 7, and OpenJDK 7.
     3.8 +Framework v5.0, which may be included with JRE 8, and JDK 8, and 
     3.9 +OpenJDK 8.
    3.10  
    3.11  --- begin of LICENSE ---
    3.12  
    3.13 -Copyright (c) 2000-2005 INRIA, France Telecom
    3.14 +Copyright (c) 2000-2011 France Télécom
    3.15  All rights reserved.
    3.16  
    3.17  Redistribution and use in source and binary forms, with or without
    3.18 @@ -40,8 +41,41 @@
    3.19  
    3.20  --------------------------------------------------------------------------------
    3.21  
    3.22 -%% This notice is provided with respect to CodeViewer 1.0, which is included 
    3.23 -with JDK 7.
    3.24 +%% This notice is provided with respect to BSDiff v4.3, which may be 
    3.25 +included with JRE 8, JDK 8, and OpenJDK 8.
    3.26 +
    3.27 +--- begin of LICENSE ---
    3.28 +
    3.29 +Copyright 2003-2005 Colin Percival
    3.30 +All rights reserved
    3.31 +
    3.32 +Redistribution and use in source and binary forms, with or without
    3.33 +modification, are permitted providing that the following conditions
    3.34 +are met:
    3.35 +1. Redistributions of source code must retain the above copyright
    3.36 +notice, this list of conditions and the following disclaimer.
    3.37 +2. Redistributions in binary form must reproduce the above copyright
    3.38 +notice, this list of conditions and the following disclaimer in the
    3.39 +documentation and/or other materials provided with the distribution.
    3.40 +
    3.41 +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
    3.42 +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    3.43 +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    3.44 +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
    3.45 +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    3.46 +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    3.47 +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    3.48 +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
    3.49 +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
    3.50 +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    3.51 +POSSIBILITY OF SUCH DAMAGE.
    3.52 +
    3.53 +--- end of LICENSE ---
    3.54 +
    3.55 +-------------------------------------------------------------------------------
    3.56 +
    3.57 +%% This notice is provided with respect to CodeViewer 1.0, which may be
    3.58 +included with JDK 8.
    3.59  
    3.60  --- begin of LICENSE ---
    3.61  
    3.62 @@ -81,8 +115,8 @@
    3.63  
    3.64  -------------------------------------------------------------------------------
    3.65  
    3.66 -%% This notice is provided with respect to Cryptix AES 3.2.0, which is
    3.67 -included with JRE 7, JDK 7, and OpenJDK 7.
    3.68 +%% This notice is provided with respect to Cryptix AES 3.2.0, which may be
    3.69 +included with JRE 8, JDK 8, and OpenJDK 8.
    3.70  
    3.71  --- begin of LICENSE ---
    3.72  
    3.73 @@ -121,7 +155,7 @@
    3.74  -------------------------------------------------------------------------------
    3.75  
    3.76  %% This notice is provided with respect to CUP Parser Generator for 
    3.77 -Java 0.10k, which is included with JRE 7, JDK 7, and OpenJDK 7.
    3.78 +Java 0.10k, which may be included with JRE 8, JDK 8, and OpenJDK 8.
    3.79  
    3.80  --- begin of LICENSE ---
    3.81  
    3.82 @@ -148,7 +182,7 @@
    3.83  -------------------------------------------------------------------------------
    3.84  
    3.85  %% This notice is provided with respect to Document Object Model (DOM) Level 2
    3.86 -& 3, which is included with JRE 7, JDK 7, and OpenJDK 7.
    3.87 +& 3, which may be included with JRE 8, JDK 8, and OpenJDK 8.
    3.88  
    3.89  --- begin of LICENSE ---
    3.90  
    3.91 @@ -212,19 +246,52 @@
    3.92  
    3.93  -------------------------------------------------------------------------------
    3.94  
    3.95 +%% This notice is provided with respect to Dynalink v0.5, which may be 
    3.96 +included with JRE 8, JDK 8, and OpenJDK 8.
    3.97 +
    3.98 +--- begin of LICENSE ---
    3.99 +
   3.100 +Copyright (c) 2009-2013, Attila Szegedi
   3.101 +
   3.102 +All rights reserved.Redistribution and use in source and binary forms, with or
   3.103 +without modification, are permitted provided that the following conditions are
   3.104 +met:* Redistributions of source code must retain the above copyright notice,
   3.105 +this list of conditions and the following disclaimer.  * Redistributions in
   3.106 +binary form must reproduce the above copyright notice,   this list of
   3.107 +conditions and the following disclaimer in the documentation  and/or other
   3.108 +materials provided with the distribution.  * Neither the name of Attila
   3.109 +Szegedi nor the names of its contributors may be used to endorse or promote
   3.110 +products derived from this software without specific prior written permission.
   3.111 +
   3.112 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"AND
   3.113 +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
   3.114 +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   3.115 +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
   3.116 +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   3.117 +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   3.118 +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   3.119 +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   3.120 +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
   3.121 +OF THIS SOFTWARE, EVEN IF ADVISED OF THEPOSSIBILITY OF SUCH DAMAGE.
   3.122 +
   3.123 +--- end of LICENSE ---
   3.124 +
   3.125 +-------------------------------------------------------------------------------
   3.126 +
   3.127  %% This notice is provided with respect to Elliptic Curve Cryptography, which 
   3.128 -is included with JRE 7, JDK 7, and OpenJDK 7.
   3.129 +may be included with JRE 8, JDK 8, and OpenJDK 8.
   3.130  
   3.131  You are receiving a copy of the Elliptic Curve Cryptography library in source
   3.132 -form with the JDK 7 source distribution and object code in the JRE 7 & JDK 7
   3.133 -runtime.
   3.134 -
   3.135 -The terms of the Oracle license do NOT apply to the Elliptic Curve
   3.136 -Cryptography library program; it is licensed under the following license,
   3.137 -separately from the Oracle programs you receive. If you do not wish to install
   3.138 -this program, you may delete the library named libsunec.so (on Solaris and
   3.139 -Linux systems) or sunec.dll (on Windows systems) from the JRE bin directory
   3.140 -reserved for native libraries.
   3.141 +form with the JDK 8 and OpenJDK 8 source distributions, and as object code in
   3.142 +the JRE 8 & JDK 8 runtimes.
   3.143 +
   3.144 +In the case of the JRE 8 & JDK 8 runtimes, the terms of the Oracle license do
   3.145 +NOT apply to the Elliptic Curve Cryptography library; it is licensed under the
   3.146 +following license, separately from Oracle's JDK & JRE.  If you do not wish to
   3.147 +install the Elliptic Curve Cryptography library, you may delete the library
   3.148 +named libsunec.so (on Solaris and Linux systems) or sunec.dll (on Windows
   3.149 +systems) from the JRE bin directory reserved for native libraries.
   3.150 +
   3.151  
   3.152  --- begin of LICENSE ---
   3.153  
   3.154 @@ -735,13 +802,138 @@
   3.155  
   3.156  -------------------------------------------------------------------------------
   3.157  
   3.158 -%% This notice is provided with respect to FontConfig 2.5, which is 
   3.159 -included with JRE 7, JDK 7, and OpenJDK 7 source distributions on
   3.160 +%% This notice is provided with respect to  ECMAScript Language
   3.161 +Specification ECMA-262 Edition 5.1 which may be included with 
   3.162 +JRE 8, JDK 8, and OpenJDK 8.
   3.163 +
   3.164 +--- begin of LICENSE ---
   3.165 +
   3.166 +Copyright notice
   3.167 +Copyright © 2011 Ecma International
   3.168 +Ecma International
   3.169 +Rue du Rhone 114
   3.170 +CH-1204 Geneva
   3.171 +Tel: +41 22 849 6000
   3.172 +Fax: +41 22 849 6001
   3.173 +Web: http://www.ecma-international.org
   3.174 +
   3.175 +This document and possible translations of it may be copied and furnished to
   3.176 +others, and derivative works that comment on or otherwise explain it or assist
   3.177 +in its implementation may be prepared, copied, published, and distributed, in
   3.178 +whole or in part, without restriction of any kind, provided that the above
   3.179 +copyright notice and this section are included on all such copies and derivative
   3.180 +works. However, this document itself may not be modified in any way, including
   3.181 +by removing the copyright notice or references to Ecma International, except as
   3.182 +needed for the purpose of developing any document or deliverable produced by
   3.183 +Ecma International (in which case the rules applied to copyrights must be
   3.184 +followed) or as required to translate it into languages other than English. The
   3.185 +limited permissions granted above are perpetual and will not be revoked by Ecma
   3.186 +International or its successors or assigns. This document and the information
   3.187 +contained herein is provided on an "AS IS" basis and ECMA INTERNATIONAL
   3.188 +DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
   3.189 +WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP
   3.190 +RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
   3.191 +PURPOSE." Software License
   3.192 +
   3.193 +All Software contained in this document ("Software)" is protected by copyright
   3.194 +and is being made available under the "BSD License", included below. This
   3.195 +Software may be subject to third party rights (rights from parties other than
   3.196 +Ecma International), including patent rights, and no licenses under such third
   3.197 +party rights are granted under this license even if the third party concerned is
   3.198 +a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS
   3.199 +AVAILABLE AT http://www.ecma-international.org/memento/codeofconduct.htm FOR
   3.200 +INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO
   3.201 +IMPLEMENT ECMA INTERNATIONAL STANDARDS*. Redistribution and use in source and
   3.202 +binary forms, with or without modification, are permitted provided that the
   3.203 +following conditions are met:
   3.204 +
   3.205 +1. Redistributions of source code must retain the above copyright notice, this
   3.206 +list of conditions and the following disclaimer.
   3.207 +
   3.208 +2. Redistributions in binary form must reproduce the above copyright notice,
   3.209 +this list of conditions and the following disclaimer in the documentation and/or
   3.210 +other materials provided with the distribution.
   3.211 +
   3.212 +3. Neither the name of the authors nor Ecma International may be used to endorse
   3.213 +or promote products derived from this software without specific prior written
   3.214 +permission.
   3.215 +
   3.216 +THIS SOFTWARE IS PROVIDED BY THE ECMA INTERNATIONAL "AS IS" AND ANY EXPRESS OR
   3.217 +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
   3.218 +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
   3.219 +SHALL ECMA INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   3.220 +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
   3.221 +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
   3.222 +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   3.223 +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
   3.224 +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
   3.225 +OF SUCH DAMAGE.
   3.226 +--- end of LICENSE ---
   3.227 +
   3.228 +%% This notice is provided with respect to Dynalink library which is included
   3.229 +with the Nashorn technology.
   3.230 +
   3.231 +--- begin of LICENSE ---
   3.232 +Copyright (c) 2009-2013, Attila Szegedi
   3.233 +
   3.234 +Redistribution and use in source and binary forms, with or without
   3.235 +modification, are permitted provided that the following conditions are
   3.236 +met:
   3.237 +* Redistributions of source code must retain the above copyright
   3.238 +  notice, this list of conditions and the following disclaimer.
   3.239 +* Redistributions in binary form must reproduce the above copyright
   3.240 +  notice, this list of conditions and the following disclaimer in the
   3.241 +  documentation and/or other materials provided with the distribution.
   3.242 +* Neither the name of the copyright holder nor the names of
   3.243 +  contributors may be used to endorse or promote products derived from
   3.244 +  this software without specific prior written permission.
   3.245 +
   3.246 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
   3.247 +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   3.248 +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
   3.249 +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
   3.250 +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   3.251 +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   3.252 +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
   3.253 +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
   3.254 +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
   3.255 +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
   3.256 +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   3.257 +--- end of LICENSE ---
   3.258 +
   3.259 +%% This notice is provided with respect to Joni library which is included
   3.260 +with the Nashorn technology.
   3.261 +
   3.262 +--- begin of LICENSE ---
   3.263 +Permission is hereby granted, free of charge, to any person obtaining a copy of
   3.264 +this software and associated documentation files (the "Software"), to deal in
   3.265 +the Software without restriction, including without limitation the rights to
   3.266 +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
   3.267 +of the Software, and to permit persons to whom the Software is furnished to do
   3.268 +so, subject to the following conditions:
   3.269 +
   3.270 +The above copyright notice and this permission notice shall be included in all
   3.271 +copies or substantial portions of the Software.
   3.272 +
   3.273 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   3.274 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   3.275 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   3.276 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   3.277 +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   3.278 +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
   3.279 +SOFTWARE.
   3.280 +
   3.281 +--- end of LICENSE ---
   3.282 +
   3.283 +-------------------------------------------------------------------------------
   3.284 +
   3.285 +%% This notice is provided with respect to FontConfig 2.5, which may be 
   3.286 +included with JRE 8, JDK 8, and OpenJDK 8 source distributions on
   3.287  Linux and Solaris.
   3.288  
   3.289  --- begin of LICENSE ---
   3.290  
   3.291 -Copyright © 2001,2003 Keith Packard
   3.292 +Copyright © 2001,2003 Keith Packard
   3.293  
   3.294  Permission to use, copy, modify, distribute, and sell this software and its
   3.295  documentation for any purpose is hereby granted without fee, provided that the
   3.296 @@ -765,7 +957,7 @@
   3.297  -------------------------------------------------------------------------------
   3.298  
   3.299  %% This notice is provided with respect to IAIK PKCS#11 Wrapper, 
   3.300 -which is included with JRE 7, JDK 7, and OpenJDK 7.
   3.301 +which may be included with JRE 8, JDK 8, and OpenJDK 8.
   3.302  
   3.303  --- begin of LICENSE ---
   3.304  
   3.305 @@ -816,7 +1008,7 @@
   3.306  -------------------------------------------------------------------------------
   3.307  
   3.308  %% This notice is provided with respect to ICU4C 4.0.1 and ICU4J 4.4, which 
   3.309 -is included with JRE 7, JDK 7, and OpenJDK 7.
   3.310 +may be included with JRE 8, JDK 8, and OpenJDK 8.
   3.311  
   3.312  --- begin of LICENSE ---
   3.313  
   3.314 @@ -852,8 +1044,8 @@
   3.315  
   3.316  -------------------------------------------------------------------------------
   3.317  
   3.318 -%% This notice is provided with respect to IJG JPEG 6b, which is 
   3.319 -included with JRE 7, JDK 7, and OpenJDK 7.
   3.320 +%% This notice is provided with respect to IJG JPEG 6b, which may be 
   3.321 +included with JRE 8, JDK 8, and OpenJDK 8.
   3.322  
   3.323  --- begin of LICENSE ---
   3.324  
   3.325 @@ -891,8 +1083,35 @@
   3.326  
   3.327  --------------------------------------------------------------------------------
   3.328  
   3.329 -%% This notice is provided with respect to JOpt-Simple v3.0,  which is 
   3.330 -included with JRE 7, JDK 7, and OpenJDK 7.
   3.331 +%% This notice is provided with respect to Joni v1.1.9, which may be 
   3.332 +included with JRE 8, JDK 8, and OpenJDK 8.
   3.333 +
   3.334 +--- begin of LICENSE ---
   3.335 +
   3.336 +Permission is hereby granted, free of charge, to any person obtaining a copy
   3.337 +of this software and associated documentation files (the "Software"), to deal
   3.338 +in the Software without restriction, including without limitation the rights
   3.339 +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   3.340 +copies of the Software, and to permit persons to whom the Software is
   3.341 +furnished to do so, subject to the following conditions:
   3.342 +
   3.343 +The above copyright notice and this permission notice shall be included in all
   3.344 +copies or substantial portions of the Software.
   3.345 +
   3.346 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   3.347 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   3.348 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   3.349 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   3.350 +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   3.351 +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
   3.352 +SOFTWARE.
   3.353 +
   3.354 +--- end of LICENSE ---
   3.355 +
   3.356 +-------------------------------------------------------------------------------
   3.357 +
   3.358 +%% This notice is provided with respect to JOpt-Simple v3.0,  which may be 
   3.359 +included with JRE 8, JDK 8, and OpenJDK 8.
   3.360  
   3.361  --- begin of LICENSE ---
   3.362  
   3.363 @@ -921,8 +1140,39 @@
   3.364  
   3.365  --------------------------------------------------------------------------------
   3.366  
   3.367 +%% This notice is provided with respect to JSON, which may be included 
   3.368 +with JRE 8 & JDK 8.
   3.369 +
   3.370 +--- begin of LICENSE ---
   3.371 +
   3.372 +Copyright (c) 2002 JSON.org
   3.373 +
   3.374 +Permission is hereby granted, free of charge, to any person obtaining a copy
   3.375 +of this software and associated documentation files (the "Software"), to deal
   3.376 +in the Software without restriction, including without limitation the rights
   3.377 +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   3.378 +copies of the Software, and to permit persons to whom the Software is
   3.379 +furnished to do so, subject to the following conditions:
   3.380 +
   3.381 +The above copyright notice and this permission notice shall be included in all
   3.382 +copies or substantial portions of the Software.
   3.383 +
   3.384 +The Software shall be used for Good, not Evil.
   3.385 +
   3.386 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   3.387 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   3.388 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   3.389 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   3.390 +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   3.391 +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
   3.392 +SOFTWARE.
   3.393 +
   3.394 +--- end of LICENSE ---
   3.395 +
   3.396 +-------------------------------------------------------------------------------
   3.397 +
   3.398  %% This notice is provided with respect to Kerberos functionality, which 
   3.399 -which is included with JRE 7, JDK 7, and OpenJDK 7.
   3.400 +which may be included with JRE 8, JDK 8, and OpenJDK 8.
   3.401  
   3.402  --- begin of LICENSE ---
   3.403  
   3.404 @@ -934,7 +1184,7 @@
   3.405  -------------------------------------------------------------------------------
   3.406  
   3.407  %% This notice is provided with respect to Kerberos functionality from 
   3.408 -FundsXpress, INC., which is included with JRE 7, JDK 7, and OpenJDK 7.
   3.409 +FundsXpress, INC., which may be included with JRE 8, JDK 8, and OpenJDK 8.
   3.410  
   3.411  --- begin of LICENSE ---
   3.412  
   3.413 @@ -967,8 +1217,8 @@
   3.414  
   3.415  -------------------------------------------------------------------------------
   3.416  
   3.417 -%% This notice is provided with respect to Kronos OpenGL headers, which is 
   3.418 -included with JDK 7 and OpenJDK 7 source distributions.
   3.419 +%% This notice is provided with respect to Kronos OpenGL headers, which may be 
   3.420 +included with JDK 8 and OpenJDK 8 source distributions.
   3.421  
   3.422  --- begin of LICENSE ---
   3.423  
   3.424 @@ -1000,8 +1250,8 @@
   3.425  
   3.426  -------------------------------------------------------------------------------
   3.427  
   3.428 -%% This notice is provided with respect to libpng 1.2.18, which is 
   3.429 -included with JRE 7, JDK 7, and OpenJDK 7.
   3.430 +%% This notice is provided with respect to libpng 1.5.4, which may be 
   3.431 +included with JRE 8, JDK 8, and OpenJDK 8.
   3.432  
   3.433  --- begin of LICENSE ---
   3.434  
   3.435 @@ -1014,8 +1264,10 @@
   3.436  If you modify libpng you may insert additional notices immediately following
   3.437  this sentence.
   3.438  
   3.439 -libpng versions 1.2.6, August 15, 2004, through 1.2.18, May 15, 2007, are
   3.440 -Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are
   3.441 +This code is released under the libpng license.
   3.442 +
   3.443 +libpng versions 1.2.6, August 15, 2004, through 1.5.4, July 7, 2011, are
   3.444 +Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
   3.445  distributed according to the same disclaimer and license as libpng-1.2.5
   3.446  with the following individual added to the list of Contributing Authors
   3.447  
   3.448 @@ -1112,14 +1364,14 @@
   3.449  
   3.450  Glenn Randers-Pehrson
   3.451  glennrp at users.sourceforge.net
   3.452 -May 15, 2007
   3.453 +July 7, 2011
   3.454  
   3.455  --- end of LICENSE ---
   3.456  
   3.457  -------------------------------------------------------------------------------
   3.458  
   3.459 -%% This notice is provided with respect to libungif 4.1.3, which is 
   3.460 -included with JRE 7, JDK 7, and OpenJDK 7.
   3.461 +%% This notice is provided with respect to libungif 4.1.3, which may be 
   3.462 +included with JRE 8, JDK 8, and OpenJDK 8.
   3.463  
   3.464  --- begin of LICENSE ---
   3.465  
   3.466 @@ -1147,8 +1399,8 @@
   3.467  
   3.468  -------------------------------------------------------------------------------
   3.469  
   3.470 -%% This notice is provided with respect to Little CMS 2.0, which is 
   3.471 -included with OpenJDK 7.
   3.472 +%% This notice is provided with respect to Little CMS 2.4, which may be 
   3.473 +included with JRE 8, JDK 8, and OpenJDK 8.
   3.474  
   3.475  --- begin of LICENSE ---
   3.476  
   3.477 @@ -1183,7 +1435,7 @@
   3.478  -------------------------------------------------------------------------------
   3.479  
   3.480  %% This notice is provided with respect to Mesa 3D Graphics Library v4.1,
   3.481 -which is included with JRE 7, JDK 7, and OpenJDK 7 source distributions.
   3.482 +which may be included with JRE 8, JDK 8, and OpenJDK 8 source distributions.
   3.483  
   3.484  --- begin of LICENSE ---
   3.485  
   3.486 @@ -1213,8 +1465,402 @@
   3.487  
   3.488  -------------------------------------------------------------------------------
   3.489  
   3.490 +%% This notice is provided with respect to Mozilla Network Security
   3.491 +Services (NSS), which is supplied with the JDK test suite in the OpenJDK
   3.492 +source code repository. It is licensed under Mozilla Public License (MPL),
   3.493 +version 2.0.
   3.494 +
   3.495 +The NSS libraries are supplied in executable form, built from unmodified
   3.496 +NSS source code labeled with the "NSS_3.13.1_RTM" release tag.
   3.497 +
   3.498 +The NSS source code is available in the OpenJDK source code repository at:
   3.499 +    jdk/test/sun/security/pkcs11/nss/src
   3.500 +
   3.501 +The NSS libraries are available in the OpenJDK source code repository at:
   3.502 +    jdk/test/sun/security/pkcs11/nss/lib
   3.503 +
   3.504 +--- begin of LICENSE ---
   3.505 +
   3.506 +Mozilla Public License Version 2.0
   3.507 +==================================
   3.508 +
   3.509 +1. Definitions
   3.510 +--------------
   3.511 +
   3.512 +1.1. "Contributor"
   3.513 +    means each individual or legal entity that creates, contributes to
   3.514 +    the creation of, or owns Covered Software.
   3.515 +
   3.516 +1.2. "Contributor Version"
   3.517 +    means the combination of the Contributions of others (if any) used
   3.518 +    by a Contributor and that particular Contributor's Contribution.
   3.519 +
   3.520 +1.3. "Contribution"
   3.521 +    means Covered Software of a particular Contributor.
   3.522 +
   3.523 +1.4. "Covered Software"
   3.524 +    means Source Code Form to which the initial Contributor has attached
   3.525 +    the notice in Exhibit A, the Executable Form of such Source Code
   3.526 +    Form, and Modifications of such Source Code Form, in each case
   3.527 +    including portions thereof.
   3.528 +
   3.529 +1.5. "Incompatible With Secondary Licenses"
   3.530 +    means
   3.531 +
   3.532 +    (a) that the initial Contributor has attached the notice described
   3.533 +        in Exhibit B to the Covered Software; or
   3.534 +
   3.535 +    (b) that the Covered Software was made available under the terms of
   3.536 +        version 1.1 or earlier of the License, but not also under the
   3.537 +        terms of a Secondary License.
   3.538 +
   3.539 +1.6. "Executable Form"
   3.540 +    means any form of the work other than Source Code Form.
   3.541 +
   3.542 +1.7. "Larger Work"
   3.543 +    means a work that combines Covered Software with other material, in 
   3.544 +    a separate file or files, that is not Covered Software.
   3.545 +
   3.546 +1.8. "License"
   3.547 +    means this document.
   3.548 +
   3.549 +1.9. "Licensable"
   3.550 +    means having the right to grant, to the maximum extent possible,
   3.551 +    whether at the time of the initial grant or subsequently, any and
   3.552 +    all of the rights conveyed by this License.
   3.553 +
   3.554 +1.10. "Modifications"
   3.555 +    means any of the following:
   3.556 +
   3.557 +    (a) any file in Source Code Form that results from an addition to,
   3.558 +        deletion from, or modification of the contents of Covered
   3.559 +        Software; or
   3.560 +
   3.561 +    (b) any new file in Source Code Form that contains any Covered
   3.562 +        Software.
   3.563 +
   3.564 +1.11. "Patent Claims" of a Contributor
   3.565 +    means any patent claim(s), including without limitation, method,
   3.566 +    process, and apparatus claims, in any patent Licensable by such
   3.567 +    Contributor that would be infringed, but for the grant of the
   3.568 +    License, by the making, using, selling, offering for sale, having
   3.569 +    made, import, or transfer of either its Contributions or its
   3.570 +    Contributor Version.
   3.571 +
   3.572 +1.12. "Secondary License"
   3.573 +    means either the GNU General Public License, Version 2.0, the GNU
   3.574 +    Lesser General Public License, Version 2.1, the GNU Affero General
   3.575 +    Public License, Version 3.0, or any later versions of those
   3.576 +    licenses.
   3.577 +
   3.578 +1.13. "Source Code Form"
   3.579 +    means the form of the work preferred for making modifications.
   3.580 +
   3.581 +1.14. "You" (or "Your")
   3.582 +    means an individual or a legal entity exercising rights under this
   3.583 +    License. For legal entities, "You" includes any entity that
   3.584 +    controls, is controlled by, or is under common control with You. For
   3.585 +    purposes of this definition, "control" means (a) the power, direct
   3.586 +    or indirect, to cause the direction or management of such entity,
   3.587 +    whether by contract or otherwise, or (b) ownership of more than
   3.588 +    fifty percent (50%) of the outstanding shares or beneficial
   3.589 +    ownership of such entity.
   3.590 +
   3.591 +2. License Grants and Conditions
   3.592 +--------------------------------
   3.593 +
   3.594 +2.1. Grants
   3.595 +
   3.596 +Each Contributor hereby grants You a world-wide, royalty-free,
   3.597 +non-exclusive license:
   3.598 +
   3.599 +(a) under intellectual property rights (other than patent or trademark)
   3.600 +    Licensable by such Contributor to use, reproduce, make available,
   3.601 +    modify, display, perform, distribute, and otherwise exploit its
   3.602 +    Contributions, either on an unmodified basis, with Modifications, or
   3.603 +    as part of a Larger Work; and
   3.604 +
   3.605 +(b) under Patent Claims of such Contributor to make, use, sell, offer
   3.606 +    for sale, have made, import, and otherwise transfer either its
   3.607 +    Contributions or its Contributor Version.
   3.608 +
   3.609 +2.2. Effective Date
   3.610 +
   3.611 +The licenses granted in Section 2.1 with respect to any Contribution
   3.612 +become effective for each Contribution on the date the Contributor first
   3.613 +distributes such Contribution.
   3.614 +
   3.615 +2.3. Limitations on Grant Scope
   3.616 +
   3.617 +The licenses granted in this Section 2 are the only rights granted under
   3.618 +this License. No additional rights or licenses will be implied from the
   3.619 +distribution or licensing of Covered Software under this License.
   3.620 +Notwithstanding Section 2.1(b) above, no patent license is granted by a
   3.621 +Contributor:
   3.622 +
   3.623 +(a) for any code that a Contributor has removed from Covered Software;
   3.624 +    or
   3.625 +
   3.626 +(b) for infringements caused by: (i) Your and any other third party's
   3.627 +    modifications of Covered Software, or (ii) the combination of its
   3.628 +    Contributions with other software (except as part of its Contributor
   3.629 +    Version); or
   3.630 +
   3.631 +(c) under Patent Claims infringed by Covered Software in the absence of
   3.632 +    its Contributions.
   3.633 +
   3.634 +This License does not grant any rights in the trademarks, service marks,
   3.635 +or logos of any Contributor (except as may be necessary to comply with
   3.636 +the notice requirements in Section 3.4).
   3.637 +
   3.638 +2.4. Subsequent Licenses
   3.639 +
   3.640 +No Contributor makes additional grants as a result of Your choice to
   3.641 +distribute the Covered Software under a subsequent version of this
   3.642 +License (see Section 10.2) or under the terms of a Secondary License (if
   3.643 +permitted under the terms of Section 3.3).
   3.644 +
   3.645 +2.5. Representation
   3.646 +
   3.647 +Each Contributor represents that the Contributor believes its
   3.648 +Contributions are its original creation(s) or it has sufficient rights
   3.649 +to grant the rights to its Contributions conveyed by this License.
   3.650 +
   3.651 +2.6. Fair Use
   3.652 +
   3.653 +This License is not intended to limit any rights You have under
   3.654 +applicable copyright doctrines of fair use, fair dealing, or other
   3.655 +equivalents.
   3.656 +
   3.657 +2.7. Conditions
   3.658 +
   3.659 +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
   3.660 +in Section 2.1.
   3.661 +
   3.662 +3. Responsibilities
   3.663 +-------------------
   3.664 +
   3.665 +3.1. Distribution of Source Form
   3.666 +
   3.667 +All distribution of Covered Software in Source Code Form, including any
   3.668 +Modifications that You create or to which You contribute, must be under
   3.669 +the terms of this License. You must inform recipients that the Source
   3.670 +Code Form of the Covered Software is governed by the terms of this
   3.671 +License, and how they can obtain a copy of this License. You may not
   3.672 +attempt to alter or restrict the recipients' rights in the Source Code
   3.673 +Form.
   3.674 +
   3.675 +3.2. Distribution of Executable Form
   3.676 +
   3.677 +If You distribute Covered Software in Executable Form then:
   3.678 +
   3.679 +(a) such Covered Software must also be made available in Source Code
   3.680 +    Form, as described in Section 3.1, and You must inform recipients of
   3.681 +    the Executable Form how they can obtain a copy of such Source Code
   3.682 +    Form by reasonable means in a timely manner, at a charge no more
   3.683 +    than the cost of distribution to the recipient; and
   3.684 +
   3.685 +(b) You may distribute such Executable Form under the terms of this
   3.686 +    License, or sublicense it under different terms, provided that the
   3.687 +    license for the Executable Form does not attempt to limit or alter
   3.688 +    the recipients' rights in the Source Code Form under this License.
   3.689 +
   3.690 +3.3. Distribution of a Larger Work
   3.691 +
   3.692 +You may create and distribute a Larger Work under terms of Your choice,
   3.693 +provided that You also comply with the requirements of this License for
   3.694 +the Covered Software. If the Larger Work is a combination of Covered
   3.695 +Software with a work governed by one or more Secondary Licenses, and the
   3.696 +Covered Software is not Incompatible With Secondary Licenses, this
   3.697 +License permits You to additionally distribute such Covered Software
   3.698 +under the terms of such Secondary License(s), so that the recipient of
   3.699 +the Larger Work may, at their option, further distribute the Covered
   3.700 +Software under the terms of either this License or such Secondary
   3.701 +License(s).
   3.702 +
   3.703 +3.4. Notices
   3.704 +
   3.705 +You may not remove or alter the substance of any license notices
   3.706 +(including copyright notices, patent notices, disclaimers of warranty,
   3.707 +or limitations of liability) contained within the Source Code Form of
   3.708 +the Covered Software, except that You may alter any license notices to
   3.709 +the extent required to remedy known factual inaccuracies.
   3.710 +
   3.711 +3.5. Application of Additional Terms
   3.712 +
   3.713 +You may choose to offer, and to charge a fee for, warranty, support,
   3.714 +indemnity or liability obligations to one or more recipients of Covered
   3.715 +Software. However, You may do so only on Your own behalf, and not on
   3.716 +behalf of any Contributor. You must make it absolutely clear that any
   3.717 +such warranty, support, indemnity, or liability obligation is offered by
   3.718 +You alone, and You hereby agree to indemnify every Contributor for any
   3.719 +liability incurred by such Contributor as a result of warranty, support,
   3.720 +indemnity or liability terms You offer. You may include additional
   3.721 +disclaimers of warranty and limitations of liability specific to any
   3.722 +jurisdiction.
   3.723 +
   3.724 +4. Inability to Comply Due to Statute or Regulation
   3.725 +---------------------------------------------------
   3.726 +
   3.727 +If it is impossible for You to comply with any of the terms of this
   3.728 +License with respect to some or all of the Covered Software due to
   3.729 +statute, judicial order, or regulation then You must: (a) comply with
   3.730 +the terms of this License to the maximum extent possible; and (b)
   3.731 +describe the limitations and the code they affect. Such description must
   3.732 +be placed in a text file included with all distributions of the Covered
   3.733 +Software under this License. Except to the extent prohibited by statute
   3.734 +or regulation, such description must be sufficiently detailed for a
   3.735 +recipient of ordinary skill to be able to understand it.
   3.736 +
   3.737 +5. Termination
   3.738 +--------------
   3.739 +
   3.740 +5.1. The rights granted under this License will terminate automatically
   3.741 +if You fail to comply with any of its terms. However, if You become
   3.742 +compliant, then the rights granted under this License from a particular
   3.743 +Contributor are reinstated (a) provisionally, unless and until such
   3.744 +Contributor explicitly and finally terminates Your grants, and (b) on an
   3.745 +ongoing basis, if such Contributor fails to notify You of the
   3.746 +non-compliance by some reasonable means prior to 60 days after You have
   3.747 +come back into compliance. Moreover, Your grants from a particular
   3.748 +Contributor are reinstated on an ongoing basis if such Contributor
   3.749 +notifies You of the non-compliance by some reasonable means, this is the
   3.750 +first time You have received notice of non-compliance with this License
   3.751 +from such Contributor, and You become compliant prior to 30 days after
   3.752 +Your receipt of the notice.
   3.753 +
   3.754 +5.2. If You initiate litigation against any entity by asserting a patent
   3.755 +infringement claim (excluding declaratory judgment actions,
   3.756 +counter-claims, and cross-claims) alleging that a Contributor Version
   3.757 +directly or indirectly infringes any patent, then the rights granted to
   3.758 +You by any and all Contributors for the Covered Software under Section
   3.759 +2.1 of this License shall terminate.
   3.760 +
   3.761 +5.3. In the event of termination under Sections 5.1 or 5.2 above, all
   3.762 +end user license agreements (excluding distributors and resellers) which
   3.763 +have been validly granted by You or Your distributors under this License
   3.764 +prior to termination shall survive termination.
   3.765 +
   3.766 +************************************************************************
   3.767 +*                                                                      *
   3.768 +*  6. Disclaimer of Warranty                                           *
   3.769 +*  -------------------------                                           *
   3.770 +*                                                                      *
   3.771 +*  Covered Software is provided under this License on an "as is"       *
   3.772 +*  basis, without warranty of any kind, either expressed, implied, or  *
   3.773 +*  statutory, including, without limitation, warranties that the       *
   3.774 +*  Covered Software is free of defects, merchantable, fit for a        *
   3.775 +*  particular purpose or non-infringing. The entire risk as to the     *
   3.776 +*  quality and performance of the Covered Software is with You.        *
   3.777 +*  Should any Covered Software prove defective in any respect, You     *
   3.778 +*  (not any Contributor) assume the cost of any necessary servicing,   *
   3.779 +*  repair, or correction. This disclaimer of warranty constitutes an   *
   3.780 +*  essential part of this License. No use of any Covered Software is   *
   3.781 +*  authorized under this License except under this disclaimer.         *
   3.782 +*                                                                      *
   3.783 +************************************************************************
   3.784 +
   3.785 +************************************************************************
   3.786 +*                                                                      *
   3.787 +*  7. Limitation of Liability                                          *
   3.788 +*  --------------------------                                          *
   3.789 +*                                                                      *
   3.790 +*  Under no circumstances and under no legal theory, whether tort      *
   3.791 +*  (including negligence), contract, or otherwise, shall any           *
   3.792 +*  Contributor, or anyone who distributes Covered Software as          *
   3.793 +*  permitted above, be liable to You for any direct, indirect,         *
   3.794 +*  special, incidental, or consequential damages of any character      *
   3.795 +*  including, without limitation, damages for lost profits, loss of    *
   3.796 +*  goodwill, work stoppage, computer failure or malfunction, or any    *
   3.797 +*  and all other commercial damages or losses, even if such party      *
   3.798 +*  shall have been informed of the possibility of such damages. This   *
   3.799 +*  limitation of liability shall not apply to liability for death or   *
   3.800 +*  personal injury resulting from such party's negligence to the       *
   3.801 +*  extent applicable law prohibits such limitation. Some               *
   3.802 +*  jurisdictions do not allow the exclusion or limitation of           *
   3.803 +*  incidental or consequential damages, so this exclusion and          *
   3.804 +*  limitation may not apply to You.                                    *
   3.805 +*                                                                      *
   3.806 +************************************************************************
   3.807 +
   3.808 +8. Litigation
   3.809 +-------------
   3.810 +
   3.811 +Any litigation relating to this License may be brought only in the
   3.812 +courts of a jurisdiction where the defendant maintains its principal
   3.813 +place of business and such litigation shall be governed by laws of that
   3.814 +jurisdiction, without reference to its conflict-of-law provisions.
   3.815 +Nothing in this Section shall prevent a party's ability to bring
   3.816 +cross-claims or counter-claims.
   3.817 +
   3.818 +9. Miscellaneous
   3.819 +----------------
   3.820 +
   3.821 +This License represents the complete agreement concerning the subject
   3.822 +matter hereof. If any provision of this License is held to be
   3.823 +unenforceable, such provision shall be reformed only to the extent
   3.824 +necessary to make it enforceable. Any law or regulation which provides
   3.825 +that the language of a contract shall be construed against the drafter
   3.826 +shall not be used to construe this License against a Contributor.
   3.827 +
   3.828 +10. Versions of the License
   3.829 +---------------------------
   3.830 +
   3.831 +10.1. New Versions
   3.832 +
   3.833 +Mozilla Foundation is the license steward. Except as provided in Section
   3.834 +10.3, no one other than the license steward has the right to modify or
   3.835 +publish new versions of this License. Each version will be given a
   3.836 +distinguishing version number.
   3.837 +
   3.838 +10.2. Effect of New Versions
   3.839 +
   3.840 +You may distribute the Covered Software under the terms of the version
   3.841 +of the License under which You originally received the Covered Software,
   3.842 +or under the terms of any subsequent version published by the license
   3.843 +steward.
   3.844 +
   3.845 +10.3. Modified Versions
   3.846 +
   3.847 +If you create software not governed by this License, and you want to
   3.848 +create a new license for such software, you may create and use a
   3.849 +modified version of this License if you rename the license and remove
   3.850 +any references to the name of the license steward (except to note that
   3.851 +such modified license differs from this License).
   3.852 +
   3.853 +10.4. Distributing Source Code Form that is Incompatible With Secondary
   3.854 +Licenses
   3.855 +
   3.856 +If You choose to distribute Source Code Form that is Incompatible With
   3.857 +Secondary Licenses under the terms of this version of the License, the
   3.858 +notice described in Exhibit B of this License must be attached.
   3.859 +
   3.860 +Exhibit A - Source Code Form License Notice
   3.861 +-------------------------------------------
   3.862 +
   3.863 +  This Source Code Form is subject to the terms of the Mozilla Public
   3.864 +  License, v. 2.0. If a copy of the MPL was not distributed with this
   3.865 +  file, You can obtain one at http://mozilla.org/MPL/2.0/.
   3.866 +
   3.867 +If it is not possible or desirable to put the notice in a particular
   3.868 +file, then You may include the notice in a location (such as a LICENSE
   3.869 +file in a relevant directory) where a recipient would be likely to look
   3.870 +for such a notice.
   3.871 +
   3.872 +You may add additional accurate notices of copyright ownership.
   3.873 +
   3.874 +Exhibit B - "Incompatible With Secondary Licenses" Notice
   3.875 +---------------------------------------------------------
   3.876 +
   3.877 +  This Source Code Form is "Incompatible With Secondary Licenses", as
   3.878 +  defined by the Mozilla Public License, v. 2.0.
   3.879 +
   3.880 +--- end of LICENSE ---
   3.881 +
   3.882 +-------------------------------------------------------------------------------
   3.883 +
   3.884  %% This notice is provided with respect to PC/SC Lite for Suse Linux v.1.1.1,
   3.885 -which is included with JRE 7, JDK 7, and OpenJDK 7 on Linux and Solaris.
   3.886 +which may be included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris.
   3.887  
   3.888  --- begin of LICENSE ---
   3.889  
   3.890 @@ -1257,8 +1903,30 @@
   3.891  
   3.892  -------------------------------------------------------------------------------
   3.893  
   3.894 +%% This notice is provided with respect to PorterStemmer v4, which may be 
   3.895 +included with JRE 8, JDK 8, and OpenJDK 8.
   3.896 +
   3.897 +--- begin of LICENSE ---
   3.898 +
   3.899 +See: http://tartarus.org/~martin/PorterStemmer
   3.900 +
   3.901 +The software is completely free for any purpose, unless notes at the head of
   3.902 +the program text indicates otherwise (which is rare). In any case, the notes
   3.903 +about licensing are never more restrictive than the BSD License.
   3.904 +
   3.905 +In every case where the software is not written by me (Martin Porter), this
   3.906 +licensing arrangement has been endorsed by the contributor, and it is
   3.907 +therefore unnecessary to ask the contributor again to confirm it.
   3.908 +
   3.909 +I have not asked any contributors (or their employers, if they have them) for
   3.910 +proofs that they have the right to distribute their software in this way.
   3.911 +
   3.912 +--- end of LICENSE ---
   3.913 +
   3.914 +-------------------------------------------------------------------------------
   3.915 +
   3.916  %% This notice is provided with respect to Relax NG Object/Parser v.20050510,
   3.917 -which is included with JRE 7, JDK 7, and OpenJDK 7.
   3.918 +which may be included with JRE 8, JDK 8, and OpenJDK 8.
   3.919  
   3.920  --- begin of LICENSE ---
   3.921  
   3.922 @@ -1285,8 +1953,8 @@
   3.923  
   3.924  -------------------------------------------------------------------------------
   3.925  
   3.926 -%% This notice is provided with respect to RelaxNGCC v1.12, which is 
   3.927 -included with JRE 7, JDK 7, and OpenJDK 7.
   3.928 +%% This notice is provided with respect to RelaxNGCC v1.12, which may be 
   3.929 +included with JRE 8, JDK 8, and OpenJDK 8.
   3.930  
   3.931  --- begin of LICENSE ---
   3.932  
   3.933 @@ -1335,487 +2003,8 @@
   3.934  
   3.935  -------------------------------------------------------------------------------
   3.936  
   3.937 -%% This notice is provided with respect to Mozilla Rhino v1.7R3, which 
   3.938 -is included with JRE 7, JDK 7, and OpenJDK 7
   3.939 -
   3.940 ---- begin of LICENSE ---
   3.941 -
   3.942 -                          MOZILLA PUBLIC LICENSE
   3.943 -                                Version 1.1
   3.944 -
   3.945 -                              ---------------
   3.946 -
   3.947 -1. Definitions.
   3.948 -
   3.949 -     1.0.1. "Commercial Use" means distribution or otherwise making the
   3.950 -     Covered Code available to a third party.
   3.951 -
   3.952 -     1.1. "Contributor" means each entity that creates or contributes to
   3.953 -     the creation of Modifications.
   3.954 -
   3.955 -     1.2. "Contributor Version" means the combination of the Original
   3.956 -     Code, prior Modifications used by a Contributor, and the Modifications
   3.957 -     made by that particular Contributor.
   3.958 -
   3.959 -     1.3. "Covered Code" means the Original Code or Modifications or the
   3.960 -     combination of the Original Code and Modifications, in each case
   3.961 -     including portions thereof.
   3.962 -
   3.963 -     1.4. "Electronic Distribution Mechanism" means a mechanism generally
   3.964 -     accepted in the software development community for the electronic
   3.965 -     transfer of data.
   3.966 -
   3.967 -     1.5. "Executable" means Covered Code in any form other than Source
   3.968 -     Code.
   3.969 -
   3.970 -     1.6. "Initial Developer" means the individual or entity identified
   3.971 -     as the Initial Developer in the Source Code notice required by Exhibit
   3.972 -     A.
   3.973 -
   3.974 -     1.7. "Larger Work" means a work which combines Covered Code or
   3.975 -     portions thereof with code not governed by the terms of this License.
   3.976 -
   3.977 -     1.8. "License" means this document.
   3.978 -
   3.979 -     1.8.1. "Licensable" means having the right to grant, to the maximum
   3.980 -     extent possible, whether at the time of the initial grant or
   3.981 -     subsequently acquired, any and all of the rights conveyed herein.
   3.982 -
   3.983 -     1.9. "Modifications" means any addition to or deletion from the
   3.984 -     substance or structure of either the Original Code or any previous
   3.985 -     Modifications. When Covered Code is released as a series of files, a
   3.986 -     Modification is:
   3.987 -          A. Any addition to or deletion from the contents of a file
   3.988 -          containing Original Code or previous Modifications.
   3.989 -
   3.990 -          B. Any new file that contains any part of the Original Code or
   3.991 -          previous Modifications.
   3.992 -
   3.993 -     1.10. "Original Code" means Source Code of computer software code
   3.994 -     which is described in the Source Code notice required by Exhibit A as
   3.995 -     Original Code, and which, at the time of its release under this
   3.996 -     License is not already Covered Code governed by this License.
   3.997 -
   3.998 -     1.10.1. "Patent Claims" means any patent claim(s), now owned or
   3.999 -     hereafter acquired, including without limitation,  method, process,
  3.1000 -     and apparatus claims, in any patent Licensable by grantor.
  3.1001 -
  3.1002 -     1.11. "Source Code" means the preferred form of the Covered Code for
  3.1003 -     making modifications to it, including all modules it contains, plus
  3.1004 -     any associated interface definition files, scripts used to control
  3.1005 -     compilation and installation of an Executable, or source code
  3.1006 -     differential comparisons against either the Original Code or another
  3.1007 -     well known, available Covered Code of the Contributor's choice. The
  3.1008 -     Source Code can be in a compressed or archival form, provided the
  3.1009 -     appropriate decompression or de-archiving software is widely available
  3.1010 -     for no charge.
  3.1011 -
  3.1012 -     1.12. "You" (or "Your")  means an individual or a legal entity
  3.1013 -     exercising rights under, and complying with all of the terms of, this
  3.1014 -     License or a future version of this License issued under Section 6.1.
  3.1015 -     For legal entities, "You" includes any entity which controls, is
  3.1016 -     controlled by, or is under common control with You. For purposes of
  3.1017 -     this definition, "control" means (a) the power, direct or indirect,
  3.1018 -     to cause the direction or management of such entity, whether by
  3.1019 -     contract or otherwise, or (b) ownership of more than fifty percent
  3.1020 -     (50%) of the outstanding shares or beneficial ownership of such
  3.1021 -     entity.
  3.1022 -
  3.1023 -2. Source Code License.
  3.1024 -
  3.1025 -     2.1. The Initial Developer Grant.
  3.1026 -     The Initial Developer hereby grants You a world-wide, royalty-free,
  3.1027 -     non-exclusive license, subject to third party intellectual property
  3.1028 -     claims:
  3.1029 -          (a)  under intellectual property rights (other than patent or
  3.1030 -          trademark) Licensable by Initial Developer to use, reproduce,
  3.1031 -          modify, display, perform, sublicense and distribute the Original
  3.1032 -          Code (or portions thereof) with or without Modifications, and/or
  3.1033 -          as part of a Larger Work; and
  3.1034 -
  3.1035 -          (b) under Patents Claims infringed by the making, using or
  3.1036 -          selling of Original Code, to make, have made, use, practice,
  3.1037 -          sell, and offer for sale, and/or otherwise dispose of the
  3.1038 -          Original Code (or portions thereof).
  3.1039 -
  3.1040 -          (c) the licenses granted in this Section 2.1(a) and (b) are
  3.1041 -          effective on the date Initial Developer first distributes
  3.1042 -          Original Code under the terms of this License.
  3.1043 -
  3.1044 -          (d) Notwithstanding Section 2.1(b) above, no patent license is
  3.1045 -          granted: 1) for code that You delete from the Original Code; 2)
  3.1046 -          separate from the Original Code;  or 3) for infringements caused
  3.1047 -          by: i) the modification of the Original Code or ii) the
  3.1048 -          combination of the Original Code with other software or devices.
  3.1049 -
  3.1050 -     2.2. Contributor Grant.
  3.1051 -     Subject to third party intellectual property claims, each Contributor
  3.1052 -     hereby grants You a world-wide, royalty-free, non-exclusive license
  3.1053 -
  3.1054 -          (a)  under intellectual property rights (other than patent or
  3.1055 -          trademark) Licensable by Contributor, to use, reproduce, modify,
  3.1056 -          display, perform, sublicense and distribute the Modifications
  3.1057 -          created by such Contributor (or portions thereof) either on an
  3.1058 -          unmodified basis, with other Modifications, as Covered Code
  3.1059 -          and/or as part of a Larger Work; and
  3.1060 -
  3.1061 -          (b) under Patent Claims infringed by the making, using, or
  3.1062 -          selling of  Modifications made by that Contributor either alone
  3.1063 -          and/or in combination with its Contributor Version (or portions
  3.1064 -          of such combination), to make, use, sell, offer for sale, have
  3.1065 -          made, and/or otherwise dispose of: 1) Modifications made by that
  3.1066 -          Contributor (or portions thereof); and 2) the combination of
  3.1067 -          Modifications made by that Contributor with its Contributor
  3.1068 -          Version (or portions of such combination).
  3.1069 -
  3.1070 -          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
  3.1071 -          effective on the date Contributor first makes Commercial Use of
  3.1072 -          the Covered Code.
  3.1073 -
  3.1074 -          (d)    Notwithstanding Section 2.2(b) above, no patent license is
  3.1075 -          granted: 1) for any code that Contributor has deleted from the
  3.1076 -          Contributor Version; 2)  separate from the Contributor Version;
  3.1077 -          3)  for infringements caused by: i) third party modifications of
  3.1078 -          Contributor Version or ii)  the combination of Modifications made
  3.1079 -          by that Contributor with other software  (except as part of the
  3.1080 -          Contributor Version) or other devices; or 4) under Patent Claims
  3.1081 -          infringed by Covered Code in the absence of Modifications made by
  3.1082 -          that Contributor.
  3.1083 -
  3.1084 -3. Distribution Obligations.
  3.1085 -
  3.1086 -     3.1. Application of License.
  3.1087 -     The Modifications which You create or to which You contribute are
  3.1088 -     governed by the terms of this License, including without limitation
  3.1089 -     Section 2.2. The Source Code version of Covered Code may be
  3.1090 -     distributed only under the terms of this License or a future version
  3.1091 -     of this License released under Section 6.1, and You must include a
  3.1092 -     copy of this License with every copy of the Source Code You
  3.1093 -     distribute. You may not offer or impose any terms on any Source Code
  3.1094 -     version that alters or restricts the applicable version of this
  3.1095 -     License or the recipients' rights hereunder. However, You may include
  3.1096 -     an additional document offering the additional rights described in
  3.1097 -     Section 3.5.
  3.1098 -
  3.1099 -     3.2. Availability of Source Code.
  3.1100 -     Any Modification which You create or to which You contribute must be
  3.1101 -     made available in Source Code form under the terms of this License
  3.1102 -     either on the same media as an Executable version or via an accepted
  3.1103 -     Electronic Distribution Mechanism to anyone to whom you made an
  3.1104 -     Executable version available; and if made available via Electronic
  3.1105 -     Distribution Mechanism, must remain available for at least twelve (12)
  3.1106 -     months after the date it initially became available, or at least six
  3.1107 -     (6) months after a subsequent version of that particular Modification
  3.1108 -     has been made available to such recipients. You are responsible for
  3.1109 -     ensuring that the Source Code version remains available even if the
  3.1110 -     Electronic Distribution Mechanism is maintained by a third party.
  3.1111 -
  3.1112 -     3.3. Description of Modifications.
  3.1113 -     You must cause all Covered Code to which You contribute to contain a
  3.1114 -     file documenting the changes You made to create that Covered Code and
  3.1115 -     the date of any change. You must include a prominent statement that
  3.1116 -     the Modification is derived, directly or indirectly, from Original
  3.1117 -     Code provided by the Initial Developer and including the name of the
  3.1118 -     Initial Developer in (a) the Source Code, and (b) in any notice in an
  3.1119 -     Executable version or related documentation in which You describe the
  3.1120 -     origin or ownership of the Covered Code.
  3.1121 -
  3.1122 -     3.4. Intellectual Property Matters
  3.1123 -          (a) Third Party Claims.
  3.1124 -          If Contributor has knowledge that a license under a third party's
  3.1125 -          intellectual property rights is required to exercise the rights
  3.1126 -          granted by such Contributor under Sections 2.1 or 2.2,
  3.1127 -          Contributor must include a text file with the Source Code
  3.1128 -          distribution titled "LEGAL" which describes the claim and the
  3.1129 -          party making the claim in sufficient detail that a recipient will
  3.1130 -          know whom to contact. If Contributor obtains such knowledge after
  3.1131 -          the Modification is made available as described in Section 3.2,
  3.1132 -          Contributor shall promptly modify the LEGAL file in all copies
  3.1133 -          Contributor makes available thereafter and shall take other steps
  3.1134 -          (such as notifying appropriate mailing lists or newsgroups)
  3.1135 -          reasonably calculated to inform those who received the Covered
  3.1136 -          Code that new knowledge has been obtained.
  3.1137 -
  3.1138 -          (b) Contributor APIs.
  3.1139 -          If Contributor's Modifications include an application programming
  3.1140 -          interface and Contributor has knowledge of patent licenses which
  3.1141 -          are reasonably necessary to implement that API, Contributor must
  3.1142 -          also include this information in the LEGAL file.
  3.1143 -
  3.1144 -               (c)    Representations.
  3.1145 -          Contributor represents that, except as disclosed pursuant to
  3.1146 -          Section 3.4(a) above, Contributor believes that Contributor's
  3.1147 -          Modifications are Contributor's original creation(s) and/or
  3.1148 -          Contributor has sufficient rights to grant the rights conveyed by
  3.1149 -          this License.
  3.1150 -
  3.1151 -     3.5. Required Notices.
  3.1152 -     You must duplicate the notice in Exhibit A in each file of the Source
  3.1153 -     Code.  If it is not possible to put such notice in a particular Source
  3.1154 -     Code file due to its structure, then You must include such notice in a
  3.1155 -     location (such as a relevant directory) where a user would be likely
  3.1156 -     to look for such a notice.  If You created one or more Modification(s)
  3.1157 -     You may add your name as a Contributor to the notice described in
  3.1158 -     Exhibit A.  You must also duplicate this License in any documentation
  3.1159 -     for the Source Code where You describe recipients' rights or ownership
  3.1160 -     rights relating to Covered Code.  You may choose to offer, and to
  3.1161 -     charge a fee for, warranty, support, indemnity or liability
  3.1162 -     obligations to one or more recipients of Covered Code. However, You
  3.1163 -     may do so only on Your own behalf, and not on behalf of the Initial
  3.1164 -     Developer or any Contributor. You must make it absolutely clear than
  3.1165 -     any such warranty, support, indemnity or liability obligation is
  3.1166 -     offered by You alone, and You hereby agree to indemnify the Initial
  3.1167 -     Developer and every Contributor for any liability incurred by the
  3.1168 -     Initial Developer or such Contributor as a result of warranty,
  3.1169 -     support, indemnity or liability terms You offer.
  3.1170 -
  3.1171 -     3.6. Distribution of Executable Versions.
  3.1172 -     You may distribute Covered Code in Executable form only if the
  3.1173 -     requirements of Section 3.1-3.5 have been met for that Covered Code,
  3.1174 -     and if You include a notice stating that the Source Code version of
  3.1175 -     the Covered Code is available under the terms of this License,
  3.1176 -     including a description of how and where You have fulfilled the
  3.1177 -     obligations of Section 3.2. The notice must be conspicuously included
  3.1178 -     in any notice in an Executable version, related documentation or
  3.1179 -     collateral in which You describe recipients' rights relating to the
  3.1180 -     Covered Code. You may distribute the Executable version of Covered
  3.1181 -     Code or ownership rights under a license of Your choice, which may
  3.1182 -     contain terms different from this License, provided that You are in
  3.1183 -     compliance with the terms of this License and that the license for the
  3.1184 -     Executable version does not attempt to limit or alter the recipient's
  3.1185 -     rights in the Source Code version from the rights set forth in this
  3.1186 -     License. If You distribute the Executable version under a different
  3.1187 -     license You must make it absolutely clear that any terms which differ
  3.1188 -     from this License are offered by You alone, not by the Initial
  3.1189 -     Developer or any Contributor. You hereby agree to indemnify the
  3.1190 -     Initial Developer and every Contributor for any liability incurred by
  3.1191 -     the Initial Developer or such Contributor as a result of any such
  3.1192 -     terms You offer.
  3.1193 -
  3.1194 -     3.7. Larger Works.
  3.1195 -     You may create a Larger Work by combining Covered Code with other code
  3.1196 -     not governed by the terms of this License and distribute the Larger
  3.1197 -     Work as a single product. In such a case, You must make sure the
  3.1198 -     requirements of this License are fulfilled for the Covered Code.
  3.1199 -
  3.1200 -4. Inability to Comply Due to Statute or Regulation.
  3.1201 -
  3.1202 -     If it is impossible for You to comply with any of the terms of this
  3.1203 -     License with respect to some or all of the Covered Code due to
  3.1204 -     statute, judicial order, or regulation then You must: (a) comply with
  3.1205 -     the terms of this License to the maximum extent possible; and (b)
  3.1206 -     describe the limitations and the code they affect. Such description
  3.1207 -     must be included in the LEGAL file described in Section 3.4 and must
  3.1208 -     be included with all distributions of the Source Code. Except to the
  3.1209 -     extent prohibited by statute or regulation, such description must be
  3.1210 -     sufficiently detailed for a recipient of ordinary skill to be able to
  3.1211 -     understand it.
  3.1212 -
  3.1213 -5. Application of this License.
  3.1214 -
  3.1215 -     This License applies to code to which the Initial Developer has
  3.1216 -     attached the notice in Exhibit A and to related Covered Code.
  3.1217 -
  3.1218 -6. Versions of the License.
  3.1219 -
  3.1220 -     6.1. New Versions.
  3.1221 -     Netscape Communications Corporation ("Netscape") may publish revised
  3.1222 -     and/or new versions of the License from time to time. Each version
  3.1223 -     will be given a distinguishing version number.
  3.1224 -
  3.1225 -     6.2. Effect of New Versions.
  3.1226 -     Once Covered Code has been published under a particular version of the
  3.1227 -     License, You may always continue to use it under the terms of that
  3.1228 -     version. You may also choose to use such Covered Code under the terms
  3.1229 -     of any subsequent version of the License published by Netscape. No one
  3.1230 -     other than Netscape has the right to modify the terms applicable to
  3.1231 -     Covered Code created under this License.
  3.1232 -
  3.1233 -     6.3. Derivative Works.
  3.1234 -     If You create or use a modified version of this License (which you may
  3.1235 -     only do in order to apply it to code which is not already Covered Code
  3.1236 -     governed by this License), You must (a) rename Your license so that
  3.1237 -     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
  3.1238 -     "MPL", "NPL" or any confusingly similar phrase do not appear in your
  3.1239 -     license (except to note that your license differs from this License)
  3.1240 -     and (b) otherwise make it clear that Your version of the license
  3.1241 -     contains terms which differ from the Mozilla Public License and
  3.1242 -     Netscape Public License. (Filling in the name of the Initial
  3.1243 -     Developer, Original Code or Contributor in the notice described in
  3.1244 -     Exhibit A shall not of themselves be deemed to be modifications of
  3.1245 -     this License.)
  3.1246 -
  3.1247 -7. DISCLAIMER OF WARRANTY.
  3.1248 -
  3.1249 -     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
  3.1250 -     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
  3.1251 -     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
  3.1252 -     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
  3.1253 -     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
  3.1254 -     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
  3.1255 -     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
  3.1256 -     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
  3.1257 -     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
  3.1258 -     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
  3.1259 -
  3.1260 -8. TERMINATION.
  3.1261 -
  3.1262 -     8.1.  This License and the rights granted hereunder will terminate
  3.1263 -     automatically if You fail to comply with terms herein and fail to cure
  3.1264 -     such breach within 30 days of becoming aware of the breach. All
  3.1265 -     sublicenses to the Covered Code which are properly granted shall
  3.1266 -     survive any termination of this License. Provisions which, by their
  3.1267 -     nature, must remain in effect beyond the termination of this License
  3.1268 -     shall survive.
  3.1269 -
  3.1270 -     8.2.  If You initiate litigation by asserting a patent infringement
  3.1271 -     claim (excluding declatory judgment actions) against Initial Developer
  3.1272 -     or a Contributor (the Initial Developer or Contributor against whom
  3.1273 -     You file such action is referred to as "Participant")  alleging that:
  3.1274 -
  3.1275 -     (a)  such Participant's Contributor Version directly or indirectly
  3.1276 -     infringes any patent, then any and all rights granted by such
  3.1277 -     Participant to You under Sections 2.1 and/or 2.2 of this License
  3.1278 -     shall, upon 60 days notice from Participant terminate prospectively,
  3.1279 -     unless if within 60 days after receipt of notice You either: (i)
  3.1280 -     agree in writing to pay Participant a mutually agreeable reasonable
  3.1281 -     royalty for Your past and future use of Modifications made by such
  3.1282 -     Participant, or (ii) withdraw Your litigation claim with respect to
  3.1283 -     the Contributor Version against such Participant.  If within 60 days
  3.1284 -     of notice, a reasonable royalty and payment arrangement are not
  3.1285 -     mutually agreed upon in writing by the parties or the litigation claim
  3.1286 -     is not withdrawn, the rights granted by Participant to You under
  3.1287 -     Sections 2.1 and/or 2.2 automatically terminate at the expiration of
  3.1288 -     the 60 day notice period specified above.
  3.1289 -
  3.1290 -     (b)  any software, hardware, or device, other than such Participant's
  3.1291 -     Contributor Version, directly or indirectly infringes any patent, then
  3.1292 -     any rights granted to You by such Participant under Sections 2.1(b)
  3.1293 -     and 2.2(b) are revoked effective as of the date You first made, used,
  3.1294 -     sold, distributed, or had made, Modifications made by that
  3.1295 -     Participant.
  3.1296 -
  3.1297 -     8.3.  If You assert a patent infringement claim against Participant
  3.1298 -     alleging that such Participant's Contributor Version directly or
  3.1299 -     indirectly infringes any patent where such claim is resolved (such as
  3.1300 -     by license or settlement) prior to the initiation of patent
  3.1301 -     infringement litigation, then the reasonable value of the licenses
  3.1302 -     granted by such Participant under Sections 2.1 or 2.2 shall be taken
  3.1303 -     into account in determining the amount or value of any payment or
  3.1304 -     license.
  3.1305 -
  3.1306 -     8.4.  In the event of termination under Sections 8.1 or 8.2 above,
  3.1307 -     all end user license agreements (excluding distributors and resellers)
  3.1308 -     which have been validly granted by You or any distributor hereunder
  3.1309 -     prior to termination shall survive termination.
  3.1310 -
  3.1311 -9. LIMITATION OF LIABILITY.
  3.1312 -
  3.1313 -     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
  3.1314 -     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
  3.1315 -     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
  3.1316 -     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
  3.1317 -     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
  3.1318 -     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
  3.1319 -     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
  3.1320 -     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
  3.1321 -     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
  3.1322 -     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
  3.1323 -     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
  3.1324 -     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
  3.1325 -     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
  3.1326 -     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
  3.1327 -
  3.1328 -10. U.S. GOVERNMENT END USERS.
  3.1329 -
  3.1330 -     The Covered Code is a "commercial item," as that term is defined in
  3.1331 -     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
  3.1332 -     software" and "commercial computer software documentation," as such
  3.1333 -     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
  3.1334 -     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
  3.1335 -     all U.S. Government End Users acquire Covered Code with only those
  3.1336 -     rights set forth herein.
  3.1337 -
  3.1338 -11. MISCELLANEOUS.
  3.1339 -
  3.1340 -     This License represents the complete agreement concerning subject
  3.1341 -     matter hereof. If any provision of this License is held to be
  3.1342 -     unenforceable, such provision shall be reformed only to the extent
  3.1343 -     necessary to make it enforceable. This License shall be governed by
  3.1344 -     California law provisions (except to the extent applicable law, if
  3.1345 -     any, provides otherwise), excluding its conflict-of-law provisions.
  3.1346 -     With respect to disputes in which at least one party is a citizen of,
  3.1347 -     or an entity chartered or registered to do business in the United
  3.1348 -     States of America, any litigation relating to this License shall be
  3.1349 -     subject to the jurisdiction of the Federal Courts of the Northern
  3.1350 -     District of California, with venue lying in Santa Clara County,
  3.1351 -     California, with the losing party responsible for costs, including
  3.1352 -     without limitation, court costs and reasonable attorneys' fees and
  3.1353 -     expenses. The application of the United Nations Convention on
  3.1354 -     Contracts for the International Sale of Goods is expressly excluded.
  3.1355 -     Any law or regulation which provides that the language of a contract
  3.1356 -     shall be construed against the drafter shall not apply to this
  3.1357 -     License.
  3.1358 -
  3.1359 -12. RESPONSIBILITY FOR CLAIMS.
  3.1360 -
  3.1361 -     As between Initial Developer and the Contributors, each party is
  3.1362 -     responsible for claims and damages arising, directly or indirectly,
  3.1363 -     out of its utilization of rights under this License and You agree to
  3.1364 -     work with Initial Developer and Contributors to distribute such
  3.1365 -     responsibility on an equitable basis. Nothing herein is intended or
  3.1366 -     shall be deemed to constitute any admission of liability.
  3.1367 -
  3.1368 -13. MULTIPLE-LICENSED CODE.
  3.1369 -
  3.1370 -     Initial Developer may designate portions of the Covered Code as
  3.1371 -     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
  3.1372 -     Developer permits you to utilize portions of the Covered Code under
  3.1373 -     Your choice of the NPL or the alternative licenses, if any, specified
  3.1374 -     by the Initial Developer in the file described in Exhibit A.
  3.1375 -
  3.1376 -EXHIBIT A - Mozilla Public License.
  3.1377 -
  3.1378 -     ``The contents of this file are subject to the Mozilla Public License
  3.1379 -     Version 1.1 (the "License"); you may not use this file except in
  3.1380 -     compliance with the License. You may obtain a copy of the License at
  3.1381 -     http://www.mozilla.org/MPL/
  3.1382 -
  3.1383 -     Software distributed under the License is distributed on an "AS IS"
  3.1384 -     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  3.1385 -     License for the specific language governing rights and limitations
  3.1386 -     under the License.
  3.1387 -
  3.1388 -     The Original Code is ______________________________________.
  3.1389 -
  3.1390 -     The Initial Developer of the Original Code is ________________________.
  3.1391 -     Portions created by ______________________ are Copyright (C) ______
  3.1392 -     _______________________. All Rights Reserved.
  3.1393 -
  3.1394 -     Contributor(s): ______________________________________.
  3.1395 -
  3.1396 -     Alternatively, the contents of this file may be used under the terms
  3.1397 -     of the _____ license (the  "[___] License"), in which case the
  3.1398 -     provisions of [______] License are applicable instead of those
  3.1399 -     above.  If you wish to allow use of your version of this file only
  3.1400 -     under the terms of the [____] License and not to allow others to use
  3.1401 -     your version of this file under the MPL, indicate your decision by
  3.1402 -     deleting  the provisions above and replace  them with the notice and
  3.1403 -     other provisions required by the [___] License.  If you do not delete
  3.1404 -     the provisions above, a recipient may use your version of this file
  3.1405 -     under either the MPL or the [___] License."
  3.1406 -
  3.1407 -     [NOTE: The text of this Exhibit A may differ slightly from the text of
  3.1408 -     the notices in the Source Code files of the Original Code. You should
  3.1409 -     use the text of this Exhibit A rather than the text found in the
  3.1410 -     Original Code Source Code for Your Modifications.]
  3.1411 -
  3.1412 ---- end of LICENSE ---
  3.1413 -
  3.1414 --------------------------------------------------------------------------------
  3.1415 -
  3.1416 -%% This notice is provided with respect to SAX 2.0.1, which is included 
  3.1417 -with JRE 7, JDK 7, and OpenJDK 7.
  3.1418 +%% This notice is provided with respect to SAX 2.0.1, which may be included 
  3.1419 +with JRE 8, JDK 8, and OpenJDK 8.
  3.1420  
  3.1421  --- begin of LICENSE ---
  3.1422  
  3.1423 @@ -1876,8 +2065,8 @@
  3.1424  
  3.1425  -------------------------------------------------------------------------------
  3.1426  
  3.1427 -%% This notice is provided with respect to SoftFloat version 2b, which is 
  3.1428 -included with JRE 7, JDK 7, and OpenJDK 7 on Linux/ARM.
  3.1429 +%% This notice is provided with respect to SoftFloat version 2b, which may be 
  3.1430 +included with JRE 8, JDK 8, and OpenJDK 8 on Linux/ARM.
  3.1431  
  3.1432  --- begin of LICENSE ---
  3.1433  
  3.1434 @@ -1909,21 +2098,12 @@
  3.1435  
  3.1436  -------------------------------------------------------------------------------
  3.1437  
  3.1438 -%% Portions licensed from Taligent, Inc.
  3.1439 -
  3.1440 --------------------------------------------------------------------------------
  3.1441 -
  3.1442 -%% This notice is provided with respect to Thai Dictionary, which is 
  3.1443 -included with JRE 7, JDK 7, and OpenJDK 7.
  3.1444 +%% This notice is provided with respect to Sparkle 1.5,
  3.1445 +which may be included with JRE 8 on Mac OS X.
  3.1446  
  3.1447  --- begin of LICENSE ---
  3.1448  
  3.1449 -Copyright (C) 1982 The Royal Institute, Thai Royal Government.
  3.1450 -
  3.1451 -Copyright (C) 1998 National Electronics and Computer Technology Center,
  3.1452 -National Science and Technology Development Agency,
  3.1453 -Ministry of Science Technology and Environment,
  3.1454 -Thai Royal Government.
  3.1455 +Copyright (c) 2012 Sparkle.org and Andy Matuschak
  3.1456  
  3.1457  Permission is hereby granted, free of charge, to any person obtaining a copy
  3.1458  of this software and associated documentation files (the "Software"), to deal
  3.1459 @@ -1947,8 +2127,46 @@
  3.1460  
  3.1461  -------------------------------------------------------------------------------
  3.1462  
  3.1463 -%% This notice is provided with respect to Unicode 6.0.0, CLDR v1.4.1, & CLDR
  3.1464 -v1.9, which is included with JRE 7, JDK 7, and OpenJDK 7.
  3.1465 +%% Portions licensed from Taligent, Inc.
  3.1466 +
  3.1467 +-------------------------------------------------------------------------------
  3.1468 +
  3.1469 +%% This notice is provided with respect to Thai Dictionary, which may be 
  3.1470 +included with JRE 8, JDK 8, and OpenJDK 8.
  3.1471 +
  3.1472 +--- begin of LICENSE ---
  3.1473 +
  3.1474 +Copyright (C) 1982 The Royal Institute, Thai Royal Government.
  3.1475 +
  3.1476 +Copyright (C) 1998 National Electronics and Computer Technology Center,
  3.1477 +National Science and Technology Development Agency,
  3.1478 +Ministry of Science Technology and Environment,
  3.1479 +Thai Royal Government.
  3.1480 +
  3.1481 +Permission is hereby granted, free of charge, to any person obtaining a copy
  3.1482 +of this software and associated documentation files (the "Software"), to deal
  3.1483 +in the Software without restriction, including without limitation the rights
  3.1484 +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  3.1485 +copies of the Software, and to permit persons to whom the Software is
  3.1486 +furnished to do so, subject to the following conditions:
  3.1487 +
  3.1488 +The above copyright notice and this permission notice shall be included in all
  3.1489 +copies or substantial portions of the Software.
  3.1490 +
  3.1491 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  3.1492 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  3.1493 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  3.1494 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  3.1495 +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  3.1496 +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  3.1497 +SOFTWARE.
  3.1498 +
  3.1499 +--- end of LICENSE ---
  3.1500 +
  3.1501 +-------------------------------------------------------------------------------
  3.1502 +
  3.1503 +%% This notice is provided with respect to Unicode 6.2.0 & CLDR 21.0.1
  3.1504 +which may be included with JRE 8, JDK 8, and OpenJDK 8.
  3.1505  
  3.1506  --- begin of LICENSE ---
  3.1507  
  3.1508 @@ -1959,7 +2177,7 @@
  3.1509  Trademark Usage Policy.
  3.1510  
  3.1511  A. Unicode Copyright.
  3.1512 -   1. Copyright © 1991-2011 Unicode, Inc. All rights reserved.
  3.1513 +   1. Copyright © 1991-2013 Unicode, Inc. All rights reserved.
  3.1514  
  3.1515     2. Certain documents and files on this website contain a legend indicating
  3.1516        that "Modification is permitted." Any person is hereby authorized,
  3.1517 @@ -2094,7 +2312,7 @@
  3.1518  
  3.1519  COPYRIGHT AND PERMISSION NOTICE
  3.1520  
  3.1521 -Copyright © 1991-2011 Unicode, Inc. All rights reserved. Distributed under the
  3.1522 +Copyright © 1991-2012 Unicode, Inc. All rights reserved. Distributed under the
  3.1523  Terms of Use in http://www.unicode.org/copyright.html.
  3.1524  
  3.1525  Permission is hereby granted, free of charge, to any person obtaining a copy
  3.1526 @@ -2134,8 +2352,8 @@
  3.1527  
  3.1528  -------------------------------------------------------------------------------
  3.1529  
  3.1530 -%% This notice is provided with respect to UPX v3.01, which is included 
  3.1531 -with JRE 7 on Windows.
  3.1532 +%% This notice is provided with respect to UPX v3.01, which may be included 
  3.1533 +with JRE 8 on Windows.
  3.1534  
  3.1535  --- begin of LICENSE ---
  3.1536  
  3.1537 @@ -2274,7 +2492,7 @@
  3.1538  -------------------------------------------------------------------------------
  3.1539  
  3.1540  %% This notice is provided with respect to Xfree86-VidMode Extension 1.0,
  3.1541 -which is included with JRE 7, JDK 7, and OpenJDK 7 on Linux and Solaris.
  3.1542 +which may be included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris.
  3.1543  
  3.1544  --- begin of LICENSE ---
  3.1545  
  3.1546 @@ -2326,8 +2544,8 @@
  3.1547  
  3.1548  -------------------------------------------------------------------------------
  3.1549  
  3.1550 -%% This notice is provided with respect to X Window System 6.8.2, which is 
  3.1551 -included with JRE 7, JDK 7, and OpenJDK 7 on Linux and Solaris.
  3.1552 +%% This notice is provided with respect to X Window System 6.8.2, which may be 
  3.1553 +included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris.
  3.1554  
  3.1555  --- begin of LICENSE ---
  3.1556  
  3.1557 @@ -3131,12 +3349,12 @@
  3.1558  
  3.1559  -------------------------------------------------------------------------------
  3.1560  
  3.1561 -%% This notice is provided with respect to zlib v1.2.3, which is included 
  3.1562 -with JRE 7, JDK 7, and OpenJDK 7
  3.1563 +%% This notice is provided with respect to zlib v1.2.5, which may be included 
  3.1564 +with JRE 8, JDK 8, and OpenJDK 8.
  3.1565  
  3.1566  --- begin of LICENSE ---
  3.1567  
  3.1568 -  version 1.2.3, July 18th, 2005
  3.1569 +  version 1.2.5, July 18th, 2005
  3.1570  
  3.1571    Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
  3.1572  
  3.1573 @@ -3163,16 +3381,18 @@
  3.1574  
  3.1575  -------------------------------------------------------------------------------
  3.1576  
  3.1577 -%% This notice is provided with respect to the following which is 
  3.1578 -included with JRE 7, JDK 7, and OpenJDK 7, except where noted:
  3.1579 -
  3.1580 -  Apache Derby 10.8.1.2        [included with JDK 7 only]
  3.1581 +%% This notice is provided with respect to the following which may be 
  3.1582 +included with JRE 8, JDK 8, and OpenJDK 8, except where noted:
  3.1583 +
  3.1584 +  Apache Commons Math 2.2
  3.1585 +  Apache Derby 10.10.1.2        [included with JDK 8]
  3.1586    Apache Jakarta BCEL 5.2 
  3.1587    Apache Jakarta Regexp 1.4 
  3.1588 -  Apache Santuario XMLSec-Java 1.4.2
  3.1589 +  Apache Santuario XML Security for Java 1.5.4
  3.1590    Apache Xalan-Java 2.7.1 
  3.1591 -  Apache Xerces2 Java 2.10.0 
  3.1592 +  Apache Xerces Java 2.10.0 
  3.1593    Apache XML Resolver 1.1 
  3.1594 +  Dynalink 0.5
  3.1595  
  3.1596  
  3.1597  --- begin of LICENSE ---
     4.1 --- a/make/hotspot_version	Thu Jan 30 14:30:01 2014 +0100
     4.2 +++ b/make/hotspot_version	Wed Feb 19 20:12:43 2014 -0800
     4.3 @@ -1,5 +1,5 @@
     4.4  # 
     4.5 -# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
     4.6 +# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
     4.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4.8  #
     4.9  # This code is free software; you can redistribute it and/or modify it
    4.10 @@ -31,11 +31,11 @@
    4.11  #
    4.12  
    4.13  # Don't put quotes (fail windows build).
    4.14 -HOTSPOT_VM_COPYRIGHT=Copyright 2013
    4.15 +HOTSPOT_VM_COPYRIGHT=Copyright 2014
    4.16  
    4.17  HS_MAJOR_VER=25
    4.18  HS_MINOR_VER=20
    4.19 -HS_BUILD_NUMBER=01
    4.20 +HS_BUILD_NUMBER=03
    4.21  
    4.22  JDK_MAJOR_VER=1
    4.23  JDK_MINOR_VER=8
     5.1 --- a/src/cpu/sparc/vm/sparc.ad	Thu Jan 30 14:30:01 2014 +0100
     5.2 +++ b/src/cpu/sparc/vm/sparc.ad	Wed Feb 19 20:12:43 2014 -0800
     5.3 @@ -3363,8 +3363,8 @@
     5.4    interface(CONST_INTER);
     5.5  %}
     5.6  
     5.7 -// Unsigned (positive) Integer Immediate: 13-bit
     5.8 -operand immU13() %{
     5.9 +// Unsigned Integer Immediate: 12-bit (non-negative that fits in simm13)
    5.10 +operand immU12() %{
    5.11    predicate((0 <= n->get_int()) && Assembler::is_simm13(n->get_int()));
    5.12    match(ConI);
    5.13    op_cost(0);
    5.14 @@ -3400,6 +3400,17 @@
    5.15    interface(CONST_INTER);
    5.16  %}
    5.17  
    5.18 +// Int Immediate non-negative
    5.19 +operand immU31()
    5.20 +%{
    5.21 +  predicate(n->get_int() >= 0);
    5.22 +  match(ConI);
    5.23 +
    5.24 +  op_cost(0);
    5.25 +  format %{ %}
    5.26 +  interface(CONST_INTER);
    5.27 +%}
    5.28 +
    5.29  // Integer Immediate: 0-bit
    5.30  operand immI0() %{
    5.31    predicate(n->get_int() == 0);
    5.32 @@ -5728,7 +5739,6 @@
    5.33    effect(TEMP dst, TEMP tmp);
    5.34    ins_cost(MEMORY_REF_COST + 2*DEFAULT_COST);
    5.35  
    5.36 -  size((3+1)*4);  // set may use two instructions.
    5.37    format %{ "LDUH   $mem,$dst\t! ushort/char & 16-bit mask -> long\n\t"
    5.38              "SET    $mask,$tmp\n\t"
    5.39              "AND    $dst,$tmp,$dst" %}
    5.40 @@ -5850,13 +5860,13 @@
    5.41    ins_pipe(iload_mem);
    5.42  %}
    5.43  
    5.44 -// Load Integer with a 13-bit mask into a Long Register
    5.45 -instruct loadI2L_immI13(iRegL dst, memory mem, immI13 mask) %{
    5.46 +// Load Integer with a 12-bit mask into a Long Register
    5.47 +instruct loadI2L_immU12(iRegL dst, memory mem, immU12 mask) %{
    5.48    match(Set dst (ConvI2L (AndI (LoadI mem) mask)));
    5.49    ins_cost(MEMORY_REF_COST + DEFAULT_COST);
    5.50  
    5.51    size(2*4);
    5.52 -  format %{ "LDUW   $mem,$dst\t! int & 13-bit mask -> long\n\t"
    5.53 +  format %{ "LDUW   $mem,$dst\t! int & 12-bit mask -> long\n\t"
    5.54              "AND    $dst,$mask,$dst" %}
    5.55    ins_encode %{
    5.56      Register Rdst = $dst$$Register;
    5.57 @@ -5866,14 +5876,13 @@
    5.58    ins_pipe(iload_mem);
    5.59  %}
    5.60  
    5.61 -// Load Integer with a 32-bit mask into a Long Register
    5.62 -instruct loadI2L_immI(iRegL dst, memory mem, immI mask, iRegL tmp) %{
    5.63 +// Load Integer with a 31-bit mask into a Long Register
    5.64 +instruct loadI2L_immU31(iRegL dst, memory mem, immU31 mask, iRegL tmp) %{
    5.65    match(Set dst (ConvI2L (AndI (LoadI mem) mask)));
    5.66    effect(TEMP dst, TEMP tmp);
    5.67    ins_cost(MEMORY_REF_COST + 2*DEFAULT_COST);
    5.68  
    5.69 -  size((3+1)*4);  // set may use two instructions.
    5.70 -  format %{ "LDUW   $mem,$dst\t! int & 32-bit mask -> long\n\t"
    5.71 +  format %{ "LDUW   $mem,$dst\t! int & 31-bit mask -> long\n\t"
    5.72              "SET    $mask,$tmp\n\t"
    5.73              "AND    $dst,$tmp,$dst" %}
    5.74    ins_encode %{
    5.75 @@ -8970,7 +8979,7 @@
    5.76    ins_pipe(ialu_cconly_reg_reg);
    5.77  %}
    5.78  
    5.79 -instruct compU_iReg_imm13(flagsRegU icc, iRegI op1, immU13 op2 ) %{
    5.80 +instruct compU_iReg_imm13(flagsRegU icc, iRegI op1, immU12 op2 ) %{
    5.81    match(Set icc (CmpU op1 op2));
    5.82  
    5.83    size(4);
     6.1 --- a/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Thu Jan 30 14:30:01 2014 +0100
     6.2 +++ b/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Wed Feb 19 20:12:43 2014 -0800
     6.3 @@ -38,6 +38,7 @@
     6.4  #include "nativeInst_x86.hpp"
     6.5  #include "oops/objArrayKlass.hpp"
     6.6  #include "runtime/sharedRuntime.hpp"
     6.7 +#include "vmreg_x86.inline.hpp"
     6.8  
     6.9  
    6.10  // These masks are used to provide 128-bit aligned bitmasks to the XMM
    6.11 @@ -1006,6 +1007,9 @@
    6.12      if (UseCompressedOops && !wide) {
    6.13        __ movptr(compressed_src, src->as_register());
    6.14        __ encode_heap_oop(compressed_src);
    6.15 +      if (patch_code != lir_patch_none) {
    6.16 +        info->oop_map()->set_narrowoop(compressed_src->as_VMReg());
    6.17 +      }
    6.18      }
    6.19  #endif
    6.20    }
     7.1 --- a/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp	Thu Jan 30 14:30:01 2014 +0100
     7.2 +++ b/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp	Wed Feb 19 20:12:43 2014 -0800
     7.3 @@ -941,6 +941,8 @@
     7.4      case vmIntrinsics::_updateCRC32: {
     7.5        LIRItem crc(x->argument_at(0), this);
     7.6        LIRItem val(x->argument_at(1), this);
     7.7 +      // val is destroyed by update_crc32
     7.8 +      val.set_destroys_register();
     7.9        crc.load_item();
    7.10        val.load_item();
    7.11        __ update_crc32(crc.result(), val.result(), result);
     8.1 --- a/src/cpu/x86/vm/x86_32.ad	Thu Jan 30 14:30:01 2014 +0100
     8.2 +++ b/src/cpu/x86/vm/x86_32.ad	Wed Feb 19 20:12:43 2014 -0800
     8.3 @@ -3897,6 +3897,17 @@
     8.4    interface(CONST_INTER);
     8.5  %}
     8.6  
     8.7 +// Int Immediate non-negative
     8.8 +operand immU31()
     8.9 +%{
    8.10 +  predicate(n->get_int() >= 0);
    8.11 +  match(ConI);
    8.12 +
    8.13 +  op_cost(0);
    8.14 +  format %{ %}
    8.15 +  interface(CONST_INTER);
    8.16 +%}
    8.17 +
    8.18  // Constant for long shifts
    8.19  operand immI_32() %{
    8.20    predicate( n->get_int() == 32 );
    8.21 @@ -6127,12 +6138,12 @@
    8.22    ins_pipe(ialu_reg_mem);
    8.23  %}
    8.24  
    8.25 -// Load Integer with 32-bit mask into Long Register
    8.26 -instruct loadI2L_immI(eRegL dst, memory mem, immI mask, eFlagsReg cr) %{
    8.27 +// Load Integer with 31-bit mask into Long Register
    8.28 +instruct loadI2L_immU31(eRegL dst, memory mem, immU31 mask, eFlagsReg cr) %{
    8.29    match(Set dst (ConvI2L (AndI (LoadI mem) mask)));
    8.30    effect(KILL cr);
    8.31  
    8.32 -  format %{ "MOV    $dst.lo,$mem\t# int & 32-bit mask -> long\n\t"
    8.33 +  format %{ "MOV    $dst.lo,$mem\t# int & 31-bit mask -> long\n\t"
    8.34              "XOR    $dst.hi,$dst.hi\n\t"
    8.35              "AND    $dst.lo,$mask" %}
    8.36    ins_encode %{
     9.1 --- a/src/cpu/x86/vm/x86_64.ad	Thu Jan 30 14:30:01 2014 +0100
     9.2 +++ b/src/cpu/x86/vm/x86_64.ad	Wed Feb 19 20:12:43 2014 -0800
     9.3 @@ -3094,6 +3094,17 @@
     9.4    interface(CONST_INTER);
     9.5  %}
     9.6  
     9.7 +// Int Immediate non-negative
     9.8 +operand immU31()
     9.9 +%{
    9.10 +  predicate(n->get_int() >= 0);
    9.11 +  match(ConI);
    9.12 +
    9.13 +  op_cost(0);
    9.14 +  format %{ %}
    9.15 +  interface(CONST_INTER);
    9.16 +%}
    9.17 +
    9.18  // Constant for long shifts
    9.19  operand immI_32()
    9.20  %{
    9.21 @@ -5050,12 +5061,12 @@
    9.22    ins_pipe(ialu_reg_mem);
    9.23  %}
    9.24  
    9.25 -// Load Integer with a 32-bit mask into Long Register
    9.26 -instruct loadI2L_immI(rRegL dst, memory mem, immI mask, rFlagsReg cr) %{
    9.27 +// Load Integer with a 31-bit mask into Long Register
    9.28 +instruct loadI2L_immU31(rRegL dst, memory mem, immU31 mask, rFlagsReg cr) %{
    9.29    match(Set dst (ConvI2L (AndI (LoadI mem) mask)));
    9.30    effect(KILL cr);
    9.31  
    9.32 -  format %{ "movl    $dst, $mem\t# int & 32-bit mask -> long\n\t"
    9.33 +  format %{ "movl    $dst, $mem\t# int & 31-bit mask -> long\n\t"
    9.34              "andl    $dst, $mask" %}
    9.35    ins_encode %{
    9.36      Register Rdst = $dst$$Register;
    10.1 --- a/src/share/vm/classfile/classFileParser.cpp	Thu Jan 30 14:30:01 2014 +0100
    10.2 +++ b/src/share/vm/classfile/classFileParser.cpp	Wed Feb 19 20:12:43 2014 -0800
    10.3 @@ -1,5 +1,5 @@
    10.4  /*
    10.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
    10.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
    10.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    10.8   *
    10.9   * This code is free software; you can redistribute it and/or modify it
   10.10 @@ -4500,8 +4500,8 @@
   10.11              break; // didn't find any match; get out
   10.12            }
   10.13  
   10.14 -          if (super_m->is_final() &&
   10.15 -              // matching method in super is final
   10.16 +          if (super_m->is_final() && !super_m->is_static() &&
   10.17 +              // matching method in super is final, and not static
   10.18                (Reflection::verify_field_access(this_klass(),
   10.19                                                 super_m->method_holder(),
   10.20                                                 super_m->method_holder(),
    11.1 --- a/src/share/vm/classfile/defaultMethods.cpp	Thu Jan 30 14:30:01 2014 +0100
    11.2 +++ b/src/share/vm/classfile/defaultMethods.cpp	Wed Feb 19 20:12:43 2014 -0800
    11.3 @@ -1,5 +1,5 @@
    11.4  /*
    11.5 - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
    11.6 + * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
    11.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    11.8   *
    11.9   * This code is free software; you can redistribute it and/or modify it
   11.10 @@ -390,6 +390,20 @@
   11.11    Symbol* get_exception_message() { return _exception_message; }
   11.12    Symbol* get_exception_name() { return _exception_name; }
   11.13  
   11.14 +  // Return true if the specified klass has a static method that matches
   11.15 +  // the name and signature of the target method.
   11.16 +  bool has_matching_static(InstanceKlass* root) {
   11.17 +    if (_members.length() > 0) {
   11.18 +      Pair<Method*,QualifiedState> entry = _members.at(0);
   11.19 +      Method* impl = root->find_method(entry.first->name(),
   11.20 +                                       entry.first->signature());
   11.21 +      if ((impl != NULL) && impl->is_static()) {
   11.22 +        return true;
   11.23 +      }
   11.24 +    }
   11.25 +    return false;
   11.26 +  }
   11.27 +
   11.28    // Either sets the target or the exception error message
   11.29    void determine_target(InstanceKlass* root, TRAPS) {
   11.30      if (has_target() || throws_exception()) {
   11.31 @@ -416,19 +430,26 @@
   11.32      }
   11.33  
   11.34      if (num_defaults == 0) {
   11.35 -      if (qualified_methods.length() == 0) {
   11.36 -        _exception_message = generate_no_defaults_message(CHECK);
   11.37 -      } else {
   11.38 -        assert(root != NULL, "Null root class");
   11.39 -        _exception_message = generate_method_message(root->name(), qualified_methods.at(0), CHECK);
   11.40 +      // If the root klass has a static method with matching name and signature
   11.41 +      // then do not generate an overpass method because it will hide the
   11.42 +      // static method during resolution.
   11.43 +      if (!has_matching_static(root)) {
   11.44 +        if (qualified_methods.length() == 0) {
   11.45 +          _exception_message = generate_no_defaults_message(CHECK);
   11.46 +        } else {
   11.47 +          assert(root != NULL, "Null root class");
   11.48 +          _exception_message = generate_method_message(root->name(), qualified_methods.at(0), CHECK);
   11.49 +        }
   11.50 +        _exception_name = vmSymbols::java_lang_AbstractMethodError();
   11.51        }
   11.52 -      _exception_name = vmSymbols::java_lang_AbstractMethodError();
   11.53 +
   11.54      // If only one qualified method is default, select that
   11.55      } else if (num_defaults == 1) {
   11.56          _selected_target = qualified_methods.at(default_index);
   11.57 -    } else if (num_defaults > 1) {
   11.58 -       _exception_message = generate_conflicts_message(&qualified_methods,CHECK);
   11.59 -       _exception_name = vmSymbols::java_lang_IncompatibleClassChangeError();
   11.60 +
   11.61 +    } else if (num_defaults > 1 && !has_matching_static(root)) {
   11.62 +      _exception_message = generate_conflicts_message(&qualified_methods,CHECK);
   11.63 +      _exception_name = vmSymbols::java_lang_IncompatibleClassChangeError();
   11.64        if (TraceDefaultMethods) {
   11.65          _exception_message->print_value_on(tty);
   11.66          tty->print_cr("");
    12.1 --- a/src/share/vm/classfile/symbolTable.cpp	Thu Jan 30 14:30:01 2014 +0100
    12.2 +++ b/src/share/vm/classfile/symbolTable.cpp	Wed Feb 19 20:12:43 2014 -0800
    12.3 @@ -38,6 +38,9 @@
    12.4  
    12.5  // --------------------------------------------------------------------------
    12.6  
    12.7 +// the number of buckets a thread claims
    12.8 +const int ClaimChunkSize = 32;
    12.9 +
   12.10  SymbolTable* SymbolTable::_the_table = NULL;
   12.11  // Static arena for symbols that are not deallocated
   12.12  Arena* SymbolTable::_arena = NULL;
   12.13 @@ -83,16 +86,12 @@
   12.14    }
   12.15  }
   12.16  
   12.17 -int SymbolTable::symbols_removed = 0;
   12.18 -int SymbolTable::symbols_counted = 0;
   12.19 +int SymbolTable::_symbols_removed = 0;
   12.20 +int SymbolTable::_symbols_counted = 0;
   12.21 +volatile int SymbolTable::_parallel_claimed_idx = 0;
   12.22  
   12.23 -// Remove unreferenced symbols from the symbol table
   12.24 -// This is done late during GC.
   12.25 -void SymbolTable::unlink() {
   12.26 -  int removed = 0;
   12.27 -  int total = 0;
   12.28 -  size_t memory_total = 0;
   12.29 -  for (int i = 0; i < the_table()->table_size(); ++i) {
   12.30 +void SymbolTable::buckets_unlink(int start_idx, int end_idx, int* processed, int* removed, size_t* memory_total) {
   12.31 +  for (int i = start_idx; i < end_idx; ++i) {
   12.32      HashtableEntry<Symbol*, mtSymbol>** p = the_table()->bucket_addr(i);
   12.33      HashtableEntry<Symbol*, mtSymbol>* entry = the_table()->bucket(i);
   12.34      while (entry != NULL) {
   12.35 @@ -104,14 +103,14 @@
   12.36          break;
   12.37        }
   12.38        Symbol* s = entry->literal();
   12.39 -      memory_total += s->size();
   12.40 -      total++;
   12.41 +      (*memory_total) += s->size();
   12.42 +      (*processed)++;
   12.43        assert(s != NULL, "just checking");
   12.44        // If reference count is zero, remove.
   12.45        if (s->refcount() == 0) {
   12.46          assert(!entry->is_shared(), "shared entries should be kept live");
   12.47          delete s;
   12.48 -        removed++;
   12.49 +        (*removed)++;
   12.50          *p = entry->next();
   12.51          the_table()->free_entry(entry);
   12.52        } else {
   12.53 @@ -121,12 +120,45 @@
   12.54        entry = (HashtableEntry<Symbol*, mtSymbol>*)HashtableEntry<Symbol*, mtSymbol>::make_ptr(*p);
   12.55      }
   12.56    }
   12.57 -  symbols_removed += removed;
   12.58 -  symbols_counted += total;
   12.59 +}
   12.60 +
   12.61 +// Remove unreferenced symbols from the symbol table
   12.62 +// This is done late during GC.
   12.63 +void SymbolTable::unlink(int* processed, int* removed) {
   12.64 +  size_t memory_total = 0;
   12.65 +  buckets_unlink(0, the_table()->table_size(), processed, removed, &memory_total);
   12.66 +  _symbols_removed += *removed;
   12.67 +  _symbols_counted += *processed;
   12.68    // Exclude printing for normal PrintGCDetails because people parse
   12.69    // this output.
   12.70    if (PrintGCDetails && Verbose && WizardMode) {
   12.71 -    gclog_or_tty->print(" [Symbols=%d size=" SIZE_FORMAT "K] ", total,
   12.72 +    gclog_or_tty->print(" [Symbols=%d size=" SIZE_FORMAT "K] ", *processed,
   12.73 +                        (memory_total*HeapWordSize)/1024);
   12.74 +  }
   12.75 +}
   12.76 +
   12.77 +void SymbolTable::possibly_parallel_unlink(int* processed, int* removed) {
   12.78 +  const int limit = the_table()->table_size();
   12.79 +
   12.80 +  size_t memory_total = 0;
   12.81 +
   12.82 +  for (;;) {
   12.83 +    // Grab next set of buckets to scan
   12.84 +    int start_idx = Atomic::add(ClaimChunkSize, &_parallel_claimed_idx) - ClaimChunkSize;
   12.85 +    if (start_idx >= limit) {
   12.86 +      // End of table
   12.87 +      break;
   12.88 +    }
   12.89 +
   12.90 +    int end_idx = MIN2(limit, start_idx + ClaimChunkSize);
   12.91 +    buckets_unlink(start_idx, end_idx, processed, removed, &memory_total);
   12.92 +  }
   12.93 +  Atomic::add(*processed, &_symbols_counted);
   12.94 +  Atomic::add(*removed, &_symbols_removed);
   12.95 +  // Exclude printing for normal PrintGCDetails because people parse
   12.96 +  // this output.
   12.97 +  if (PrintGCDetails && Verbose && WizardMode) {
   12.98 +    gclog_or_tty->print(" [Symbols: scanned=%d removed=%d size=" SIZE_FORMAT "K] ", *processed, *removed,
   12.99                          (memory_total*HeapWordSize)/1024);
  12.100    }
  12.101  }
  12.102 @@ -494,11 +526,11 @@
  12.103    tty->print_cr("Total number of symbols  %5d", count);
  12.104    tty->print_cr("Total size in memory     %5dK",
  12.105            (memory_total*HeapWordSize)/1024);
  12.106 -  tty->print_cr("Total counted            %5d", symbols_counted);
  12.107 -  tty->print_cr("Total removed            %5d", symbols_removed);
  12.108 -  if (symbols_counted > 0) {
  12.109 +  tty->print_cr("Total counted            %5d", _symbols_counted);
  12.110 +  tty->print_cr("Total removed            %5d", _symbols_removed);
  12.111 +  if (_symbols_counted > 0) {
  12.112      tty->print_cr("Percent removed          %3.2f",
  12.113 -          ((float)symbols_removed/(float)symbols_counted)* 100);
  12.114 +          ((float)_symbols_removed/(float)_symbols_counted)* 100);
  12.115    }
  12.116    tty->print_cr("Reference counts         %5d", Symbol::_total_count);
  12.117    tty->print_cr("Symbol arena size        %5d used %5d",
  12.118 @@ -739,39 +771,38 @@
  12.119    return result;
  12.120  }
  12.121  
  12.122 -void StringTable::unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f) {
  12.123 +void StringTable::unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int* processed, int* removed) {
  12.124 +  buckets_unlink_or_oops_do(is_alive, f, 0, the_table()->table_size(), processed, removed);
  12.125 +}
  12.126 +
  12.127 +void StringTable::possibly_parallel_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int* processed, int* removed) {
  12.128    // Readers of the table are unlocked, so we should only be removing
  12.129    // entries at a safepoint.
  12.130    assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
  12.131 -  for (int i = 0; i < the_table()->table_size(); ++i) {
  12.132 -    HashtableEntry<oop, mtSymbol>** p = the_table()->bucket_addr(i);
  12.133 -    HashtableEntry<oop, mtSymbol>* entry = the_table()->bucket(i);
  12.134 -    while (entry != NULL) {
  12.135 -      assert(!entry->is_shared(), "CDS not used for the StringTable");
  12.136 +  const int limit = the_table()->table_size();
  12.137  
  12.138 -      if (is_alive->do_object_b(entry->literal())) {
  12.139 -        if (f != NULL) {
  12.140 -          f->do_oop((oop*)entry->literal_addr());
  12.141 -        }
  12.142 -        p = entry->next_addr();
  12.143 -      } else {
  12.144 -        *p = entry->next();
  12.145 -        the_table()->free_entry(entry);
  12.146 -      }
  12.147 -      entry = *p;
  12.148 +  for (;;) {
  12.149 +    // Grab next set of buckets to scan
  12.150 +    int start_idx = Atomic::add(ClaimChunkSize, &_parallel_claimed_idx) - ClaimChunkSize;
  12.151 +    if (start_idx >= limit) {
  12.152 +      // End of table
  12.153 +      break;
  12.154      }
  12.155 +
  12.156 +    int end_idx = MIN2(limit, start_idx + ClaimChunkSize);
  12.157 +    buckets_unlink_or_oops_do(is_alive, f, start_idx, end_idx, processed, removed);
  12.158    }
  12.159  }
  12.160  
  12.161 -void StringTable::buckets_do(OopClosure* f, int start_idx, int end_idx) {
  12.162 +void StringTable::buckets_oops_do(OopClosure* f, int start_idx, int end_idx) {
  12.163    const int limit = the_table()->table_size();
  12.164  
  12.165    assert(0 <= start_idx && start_idx <= limit,
  12.166 -         err_msg("start_idx (" INT32_FORMAT ") oob?", start_idx));
  12.167 +         err_msg("start_idx (" INT32_FORMAT ") is out of bounds", start_idx));
  12.168    assert(0 <= end_idx && end_idx <= limit,
  12.169 -         err_msg("end_idx (" INT32_FORMAT ") oob?", end_idx));
  12.170 +         err_msg("end_idx (" INT32_FORMAT ") is out of bounds", end_idx));
  12.171    assert(start_idx <= end_idx,
  12.172 -         err_msg("Ordering: start_idx=" INT32_FORMAT", end_idx=" INT32_FORMAT,
  12.173 +         err_msg("Index ordering: start_idx=" INT32_FORMAT", end_idx=" INT32_FORMAT,
  12.174                   start_idx, end_idx));
  12.175  
  12.176    for (int i = start_idx; i < end_idx; i += 1) {
  12.177 @@ -786,12 +817,44 @@
  12.178    }
  12.179  }
  12.180  
  12.181 +void StringTable::buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, int* processed, int* removed) {
  12.182 +  const int limit = the_table()->table_size();
  12.183 +
  12.184 +  assert(0 <= start_idx && start_idx <= limit,
  12.185 +         err_msg("start_idx (" INT32_FORMAT ") is out of bounds", start_idx));
  12.186 +  assert(0 <= end_idx && end_idx <= limit,
  12.187 +         err_msg("end_idx (" INT32_FORMAT ") is out of bounds", end_idx));
  12.188 +  assert(start_idx <= end_idx,
  12.189 +         err_msg("Index ordering: start_idx=" INT32_FORMAT", end_idx=" INT32_FORMAT,
  12.190 +                 start_idx, end_idx));
  12.191 +
  12.192 +  for (int i = start_idx; i < end_idx; ++i) {
  12.193 +    HashtableEntry<oop, mtSymbol>** p = the_table()->bucket_addr(i);
  12.194 +    HashtableEntry<oop, mtSymbol>* entry = the_table()->bucket(i);
  12.195 +    while (entry != NULL) {
  12.196 +      assert(!entry->is_shared(), "CDS not used for the StringTable");
  12.197 +
  12.198 +      if (is_alive->do_object_b(entry->literal())) {
  12.199 +        if (f != NULL) {
  12.200 +          f->do_oop((oop*)entry->literal_addr());
  12.201 +        }
  12.202 +        p = entry->next_addr();
  12.203 +      } else {
  12.204 +        *p = entry->next();
  12.205 +        the_table()->free_entry(entry);
  12.206 +        (*removed)++;
  12.207 +      }
  12.208 +      (*processed)++;
  12.209 +      entry = *p;
  12.210 +    }
  12.211 +  }
  12.212 +}
  12.213 +
  12.214  void StringTable::oops_do(OopClosure* f) {
  12.215 -  buckets_do(f, 0, the_table()->table_size());
  12.216 +  buckets_oops_do(f, 0, the_table()->table_size());
  12.217  }
  12.218  
  12.219  void StringTable::possibly_parallel_oops_do(OopClosure* f) {
  12.220 -  const int ClaimChunkSize = 32;
  12.221    const int limit = the_table()->table_size();
  12.222  
  12.223    for (;;) {
  12.224 @@ -803,7 +866,7 @@
  12.225      }
  12.226  
  12.227      int end_idx = MIN2(limit, start_idx + ClaimChunkSize);
  12.228 -    buckets_do(f, start_idx, end_idx);
  12.229 +    buckets_oops_do(f, start_idx, end_idx);
  12.230    }
  12.231  }
  12.232  
    13.1 --- a/src/share/vm/classfile/symbolTable.hpp	Thu Jan 30 14:30:01 2014 +0100
    13.2 +++ b/src/share/vm/classfile/symbolTable.hpp	Wed Feb 19 20:12:43 2014 -0800
    13.3 @@ -86,8 +86,8 @@
    13.4    static bool _needs_rehashing;
    13.5  
    13.6    // For statistics
    13.7 -  static int symbols_removed;
    13.8 -  static int symbols_counted;
    13.9 +  static int _symbols_removed;
   13.10 +  static int _symbols_counted;
   13.11  
   13.12    Symbol* allocate_symbol(const u1* name, int len, bool c_heap, TRAPS); // Assumes no characters larger than 0x7F
   13.13  
   13.14 @@ -121,6 +121,11 @@
   13.15    static Arena* arena() { return _arena; }  // called for statistics
   13.16  
   13.17    static void initialize_symbols(int arena_alloc_size = 0);
   13.18 +
   13.19 +  static volatile int _parallel_claimed_idx;
   13.20 +
   13.21 +  // Release any dead symbols
   13.22 +  static void buckets_unlink(int start_idx, int end_idx, int* processed, int* removed, size_t* memory_total);
   13.23  public:
   13.24    enum {
   13.25      symbol_alloc_batch_size = 8,
   13.26 @@ -177,7 +182,14 @@
   13.27                    unsigned int* hashValues, TRAPS);
   13.28  
   13.29    // Release any dead symbols
   13.30 -  static void unlink();
   13.31 +  static void unlink() {
   13.32 +    int processed = 0;
   13.33 +    int removed = 0;
   13.34 +    unlink(&processed, &removed);
   13.35 +  }
   13.36 +  static void unlink(int* processed, int* removed);
   13.37 +  // Release any dead symbols, possibly parallel version
   13.38 +  static void possibly_parallel_unlink(int* processed, int* removed);
   13.39  
   13.40    // iterate over symbols
   13.41    static void symbols_do(SymbolClosure *cl);
   13.42 @@ -235,6 +247,9 @@
   13.43    // Rehash the symbol table if it gets out of balance
   13.44    static void rehash_table();
   13.45    static bool needs_rehashing()         { return _needs_rehashing; }
   13.46 +  // Parallel chunked scanning
   13.47 +  static void clear_parallel_claimed_index() { _parallel_claimed_idx = 0; }
   13.48 +  static int parallel_claimed_index()        { return _parallel_claimed_idx; }
   13.49  };
   13.50  
   13.51  class StringTable : public Hashtable<oop, mtSymbol> {
   13.52 @@ -258,7 +273,10 @@
   13.53  
   13.54    // Apply the give oop closure to the entries to the buckets
   13.55    // in the range [start_idx, end_idx).
   13.56 -  static void buckets_do(OopClosure* f, int start_idx, int end_idx);
   13.57 +  static void buckets_oops_do(OopClosure* f, int start_idx, int end_idx);
   13.58 +  // Unlink or apply the give oop closure to the entries to the buckets
   13.59 +  // in the range [start_idx, end_idx).
   13.60 +  static void buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, int* processed, int* removed);
   13.61  
   13.62    StringTable() : Hashtable<oop, mtSymbol>((int)StringTableSize,
   13.63                                sizeof (HashtableEntry<oop, mtSymbol>)) {}
   13.64 @@ -280,15 +298,28 @@
   13.65  
   13.66    // GC support
   13.67    //   Delete pointers to otherwise-unreachable objects.
   13.68 -  static void unlink_or_oops_do(BoolObjectClosure* cl, OopClosure* f);
   13.69 +  static void unlink_or_oops_do(BoolObjectClosure* cl, OopClosure* f) {
   13.70 +    int processed = 0;
   13.71 +    int removed = 0;
   13.72 +    unlink_or_oops_do(cl, f, &processed, &removed);
   13.73 +  }
   13.74    static void unlink(BoolObjectClosure* cl) {
   13.75 -    unlink_or_oops_do(cl, NULL);
   13.76 +    int processed = 0;
   13.77 +    int removed = 0;
   13.78 +    unlink_or_oops_do(cl, NULL, &processed, &removed);
   13.79    }
   13.80 -
   13.81 +  static void unlink_or_oops_do(BoolObjectClosure* cl, OopClosure* f, int* processed, int* removed);
   13.82 +  static void unlink(BoolObjectClosure* cl, int* processed, int* removed) {
   13.83 +    unlink_or_oops_do(cl, NULL, processed, removed);
   13.84 +  }
   13.85    // Serially invoke "f->do_oop" on the locations of all oops in the table.
   13.86    static void oops_do(OopClosure* f);
   13.87  
   13.88 -  // Possibly parallel version of the above
   13.89 +  // Possibly parallel versions of the above
   13.90 +  static void possibly_parallel_unlink_or_oops_do(BoolObjectClosure* cl, OopClosure* f, int* processed, int* removed);
   13.91 +  static void possibly_parallel_unlink(BoolObjectClosure* cl, int* processed, int* removed) {
   13.92 +    possibly_parallel_unlink_or_oops_do(cl, NULL, processed, removed);
   13.93 +  }
   13.94    static void possibly_parallel_oops_do(OopClosure* f);
   13.95  
   13.96    // Hashing algorithm, used as the hash value used by the
   13.97 @@ -349,5 +380,6 @@
   13.98  
   13.99    // Parallel chunked scanning
  13.100    static void clear_parallel_claimed_index() { _parallel_claimed_idx = 0; }
  13.101 +  static int parallel_claimed_index() { return _parallel_claimed_idx; }
  13.102  };
  13.103  #endif // SHARE_VM_CLASSFILE_SYMBOLTABLE_HPP
    14.1 --- a/src/share/vm/code/dependencies.cpp	Thu Jan 30 14:30:01 2014 +0100
    14.2 +++ b/src/share/vm/code/dependencies.cpp	Wed Feb 19 20:12:43 2014 -0800
    14.3 @@ -1161,11 +1161,9 @@
    14.4  
    14.5    // We could also return false if m does not yet appear to be
    14.6    // executed, if the VM version supports this distinction also.
    14.7 +  // Default methods are considered "concrete" as well.
    14.8    return !m->is_abstract() &&
    14.9 -         !InstanceKlass::cast(m->method_holder())->is_interface();
   14.10 -         // TODO: investigate whether default methods should be
   14.11 -         // considered as "concrete" in this situation.  For now they
   14.12 -         // are not.
   14.13 +         !m->is_overpass(); // error functions aren't concrete
   14.14  }
   14.15  
   14.16  
    15.1 --- a/src/share/vm/gc_implementation/g1/bufferingOopClosure.hpp	Thu Jan 30 14:30:01 2014 +0100
    15.2 +++ b/src/share/vm/gc_implementation/g1/bufferingOopClosure.hpp	Wed Feb 19 20:12:43 2014 -0800
    15.3 @@ -98,116 +98,4 @@
    15.4      _closure_app_seconds(0.0) { }
    15.5  };
    15.6  
    15.7 -class BufferingOopsInGenClosure: public OopsInGenClosure {
    15.8 -  BufferingOopClosure _boc;
    15.9 -  OopsInGenClosure* _oc;
   15.10 - protected:
   15.11 -  template <class T> inline void do_oop_work(T* p) {
   15.12 -    assert(generation()->is_in_reserved((void*)p), "Must be in!");
   15.13 -    _boc.do_oop(p);
   15.14 -  }
   15.15 - public:
   15.16 -  BufferingOopsInGenClosure(OopsInGenClosure *oc) :
   15.17 -    _boc(oc), _oc(oc) {}
   15.18 -
   15.19 -  virtual void do_oop(narrowOop* p) { do_oop_work(p); }
   15.20 -  virtual void do_oop(oop* p)       { do_oop_work(p); }
   15.21 -
   15.22 -  void done() {
   15.23 -    _boc.done();
   15.24 -  }
   15.25 -
   15.26 -  double closure_app_seconds () {
   15.27 -    return _boc.closure_app_seconds();
   15.28 -  }
   15.29 -
   15.30 -  void set_generation(Generation* gen) {
   15.31 -    OopsInGenClosure::set_generation(gen);
   15.32 -    _oc->set_generation(gen);
   15.33 -  }
   15.34 -
   15.35 -  void reset_generation() {
   15.36 -    // Make sure we finish the current work with the current generation.
   15.37 -    _boc.done();
   15.38 -    OopsInGenClosure::reset_generation();
   15.39 -    _oc->reset_generation();
   15.40 -  }
   15.41 -
   15.42 -};
   15.43 -
   15.44 -
   15.45 -class BufferingOopsInHeapRegionClosure: public OopsInHeapRegionClosure {
   15.46 -private:
   15.47 -  enum PrivateConstants {
   15.48 -    BufferLength = 1024
   15.49 -  };
   15.50 -
   15.51 -  StarTask     _buffer[BufferLength];
   15.52 -  StarTask*    _buffer_top;
   15.53 -  StarTask*    _buffer_curr;
   15.54 -
   15.55 -  HeapRegion*  _hr_buffer[BufferLength];
   15.56 -  HeapRegion** _hr_curr;
   15.57 -
   15.58 -  OopsInHeapRegionClosure*  _oc;
   15.59 -  double                    _closure_app_seconds;
   15.60 -
   15.61 -  void process_buffer () {
   15.62 -
   15.63 -    assert((_hr_curr - _hr_buffer) == (_buffer_curr - _buffer),
   15.64 -           "the two lengths should be the same");
   15.65 -
   15.66 -    double start = os::elapsedTime();
   15.67 -    HeapRegion** hr_curr = _hr_buffer;
   15.68 -    HeapRegion*  hr_prev = NULL;
   15.69 -    for (StarTask* curr = _buffer; curr < _buffer_curr; ++curr) {
   15.70 -      HeapRegion* region = *hr_curr;
   15.71 -      if (region != hr_prev) {
   15.72 -        _oc->set_region(region);
   15.73 -        hr_prev = region;
   15.74 -      }
   15.75 -      if (curr->is_narrow()) {
   15.76 -        assert(UseCompressedOops, "Error");
   15.77 -        _oc->do_oop((narrowOop*)(*curr));
   15.78 -      } else {
   15.79 -        _oc->do_oop((oop*)(*curr));
   15.80 -      }
   15.81 -      ++hr_curr;
   15.82 -    }
   15.83 -    _buffer_curr = _buffer;
   15.84 -    _hr_curr = _hr_buffer;
   15.85 -    _closure_app_seconds += (os::elapsedTime() - start);
   15.86 -  }
   15.87 -
   15.88 -public:
   15.89 -  virtual void do_oop(narrowOop* p) { do_oop_work(p); }
   15.90 -  virtual void do_oop(      oop* p) { do_oop_work(p); }
   15.91 -
   15.92 -  template <class T> void do_oop_work(T* p) {
   15.93 -    if (_buffer_curr == _buffer_top) {
   15.94 -      assert(_hr_curr > _hr_buffer, "_hr_curr should be consistent with _buffer_curr");
   15.95 -      process_buffer();
   15.96 -    }
   15.97 -    StarTask new_ref(p);
   15.98 -    *_buffer_curr = new_ref;
   15.99 -    ++_buffer_curr;
  15.100 -    *_hr_curr = _from;
  15.101 -    ++_hr_curr;
  15.102 -  }
  15.103 -  void done () {
  15.104 -    if (_buffer_curr > _buffer) {
  15.105 -      assert(_hr_curr > _hr_buffer, "_hr_curr should be consistent with _buffer_curr");
  15.106 -      process_buffer();
  15.107 -    }
  15.108 -  }
  15.109 -  double closure_app_seconds () {
  15.110 -    return _closure_app_seconds;
  15.111 -  }
  15.112 -  BufferingOopsInHeapRegionClosure (OopsInHeapRegionClosure *oc) :
  15.113 -    _oc(oc),
  15.114 -    _buffer_curr(_buffer), _buffer_top(_buffer + BufferLength),
  15.115 -    _hr_curr(_hr_buffer),
  15.116 -    _closure_app_seconds(0.0) { }
  15.117 -};
  15.118 -
  15.119  #endif // SHARE_VM_GC_IMPLEMENTATION_G1_BUFFERINGOOPCLOSURE_HPP
    16.1 --- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Thu Jan 30 14:30:01 2014 +0100
    16.2 +++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Wed Feb 19 20:12:43 2014 -0800
    16.3 @@ -1619,7 +1619,6 @@
    16.4    }
    16.5  };
    16.6  
    16.7 -
    16.8  class G1ParVerifyFinalCountTask: public AbstractGangTask {
    16.9  protected:
   16.10    G1CollectedHeap* _g1h;
   16.11 @@ -2529,10 +2528,9 @@
   16.12      assert(!rp->discovery_enabled(), "Post condition");
   16.13    }
   16.14  
   16.15 -  // Now clean up stale oops in StringTable
   16.16 -  StringTable::unlink(&g1_is_alive);
   16.17 -  // Clean up unreferenced symbols in symbol table.
   16.18 -  SymbolTable::unlink();
   16.19 +  g1h->unlink_string_and_symbol_table(&g1_is_alive,
   16.20 +                                      /* process_strings */ false, // currently strings are always roots
   16.21 +                                      /* process_symbols */ true);
   16.22  }
   16.23  
   16.24  void ConcurrentMark::swapMarkBitMaps() {
    17.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Jan 30 14:30:01 2014 +0100
    17.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Wed Feb 19 20:12:43 2014 -0800
    17.3 @@ -1,5 +1,5 @@
    17.4  /*
    17.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
    17.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
    17.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    17.8   *
    17.9   * This code is free software; you can redistribute it and/or modify it
   17.10 @@ -50,8 +50,8 @@
   17.11  #include "gc_implementation/shared/gcTraceTime.hpp"
   17.12  #include "gc_implementation/shared/isGCActiveMark.hpp"
   17.13  #include "memory/gcLocker.inline.hpp"
   17.14 -#include "memory/genOopClosures.inline.hpp"
   17.15  #include "memory/generationSpec.hpp"
   17.16 +#include "memory/iterator.hpp"
   17.17  #include "memory/referenceProcessor.hpp"
   17.18  #include "oops/oop.inline.hpp"
   17.19  #include "oops/oop.pcgc.inline.hpp"
   17.20 @@ -1575,8 +1575,6 @@
   17.21  void
   17.22  G1CollectedHeap::
   17.23  resize_if_necessary_after_full_collection(size_t word_size) {
   17.24 -  assert(MinHeapFreeRatio <= MaxHeapFreeRatio, "sanity check");
   17.25 -
   17.26    // Include the current allocation, if any, and bytes that will be
   17.27    // pre-allocated to support collections, as "used".
   17.28    const size_t used_after_gc = used();
   17.29 @@ -3096,11 +3094,7 @@
   17.30    return NULL; // keep some compilers happy
   17.31  }
   17.32  
   17.33 -// TODO: VerifyRootsClosure extends OopsInGenClosure so that we can
   17.34 -//       pass it as the perm_blk to SharedHeap::process_strong_roots.
   17.35 -//       When process_strong_roots stop calling perm_blk->younger_refs_iterate
   17.36 -//       we can change this closure to extend the simpler OopClosure.
   17.37 -class VerifyRootsClosure: public OopsInGenClosure {
   17.38 +class VerifyRootsClosure: public OopClosure {
   17.39  private:
   17.40    G1CollectedHeap* _g1h;
   17.41    VerifyOption     _vo;
   17.42 @@ -3136,7 +3130,7 @@
   17.43    void do_oop(narrowOop* p) { do_oop_nv(p); }
   17.44  };
   17.45  
   17.46 -class G1VerifyCodeRootOopClosure: public OopsInGenClosure {
   17.47 +class G1VerifyCodeRootOopClosure: public OopClosure {
   17.48    G1CollectedHeap* _g1h;
   17.49    OopClosure* _root_cl;
   17.50    nmethod* _nm;
   17.51 @@ -4670,8 +4664,8 @@
   17.52    _during_initial_mark(_g1->g1_policy()->during_initial_mark_pause()),
   17.53    _mark_in_progress(_g1->mark_in_progress()) { }
   17.54  
   17.55 -template <bool do_gen_barrier, G1Barrier barrier, bool do_mark_object>
   17.56 -void G1ParCopyClosure<do_gen_barrier, barrier, do_mark_object>::mark_object(oop obj) {
   17.57 +template <G1Barrier barrier, bool do_mark_object>
   17.58 +void G1ParCopyClosure<barrier, do_mark_object>::mark_object(oop obj) {
   17.59  #ifdef ASSERT
   17.60    HeapRegion* hr = _g1->heap_region_containing(obj);
   17.61    assert(hr != NULL, "sanity");
   17.62 @@ -4682,8 +4676,8 @@
   17.63    _cm->grayRoot(obj, (size_t) obj->size(), _worker_id);
   17.64  }
   17.65  
   17.66 -template <bool do_gen_barrier, G1Barrier barrier, bool do_mark_object>
   17.67 -void G1ParCopyClosure<do_gen_barrier, barrier, do_mark_object>
   17.68 +template <G1Barrier barrier, bool do_mark_object>
   17.69 +void G1ParCopyClosure<barrier, do_mark_object>
   17.70    ::mark_forwarded_object(oop from_obj, oop to_obj) {
   17.71  #ifdef ASSERT
   17.72    assert(from_obj->is_forwarded(), "from obj should be forwarded");
   17.73 @@ -4706,8 +4700,8 @@
   17.74    _cm->grayRoot(to_obj, (size_t) from_obj->size(), _worker_id);
   17.75  }
   17.76  
   17.77 -template <bool do_gen_barrier, G1Barrier barrier, bool do_mark_object>
   17.78 -oop G1ParCopyClosure<do_gen_barrier, barrier, do_mark_object>
   17.79 +template <G1Barrier barrier, bool do_mark_object>
   17.80 +oop G1ParCopyClosure<barrier, do_mark_object>
   17.81    ::copy_to_survivor_space(oop old) {
   17.82    size_t word_sz = old->size();
   17.83    HeapRegion* from_region = _g1->heap_region_containing_raw(old);
   17.84 @@ -4803,13 +4797,11 @@
   17.85    }
   17.86  }
   17.87  
   17.88 -template <bool do_gen_barrier, G1Barrier barrier, bool do_mark_object>
   17.89 +template <G1Barrier barrier, bool do_mark_object>
   17.90  template <class T>
   17.91 -void G1ParCopyClosure<do_gen_barrier, barrier, do_mark_object>
   17.92 +void G1ParCopyClosure<barrier, do_mark_object>
   17.93  ::do_oop_work(T* p) {
   17.94    oop obj = oopDesc::load_decode_heap_oop(p);
   17.95 -  assert(barrier != G1BarrierRS || obj != NULL,
   17.96 -         "Precondition: G1BarrierRS implies obj is non-NULL");
   17.97  
   17.98    assert(_worker_id == _par_scan_state->queue_num(), "sanity");
   17.99  
  17.100 @@ -4829,10 +4821,7 @@
  17.101        mark_forwarded_object(obj, forwardee);
  17.102      }
  17.103  
  17.104 -    // When scanning the RS, we only care about objs in CS.
  17.105 -    if (barrier == G1BarrierRS) {
  17.106 -      _par_scan_state->update_rs(_from, p, _worker_id);
  17.107 -    } else if (barrier == G1BarrierKlass) {
  17.108 +    if (barrier == G1BarrierKlass) {
  17.109        do_klass_barrier(p, forwardee);
  17.110      }
  17.111    } else {
  17.112 @@ -4847,14 +4836,10 @@
  17.113    if (barrier == G1BarrierEvac && obj != NULL) {
  17.114      _par_scan_state->update_rs(_from, p, _worker_id);
  17.115    }
  17.116 -
  17.117 -  if (do_gen_barrier && obj != NULL) {
  17.118 -    par_do_barrier(p);
  17.119 -  }
  17.120 -}
  17.121 -
  17.122 -template void G1ParCopyClosure<false, G1BarrierEvac, false>::do_oop_work(oop* p);
  17.123 -template void G1ParCopyClosure<false, G1BarrierEvac, false>::do_oop_work(narrowOop* p);
  17.124 +}
  17.125 +
  17.126 +template void G1ParCopyClosure<G1BarrierEvac, false>::do_oop_work(oop* p);
  17.127 +template void G1ParCopyClosure<G1BarrierEvac, false>::do_oop_work(narrowOop* p);
  17.128  
  17.129  template <class T> void G1ParScanPartialArrayClosure::do_oop_nv(T* p) {
  17.130    assert(has_partial_array_mask(p), "invariant");
  17.131 @@ -5212,6 +5197,102 @@
  17.132    SharedHeap::process_weak_roots(root_closure, &roots_in_blobs);
  17.133  }
  17.134  
  17.135 +class G1StringSymbolTableUnlinkTask : public AbstractGangTask {
  17.136 +private:
  17.137 +  BoolObjectClosure* _is_alive;
  17.138 +  int _initial_string_table_size;
  17.139 +  int _initial_symbol_table_size;
  17.140 +
  17.141 +  bool  _process_strings;
  17.142 +  int _strings_processed;
  17.143 +  int _strings_removed;
  17.144 +
  17.145 +  bool  _process_symbols;
  17.146 +  int _symbols_processed;
  17.147 +  int _symbols_removed;
  17.148 +
  17.149 +  bool _do_in_parallel;
  17.150 +public:
  17.151 +  G1StringSymbolTableUnlinkTask(BoolObjectClosure* is_alive, bool process_strings, bool process_symbols) :
  17.152 +    AbstractGangTask("Par String/Symbol table unlink"), _is_alive(is_alive),
  17.153 +    _do_in_parallel(G1CollectedHeap::use_parallel_gc_threads()),
  17.154 +    _process_strings(process_strings), _strings_processed(0), _strings_removed(0),
  17.155 +    _process_symbols(process_symbols), _symbols_processed(0), _symbols_removed(0) {
  17.156 +
  17.157 +    _initial_string_table_size = StringTable::the_table()->table_size();
  17.158 +    _initial_symbol_table_size = SymbolTable::the_table()->table_size();
  17.159 +    if (process_strings) {
  17.160 +      StringTable::clear_parallel_claimed_index();
  17.161 +    }
  17.162 +    if (process_symbols) {
  17.163 +      SymbolTable::clear_parallel_claimed_index();
  17.164 +    }
  17.165 +  }
  17.166 +
  17.167 +  ~G1StringSymbolTableUnlinkTask() {
  17.168 +    guarantee(!_process_strings || !_do_in_parallel || StringTable::parallel_claimed_index() >= _initial_string_table_size,
  17.169 +              err_msg("claim value "INT32_FORMAT" after unlink less than initial string table size "INT32_FORMAT,
  17.170 +                      StringTable::parallel_claimed_index(), _initial_string_table_size));
  17.171 +    guarantee(!_process_symbols || !_do_in_parallel || SymbolTable::parallel_claimed_index() >= _initial_symbol_table_size,
  17.172 +              err_msg("claim value "INT32_FORMAT" after unlink less than initial symbol table size "INT32_FORMAT,
  17.173 +                      SymbolTable::parallel_claimed_index(), _initial_symbol_table_size));
  17.174 +  }
  17.175 +
  17.176 +  void work(uint worker_id) {
  17.177 +    if (_do_in_parallel) {
  17.178 +      int strings_processed = 0;
  17.179 +      int strings_removed = 0;
  17.180 +      int symbols_processed = 0;
  17.181 +      int symbols_removed = 0;
  17.182 +      if (_process_strings) {
  17.183 +        StringTable::possibly_parallel_unlink(_is_alive, &strings_processed, &strings_removed);
  17.184 +        Atomic::add(strings_processed, &_strings_processed);
  17.185 +        Atomic::add(strings_removed, &_strings_removed);
  17.186 +      }
  17.187 +      if (_process_symbols) {
  17.188 +        SymbolTable::possibly_parallel_unlink(&symbols_processed, &symbols_removed);
  17.189 +        Atomic::add(symbols_processed, &_symbols_processed);
  17.190 +        Atomic::add(symbols_removed, &_symbols_removed);
  17.191 +      }
  17.192 +    } else {
  17.193 +      if (_process_strings) {
  17.194 +        StringTable::unlink(_is_alive, &_strings_processed, &_strings_removed);
  17.195 +      }
  17.196 +      if (_process_symbols) {
  17.197 +        SymbolTable::unlink(&_symbols_processed, &_symbols_removed);
  17.198 +      }
  17.199 +    }
  17.200 +  }
  17.201 +
  17.202 +  size_t strings_processed() const { return (size_t)_strings_processed; }
  17.203 +  size_t strings_removed()   const { return (size_t)_strings_removed; }
  17.204 +
  17.205 +  size_t symbols_processed() const { return (size_t)_symbols_processed; }
  17.206 +  size_t symbols_removed()   const { return (size_t)_symbols_removed; }
  17.207 +};
  17.208 +
  17.209 +void G1CollectedHeap::unlink_string_and_symbol_table(BoolObjectClosure* is_alive,
  17.210 +                                                     bool process_strings, bool process_symbols) {
  17.211 +  uint n_workers = (G1CollectedHeap::use_parallel_gc_threads() ?
  17.212 +                   _g1h->workers()->active_workers() : 1);
  17.213 +
  17.214 +  G1StringSymbolTableUnlinkTask g1_unlink_task(is_alive, process_strings, process_symbols);
  17.215 +  if (G1CollectedHeap::use_parallel_gc_threads()) {
  17.216 +    set_par_threads(n_workers);
  17.217 +    workers()->run_task(&g1_unlink_task);
  17.218 +    set_par_threads(0);
  17.219 +  } else {
  17.220 +    g1_unlink_task.work(0);
  17.221 +  }
  17.222 +  if (G1TraceStringSymbolTableScrubbing) {
  17.223 +    gclog_or_tty->print_cr("Cleaned string and symbol table, "
  17.224 +                           "strings: "SIZE_FORMAT" processed, "SIZE_FORMAT" removed, "
  17.225 +                           "symbols: "SIZE_FORMAT" processed, "SIZE_FORMAT" removed",
  17.226 +                           g1_unlink_task.strings_processed(), g1_unlink_task.strings_removed(),
  17.227 +                           g1_unlink_task.symbols_processed(), g1_unlink_task.symbols_removed());
  17.228 +  }
  17.229 +}
  17.230 +
  17.231  // Weak Reference Processing support
  17.232  
  17.233  // An always "is_alive" closure that is used to preserve referents.
    18.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Thu Jan 30 14:30:01 2014 +0100
    18.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Wed Feb 19 20:12:43 2014 -0800
    18.3 @@ -209,7 +209,7 @@
    18.4    friend class OldGCAllocRegion;
    18.5  
    18.6    // Closures used in implementation.
    18.7 -  template <bool do_gen_barrier, G1Barrier barrier, bool do_mark_object>
    18.8 +  template <G1Barrier barrier, bool do_mark_object>
    18.9    friend class G1ParCopyClosure;
   18.10    friend class G1IsAliveClosure;
   18.11    friend class G1EvacuateFollowersClosure;
   18.12 @@ -1677,6 +1677,10 @@
   18.13    // after a full GC
   18.14    void rebuild_strong_code_roots();
   18.15  
   18.16 +  // Delete entries for dead interned string and clean up unreferenced symbols
   18.17 +  // in symbol table, possibly in parallel.
   18.18 +  void unlink_string_and_symbol_table(BoolObjectClosure* is_alive, bool unlink_strings = true, bool unlink_symbols = true);
   18.19 +
   18.20    // Verification
   18.21  
   18.22    // The following is just to alert the verification code
    19.1 --- a/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	Thu Jan 30 14:30:01 2014 +0100
    19.2 +++ b/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	Wed Feb 19 20:12:43 2014 -0800
    19.3 @@ -163,11 +163,8 @@
    19.4    // Prune dead klasses from subklass/sibling/implementor lists.
    19.5    Klass::clean_weak_klass_links(&GenMarkSweep::is_alive);
    19.6  
    19.7 -  // Delete entries for dead interned strings.
    19.8 -  StringTable::unlink(&GenMarkSweep::is_alive);
    19.9 -
   19.10 -  // Clean up unreferenced symbols in symbol table.
   19.11 -  SymbolTable::unlink();
   19.12 +  // Delete entries for dead interned string and clean up unreferenced symbols in symbol table.
   19.13 +  G1CollectedHeap::heap()->unlink_string_and_symbol_table(&GenMarkSweep::is_alive);
   19.14  
   19.15    if (VerifyDuringGC) {
   19.16      HandleMark hm;  // handle scope
    20.1 --- a/src/share/vm/gc_implementation/g1/g1OopClosures.hpp	Thu Jan 30 14:30:01 2014 +0100
    20.2 +++ b/src/share/vm/gc_implementation/g1/g1OopClosures.hpp	Wed Feb 19 20:12:43 2014 -0800
    20.3 @@ -1,5 +1,5 @@
    20.4  /*
    20.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
    20.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
    20.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    20.8   *
    20.9   * This code is free software; you can redistribute it and/or modify it
   20.10 @@ -38,7 +38,7 @@
   20.11  
   20.12  // A class that scans oops in a given heap region (much as OopsInGenClosure
   20.13  // scans oops in a generation.)
   20.14 -class OopsInHeapRegionClosure: public OopsInGenClosure {
   20.15 +class OopsInHeapRegionClosure: public ExtendedOopClosure {
   20.16  protected:
   20.17    HeapRegion* _from;
   20.18  public:
   20.19 @@ -86,13 +86,26 @@
   20.20  
   20.21  #define G1_PARTIAL_ARRAY_MASK 0x2
   20.22  
   20.23 -template <class T> inline bool has_partial_array_mask(T* ref) {
   20.24 +inline bool has_partial_array_mask(oop* ref) {
   20.25    return ((uintptr_t)ref & G1_PARTIAL_ARRAY_MASK) == G1_PARTIAL_ARRAY_MASK;
   20.26  }
   20.27  
   20.28 -template <class T> inline T* set_partial_array_mask(T obj) {
   20.29 +// We never encode partial array oops as narrowOop*, so return false immediately.
   20.30 +// This allows the compiler to create optimized code when popping references from
   20.31 +// the work queue.
   20.32 +inline bool has_partial_array_mask(narrowOop* ref) {
   20.33 +  assert(((uintptr_t)ref & G1_PARTIAL_ARRAY_MASK) != G1_PARTIAL_ARRAY_MASK, "Partial array oop reference encoded as narrowOop*");
   20.34 +  return false;
   20.35 +}
   20.36 +
   20.37 +// Only implement set_partial_array_mask() for regular oops, not for narrowOops.
   20.38 +// We always encode partial arrays as regular oop, to allow the
   20.39 +// specialization for has_partial_array_mask() for narrowOops above.
   20.40 +// This means that unintentional use of this method with narrowOops are caught
   20.41 +// by the compiler.
   20.42 +inline oop* set_partial_array_mask(oop obj) {
   20.43    assert(((uintptr_t)(void *)obj & G1_PARTIAL_ARRAY_MASK) == 0, "Information loss!");
   20.44 -  return (T*) ((uintptr_t)(void *)obj | G1_PARTIAL_ARRAY_MASK);
   20.45 +  return (oop*) ((uintptr_t)(void *)obj | G1_PARTIAL_ARRAY_MASK);
   20.46  }
   20.47  
   20.48  template <class T> inline oop clear_partial_array_mask(T* ref) {
   20.49 @@ -131,7 +144,7 @@
   20.50    template <class T> void do_klass_barrier(T* p, oop new_obj);
   20.51  };
   20.52  
   20.53 -template <bool do_gen_barrier, G1Barrier barrier, bool do_mark_object>
   20.54 +template <G1Barrier barrier, bool do_mark_object>
   20.55  class G1ParCopyClosure : public G1ParCopyHelper {
   20.56    G1ParScanClosure _scanner;
   20.57    template <class T> void do_oop_work(T* p);
   20.58 @@ -166,22 +179,16 @@
   20.59    virtual void do_oop(narrowOop* p) { do_oop_nv(p); }
   20.60  };
   20.61  
   20.62 -typedef G1ParCopyClosure<false, G1BarrierNone, false> G1ParScanExtRootClosure;
   20.63 -typedef G1ParCopyClosure<false, G1BarrierKlass, false> G1ParScanMetadataClosure;
   20.64 +typedef G1ParCopyClosure<G1BarrierNone, false> G1ParScanExtRootClosure;
   20.65 +typedef G1ParCopyClosure<G1BarrierKlass, false> G1ParScanMetadataClosure;
   20.66  
   20.67  
   20.68 -typedef G1ParCopyClosure<false, G1BarrierNone, true> G1ParScanAndMarkExtRootClosure;
   20.69 -typedef G1ParCopyClosure<true,  G1BarrierNone, true> G1ParScanAndMarkClosure;
   20.70 -typedef G1ParCopyClosure<false, G1BarrierKlass, true> G1ParScanAndMarkMetadataClosure;
   20.71 -
   20.72 -// The following closure types are no longer used but are retained
   20.73 -// for historical reasons:
   20.74 -// typedef G1ParCopyClosure<false, G1BarrierRS,   false> G1ParScanHeapRSClosure;
   20.75 -// typedef G1ParCopyClosure<false, G1BarrierRS,   true> G1ParScanAndMarkHeapRSClosure;
   20.76 +typedef G1ParCopyClosure<G1BarrierNone, true> G1ParScanAndMarkExtRootClosure;
   20.77 +typedef G1ParCopyClosure<G1BarrierKlass, true> G1ParScanAndMarkMetadataClosure;
   20.78  
   20.79  // The following closure type is defined in g1_specialized_oop_closures.hpp:
   20.80  //
   20.81 -// typedef G1ParCopyClosure<false, G1BarrierEvac, false> G1ParScanHeapEvacClosure;
   20.82 +// typedef G1ParCopyClosure<G1BarrierEvac, false> G1ParScanHeapEvacClosure;
   20.83  
   20.84  // We use a separate closure to handle references during evacuation
   20.85  // failure processing.
   20.86 @@ -189,7 +196,7 @@
   20.87  // (since that closure no longer assumes that the references it
   20.88  // handles point into the collection set).
   20.89  
   20.90 -typedef G1ParCopyClosure<false, G1BarrierEvac, false> G1ParScanHeapEvacFailureClosure;
   20.91 +typedef G1ParCopyClosure<G1BarrierEvac, false> G1ParScanHeapEvacFailureClosure;
   20.92  
   20.93  class FilterIntoCSClosure: public ExtendedOopClosure {
   20.94    G1CollectedHeap* _g1;
    21.1 --- a/src/share/vm/gc_implementation/g1/g1_globals.hpp	Thu Jan 30 14:30:01 2014 +0100
    21.2 +++ b/src/share/vm/gc_implementation/g1/g1_globals.hpp	Wed Feb 19 20:12:43 2014 -0800
    21.3 @@ -71,6 +71,9 @@
    21.4    diagnostic(bool, G1TraceConcRefinement, false,                            \
    21.5            "Trace G1 concurrent refinement")                                 \
    21.6                                                                              \
    21.7 +  experimental(bool, G1TraceStringSymbolTableScrubbing, false,              \
    21.8 +          "Trace information string and symbol table scrubbing.")           \
    21.9 +                                                                            \
   21.10    product(double, G1ConcMarkStepDurationMillis, 10.0,                       \
   21.11            "Target duration of individual concurrent marking steps "         \
   21.12            "in milliseconds.")                                               \
    22.1 --- a/src/share/vm/gc_implementation/g1/g1_specialized_oop_closures.hpp	Thu Jan 30 14:30:01 2014 +0100
    22.2 +++ b/src/share/vm/gc_implementation/g1/g1_specialized_oop_closures.hpp	Wed Feb 19 20:12:43 2014 -0800
    22.3 @@ -33,18 +33,17 @@
    22.4  // Forward declarations.
    22.5  enum G1Barrier {
    22.6    G1BarrierNone,
    22.7 -  G1BarrierRS,
    22.8    G1BarrierEvac,
    22.9    G1BarrierKlass
   22.10  };
   22.11  
   22.12 -template<bool do_gen_barrier, G1Barrier barrier, bool do_mark_object>
   22.13 +template<G1Barrier barrier, bool do_mark_object>
   22.14  class G1ParCopyClosure;
   22.15  
   22.16  class G1ParScanClosure;
   22.17  class G1ParPushHeapRSClosure;
   22.18  
   22.19 -typedef G1ParCopyClosure<false, G1BarrierEvac, false> G1ParScanHeapEvacClosure;
   22.20 +typedef G1ParCopyClosure<G1BarrierEvac, false> G1ParScanHeapEvacClosure;
   22.21  
   22.22  class FilterIntoCSClosure;
   22.23  class FilterOutOfRegionClosure;
    23.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.cpp	Thu Jan 30 14:30:01 2014 +0100
    23.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.cpp	Wed Feb 19 20:12:43 2014 -0800
    23.3 @@ -23,6 +23,7 @@
    23.4   */
    23.5  
    23.6  #include "precompiled.hpp"
    23.7 +#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
    23.8  #include "gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp"
    23.9  #include "gc_implementation/parallelScavenge/psGCAdaptivePolicyCounters.hpp"
   23.10  #include "gc_implementation/parallelScavenge/psScavenge.hpp"
   23.11 @@ -76,6 +77,38 @@
   23.12    _old_gen_policy_is_ready = false;
   23.13  }
   23.14  
   23.15 +size_t PSAdaptiveSizePolicy::calculate_free_based_on_live(size_t live, uintx ratio_as_percentage) {
   23.16 +  // We want to calculate how much free memory there can be based on the
   23.17 +  // amount of live data currently in the old gen. Using the formula:
   23.18 +  // ratio * (free + live) = free
   23.19 +  // Some equation solving later we get:
   23.20 +  // free = (live * ratio) / (1 - ratio)
   23.21 +
   23.22 +  const double ratio = ratio_as_percentage / 100.0;
   23.23 +  const double ratio_inverse = 1.0 - ratio;
   23.24 +  const double tmp = live * ratio;
   23.25 +  size_t free = (size_t)(tmp / ratio_inverse);
   23.26 +
   23.27 +  return free;
   23.28 +}
   23.29 +
   23.30 +size_t PSAdaptiveSizePolicy::calculated_old_free_size_in_bytes() const {
   23.31 +  size_t free_size = (size_t)(_promo_size + avg_promoted()->padded_average());
   23.32 +  size_t live = ParallelScavengeHeap::heap()->old_gen()->used_in_bytes();
   23.33 +
   23.34 +  if (MinHeapFreeRatio != 0) {
   23.35 +    size_t min_free = calculate_free_based_on_live(live, MinHeapFreeRatio);
   23.36 +    free_size = MAX2(free_size, min_free);
   23.37 +  }
   23.38 +
   23.39 +  if (MaxHeapFreeRatio != 100) {
   23.40 +    size_t max_free = calculate_free_based_on_live(live, MaxHeapFreeRatio);
   23.41 +    free_size = MIN2(max_free, free_size);
   23.42 +  }
   23.43 +
   23.44 +  return free_size;
   23.45 +}
   23.46 +
   23.47  void PSAdaptiveSizePolicy::major_collection_begin() {
   23.48    // Update the interval time
   23.49    _major_timer.stop();
   23.50 @@ -1292,3 +1325,18 @@
   23.51                            st,
   23.52                            PSScavenge::tenuring_threshold());
   23.53  }
   23.54 +
   23.55 +#ifndef PRODUCT
   23.56 +
   23.57 +void TestOldFreeSpaceCalculation_test() {
   23.58 +  assert(PSAdaptiveSizePolicy::calculate_free_based_on_live(100, 20) == 25, "Calculation of free memory failed");
   23.59 +  assert(PSAdaptiveSizePolicy::calculate_free_based_on_live(100, 50) == 100, "Calculation of free memory failed");
   23.60 +  assert(PSAdaptiveSizePolicy::calculate_free_based_on_live(100, 60) == 150, "Calculation of free memory failed");
   23.61 +  assert(PSAdaptiveSizePolicy::calculate_free_based_on_live(100, 75) == 300, "Calculation of free memory failed");
   23.62 +  assert(PSAdaptiveSizePolicy::calculate_free_based_on_live(400, 20) == 100, "Calculation of free memory failed");
   23.63 +  assert(PSAdaptiveSizePolicy::calculate_free_based_on_live(400, 50) == 400, "Calculation of free memory failed");
   23.64 +  assert(PSAdaptiveSizePolicy::calculate_free_based_on_live(400, 60) == 600, "Calculation of free memory failed");
   23.65 +  assert(PSAdaptiveSizePolicy::calculate_free_based_on_live(400, 75) == 1200, "Calculation of free memory failed");
   23.66 +}
   23.67 +
   23.68 +#endif /* !PRODUCT */
    24.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp	Thu Jan 30 14:30:01 2014 +0100
    24.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp	Wed Feb 19 20:12:43 2014 -0800
    24.3 @@ -240,7 +240,6 @@
    24.4    void major_collection_begin();
    24.5    void major_collection_end(size_t amount_live, GCCause::Cause gc_cause);
    24.6  
    24.7 -  //
    24.8    void tenured_allocation(size_t size) {
    24.9      _avg_pretenured->sample(size);
   24.10    }
   24.11 @@ -248,9 +247,9 @@
   24.12    // Accessors
   24.13    // NEEDS_CLEANUP   should use sizes.hpp
   24.14  
   24.15 -  size_t calculated_old_free_size_in_bytes() const {
   24.16 -    return (size_t)(_promo_size + avg_promoted()->padded_average());
   24.17 -  }
   24.18 +  static size_t calculate_free_based_on_live(size_t live, uintx ratio_as_percentage);
   24.19 +
   24.20 +  size_t calculated_old_free_size_in_bytes() const;
   24.21  
   24.22    size_t average_old_live_in_bytes() const {
   24.23      return (size_t) avg_old_live()->average();
    25.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	Thu Jan 30 14:30:01 2014 +0100
    25.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	Wed Feb 19 20:12:43 2014 -0800
    25.3 @@ -1,5 +1,5 @@
    25.4  /*
    25.5 - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
    25.6 + * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
    25.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    25.8   *
    25.9   * This code is free software; you can redistribute it and/or modify it
   25.10 @@ -466,10 +466,12 @@
   25.11        }
   25.12      }
   25.13  
   25.14 -    GCTraceTime tm("StringTable", false, false, &_gc_timer);
   25.15 -    // Unlink any dead interned Strings and process the remaining live ones.
   25.16 -    PSScavengeRootsClosure root_closure(promotion_manager);
   25.17 -    StringTable::unlink_or_oops_do(&_is_alive_closure, &root_closure);
   25.18 +    {
   25.19 +      GCTraceTime tm("StringTable", false, false, &_gc_timer);
   25.20 +      // Unlink any dead interned Strings and process the remaining live ones.
   25.21 +      PSScavengeRootsClosure root_closure(promotion_manager);
   25.22 +      StringTable::unlink_or_oops_do(&_is_alive_closure, &root_closure);
   25.23 +    }
   25.24  
   25.25      // Finally, flush the promotion_manager's labs, and deallocate its stacks.
   25.26      promotion_failure_occurred = PSPromotionManager::post_scavenge(_gc_tracer);
   25.27 @@ -527,8 +529,19 @@
   25.28            counters->update_survivor_overflowed(_survivor_overflow);
   25.29          }
   25.30  
   25.31 +        size_t max_young_size = young_gen->max_size();
   25.32 +
   25.33 +        // Deciding a free ratio in the young generation is tricky, so if
   25.34 +        // MinHeapFreeRatio or MaxHeapFreeRatio are in use (implicating
   25.35 +        // that the old generation size may have been limited because of them) we
   25.36 +        // should then limit our young generation size using NewRatio to have it
   25.37 +        // follow the old generation size.
   25.38 +        if (MinHeapFreeRatio != 0 || MaxHeapFreeRatio != 100) {
   25.39 +          max_young_size = MIN2(old_gen->capacity_in_bytes() / NewRatio, young_gen->max_size());
   25.40 +        }
   25.41 +
   25.42          size_t survivor_limit =
   25.43 -          size_policy->max_survivor_size(young_gen->max_size());
   25.44 +          size_policy->max_survivor_size(max_young_size);
   25.45          _tenuring_threshold =
   25.46            size_policy->compute_survivor_space_size_and_threshold(
   25.47                                                             _survivor_overflow,
   25.48 @@ -551,8 +564,7 @@
   25.49          // Do call at minor collections?
   25.50          // Don't check if the size_policy is ready at this
   25.51          // level.  Let the size_policy check that internally.
   25.52 -        if (UseAdaptiveSizePolicy &&
   25.53 -            UseAdaptiveGenerationSizePolicyAtMinorCollection &&
   25.54 +        if (UseAdaptiveGenerationSizePolicyAtMinorCollection &&
   25.55              ((gc_cause != GCCause::_java_lang_system_gc) ||
   25.56                UseAdaptiveSizePolicyWithSystemGC)) {
   25.57  
   25.58 @@ -566,7 +578,7 @@
   25.59            size_t eden_live = young_gen->eden_space()->used_in_bytes();
   25.60            size_t cur_eden = young_gen->eden_space()->capacity_in_bytes();
   25.61            size_t max_old_gen_size = old_gen->max_gen_size();
   25.62 -          size_t max_eden_size = young_gen->max_size() -
   25.63 +          size_t max_eden_size = max_young_size -
   25.64              young_gen->from_space()->capacity_in_bytes() -
   25.65              young_gen->to_space()->capacity_in_bytes();
   25.66  
    26.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psYoungGen.hpp	Thu Jan 30 14:30:01 2014 +0100
    26.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psYoungGen.hpp	Wed Feb 19 20:12:43 2014 -0800
    26.3 @@ -127,7 +127,7 @@
    26.4    void adjust_pointers();
    26.5    void compact();
    26.6  
    26.7 -  // Called during/after gc
    26.8 +  // Called during/after GC
    26.9    void swap_spaces();
   26.10  
   26.11    // Resize generation using suggested free space size and survivor size
   26.12 @@ -146,14 +146,14 @@
   26.13    size_t free_in_words() const;
   26.14  
   26.15    // The max this generation can grow to
   26.16 -  size_t max_size() const            { return _reserved.byte_size(); }
   26.17 +  size_t max_size() const { return _reserved.byte_size(); }
   26.18  
   26.19    // The max this generation can grow to if the boundary between
   26.20    // the generations are allowed to move.
   26.21    size_t gen_size_limit() const { return _max_gen_size; }
   26.22  
   26.23    bool is_maximal_no_gc() const {
   26.24 -    return true;  // never expands except at a GC
   26.25 +    return true;  // Never expands except at a GC
   26.26    }
   26.27  
   26.28    // Allocation
    27.1 --- a/src/share/vm/interpreter/linkResolver.cpp	Thu Jan 30 14:30:01 2014 +0100
    27.2 +++ b/src/share/vm/interpreter/linkResolver.cpp	Wed Feb 19 20:12:43 2014 -0800
    27.3 @@ -1,5 +1,5 @@
    27.4  /*
    27.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
    27.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
    27.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    27.8   *
    27.9   * This code is free software; you can redistribute it and/or modify it
   27.10 @@ -649,16 +649,6 @@
   27.11      }
   27.12    }
   27.13  
   27.14 -  if (nostatics && resolved_method->is_static()) {
   27.15 -    ResourceMark rm(THREAD);
   27.16 -    char buf[200];
   27.17 -    jio_snprintf(buf, sizeof(buf), "Expected instance not static method %s", Method::name_and_sig_as_C_string(resolved_klass(),
   27.18 -                                                      resolved_method->name(),
   27.19 -                                                      resolved_method->signature()));
   27.20 -    THROW_MSG(vmSymbols::java_lang_IncompatibleClassChangeError(), buf);
   27.21 -  }
   27.22 -
   27.23 -
   27.24    if (check_access) {
   27.25      // JDK8 adds non-public interface methods, and accessability check requirement
   27.26      assert(current_klass.not_null() , "current_klass should not be null");
   27.27 @@ -702,6 +692,15 @@
   27.28      }
   27.29    }
   27.30  
   27.31 +  if (nostatics && resolved_method->is_static()) {
   27.32 +    ResourceMark rm(THREAD);
   27.33 +    char buf[200];
   27.34 +    jio_snprintf(buf, sizeof(buf), "Expected instance not static method %s",
   27.35 +                 Method::name_and_sig_as_C_string(resolved_klass(),
   27.36 +                 resolved_method->name(), resolved_method->signature()));
   27.37 +    THROW_MSG(vmSymbols::java_lang_IncompatibleClassChangeError(), buf);
   27.38 +  }
   27.39 +
   27.40    if (TraceItables && Verbose) {
   27.41      ResourceMark rm(THREAD);
   27.42      tty->print("invokeinterface resolved method: caller-class:%s, compile-time-class:%s, method:%s, method_holder:%s, access_flags: ",
    28.1 --- a/src/share/vm/opto/c2_globals.hpp	Thu Jan 30 14:30:01 2014 +0100
    28.2 +++ b/src/share/vm/opto/c2_globals.hpp	Wed Feb 19 20:12:43 2014 -0800
    28.3 @@ -452,7 +452,7 @@
    28.4    notproduct(bool, PrintEliminateLocks, false,                              \
    28.5            "Print out when locks are eliminated")                            \
    28.6                                                                              \
    28.7 -  product(bool, EliminateAutoBox, true,                                     \
    28.8 +  product(bool, EliminateAutoBox, false,                                    \
    28.9            "Control optimizations for autobox elimination")                  \
   28.10                                                                              \
   28.11    experimental(bool, UseImplicitStableValues, false,                        \
    29.1 --- a/src/share/vm/prims/jni.cpp	Thu Jan 30 14:30:01 2014 +0100
    29.2 +++ b/src/share/vm/prims/jni.cpp	Wed Feb 19 20:12:43 2014 -0800
    29.3 @@ -5061,6 +5061,7 @@
    29.4  void TestMetaspaceAux_test();
    29.5  void TestMetachunk_test();
    29.6  void TestVirtualSpaceNode_test();
    29.7 +void TestOldFreeSpaceCalculation_test();
    29.8  #if INCLUDE_ALL_GCS
    29.9  void TestG1BiasedArray_test();
   29.10  #endif
   29.11 @@ -5081,6 +5082,7 @@
   29.12      run_unit_test(QuickSort::test_quick_sort());
   29.13      run_unit_test(AltHashing::test_alt_hash());
   29.14      run_unit_test(test_loggc_filename());
   29.15 +    run_unit_test(TestOldFreeSpaceCalculation_test());
   29.16  #if INCLUDE_VM_STRUCTS
   29.17      run_unit_test(VMStructs::test());
   29.18  #endif
    30.1 --- a/src/share/vm/prims/jvmtiEnvThreadState.cpp	Thu Jan 30 14:30:01 2014 +0100
    30.2 +++ b/src/share/vm/prims/jvmtiEnvThreadState.cpp	Wed Feb 19 20:12:43 2014 -0800
    30.3 @@ -1,5 +1,5 @@
    30.4  /*
    30.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
    30.6 + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
    30.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    30.8   *
    30.9   * This code is free software; you can redistribute it and/or modify it
   30.10 @@ -272,7 +272,7 @@
   30.11      // There can be a race condition between a VM_Operation reaching a safepoint
   30.12      // and the target thread exiting from Java execution.
   30.13      // We must recheck the last Java frame still exists.
   30.14 -    if (_thread->has_last_Java_frame()) {
   30.15 +    if (!_thread->is_exiting() && _thread->has_last_Java_frame()) {
   30.16        javaVFrame* vf = _thread->last_java_vframe(&rm);
   30.17        assert(vf != NULL, "must have last java frame");
   30.18        Method* method = vf->method();
    31.1 --- a/src/share/vm/prims/methodHandles.cpp	Thu Jan 30 14:30:01 2014 +0100
    31.2 +++ b/src/share/vm/prims/methodHandles.cpp	Wed Feb 19 20:12:43 2014 -0800
    31.3 @@ -175,8 +175,8 @@
    31.4  
    31.5  oop MethodHandles::init_method_MemberName(Handle mname, CallInfo& info) {
    31.6    assert(info.resolved_appendix().is_null(), "only normal methods here");
    31.7 -  KlassHandle receiver_limit = info.resolved_klass();
    31.8    methodHandle m = info.resolved_method();
    31.9 +  KlassHandle m_klass = m->method_holder();
   31.10    int flags = (jushort)( m->access_flags().as_short() & JVM_RECOGNIZED_METHOD_MODIFIERS );
   31.11    int vmindex = Method::invalid_vtable_index;
   31.12  
   31.13 @@ -184,14 +184,13 @@
   31.14    case CallInfo::itable_call:
   31.15      vmindex = info.itable_index();
   31.16      // More importantly, the itable index only works with the method holder.
   31.17 -    receiver_limit = m->method_holder();
   31.18 -    assert(receiver_limit->verify_itable_index(vmindex), "");
   31.19 +    assert(m_klass->verify_itable_index(vmindex), "");
   31.20      flags |= IS_METHOD | (JVM_REF_invokeInterface << REFERENCE_KIND_SHIFT);
   31.21      if (TraceInvokeDynamic) {
   31.22        ResourceMark rm;
   31.23 -      tty->print_cr("memberName: invokeinterface method_holder::method: %s, receiver: %s, itableindex: %d, access_flags:",
   31.24 -            Method::name_and_sig_as_C_string(receiver_limit(), m->name(), m->signature()),
   31.25 -            receiver_limit()->internal_name(), vmindex);
   31.26 +      tty->print_cr("memberName: invokeinterface method_holder::method: %s, itableindex: %d, access_flags:",
   31.27 +            Method::name_and_sig_as_C_string(m->method_holder(), m->name(), m->signature()),
   31.28 +            vmindex);
   31.29         m->access_flags().print_on(tty);
   31.30         if (!m->is_abstract()) {
   31.31           tty->print("default");
   31.32 @@ -203,12 +202,35 @@
   31.33    case CallInfo::vtable_call:
   31.34      vmindex = info.vtable_index();
   31.35      flags |= IS_METHOD | (JVM_REF_invokeVirtual << REFERENCE_KIND_SHIFT);
   31.36 -    assert(receiver_limit->is_subtype_of(m->method_holder()), "virtual call must be type-safe");
   31.37 +    assert(info.resolved_klass()->is_subtype_of(m_klass()), "virtual call must be type-safe");
   31.38 +    if (m_klass->is_interface()) {
   31.39 +      // This is a vtable call to an interface method (abstract "miranda method" or default method).
   31.40 +      // The vtable index is meaningless without a class (not interface) receiver type, so get one.
   31.41 +      // (LinkResolver should help us figure this out.)
   31.42 +      KlassHandle m_klass_non_interface = info.resolved_klass();
   31.43 +      if (m_klass_non_interface->is_interface()) {
   31.44 +        m_klass_non_interface = SystemDictionary::Object_klass();
   31.45 +#ifdef ASSERT
   31.46 +        { ResourceMark rm;
   31.47 +          Method* m2 = m_klass_non_interface->vtable()->method_at(vmindex);
   31.48 +          assert(m->name() == m2->name() && m->signature() == m2->signature(),
   31.49 +                 err_msg("at %d, %s != %s", vmindex,
   31.50 +                         m->name_and_sig_as_C_string(), m2->name_and_sig_as_C_string()));
   31.51 +        }
   31.52 +#endif //ASSERT
   31.53 +      }
   31.54 +      if (!m->is_public()) {
   31.55 +        assert(m->is_public(), "virtual call must be to public interface method");
   31.56 +        return NULL;  // elicit an error later in product build
   31.57 +      }
   31.58 +      assert(info.resolved_klass()->is_subtype_of(m_klass_non_interface()), "virtual call must be type-safe");
   31.59 +      m_klass = m_klass_non_interface;
   31.60 +    }
   31.61      if (TraceInvokeDynamic) {
   31.62        ResourceMark rm;
   31.63        tty->print_cr("memberName: invokevirtual method_holder::method: %s, receiver: %s, vtableindex: %d, access_flags:",
   31.64 -            Method::name_and_sig_as_C_string(receiver_limit(), m->name(), m->signature()),
   31.65 -            receiver_limit()->internal_name(), vmindex);
   31.66 +            Method::name_and_sig_as_C_string(m->method_holder(), m->name(), m->signature()),
   31.67 +            m_klass->internal_name(), vmindex);
   31.68         m->access_flags().print_on(tty);
   31.69         if (m->is_default_method()) {
   31.70           tty->print("default");
   31.71 @@ -223,10 +245,8 @@
   31.72        flags |= IS_METHOD      | (JVM_REF_invokeStatic  << REFERENCE_KIND_SHIFT);
   31.73      } else if (m->is_initializer()) {
   31.74        flags |= IS_CONSTRUCTOR | (JVM_REF_invokeSpecial << REFERENCE_KIND_SHIFT);
   31.75 -      assert(receiver_limit == m->method_holder(), "constructor call must be exactly typed");
   31.76      } else {
   31.77        flags |= IS_METHOD      | (JVM_REF_invokeSpecial << REFERENCE_KIND_SHIFT);
   31.78 -      assert(receiver_limit->is_subtype_of(m->method_holder()), "special call must be type-safe");
   31.79      }
   31.80      break;
   31.81  
   31.82 @@ -242,7 +262,7 @@
   31.83    java_lang_invoke_MemberName::set_flags(   mname_oop, flags);
   31.84    java_lang_invoke_MemberName::set_vmtarget(mname_oop, m());
   31.85    java_lang_invoke_MemberName::set_vmindex( mname_oop, vmindex);   // vtable/itable index
   31.86 -  java_lang_invoke_MemberName::set_clazz(   mname_oop, receiver_limit->java_mirror());
   31.87 +  java_lang_invoke_MemberName::set_clazz(   mname_oop, m_klass->java_mirror());
   31.88    // Note:  name and type can be lazily computed by resolve_MemberName,
   31.89    // if Java code needs them as resolved String and MethodType objects.
   31.90    // The clazz must be eagerly stored, because it provides a GC
   31.91 @@ -569,7 +589,7 @@
   31.92  // An unresolved member name is a mere symbolic reference.
   31.93  // Resolving it plants a vmtarget/vmindex in it,
   31.94  // which refers directly to JVM internals.
   31.95 -Handle MethodHandles::resolve_MemberName(Handle mname, TRAPS) {
   31.96 +Handle MethodHandles::resolve_MemberName(Handle mname, KlassHandle caller, TRAPS) {
   31.97    Handle empty;
   31.98    assert(java_lang_invoke_MemberName::is_instance(mname()), "");
   31.99  
  31.100 @@ -646,20 +666,20 @@
  31.101          assert(!HAS_PENDING_EXCEPTION, "");
  31.102          if (ref_kind == JVM_REF_invokeStatic) {
  31.103            LinkResolver::resolve_static_call(result,
  31.104 -                        defc, name, type, KlassHandle(), false, false, THREAD);
  31.105 +                        defc, name, type, caller, caller.not_null(), false, THREAD);
  31.106          } else if (ref_kind == JVM_REF_invokeInterface) {
  31.107            LinkResolver::resolve_interface_call(result, Handle(), defc,
  31.108 -                        defc, name, type, KlassHandle(), false, false, THREAD);
  31.109 +                        defc, name, type, caller, caller.not_null(), false, THREAD);
  31.110          } else if (mh_invoke_id != vmIntrinsics::_none) {
  31.111            assert(!is_signature_polymorphic_static(mh_invoke_id), "");
  31.112            LinkResolver::resolve_handle_call(result,
  31.113 -                        defc, name, type, KlassHandle(), THREAD);
  31.114 +                        defc, name, type, caller, THREAD);
  31.115          } else if (ref_kind == JVM_REF_invokeSpecial) {
  31.116            LinkResolver::resolve_special_call(result,
  31.117 -                        defc, name, type, KlassHandle(), false, THREAD);
  31.118 +                        defc, name, type, caller, caller.not_null(), THREAD);
  31.119          } else if (ref_kind == JVM_REF_invokeVirtual) {
  31.120            LinkResolver::resolve_virtual_call(result, Handle(), defc,
  31.121 -                        defc, name, type, KlassHandle(), false, false, THREAD);
  31.122 +                        defc, name, type, caller, caller.not_null(), false, THREAD);
  31.123          } else {
  31.124            assert(false, err_msg("ref_kind=%d", ref_kind));
  31.125          }
  31.126 @@ -683,7 +703,7 @@
  31.127          assert(!HAS_PENDING_EXCEPTION, "");
  31.128          if (name == vmSymbols::object_initializer_name()) {
  31.129            LinkResolver::resolve_special_call(result,
  31.130 -                        defc, name, type, KlassHandle(), false, THREAD);
  31.131 +                        defc, name, type, caller, caller.not_null(), THREAD);
  31.132          } else {
  31.133            break;                // will throw after end of switch
  31.134          }
  31.135 @@ -700,7 +720,7 @@
  31.136        fieldDescriptor result; // find_field initializes fd if found
  31.137        {
  31.138          assert(!HAS_PENDING_EXCEPTION, "");
  31.139 -        LinkResolver::resolve_field(result, defc, name, type, KlassHandle(), Bytecodes::_nop, false, false, THREAD);
  31.140 +        LinkResolver::resolve_field(result, defc, name, type, caller, Bytecodes::_nop, false, false, THREAD);
  31.141          if (HAS_PENDING_EXCEPTION) {
  31.142            return empty;
  31.143          }
  31.144 @@ -1121,7 +1141,11 @@
  31.145      }
  31.146    }
  31.147  
  31.148 -  Handle resolved = MethodHandles::resolve_MemberName(mname, CHECK_NULL);
  31.149 +  KlassHandle caller(THREAD,
  31.150 +                     caller_jh == NULL ? (Klass*) NULL :
  31.151 +                     java_lang_Class::as_Klass(JNIHandles::resolve_non_null(caller_jh)));
  31.152 +  Handle resolved = MethodHandles::resolve_MemberName(mname, caller, CHECK_NULL);
  31.153 +
  31.154    if (resolved.is_null()) {
  31.155      int flags = java_lang_invoke_MemberName::flags(mname());
  31.156      int ref_kind = (flags >> REFERENCE_KIND_SHIFT) & REFERENCE_KIND_MASK;
    32.1 --- a/src/share/vm/prims/methodHandles.hpp	Thu Jan 30 14:30:01 2014 +0100
    32.2 +++ b/src/share/vm/prims/methodHandles.hpp	Wed Feb 19 20:12:43 2014 -0800
    32.3 @@ -55,7 +55,7 @@
    32.4  
    32.5   public:
    32.6    // working with member names
    32.7 -  static Handle resolve_MemberName(Handle mname, TRAPS); // compute vmtarget/vmindex from name/type
    32.8 +  static Handle resolve_MemberName(Handle mname, KlassHandle caller, TRAPS); // compute vmtarget/vmindex from name/type
    32.9    static void expand_MemberName(Handle mname, int suppress, TRAPS);  // expand defc/name/type if missing
   32.10    static Handle new_MemberName(TRAPS);  // must be followed by init_MemberName
   32.11    static oop init_MemberName(Handle mname_h, Handle target_h); // compute vmtarget/vmindex from target
    33.1 --- a/src/share/vm/runtime/arguments.cpp	Thu Jan 30 14:30:01 2014 +0100
    33.2 +++ b/src/share/vm/runtime/arguments.cpp	Wed Feb 19 20:12:43 2014 -0800
    33.3 @@ -1572,6 +1572,16 @@
    33.4      vm_exit(1);
    33.5    }
    33.6  
    33.7 +  if (UseAdaptiveSizePolicy) {
    33.8 +    // We don't want to limit adaptive heap sizing's freedom to adjust the heap
    33.9 +    // unless the user actually sets these flags.
   33.10 +    if (FLAG_IS_DEFAULT(MinHeapFreeRatio)) {
   33.11 +      FLAG_SET_DEFAULT(MinHeapFreeRatio, 0);
   33.12 +    }
   33.13 +    if (FLAG_IS_DEFAULT(MaxHeapFreeRatio)) {
   33.14 +      FLAG_SET_DEFAULT(MaxHeapFreeRatio, 100);
   33.15 +    }
   33.16 +  }
   33.17  
   33.18    // If InitialSurvivorRatio or MinSurvivorRatio were not specified, but the
   33.19    // SurvivorRatio has been set, reset their default values to SurvivorRatio +
   33.20 @@ -1847,7 +1857,7 @@
   33.21  }
   33.22  
   33.23  bool Arguments::verify_percentage(uintx value, const char* name) {
   33.24 -  if (value <= 100) {
   33.25 +  if (is_percentage(value)) {
   33.26      return true;
   33.27    }
   33.28    jio_fprintf(defaultStream::error_stream(),
   33.29 @@ -1935,6 +1945,34 @@
   33.30    return count_p < 2 && count_t < 2;
   33.31  }
   33.32  
   33.33 +bool Arguments::verify_MinHeapFreeRatio(FormatBuffer<80>& err_msg, uintx min_heap_free_ratio) {
   33.34 +  if (!is_percentage(min_heap_free_ratio)) {
   33.35 +    err_msg.print("MinHeapFreeRatio must have a value between 0 and 100");
   33.36 +    return false;
   33.37 +  }
   33.38 +  if (min_heap_free_ratio > MaxHeapFreeRatio) {
   33.39 +    err_msg.print("MinHeapFreeRatio (" UINTX_FORMAT ") must be less than or "
   33.40 +                  "equal to MaxHeapFreeRatio (" UINTX_FORMAT ")", min_heap_free_ratio,
   33.41 +                  MaxHeapFreeRatio);
   33.42 +    return false;
   33.43 +  }
   33.44 +  return true;
   33.45 +}
   33.46 +
   33.47 +bool Arguments::verify_MaxHeapFreeRatio(FormatBuffer<80>& err_msg, uintx max_heap_free_ratio) {
   33.48 +  if (!is_percentage(max_heap_free_ratio)) {
   33.49 +    err_msg.print("MaxHeapFreeRatio must have a value between 0 and 100");
   33.50 +    return false;
   33.51 +  }
   33.52 +  if (max_heap_free_ratio < MinHeapFreeRatio) {
   33.53 +    err_msg.print("MaxHeapFreeRatio (" UINTX_FORMAT ") must be greater than or "
   33.54 +                  "equal to MinHeapFreeRatio (" UINTX_FORMAT ")", max_heap_free_ratio,
   33.55 +                  MinHeapFreeRatio);
   33.56 +    return false;
   33.57 +  }
   33.58 +  return true;
   33.59 +}
   33.60 +
   33.61  // Check consistency of GC selection
   33.62  bool Arguments::check_gc_consistency() {
   33.63    check_gclog_consistency();
   33.64 @@ -2040,8 +2078,6 @@
   33.65    status = status && verify_interval(AdaptiveSizePolicyWeight, 0, 100,
   33.66                                "AdaptiveSizePolicyWeight");
   33.67    status = status && verify_percentage(ThresholdTolerance, "ThresholdTolerance");
   33.68 -  status = status && verify_percentage(MinHeapFreeRatio, "MinHeapFreeRatio");
   33.69 -  status = status && verify_percentage(MaxHeapFreeRatio, "MaxHeapFreeRatio");
   33.70  
   33.71    // Divide by bucket size to prevent a large size from causing rollover when
   33.72    // calculating amount of memory needed to be allocated for the String table.
   33.73 @@ -2051,15 +2087,19 @@
   33.74    status = status && verify_interval(SymbolTableSize, minimumSymbolTableSize,
   33.75      (max_uintx / SymbolTable::bucket_size()), "SymbolTable size");
   33.76  
   33.77 -  if (MinHeapFreeRatio > MaxHeapFreeRatio) {
   33.78 -    jio_fprintf(defaultStream::error_stream(),
   33.79 -                "MinHeapFreeRatio (" UINTX_FORMAT ") must be less than or "
   33.80 -                "equal to MaxHeapFreeRatio (" UINTX_FORMAT ")\n",
   33.81 -                MinHeapFreeRatio, MaxHeapFreeRatio);
   33.82 -    status = false;
   33.83 +  {
   33.84 +    // Using "else if" below to avoid printing two error messages if min > max.
   33.85 +    // This will also prevent us from reporting both min>100 and max>100 at the
   33.86 +    // same time, but that is less annoying than printing two identical errors IMHO.
   33.87 +    FormatBuffer<80> err_msg("");
   33.88 +    if (!verify_MinHeapFreeRatio(err_msg, MinHeapFreeRatio)) {
   33.89 +      jio_fprintf(defaultStream::error_stream(), "%s\n", err_msg.buffer());
   33.90 +      status = false;
   33.91 +    } else if (!verify_MaxHeapFreeRatio(err_msg, MaxHeapFreeRatio)) {
   33.92 +      jio_fprintf(defaultStream::error_stream(), "%s\n", err_msg.buffer());
   33.93 +      status = false;
   33.94 +    }
   33.95    }
   33.96 -  // Keeping the heap 100% free is hard ;-) so limit it to 99%.
   33.97 -  MinHeapFreeRatio = MIN2(MinHeapFreeRatio, (uintx) 99);
   33.98  
   33.99    // Min/MaxMetaspaceFreeRatio
  33.100    status = status && verify_percentage(MinMetaspaceFreeRatio, "MinMetaspaceFreeRatio");
  33.101 @@ -2692,7 +2732,7 @@
  33.102      } else if (match_option(option, "-Xmaxf", &tail)) {
  33.103        char* err;
  33.104        int maxf = (int)(strtod(tail, &err) * 100);
  33.105 -      if (*err != '\0' || maxf < 0 || maxf > 100) {
  33.106 +      if (*err != '\0' || *tail == '\0' || maxf < 0 || maxf > 100) {
  33.107          jio_fprintf(defaultStream::error_stream(),
  33.108                      "Bad max heap free percentage size: %s\n",
  33.109                      option->optionString);
  33.110 @@ -2704,7 +2744,7 @@
  33.111      } else if (match_option(option, "-Xminf", &tail)) {
  33.112        char* err;
  33.113        int minf = (int)(strtod(tail, &err) * 100);
  33.114 -      if (*err != '\0' || minf < 0 || minf > 100) {
  33.115 +      if (*err != '\0' || *tail == '\0' || minf < 0 || minf > 100) {
  33.116          jio_fprintf(defaultStream::error_stream(),
  33.117                      "Bad min heap free percentage size: %s\n",
  33.118                      option->optionString);
  33.119 @@ -3649,9 +3689,9 @@
  33.120    // Set per-collector flags
  33.121    if (UseParallelGC || UseParallelOldGC) {
  33.122      set_parallel_gc_flags();
  33.123 -  } else if (UseConcMarkSweepGC) { // should be done before ParNew check below
  33.124 +  } else if (UseConcMarkSweepGC) { // Should be done before ParNew check below
  33.125      set_cms_and_parnew_gc_flags();
  33.126 -  } else if (UseParNewGC) {  // skipped if CMS is set above
  33.127 +  } else if (UseParNewGC) {  // Skipped if CMS is set above
  33.128      set_parnew_gc_flags();
  33.129    } else if (UseG1GC) {
  33.130      set_g1_gc_flags();
  33.131 @@ -3665,6 +3705,10 @@
  33.132                " using -XX:ParallelGCThreads=N");
  33.133      }
  33.134    }
  33.135 +  if (MinHeapFreeRatio == 100) {
  33.136 +    // Keeping the heap 100% free is hard ;-) so limit it to 99%.
  33.137 +    FLAG_SET_ERGO(uintx, MinHeapFreeRatio, 99);
  33.138 +  }
  33.139  #else // INCLUDE_ALL_GCS
  33.140    assert(verify_serial_gc_flags(), "SerialGC unset");
  33.141  #endif // INCLUDE_ALL_GCS
    34.1 --- a/src/share/vm/runtime/arguments.hpp	Thu Jan 30 14:30:01 2014 +0100
    34.2 +++ b/src/share/vm/runtime/arguments.hpp	Wed Feb 19 20:12:43 2014 -0800
    34.3 @@ -27,6 +27,7 @@
    34.4  
    34.5  #include "runtime/java.hpp"
    34.6  #include "runtime/perfData.hpp"
    34.7 +#include "utilities/debug.hpp"
    34.8  #include "utilities/top.hpp"
    34.9  
   34.10  // Arguments parses the command line and recognizes options
   34.11 @@ -370,11 +371,16 @@
   34.12    static jint parse_vm_init_args(const JavaVMInitArgs* args);
   34.13    static jint parse_each_vm_init_arg(const JavaVMInitArgs* args, SysClassPath* scp_p, bool* scp_assembly_required_p, Flag::Flags origin);
   34.14    static jint finalize_vm_init_args(SysClassPath* scp_p, bool scp_assembly_required);
   34.15 -  static bool is_bad_option(const JavaVMOption* option, jboolean ignore,
   34.16 -    const char* option_type);
   34.17 +  static bool is_bad_option(const JavaVMOption* option, jboolean ignore, const char* option_type);
   34.18 +
   34.19    static bool is_bad_option(const JavaVMOption* option, jboolean ignore) {
   34.20      return is_bad_option(option, ignore, NULL);
   34.21    }
   34.22 +
   34.23 +  static bool is_percentage(uintx val) {
   34.24 +    return val <= 100;
   34.25 +  }
   34.26 +
   34.27    static bool verify_interval(uintx val, uintx min,
   34.28                                uintx max, const char* name);
   34.29    static bool verify_min_value(intx val, intx min, const char* name);
   34.30 @@ -440,6 +446,15 @@
   34.31    static jint apply_ergo();
   34.32    // Adjusts the arguments after the OS have adjusted the arguments
   34.33    static jint adjust_after_os();
   34.34 +
   34.35 +  // Verifies that the given value will fit as a MinHeapFreeRatio. If not, an error
   34.36 +  // message is returned in the provided buffer.
   34.37 +  static bool verify_MinHeapFreeRatio(FormatBuffer<80>& err_msg, uintx min_heap_free_ratio);
   34.38 +
   34.39 +  // Verifies that the given value will fit as a MaxHeapFreeRatio. If not, an error
   34.40 +  // message is returned in the provided buffer.
   34.41 +  static bool verify_MaxHeapFreeRatio(FormatBuffer<80>& err_msg, uintx max_heap_free_ratio);
   34.42 +
   34.43    // Check for consistency in the selection of the garbage collector.
   34.44    static bool check_gc_consistency();
   34.45    static void check_deprecated_gcs();
    35.1 --- a/src/share/vm/runtime/globals.hpp	Thu Jan 30 14:30:01 2014 +0100
    35.2 +++ b/src/share/vm/runtime/globals.hpp	Wed Feb 19 20:12:43 2014 -0800
    35.3 @@ -3158,15 +3158,15 @@
    35.4            "Maximum size of class area in Metaspace when compressed "        \
    35.5            "class pointers are used")                                        \
    35.6                                                                              \
    35.7 -  product(uintx, MinHeapFreeRatio,    40,                                   \
    35.8 +  manageable(uintx, MinHeapFreeRatio, 40,                                   \
    35.9            "The minimum percentage of heap free after GC to avoid expansion."\
   35.10 -          " For most GCs this applies to the old generation. In G1 it"      \
   35.11 -          " applies to the whole heap. Not supported by ParallelGC.")       \
   35.12 -                                                                            \
   35.13 -  product(uintx, MaxHeapFreeRatio,    70,                                   \
   35.14 +          " For most GCs this applies to the old generation. In G1 and"     \
   35.15 +          " ParallelGC it applies to the whole heap.")                      \
   35.16 +                                                                            \
   35.17 +  manageable(uintx, MaxHeapFreeRatio, 70,                                   \
   35.18            "The maximum percentage of heap free after GC to avoid shrinking."\
   35.19 -          " For most GCs this applies to the old generation. In G1 it"      \
   35.20 -          " applies to the whole heap. Not supported by ParallelGC.")       \
   35.21 +          " For most GCs this applies to the old generation. In G1 and"     \
   35.22 +          " ParallelGC it applies to the whole heap.")                      \
   35.23                                                                              \
   35.24    product(intx, SoftRefLRUPolicyMSPerMB, 1000,                              \
   35.25            "Number of milliseconds per MB of free space in the heap")        \
    36.1 --- a/src/share/vm/runtime/os.cpp	Thu Jan 30 14:30:01 2014 +0100
    36.2 +++ b/src/share/vm/runtime/os.cpp	Wed Feb 19 20:12:43 2014 -0800
    36.3 @@ -1264,9 +1264,6 @@
    36.4          "%/lib/jce.jar:"
    36.5          "%/lib/charsets.jar:"
    36.6          "%/lib/jfr.jar:"
    36.7 -#ifdef __APPLE__
    36.8 -        "%/lib/JObjC.jar:"
    36.9 -#endif
   36.10          "%/classes";
   36.11      char* sysclasspath = format_boot_path(classpath_format, home, home_len, fileSep, pathSep);
   36.12      if (sysclasspath == NULL) return false;
    37.1 --- a/src/share/vm/runtime/perfMemory.cpp	Thu Jan 30 14:30:01 2014 +0100
    37.2 +++ b/src/share/vm/runtime/perfMemory.cpp	Wed Feb 19 20:12:43 2014 -0800
    37.3 @@ -1,5 +1,5 @@
    37.4  /*
    37.5 - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
    37.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
    37.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    37.8   *
    37.9   * This code is free software; you can redistribute it and/or modify it
   37.10 @@ -155,7 +155,7 @@
   37.11  
   37.12  void PerfMemory::destroy() {
   37.13  
   37.14 -  assert(_prologue != NULL, "prologue pointer must be initialized");
   37.15 +  if (_prologue == NULL) return;
   37.16  
   37.17    if (_start != NULL && _prologue->overflow != 0) {
   37.18  
    38.1 --- a/src/share/vm/services/attachListener.cpp	Thu Jan 30 14:30:01 2014 +0100
    38.2 +++ b/src/share/vm/services/attachListener.cpp	Wed Feb 19 20:12:43 2014 -0800
    38.3 @@ -282,6 +282,20 @@
    38.4        return JNI_ERR;
    38.5      }
    38.6    }
    38.7 +
    38.8 +  if (strncmp(name, "MaxHeapFreeRatio", 17) == 0) {
    38.9 +    FormatBuffer<80> err_msg("");
   38.10 +    if (!Arguments::verify_MaxHeapFreeRatio(err_msg, value)) {
   38.11 +      out->print_cr(err_msg.buffer());
   38.12 +      return JNI_ERR;
   38.13 +    }
   38.14 +  } else if (strncmp(name, "MinHeapFreeRatio", 17) == 0) {
   38.15 +    FormatBuffer<80> err_msg("");
   38.16 +    if (!Arguments::verify_MinHeapFreeRatio(err_msg, value)) {
   38.17 +      out->print_cr(err_msg.buffer());
   38.18 +      return JNI_ERR;
   38.19 +    }
   38.20 +  }
   38.21    bool res = CommandLineFlags::uintxAtPut((char*)name, &value, Flag::ATTACH_ON_DEMAND);
   38.22    if (! res) {
   38.23      out->print_cr("setting flag %s failed", name);
    39.1 --- a/src/share/vm/services/management.cpp	Thu Jan 30 14:30:01 2014 +0100
    39.2 +++ b/src/share/vm/services/management.cpp	Wed Feb 19 20:12:43 2014 -0800
    39.3 @@ -1830,6 +1830,18 @@
    39.4      succeed = CommandLineFlags::intxAtPut(name, &ivalue, Flag::MANAGEMENT);
    39.5    } else if (flag->is_uintx()) {
    39.6      uintx uvalue = (uintx)new_value.j;
    39.7 +
    39.8 +    if (strncmp(name, "MaxHeapFreeRatio", 17) == 0) {
    39.9 +      FormatBuffer<80> err_msg("");
   39.10 +      if (!Arguments::verify_MaxHeapFreeRatio(err_msg, uvalue)) {
   39.11 +        THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), err_msg.buffer());
   39.12 +      }
   39.13 +    } else if (strncmp(name, "MinHeapFreeRatio", 17) == 0) {
   39.14 +      FormatBuffer<80> err_msg("");
   39.15 +      if (!Arguments::verify_MinHeapFreeRatio(err_msg, uvalue)) {
   39.16 +        THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), err_msg.buffer());
   39.17 +      }
   39.18 +    }
   39.19      succeed = CommandLineFlags::uintxAtPut(name, &uvalue, Flag::MANAGEMENT);
   39.20    } else if (flag->is_uint64_t()) {
   39.21      uint64_t uvalue = (uint64_t)new_value.j;
    40.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    40.2 +++ b/test/compiler/codegen/LoadWithMask.java	Wed Feb 19 20:12:43 2014 -0800
    40.3 @@ -0,0 +1,44 @@
    40.4 +/*
    40.5 + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
    40.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    40.7 + *
    40.8 + * This code is free software; you can redistribute it and/or modify it
    40.9 + * under the terms of the GNU General Public License version 2 only, as
   40.10 + * published by the Free Software Foundation.
   40.11 + *
   40.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   40.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   40.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   40.15 + * version 2 for more details (a copy is included in the LICENSE file that
   40.16 + * accompanied this code).
   40.17 + *
   40.18 + * You should have received a copy of the GNU General Public License version
   40.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   40.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   40.21 + *
   40.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   40.23 + * or visit www.oracle.com if you need additional information or have any
   40.24 + * questions.
   40.25 + */
   40.26 +
   40.27 +/*
   40.28 + * @test
   40.29 + * @bug 8032207
   40.30 + * @summary Invalid node sizing for loadUS2L_immI16 and loadI2L_immI
   40.31 + * @run main/othervm -server -Xbatch -XX:-TieredCompilation -XX:CompileCommand=compileonly,LoadWithMask.foo LoadWithMask
   40.32 + *
   40.33 + */
   40.34 +public class LoadWithMask {
   40.35 +  static int x[] = new int[1];
   40.36 +  static long foo() {
   40.37 +    return x[0] & 0xfff0ffff;
   40.38 +  }
   40.39 +
   40.40 +  public static void main(String[] args) {
   40.41 +    x[0] = -1;
   40.42 +    long l = 0;
   40.43 +    for (int i = 0; i < 100000; ++i) {
   40.44 +      l = foo();
   40.45 +    }
   40.46 +  }
   40.47 +}
    41.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    41.2 +++ b/test/compiler/codegen/LoadWithMask2.java	Wed Feb 19 20:12:43 2014 -0800
    41.3 @@ -0,0 +1,55 @@
    41.4 +/*
    41.5 + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
    41.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    41.7 + *
    41.8 + * This code is free software; you can redistribute it and/or modify it
    41.9 + * under the terms of the GNU General Public License version 2 only, as
   41.10 + * published by the Free Software Foundation.
   41.11 + *
   41.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   41.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   41.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   41.15 + * version 2 for more details (a copy is included in the LICENSE file that
   41.16 + * accompanied this code).
   41.17 + *
   41.18 + * You should have received a copy of the GNU General Public License version
   41.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   41.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   41.21 + *
   41.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   41.23 + * or visit www.oracle.com if you need additional information or have any
   41.24 + * questions.
   41.25 + */
   41.26 +
   41.27 +/*
   41.28 + * @test
   41.29 + * @bug 8031743
   41.30 + * @summary loadI2L_immI broken for negative memory values
   41.31 + * @run main/othervm -server -Xbatch -XX:-TieredCompilation -XX:CompileCommand=compileonly,*.foo* LoadWithMask2
   41.32 + *
   41.33 + */
   41.34 +public class LoadWithMask2 {
   41.35 +  static int x;
   41.36 +  static long foo1() {
   41.37 +    return x & 0xfffffffe;
   41.38 +  }
   41.39 +  static long foo2() {
   41.40 +    return x & 0xff000000;
   41.41 +  }
   41.42 +  static long foo3() {
   41.43 +    return x & 0x8abcdef1;
   41.44 +  }
   41.45 +
   41.46 +  public static void main(String[] args) {
   41.47 +    x = -1;
   41.48 +    long l = 0;
   41.49 +    for (int i = 0; i < 100000; ++i) {
   41.50 +      l = foo1() & foo2() & foo3();
   41.51 +    }
   41.52 +    if (l > 0) {
   41.53 +      System.out.println("FAILED");
   41.54 +      System.exit(97);
   41.55 +    }
   41.56 +    System.out.println("PASSED");
   41.57 +  }
   41.58 +}
    42.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    42.2 +++ b/test/compiler/inlining/DefaultAndConcreteMethodsCHA.java	Wed Feb 19 20:12:43 2014 -0800
    42.3 @@ -0,0 +1,58 @@
    42.4 +/*
    42.5 + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
    42.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    42.7 + *
    42.8 + * This code is free software; you can redistribute it and/or modify it
    42.9 + * under the terms of the GNU General Public License version 2 only, as
   42.10 + * published by the Free Software Foundation.
   42.11 + *
   42.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   42.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   42.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   42.15 + * version 2 for more details (a copy is included in the LICENSE file that
   42.16 + * accompanied this code).
   42.17 + *
   42.18 + * You should have received a copy of the GNU General Public License version
   42.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   42.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   42.21 + *
   42.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   42.23 + * or visit www.oracle.com if you need additional information or have any
   42.24 + * questions.
   42.25 + */
   42.26 +
   42.27 +/**
   42.28 + * @test
   42.29 + * @bug 8031695
   42.30 + * @summary CHA ignores default methods during analysis leading to incorrect code generation
   42.31 + *
   42.32 + * @run main/othervm -Xbatch DefaultAndConcreteMethodsCHA
   42.33 + */
   42.34 +interface I {
   42.35 +    default int m() { return 0; }
   42.36 +}
   42.37 +
   42.38 +class A implements I {}
   42.39 +
   42.40 +class C extends A { }
   42.41 +class D extends A { public int m() { return 1; } }
   42.42 +
   42.43 +public class DefaultAndConcreteMethodsCHA {
   42.44 +    public static int test(A obj) {
   42.45 +        return obj.m();
   42.46 +    }
   42.47 +    public static void main(String[] args) {
   42.48 +        for (int i = 0; i < 10000; i++) {
   42.49 +            int idC = test(new C());
   42.50 +            if (idC != 0) {
   42.51 +                throw new Error("C.m didn't invoke I.m: id "+idC);
   42.52 +            }
   42.53 +
   42.54 +            int idD = test(new D());
   42.55 +            if (idD != 1) {
   42.56 +                throw new Error("D.m didn't invoke D.m: id "+idD);
   42.57 +            }
   42.58 +        }
   42.59 +
   42.60 +    }
   42.61 +}
    43.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    43.2 +++ b/test/gc/TestVerifySilently.java	Wed Feb 19 20:12:43 2014 -0800
    43.3 @@ -0,0 +1,84 @@
    43.4 +/*
    43.5 + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
    43.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    43.7 + *
    43.8 + * This code is free software; you can redistribute it and/or modify it
    43.9 + * under the terms of the GNU General Public License version 2 only, as
   43.10 + * published by the Free Software Foundation.
   43.11 + *
   43.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   43.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   43.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   43.15 + * version 2 for more details (a copy is included in the LICENSE file that
   43.16 + * accompanied this code).
   43.17 + *
   43.18 + * You should have received a copy of the GNU General Public License version
   43.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   43.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   43.21 + *
   43.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   43.23 + * or visit www.oracle.com if you need additional information or have any
   43.24 + * questions.
   43.25 + */
   43.26 +
   43.27 +/* @test TestVerifySilently.java
   43.28 + * @key gc
   43.29 + * @bug 8032771
   43.30 + * @summary Test silent verification.
   43.31 + * @library /testlibrary
   43.32 + */
   43.33 +
   43.34 +import com.oracle.java.testlibrary.OutputAnalyzer;
   43.35 +import com.oracle.java.testlibrary.ProcessTools;
   43.36 +import java.util.ArrayList;
   43.37 +import java.util.Collections;
   43.38 +
   43.39 +class RunSystemGC {
   43.40 +  public static void main(String args[]) throws Exception {
   43.41 +    System.gc();
   43.42 +  }
   43.43 +}
   43.44 +
   43.45 +
   43.46 +public class TestVerifySilently {
   43.47 +  private static String[] getTestJavaOpts() {
   43.48 +    String testVmOptsStr = System.getProperty("test.java.opts");
   43.49 +    if (!testVmOptsStr.isEmpty()) {
   43.50 +      return testVmOptsStr.split(" ");
   43.51 +    } else {
   43.52 +      return new String[] {};
   43.53 +    }
   43.54 +  }
   43.55 +
   43.56 +  private static OutputAnalyzer runTest(boolean verifySilently) throws Exception {
   43.57 +    ArrayList<String> vmOpts = new ArrayList();
   43.58 +
   43.59 +    Collections.addAll(vmOpts, getTestJavaOpts());
   43.60 +    Collections.addAll(vmOpts, new String[] {"-XX:+UnlockDiagnosticVMOptions",
   43.61 +                                             "-XX:+VerifyDuringStartup",
   43.62 +                                             "-XX:+VerifyBeforeGC",
   43.63 +                                             "-XX:+VerifyAfterGC",
   43.64 +                                             "-XX:" + (verifySilently ? "+":"-") + "VerifySilently",
   43.65 +                                             RunSystemGC.class.getName()});
   43.66 +    ProcessBuilder pb =
   43.67 +      ProcessTools.createJavaProcessBuilder(vmOpts.toArray(new String[vmOpts.size()]));
   43.68 +    OutputAnalyzer output = new OutputAnalyzer(pb.start());
   43.69 +
   43.70 +    System.out.println("Output:\n" + output.getOutput());
   43.71 +    return output;
   43.72 +  }
   43.73 +
   43.74 +
   43.75 +  public static void main(String args[]) throws Exception {
   43.76 +
   43.77 +    OutputAnalyzer output;
   43.78 +
   43.79 +    output = runTest(false);
   43.80 +    output.shouldContain("[Verifying");
   43.81 +    output.shouldHaveExitValue(0);
   43.82 +
   43.83 +    output = runTest(true);
   43.84 +    output.shouldNotContain("[Verifying");
   43.85 +    output.shouldHaveExitValue(0);
   43.86 +  }
   43.87 +}
    44.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    44.2 +++ b/test/gc/g1/TestStringSymbolTableStats.java	Wed Feb 19 20:12:43 2014 -0800
    44.3 @@ -0,0 +1,57 @@
    44.4 +/*
    44.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
    44.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44.7 + *
    44.8 + * This code is free software; you can redistribute it and/or modify it
    44.9 + * under the terms of the GNU General Public License version 2 only, as
   44.10 + * published by the Free Software Foundation.
   44.11 + *
   44.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   44.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   44.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   44.15 + * version 2 for more details (a copy is included in the LICENSE file that
   44.16 + * accompanied this code).
   44.17 + *
   44.18 + * You should have received a copy of the GNU General Public License version
   44.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   44.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   44.21 + *
   44.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   44.23 + * or visit www.oracle.com if you need additional information or have any
   44.24 + * questions.
   44.25 + */
   44.26 +
   44.27 +/*
   44.28 + * @test TestStringSymbolTableStats.java
   44.29 + * @bug 8027476 8027455
   44.30 + * @summary Ensure that the G1TraceStringSymbolTableScrubbing prints the expected message.
   44.31 + * @key gc
   44.32 + * @library /testlibrary
   44.33 + */
   44.34 +
   44.35 +import com.oracle.java.testlibrary.ProcessTools;
   44.36 +import com.oracle.java.testlibrary.OutputAnalyzer;
   44.37 +
   44.38 +public class TestStringSymbolTableStats {
   44.39 +  public static void main(String[] args) throws Exception {
   44.40 +
   44.41 +    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseG1GC",
   44.42 +                                                              "-XX:+UnlockExperimentalVMOptions",
   44.43 +                                                              "-XX:+G1TraceStringSymbolTableScrubbing",
   44.44 +                                                              SystemGCTest.class.getName());
   44.45 +
   44.46 +    OutputAnalyzer output = new OutputAnalyzer(pb.start());
   44.47 +
   44.48 +    System.out.println("Output:\n" + output.getOutput());
   44.49 +
   44.50 +    output.shouldContain("Cleaned string and symbol table");
   44.51 +    output.shouldHaveExitValue(0);
   44.52 +  }
   44.53 +
   44.54 +  static class SystemGCTest {
   44.55 +    public static void main(String [] args) {
   44.56 +      System.out.println("Calling System.gc()");
   44.57 +      System.gc();
   44.58 +    }
   44.59 +  }
   44.60 +}
    45.1 --- a/test/runtime/NMT/CommandLineDetail.java	Thu Jan 30 14:30:01 2014 +0100
    45.2 +++ b/test/runtime/NMT/CommandLineDetail.java	Wed Feb 19 20:12:43 2014 -0800
    45.3 @@ -1,5 +1,5 @@
    45.4  /*
    45.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
    45.6 + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
    45.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    45.8   *
    45.9   * This code is free software; you can redistribute it and/or modify it
   45.10 @@ -24,7 +24,7 @@
   45.11   /*
   45.12   * @test
   45.13   * @key nmt
   45.14 - * @summary Running with NMT detail should not result in an error or warning
   45.15 + * @summary Running with NMT detail should not result in an error
   45.16   * @library /testlibrary
   45.17   */
   45.18  
   45.19 @@ -39,7 +39,6 @@
   45.20        "-version");
   45.21      OutputAnalyzer output = new OutputAnalyzer(pb.start());
   45.22      output.shouldNotContain("error");
   45.23 -    output.shouldNotContain("warning");
   45.24      output.shouldHaveExitValue(0);
   45.25    }
   45.26  }
    46.1 --- a/test/runtime/NMT/CommandLineSummary.java	Thu Jan 30 14:30:01 2014 +0100
    46.2 +++ b/test/runtime/NMT/CommandLineSummary.java	Wed Feb 19 20:12:43 2014 -0800
    46.3 @@ -1,5 +1,5 @@
    46.4  /*
    46.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
    46.6 + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
    46.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    46.8   *
    46.9   * This code is free software; you can redistribute it and/or modify it
   46.10 @@ -24,7 +24,7 @@
   46.11   /*
   46.12   * @test
   46.13   * @key nmt
   46.14 - * @summary Running with NMT summary should not result in an error or warning
   46.15 + * @summary Running with NMT summary should not result in an error
   46.16   * @library /testlibrary
   46.17   */
   46.18  
   46.19 @@ -39,7 +39,6 @@
   46.20        "-version");
   46.21      OutputAnalyzer output = new OutputAnalyzer(pb.start());
   46.22      output.shouldNotContain("error");
   46.23 -    output.shouldNotContain("warning");
   46.24      output.shouldHaveExitValue(0);
   46.25    }
   46.26  }
    47.1 --- a/test/runtime/NMT/CommandLineTurnOffNMT.java	Thu Jan 30 14:30:01 2014 +0100
    47.2 +++ b/test/runtime/NMT/CommandLineTurnOffNMT.java	Wed Feb 19 20:12:43 2014 -0800
    47.3 @@ -1,5 +1,5 @@
    47.4  /*
    47.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
    47.6 + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
    47.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    47.8   *
    47.9   * This code is free software; you can redistribute it and/or modify it
   47.10 @@ -24,7 +24,7 @@
   47.11   /*
   47.12   * @test
   47.13   * @key nmt
   47.14 - * @summary Turning off NMT should not result in an error or warning
   47.15 + * @summary Turning off NMT should not result in an error
   47.16   * @library /testlibrary
   47.17   */
   47.18  
   47.19 @@ -38,7 +38,6 @@
   47.20                "-version");
   47.21      OutputAnalyzer output = new OutputAnalyzer(pb.start());
   47.22      output.shouldNotContain("error");
   47.23 -    output.shouldNotContain("warning");
   47.24      output.shouldHaveExitValue(0);
   47.25    }
   47.26  }
    48.1 --- a/test/runtime/NMT/PrintNMTStatistics.java	Thu Jan 30 14:30:01 2014 +0100
    48.2 +++ b/test/runtime/NMT/PrintNMTStatistics.java	Wed Feb 19 20:12:43 2014 -0800
    48.3 @@ -1,5 +1,5 @@
    48.4  /*
    48.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
    48.6 + * Copyright (c) 2013, 2014 Oracle and/or its affiliates. All rights reserved.
    48.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    48.8   *
    48.9   * This code is free software; you can redistribute it and/or modify it
   48.10 @@ -64,7 +64,6 @@
   48.11      OutputAnalyzer output = new OutputAnalyzer(pb.start());
   48.12      output.shouldContain("Java Heap (reserved=");
   48.13      output.shouldNotContain("error");
   48.14 -    output.shouldNotContain("warning");
   48.15      output.shouldHaveExitValue(0);
   48.16    }
   48.17  }
    49.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    49.2 +++ b/test/runtime/PerfMemDestroy/PerfMemDestroy.java	Wed Feb 19 20:12:43 2014 -0800
    49.3 @@ -0,0 +1,40 @@
    49.4 +/*
    49.5 + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
    49.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    49.7 + *
    49.8 + * This code is free software; you can redistribute it and/or modify it
    49.9 + * under the terms of the GNU General Public License version 2 only, as
   49.10 + * published by the Free Software Foundation.
   49.11 + *
   49.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   49.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   49.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   49.15 + * version 2 for more details (a copy is included in the LICENSE file that
   49.16 + * accompanied this code).
   49.17 + *
   49.18 + * You should have received a copy of the GNU General Public License version
   49.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   49.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   49.21 + *
   49.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   49.23 + * or visit www.oracle.com if you need additional information or have any
   49.24 + * questions.
   49.25 + */
   49.26 +
   49.27 +/*
   49.28 + * @test
   49.29 + * @bug 8030955
   49.30 + * @summary Allow multiple calls to PerfMemory::destroy() without asserting.
   49.31 + * @library /testlibrary
   49.32 + * @run main PerfMemDestroy
   49.33 + */
   49.34 +
   49.35 +import com.oracle.java.testlibrary.*;
   49.36 +
   49.37 +public class PerfMemDestroy {
   49.38 +    public static void main(String args[]) throws Throwable {
   49.39 +        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+PerfAllowAtExitRegistration", "-version");
   49.40 +        OutputAnalyzer output = new OutputAnalyzer(pb.start());
   49.41 +        output.shouldHaveExitValue(0);
   49.42 +    }
   49.43 +}
    50.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    50.2 +++ b/test/runtime/finalStatic/FinalStatic.java	Wed Feb 19 20:12:43 2014 -0800
    50.3 @@ -0,0 +1,142 @@
    50.4 +/*
    50.5 + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
    50.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    50.7 + *
    50.8 + * This code is free software; you can redistribute it and/or modify it
    50.9 + * under the terms of the GNU General Public License version 2 only, as
   50.10 + * published by the Free Software Foundation.
   50.11 + *
   50.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   50.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   50.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   50.15 + * version 2 for more details (a copy is included in the LICENSE file that
   50.16 + * accompanied this code).
   50.17 + *
   50.18 + * You should have received a copy of the GNU General Public License version
   50.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   50.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   50.21 + *
   50.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   50.23 + * or visit www.oracle.com if you need additional information or have any
   50.24 + * questions.
   50.25 + */
   50.26 +
   50.27 +/*
   50.28 + * @test
   50.29 + * @bug 8028553
   50.30 + * @summary Test that VerifyError is not thrown when 'overriding' a static method.
   50.31 + * @run main FinalStatic
   50.32 + */
   50.33 +
   50.34 +import java.lang.reflect.*;
   50.35 +import jdk.internal.org.objectweb.asm.ClassWriter;
   50.36 +import jdk.internal.org.objectweb.asm.MethodVisitor;
   50.37 +import jdk.internal.org.objectweb.asm.Opcodes;
   50.38 +
   50.39 +/*
   50.40 + *  class A { static final int m() {return FAIL; } }
   50.41 + *  class B extends A { int m() { return PASS; } }
   50.42 + *  class FinalStatic {
   50.43 + *      public static void main () {
   50.44 + *          Object b = new B();
   50.45 + *          b.m();
   50.46 + *      }
   50.47 + *  }
   50.48 + */
   50.49 +public class FinalStatic {
   50.50 +
   50.51 +    static final String CLASS_NAME_A = "A";
   50.52 +    static final String CLASS_NAME_B = "B";
   50.53 +    static final int FAILED = 0;
   50.54 +    static final int EXPECTED = 1234;
   50.55 +
   50.56 +    static class TestClassLoader extends ClassLoader implements Opcodes {
   50.57 +
   50.58 +        @Override
   50.59 +        public Class findClass(String name) throws ClassNotFoundException {
   50.60 +            byte[] b;
   50.61 +            try {
   50.62 +                b = loadClassData(name);
   50.63 +            } catch (Throwable th) {
   50.64 +                // th.printStackTrace();
   50.65 +                throw new ClassNotFoundException("Loading error", th);
   50.66 +            }
   50.67 +            return defineClass(name, b, 0, b.length);
   50.68 +        }
   50.69 +
   50.70 +        private byte[] loadClassData(String name) throws Exception {
   50.71 +            ClassWriter cw = new ClassWriter(0);
   50.72 +            MethodVisitor mv;
   50.73 +            switch (name) {
   50.74 +               case CLASS_NAME_A:
   50.75 +                    cw.visit(52, ACC_SUPER | ACC_PUBLIC, CLASS_NAME_A, null, "java/lang/Object", null);
   50.76 +                    {
   50.77 +                        mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
   50.78 +                        mv.visitCode();
   50.79 +                        mv.visitVarInsn(ALOAD, 0);
   50.80 +                        mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
   50.81 +                        mv.visitInsn(RETURN);
   50.82 +                        mv.visitMaxs(1, 1);
   50.83 +                        mv.visitEnd();
   50.84 +
   50.85 +                        mv = cw.visitMethod(ACC_FINAL | ACC_STATIC, "m", "()I", null, null);
   50.86 +                        mv.visitCode();
   50.87 +                        mv.visitLdcInsn(FAILED);
   50.88 +                        mv.visitInsn(IRETURN);
   50.89 +                        mv.visitMaxs(1, 1);
   50.90 +                        mv.visitEnd();
   50.91 +                    }
   50.92 +                    break;
   50.93 +                case CLASS_NAME_B:
   50.94 +                    cw.visit(52, ACC_SUPER | ACC_PUBLIC, CLASS_NAME_B, null, CLASS_NAME_A, null);
   50.95 +                    {
   50.96 +                        mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
   50.97 +                        mv.visitCode();
   50.98 +                        mv.visitVarInsn(ALOAD, 0);
   50.99 +                        mv.visitMethodInsn(INVOKESPECIAL, CLASS_NAME_A, "<init>", "()V");
  50.100 +                        mv.visitInsn(RETURN);
  50.101 +                        mv.visitMaxs(1, 1);
  50.102 +                        mv.visitEnd();
  50.103 +
  50.104 +                        mv = cw.visitMethod(ACC_PUBLIC, "m", "()I", null, null);
  50.105 +                        mv.visitCode();
  50.106 +                        mv.visitLdcInsn(EXPECTED);
  50.107 +                        mv.visitInsn(IRETURN);
  50.108 +                        mv.visitMaxs(1, 1);
  50.109 +                        mv.visitEnd();
  50.110 +
  50.111 +                    }
  50.112 +                    break;
  50.113 +                default:
  50.114 +                    break;
  50.115 +            }
  50.116 +            cw.visitEnd();
  50.117 +
  50.118 +            return cw.toByteArray();
  50.119 +        }
  50.120 +    }
  50.121 +
  50.122 +    public static void main(String[] args) throws Exception {
  50.123 +        TestClassLoader tcl = new TestClassLoader();
  50.124 +        Class<?> a = tcl.loadClass(CLASS_NAME_A);
  50.125 +        Class<?> b = tcl.loadClass(CLASS_NAME_B);
  50.126 +        Object inst = b.newInstance();
  50.127 +        Method[] meths = b.getDeclaredMethods();
  50.128 +
  50.129 +        Method m = meths[0];
  50.130 +        int mod = m.getModifiers();
  50.131 +        if ((mod & Modifier.FINAL) != 0) {
  50.132 +            throw new Exception("FAILED: " + m + " is FINAL");
  50.133 +        }
  50.134 +        if ((mod & Modifier.STATIC) != 0) {
  50.135 +            throw new Exception("FAILED: " + m + " is STATIC");
  50.136 +        }
  50.137 +
  50.138 +        m.setAccessible(true);
  50.139 +        if (!m.invoke(inst).equals(EXPECTED)) {
  50.140 +              throw new Exception("FAILED: " + EXPECTED + " from " + m);
  50.141 +        }
  50.142 +
  50.143 +        System.out.println("Passed.");
  50.144 +    }
  50.145 +}

mercurial