# HG changeset patch # User lana # Date 1393275379 28800 # Node ID 6fe3b02842f6ed294e2cce3717c7e8316b17a824 # Parent 69f01034d3d775f63aae210837d48e937b9534d3# Parent 0785c9bcd7704679230f700f2d1bd5bec581bb34 Merge diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/THIRD_PARTY_README --- a/hotspot/THIRD_PARTY_README Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/THIRD_PARTY_README Mon Feb 24 12:56:19 2014 -0800 @@ -2,11 +2,12 @@ ----------------------------- %% This notice is provided with respect to ASM Bytecode Manipulation -Framework v3.1, which is included with JRE 7, JDK 7, and OpenJDK 7. +Framework v5.0, which may be included with JRE 8, and JDK 8, and +OpenJDK 8. --- begin of LICENSE --- -Copyright (c) 2000-2005 INRIA, France Telecom +Copyright (c) 2000-2011 France Télécom All rights reserved. Redistribution and use in source and binary forms, with or without @@ -40,8 +41,41 @@ -------------------------------------------------------------------------------- -%% This notice is provided with respect to CodeViewer 1.0, which is included -with JDK 7. +%% This notice is provided with respect to BSDiff v4.3, which may be +included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +Copyright 2003-2005 Colin Percival +All rights reserved + +Redistribution and use in source and binary forms, with or without +modification, are permitted providing that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to CodeViewer 1.0, which may be +included with JDK 8. --- begin of LICENSE --- @@ -81,8 +115,8 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to Cryptix AES 3.2.0, which is -included with JRE 7, JDK 7, and OpenJDK 7. +%% This notice is provided with respect to Cryptix AES 3.2.0, which may be +included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -121,7 +155,7 @@ ------------------------------------------------------------------------------- %% This notice is provided with respect to CUP Parser Generator for -Java 0.10k, which is included with JRE 7, JDK 7, and OpenJDK 7. +Java 0.10k, which may be included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -148,7 +182,7 @@ ------------------------------------------------------------------------------- %% This notice is provided with respect to Document Object Model (DOM) Level 2 -& 3, which is included with JRE 7, JDK 7, and OpenJDK 7. +& 3, which may be included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -212,19 +246,52 @@ ------------------------------------------------------------------------------- +%% This notice is provided with respect to Dynalink v0.5, which may be +included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +Copyright (c) 2009-2013, Attila Szegedi + +All rights reserved.Redistribution and use in source and binary forms, with or +without modification, are permitted provided that the following conditions are +met:* Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. * Redistributions in +binary form must reproduce the above copyright notice, this list of +conditions and the following disclaimer in the documentation and/or other +materials provided with the distribution. * Neither the name of Attila +Szegedi nor the names of its contributors may be used to endorse or promote +products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THEPOSSIBILITY OF SUCH DAMAGE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + %% This notice is provided with respect to Elliptic Curve Cryptography, which -is included with JRE 7, JDK 7, and OpenJDK 7. +may be included with JRE 8, JDK 8, and OpenJDK 8. You are receiving a copy of the Elliptic Curve Cryptography library in source -form with the JDK 7 source distribution and object code in the JRE 7 & JDK 7 -runtime. - -The terms of the Oracle license do NOT apply to the Elliptic Curve -Cryptography library program; it is licensed under the following license, -separately from the Oracle programs you receive. If you do not wish to install -this program, you may delete the library named libsunec.so (on Solaris and -Linux systems) or sunec.dll (on Windows systems) from the JRE bin directory -reserved for native libraries. +form with the JDK 8 and OpenJDK 8 source distributions, and as object code in +the JRE 8 & JDK 8 runtimes. + +In the case of the JRE 8 & JDK 8 runtimes, the terms of the Oracle license do +NOT apply to the Elliptic Curve Cryptography library; it is licensed under the +following license, separately from Oracle's JDK & JRE. If you do not wish to +install the Elliptic Curve Cryptography library, you may delete the library +named libsunec.so (on Solaris and Linux systems) or sunec.dll (on Windows +systems) from the JRE bin directory reserved for native libraries. + --- begin of LICENSE --- @@ -735,13 +802,138 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to FontConfig 2.5, which is -included with JRE 7, JDK 7, and OpenJDK 7 source distributions on +%% This notice is provided with respect to ECMAScript Language +Specification ECMA-262 Edition 5.1 which may be included with +JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +Copyright notice +Copyright © 2011 Ecma International +Ecma International +Rue du Rhone 114 +CH-1204 Geneva +Tel: +41 22 849 6000 +Fax: +41 22 849 6001 +Web: http://www.ecma-international.org + +This document and possible translations of it may be copied and furnished to +others, and derivative works that comment on or otherwise explain it or assist +in its implementation may be prepared, copied, published, and distributed, in +whole or in part, without restriction of any kind, provided that the above +copyright notice and this section are included on all such copies and derivative +works. However, this document itself may not be modified in any way, including +by removing the copyright notice or references to Ecma International, except as +needed for the purpose of developing any document or deliverable produced by +Ecma International (in which case the rules applied to copyrights must be +followed) or as required to translate it into languages other than English. The +limited permissions granted above are perpetual and will not be revoked by Ecma +International or its successors or assigns. This document and the information +contained herein is provided on an "AS IS" basis and ECMA INTERNATIONAL +DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY +WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP +RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR +PURPOSE." Software License + +All Software contained in this document ("Software)" is protected by copyright +and is being made available under the "BSD License", included below. This +Software may be subject to third party rights (rights from parties other than +Ecma International), including patent rights, and no licenses under such third +party rights are granted under this license even if the third party concerned is +a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS +AVAILABLE AT http://www.ecma-international.org/memento/codeofconduct.htm FOR +INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO +IMPLEMENT ECMA INTERNATIONAL STANDARDS*. Redistribution and use in source and +binary forms, with or without modification, are permitted provided that the +following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +3. Neither the name of the authors nor Ecma International may be used to endorse +or promote products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE ECMA INTERNATIONAL "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL ECMA INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY +OF SUCH DAMAGE. +--- end of LICENSE --- + +%% This notice is provided with respect to Dynalink library which is included +with the Nashorn technology. + +--- begin of LICENSE --- +Copyright (c) 2009-2013, Attila Szegedi + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of the copyright holder nor the names of + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--- end of LICENSE --- + +%% This notice is provided with respect to Joni library which is included +with the Nashorn technology. + +--- begin of LICENSE --- +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to FontConfig 2.5, which may be +included with JRE 8, JDK 8, and OpenJDK 8 source distributions on Linux and Solaris. --- begin of LICENSE --- -Copyright ¬© 2001,2003 Keith Packard +Copyright © 2001,2003 Keith Packard Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the @@ -765,7 +957,7 @@ ------------------------------------------------------------------------------- %% This notice is provided with respect to IAIK PKCS#11 Wrapper, -which is included with JRE 7, JDK 7, and OpenJDK 7. +which may be included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -816,7 +1008,7 @@ ------------------------------------------------------------------------------- %% This notice is provided with respect to ICU4C 4.0.1 and ICU4J 4.4, which -is included with JRE 7, JDK 7, and OpenJDK 7. +may be included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -852,8 +1044,8 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to IJG JPEG 6b, which is -included with JRE 7, JDK 7, and OpenJDK 7. +%% This notice is provided with respect to IJG JPEG 6b, which may be +included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -891,8 +1083,35 @@ -------------------------------------------------------------------------------- -%% This notice is provided with respect to JOpt-Simple v3.0, which is -included with JRE 7, JDK 7, and OpenJDK 7. +%% This notice is provided with respect to Joni v1.1.9, which may be +included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to JOpt-Simple v3.0, which may be +included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -921,8 +1140,39 @@ -------------------------------------------------------------------------------- +%% This notice is provided with respect to JSON, which may be included +with JRE 8 & JDK 8. + +--- begin of LICENSE --- + +Copyright (c) 2002 JSON.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +The Software shall be used for Good, not Evil. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + %% This notice is provided with respect to Kerberos functionality, which -which is included with JRE 7, JDK 7, and OpenJDK 7. +which may be included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -934,7 +1184,7 @@ ------------------------------------------------------------------------------- %% This notice is provided with respect to Kerberos functionality from -FundsXpress, INC., which is included with JRE 7, JDK 7, and OpenJDK 7. +FundsXpress, INC., which may be included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -967,8 +1217,8 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to Kronos OpenGL headers, which is -included with JDK 7 and OpenJDK 7 source distributions. +%% This notice is provided with respect to Kronos OpenGL headers, which may be +included with JDK 8 and OpenJDK 8 source distributions. --- begin of LICENSE --- @@ -1000,8 +1250,8 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to libpng 1.2.18, which is -included with JRE 7, JDK 7, and OpenJDK 7. +%% This notice is provided with respect to libpng 1.5.4, which may be +included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -1014,8 +1264,10 @@ If you modify libpng you may insert additional notices immediately following this sentence. -libpng versions 1.2.6, August 15, 2004, through 1.2.18, May 15, 2007, are -Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are +This code is released under the libpng license. + +libpng versions 1.2.6, August 15, 2004, through 1.5.4, July 7, 2011, are +Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.2.5 with the following individual added to the list of Contributing Authors @@ -1112,14 +1364,14 @@ Glenn Randers-Pehrson glennrp at users.sourceforge.net -May 15, 2007 +July 7, 2011 --- end of LICENSE --- ------------------------------------------------------------------------------- -%% This notice is provided with respect to libungif 4.1.3, which is -included with JRE 7, JDK 7, and OpenJDK 7. +%% This notice is provided with respect to libungif 4.1.3, which may be +included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -1147,8 +1399,8 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to Little CMS 2.0, which is -included with OpenJDK 7. +%% This notice is provided with respect to Little CMS 2.4, which may be +included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -1183,7 +1435,7 @@ ------------------------------------------------------------------------------- %% This notice is provided with respect to Mesa 3D Graphics Library v4.1, -which is included with JRE 7, JDK 7, and OpenJDK 7 source distributions. +which may be included with JRE 8, JDK 8, and OpenJDK 8 source distributions. --- begin of LICENSE --- @@ -1213,8 +1465,402 @@ ------------------------------------------------------------------------------- +%% This notice is provided with respect to Mozilla Network Security +Services (NSS), which is supplied with the JDK test suite in the OpenJDK +source code repository. It is licensed under Mozilla Public License (MPL), +version 2.0. + +The NSS libraries are supplied in executable form, built from unmodified +NSS source code labeled with the "NSS_3.13.1_RTM" release tag. + +The NSS source code is available in the OpenJDK source code repository at: + jdk/test/sun/security/pkcs11/nss/src + +The NSS libraries are available in the OpenJDK source code repository at: + jdk/test/sun/security/pkcs11/nss/lib + +--- begin of LICENSE --- + +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + %% This notice is provided with respect to PC/SC Lite for Suse Linux v.1.1.1, -which is included with JRE 7, JDK 7, and OpenJDK 7 on Linux and Solaris. +which may be included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris. --- begin of LICENSE --- @@ -1257,8 +1903,30 @@ ------------------------------------------------------------------------------- +%% This notice is provided with respect to PorterStemmer v4, which may be +included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +See: http://tartarus.org/~martin/PorterStemmer + +The software is completely free for any purpose, unless notes at the head of +the program text indicates otherwise (which is rare). In any case, the notes +about licensing are never more restrictive than the BSD License. + +In every case where the software is not written by me (Martin Porter), this +licensing arrangement has been endorsed by the contributor, and it is +therefore unnecessary to ask the contributor again to confirm it. + +I have not asked any contributors (or their employers, if they have them) for +proofs that they have the right to distribute their software in this way. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + %% This notice is provided with respect to Relax NG Object/Parser v.20050510, -which is included with JRE 7, JDK 7, and OpenJDK 7. +which may be included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -1285,8 +1953,8 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to RelaxNGCC v1.12, which is -included with JRE 7, JDK 7, and OpenJDK 7. +%% This notice is provided with respect to RelaxNGCC v1.12, which may be +included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -1335,487 +2003,8 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to Mozilla Rhino v1.7R3, which -is included with JRE 7, JDK 7, and OpenJDK 7 - ---- begin of LICENSE --- - - MOZILLA PUBLIC LICENSE - Version 1.1 - - --------------- - -1. Definitions. - - 1.0.1. "Commercial Use" means distribution or otherwise making the - Covered Code available to a third party. - - 1.1. "Contributor" means each entity that creates or contributes to - the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original - Code, prior Modifications used by a Contributor, and the Modifications - made by that particular Contributor. - - 1.3. "Covered Code" means the Original Code or Modifications or the - combination of the Original Code and Modifications, in each case - including portions thereof. - - 1.4. "Electronic Distribution Mechanism" means a mechanism generally - accepted in the software development community for the electronic - transfer of data. - - 1.5. "Executable" means Covered Code in any form other than Source - Code. - - 1.6. "Initial Developer" means the individual or entity identified - as the Initial Developer in the Source Code notice required by Exhibit - A. - - 1.7. "Larger Work" means a work which combines Covered Code or - portions thereof with code not governed by the terms of this License. - - 1.8. "License" means this document. - - 1.8.1. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means any addition to or deletion from the - substance or structure of either the Original Code or any previous - Modifications. When Covered Code is released as a series of files, a - Modification is: - A. Any addition to or deletion from the contents of a file - containing Original Code or previous Modifications. - - B. Any new file that contains any part of the Original Code or - previous Modifications. - - 1.10. "Original Code" means Source Code of computer software code - which is described in the Source Code notice required by Exhibit A as - Original Code, and which, at the time of its release under this - License is not already Covered Code governed by this License. - - 1.10.1. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - - 1.11. "Source Code" means the preferred form of the Covered Code for - making modifications to it, including all modules it contains, plus - any associated interface definition files, scripts used to control - compilation and installation of an Executable, or source code - differential comparisons against either the Original Code or another - well known, available Covered Code of the Contributor's choice. The - Source Code can be in a compressed or archival form, provided the - appropriate decompression or de-archiving software is widely available - for no charge. - - 1.12. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms of, this - License or a future version of this License issued under Section 6.1. - For legal entities, "You" includes any entity which controls, is - controlled by, or is under common control with You. For purposes of - this definition, "control" means (a) the power, direct or indirect, - to cause the direction or management of such entity, whether by - contract or otherwise, or (b) ownership of more than fifty percent - (50%) of the outstanding shares or beneficial ownership of such - entity. - -2. Source Code License. - - 2.1. The Initial Developer Grant. - The Initial Developer hereby grants You a world-wide, royalty-free, - non-exclusive license, subject to third party intellectual property - claims: - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Code (or portions thereof) with or without Modifications, and/or - as part of a Larger Work; and - - (b) under Patents Claims infringed by the making, using or - selling of Original Code, to make, have made, use, practice, - sell, and offer for sale, and/or otherwise dispose of the - Original Code (or portions thereof). - - (c) the licenses granted in this Section 2.1(a) and (b) are - effective on the date Initial Developer first distributes - Original Code under the terms of this License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: 1) for code that You delete from the Original Code; 2) - separate from the Original Code; or 3) for infringements caused - by: i) the modification of the Original Code or ii) the - combination of the Original Code with other software or devices. - - 2.2. Contributor Grant. - Subject to third party intellectual property claims, each Contributor - hereby grants You a world-wide, royalty-free, non-exclusive license - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor, to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof) either on an - unmodified basis, with other Modifications, as Covered Code - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or - selling of Modifications made by that Contributor either alone - and/or in combination with its Contributor Version (or portions - of such combination), to make, use, sell, offer for sale, have - made, and/or otherwise dispose of: 1) Modifications made by that - Contributor (or portions thereof); and 2) the combination of - Modifications made by that Contributor with its Contributor - Version (or portions of such combination). - - (c) the licenses granted in Sections 2.2(a) and 2.2(b) are - effective on the date Contributor first makes Commercial Use of - the Covered Code. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: 1) for any code that Contributor has deleted from the - Contributor Version; 2) separate from the Contributor Version; - 3) for infringements caused by: i) third party modifications of - Contributor Version or ii) the combination of Modifications made - by that Contributor with other software (except as part of the - Contributor Version) or other devices; or 4) under Patent Claims - infringed by Covered Code in the absence of Modifications made by - that Contributor. - -3. Distribution Obligations. - - 3.1. Application of License. - The Modifications which You create or to which You contribute are - governed by the terms of this License, including without limitation - Section 2.2. The Source Code version of Covered Code may be - distributed only under the terms of this License or a future version - of this License released under Section 6.1, and You must include a - copy of this License with every copy of the Source Code You - distribute. You may not offer or impose any terms on any Source Code - version that alters or restricts the applicable version of this - License or the recipients' rights hereunder. However, You may include - an additional document offering the additional rights described in - Section 3.5. - - 3.2. Availability of Source Code. - Any Modification which You create or to which You contribute must be - made available in Source Code form under the terms of this License - either on the same media as an Executable version or via an accepted - Electronic Distribution Mechanism to anyone to whom you made an - Executable version available; and if made available via Electronic - Distribution Mechanism, must remain available for at least twelve (12) - months after the date it initially became available, or at least six - (6) months after a subsequent version of that particular Modification - has been made available to such recipients. You are responsible for - ensuring that the Source Code version remains available even if the - Electronic Distribution Mechanism is maintained by a third party. - - 3.3. Description of Modifications. - You must cause all Covered Code to which You contribute to contain a - file documenting the changes You made to create that Covered Code and - the date of any change. You must include a prominent statement that - the Modification is derived, directly or indirectly, from Original - Code provided by the Initial Developer and including the name of the - Initial Developer in (a) the Source Code, and (b) in any notice in an - Executable version or related documentation in which You describe the - origin or ownership of the Covered Code. - - 3.4. Intellectual Property Matters - (a) Third Party Claims. - If Contributor has knowledge that a license under a third party's - intellectual property rights is required to exercise the rights - granted by such Contributor under Sections 2.1 or 2.2, - Contributor must include a text file with the Source Code - distribution titled "LEGAL" which describes the claim and the - party making the claim in sufficient detail that a recipient will - know whom to contact. If Contributor obtains such knowledge after - the Modification is made available as described in Section 3.2, - Contributor shall promptly modify the LEGAL file in all copies - Contributor makes available thereafter and shall take other steps - (such as notifying appropriate mailing lists or newsgroups) - reasonably calculated to inform those who received the Covered - Code that new knowledge has been obtained. - - (b) Contributor APIs. - If Contributor's Modifications include an application programming - interface and Contributor has knowledge of patent licenses which - are reasonably necessary to implement that API, Contributor must - also include this information in the LEGAL file. - - (c) Representations. - Contributor represents that, except as disclosed pursuant to - Section 3.4(a) above, Contributor believes that Contributor's - Modifications are Contributor's original creation(s) and/or - Contributor has sufficient rights to grant the rights conveyed by - this License. - - 3.5. Required Notices. - You must duplicate the notice in Exhibit A in each file of the Source - Code. If it is not possible to put such notice in a particular Source - Code file due to its structure, then You must include such notice in a - location (such as a relevant directory) where a user would be likely - to look for such a notice. If You created one or more Modification(s) - You may add your name as a Contributor to the notice described in - Exhibit A. You must also duplicate this License in any documentation - for the Source Code where You describe recipients' rights or ownership - rights relating to Covered Code. You may choose to offer, and to - charge a fee for, warranty, support, indemnity or liability - obligations to one or more recipients of Covered Code. However, You - may do so only on Your own behalf, and not on behalf of the Initial - Developer or any Contributor. You must make it absolutely clear than - any such warranty, support, indemnity or liability obligation is - offered by You alone, and You hereby agree to indemnify the Initial - Developer and every Contributor for any liability incurred by the - Initial Developer or such Contributor as a result of warranty, - support, indemnity or liability terms You offer. - - 3.6. Distribution of Executable Versions. - You may distribute Covered Code in Executable form only if the - requirements of Section 3.1-3.5 have been met for that Covered Code, - and if You include a notice stating that the Source Code version of - the Covered Code is available under the terms of this License, - including a description of how and where You have fulfilled the - obligations of Section 3.2. The notice must be conspicuously included - in any notice in an Executable version, related documentation or - collateral in which You describe recipients' rights relating to the - Covered Code. You may distribute the Executable version of Covered - Code or ownership rights under a license of Your choice, which may - contain terms different from this License, provided that You are in - compliance with the terms of this License and that the license for the - Executable version does not attempt to limit or alter the recipient's - rights in the Source Code version from the rights set forth in this - License. If You distribute the Executable version under a different - license You must make it absolutely clear that any terms which differ - from this License are offered by You alone, not by the Initial - Developer or any Contributor. You hereby agree to indemnify the - Initial Developer and every Contributor for any liability incurred by - the Initial Developer or such Contributor as a result of any such - terms You offer. - - 3.7. Larger Works. - You may create a Larger Work by combining Covered Code with other code - not governed by the terms of this License and distribute the Larger - Work as a single product. In such a case, You must make sure the - requirements of this License are fulfilled for the Covered Code. - -4. Inability to Comply Due to Statute or Regulation. - - If it is impossible for You to comply with any of the terms of this - License with respect to some or all of the Covered Code due to - statute, judicial order, or regulation then You must: (a) comply with - the terms of this License to the maximum extent possible; and (b) - describe the limitations and the code they affect. Such description - must be included in the LEGAL file described in Section 3.4 and must - be included with all distributions of the Source Code. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. - -5. Application of this License. - - This License applies to code to which the Initial Developer has - attached the notice in Exhibit A and to related Covered Code. - -6. Versions of the License. - - 6.1. New Versions. - Netscape Communications Corporation ("Netscape") may publish revised - and/or new versions of the License from time to time. Each version - will be given a distinguishing version number. - - 6.2. Effect of New Versions. - Once Covered Code has been published under a particular version of the - License, You may always continue to use it under the terms of that - version. You may also choose to use such Covered Code under the terms - of any subsequent version of the License published by Netscape. No one - other than Netscape has the right to modify the terms applicable to - Covered Code created under this License. - - 6.3. Derivative Works. - If You create or use a modified version of this License (which you may - only do in order to apply it to code which is not already Covered Code - governed by this License), You must (a) rename Your license so that - the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", - "MPL", "NPL" or any confusingly similar phrase do not appear in your - license (except to note that your license differs from this License) - and (b) otherwise make it clear that Your version of the license - contains terms which differ from the Mozilla Public License and - Netscape Public License. (Filling in the name of the Initial - Developer, Original Code or Contributor in the notice described in - Exhibit A shall not of themselves be deemed to be modifications of - this License.) - -7. DISCLAIMER OF WARRANTY. - - COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, - WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF - DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. - THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE - IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, - YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE - COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER - OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF - ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -8. TERMINATION. - - 8.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to cure - such breach within 30 days of becoming aware of the breach. All - sublicenses to the Covered Code which are properly granted shall - survive any termination of this License. Provisions which, by their - nature, must remain in effect beyond the termination of this License - shall survive. - - 8.2. If You initiate litigation by asserting a patent infringement - claim (excluding declatory judgment actions) against Initial Developer - or a Contributor (the Initial Developer or Contributor against whom - You file such action is referred to as "Participant") alleging that: - - (a) such Participant's Contributor Version directly or indirectly - infringes any patent, then any and all rights granted by such - Participant to You under Sections 2.1 and/or 2.2 of this License - shall, upon 60 days notice from Participant terminate prospectively, - unless if within 60 days after receipt of notice You either: (i) - agree in writing to pay Participant a mutually agreeable reasonable - royalty for Your past and future use of Modifications made by such - Participant, or (ii) withdraw Your litigation claim with respect to - the Contributor Version against such Participant. If within 60 days - of notice, a reasonable royalty and payment arrangement are not - mutually agreed upon in writing by the parties or the litigation claim - is not withdrawn, the rights granted by Participant to You under - Sections 2.1 and/or 2.2 automatically terminate at the expiration of - the 60 day notice period specified above. - - (b) any software, hardware, or device, other than such Participant's - Contributor Version, directly or indirectly infringes any patent, then - any rights granted to You by such Participant under Sections 2.1(b) - and 2.2(b) are revoked effective as of the date You first made, used, - sold, distributed, or had made, Modifications made by that - Participant. - - 8.3. If You assert a patent infringement claim against Participant - alleging that such Participant's Contributor Version directly or - indirectly infringes any patent where such claim is resolved (such as - by license or settlement) prior to the initiation of patent - infringement litigation, then the reasonable value of the licenses - granted by such Participant under Sections 2.1 or 2.2 shall be taken - into account in determining the amount or value of any payment or - license. - - 8.4. In the event of termination under Sections 8.1 or 8.2 above, - all end user license agreements (excluding distributors and resellers) - which have been validly granted by You or any distributor hereunder - prior to termination shall survive termination. - -9. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL - DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, - OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR - ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY - CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, - WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER - COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN - INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF - LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY - RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW - PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE - EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO - THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -10. U.S. GOVERNMENT END USERS. - - The Covered Code is a "commercial item," as that term is defined in - 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer - software" and "commercial computer software documentation," as such - terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 - C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), - all U.S. Government End Users acquire Covered Code with only those - rights set forth herein. - -11. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. This License shall be governed by - California law provisions (except to the extent applicable law, if - any, provides otherwise), excluding its conflict-of-law provisions. - With respect to disputes in which at least one party is a citizen of, - or an entity chartered or registered to do business in the United - States of America, any litigation relating to this License shall be - subject to the jurisdiction of the Federal Courts of the Northern - District of California, with venue lying in Santa Clara County, - California, with the losing party responsible for costs, including - without limitation, court costs and reasonable attorneys' fees and - expenses. The application of the United Nations Convention on - Contracts for the International Sale of Goods is expressly excluded. - Any law or regulation which provides that the language of a contract - shall be construed against the drafter shall not apply to this - License. - -12. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. - -13. MULTIPLE-LICENSED CODE. - - Initial Developer may designate portions of the Covered Code as - "Multiple-Licensed". "Multiple-Licensed" means that the Initial - Developer permits you to utilize portions of the Covered Code under - Your choice of the NPL or the alternative licenses, if any, specified - by the Initial Developer in the file described in Exhibit A. - -EXHIBIT A - Mozilla Public License. - - ``The contents of this file are subject to the Mozilla Public License - Version 1.1 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - License for the specific language governing rights and limitations - under the License. - - The Original Code is ______________________________________. - - The Initial Developer of the Original Code is ________________________. - Portions created by ______________________ are Copyright (C) ______ - _______________________. All Rights Reserved. - - Contributor(s): ______________________________________. - - Alternatively, the contents of this file may be used under the terms - of the _____ license (the "[___] License"), in which case the - provisions of [______] License are applicable instead of those - above. If you wish to allow use of your version of this file only - under the terms of the [____] License and not to allow others to use - your version of this file under the MPL, indicate your decision by - deleting the provisions above and replace them with the notice and - other provisions required by the [___] License. If you do not delete - the provisions above, a recipient may use your version of this file - under either the MPL or the [___] License." - - [NOTE: The text of this Exhibit A may differ slightly from the text of - the notices in the Source Code files of the Original Code. You should - use the text of this Exhibit A rather than the text found in the - Original Code Source Code for Your Modifications.] - ---- end of LICENSE --- - -------------------------------------------------------------------------------- - -%% This notice is provided with respect to SAX 2.0.1, which is included -with JRE 7, JDK 7, and OpenJDK 7. +%% This notice is provided with respect to SAX 2.0.1, which may be included +with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -1876,8 +2065,8 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to SoftFloat version 2b, which is -included with JRE 7, JDK 7, and OpenJDK 7 on Linux/ARM. +%% This notice is provided with respect to SoftFloat version 2b, which may be +included with JRE 8, JDK 8, and OpenJDK 8 on Linux/ARM. --- begin of LICENSE --- @@ -1909,12 +2098,41 @@ ------------------------------------------------------------------------------- +%% This notice is provided with respect to Sparkle 1.5, +which may be included with JRE 8 on Mac OS X. + +--- begin of LICENSE --- + +Copyright (c) 2012 Sparkle.org and Andy Matuschak + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + %% Portions licensed from Taligent, Inc. ------------------------------------------------------------------------------- -%% This notice is provided with respect to Thai Dictionary, which is -included with JRE 7, JDK 7, and OpenJDK 7. +%% This notice is provided with respect to Thai Dictionary, which may be +included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -1947,8 +2165,8 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to Unicode 6.0.0, CLDR v1.4.1, & CLDR -v1.9, which is included with JRE 7, JDK 7, and OpenJDK 7. +%% This notice is provided with respect to Unicode 6.2.0 & CLDR 21.0.1 +which may be included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -1959,7 +2177,7 @@ Trademark Usage Policy. A. Unicode Copyright. - 1. Copyright © 1991-2011 Unicode, Inc. All rights reserved. + 1. Copyright © 1991-2013 Unicode, Inc. All rights reserved. 2. Certain documents and files on this website contain a legend indicating that "Modification is permitted." Any person is hereby authorized, @@ -2094,7 +2312,7 @@ COPYRIGHT AND PERMISSION NOTICE -Copyright © 1991-2011 Unicode, Inc. All rights reserved. Distributed under the +Copyright © 1991-2012 Unicode, Inc. All rights reserved. Distributed under the Terms of Use in http://www.unicode.org/copyright.html. Permission is hereby granted, free of charge, to any person obtaining a copy @@ -2134,8 +2352,8 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to UPX v3.01, which is included -with JRE 7 on Windows. +%% This notice is provided with respect to UPX v3.01, which may be included +with JRE 8 on Windows. --- begin of LICENSE --- @@ -2274,7 +2492,7 @@ ------------------------------------------------------------------------------- %% This notice is provided with respect to Xfree86-VidMode Extension 1.0, -which is included with JRE 7, JDK 7, and OpenJDK 7 on Linux and Solaris. +which may be included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris. --- begin of LICENSE --- @@ -2326,8 +2544,8 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to X Window System 6.8.2, which is -included with JRE 7, JDK 7, and OpenJDK 7 on Linux and Solaris. +%% This notice is provided with respect to X Window System 6.8.2, which may be +included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris. --- begin of LICENSE --- @@ -3131,12 +3349,12 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to zlib v1.2.3, which is included -with JRE 7, JDK 7, and OpenJDK 7 +%% This notice is provided with respect to zlib v1.2.5, which may be included +with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- - version 1.2.3, July 18th, 2005 + version 1.2.5, July 18th, 2005 Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler @@ -3163,16 +3381,18 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to the following which is -included with JRE 7, JDK 7, and OpenJDK 7, except where noted: - - Apache Derby 10.8.1.2 [included with JDK 7 only] +%% This notice is provided with respect to the following which may be +included with JRE 8, JDK 8, and OpenJDK 8, except where noted: + + Apache Commons Math 2.2 + Apache Derby 10.10.1.2 [included with JDK 8] Apache Jakarta BCEL 5.2 Apache Jakarta Regexp 1.4 - Apache Santuario XMLSec-Java 1.4.2 + Apache Santuario XML Security for Java 1.5.4 Apache Xalan-Java 2.7.1 - Apache Xerces2 Java 2.10.0 + Apache Xerces Java 2.10.0 Apache XML Resolver 1.1 + Dynalink 0.5 --- begin of LICENSE --- diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/ClassLoaderStats.java --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/ClassLoaderStats.java Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/ClassLoaderStats.java Mon Feb 24 12:56:19 2014 -0800 @@ -103,11 +103,12 @@ } SystemDictionary dict = VM.getVM().getSystemDictionary(); - dict.classesDo(new SystemDictionary.ClassAndLoaderVisitor() { - public void visit(Klass k, Oop loader) { + dict.classesDo(new SystemDictionary.ClassVisitor() { + public void visit(Klass k) { if (! (k instanceof InstanceKlass)) { return; } + Oop loader = ((InstanceKlass) k).getClassLoader(); LoaderData ld = (loader != null) ? (LoaderData)loaderMap.get(loader) : bootstrapLoaderData; if (ld != null) { diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/Makefile --- a/hotspot/make/Makefile Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/Makefile Mon Feb 24 12:56:19 2014 -0800 @@ -557,11 +557,11 @@ # Testing the built JVM -RUN_JVM=JAVA_HOME=$(JDK_IMPORT_PATH) $(JDK_IMPORT_PATH)/bin/java -d$(ARCH_DATA_MODEL) -Dsun.java.launcher=gamma +RUN_JVM=JAVA_HOME=$(JDK_IMPORT_PATH) $(JDK_IMPORT_PATH)/bin/java -d$(ARCH_DATA_MODEL) -XXaltjvm=$(ALTJVM_DIR) -Dsun.java.launcher.is_altjvm=true generic_test: @$(ECHO) "Running with: $(ALTJVM_DIR)" - @$(RUN_JVM) -XXaltjvm=$(ALTJVM_DIR) -Xinternalversion - @$(RUN_JVM) -XXaltjvm=$(ALTJVM_DIR) -showversion -help + @$(RUN_JVM) -Xinternalversion + @$(RUN_JVM) -showversion -help # C2 test targets test_product test_optimized test_fastdebug test_debug: diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/bsd/makefiles/dtrace.make --- a/hotspot/make/bsd/makefiles/dtrace.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/bsd/makefiles/dtrace.make Mon Feb 24 12:56:19 2014 -0800 @@ -53,6 +53,7 @@ GENOFFS = generate$(JVMOFFS) DTRACE_SRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/dtrace +DTRACE_COMMON_SRCDIR = $(GAMMADIR)/src/os/posix/dtrace DTRACE = dtrace DTRACE.o = $(DTRACE).o @@ -262,14 +263,14 @@ $(DtraceOutDir): mkdir $(DtraceOutDir) -$(DtraceOutDir)/hotspot.h: $(DTRACE_SRCDIR)/hotspot.d | $(DtraceOutDir) - $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot.d +$(DtraceOutDir)/hotspot.h: $(DTRACE_COMMON_SRCDIR)/hotspot.d | $(DtraceOutDir) + $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot.d -$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_SRCDIR)/hotspot_jni.d | $(DtraceOutDir) - $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot_jni.d +$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d | $(DtraceOutDir) + $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d -$(DtraceOutDir)/hs_private.h: $(DTRACE_SRCDIR)/hs_private.d | $(DtraceOutDir) - $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hs_private.d +$(DtraceOutDir)/hs_private.h: $(DTRACE_COMMON_SRCDIR)/hs_private.d | $(DtraceOutDir) + $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hs_private.d dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/bsd/makefiles/jsig.make --- a/hotspot/make/bsd/makefiles/jsig.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/bsd/makefiles/jsig.make Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -91,13 +91,13 @@ install_jsig: $(LIBJSIG) @echo "Copying $(LIBJSIG) to $(DEST_JSIG)" ifeq ($(OS_VENDOR), Darwin) - $(QUIETLY) test -d $(LIBJSIG_DEBUGINFO) && \ + $(QUIETLY) test ! -d $(LIBJSIG_DEBUGINFO) || \ cp -f -r $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO) else - $(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \ + $(QUIETLY) test ! -f $(LIBJSIG_DEBUGINFO) || \ cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO) endif - $(QUIETLY) test -f $(LIBJSIG_DIZ) && \ + $(QUIETLY) test ! -f $(LIBJSIG_DIZ) || \ cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ) $(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done" diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/bsd/makefiles/optimized.make --- a/hotspot/make/bsd/makefiles/optimized.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/bsd/makefiles/optimized.make Mon Feb 24 12:56:19 2014 -0800 @@ -22,7 +22,7 @@ # # -# Sets make macros for making optimized version of Gamma VM +# Sets make macros for making optimized version of HotSpot VM # (This is the "product", not the "release" version.) # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/bsd/makefiles/product.make --- a/hotspot/make/bsd/makefiles/product.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/bsd/makefiles/product.make Mon Feb 24 12:56:19 2014 -0800 @@ -22,7 +22,7 @@ # # -# Sets make macros for making optimized version of Gamma VM +# Sets make macros for making optimized version of HotSpot VM # (This is the "product", not the "release" version.) # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/bsd/makefiles/saproc.make --- a/hotspot/make/bsd/makefiles/saproc.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/bsd/makefiles/saproc.make Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -153,13 +153,13 @@ install_saproc: $(BUILDLIBSAPROC) @echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)" ifeq ($(OS_VENDOR), Darwin) - $(QUIETLY) test -d $(LIBSAPROC_DEBUGINFO) && \ + $(QUIETLY) test ! -d $(LIBSAPROC_DEBUGINFO) || \ cp -f -r $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO) else - $(QUIETLY) test -f $(LIBSAPROC_DEBUGINFO) && \ + $(QUIETLY) test ! -f $(LIBSAPROC_DEBUGINFO) || \ cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO) endif - $(QUIETLY) test -f $(LIBSAPROC_DIZ) && \ + $(QUIETLY) test ! -f $(LIBSAPROC_DIZ) || \ cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ) $(QUIETLY) cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done" diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/bsd/makefiles/top.make --- a/hotspot/make/bsd/makefiles/top.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/bsd/makefiles/top.make Mon Feb 24 12:56:19 2014 -0800 @@ -128,7 +128,7 @@ @$(UpdatePCH) @$(MAKE) -f vm.make $(MFLAGS-adjusted) -install gamma: the_vm +install : the_vm @$(MAKE) -f vm.make $@ # next rules support "make foo.[ois]" diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/bsd/makefiles/vm.make --- a/hotspot/make/bsd/makefiles/vm.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/bsd/makefiles/vm.make Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -367,13 +367,13 @@ install_jvm: $(LIBJVM) @echo "Copying $(LIBJVM) to $(DEST_JVM)" ifeq ($(OS_VENDOR), Darwin) - $(QUIETLY) test -d $(LIBJVM_DEBUGINFO) && \ + $(QUIETLY) test ! -d $(LIBJVM_DEBUGINFO) || \ cp -f -r $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO) else - $(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \ + $(QUIETLY) test ! -f $(LIBJVM_DEBUGINFO) || \ cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO) endif - $(QUIETLY) test -f $(LIBJVM_DIZ) && \ + $(QUIETLY) test ! -f $(LIBJVM_DIZ) || \ cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ) $(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done" diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/hotspot.script --- a/hotspot/make/hotspot.script Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/hotspot.script Mon Feb 24 12:56:19 2014 -0800 @@ -49,7 +49,7 @@ GDB=gdb fi -# This is the name of the gdb binary to use +# This is the name of the dbx binary to use if [ ! "$DBX" ] then DBX=dbx @@ -68,9 +68,16 @@ # End of user changeable parameters ----------------------------------------- # +OS=`uname -s` + # Make sure the paths are fully specified, i.e. they must begin with /. REL_MYDIR=`dirname $0` MYDIR=`cd $REL_MYDIR && pwd` +case "$OS" in +CYGWIN*) + MYDIR=`cygpath -m "$MYDIR"` + ;; +esac # # Look whether the user wants to run inside gdb @@ -102,8 +109,17 @@ JDK=@@JDK_IMPORT_PATH@@ fi -if [ "${JDK}" = "" ]; then - echo "Failed to find JDK. Either ALT_JAVA_HOME is not set or JDK_IMPORT_PATH is empty." +if [ "${JDK}" != "" ]; then + case "$OS" in + CYGWIN*) + JDK=`cygpath -m "$JDK"` + ;; + esac + +else + echo "Failed to find JDK." \ + "Either ALT_JAVA_HOME is not set or JDK_IMPORT_PATH is empty." + exit 1 fi # We will set the LD_LIBRARY_PATH as follows: @@ -120,7 +136,6 @@ # Set up a suitable LD_LIBRARY_PATH or DYLD_LIBRARY_PATH -OS=`uname -s` if [ "${OS}" = "Darwin" ] then if [ -z "$DYLD_LIBRARY_PATH" ] @@ -141,7 +156,7 @@ export LD_LIBRARY_PATH fi -JPARMS="-Dsun.java.launcher=gamma -XXaltjvm=$MYDIR $@ $JAVA_ARGS"; +JPARMS="-XXaltjvm=$MYDIR -Dsun.java.launcher.is_altjvm=true $@ $JAVA_ARGS"; # Locate the java launcher LAUNCHER=$JDK/bin/java @@ -152,6 +167,11 @@ GDBSRCDIR=$MYDIR BASEDIR=`cd $MYDIR/../../.. && pwd` +case "$OS" in +CYGWIN*) + BASEDIR=`cygpath -m "$BASEDIR"` + ;; +esac init_gdb() { # Create a gdb script in case we should run inside gdb diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/linux/makefiles/buildtree.make --- a/hotspot/make/linux/makefiles/buildtree.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/linux/makefiles/buildtree.make Mon Feb 24 12:56:19 2014 -0800 @@ -124,7 +124,7 @@ # For dependencies and recursive makes. BUILDTREE_MAKE = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make -BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make trace.make sa.make +BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make trace.make sa.make dtrace.make BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \ SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT) @@ -361,6 +361,16 @@ echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \ ) > $@ +dtrace.make: $(BUILDTREE_MAKE) + @echo Creating $@ ... + $(QUIETLY) ( \ + $(BUILDTREE_COMMENT); \ + echo; \ + echo include flags.make; \ + echo; \ + echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \ + ) > $@ + FORCE: .PHONY: all FORCE diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/linux/makefiles/dtrace.make --- a/hotspot/make/linux/makefiles/dtrace.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/linux/makefiles/dtrace.make Mon Feb 24 12:56:19 2014 -0800 @@ -42,18 +42,39 @@ else SDT_H_FILE = /usr/include/sys/sdt.h endif + DTRACE_ENABLED = $(shell test -f $(SDT_H_FILE) && echo $(SDT_H_FILE)) REASON = "$(SDT_H_FILE) not found" +endif # GCC version +endif # OPENJDK + + +DTRACE_COMMON_SRCDIR = $(GAMMADIR)/src/os/posix/dtrace +DTRACE_PROG = dtrace +DtraceOutDir = $(GENERATED)/dtracefiles + +$(DtraceOutDir): + mkdir $(DtraceOutDir) + +$(DtraceOutDir)/hotspot.h: $(DTRACE_COMMON_SRCDIR)/hotspot.d | $(DtraceOutDir) + $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot.d + +$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d | $(DtraceOutDir) + $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d + +$(DtraceOutDir)/hs_private.h: $(DTRACE_COMMON_SRCDIR)/hs_private.d | $(DtraceOutDir) + $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hs_private.d + ifneq ($(DTRACE_ENABLED),) - CFLAGS += -DDTRACE_ENABLED -endif - -endif +CFLAGS += -DDTRACE_ENABLED +dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h +else +dtrace_gen_headers: + $(QUIETLY) echo "**NOTICE** Dtrace support disabled: $(REASON)" endif # Phony target used in vm.make build target to check whether enabled. -.PHONY: dtraceCheck ifeq ($(DTRACE_ENABLED),) dtraceCheck: $(QUIETLY) echo "**NOTICE** Dtrace support disabled: $(REASON)" @@ -61,5 +82,7 @@ dtraceCheck: endif +.PHONY: dtrace_gen_headers dtraceCheck + # It doesn't support HAVE_DTRACE_H though. diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/linux/makefiles/jsig.make --- a/hotspot/make/linux/makefiles/jsig.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/linux/makefiles/jsig.make Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -74,9 +74,9 @@ install_jsig: $(LIBJSIG) @echo "Copying $(LIBJSIG) to $(DEST_JSIG)" - $(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \ + $(QUIETLY) test ! -f $(LIBJSIG_DEBUGINFO) || \ cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO) - $(QUIETLY) test -f $(LIBJSIG_DIZ) && \ + $(QUIETLY) test ! -f $(LIBJSIG_DIZ) || \ cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ) $(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done" diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/linux/makefiles/optimized.make --- a/hotspot/make/linux/makefiles/optimized.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/linux/makefiles/optimized.make Mon Feb 24 12:56:19 2014 -0800 @@ -22,7 +22,7 @@ # # -# Sets make macros for making optimized version of Gamma VM +# Sets make macros for making optimized version of HotSpot VM # (This is the "product", not the "release" version.) # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/linux/makefiles/product.make --- a/hotspot/make/linux/makefiles/product.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/linux/makefiles/product.make Mon Feb 24 12:56:19 2014 -0800 @@ -22,7 +22,7 @@ # # -# Sets make macros for making optimized version of Gamma VM +# Sets make macros for making optimized version of HotSpot VM # (This is the "product", not the "release" version.) # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/linux/makefiles/saproc.make --- a/hotspot/make/linux/makefiles/saproc.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/linux/makefiles/saproc.make Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -113,13 +113,13 @@ endif install_saproc: $(BUILDLIBSAPROC) - $(QUIETLY) if [ -e $(LIBSAPROC) ] ; then \ - echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \ - test -f $(LIBSAPROC_DEBUGINFO) && \ + $(QUIETLY) if [ -e $(LIBSAPROC) ] ; then \ + echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \ + test ! -f $(LIBSAPROC_DEBUGINFO) || \ cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \ - test -f $(LIBSAPROC_DIZ) && \ - cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \ - cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \ + test ! -f $(LIBSAPROC_DIZ) || \ + cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \ + cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \ fi .PHONY: install_saproc diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/linux/makefiles/top.make --- a/hotspot/make/linux/makefiles/top.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/linux/makefiles/top.make Mon Feb 24 12:56:19 2014 -0800 @@ -80,7 +80,7 @@ @echo All done. # This is an explicit dependency for the sake of parallel makes. -vm_build_preliminaries: checks $(Cached_plat) $(AD_Files_If_Required) trace_stuff jvmti_stuff sa_stuff +vm_build_preliminaries: checks $(Cached_plat) $(AD_Files_If_Required) trace_stuff jvmti_stuff sa_stuff dtrace_stuff @# We need a null action here, so implicit rules don't get consulted. $(Cached_plat): $(Plat_File) @@ -102,6 +102,9 @@ sa_stuff: @$(MAKE) -f sa.make $(MFLAGS-adjusted) +dtrace_stuff: $(Cached_plat) $(adjust-mflags) + @$(MAKE) -f dtrace.make dtrace_gen_headers $(MFLAGS-adjusted) GENERATED=$(GENERATED) + # and the VM: must use other makefile with dependencies included # We have to go to great lengths to get control over the -jN argument @@ -119,7 +122,7 @@ @$(UpdatePCH) @$(MAKE) -f vm.make $(MFLAGS-adjusted) -install gamma: the_vm +install: the_vm @$(MAKE) -f vm.make $@ # next rules support "make foo.[ois]" diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/linux/makefiles/vm.make --- a/hotspot/make/linux/makefiles/vm.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/linux/makefiles/vm.make Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -366,9 +366,9 @@ install_jvm: $(LIBJVM) @echo "Copying $(LIBJVM) to $(DEST_JVM)" - $(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \ + $(QUIETLY) test ! -f $(LIBJVM_DEBUGINFO) || \ cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO) - $(QUIETLY) test -f $(LIBJVM_DIZ) && \ + $(QUIETLY) test ! -f $(LIBJVM_DIZ) || \ cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ) $(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done" diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/solaris/makefiles/dtrace.make --- a/hotspot/make/solaris/makefiles/dtrace.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/solaris/makefiles/dtrace.make Mon Feb 24 12:56:19 2014 -0800 @@ -55,6 +55,7 @@ GENOFFS = generate$(JVMOFFS) DTRACE_SRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/dtrace +DTRACE_COMMON_SRCDIR = $(GAMMADIR)/src/os/posix/dtrace DTRACE = dtrace DTRACE.o = $(DTRACE).o @@ -253,8 +254,8 @@ endif endif -$(DTRACE).d: $(DTRACE_SRCDIR)/hotspot.d $(DTRACE_SRCDIR)/hotspot_jni.d \ - $(DTRACE_SRCDIR)/hs_private.d $(DTRACE_SRCDIR)/jhelper.d +$(DTRACE).d: $(DTRACE_COMMON_SRCDIR)/hotspot.d $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d \ + $(DTRACE_COMMON_SRCDIR)/hs_private.d $(DTRACE_SRCDIR)/jhelper.d $(QUIETLY) cat $^ > $@ DTraced_Files = ciEnv.o \ @@ -332,14 +333,14 @@ $(DtraceOutDir): mkdir $(DtraceOutDir) -$(DtraceOutDir)/hotspot.h: $(DTRACE_SRCDIR)/hotspot.d | $(DtraceOutDir) - $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot.d +$(DtraceOutDir)/hotspot.h: $(DTRACE_COMMON_SRCDIR)/hotspot.d | $(DtraceOutDir) + $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot.d -$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_SRCDIR)/hotspot_jni.d | $(DtraceOutDir) - $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot_jni.d +$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d | $(DtraceOutDir) + $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d -$(DtraceOutDir)/hs_private.h: $(DTRACE_SRCDIR)/hs_private.d | $(DtraceOutDir) - $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hs_private.d +$(DtraceOutDir)/hs_private.h: $(DTRACE_COMMON_SRCDIR)/hs_private.d | $(DtraceOutDir) + $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hs_private.d dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/solaris/makefiles/jsig.make --- a/hotspot/make/solaris/makefiles/jsig.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/solaris/makefiles/jsig.make Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -79,9 +79,9 @@ install_jsig: $(LIBJSIG) @echo "Copying $(LIBJSIG) to $(DEST_JSIG)" - $(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \ + $(QUIETLY) test ! -f $(LIBJSIG_DEBUGINFO) || \ cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO) - $(QUIETLY) test -f $(LIBJSIG_DIZ) && \ + $(QUIETLY) test ! -f $(LIBJSIG_DIZ) || \ cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ) $(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done" diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/solaris/makefiles/optimized.make --- a/hotspot/make/solaris/makefiles/optimized.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/solaris/makefiles/optimized.make Mon Feb 24 12:56:19 2014 -0800 @@ -22,7 +22,7 @@ # # -# Sets make macros for making optimized version of Gamma VM +# Sets make macros for making optimized version of HotSpot VM # (This is the "product", not the "release" version.) # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/solaris/makefiles/product.make --- a/hotspot/make/solaris/makefiles/product.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/solaris/makefiles/product.make Mon Feb 24 12:56:19 2014 -0800 @@ -22,7 +22,7 @@ # # -# Sets make macros for making optimized version of Gamma VM +# Sets make macros for making optimized version of HotSpot VM # (This is the "product", not the "release" version.) # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/solaris/makefiles/saproc.make --- a/hotspot/make/solaris/makefiles/saproc.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/solaris/makefiles/saproc.make Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -147,13 +147,13 @@ endif install_saproc: $(BULDLIBSAPROC) - $(QUIETLY) if [ -f $(LIBSAPROC) ] ; then \ - echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \ - test -f $(LIBSAPROC_DEBUGINFO) && \ + $(QUIETLY) if [ -f $(LIBSAPROC) ] ; then \ + echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \ + test ! -f $(LIBSAPROC_DEBUGINFO) || \ cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \ - test -f $(LIBSAPROC_DIZ) && \ - cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \ - cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \ + test ! -f $(LIBSAPROC_DIZ) || \ + cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \ + cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \ fi .PHONY: install_saproc diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/solaris/makefiles/top.make --- a/hotspot/make/solaris/makefiles/top.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/solaris/makefiles/top.make Mon Feb 24 12:56:19 2014 -0800 @@ -114,7 +114,7 @@ the_vm: vm_build_preliminaries $(adjust-mflags) @$(MAKE) -f vm.make $(MFLAGS-adjusted) -install gamma: the_vm +install: the_vm @$(MAKE) -f vm.make $@ # next rules support "make foo.[oi]" diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/make/solaris/makefiles/vm.make --- a/hotspot/make/solaris/makefiles/vm.make Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/make/solaris/makefiles/vm.make Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ # -# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -333,9 +333,9 @@ install_jvm: $(LIBJVM) @echo "Copying $(LIBJVM) to $(DEST_JVM)" - $(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \ + $(QUIETLY) test ! -f $(LIBJVM_DEBUGINFO) || \ cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO) - $(QUIETLY) test -f $(LIBJVM_DIZ) && \ + $(QUIETLY) test ! -f $(LIBJVM_DIZ) || \ cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ) $(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done" diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp --- a/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -107,10 +107,6 @@ return Address(rsp, Interpreter::expr_offset_in_bytes(2)); } -static inline Address at_tos_p3() { - return Address(rsp, Interpreter::expr_offset_in_bytes(3)); -} - // Condition conversion static Assembler::Condition j_not(TemplateTable::Condition cc) { switch (cc) { diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/os/bsd/dtrace/hotspot.d --- a/hotspot/src/os/bsd/dtrace/hotspot.d Fri Feb 21 11:39:47 2014 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -provider hotspot { - probe class__loaded(char*, uintptr_t, void*, uintptr_t); - probe class__unloaded(char*, uintptr_t, void*, uintptr_t); - probe class__initialization__required(char*, uintptr_t, void*, intptr_t); - probe class__initialization__recursive(char*, uintptr_t, void*, intptr_t,int); - probe class__initialization__concurrent(char*, uintptr_t, void*, intptr_t,int); - probe class__initialization__erroneous(char*, uintptr_t, void*, intptr_t, int); - probe class__initialization__super__failed(char*, uintptr_t, void*, intptr_t,int); - probe class__initialization__clinit(char*, uintptr_t, void*, intptr_t,int); - probe class__initialization__error(char*, uintptr_t, void*, intptr_t,int); - probe class__initialization__end(char*, uintptr_t, void*, intptr_t,int); - probe vm__init__begin(); - probe vm__init__end(); - probe vm__shutdown(); - probe vmops__request(char*, uintptr_t, int); - probe vmops__begin(char*, uintptr_t, int); - probe vmops__end(char*, uintptr_t, int); - probe gc__begin(uintptr_t); - probe gc__end(); - probe mem__pool__gc__begin( - char*, uintptr_t, char*, uintptr_t, - uintptr_t, uintptr_t, uintptr_t, uintptr_t); - probe mem__pool__gc__end( - char*, uintptr_t, char*, uintptr_t, - uintptr_t, uintptr_t, uintptr_t, uintptr_t); - probe thread__start(char*, uintptr_t, uintptr_t, uintptr_t, uintptr_t); - probe thread__stop(char*, uintptr_t, uintptr_t, uintptr_t, uintptr_t); - probe thread__sleep__begin(long long); - probe thread__sleep__end(int); - probe thread__yield(); - probe thread__park__begin(uintptr_t, int, long long); - probe thread__park__end(uintptr_t); - probe thread__unpark(uintptr_t); - probe method__compile__begin( - char*, uintptr_t, char*, uintptr_t, char*, uintptr_t, char*, uintptr_t); - probe method__compile__end( - char*, uintptr_t, char*, uintptr_t, char*, uintptr_t, - char*, uintptr_t, uintptr_t); - probe compiled__method__load( - char*, uintptr_t, char*, uintptr_t, char*, uintptr_t, void*, uintptr_t); - probe compiled__method__unload( - char*, uintptr_t, char*, uintptr_t, char*, uintptr_t); - probe monitor__contended__enter(uintptr_t, uintptr_t, char*, uintptr_t); - probe monitor__contended__entered(uintptr_t, uintptr_t, char*, uintptr_t); - probe monitor__contended__exit(uintptr_t, uintptr_t, char*, uintptr_t); - probe monitor__wait(uintptr_t, uintptr_t, char*, uintptr_t, uintptr_t); - probe monitor__waited(uintptr_t, uintptr_t, char*, uintptr_t); - probe monitor__notify(uintptr_t, uintptr_t, char*, uintptr_t); - probe monitor__notifyAll(uintptr_t, uintptr_t, char*, uintptr_t); - - probe object__alloc(int, char*, uintptr_t, uintptr_t); - probe method__entry( - int, char*, int, char*, int, char*, int); - probe method__return( - int, char*, int, char*, int, char*, int); -}; - -#pragma D attributes Evolving/Evolving/Common provider hotspot provider -#pragma D attributes Private/Private/Unknown provider hotspot module -#pragma D attributes Private/Private/Unknown provider hotspot function -#pragma D attributes Evolving/Evolving/Common provider hotspot name -#pragma D attributes Evolving/Evolving/Common provider hotspot args diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/os/bsd/dtrace/hotspot_jni.d --- a/hotspot/src/os/bsd/dtrace/hotspot_jni.d Fri Feb 21 11:39:47 2014 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,506 +0,0 @@ -/* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -provider hotspot_jni { - probe AllocObject__entry(void*, void*); - probe AllocObject__return(void*); - probe AttachCurrentThreadAsDaemon__entry(void*, void**, void*); - probe AttachCurrentThreadAsDaemon__return(uint32_t); - probe AttachCurrentThread__entry(void*, void**, void*); - probe AttachCurrentThread__return(uint32_t); - probe CallBooleanMethodA__entry(void*, void*, uintptr_t); - probe CallBooleanMethodA__return(uintptr_t); - probe CallBooleanMethod__entry(void*, void*, uintptr_t); - probe CallBooleanMethod__return(uintptr_t); - probe CallBooleanMethodV__entry(void*, void*, uintptr_t); - probe CallBooleanMethodV__return(uintptr_t); - probe CallByteMethodA__entry(void*, void*, uintptr_t); - probe CallByteMethodA__return(char); - probe CallByteMethod__entry(void*, void*, uintptr_t); - probe CallByteMethod__return(char); - probe CallByteMethodV__entry(void*, void*, uintptr_t); - probe CallByteMethodV__return(char); - probe CallCharMethodA__entry(void*, void*, uintptr_t); - probe CallCharMethodA__return(uint16_t); - probe CallCharMethod__entry(void*, void*, uintptr_t); - probe CallCharMethod__return(uint16_t); - probe CallCharMethodV__entry(void*, void*, uintptr_t); - probe CallCharMethodV__return(uint16_t); - probe CallDoubleMethodA__entry(void*, void*, uintptr_t); - probe CallDoubleMethodA__return(); - probe CallDoubleMethod__entry(void*, void*, uintptr_t); - probe CallDoubleMethod__return(); - probe CallDoubleMethodV__entry(void*, void*, uintptr_t); - probe CallDoubleMethodV__return(); - probe CallFloatMethodA__entry(void*, void*, uintptr_t); - probe CallFloatMethodA__return(); - probe CallFloatMethod__entry(void*, void*, uintptr_t); - probe CallFloatMethod__return(); - probe CallFloatMethodV__entry(void*, void*, uintptr_t); - probe CallFloatMethodV__return(); - probe CallIntMethodA__entry(void*, void*, uintptr_t); - probe CallIntMethodA__return(uint32_t); - probe CallIntMethod__entry(void*, void*, uintptr_t); - probe CallIntMethod__return(uint32_t); - probe CallIntMethodV__entry(void*, void*, uintptr_t); - probe CallIntMethodV__return(uint32_t); - probe CallLongMethodA__entry(void*, void*, uintptr_t); - probe CallLongMethodA__return(uintptr_t); - probe CallLongMethod__entry(void*, void*, uintptr_t); - probe CallLongMethod__return(uintptr_t); - probe CallLongMethodV__entry(void*, void*, uintptr_t); - probe CallLongMethodV__return(uintptr_t); - probe CallNonvirtualBooleanMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualBooleanMethodA__return(uintptr_t); - probe CallNonvirtualBooleanMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualBooleanMethod__return(uintptr_t); - probe CallNonvirtualBooleanMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualBooleanMethodV__return(uintptr_t); - probe CallNonvirtualByteMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualByteMethodA__return(char); - probe CallNonvirtualByteMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualByteMethod__return(char); - probe CallNonvirtualByteMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualByteMethodV__return(char); - probe CallNonvirtualCharMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualCharMethodA__return(uint16_t); - probe CallNonvirtualCharMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualCharMethod__return(uint16_t); - probe CallNonvirtualCharMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualCharMethodV__return(uint16_t); - probe CallNonvirtualDoubleMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualDoubleMethodA__return(); - probe CallNonvirtualDoubleMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualDoubleMethod__return(); - probe CallNonvirtualDoubleMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualDoubleMethodV__return(); - probe CallNonvirtualFloatMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualFloatMethodA__return(); - probe CallNonvirtualFloatMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualFloatMethod__return(); - probe CallNonvirtualFloatMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualFloatMethodV__return(); - probe CallNonvirtualIntMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualIntMethodA__return(uint32_t); - probe CallNonvirtualIntMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualIntMethod__return(uint32_t); - probe CallNonvirtualIntMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualIntMethodV__return(uint32_t); - probe CallNonvirtualLongMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualLongMethodA__return(uintptr_t); - probe CallNonvirtualLongMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualLongMethod__return(uintptr_t); - probe CallNonvirtualLongMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualLongMethodV__return(uintptr_t); - probe CallNonvirtualObjectMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualObjectMethodA__return(void*); - probe CallNonvirtualObjectMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualObjectMethod__return(void*); - probe CallNonvirtualObjectMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualObjectMethodV__return(void*); - probe CallNonvirtualShortMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualShortMethodA__return(uint16_t); - probe CallNonvirtualShortMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualShortMethod__return(uint16_t); - probe CallNonvirtualShortMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualShortMethodV__return(uint16_t); - probe CallNonvirtualVoidMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualVoidMethodA__return(); - probe CallNonvirtualVoidMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualVoidMethod__return(); - probe CallNonvirtualVoidMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualVoidMethodV__return(); - probe CallObjectMethodA__entry(void*, void*, uintptr_t); - probe CallObjectMethodA__return(void*); - probe CallObjectMethod__entry(void*, void*, uintptr_t); - probe CallObjectMethod__return(void*); - probe CallObjectMethodV__entry(void*, void*, uintptr_t); - probe CallObjectMethodV__return(void*); - probe CallShortMethodA__entry(void*, void*, uintptr_t); - probe CallShortMethodA__return(uint16_t); - probe CallShortMethod__entry(void*, void*, uintptr_t); - probe CallShortMethod__return(uint16_t); - probe CallShortMethodV__entry(void*, void*, uintptr_t); - probe CallShortMethodV__return(uint16_t); - probe CallStaticBooleanMethodA__entry(void*, void*, uintptr_t); - probe CallStaticBooleanMethodA__return(uintptr_t); - probe CallStaticBooleanMethod__entry(void*, void*, uintptr_t); - probe CallStaticBooleanMethod__return(uintptr_t); - probe CallStaticBooleanMethodV__entry(void*, void*, uintptr_t); - probe CallStaticBooleanMethodV__return(uintptr_t); - probe CallStaticByteMethodA__entry(void*, void*, uintptr_t); - probe CallStaticByteMethodA__return(char); - probe CallStaticByteMethod__entry(void*, void*, uintptr_t); - probe CallStaticByteMethod__return(char); - probe CallStaticByteMethodV__entry(void*, void*, uintptr_t); - probe CallStaticByteMethodV__return(char); - probe CallStaticCharMethodA__entry(void*, void*, uintptr_t); - probe CallStaticCharMethodA__return(uint16_t); - probe CallStaticCharMethod__entry(void*, void*, uintptr_t); - probe CallStaticCharMethod__return(uint16_t); - probe CallStaticCharMethodV__entry(void*, void*, uintptr_t); - probe CallStaticCharMethodV__return(uint16_t); - probe CallStaticDoubleMethodA__entry(void*, void*, uintptr_t); - probe CallStaticDoubleMethodA__return(); - probe CallStaticDoubleMethod__entry(void*, void*, uintptr_t); - probe CallStaticDoubleMethod__return(); - probe CallStaticDoubleMethodV__entry(void*, void*, uintptr_t); - probe CallStaticDoubleMethodV__return(); - probe CallStaticFloatMethodA__entry(void*, void*, uintptr_t); - probe CallStaticFloatMethodA__return(); - probe CallStaticFloatMethod__entry(void*, void*, uintptr_t); - probe CallStaticFloatMethod__return(); - probe CallStaticFloatMethodV__entry(void*, void*, uintptr_t); - probe CallStaticFloatMethodV__return(); - probe CallStaticIntMethodA__entry(void*, void*, uintptr_t); - probe CallStaticIntMethodA__return(uint32_t); - probe CallStaticIntMethod__entry(void*, void*, uintptr_t); - probe CallStaticIntMethod__return(uint32_t); - probe CallStaticIntMethodV__entry(void*, void*, uintptr_t); - probe CallStaticIntMethodV__return(uint32_t); - probe CallStaticLongMethodA__entry(void*, void*, uintptr_t); - probe CallStaticLongMethodA__return(uintptr_t); - probe CallStaticLongMethod__entry(void*, void*, uintptr_t); - probe CallStaticLongMethod__return(uintptr_t); - probe CallStaticLongMethodV__entry(void*, void*, uintptr_t); - probe CallStaticLongMethodV__return(uintptr_t); - probe CallStaticObjectMethodA__entry(void*, void*, uintptr_t); - probe CallStaticObjectMethodA__return(void*); - probe CallStaticObjectMethod__entry(void*, void*, uintptr_t); - probe CallStaticObjectMethod__return(void*); - probe CallStaticObjectMethodV__entry(void*, void*, uintptr_t); - probe CallStaticObjectMethodV__return(void*); - probe CallStaticShortMethodA__entry(void*, void*, uintptr_t); - probe CallStaticShortMethodA__return(uint16_t); - probe CallStaticShortMethod__entry(void*, void*, uintptr_t); - probe CallStaticShortMethod__return(uint16_t); - probe CallStaticShortMethodV__entry(void*, void*, uintptr_t); - probe CallStaticShortMethodV__return(uint16_t); - probe CallStaticVoidMethodA__entry(void*, void*, uintptr_t); - probe CallStaticVoidMethodA__return(); - probe CallStaticVoidMethod__entry(void*, void*, uintptr_t); - probe CallStaticVoidMethod__return(); - probe CallStaticVoidMethodV__entry(void*, void*, uintptr_t); - probe CallStaticVoidMethodV__return(); - probe CallVoidMethodA__entry(void*, void*, uintptr_t); - probe CallVoidMethodA__return(); - probe CallVoidMethod__entry(void*, void*, uintptr_t); - probe CallVoidMethod__return(); - probe CallVoidMethodV__entry(void*, void*, uintptr_t); - probe CallVoidMethodV__return(); - probe CreateJavaVM__entry(void**, void**, void*); - probe CreateJavaVM__return(uint32_t); - probe DefineClass__entry(void*, const char*, void*, char*, uintptr_t); - probe DefineClass__return(void*); - probe DeleteGlobalRef__entry(void*, void*); - probe DeleteGlobalRef__return(); - probe DeleteLocalRef__entry(void*, void*); - probe DeleteLocalRef__return(); - probe DeleteWeakGlobalRef__entry(void*, void*); - probe DeleteWeakGlobalRef__return(); - probe DestroyJavaVM__entry(void*); - probe DestroyJavaVM__return(uint32_t); - probe DetachCurrentThread__entry(void*); - probe DetachCurrentThread__return(uint32_t); - probe EnsureLocalCapacity__entry(void*, uint32_t); - probe EnsureLocalCapacity__return(uint32_t); - probe ExceptionCheck__entry(void*); - probe ExceptionCheck__return(uintptr_t); - probe ExceptionClear__entry(void*); - probe ExceptionClear__return(); - probe ExceptionDescribe__entry(void*); - probe ExceptionDescribe__return(); - probe ExceptionOccurred__entry(void*); - probe ExceptionOccurred__return(void*); - probe FatalError__entry(void* env, const char*); - probe FindClass__entry(void*, const char*); - probe FindClass__return(void*); - probe FromReflectedField__entry(void*, void*); - probe FromReflectedField__return(uintptr_t); - probe FromReflectedMethod__entry(void*, void*); - probe FromReflectedMethod__return(uintptr_t); - probe GetArrayLength__entry(void*, void*); - probe GetArrayLength__return(uintptr_t); - probe GetBooleanArrayElements__entry(void*, void*, uintptr_t*); - probe GetBooleanArrayElements__return(uintptr_t*); - probe GetBooleanArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uintptr_t*); - probe GetBooleanArrayRegion__return(); - probe GetBooleanField__entry(void*, void*, uintptr_t); - probe GetBooleanField__return(uintptr_t); - probe GetByteArrayElements__entry(void*, void*, uintptr_t*); - probe GetByteArrayElements__return(char*); - probe GetByteArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, char*); - probe GetByteArrayRegion__return(); - probe GetByteField__entry(void*, void*, uintptr_t); - probe GetByteField__return(char); - probe GetCharArrayElements__entry(void*, void*, uintptr_t*); - probe GetCharArrayElements__return(uint16_t*); - probe GetCharArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uint16_t*); - probe GetCharArrayRegion__return(); - probe GetCharField__entry(void*, void*, uintptr_t); - probe GetCharField__return(uint16_t); - probe GetCreatedJavaVMs__entry(void**, uintptr_t, uintptr_t*); - probe GetCreatedJavaVMs__return(uintptr_t); - probe GetDefaultJavaVMInitArgs__entry(void*); - probe GetDefaultJavaVMInitArgs__return(uint32_t); - probe GetDirectBufferAddress__entry(void*, void*); - probe GetDirectBufferAddress__return(void*); - probe GetDirectBufferCapacity__entry(void*, void*); - probe GetDirectBufferCapacity__return(uintptr_t); - probe GetDoubleArrayElements__entry(void*, void*, uintptr_t*); - probe GetDoubleArrayElements__return(double*); - probe GetDoubleArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, double*); - probe GetDoubleArrayRegion__return(); - probe GetDoubleField__entry(void*, void*, uintptr_t); - probe GetDoubleField__return(); - probe GetEnv__entry(void*, void*, uint32_t); - probe GetEnv__return(uint32_t); - probe GetFieldID__entry(void*, void*, const char*, const char*); - probe GetFieldID__return(uintptr_t); - probe GetFloatArrayElements__entry(void*, void*, uintptr_t*); - probe GetFloatArrayElements__return(float*); - probe GetFloatArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, float*); - probe GetFloatArrayRegion__return(); - probe GetFloatField__entry(void*, void*, uintptr_t); - probe GetFloatField__return(); - probe GetIntArrayElements__entry(void*, void*, uintptr_t*); - probe GetIntArrayElements__return(uint32_t*); - probe GetIntArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uint32_t*); - probe GetIntArrayRegion__return(); - probe GetIntField__entry(void*, void*, uintptr_t); - probe GetIntField__return(uint32_t); - probe GetJavaVM__entry(void*, void**); - probe GetJavaVM__return(uint32_t); - probe GetLongArrayElements__entry(void*, void*, uintptr_t*); - probe GetLongArrayElements__return(uintptr_t*); - probe GetLongArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uintptr_t*); - probe GetLongArrayRegion__return(); - probe GetLongField__entry(void*, void*, uintptr_t); - probe GetLongField__return(uintptr_t); - probe GetMethodID__entry(void*, void*, const char*, const char*); - probe GetMethodID__return(uintptr_t); - probe GetObjectArrayElement__entry(void*, void*, uintptr_t); - probe GetObjectArrayElement__return(void*); - probe GetObjectClass__entry(void*, void*); - probe GetObjectClass__return(void*); - probe GetObjectField__entry(void*, void*, uintptr_t); - probe GetObjectField__return(void*); - probe GetObjectRefType__entry(void*, void*); - probe GetObjectRefType__return(void*); - probe GetPrimitiveArrayCritical__entry(void*, void*, uintptr_t*); - probe GetPrimitiveArrayCritical__return(void*); - probe GetShortArrayElements__entry(void*, void*, uintptr_t*); - probe GetShortArrayElements__return(uint16_t*); - probe GetShortArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uint16_t*); - probe GetShortArrayRegion__return(); - probe GetShortField__entry(void*, void*, uintptr_t); - probe GetShortField__return(uint16_t); - probe GetStaticBooleanField__entry(void*, void*, uintptr_t); - probe GetStaticBooleanField__return(uintptr_t); - probe GetStaticByteField__entry(void*, void*, uintptr_t); - probe GetStaticByteField__return(char); - probe GetStaticCharField__entry(void*, void*, uintptr_t); - probe GetStaticCharField__return(uint16_t); - probe GetStaticDoubleField__entry(void*, void*, uintptr_t); - probe GetStaticDoubleField__return(); - probe GetStaticFieldID__entry(void*, void*, const char*, const char*); - probe GetStaticFieldID__return(uintptr_t); - probe GetStaticFloatField__entry(void*, void*, uintptr_t); - probe GetStaticFloatField__return(); - probe GetStaticIntField__entry(void*, void*, uintptr_t); - probe GetStaticIntField__return(uint32_t); - probe GetStaticLongField__entry(void*, void*, uintptr_t); - probe GetStaticLongField__return(uintptr_t); - probe GetStaticMethodID__entry(void*, void*, const char*, const char*); - probe GetStaticMethodID__return(uintptr_t); - probe GetStaticObjectField__entry(void*, void*, uintptr_t); - probe GetStaticObjectField__return(void*); - probe GetStaticShortField__entry(void*, void*, uintptr_t); - probe GetStaticShortField__return(uint16_t); - probe GetStringChars__entry(void*, void*, uintptr_t*); - probe GetStringChars__return(const uint16_t*); - probe GetStringCritical__entry(void*, void*, uintptr_t*); - probe GetStringCritical__return(const uint16_t*); - probe GetStringLength__entry(void*, void*); - probe GetStringLength__return(uintptr_t); - probe GetStringRegion__entry(void*, void*, uintptr_t, uintptr_t, uint16_t*); - probe GetStringRegion__return(); - probe GetStringUTFChars__entry(void*, void*, uintptr_t*); - probe GetStringUTFChars__return(const char*); - probe GetStringUTFLength__entry(void*, void*); - probe GetStringUTFLength__return(uintptr_t); - probe GetStringUTFRegion__entry(void*, void*, uintptr_t, uintptr_t, char*); - probe GetStringUTFRegion__return(); - probe GetSuperclass__entry(void*, void*); - probe GetSuperclass__return(void*); - probe GetVersion__entry(void*); - probe GetVersion__return(uint32_t); - probe IsAssignableFrom__entry(void*, void*, void*); - probe IsAssignableFrom__return(uintptr_t); - probe IsInstanceOf__entry(void*, void*, void*); - probe IsInstanceOf__return(uintptr_t); - probe IsSameObject__entry(void*, void*, void*); - probe IsSameObject__return(uintptr_t); - probe MonitorEnter__entry(void*, void*); - probe MonitorEnter__return(uint32_t); - probe MonitorExit__entry(void*, void*); - probe MonitorExit__return(uint32_t); - probe NewBooleanArray__entry(void*, uintptr_t); - probe NewBooleanArray__return(void*); - probe NewByteArray__entry(void*, uintptr_t); - probe NewByteArray__return(void*); - probe NewCharArray__entry(void*, uintptr_t); - probe NewCharArray__return(void*); - probe NewDirectByteBuffer__entry(void*, void*, uintptr_t); - probe NewDirectByteBuffer__return(void*); - probe NewDoubleArray__entry(void*, uintptr_t); - probe NewDoubleArray__return(void*); - probe NewFloatArray__entry(void*, uintptr_t); - probe NewFloatArray__return(void*); - probe NewGlobalRef__entry(void*, void*); - probe NewGlobalRef__return(void*); - probe NewIntArray__entry(void*, uintptr_t); - probe NewIntArray__return(void*); - probe NewLocalRef__entry(void*, void*); - probe NewLocalRef__return(void*); - probe NewLongArray__entry(void*, uintptr_t); - probe NewLongArray__return(void*); - probe NewObjectA__entry(void*, void*, uintptr_t); - probe NewObjectA__return(void*); - probe NewObjectArray__entry(void*, uintptr_t, void*, void*); - probe NewObjectArray__return(void*); - probe NewObject__entry(void*, void*, uintptr_t); - probe NewObject__return(void*); - probe NewObjectV__entry(void*, void*, uintptr_t); - probe NewObjectV__return(void*); - probe NewShortArray__entry(void*, uintptr_t); - probe NewShortArray__return(void*); - probe NewString__entry(void*, const uint16_t*, uintptr_t); - probe NewString__return(void*); - probe NewStringUTF__entry(void*, const char*); - probe NewStringUTF__return(void*); - probe NewWeakGlobalRef__entry(void*, void*); - probe NewWeakGlobalRef__return(void*); - probe PopLocalFrame__entry(void*, void*); - probe PopLocalFrame__return(void*); - probe PushLocalFrame__entry(void*, uint32_t); - probe PushLocalFrame__return(uint32_t); - probe RegisterNatives__entry(void*, void*, const void*, uint32_t); - probe RegisterNatives__return(uint32_t); - probe ReleaseBooleanArrayElements__entry(void*, void*, uintptr_t*, uint32_t); - probe ReleaseBooleanArrayElements__return(); - probe ReleaseByteArrayElements__entry(void*, void*, char*, uint32_t); - probe ReleaseByteArrayElements__return(); - probe ReleaseCharArrayElements__entry(void*, void*, uint16_t*, uint32_t); - probe ReleaseCharArrayElements__return(); - probe ReleaseDoubleArrayElements__entry(void*, void*, double*, uint32_t); - probe ReleaseDoubleArrayElements__return(); - probe ReleaseFloatArrayElements__entry(void*, void*, float*, uint32_t); - probe ReleaseFloatArrayElements__return(); - probe ReleaseIntArrayElements__entry(void*, void*, uint32_t*, uint32_t); - probe ReleaseIntArrayElements__return(); - probe ReleaseLongArrayElements__entry(void*, void*, uintptr_t*, uint32_t); - probe ReleaseLongArrayElements__return(); - probe ReleasePrimitiveArrayCritical__entry(void*, void*, void*, uint32_t); - probe ReleasePrimitiveArrayCritical__return(); - probe ReleaseShortArrayElements__entry(void*, void*, uint16_t*, uint32_t); - probe ReleaseShortArrayElements__return(); - probe ReleaseStringChars__entry(void*, void*, const uint16_t*); - probe ReleaseStringChars__return(); - probe ReleaseStringCritical__entry(void*, void*, const uint16_t*); - probe ReleaseStringCritical__return(); - probe ReleaseStringUTFChars__entry(void*, void*, const char*); - probe ReleaseStringUTFChars__return(); - probe SetBooleanArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uintptr_t*); - probe SetBooleanArrayRegion__return(); - probe SetBooleanField__entry(void*, void*, uintptr_t, uintptr_t); - probe SetBooleanField__return(); - probe SetByteArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const char*); - probe SetByteArrayRegion__return(); - probe SetByteField__entry(void*, void*, uintptr_t, char); - probe SetByteField__return(); - probe SetCharArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uint16_t*); - probe SetCharArrayRegion__return(); - probe SetCharField__entry(void*, void*, uintptr_t, uint16_t); - probe SetCharField__return(); - probe SetDoubleArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const double*); - probe SetDoubleArrayRegion__return(); - probe SetDoubleField__entry(void*, void*, uintptr_t); - probe SetDoubleField__return(); - probe SetFloatArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const float*); - probe SetFloatArrayRegion__return(); - probe SetFloatField__entry(void*, void*, uintptr_t); - probe SetFloatField__return(); - probe SetIntArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uint32_t*); - probe SetIntArrayRegion__return(); - probe SetIntField__entry(void*, void*, uintptr_t, uint32_t); - probe SetIntField__return(); - probe SetLongArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uintptr_t*); - probe SetLongArrayRegion__return(); - probe SetLongField__entry(void*, void*, uintptr_t, uintptr_t); - probe SetLongField__return(); - probe SetObjectArrayElement__entry(void*, void*, uintptr_t, void*); - probe SetObjectArrayElement__return(); - probe SetObjectField__entry(void*, void*, uintptr_t, void*); - probe SetObjectField__return(); - probe SetShortArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uint16_t*); - probe SetShortArrayRegion__return(); - probe SetShortField__entry(void*, void*, uintptr_t, uint16_t); - probe SetShortField__return(); - probe SetStaticBooleanField__entry(void*, void*, uintptr_t, uintptr_t); - probe SetStaticBooleanField__return(); - probe SetStaticByteField__entry(void*, void*, uintptr_t, char); - probe SetStaticByteField__return(); - probe SetStaticCharField__entry(void*, void*, uintptr_t, uint16_t); - probe SetStaticCharField__return(); - probe SetStaticDoubleField__entry(void*, void*, uintptr_t); - probe SetStaticDoubleField__return(); - probe SetStaticFloatField__entry(void*, void*, uintptr_t); - probe SetStaticFloatField__return(); - probe SetStaticIntField__entry(void*, void*, uintptr_t, uint32_t); - probe SetStaticIntField__return(); - probe SetStaticLongField__entry(void*, void*, uintptr_t, uintptr_t); - probe SetStaticLongField__return(); - probe SetStaticObjectField__entry(void*, void*, uintptr_t, void*); - probe SetStaticObjectField__return(); - probe SetStaticShortField__entry(void*, void*, uintptr_t, uint16_t); - probe SetStaticShortField__return(); - probe Throw__entry(void*, void*); - probe Throw__return(intptr_t); - probe ThrowNew__entry(void*, void*, const char*); - probe ThrowNew__return(intptr_t); - probe ToReflectedField__entry(void*, void*, uintptr_t, uintptr_t); - probe ToReflectedField__return(void*); - probe ToReflectedMethod__entry(void*, void*, uintptr_t, uintptr_t); - probe ToReflectedMethod__return(void*); - probe UnregisterNatives__entry(void*, void*); - probe UnregisterNatives__return(uint32_t); -}; - -#pragma D attributes Standard/Standard/Common provider hotspot_jni provider -#pragma D attributes Private/Private/Unknown provider hotspot_jni module -#pragma D attributes Private/Private/Unknown provider hotspot_jni function -#pragma D attributes Standard/Standard/Common provider hotspot_jni name -#pragma D attributes Evolving/Evolving/Common provider hotspot_jni args - diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/os/bsd/dtrace/hs_private.d --- a/hotspot/src/os/bsd/dtrace/hs_private.d Fri Feb 21 11:39:47 2014 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -provider hs_private { - probe hashtable__new_entry(void*, uint32_t, uintptr_t, void*); - probe safepoint__begin(); - probe safepoint__end(); - probe cms__initmark__begin(); - probe cms__initmark__end(); - probe cms__remark__begin(); - probe cms__remark__end(); -}; - -#pragma D attributes Private/Private/Common provider hs_private provider -#pragma D attributes Private/Private/Unknown provider hs_private module -#pragma D attributes Private/Private/Unknown provider hs_private function -#pragma D attributes Private/Private/Common provider hs_private name -#pragma D attributes Private/Private/Common provider hs_private args - diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/os/bsd/vm/os_bsd.cpp --- a/hotspot/src/os/bsd/vm/os_bsd.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/os/bsd/vm/os_bsd.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -1788,12 +1788,14 @@ if (rp == NULL) return; - if (Arguments::created_by_gamma_launcher()) { - // Support for the gamma launcher. Typical value for buf is - // "/jre/lib///libjvm". If "/jre/lib/" appears at - // the right place in the string, then assume we are installed in a JDK and - // we're done. Otherwise, check for a JAVA_HOME environment variable and - // construct a path to the JVM being overridden. + if (Arguments::sun_java_launcher_is_altjvm()) { + // Support for the java launcher's '-XXaltjvm=' option. Typical + // value for buf is "/jre/lib///libjvm.so" + // or "/jre/lib//libjvm.dylib". If "/jre/lib/" + // appears at the right place in the string, then assume we are + // installed in a JDK and we're done. Otherwise, check for a + // JAVA_HOME environment variable and construct a path to the JVM + // being overridden. const char *p = buf + strlen(buf) - 1; for (int count = 0; p > buf && count < 5; ++count) { diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/os/linux/vm/os_linux.cpp --- a/hotspot/src/os/linux/vm/os_linux.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/os/linux/vm/os_linux.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2371,13 +2371,14 @@ if (rp == NULL) return; - if (Arguments::created_by_gamma_launcher()) { - // Support for the gamma launcher. Typical value for buf is - // "/jre/lib///libjvm.so". If "/jre/lib/" appears at - // the right place in the string, then assume we are installed in a JDK and - // we're done. Otherwise, check for a JAVA_HOME environment variable and fix - // up the path so it looks like libjvm.so is installed there (append a - // fake suffix hotspot/libjvm.so). + if (Arguments::sun_java_launcher_is_altjvm()) { + // Support for the java launcher's '-XXaltjvm=' option. Typical + // value for buf is "/jre/lib///libjvm.so". + // If "/jre/lib/" appears at the right place in the string, then + // assume we are installed in a JDK and we're done. Otherwise, check + // for a JAVA_HOME environment variable and fix up the path so it + // looks like libjvm.so is installed there (append a fake suffix + // hotspot/libjvm.so). const char *p = buf + strlen(buf) - 1; for (int count = 0; p > buf && count < 5; ++count) { for (--p; p > buf && *p != '/'; --p) @@ -2999,7 +3000,9 @@ unsigned char vec[1]; unsigned imin = 1, imax = pages + 1, imid; - int mincore_return_value; + int mincore_return_value = 0; + + assert(imin <= imax, "Unexpected page size"); while (imin < imax) { imid = (imax + imin) / 2; diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/os/linux/vm/perfMemory_linux.cpp --- a/hotspot/src/os/linux/vm/perfMemory_linux.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/os/linux/vm/perfMemory_linux.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -891,8 +891,16 @@ FREE_C_HEAP_ARRAY(char, filename, mtInternal); // open the shared memory file for the give vmid - fd = open_sharedmem_file(rfilename, file_flags, CHECK); - assert(fd != OS_ERR, "unexpected value"); + fd = open_sharedmem_file(rfilename, file_flags, THREAD); + + if (fd == OS_ERR) { + return; + } + + if (HAS_PENDING_EXCEPTION) { + ::close(fd); + return; + } if (*sizep == 0) { size = sharedmem_filesize(fd, CHECK); diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/os/posix/dtrace/hotspot.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hotspot/src/os/posix/dtrace/hotspot.d Mon Feb 24 12:56:19 2014 -0800 @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +provider hotspot { + probe class__loaded(char*, uintptr_t, void*, uintptr_t); + probe class__unloaded(char*, uintptr_t, void*, uintptr_t); + probe class__initialization__required(char*, uintptr_t, void*, intptr_t); + probe class__initialization__recursive(char*, uintptr_t, void*, intptr_t,int); + probe class__initialization__concurrent(char*, uintptr_t, void*, intptr_t,int); + probe class__initialization__erroneous(char*, uintptr_t, void*, intptr_t, int); + probe class__initialization__super__failed(char*, uintptr_t, void*, intptr_t,int); + probe class__initialization__clinit(char*, uintptr_t, void*, intptr_t,int); + probe class__initialization__error(char*, uintptr_t, void*, intptr_t,int); + probe class__initialization__end(char*, uintptr_t, void*, intptr_t,int); + probe vm__init__begin(); + probe vm__init__end(); + probe vm__shutdown(); + probe vmops__request(char*, uintptr_t, int); + probe vmops__begin(char*, uintptr_t, int); + probe vmops__end(char*, uintptr_t, int); + probe gc__begin(uintptr_t); + probe gc__end(); + probe mem__pool__gc__begin( + char*, uintptr_t, char*, uintptr_t, + uintptr_t, uintptr_t, uintptr_t, uintptr_t); + probe mem__pool__gc__end( + char*, uintptr_t, char*, uintptr_t, + uintptr_t, uintptr_t, uintptr_t, uintptr_t); + probe thread__start(char*, uintptr_t, uintptr_t, uintptr_t, uintptr_t); + probe thread__stop(char*, uintptr_t, uintptr_t, uintptr_t, uintptr_t); + probe thread__sleep__begin(long long); + probe thread__sleep__end(int); + probe thread__yield(); + probe thread__park__begin(uintptr_t, int, long long); + probe thread__park__end(uintptr_t); + probe thread__unpark(uintptr_t); + probe method__compile__begin( + char*, uintptr_t, char*, uintptr_t, char*, uintptr_t, char*, uintptr_t); + probe method__compile__end( + char*, uintptr_t, char*, uintptr_t, char*, uintptr_t, + char*, uintptr_t, uintptr_t); + probe compiled__method__load( + char*, uintptr_t, char*, uintptr_t, char*, uintptr_t, void*, uintptr_t); + probe compiled__method__unload( + char*, uintptr_t, char*, uintptr_t, char*, uintptr_t); + probe monitor__contended__enter(uintptr_t, uintptr_t, char*, uintptr_t); + probe monitor__contended__entered(uintptr_t, uintptr_t, char*, uintptr_t); + probe monitor__contended__exit(uintptr_t, uintptr_t, char*, uintptr_t); + probe monitor__wait(uintptr_t, uintptr_t, char*, uintptr_t, uintptr_t); + probe monitor__waited(uintptr_t, uintptr_t, char*, uintptr_t); + probe monitor__notify(uintptr_t, uintptr_t, char*, uintptr_t); + probe monitor__notifyAll(uintptr_t, uintptr_t, char*, uintptr_t); + + probe object__alloc(int, char*, uintptr_t, uintptr_t); + probe method__entry( + int, char*, int, char*, int, char*, int); + probe method__return( + int, char*, int, char*, int, char*, int); +}; + +#pragma D attributes Evolving/Evolving/Common provider hotspot provider +#pragma D attributes Private/Private/Unknown provider hotspot module +#pragma D attributes Private/Private/Unknown provider hotspot function +#pragma D attributes Evolving/Evolving/Common provider hotspot name +#pragma D attributes Evolving/Evolving/Common provider hotspot args diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/os/posix/dtrace/hotspot_jni.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hotspot/src/os/posix/dtrace/hotspot_jni.d Mon Feb 24 12:56:19 2014 -0800 @@ -0,0 +1,506 @@ +/* + * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +provider hotspot_jni { + probe AllocObject__entry(void*, void*); + probe AllocObject__return(void*); + probe AttachCurrentThreadAsDaemon__entry(void*, void**, void*); + probe AttachCurrentThreadAsDaemon__return(uint32_t); + probe AttachCurrentThread__entry(void*, void**, void*); + probe AttachCurrentThread__return(uint32_t); + probe CallBooleanMethodA__entry(void*, void*, uintptr_t); + probe CallBooleanMethodA__return(uintptr_t); + probe CallBooleanMethod__entry(void*, void*, uintptr_t); + probe CallBooleanMethod__return(uintptr_t); + probe CallBooleanMethodV__entry(void*, void*, uintptr_t); + probe CallBooleanMethodV__return(uintptr_t); + probe CallByteMethodA__entry(void*, void*, uintptr_t); + probe CallByteMethodA__return(char); + probe CallByteMethod__entry(void*, void*, uintptr_t); + probe CallByteMethod__return(char); + probe CallByteMethodV__entry(void*, void*, uintptr_t); + probe CallByteMethodV__return(char); + probe CallCharMethodA__entry(void*, void*, uintptr_t); + probe CallCharMethodA__return(uint16_t); + probe CallCharMethod__entry(void*, void*, uintptr_t); + probe CallCharMethod__return(uint16_t); + probe CallCharMethodV__entry(void*, void*, uintptr_t); + probe CallCharMethodV__return(uint16_t); + probe CallDoubleMethodA__entry(void*, void*, uintptr_t); + probe CallDoubleMethodA__return(); + probe CallDoubleMethod__entry(void*, void*, uintptr_t); + probe CallDoubleMethod__return(); + probe CallDoubleMethodV__entry(void*, void*, uintptr_t); + probe CallDoubleMethodV__return(); + probe CallFloatMethodA__entry(void*, void*, uintptr_t); + probe CallFloatMethodA__return(); + probe CallFloatMethod__entry(void*, void*, uintptr_t); + probe CallFloatMethod__return(); + probe CallFloatMethodV__entry(void*, void*, uintptr_t); + probe CallFloatMethodV__return(); + probe CallIntMethodA__entry(void*, void*, uintptr_t); + probe CallIntMethodA__return(uint32_t); + probe CallIntMethod__entry(void*, void*, uintptr_t); + probe CallIntMethod__return(uint32_t); + probe CallIntMethodV__entry(void*, void*, uintptr_t); + probe CallIntMethodV__return(uint32_t); + probe CallLongMethodA__entry(void*, void*, uintptr_t); + probe CallLongMethodA__return(uintptr_t); + probe CallLongMethod__entry(void*, void*, uintptr_t); + probe CallLongMethod__return(uintptr_t); + probe CallLongMethodV__entry(void*, void*, uintptr_t); + probe CallLongMethodV__return(uintptr_t); + probe CallNonvirtualBooleanMethodA__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualBooleanMethodA__return(uintptr_t); + probe CallNonvirtualBooleanMethod__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualBooleanMethod__return(uintptr_t); + probe CallNonvirtualBooleanMethodV__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualBooleanMethodV__return(uintptr_t); + probe CallNonvirtualByteMethodA__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualByteMethodA__return(char); + probe CallNonvirtualByteMethod__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualByteMethod__return(char); + probe CallNonvirtualByteMethodV__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualByteMethodV__return(char); + probe CallNonvirtualCharMethodA__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualCharMethodA__return(uint16_t); + probe CallNonvirtualCharMethod__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualCharMethod__return(uint16_t); + probe CallNonvirtualCharMethodV__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualCharMethodV__return(uint16_t); + probe CallNonvirtualDoubleMethodA__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualDoubleMethodA__return(); + probe CallNonvirtualDoubleMethod__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualDoubleMethod__return(); + probe CallNonvirtualDoubleMethodV__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualDoubleMethodV__return(); + probe CallNonvirtualFloatMethodA__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualFloatMethodA__return(); + probe CallNonvirtualFloatMethod__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualFloatMethod__return(); + probe CallNonvirtualFloatMethodV__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualFloatMethodV__return(); + probe CallNonvirtualIntMethodA__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualIntMethodA__return(uint32_t); + probe CallNonvirtualIntMethod__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualIntMethod__return(uint32_t); + probe CallNonvirtualIntMethodV__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualIntMethodV__return(uint32_t); + probe CallNonvirtualLongMethodA__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualLongMethodA__return(uintptr_t); + probe CallNonvirtualLongMethod__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualLongMethod__return(uintptr_t); + probe CallNonvirtualLongMethodV__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualLongMethodV__return(uintptr_t); + probe CallNonvirtualObjectMethodA__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualObjectMethodA__return(void*); + probe CallNonvirtualObjectMethod__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualObjectMethod__return(void*); + probe CallNonvirtualObjectMethodV__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualObjectMethodV__return(void*); + probe CallNonvirtualShortMethodA__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualShortMethodA__return(uint16_t); + probe CallNonvirtualShortMethod__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualShortMethod__return(uint16_t); + probe CallNonvirtualShortMethodV__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualShortMethodV__return(uint16_t); + probe CallNonvirtualVoidMethodA__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualVoidMethodA__return(); + probe CallNonvirtualVoidMethod__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualVoidMethod__return(); + probe CallNonvirtualVoidMethodV__entry(void*, void*, void*, uintptr_t); + probe CallNonvirtualVoidMethodV__return(); + probe CallObjectMethodA__entry(void*, void*, uintptr_t); + probe CallObjectMethodA__return(void*); + probe CallObjectMethod__entry(void*, void*, uintptr_t); + probe CallObjectMethod__return(void*); + probe CallObjectMethodV__entry(void*, void*, uintptr_t); + probe CallObjectMethodV__return(void*); + probe CallShortMethodA__entry(void*, void*, uintptr_t); + probe CallShortMethodA__return(uint16_t); + probe CallShortMethod__entry(void*, void*, uintptr_t); + probe CallShortMethod__return(uint16_t); + probe CallShortMethodV__entry(void*, void*, uintptr_t); + probe CallShortMethodV__return(uint16_t); + probe CallStaticBooleanMethodA__entry(void*, void*, uintptr_t); + probe CallStaticBooleanMethodA__return(uintptr_t); + probe CallStaticBooleanMethod__entry(void*, void*, uintptr_t); + probe CallStaticBooleanMethod__return(uintptr_t); + probe CallStaticBooleanMethodV__entry(void*, void*, uintptr_t); + probe CallStaticBooleanMethodV__return(uintptr_t); + probe CallStaticByteMethodA__entry(void*, void*, uintptr_t); + probe CallStaticByteMethodA__return(char); + probe CallStaticByteMethod__entry(void*, void*, uintptr_t); + probe CallStaticByteMethod__return(char); + probe CallStaticByteMethodV__entry(void*, void*, uintptr_t); + probe CallStaticByteMethodV__return(char); + probe CallStaticCharMethodA__entry(void*, void*, uintptr_t); + probe CallStaticCharMethodA__return(uint16_t); + probe CallStaticCharMethod__entry(void*, void*, uintptr_t); + probe CallStaticCharMethod__return(uint16_t); + probe CallStaticCharMethodV__entry(void*, void*, uintptr_t); + probe CallStaticCharMethodV__return(uint16_t); + probe CallStaticDoubleMethodA__entry(void*, void*, uintptr_t); + probe CallStaticDoubleMethodA__return(); + probe CallStaticDoubleMethod__entry(void*, void*, uintptr_t); + probe CallStaticDoubleMethod__return(); + probe CallStaticDoubleMethodV__entry(void*, void*, uintptr_t); + probe CallStaticDoubleMethodV__return(); + probe CallStaticFloatMethodA__entry(void*, void*, uintptr_t); + probe CallStaticFloatMethodA__return(); + probe CallStaticFloatMethod__entry(void*, void*, uintptr_t); + probe CallStaticFloatMethod__return(); + probe CallStaticFloatMethodV__entry(void*, void*, uintptr_t); + probe CallStaticFloatMethodV__return(); + probe CallStaticIntMethodA__entry(void*, void*, uintptr_t); + probe CallStaticIntMethodA__return(uint32_t); + probe CallStaticIntMethod__entry(void*, void*, uintptr_t); + probe CallStaticIntMethod__return(uint32_t); + probe CallStaticIntMethodV__entry(void*, void*, uintptr_t); + probe CallStaticIntMethodV__return(uint32_t); + probe CallStaticLongMethodA__entry(void*, void*, uintptr_t); + probe CallStaticLongMethodA__return(uintptr_t); + probe CallStaticLongMethod__entry(void*, void*, uintptr_t); + probe CallStaticLongMethod__return(uintptr_t); + probe CallStaticLongMethodV__entry(void*, void*, uintptr_t); + probe CallStaticLongMethodV__return(uintptr_t); + probe CallStaticObjectMethodA__entry(void*, void*, uintptr_t); + probe CallStaticObjectMethodA__return(void*); + probe CallStaticObjectMethod__entry(void*, void*, uintptr_t); + probe CallStaticObjectMethod__return(void*); + probe CallStaticObjectMethodV__entry(void*, void*, uintptr_t); + probe CallStaticObjectMethodV__return(void*); + probe CallStaticShortMethodA__entry(void*, void*, uintptr_t); + probe CallStaticShortMethodA__return(uint16_t); + probe CallStaticShortMethod__entry(void*, void*, uintptr_t); + probe CallStaticShortMethod__return(uint16_t); + probe CallStaticShortMethodV__entry(void*, void*, uintptr_t); + probe CallStaticShortMethodV__return(uint16_t); + probe CallStaticVoidMethodA__entry(void*, void*, uintptr_t); + probe CallStaticVoidMethodA__return(); + probe CallStaticVoidMethod__entry(void*, void*, uintptr_t); + probe CallStaticVoidMethod__return(); + probe CallStaticVoidMethodV__entry(void*, void*, uintptr_t); + probe CallStaticVoidMethodV__return(); + probe CallVoidMethodA__entry(void*, void*, uintptr_t); + probe CallVoidMethodA__return(); + probe CallVoidMethod__entry(void*, void*, uintptr_t); + probe CallVoidMethod__return(); + probe CallVoidMethodV__entry(void*, void*, uintptr_t); + probe CallVoidMethodV__return(); + probe CreateJavaVM__entry(void**, void**, void*); + probe CreateJavaVM__return(uint32_t); + probe DefineClass__entry(void*, const char*, void*, char*, uintptr_t); + probe DefineClass__return(void*); + probe DeleteGlobalRef__entry(void*, void*); + probe DeleteGlobalRef__return(); + probe DeleteLocalRef__entry(void*, void*); + probe DeleteLocalRef__return(); + probe DeleteWeakGlobalRef__entry(void*, void*); + probe DeleteWeakGlobalRef__return(); + probe DestroyJavaVM__entry(void*); + probe DestroyJavaVM__return(uint32_t); + probe DetachCurrentThread__entry(void*); + probe DetachCurrentThread__return(uint32_t); + probe EnsureLocalCapacity__entry(void*, uint32_t); + probe EnsureLocalCapacity__return(uint32_t); + probe ExceptionCheck__entry(void*); + probe ExceptionCheck__return(uintptr_t); + probe ExceptionClear__entry(void*); + probe ExceptionClear__return(); + probe ExceptionDescribe__entry(void*); + probe ExceptionDescribe__return(); + probe ExceptionOccurred__entry(void*); + probe ExceptionOccurred__return(void*); + probe FatalError__entry(void* env, const char*); + probe FindClass__entry(void*, const char*); + probe FindClass__return(void*); + probe FromReflectedField__entry(void*, void*); + probe FromReflectedField__return(uintptr_t); + probe FromReflectedMethod__entry(void*, void*); + probe FromReflectedMethod__return(uintptr_t); + probe GetArrayLength__entry(void*, void*); + probe GetArrayLength__return(uintptr_t); + probe GetBooleanArrayElements__entry(void*, void*, uintptr_t*); + probe GetBooleanArrayElements__return(uintptr_t*); + probe GetBooleanArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uintptr_t*); + probe GetBooleanArrayRegion__return(); + probe GetBooleanField__entry(void*, void*, uintptr_t); + probe GetBooleanField__return(uintptr_t); + probe GetByteArrayElements__entry(void*, void*, uintptr_t*); + probe GetByteArrayElements__return(char*); + probe GetByteArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, char*); + probe GetByteArrayRegion__return(); + probe GetByteField__entry(void*, void*, uintptr_t); + probe GetByteField__return(char); + probe GetCharArrayElements__entry(void*, void*, uintptr_t*); + probe GetCharArrayElements__return(uint16_t*); + probe GetCharArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uint16_t*); + probe GetCharArrayRegion__return(); + probe GetCharField__entry(void*, void*, uintptr_t); + probe GetCharField__return(uint16_t); + probe GetCreatedJavaVMs__entry(void**, uintptr_t, uintptr_t*); + probe GetCreatedJavaVMs__return(uintptr_t); + probe GetDefaultJavaVMInitArgs__entry(void*); + probe GetDefaultJavaVMInitArgs__return(uint32_t); + probe GetDirectBufferAddress__entry(void*, void*); + probe GetDirectBufferAddress__return(void*); + probe GetDirectBufferCapacity__entry(void*, void*); + probe GetDirectBufferCapacity__return(uintptr_t); + probe GetDoubleArrayElements__entry(void*, void*, uintptr_t*); + probe GetDoubleArrayElements__return(double*); + probe GetDoubleArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, double*); + probe GetDoubleArrayRegion__return(); + probe GetDoubleField__entry(void*, void*, uintptr_t); + probe GetDoubleField__return(); + probe GetEnv__entry(void*, void*, uint32_t); + probe GetEnv__return(uint32_t); + probe GetFieldID__entry(void*, void*, const char*, const char*); + probe GetFieldID__return(uintptr_t); + probe GetFloatArrayElements__entry(void*, void*, uintptr_t*); + probe GetFloatArrayElements__return(float*); + probe GetFloatArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, float*); + probe GetFloatArrayRegion__return(); + probe GetFloatField__entry(void*, void*, uintptr_t); + probe GetFloatField__return(); + probe GetIntArrayElements__entry(void*, void*, uintptr_t*); + probe GetIntArrayElements__return(uint32_t*); + probe GetIntArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uint32_t*); + probe GetIntArrayRegion__return(); + probe GetIntField__entry(void*, void*, uintptr_t); + probe GetIntField__return(uint32_t); + probe GetJavaVM__entry(void*, void**); + probe GetJavaVM__return(uint32_t); + probe GetLongArrayElements__entry(void*, void*, uintptr_t*); + probe GetLongArrayElements__return(uintptr_t*); + probe GetLongArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uintptr_t*); + probe GetLongArrayRegion__return(); + probe GetLongField__entry(void*, void*, uintptr_t); + probe GetLongField__return(uintptr_t); + probe GetMethodID__entry(void*, void*, const char*, const char*); + probe GetMethodID__return(uintptr_t); + probe GetObjectArrayElement__entry(void*, void*, uintptr_t); + probe GetObjectArrayElement__return(void*); + probe GetObjectClass__entry(void*, void*); + probe GetObjectClass__return(void*); + probe GetObjectField__entry(void*, void*, uintptr_t); + probe GetObjectField__return(void*); + probe GetObjectRefType__entry(void*, void*); + probe GetObjectRefType__return(void*); + probe GetPrimitiveArrayCritical__entry(void*, void*, uintptr_t*); + probe GetPrimitiveArrayCritical__return(void*); + probe GetShortArrayElements__entry(void*, void*, uintptr_t*); + probe GetShortArrayElements__return(uint16_t*); + probe GetShortArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uint16_t*); + probe GetShortArrayRegion__return(); + probe GetShortField__entry(void*, void*, uintptr_t); + probe GetShortField__return(uint16_t); + probe GetStaticBooleanField__entry(void*, void*, uintptr_t); + probe GetStaticBooleanField__return(uintptr_t); + probe GetStaticByteField__entry(void*, void*, uintptr_t); + probe GetStaticByteField__return(char); + probe GetStaticCharField__entry(void*, void*, uintptr_t); + probe GetStaticCharField__return(uint16_t); + probe GetStaticDoubleField__entry(void*, void*, uintptr_t); + probe GetStaticDoubleField__return(); + probe GetStaticFieldID__entry(void*, void*, const char*, const char*); + probe GetStaticFieldID__return(uintptr_t); + probe GetStaticFloatField__entry(void*, void*, uintptr_t); + probe GetStaticFloatField__return(); + probe GetStaticIntField__entry(void*, void*, uintptr_t); + probe GetStaticIntField__return(uint32_t); + probe GetStaticLongField__entry(void*, void*, uintptr_t); + probe GetStaticLongField__return(uintptr_t); + probe GetStaticMethodID__entry(void*, void*, const char*, const char*); + probe GetStaticMethodID__return(uintptr_t); + probe GetStaticObjectField__entry(void*, void*, uintptr_t); + probe GetStaticObjectField__return(void*); + probe GetStaticShortField__entry(void*, void*, uintptr_t); + probe GetStaticShortField__return(uint16_t); + probe GetStringChars__entry(void*, void*, uintptr_t*); + probe GetStringChars__return(const uint16_t*); + probe GetStringCritical__entry(void*, void*, uintptr_t*); + probe GetStringCritical__return(const uint16_t*); + probe GetStringLength__entry(void*, void*); + probe GetStringLength__return(uintptr_t); + probe GetStringRegion__entry(void*, void*, uintptr_t, uintptr_t, uint16_t*); + probe GetStringRegion__return(); + probe GetStringUTFChars__entry(void*, void*, uintptr_t*); + probe GetStringUTFChars__return(const char*); + probe GetStringUTFLength__entry(void*, void*); + probe GetStringUTFLength__return(uintptr_t); + probe GetStringUTFRegion__entry(void*, void*, uintptr_t, uintptr_t, char*); + probe GetStringUTFRegion__return(); + probe GetSuperclass__entry(void*, void*); + probe GetSuperclass__return(void*); + probe GetVersion__entry(void*); + probe GetVersion__return(uint32_t); + probe IsAssignableFrom__entry(void*, void*, void*); + probe IsAssignableFrom__return(uintptr_t); + probe IsInstanceOf__entry(void*, void*, void*); + probe IsInstanceOf__return(uintptr_t); + probe IsSameObject__entry(void*, void*, void*); + probe IsSameObject__return(uintptr_t); + probe MonitorEnter__entry(void*, void*); + probe MonitorEnter__return(uint32_t); + probe MonitorExit__entry(void*, void*); + probe MonitorExit__return(uint32_t); + probe NewBooleanArray__entry(void*, uintptr_t); + probe NewBooleanArray__return(void*); + probe NewByteArray__entry(void*, uintptr_t); + probe NewByteArray__return(void*); + probe NewCharArray__entry(void*, uintptr_t); + probe NewCharArray__return(void*); + probe NewDirectByteBuffer__entry(void*, void*, uintptr_t); + probe NewDirectByteBuffer__return(void*); + probe NewDoubleArray__entry(void*, uintptr_t); + probe NewDoubleArray__return(void*); + probe NewFloatArray__entry(void*, uintptr_t); + probe NewFloatArray__return(void*); + probe NewGlobalRef__entry(void*, void*); + probe NewGlobalRef__return(void*); + probe NewIntArray__entry(void*, uintptr_t); + probe NewIntArray__return(void*); + probe NewLocalRef__entry(void*, void*); + probe NewLocalRef__return(void*); + probe NewLongArray__entry(void*, uintptr_t); + probe NewLongArray__return(void*); + probe NewObjectA__entry(void*, void*, uintptr_t); + probe NewObjectA__return(void*); + probe NewObjectArray__entry(void*, uintptr_t, void*, void*); + probe NewObjectArray__return(void*); + probe NewObject__entry(void*, void*, uintptr_t); + probe NewObject__return(void*); + probe NewObjectV__entry(void*, void*, uintptr_t); + probe NewObjectV__return(void*); + probe NewShortArray__entry(void*, uintptr_t); + probe NewShortArray__return(void*); + probe NewString__entry(void*, const uint16_t*, uintptr_t); + probe NewString__return(void*); + probe NewStringUTF__entry(void*, const char*); + probe NewStringUTF__return(void*); + probe NewWeakGlobalRef__entry(void*, void*); + probe NewWeakGlobalRef__return(void*); + probe PopLocalFrame__entry(void*, void*); + probe PopLocalFrame__return(void*); + probe PushLocalFrame__entry(void*, uint32_t); + probe PushLocalFrame__return(uint32_t); + probe RegisterNatives__entry(void*, void*, const void*, uint32_t); + probe RegisterNatives__return(uint32_t); + probe ReleaseBooleanArrayElements__entry(void*, void*, uintptr_t*, uint32_t); + probe ReleaseBooleanArrayElements__return(); + probe ReleaseByteArrayElements__entry(void*, void*, char*, uint32_t); + probe ReleaseByteArrayElements__return(); + probe ReleaseCharArrayElements__entry(void*, void*, uint16_t*, uint32_t); + probe ReleaseCharArrayElements__return(); + probe ReleaseDoubleArrayElements__entry(void*, void*, double*, uint32_t); + probe ReleaseDoubleArrayElements__return(); + probe ReleaseFloatArrayElements__entry(void*, void*, float*, uint32_t); + probe ReleaseFloatArrayElements__return(); + probe ReleaseIntArrayElements__entry(void*, void*, uint32_t*, uint32_t); + probe ReleaseIntArrayElements__return(); + probe ReleaseLongArrayElements__entry(void*, void*, uintptr_t*, uint32_t); + probe ReleaseLongArrayElements__return(); + probe ReleasePrimitiveArrayCritical__entry(void*, void*, void*, uint32_t); + probe ReleasePrimitiveArrayCritical__return(); + probe ReleaseShortArrayElements__entry(void*, void*, uint16_t*, uint32_t); + probe ReleaseShortArrayElements__return(); + probe ReleaseStringChars__entry(void*, void*, const uint16_t*); + probe ReleaseStringChars__return(); + probe ReleaseStringCritical__entry(void*, void*, const uint16_t*); + probe ReleaseStringCritical__return(); + probe ReleaseStringUTFChars__entry(void*, void*, const char*); + probe ReleaseStringUTFChars__return(); + probe SetBooleanArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uintptr_t*); + probe SetBooleanArrayRegion__return(); + probe SetBooleanField__entry(void*, void*, uintptr_t, uintptr_t); + probe SetBooleanField__return(); + probe SetByteArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const char*); + probe SetByteArrayRegion__return(); + probe SetByteField__entry(void*, void*, uintptr_t, char); + probe SetByteField__return(); + probe SetCharArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uint16_t*); + probe SetCharArrayRegion__return(); + probe SetCharField__entry(void*, void*, uintptr_t, uint16_t); + probe SetCharField__return(); + probe SetDoubleArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const double*); + probe SetDoubleArrayRegion__return(); + probe SetDoubleField__entry(void*, void*, uintptr_t); + probe SetDoubleField__return(); + probe SetFloatArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const float*); + probe SetFloatArrayRegion__return(); + probe SetFloatField__entry(void*, void*, uintptr_t); + probe SetFloatField__return(); + probe SetIntArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uint32_t*); + probe SetIntArrayRegion__return(); + probe SetIntField__entry(void*, void*, uintptr_t, uint32_t); + probe SetIntField__return(); + probe SetLongArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uintptr_t*); + probe SetLongArrayRegion__return(); + probe SetLongField__entry(void*, void*, uintptr_t, uintptr_t); + probe SetLongField__return(); + probe SetObjectArrayElement__entry(void*, void*, uintptr_t, void*); + probe SetObjectArrayElement__return(); + probe SetObjectField__entry(void*, void*, uintptr_t, void*); + probe SetObjectField__return(); + probe SetShortArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uint16_t*); + probe SetShortArrayRegion__return(); + probe SetShortField__entry(void*, void*, uintptr_t, uint16_t); + probe SetShortField__return(); + probe SetStaticBooleanField__entry(void*, void*, uintptr_t, uintptr_t); + probe SetStaticBooleanField__return(); + probe SetStaticByteField__entry(void*, void*, uintptr_t, char); + probe SetStaticByteField__return(); + probe SetStaticCharField__entry(void*, void*, uintptr_t, uint16_t); + probe SetStaticCharField__return(); + probe SetStaticDoubleField__entry(void*, void*, uintptr_t); + probe SetStaticDoubleField__return(); + probe SetStaticFloatField__entry(void*, void*, uintptr_t); + probe SetStaticFloatField__return(); + probe SetStaticIntField__entry(void*, void*, uintptr_t, uint32_t); + probe SetStaticIntField__return(); + probe SetStaticLongField__entry(void*, void*, uintptr_t, uintptr_t); + probe SetStaticLongField__return(); + probe SetStaticObjectField__entry(void*, void*, uintptr_t, void*); + probe SetStaticObjectField__return(); + probe SetStaticShortField__entry(void*, void*, uintptr_t, uint16_t); + probe SetStaticShortField__return(); + probe Throw__entry(void*, void*); + probe Throw__return(intptr_t); + probe ThrowNew__entry(void*, void*, const char*); + probe ThrowNew__return(intptr_t); + probe ToReflectedField__entry(void*, void*, uintptr_t, uintptr_t); + probe ToReflectedField__return(void*); + probe ToReflectedMethod__entry(void*, void*, uintptr_t, uintptr_t); + probe ToReflectedMethod__return(void*); + probe UnregisterNatives__entry(void*, void*); + probe UnregisterNatives__return(uint32_t); +}; + +#pragma D attributes Standard/Standard/Common provider hotspot_jni provider +#pragma D attributes Private/Private/Unknown provider hotspot_jni module +#pragma D attributes Private/Private/Unknown provider hotspot_jni function +#pragma D attributes Standard/Standard/Common provider hotspot_jni name +#pragma D attributes Evolving/Evolving/Common provider hotspot_jni args + diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/os/posix/dtrace/hs_private.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hotspot/src/os/posix/dtrace/hs_private.d Mon Feb 24 12:56:19 2014 -0800 @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +provider hs_private { + probe safepoint__begin(); + probe safepoint__end(); + probe cms__initmark__begin(); + probe cms__initmark__end(); + probe cms__remark__begin(); + probe cms__remark__end(); +}; + +#pragma D attributes Private/Private/Common provider hs_private provider +#pragma D attributes Private/Private/Unknown provider hs_private module +#pragma D attributes Private/Private/Unknown provider hs_private function +#pragma D attributes Private/Private/Common provider hs_private name +#pragma D attributes Private/Private/Common provider hs_private args + diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/os/solaris/dtrace/hotspot.d --- a/hotspot/src/os/solaris/dtrace/hotspot.d Fri Feb 21 11:39:47 2014 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -provider hotspot { - probe class__loaded(char*, uintptr_t, void*, uintptr_t); - probe class__unloaded(char*, uintptr_t, void*, uintptr_t); - probe class__initialization__required(char*, uintptr_t, void*, intptr_t); - probe class__initialization__recursive(char*, uintptr_t, void*, intptr_t,int); - probe class__initialization__concurrent(char*, uintptr_t, void*, intptr_t,int); - probe class__initialization__erroneous(char*, uintptr_t, void*, intptr_t, int); - probe class__initialization__super__failed(char*, uintptr_t, void*, intptr_t,int); - probe class__initialization__clinit(char*, uintptr_t, void*, intptr_t,int); - probe class__initialization__error(char*, uintptr_t, void*, intptr_t,int); - probe class__initialization__end(char*, uintptr_t, void*, intptr_t,int); - probe vm__init__begin(); - probe vm__init__end(); - probe vm__shutdown(); - probe vmops__request(char*, uintptr_t, int); - probe vmops__begin(char*, uintptr_t, int); - probe vmops__end(char*, uintptr_t, int); - probe gc__begin(uintptr_t); - probe gc__end(); - probe mem__pool__gc__begin( - char*, uintptr_t, char*, uintptr_t, - uintptr_t, uintptr_t, uintptr_t, uintptr_t); - probe mem__pool__gc__end( - char*, uintptr_t, char*, uintptr_t, - uintptr_t, uintptr_t, uintptr_t, uintptr_t); - probe thread__start(char*, uintptr_t, uintptr_t, uintptr_t, uintptr_t); - probe thread__stop(char*, uintptr_t, uintptr_t, uintptr_t, uintptr_t); - probe thread__sleep__begin(long long); - probe thread__sleep__end(int); - probe thread__yield(); - probe thread__park__begin(uintptr_t, int, long long); - probe thread__park__end(uintptr_t); - probe thread__unpark(uintptr_t); - probe method__compile__begin( - char*, uintptr_t, char*, uintptr_t, char*, uintptr_t, char*, uintptr_t); - probe method__compile__end( - char*, uintptr_t, char*, uintptr_t, char*, uintptr_t, - char*, uintptr_t, uintptr_t); - probe compiled__method__load( - char*, uintptr_t, char*, uintptr_t, char*, uintptr_t, void*, uintptr_t); - probe compiled__method__unload( - char*, uintptr_t, char*, uintptr_t, char*, uintptr_t); - probe monitor__contended__enter(uintptr_t, uintptr_t, char*, uintptr_t); - probe monitor__contended__entered(uintptr_t, uintptr_t, char*, uintptr_t); - probe monitor__contended__exit(uintptr_t, uintptr_t, char*, uintptr_t); - probe monitor__wait(uintptr_t, uintptr_t, char*, uintptr_t, uintptr_t); - probe monitor__waited(uintptr_t, uintptr_t, char*, uintptr_t); - probe monitor__notify(uintptr_t, uintptr_t, char*, uintptr_t); - probe monitor__notifyAll(uintptr_t, uintptr_t, char*, uintptr_t); - - probe object__alloc(int, char*, uintptr_t, uintptr_t); - probe method__entry( - int, char*, int, char*, int, char*, int); - probe method__return( - int, char*, int, char*, int, char*, int); -}; - -#pragma D attributes Evolving/Evolving/Common provider hotspot provider -#pragma D attributes Private/Private/Unknown provider hotspot module -#pragma D attributes Private/Private/Unknown provider hotspot function -#pragma D attributes Evolving/Evolving/Common provider hotspot name -#pragma D attributes Evolving/Evolving/Common provider hotspot args diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/os/solaris/dtrace/hotspot_jni.d --- a/hotspot/src/os/solaris/dtrace/hotspot_jni.d Fri Feb 21 11:39:47 2014 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,506 +0,0 @@ -/* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -provider hotspot_jni { - probe AllocObject__entry(void*, void*); - probe AllocObject__return(void*); - probe AttachCurrentThreadAsDaemon__entry(void*, void**, void*); - probe AttachCurrentThreadAsDaemon__return(uint32_t); - probe AttachCurrentThread__entry(void*, void**, void*); - probe AttachCurrentThread__return(uint32_t); - probe CallBooleanMethodA__entry(void*, void*, uintptr_t); - probe CallBooleanMethodA__return(uintptr_t); - probe CallBooleanMethod__entry(void*, void*, uintptr_t); - probe CallBooleanMethod__return(uintptr_t); - probe CallBooleanMethodV__entry(void*, void*, uintptr_t); - probe CallBooleanMethodV__return(uintptr_t); - probe CallByteMethodA__entry(void*, void*, uintptr_t); - probe CallByteMethodA__return(char); - probe CallByteMethod__entry(void*, void*, uintptr_t); - probe CallByteMethod__return(char); - probe CallByteMethodV__entry(void*, void*, uintptr_t); - probe CallByteMethodV__return(char); - probe CallCharMethodA__entry(void*, void*, uintptr_t); - probe CallCharMethodA__return(uint16_t); - probe CallCharMethod__entry(void*, void*, uintptr_t); - probe CallCharMethod__return(uint16_t); - probe CallCharMethodV__entry(void*, void*, uintptr_t); - probe CallCharMethodV__return(uint16_t); - probe CallDoubleMethodA__entry(void*, void*, uintptr_t); - probe CallDoubleMethodA__return(); - probe CallDoubleMethod__entry(void*, void*, uintptr_t); - probe CallDoubleMethod__return(); - probe CallDoubleMethodV__entry(void*, void*, uintptr_t); - probe CallDoubleMethodV__return(); - probe CallFloatMethodA__entry(void*, void*, uintptr_t); - probe CallFloatMethodA__return(); - probe CallFloatMethod__entry(void*, void*, uintptr_t); - probe CallFloatMethod__return(); - probe CallFloatMethodV__entry(void*, void*, uintptr_t); - probe CallFloatMethodV__return(); - probe CallIntMethodA__entry(void*, void*, uintptr_t); - probe CallIntMethodA__return(uint32_t); - probe CallIntMethod__entry(void*, void*, uintptr_t); - probe CallIntMethod__return(uint32_t); - probe CallIntMethodV__entry(void*, void*, uintptr_t); - probe CallIntMethodV__return(uint32_t); - probe CallLongMethodA__entry(void*, void*, uintptr_t); - probe CallLongMethodA__return(uintptr_t); - probe CallLongMethod__entry(void*, void*, uintptr_t); - probe CallLongMethod__return(uintptr_t); - probe CallLongMethodV__entry(void*, void*, uintptr_t); - probe CallLongMethodV__return(uintptr_t); - probe CallNonvirtualBooleanMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualBooleanMethodA__return(uintptr_t); - probe CallNonvirtualBooleanMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualBooleanMethod__return(uintptr_t); - probe CallNonvirtualBooleanMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualBooleanMethodV__return(uintptr_t); - probe CallNonvirtualByteMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualByteMethodA__return(char); - probe CallNonvirtualByteMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualByteMethod__return(char); - probe CallNonvirtualByteMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualByteMethodV__return(char); - probe CallNonvirtualCharMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualCharMethodA__return(uint16_t); - probe CallNonvirtualCharMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualCharMethod__return(uint16_t); - probe CallNonvirtualCharMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualCharMethodV__return(uint16_t); - probe CallNonvirtualDoubleMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualDoubleMethodA__return(); - probe CallNonvirtualDoubleMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualDoubleMethod__return(); - probe CallNonvirtualDoubleMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualDoubleMethodV__return(); - probe CallNonvirtualFloatMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualFloatMethodA__return(); - probe CallNonvirtualFloatMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualFloatMethod__return(); - probe CallNonvirtualFloatMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualFloatMethodV__return(); - probe CallNonvirtualIntMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualIntMethodA__return(uint32_t); - probe CallNonvirtualIntMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualIntMethod__return(uint32_t); - probe CallNonvirtualIntMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualIntMethodV__return(uint32_t); - probe CallNonvirtualLongMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualLongMethodA__return(uintptr_t); - probe CallNonvirtualLongMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualLongMethod__return(uintptr_t); - probe CallNonvirtualLongMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualLongMethodV__return(uintptr_t); - probe CallNonvirtualObjectMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualObjectMethodA__return(void*); - probe CallNonvirtualObjectMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualObjectMethod__return(void*); - probe CallNonvirtualObjectMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualObjectMethodV__return(void*); - probe CallNonvirtualShortMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualShortMethodA__return(uint16_t); - probe CallNonvirtualShortMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualShortMethod__return(uint16_t); - probe CallNonvirtualShortMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualShortMethodV__return(uint16_t); - probe CallNonvirtualVoidMethodA__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualVoidMethodA__return(); - probe CallNonvirtualVoidMethod__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualVoidMethod__return(); - probe CallNonvirtualVoidMethodV__entry(void*, void*, void*, uintptr_t); - probe CallNonvirtualVoidMethodV__return(); - probe CallObjectMethodA__entry(void*, void*, uintptr_t); - probe CallObjectMethodA__return(void*); - probe CallObjectMethod__entry(void*, void*, uintptr_t); - probe CallObjectMethod__return(void*); - probe CallObjectMethodV__entry(void*, void*, uintptr_t); - probe CallObjectMethodV__return(void*); - probe CallShortMethodA__entry(void*, void*, uintptr_t); - probe CallShortMethodA__return(uint16_t); - probe CallShortMethod__entry(void*, void*, uintptr_t); - probe CallShortMethod__return(uint16_t); - probe CallShortMethodV__entry(void*, void*, uintptr_t); - probe CallShortMethodV__return(uint16_t); - probe CallStaticBooleanMethodA__entry(void*, void*, uintptr_t); - probe CallStaticBooleanMethodA__return(uintptr_t); - probe CallStaticBooleanMethod__entry(void*, void*, uintptr_t); - probe CallStaticBooleanMethod__return(uintptr_t); - probe CallStaticBooleanMethodV__entry(void*, void*, uintptr_t); - probe CallStaticBooleanMethodV__return(uintptr_t); - probe CallStaticByteMethodA__entry(void*, void*, uintptr_t); - probe CallStaticByteMethodA__return(char); - probe CallStaticByteMethod__entry(void*, void*, uintptr_t); - probe CallStaticByteMethod__return(char); - probe CallStaticByteMethodV__entry(void*, void*, uintptr_t); - probe CallStaticByteMethodV__return(char); - probe CallStaticCharMethodA__entry(void*, void*, uintptr_t); - probe CallStaticCharMethodA__return(uint16_t); - probe CallStaticCharMethod__entry(void*, void*, uintptr_t); - probe CallStaticCharMethod__return(uint16_t); - probe CallStaticCharMethodV__entry(void*, void*, uintptr_t); - probe CallStaticCharMethodV__return(uint16_t); - probe CallStaticDoubleMethodA__entry(void*, void*, uintptr_t); - probe CallStaticDoubleMethodA__return(); - probe CallStaticDoubleMethod__entry(void*, void*, uintptr_t); - probe CallStaticDoubleMethod__return(); - probe CallStaticDoubleMethodV__entry(void*, void*, uintptr_t); - probe CallStaticDoubleMethodV__return(); - probe CallStaticFloatMethodA__entry(void*, void*, uintptr_t); - probe CallStaticFloatMethodA__return(); - probe CallStaticFloatMethod__entry(void*, void*, uintptr_t); - probe CallStaticFloatMethod__return(); - probe CallStaticFloatMethodV__entry(void*, void*, uintptr_t); - probe CallStaticFloatMethodV__return(); - probe CallStaticIntMethodA__entry(void*, void*, uintptr_t); - probe CallStaticIntMethodA__return(uint32_t); - probe CallStaticIntMethod__entry(void*, void*, uintptr_t); - probe CallStaticIntMethod__return(uint32_t); - probe CallStaticIntMethodV__entry(void*, void*, uintptr_t); - probe CallStaticIntMethodV__return(uint32_t); - probe CallStaticLongMethodA__entry(void*, void*, uintptr_t); - probe CallStaticLongMethodA__return(uintptr_t); - probe CallStaticLongMethod__entry(void*, void*, uintptr_t); - probe CallStaticLongMethod__return(uintptr_t); - probe CallStaticLongMethodV__entry(void*, void*, uintptr_t); - probe CallStaticLongMethodV__return(uintptr_t); - probe CallStaticObjectMethodA__entry(void*, void*, uintptr_t); - probe CallStaticObjectMethodA__return(void*); - probe CallStaticObjectMethod__entry(void*, void*, uintptr_t); - probe CallStaticObjectMethod__return(void*); - probe CallStaticObjectMethodV__entry(void*, void*, uintptr_t); - probe CallStaticObjectMethodV__return(void*); - probe CallStaticShortMethodA__entry(void*, void*, uintptr_t); - probe CallStaticShortMethodA__return(uint16_t); - probe CallStaticShortMethod__entry(void*, void*, uintptr_t); - probe CallStaticShortMethod__return(uint16_t); - probe CallStaticShortMethodV__entry(void*, void*, uintptr_t); - probe CallStaticShortMethodV__return(uint16_t); - probe CallStaticVoidMethodA__entry(void*, void*, uintptr_t); - probe CallStaticVoidMethodA__return(); - probe CallStaticVoidMethod__entry(void*, void*, uintptr_t); - probe CallStaticVoidMethod__return(); - probe CallStaticVoidMethodV__entry(void*, void*, uintptr_t); - probe CallStaticVoidMethodV__return(); - probe CallVoidMethodA__entry(void*, void*, uintptr_t); - probe CallVoidMethodA__return(); - probe CallVoidMethod__entry(void*, void*, uintptr_t); - probe CallVoidMethod__return(); - probe CallVoidMethodV__entry(void*, void*, uintptr_t); - probe CallVoidMethodV__return(); - probe CreateJavaVM__entry(void**, void**, void*); - probe CreateJavaVM__return(uint32_t); - probe DefineClass__entry(void*, const char*, void*, char*, uintptr_t); - probe DefineClass__return(void*); - probe DeleteGlobalRef__entry(void*, void*); - probe DeleteGlobalRef__return(); - probe DeleteLocalRef__entry(void*, void*); - probe DeleteLocalRef__return(); - probe DeleteWeakGlobalRef__entry(void*, void*); - probe DeleteWeakGlobalRef__return(); - probe DestroyJavaVM__entry(void*); - probe DestroyJavaVM__return(uint32_t); - probe DetachCurrentThread__entry(void*); - probe DetachCurrentThread__return(uint32_t); - probe EnsureLocalCapacity__entry(void*, uint32_t); - probe EnsureLocalCapacity__return(uint32_t); - probe ExceptionCheck__entry(void*); - probe ExceptionCheck__return(uintptr_t); - probe ExceptionClear__entry(void*); - probe ExceptionClear__return(); - probe ExceptionDescribe__entry(void*); - probe ExceptionDescribe__return(); - probe ExceptionOccurred__entry(void*); - probe ExceptionOccurred__return(void*); - probe FatalError__entry(void* env, const char*); - probe FindClass__entry(void*, const char*); - probe FindClass__return(void*); - probe FromReflectedField__entry(void*, void*); - probe FromReflectedField__return(uintptr_t); - probe FromReflectedMethod__entry(void*, void*); - probe FromReflectedMethod__return(uintptr_t); - probe GetArrayLength__entry(void*, void*); - probe GetArrayLength__return(uintptr_t); - probe GetBooleanArrayElements__entry(void*, void*, uintptr_t*); - probe GetBooleanArrayElements__return(uintptr_t*); - probe GetBooleanArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uintptr_t*); - probe GetBooleanArrayRegion__return(); - probe GetBooleanField__entry(void*, void*, uintptr_t); - probe GetBooleanField__return(uintptr_t); - probe GetByteArrayElements__entry(void*, void*, uintptr_t*); - probe GetByteArrayElements__return(char*); - probe GetByteArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, char*); - probe GetByteArrayRegion__return(); - probe GetByteField__entry(void*, void*, uintptr_t); - probe GetByteField__return(char); - probe GetCharArrayElements__entry(void*, void*, uintptr_t*); - probe GetCharArrayElements__return(uint16_t*); - probe GetCharArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uint16_t*); - probe GetCharArrayRegion__return(); - probe GetCharField__entry(void*, void*, uintptr_t); - probe GetCharField__return(uint16_t); - probe GetCreatedJavaVMs__entry(void**, uintptr_t, uintptr_t*); - probe GetCreatedJavaVMs__return(uintptr_t); - probe GetDefaultJavaVMInitArgs__entry(void*); - probe GetDefaultJavaVMInitArgs__return(uint32_t); - probe GetDirectBufferAddress__entry(void*, void*); - probe GetDirectBufferAddress__return(void*); - probe GetDirectBufferCapacity__entry(void*, void*); - probe GetDirectBufferCapacity__return(uintptr_t); - probe GetDoubleArrayElements__entry(void*, void*, uintptr_t*); - probe GetDoubleArrayElements__return(double*); - probe GetDoubleArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, double*); - probe GetDoubleArrayRegion__return(); - probe GetDoubleField__entry(void*, void*, uintptr_t); - probe GetDoubleField__return(); - probe GetEnv__entry(void*, void*, uint32_t); - probe GetEnv__return(uint32_t); - probe GetFieldID__entry(void*, void*, const char*, const char*); - probe GetFieldID__return(uintptr_t); - probe GetFloatArrayElements__entry(void*, void*, uintptr_t*); - probe GetFloatArrayElements__return(float*); - probe GetFloatArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, float*); - probe GetFloatArrayRegion__return(); - probe GetFloatField__entry(void*, void*, uintptr_t); - probe GetFloatField__return(); - probe GetIntArrayElements__entry(void*, void*, uintptr_t*); - probe GetIntArrayElements__return(uint32_t*); - probe GetIntArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uint32_t*); - probe GetIntArrayRegion__return(); - probe GetIntField__entry(void*, void*, uintptr_t); - probe GetIntField__return(uint32_t); - probe GetJavaVM__entry(void*, void**); - probe GetJavaVM__return(uint32_t); - probe GetLongArrayElements__entry(void*, void*, uintptr_t*); - probe GetLongArrayElements__return(uintptr_t*); - probe GetLongArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uintptr_t*); - probe GetLongArrayRegion__return(); - probe GetLongField__entry(void*, void*, uintptr_t); - probe GetLongField__return(uintptr_t); - probe GetMethodID__entry(void*, void*, const char*, const char*); - probe GetMethodID__return(uintptr_t); - probe GetObjectArrayElement__entry(void*, void*, uintptr_t); - probe GetObjectArrayElement__return(void*); - probe GetObjectClass__entry(void*, void*); - probe GetObjectClass__return(void*); - probe GetObjectField__entry(void*, void*, uintptr_t); - probe GetObjectField__return(void*); - probe GetObjectRefType__entry(void*, void*); - probe GetObjectRefType__return(void*); - probe GetPrimitiveArrayCritical__entry(void*, void*, uintptr_t*); - probe GetPrimitiveArrayCritical__return(void*); - probe GetShortArrayElements__entry(void*, void*, uintptr_t*); - probe GetShortArrayElements__return(uint16_t*); - probe GetShortArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, uint16_t*); - probe GetShortArrayRegion__return(); - probe GetShortField__entry(void*, void*, uintptr_t); - probe GetShortField__return(uint16_t); - probe GetStaticBooleanField__entry(void*, void*, uintptr_t); - probe GetStaticBooleanField__return(uintptr_t); - probe GetStaticByteField__entry(void*, void*, uintptr_t); - probe GetStaticByteField__return(char); - probe GetStaticCharField__entry(void*, void*, uintptr_t); - probe GetStaticCharField__return(uint16_t); - probe GetStaticDoubleField__entry(void*, void*, uintptr_t); - probe GetStaticDoubleField__return(); - probe GetStaticFieldID__entry(void*, void*, const char*, const char*); - probe GetStaticFieldID__return(uintptr_t); - probe GetStaticFloatField__entry(void*, void*, uintptr_t); - probe GetStaticFloatField__return(); - probe GetStaticIntField__entry(void*, void*, uintptr_t); - probe GetStaticIntField__return(uint32_t); - probe GetStaticLongField__entry(void*, void*, uintptr_t); - probe GetStaticLongField__return(uintptr_t); - probe GetStaticMethodID__entry(void*, void*, const char*, const char*); - probe GetStaticMethodID__return(uintptr_t); - probe GetStaticObjectField__entry(void*, void*, uintptr_t); - probe GetStaticObjectField__return(void*); - probe GetStaticShortField__entry(void*, void*, uintptr_t); - probe GetStaticShortField__return(uint16_t); - probe GetStringChars__entry(void*, void*, uintptr_t*); - probe GetStringChars__return(const uint16_t*); - probe GetStringCritical__entry(void*, void*, uintptr_t*); - probe GetStringCritical__return(const uint16_t*); - probe GetStringLength__entry(void*, void*); - probe GetStringLength__return(uintptr_t); - probe GetStringRegion__entry(void*, void*, uintptr_t, uintptr_t, uint16_t*); - probe GetStringRegion__return(); - probe GetStringUTFChars__entry(void*, void*, uintptr_t*); - probe GetStringUTFChars__return(const char*); - probe GetStringUTFLength__entry(void*, void*); - probe GetStringUTFLength__return(uintptr_t); - probe GetStringUTFRegion__entry(void*, void*, uintptr_t, uintptr_t, char*); - probe GetStringUTFRegion__return(); - probe GetSuperclass__entry(void*, void*); - probe GetSuperclass__return(void*); - probe GetVersion__entry(void*); - probe GetVersion__return(uint32_t); - probe IsAssignableFrom__entry(void*, void*, void*); - probe IsAssignableFrom__return(uintptr_t); - probe IsInstanceOf__entry(void*, void*, void*); - probe IsInstanceOf__return(uintptr_t); - probe IsSameObject__entry(void*, void*, void*); - probe IsSameObject__return(uintptr_t); - probe MonitorEnter__entry(void*, void*); - probe MonitorEnter__return(uint32_t); - probe MonitorExit__entry(void*, void*); - probe MonitorExit__return(uint32_t); - probe NewBooleanArray__entry(void*, uintptr_t); - probe NewBooleanArray__return(void*); - probe NewByteArray__entry(void*, uintptr_t); - probe NewByteArray__return(void*); - probe NewCharArray__entry(void*, uintptr_t); - probe NewCharArray__return(void*); - probe NewDirectByteBuffer__entry(void*, void*, uintptr_t); - probe NewDirectByteBuffer__return(void*); - probe NewDoubleArray__entry(void*, uintptr_t); - probe NewDoubleArray__return(void*); - probe NewFloatArray__entry(void*, uintptr_t); - probe NewFloatArray__return(void*); - probe NewGlobalRef__entry(void*, void*); - probe NewGlobalRef__return(void*); - probe NewIntArray__entry(void*, uintptr_t); - probe NewIntArray__return(void*); - probe NewLocalRef__entry(void*, void*); - probe NewLocalRef__return(void*); - probe NewLongArray__entry(void*, uintptr_t); - probe NewLongArray__return(void*); - probe NewObjectA__entry(void*, void*, uintptr_t); - probe NewObjectA__return(void*); - probe NewObjectArray__entry(void*, uintptr_t, void*, void*); - probe NewObjectArray__return(void*); - probe NewObject__entry(void*, void*, uintptr_t); - probe NewObject__return(void*); - probe NewObjectV__entry(void*, void*, uintptr_t); - probe NewObjectV__return(void*); - probe NewShortArray__entry(void*, uintptr_t); - probe NewShortArray__return(void*); - probe NewString__entry(void*, const uint16_t*, uintptr_t); - probe NewString__return(void*); - probe NewStringUTF__entry(void*, const char*); - probe NewStringUTF__return(void*); - probe NewWeakGlobalRef__entry(void*, void*); - probe NewWeakGlobalRef__return(void*); - probe PopLocalFrame__entry(void*, void*); - probe PopLocalFrame__return(void*); - probe PushLocalFrame__entry(void*, uint32_t); - probe PushLocalFrame__return(uint32_t); - probe RegisterNatives__entry(void*, void*, const void*, uint32_t); - probe RegisterNatives__return(uint32_t); - probe ReleaseBooleanArrayElements__entry(void*, void*, uintptr_t*, uint32_t); - probe ReleaseBooleanArrayElements__return(); - probe ReleaseByteArrayElements__entry(void*, void*, char*, uint32_t); - probe ReleaseByteArrayElements__return(); - probe ReleaseCharArrayElements__entry(void*, void*, uint16_t*, uint32_t); - probe ReleaseCharArrayElements__return(); - probe ReleaseDoubleArrayElements__entry(void*, void*, double*, uint32_t); - probe ReleaseDoubleArrayElements__return(); - probe ReleaseFloatArrayElements__entry(void*, void*, float*, uint32_t); - probe ReleaseFloatArrayElements__return(); - probe ReleaseIntArrayElements__entry(void*, void*, uint32_t*, uint32_t); - probe ReleaseIntArrayElements__return(); - probe ReleaseLongArrayElements__entry(void*, void*, uintptr_t*, uint32_t); - probe ReleaseLongArrayElements__return(); - probe ReleasePrimitiveArrayCritical__entry(void*, void*, void*, uint32_t); - probe ReleasePrimitiveArrayCritical__return(); - probe ReleaseShortArrayElements__entry(void*, void*, uint16_t*, uint32_t); - probe ReleaseShortArrayElements__return(); - probe ReleaseStringChars__entry(void*, void*, const uint16_t*); - probe ReleaseStringChars__return(); - probe ReleaseStringCritical__entry(void*, void*, const uint16_t*); - probe ReleaseStringCritical__return(); - probe ReleaseStringUTFChars__entry(void*, void*, const char*); - probe ReleaseStringUTFChars__return(); - probe SetBooleanArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uintptr_t*); - probe SetBooleanArrayRegion__return(); - probe SetBooleanField__entry(void*, void*, uintptr_t, uintptr_t); - probe SetBooleanField__return(); - probe SetByteArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const char*); - probe SetByteArrayRegion__return(); - probe SetByteField__entry(void*, void*, uintptr_t, char); - probe SetByteField__return(); - probe SetCharArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uint16_t*); - probe SetCharArrayRegion__return(); - probe SetCharField__entry(void*, void*, uintptr_t, uint16_t); - probe SetCharField__return(); - probe SetDoubleArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const double*); - probe SetDoubleArrayRegion__return(); - probe SetDoubleField__entry(void*, void*, uintptr_t); - probe SetDoubleField__return(); - probe SetFloatArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const float*); - probe SetFloatArrayRegion__return(); - probe SetFloatField__entry(void*, void*, uintptr_t); - probe SetFloatField__return(); - probe SetIntArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uint32_t*); - probe SetIntArrayRegion__return(); - probe SetIntField__entry(void*, void*, uintptr_t, uint32_t); - probe SetIntField__return(); - probe SetLongArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uintptr_t*); - probe SetLongArrayRegion__return(); - probe SetLongField__entry(void*, void*, uintptr_t, uintptr_t); - probe SetLongField__return(); - probe SetObjectArrayElement__entry(void*, void*, uintptr_t, void*); - probe SetObjectArrayElement__return(); - probe SetObjectField__entry(void*, void*, uintptr_t, void*); - probe SetObjectField__return(); - probe SetShortArrayRegion__entry(void*, void*, uintptr_t, uintptr_t, const uint16_t*); - probe SetShortArrayRegion__return(); - probe SetShortField__entry(void*, void*, uintptr_t, uint16_t); - probe SetShortField__return(); - probe SetStaticBooleanField__entry(void*, void*, uintptr_t, uintptr_t); - probe SetStaticBooleanField__return(); - probe SetStaticByteField__entry(void*, void*, uintptr_t, char); - probe SetStaticByteField__return(); - probe SetStaticCharField__entry(void*, void*, uintptr_t, uint16_t); - probe SetStaticCharField__return(); - probe SetStaticDoubleField__entry(void*, void*, uintptr_t); - probe SetStaticDoubleField__return(); - probe SetStaticFloatField__entry(void*, void*, uintptr_t); - probe SetStaticFloatField__return(); - probe SetStaticIntField__entry(void*, void*, uintptr_t, uint32_t); - probe SetStaticIntField__return(); - probe SetStaticLongField__entry(void*, void*, uintptr_t, uintptr_t); - probe SetStaticLongField__return(); - probe SetStaticObjectField__entry(void*, void*, uintptr_t, void*); - probe SetStaticObjectField__return(); - probe SetStaticShortField__entry(void*, void*, uintptr_t, uint16_t); - probe SetStaticShortField__return(); - probe Throw__entry(void*, void*); - probe Throw__return(intptr_t); - probe ThrowNew__entry(void*, void*, const char*); - probe ThrowNew__return(intptr_t); - probe ToReflectedField__entry(void*, void*, uintptr_t, uintptr_t); - probe ToReflectedField__return(void*); - probe ToReflectedMethod__entry(void*, void*, uintptr_t, uintptr_t); - probe ToReflectedMethod__return(void*); - probe UnregisterNatives__entry(void*, void*); - probe UnregisterNatives__return(uint32_t); -}; - -#pragma D attributes Standard/Standard/Common provider hotspot_jni provider -#pragma D attributes Private/Private/Unknown provider hotspot_jni module -#pragma D attributes Private/Private/Unknown provider hotspot_jni function -#pragma D attributes Standard/Standard/Common provider hotspot_jni name -#pragma D attributes Evolving/Evolving/Common provider hotspot_jni args - diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/os/solaris/dtrace/hs_private.d --- a/hotspot/src/os/solaris/dtrace/hs_private.d Fri Feb 21 11:39:47 2014 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -provider hs_private { - probe safepoint__begin(); - probe safepoint__end(); - probe cms__initmark__begin(); - probe cms__initmark__end(); - probe cms__remark__begin(); - probe cms__remark__end(); -}; - -#pragma D attributes Private/Private/Common provider hs_private provider -#pragma D attributes Private/Private/Unknown provider hs_private module -#pragma D attributes Private/Private/Unknown provider hs_private function -#pragma D attributes Private/Private/Common provider hs_private name -#pragma D attributes Private/Private/Common provider hs_private args - diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/os/solaris/vm/os_solaris.cpp --- a/hotspot/src/os/solaris/vm/os_solaris.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/os/solaris/vm/os_solaris.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2232,8 +2232,8 @@ st->cr(); status = true; } - ::close(fd); } + ::close(fd); } return status; } @@ -2257,13 +2257,18 @@ "ILL_ILLTRP", "ILL_PRVOPC", "ILL_PRVREG", "ILL_COPROC", "ILL_BADSTK" }; +const size_t ill_names_length = (sizeof(ill_names)/sizeof(char *)); + const char *fpe_names[] = { "FPE0", "FPE_INTDIV", "FPE_INTOVF", "FPE_FLTDIV", "FPE_FLTOVF", "FPE_FLTUND", "FPE_FLTRES", "FPE_FLTINV", "FPE_FLTSUB" }; +const size_t fpe_names_length = (sizeof(fpe_names)/sizeof(char *)); const char *segv_names[] = { "SEGV0", "SEGV_MAPERR", "SEGV_ACCERR" }; +const size_t segv_names_length = (sizeof(segv_names)/sizeof(char *)); const char *bus_names[] = { "BUS0", "BUS_ADRALN", "BUS_ADRERR", "BUS_OBJERR" }; +const size_t bus_names_length = (sizeof(bus_names)/sizeof(char *)); void os::print_siginfo(outputStream* st, void* siginfo) { st->print("siginfo:"); @@ -2282,19 +2287,23 @@ assert(c > 0, "unexpected si_code"); switch (si->si_signo) { case SIGILL: - st->print(", si_code=%d (%s)", c, c > 8 ? "" : ill_names[c]); + st->print(", si_code=%d (%s)", c, + c >= ill_names_length ? "" : ill_names[c]); st->print(", si_addr=" PTR_FORMAT, si->si_addr); break; case SIGFPE: - st->print(", si_code=%d (%s)", c, c > 9 ? "" : fpe_names[c]); + st->print(", si_code=%d (%s)", c, + c >= fpe_names_length ? "" : fpe_names[c]); st->print(", si_addr=" PTR_FORMAT, si->si_addr); break; case SIGSEGV: - st->print(", si_code=%d (%s)", c, c > 2 ? "" : segv_names[c]); + st->print(", si_code=%d (%s)", c, + c >= segv_names_length ? "" : segv_names[c]); st->print(", si_addr=" PTR_FORMAT, si->si_addr); break; case SIGBUS: - st->print(", si_code=%d (%s)", c, c > 3 ? "" : bus_names[c]); + st->print(", si_code=%d (%s)", c, + c >= bus_names_length ? "" : bus_names[c]); st->print(", si_addr=" PTR_FORMAT, si->si_addr); break; default: @@ -2441,13 +2450,14 @@ return; } - if (Arguments::created_by_gamma_launcher()) { - // Support for the gamma launcher. Typical value for buf is - // "/jre/lib///libjvm.so". If "/jre/lib/" appears at - // the right place in the string, then assume we are installed in a JDK and - // we're done. Otherwise, check for a JAVA_HOME environment variable and fix - // up the path so it looks like libjvm.so is installed there (append a - // fake suffix hotspot/libjvm.so). + if (Arguments::sun_java_launcher_is_altjvm()) { + // Support for the java launcher's '-XXaltjvm=' option. Typical + // value for buf is "/jre/lib///libjvm.so". + // If "/jre/lib/" appears at the right place in the string, then + // assume we are installed in a JDK and we're done. Otherwise, check + // for a JAVA_HOME environment variable and fix up the path so it + // looks like libjvm.so is installed there (append a fake suffix + // hotspot/libjvm.so). const char *p = buf + strlen(buf) - 1; for (int count = 0; p > buf && count < 5; ++count) { for (--p; p > buf && *p != '/'; --p) @@ -3011,7 +3021,7 @@ char *os::scan_pages(char *start, char* end, page_info* page_expected, page_info* page_found) { const uint_t info_types[] = { MEMINFO_VLGRP, MEMINFO_VPAGESIZE }; const size_t types = sizeof(info_types) / sizeof(info_types[0]); - uint64_t addrs[MAX_MEMINFO_CNT], outdata[types * MAX_MEMINFO_CNT]; + uint64_t addrs[MAX_MEMINFO_CNT], outdata[types * MAX_MEMINFO_CNT + 1]; uint_t validity[MAX_MEMINFO_CNT]; size_t page_size = MAX2((size_t)os::vm_page_size(), page_expected->size); @@ -3050,7 +3060,7 @@ } } - if (i != addrs_count) { + if (i < addrs_count) { if ((validity[i] & 2) != 0) { page_found->lgrp_id = outdata[types * i]; } else { diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/os/solaris/vm/perfMemory_solaris.cpp --- a/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -431,10 +431,12 @@ RESTARTABLE(::read(fd, addr, remaining), result); if (result == OS_ERR) { + ::close(fd); THROW_MSG_0(vmSymbols::java_io_IOException(), "Read error"); + } else { + remaining-=result; + addr+=result; } - remaining-=result; - addr+=result; } ::close(fd); @@ -906,8 +908,16 @@ FREE_C_HEAP_ARRAY(char, filename, mtInternal); // open the shared memory file for the give vmid - fd = open_sharedmem_file(rfilename, file_flags, CHECK); - assert(fd != OS_ERR, "unexpected value"); + fd = open_sharedmem_file(rfilename, file_flags, THREAD); + + if (fd == OS_ERR) { + return; + } + + if (HAS_PENDING_EXCEPTION) { + ::close(fd); + return; + } if (*sizep == 0) { size = sharedmem_filesize(fd, CHECK); diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/os/windows/vm/os_windows.cpp --- a/hotspot/src/os/windows/vm/os_windows.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/os/windows/vm/os_windows.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -1810,32 +1810,30 @@ } buf[0] = '\0'; - if (Arguments::created_by_gamma_launcher()) { - // Support for the gamma launcher. Check for an - // JAVA_HOME environment variable - // and fix up the path so it looks like - // libjvm.so is installed there (append a fake suffix - // hotspot/libjvm.so). - char* java_home_var = ::getenv("JAVA_HOME"); - if (java_home_var != NULL && java_home_var[0] != 0) { - - strncpy(buf, java_home_var, buflen); - - // determine if this is a legacy image or modules image - // modules image doesn't have "jre" subdirectory - size_t len = strlen(buf); - char* jrebin_p = buf + len; - jio_snprintf(jrebin_p, buflen-len, "\\jre\\bin\\"); - if (0 != _access(buf, 0)) { - jio_snprintf(jrebin_p, buflen-len, "\\bin\\"); - } - len = strlen(buf); - jio_snprintf(buf + len, buflen-len, "hotspot\\jvm.dll"); - } - } - - if(buf[0] == '\0') { - GetModuleFileName(vm_lib_handle, buf, buflen); + if (Arguments::sun_java_launcher_is_altjvm()) { + // Support for the java launcher's '-XXaltjvm=' option. Check + // for a JAVA_HOME environment variable and fix up the path so it + // looks like jvm.dll is installed there (append a fake suffix + // hotspot/jvm.dll). + char* java_home_var = ::getenv("JAVA_HOME"); + if (java_home_var != NULL && java_home_var[0] != 0) { + strncpy(buf, java_home_var, buflen); + + // determine if this is a legacy image or modules image + // modules image doesn't have "jre" subdirectory + size_t len = strlen(buf); + char* jrebin_p = buf + len; + jio_snprintf(jrebin_p, buflen-len, "\\jre\\bin\\"); + if (0 != _access(buf, 0)) { + jio_snprintf(jrebin_p, buflen-len, "\\bin\\"); + } + len = strlen(buf); + jio_snprintf(buf + len, buflen-len, "hotspot\\jvm.dll"); + } + } + + if (buf[0] == '\0') { + GetModuleFileName(vm_lib_handle, buf, buflen); } strcpy(saved_jvm_path, buf); } diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp --- a/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -475,9 +475,11 @@ // here if the underlying file has been truncated. // Do not crash the VM in such a case. CodeBlob* cb = CodeCache::find_blob_unsafe(pc); - nmethod* nm = cb->is_nmethod() ? (nmethod*)cb : NULL; - if (nm != NULL && nm->has_unsafe_access()) { - stub = StubRoutines::handler_for_unsafe_access(); + if (cb != NULL) { + nmethod* nm = cb->is_nmethod() ? (nmethod*)cb : NULL; + if (nm != NULL && nm->has_unsafe_access()) { + stub = StubRoutines::handler_for_unsafe_access(); + } } } else @@ -724,6 +726,7 @@ err.report_and_die(); ShouldNotReachHere(); + return false; } void os::print_context(outputStream *st, void *context) { diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC10.java --- a/hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC10.java Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC10.java Mon Feb 24 12:56:19 2014 -0800 @@ -161,7 +161,18 @@ for (BuildConfig cfg : allConfigs) { startTag(cfg, "PropertyGroup"); tagData("LocalDebuggerCommand", cfg.get("JdkTargetRoot") + "\\bin\\java.exe"); - tagData("LocalDebuggerCommandArguments", "-XXaltjvm=$(TargetDir) -Dsun.java.launcher=gamma"); + // The JVM loads some libraries using a path relative to + // itself because it expects to be in a JRE or a JDK. The java + // launcher's '-XXaltjvm=' option allows the JVM to be outside + // the JRE or JDK so '-Dsun.java.launcher.is_altjvm=true' + // forces a fake JAVA_HOME relative path to be used to + // find the other libraries. The '-XX:+PauseAtExit' option + // causes the VM to wait for key press before exiting; this + // allows any stdout or stderr messages to be seen before + // the cmdtool exits. + tagData("LocalDebuggerCommandArguments", "-XXaltjvm=$(TargetDir) " + + "-Dsun.java.launcher.is_altjvm=true " + + "-XX:+UnlockDiagnosticVMOptions -XX:+PauseAtExit"); tagData("LocalDebuggerEnvironment", "JAVA_HOME=" + cfg.get("JdkTargetRoot")); endTag(); } diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/classfile/altHashing.cpp --- a/hotspot/src/share/vm/classfile/altHashing.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/classfile/altHashing.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,18 +39,18 @@ } // Seed value used for each alternative hash calculated. -jint AltHashing::compute_seed() { +juint AltHashing::compute_seed() { jlong nanos = os::javaTimeNanos(); jlong now = os::javaTimeMillis(); - jint SEED_MATERIAL[8] = { - (jint) object_hash(SystemDictionary::String_klass()), - (jint) object_hash(SystemDictionary::System_klass()), - (jint) os::random(), // current thread isn't a java thread - (jint) (((julong)nanos) >> 32), - (jint) nanos, - (jint) (((julong)now) >> 32), - (jint) now, - (jint) (os::javaTimeNanos() >> 2) + int SEED_MATERIAL[8] = { + (int) object_hash(SystemDictionary::String_klass()), + (int) object_hash(SystemDictionary::System_klass()), + (int) os::random(), // current thread isn't a java thread + (int) (((julong)nanos) >> 32), + (int) nanos, + (int) (((julong)now) >> 32), + (int) now, + (int) (os::javaTimeNanos() >> 2) }; return murmur3_32(SEED_MATERIAL, 8); @@ -58,14 +58,14 @@ // Murmur3 hashing for Symbol -jint AltHashing::murmur3_32(jint seed, const jbyte* data, int len) { - jint h1 = seed; +juint AltHashing::murmur3_32(juint seed, const jbyte* data, int len) { + juint h1 = seed; int count = len; int offset = 0; // body while (count >= 4) { - jint k1 = (data[offset] & 0x0FF) + juint k1 = (data[offset] & 0x0FF) | (data[offset + 1] & 0x0FF) << 8 | (data[offset + 2] & 0x0FF) << 16 | data[offset + 3] << 24; @@ -85,7 +85,7 @@ // tail if (count > 0) { - jint k1 = 0; + juint k1 = 0; switch (count) { case 3: @@ -109,18 +109,18 @@ h1 ^= len; // finalization mix force all bits of a hash block to avalanche - h1 ^= ((unsigned int)h1) >> 16; + h1 ^= h1 >> 16; h1 *= 0x85ebca6b; - h1 ^= ((unsigned int)h1) >> 13; + h1 ^= h1 >> 13; h1 *= 0xc2b2ae35; - h1 ^= ((unsigned int)h1) >> 16; + h1 ^= h1 >> 16; return h1; } // Murmur3 hashing for Strings -jint AltHashing::murmur3_32(jint seed, const jchar* data, int len) { - jint h1 = seed; +juint AltHashing::murmur3_32(juint seed, const jchar* data, int len) { + juint h1 = seed; int off = 0; int count = len; @@ -129,7 +129,7 @@ while (count >= 2) { jchar d1 = data[off++] & 0xFFFF; jchar d2 = data[off++]; - jint k1 = (d1 | d2 << 16); + juint k1 = (d1 | d2 << 16); count -= 2; @@ -145,7 +145,7 @@ // tail if (count > 0) { - int k1 = data[off]; + juint k1 = (juint)data[off]; k1 *= 0xcc9e2d51; k1 = Integer_rotateLeft(k1, 15); @@ -157,25 +157,25 @@ h1 ^= len * 2; // (Character.SIZE / Byte.SIZE); // finalization mix force all bits of a hash block to avalanche - h1 ^= ((unsigned int)h1) >> 16; + h1 ^= h1 >> 16; h1 *= 0x85ebca6b; - h1 ^= ((unsigned int)h1) >> 13; + h1 ^= h1 >> 13; h1 *= 0xc2b2ae35; - h1 ^= ((unsigned int)h1) >> 16; + h1 ^= h1 >> 16; return h1; } // Hash used for the seed. -jint AltHashing::murmur3_32(jint seed, const int* data, int len) { - jint h1 = seed; +juint AltHashing::murmur3_32(juint seed, const int* data, int len) { + juint h1 = seed; int off = 0; int end = len; // body while (off < end) { - jint k1 = data[off++]; + juint k1 = (juint)data[off++]; k1 *= 0xcc9e2d51; k1 = Integer_rotateLeft(k1, 15); @@ -193,26 +193,26 @@ h1 ^= len * 4; // (Integer.SIZE / Byte.SIZE); // finalization mix force all bits of a hash block to avalanche - h1 ^= ((juint)h1) >> 16; + h1 ^= h1 >> 16; h1 *= 0x85ebca6b; - h1 ^= ((juint)h1) >> 13; + h1 ^= h1 >> 13; h1 *= 0xc2b2ae35; - h1 ^= ((juint)h1) >> 16; + h1 ^= h1 >> 16; return h1; } -jint AltHashing::murmur3_32(const int* data, int len) { +juint AltHashing::murmur3_32(const int* data, int len) { return murmur3_32(0, data, len); } #ifndef PRODUCT // Overloaded versions for internal test. -jint AltHashing::murmur3_32(const jbyte* data, int len) { +juint AltHashing::murmur3_32(const jbyte* data, int len) { return murmur3_32(0, data, len); } -jint AltHashing::murmur3_32(const jchar* data, int len) { +juint AltHashing::murmur3_32(const jchar* data, int len) { return murmur3_32(0, data, len); } @@ -251,11 +251,11 @@ // Hash subranges {}, {0}, {0,1}, {0,1,2}, ..., {0,...,255} for (int i = 0; i < 256; i++) { - jint hash = murmur3_32(256 - i, vector, i); + juint hash = murmur3_32(256 - i, vector, i); hashes[i * 4] = (jbyte) hash; - hashes[i * 4 + 1] = (jbyte) (((juint)hash) >> 8); - hashes[i * 4 + 2] = (jbyte) (((juint)hash) >> 16); - hashes[i * 4 + 3] = (jbyte) (((juint)hash) >> 24); + hashes[i * 4 + 1] = (jbyte)(hash >> 8); + hashes[i * 4 + 2] = (jbyte)(hash >> 16); + hashes[i * 4 + 3] = (jbyte)(hash >> 24); } // hash to get const result. @@ -269,7 +269,7 @@ } void AltHashing::testEquivalentHashes() { - jint jbytes, jchars, ints; + juint jbytes, jchars, ints; // printf("testEquivalentHashes\n"); diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/classfile/altHashing.hpp --- a/hotspot/src/share/vm/classfile/altHashing.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/classfile/altHashing.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,24 +39,24 @@ class AltHashing : AllStatic { // utility function copied from java/lang/Integer - static jint Integer_rotateLeft(jint i, int distance) { - return (i << distance) | (((juint)i) >> (32-distance)); + static juint Integer_rotateLeft(juint i, int distance) { + return (i << distance) | (i >> (32-distance)); } - static jint murmur3_32(const int* data, int len); - static jint murmur3_32(jint seed, const int* data, int len); + static juint murmur3_32(const int* data, int len); + static juint murmur3_32(juint seed, const int* data, int len); #ifndef PRODUCT // Hashing functions used for internal testing - static jint murmur3_32(const jbyte* data, int len); - static jint murmur3_32(const jchar* data, int len); + static juint murmur3_32(const jbyte* data, int len); + static juint murmur3_32(const jchar* data, int len); static void testMurmur3_32_ByteArray(); static void testEquivalentHashes(); #endif // PRODUCT public: - static jint compute_seed(); - static jint murmur3_32(jint seed, const jbyte* data, int len); - static jint murmur3_32(jint seed, const jchar* data, int len); + static juint compute_seed(); + static juint murmur3_32(juint seed, const jbyte* data, int len); + static juint murmur3_32(juint seed, const jchar* data, int len); NOT_PRODUCT(static void test_alt_hash();) }; #endif // SHARE_VM_CLASSFILE_ALTHASHING_HPP diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/classfile/classFileParser.cpp --- a/hotspot/src/share/vm/classfile/classFileParser.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/classfile/classFileParser.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -3746,18 +3746,24 @@ Exceptions::fthrow( THREAD_AND_LOCATION, vmSymbols::java_lang_UnsupportedClassVersionError(), - "Unsupported major.minor version %u.%u", + "Unsupported class file version %u.%u, " + "this version of the Java Runtime only recognizes class file versions up to %u.%u", major_version, - minor_version); + minor_version, + JAVA_MAX_SUPPORTED_VERSION, + JAVA_MAX_SUPPORTED_MINOR_VERSION); } else { ResourceMark rm(THREAD); Exceptions::fthrow( THREAD_AND_LOCATION, vmSymbols::java_lang_UnsupportedClassVersionError(), - "%s : Unsupported major.minor version %u.%u", + "%s has been compiled by a more recent version of the Java Runtime (class file version %u.%u), " + "this version of the Java Runtime only recognizes class file versions up to %u.%u", name->as_C_string(), major_version, - minor_version); + minor_version, + JAVA_MAX_SUPPORTED_VERSION, + JAVA_MAX_SUPPORTED_MINOR_VERSION); } return nullHandle; } diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/code/vtableStubs.cpp --- a/hotspot/src/share/vm/code/vtableStubs.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/code/vtableStubs.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -55,6 +55,9 @@ const int chunk_factor = 32; if (_chunk == NULL || _chunk + real_size > _chunk_end) { const int bytes = chunk_factor * real_size + pd_code_alignment(); + + // There is a dependency on the name of the blob in src/share/vm/prims/jvmtiCodeBlobEvents.cpp + // If changing the name, update the other file accordingly. BufferBlob* blob = BufferBlob::create("vtable chunks", bytes); if (blob == NULL) { return NULL; @@ -62,12 +65,6 @@ _chunk = blob->content_begin(); _chunk_end = _chunk + bytes; Forte::register_stub("vtable stub", _chunk, _chunk_end); - // Notify JVMTI about this stub. The event will be recorded by the enclosing - // JvmtiDynamicCodeEventCollector and posted when this thread has released - // all locks. - if (JvmtiExport::should_post_dynamic_code_generated()) { - JvmtiExport::post_dynamic_code_generated_while_holding_locks("vtable stub", _chunk, _chunk_end); - } align_chunk(); } assert(_chunk + real_size <= _chunk_end, "bad allocation"); @@ -130,6 +127,13 @@ is_vtable_stub? "vtbl": "itbl", vtable_index, VtableStub::receiver_location()); Disassembler::decode(s->code_begin(), s->code_end()); } + // Notify JVMTI about this stub. The event will be recorded by the enclosing + // JvmtiDynamicCodeEventCollector and posted when this thread has released + // all locks. + if (JvmtiExport::should_post_dynamic_code_generated()) { + JvmtiExport::post_dynamic_code_generated_while_holding_locks(is_vtable_stub? "vtable stub": "itable stub", + s->code_begin(), s->code_end()); + } } return s->entry_point(); } @@ -195,6 +199,14 @@ VtableStubs::initialize(); } +void VtableStubs::vtable_stub_do(void f(VtableStub*)) { + for (int i = 0; i < N; i++) { + for (VtableStub* s = _table[i]; s != NULL; s = s->next()) { + f(s); + } + } +} + //----------------------------------------------------------------------------------------------------- // Non-product code diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/code/vtableStubs.hpp --- a/hotspot/src/share/vm/code/vtableStubs.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/code/vtableStubs.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -131,6 +131,7 @@ static VtableStub* stub_containing(address pc); // stub containing pc or NULL static int number_of_vtable_stubs() { return _number_of_vtable_stubs; } static void initialize(); + static void vtable_stub_do(void f(VtableStub*)); // iterates over all vtable stubs }; #endif // SHARE_VM_CODE_VTABLESTUBS_HPP diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/compiler/compileBroker.cpp --- a/hotspot/src/share/vm/compiler/compileBroker.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/compiler/compileBroker.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -955,7 +955,7 @@ if (compiler_thread == NULL || compiler_thread->osthread() == NULL){ vm_exit_during_initialization("java.lang.OutOfMemoryError", - "unable to create new native thread"); + os::native_thread_creation_failed_msg()); } java_lang_Thread::set_thread(thread_oop(), compiler_thread); diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.cpp --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -700,7 +700,7 @@ double latest_cms_sum_concurrent_phases_time_secs = concurrent_collection_time(); if (PrintAdaptiveSizePolicy && Verbose) { - gclog_or_tty->print_cr("\nCMSAdaptiveSizePolicy::ms_collecton_end " + gclog_or_tty->print_cr("\nCMSAdaptiveSizePolicy::ms_collection_end " "STW_in_foreground_in_seconds %f " "_latest_cms_initial_mark_start_to_end_time_secs %f " "_latest_cms_remark_start_to_end_time_secs %f " diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -958,7 +958,7 @@ desired_free_percentage); gclog_or_tty->print_cr(" Maximum free fraction %f", maximum_free_percentage); - gclog_or_tty->print_cr(" Capactiy "SIZE_FORMAT, capacity()/1000); + gclog_or_tty->print_cr(" Capacity "SIZE_FORMAT, capacity()/1000); gclog_or_tty->print_cr(" Desired capacity "SIZE_FORMAT, desired_capacity/1000); int prev_level = level() - 1; @@ -3313,7 +3313,7 @@ } // Not unloading classes this cycle - assert(!should_unload_classes(), "Inconsitency!"); + assert(!should_unload_classes(), "Inconsistency!"); remove_root_scanning_option(SharedHeap::SO_SystemClasses); add_root_scanning_option(SharedHeap::SO_AllClasses); @@ -7243,7 +7243,7 @@ HeapWord* addr = (HeapWord*)p; DEBUG_ONLY(_collector->verify_work_stacks_empty();) assert(!_span.contains(addr), "we are scanning the survivor spaces"); - assert(p->klass_or_null() != NULL, "object should be initializd"); + assert(p->klass_or_null() != NULL, "object should be initialized"); // an initialized object; ignore mark word in verification below // since we are running concurrent with mutators assert(p->is_oop(true), "should be an oop"); diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -254,7 +254,7 @@ // No need to do a young gc, we'll just nudge the CMS thread // in the doit() method above, to be executed soon. assert(_gc_count_before < gch->total_collections(), - "total_collections() should be monotnically increasing"); + "total_collections() should be monotonically increasing"); return false; // no need for foreground young gc } } diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/gc_implementation/g1/bufferingOopClosure.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hotspot/src/share/vm/gc_implementation/g1/bufferingOopClosure.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -0,0 +1,271 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#include "precompiled.hpp" +#include "gc_implementation/g1/bufferingOopClosure.hpp" +#include "memory/iterator.hpp" +#include "utilities/debug.hpp" + +/////////////// Unit tests /////////////// + +#ifndef PRODUCT + +class TestBufferingOopClosure { + + // Helper class to fake a set of oop*s and narrowOop*s. + class FakeRoots { + public: + // Used for sanity checking of the values passed to the do_oops functions in the test. + static const uintptr_t NarrowOopMarker = uintptr_t(1) << (BitsPerWord -1); + + int _num_narrow; + int _num_full; + void** _narrow; + void** _full; + + FakeRoots(int num_narrow, int num_full) : + _num_narrow(num_narrow), + _num_full(num_full), + _narrow((void**)::malloc(sizeof(void*) * num_narrow)), + _full((void**)::malloc(sizeof(void*) * num_full)) { + + for (int i = 0; i < num_narrow; i++) { + _narrow[i] = (void*)(NarrowOopMarker + (uintptr_t)i); + } + for (int i = 0; i < num_full; i++) { + _full[i] = (void*)(uintptr_t)i; + } + } + + ~FakeRoots() { + ::free(_narrow); + ::free(_full); + } + + void oops_do_narrow_then_full(OopClosure* cl) { + for (int i = 0; i < _num_narrow; i++) { + cl->do_oop((narrowOop*)_narrow[i]); + } + for (int i = 0; i < _num_full; i++) { + cl->do_oop((oop*)_full[i]); + } + } + + void oops_do_full_then_narrow(OopClosure* cl) { + for (int i = 0; i < _num_full; i++) { + cl->do_oop((oop*)_full[i]); + } + for (int i = 0; i < _num_narrow; i++) { + cl->do_oop((narrowOop*)_narrow[i]); + } + } + + void oops_do_mixed(OopClosure* cl) { + int i; + for (i = 0; i < _num_full && i < _num_narrow; i++) { + cl->do_oop((oop*)_full[i]); + cl->do_oop((narrowOop*)_narrow[i]); + } + for (int j = i; j < _num_full; j++) { + cl->do_oop((oop*)_full[i]); + } + for (int j = i; j < _num_narrow; j++) { + cl->do_oop((narrowOop*)_narrow[i]); + } + } + + static const int MaxOrder = 2; + + void oops_do(OopClosure* cl, int do_oop_order) { + switch(do_oop_order) { + case 0: + oops_do_narrow_then_full(cl); + break; + case 1: + oops_do_full_then_narrow(cl); + break; + case 2: + oops_do_mixed(cl); + break; + default: + oops_do_narrow_then_full(cl); + break; + } + } + }; + + class CountOopClosure : public OopClosure { + int _narrow_oop_count; + int _full_oop_count; + public: + CountOopClosure() : _narrow_oop_count(0), _full_oop_count(0) {} + void do_oop(narrowOop* p) { + assert((uintptr_t(p) & FakeRoots::NarrowOopMarker) != 0, + "The narrowOop was unexpectedly not marked with the NarrowOopMarker"); + _narrow_oop_count++; + } + + void do_oop(oop* p){ + assert((uintptr_t(p) & FakeRoots::NarrowOopMarker) == 0, + "The oop was unexpectedly marked with the NarrowOopMarker"); + _full_oop_count++; + } + + int narrow_oop_count() { return _narrow_oop_count; } + int full_oop_count() { return _full_oop_count; } + int all_oop_count() { return _narrow_oop_count + _full_oop_count; } + }; + + class DoNothingOopClosure : public OopClosure { + public: + void do_oop(narrowOop* p) {} + void do_oop(oop* p) {} + }; + + static void testCount(int num_narrow, int num_full, int do_oop_order) { + FakeRoots fr(num_narrow, num_full); + + CountOopClosure coc; + BufferingOopClosure boc(&coc); + + fr.oops_do(&boc, do_oop_order); + + boc.done(); + + #define assert_testCount(got, expected) \ + assert((got) == (expected), \ + err_msg("Expected: %d, got: %d, when running testCount(%d, %d, %d)", \ + (got), (expected), num_narrow, num_full, do_oop_order)) + + assert_testCount(num_narrow, coc.narrow_oop_count()); + assert_testCount(num_full, coc.full_oop_count()); + assert_testCount(num_narrow + num_full, coc.all_oop_count()); + } + + static void testCount() { + int buffer_length = BufferingOopClosure::BufferLength; + + for (int order = 0; order < FakeRoots::MaxOrder; order++) { + testCount(0, 0, order); + testCount(10, 0, order); + testCount(0, 10, order); + testCount(10, 10, order); + testCount(buffer_length, 10, order); + testCount(10, buffer_length, order); + testCount(buffer_length, buffer_length, order); + testCount(buffer_length + 1, 10, order); + testCount(10, buffer_length + 1, order); + testCount(buffer_length + 1, buffer_length, order); + testCount(buffer_length, buffer_length + 1, order); + testCount(buffer_length + 1, buffer_length + 1, order); + } + } + + static void testIsBufferEmptyOrFull(int num_narrow, int num_full, bool expect_empty, bool expect_full) { + FakeRoots fr(num_narrow, num_full); + + DoNothingOopClosure cl; + BufferingOopClosure boc(&cl); + + fr.oops_do(&boc, 0); + + #define assert_testIsBufferEmptyOrFull(got, expected) \ + assert((got) == (expected), \ + err_msg("Expected: %d, got: %d. testIsBufferEmptyOrFull(%d, %d, %s, %s)", \ + (got), (expected), num_narrow, num_full, \ + BOOL_TO_STR(expect_empty), BOOL_TO_STR(expect_full))) + + assert_testIsBufferEmptyOrFull(expect_empty, boc.is_buffer_empty()); + assert_testIsBufferEmptyOrFull(expect_full, boc.is_buffer_full()); + } + + static void testIsBufferEmptyOrFull() { + int bl = BufferingOopClosure::BufferLength; + + testIsBufferEmptyOrFull(0, 0, true, false); + testIsBufferEmptyOrFull(1, 0, false, false); + testIsBufferEmptyOrFull(0, 1, false, false); + testIsBufferEmptyOrFull(1, 1, false, false); + testIsBufferEmptyOrFull(10, 0, false, false); + testIsBufferEmptyOrFull(0, 10, false, false); + testIsBufferEmptyOrFull(10, 10, false, false); + testIsBufferEmptyOrFull(0, bl, false, true); + testIsBufferEmptyOrFull(bl, 0, false, true); + testIsBufferEmptyOrFull(bl/2, bl/2, false, true); + testIsBufferEmptyOrFull(bl-1, 1, false, true); + testIsBufferEmptyOrFull(1, bl-1, false, true); + // Processed + testIsBufferEmptyOrFull(bl+1, 0, false, false); + testIsBufferEmptyOrFull(bl*2, 0, false, true); + } + + static void testEmptyAfterDone(int num_narrow, int num_full) { + FakeRoots fr(num_narrow, num_full); + + DoNothingOopClosure cl; + BufferingOopClosure boc(&cl); + + fr.oops_do(&boc, 0); + + // Make sure all get processed. + boc.done(); + + assert(boc.is_buffer_empty(), + err_msg("Should be empty after call to done(). testEmptyAfterDone(%d, %d)", + num_narrow, num_full)); + } + + static void testEmptyAfterDone() { + int bl = BufferingOopClosure::BufferLength; + + testEmptyAfterDone(0, 0); + testEmptyAfterDone(1, 0); + testEmptyAfterDone(0, 1); + testEmptyAfterDone(1, 1); + testEmptyAfterDone(10, 0); + testEmptyAfterDone(0, 10); + testEmptyAfterDone(10, 10); + testEmptyAfterDone(0, bl); + testEmptyAfterDone(bl, 0); + testEmptyAfterDone(bl/2, bl/2); + testEmptyAfterDone(bl-1, 1); + testEmptyAfterDone(1, bl-1); + // Processed + testEmptyAfterDone(bl+1, 0); + testEmptyAfterDone(bl*2, 0); + } + + public: + static void test() { + testCount(); + testIsBufferEmptyOrFull(); + testEmptyAfterDone(); + } +}; + +void TestBufferingOopClosure_test() { + TestBufferingOopClosure::test(); +} + +#endif diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/gc_implementation/g1/bufferingOopClosure.hpp --- a/hotspot/src/share/vm/gc_implementation/g1/bufferingOopClosure.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/gc_implementation/g1/bufferingOopClosure.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,10 +25,10 @@ #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_BUFFERINGOOPCLOSURE_HPP #define SHARE_VM_GC_IMPLEMENTATION_G1_BUFFERINGOOPCLOSURE_HPP -#include "memory/genOopClosures.hpp" -#include "memory/generation.hpp" +#include "memory/iterator.hpp" +#include "oops/oopsHierarchy.hpp" #include "runtime/os.hpp" -#include "utilities/taskqueue.hpp" +#include "utilities/debug.hpp" // A BufferingOops closure tries to separate out the cost of finding roots // from the cost of applying closures to them. It maintains an array of @@ -41,60 +41,103 @@ // The caller must be sure to call "done" to process any unprocessed // buffered entries. -class Generation; -class HeapRegion; - class BufferingOopClosure: public OopClosure { + friend class TestBufferingOopClosure; protected: - enum PrivateConstants { - BufferLength = 1024 - }; + static const size_t BufferLength = 1024; - StarTask _buffer[BufferLength]; - StarTask* _buffer_top; - StarTask* _buffer_curr; + // We need to know if the buffered addresses contain oops or narrowOops. + // We can't tag the addresses the way StarTask does, because we need to + // be able to handle unaligned addresses coming from oops embedded in code. + // + // The addresses for the full-sized oops are filled in from the bottom, + // while the addresses for the narrowOops are filled in from the top. + OopOrNarrowOopStar _buffer[BufferLength]; + OopOrNarrowOopStar* _oop_top; + OopOrNarrowOopStar* _narrowOop_bottom; OopClosure* _oc; double _closure_app_seconds; - void process_buffer () { + + bool is_buffer_empty() { + return _oop_top == _buffer && _narrowOop_bottom == (_buffer + BufferLength - 1); + } + + bool is_buffer_full() { + return _narrowOop_bottom < _oop_top; + } + + // Process addresses containing full-sized oops. + void process_oops() { + for (OopOrNarrowOopStar* curr = _buffer; curr < _oop_top; ++curr) { + _oc->do_oop((oop*)(*curr)); + } + _oop_top = _buffer; + } + + // Process addresses containing narrow oops. + void process_narrowOops() { + for (OopOrNarrowOopStar* curr = _buffer + BufferLength - 1; curr > _narrowOop_bottom; --curr) { + _oc->do_oop((narrowOop*)(*curr)); + } + _narrowOop_bottom = _buffer + BufferLength - 1; + } + + // Apply the closure to all oops and clear the buffer. + // Accumulate the time it took. + void process_buffer() { double start = os::elapsedTime(); - for (StarTask* curr = _buffer; curr < _buffer_curr; ++curr) { - if (curr->is_narrow()) { - assert(UseCompressedOops, "Error"); - _oc->do_oop((narrowOop*)(*curr)); - } else { - _oc->do_oop((oop*)(*curr)); - } - } - _buffer_curr = _buffer; + + process_oops(); + process_narrowOops(); + _closure_app_seconds += (os::elapsedTime() - start); } - template inline void do_oop_work(T* p) { - if (_buffer_curr == _buffer_top) { + void process_buffer_if_full() { + if (is_buffer_full()) { process_buffer(); } - StarTask new_ref(p); - *_buffer_curr = new_ref; - ++_buffer_curr; + } + + void add_narrowOop(narrowOop* p) { + assert(!is_buffer_full(), "Buffer should not be full"); + *_narrowOop_bottom = (OopOrNarrowOopStar)p; + _narrowOop_bottom--; + } + + void add_oop(oop* p) { + assert(!is_buffer_full(), "Buffer should not be full"); + *_oop_top = (OopOrNarrowOopStar)p; + _oop_top++; } public: - virtual void do_oop(narrowOop* p) { do_oop_work(p); } - virtual void do_oop(oop* p) { do_oop_work(p); } + virtual void do_oop(narrowOop* p) { + process_buffer_if_full(); + add_narrowOop(p); + } - void done () { - if (_buffer_curr > _buffer) { + virtual void do_oop(oop* p) { + process_buffer_if_full(); + add_oop(p); + } + + void done() { + if (!is_buffer_empty()) { process_buffer(); } } - double closure_app_seconds () { + + double closure_app_seconds() { return _closure_app_seconds; } - BufferingOopClosure (OopClosure *oc) : + + BufferingOopClosure(OopClosure *oc) : _oc(oc), - _buffer_curr(_buffer), _buffer_top(_buffer + BufferLength), + _oop_top(_buffer), + _narrowOop_bottom(_buffer + BufferLength - 1), _closure_app_seconds(0.0) { } }; diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2266,7 +2266,7 @@ // (for efficiency/performance) false); // Setting next fields of discovered - // lists requires a barrier. + // lists does not require a barrier. } size_t G1CollectedHeap::capacity() const { @@ -5115,15 +5115,12 @@ BufferingOopClosure buf_scan_non_heap_roots(scan_non_heap_roots); - assert(so & SO_AllCodeCache || scan_rs != NULL, "must scan code roots somehow"); - // Walk the code cache/strong code roots w/o buffering, because StarTask - // cannot handle unaligned oop locations. - CodeBlobToOopClosure eager_scan_code_roots(scan_non_heap_roots, true /* do_marking */); + CodeBlobToOopClosure scan_code_roots(&buf_scan_non_heap_roots, true /* do_marking */); process_strong_roots(false, // no scoping; this is parallel code so, &buf_scan_non_heap_roots, - &eager_scan_code_roots, + &scan_code_roots, scan_klasses ); @@ -5177,9 +5174,9 @@ g1_policy()->phase_times()->record_strong_code_root_mark_time(worker_i, mark_strong_code_roots_ms); // Now scan the complement of the collection set. - if (scan_rs != NULL) { - g1_rem_set()->oops_into_collection_set_do(scan_rs, &eager_scan_code_roots, worker_i); - } + CodeBlobToOopClosure eager_scan_code_roots(scan_non_heap_roots, true /* do_marking */); + g1_rem_set()->oops_into_collection_set_do(scan_rs, &eager_scan_code_roots, worker_i); + _process_strong_tasks->all_tasks_completed(); } @@ -5202,9 +5199,12 @@ bool _process_symbols; int _symbols_processed; int _symbols_removed; + + bool _do_in_parallel; public: G1StringSymbolTableUnlinkTask(BoolObjectClosure* is_alive, bool process_strings, bool process_symbols) : AbstractGangTask("Par String/Symbol table unlink"), _is_alive(is_alive), + _do_in_parallel(G1CollectedHeap::use_parallel_gc_threads()), _process_strings(process_strings), _strings_processed(0), _strings_removed(0), _process_symbols(process_symbols), _symbols_processed(0), _symbols_removed(0) { @@ -5219,16 +5219,16 @@ } ~G1StringSymbolTableUnlinkTask() { - guarantee(!_process_strings || StringTable::parallel_claimed_index() >= _initial_string_table_size, + guarantee(!_process_strings || !_do_in_parallel || StringTable::parallel_claimed_index() >= _initial_string_table_size, err_msg("claim value "INT32_FORMAT" after unlink less than initial string table size "INT32_FORMAT, StringTable::parallel_claimed_index(), _initial_string_table_size)); - guarantee(!_process_strings || SymbolTable::parallel_claimed_index() >= _initial_symbol_table_size, + guarantee(!_process_symbols || !_do_in_parallel || SymbolTable::parallel_claimed_index() >= _initial_symbol_table_size, err_msg("claim value "INT32_FORMAT" after unlink less than initial symbol table size "INT32_FORMAT, SymbolTable::parallel_claimed_index(), _initial_symbol_table_size)); } void work(uint worker_id) { - if (G1CollectedHeap::use_parallel_gc_threads()) { + if (_do_in_parallel) { int strings_processed = 0; int strings_removed = 0; int symbols_processed = 0; diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.hpp --- a/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -86,13 +86,26 @@ #define G1_PARTIAL_ARRAY_MASK 0x2 -template inline bool has_partial_array_mask(T* ref) { +inline bool has_partial_array_mask(oop* ref) { return ((uintptr_t)ref & G1_PARTIAL_ARRAY_MASK) == G1_PARTIAL_ARRAY_MASK; } -template inline T* set_partial_array_mask(T obj) { +// We never encode partial array oops as narrowOop*, so return false immediately. +// This allows the compiler to create optimized code when popping references from +// the work queue. +inline bool has_partial_array_mask(narrowOop* ref) { + assert(((uintptr_t)ref & G1_PARTIAL_ARRAY_MASK) != G1_PARTIAL_ARRAY_MASK, "Partial array oop reference encoded as narrowOop*"); + return false; +} + +// Only implement set_partial_array_mask() for regular oops, not for narrowOops. +// We always encode partial arrays as regular oop, to allow the +// specialization for has_partial_array_mask() for narrowOops above. +// This means that unintentional use of this method with narrowOops are caught +// by the compiler. +inline oop* set_partial_array_mask(oop obj) { assert(((uintptr_t)(void *)obj & G1_PARTIAL_ARRAY_MASK) == 0, "Information loss!"); - return (T*) ((uintptr_t)(void *)obj | G1_PARTIAL_ARRAY_MASK); + return (oop*) ((uintptr_t)(void *)obj | G1_PARTIAL_ARRAY_MASK); } template inline oop clear_partial_array_mask(T* ref) { diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp --- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -23,7 +23,6 @@ */ #include "precompiled.hpp" -#include "gc_implementation/g1/bufferingOopClosure.hpp" #include "gc_implementation/g1/concurrentG1Refine.hpp" #include "gc_implementation/g1/concurrentG1RefineThread.hpp" #include "gc_implementation/g1/g1BlockOffsetTable.inline.hpp" diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp --- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp --- a/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -183,7 +183,7 @@ "When true, record recent calls to rem set operations.") \ \ develop(intx, G1MaxVerifyFailures, -1, \ - "The maximum number of verification failrues to print. " \ + "The maximum number of verification failures to print. " \ "-1 means print all.") \ \ develop(bool, G1ScrubRemSets, true, \ diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/gc_implementation/g1/satbQueue.cpp --- a/hotspot/src/share/vm/gc_implementation/g1/satbQueue.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/gc_implementation/g1/satbQueue.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -91,7 +91,7 @@ assert(new_index > 0, "we should not have already filled up the buffer"); new_index -= oopSize; assert(new_index >= i, - "new_index should never be below i, as we alwaysr compact 'up'"); + "new_index should never be below i, as we always compact 'up'"); oop* new_p = (oop*) &buf[byte_index_to_index((int) new_index)]; assert(new_p >= p, "the destination location should never be below " "the source as we always compact 'up'"); diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp --- a/hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -250,7 +250,7 @@ // right neighbor (up to the end of the first object). if (last_card_of_cur_chunk < last_card_of_first_obj) { tty->print_cr(" LNC: BEWARE!!! first obj straddles past right end of chunk:\n" - " might be efficient to get value from right neighbour?"); + " might be efficient to get value from right neighbor?"); } }) } else { diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.cpp --- a/hotspot/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -168,7 +168,7 @@ if (TraceDynamicGCThreads) { gclog_or_tty->print_cr("GCTaskManager::calc_default_active_workers() : " - "active_workers(): %d new_acitve_workers: %d " + "active_workers(): %d new_active_workers: %d " "prev_active_workers: %d\n" " active_workers_by_JT: %d active_workers_by_heap_size: %d", active_workers, new_active_workers, prev_active_workers, diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp --- a/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -31,6 +31,7 @@ #include "runtime/interfaceSupport.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" +#include "runtime/os.hpp" // CopyrightVersion 1.2 @@ -206,7 +207,7 @@ // exceptions anyway, check and abort if this fails. if (res == NULL || res->osthread() == NULL) { vm_exit_during_initialization("java.lang.OutOfMemoryError", - "unable to create new native thread"); + os::native_thread_creation_failed_msg()); } java_lang_Thread::set_thread(thread_oop(), res); java_lang_Thread::set_priority(thread_oop(), NearMaxPriority); diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp --- a/hotspot/src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -559,7 +559,7 @@ bool clear_space, bool mangle_space, bool setup_pages) { - assert(clear_space, "Reallocation will destory data!"); + assert(clear_space, "Reallocation will destroy data!"); assert(lgrp_spaces()->length() > 0, "There should be at least one space"); MemRegion old_region = region(), new_region; diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/interpreter/linkResolver.cpp --- a/hotspot/src/share/vm/interpreter/linkResolver.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/interpreter/linkResolver.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -564,16 +564,7 @@ } } - // 5. check if method is concrete - if (resolved_method->is_abstract() && !resolved_klass->is_abstract()) { - ResourceMark rm(THREAD); - THROW_MSG(vmSymbols::java_lang_AbstractMethodError(), - Method::name_and_sig_as_C_string(resolved_klass(), - method_name, - method_signature)); - } - - // 6. access checks, access checking may be turned off when calling from within the VM. + // 5. access checks, access checking may be turned off when calling from within the VM. if (check_access) { assert(current_klass.not_null() , "current_klass should not be null"); diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/interpreter/rewriter.cpp --- a/hotspot/src/share/vm/interpreter/rewriter.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/interpreter/rewriter.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -250,8 +250,8 @@ // We will reverse the bytecode rewriting _after_ adjusting them. // Adjust the cache index by offset to the invokedynamic entries in the // cpCache plus the delta if the invokedynamic bytecodes were adjusted. - cache_index = cp_cache_delta() + _first_iteration_cp_cache_limit; - int cp_index = invokedynamic_cp_cache_entry_pool_index(cache_index); + int adjustment = cp_cache_delta() + _first_iteration_cp_cache_limit; + int cp_index = invokedynamic_cp_cache_entry_pool_index(cache_index - adjustment); assert(_pool->tag_at(cp_index).is_invoke_dynamic(), "wrong index"); // zero out 4 bytes Bytes::put_Java_u4(p, 0); @@ -453,18 +453,7 @@ return method; } -void Rewriter::rewrite(instanceKlassHandle klass, TRAPS) { - ResourceMark rm(THREAD); - Rewriter rw(klass, klass->constants(), klass->methods(), CHECK); - // (That's all, folks.) -} - - -Rewriter::Rewriter(instanceKlassHandle klass, constantPoolHandle cpool, Array* methods, TRAPS) - : _klass(klass), - _pool(cpool), - _methods(methods) -{ +void Rewriter::rewrite_bytecodes(TRAPS) { assert(_pool->cache() == NULL, "constant pool cache must not be set yet"); // determine index maps for Method* rewriting @@ -508,6 +497,29 @@ // May have to fix invokedynamic bytecodes if invokestatic/InterfaceMethodref // entries had to be added. patch_invokedynamic_bytecodes(); +} + +void Rewriter::rewrite(instanceKlassHandle klass, TRAPS) { + ResourceMark rm(THREAD); + Rewriter rw(klass, klass->constants(), klass->methods(), CHECK); + // (That's all, folks.) +} + + +Rewriter::Rewriter(instanceKlassHandle klass, constantPoolHandle cpool, Array* methods, TRAPS) + : _klass(klass), + _pool(cpool), + _methods(methods) +{ + + // Rewrite bytecodes - exception here exits. + rewrite_bytecodes(CHECK); + + // Stress restoring bytecodes + if (StressRewriter) { + restore_bytecodes(); + rewrite_bytecodes(CHECK); + } // allocate constant pool cache, now that we've seen all the bytecodes make_constant_pool_cache(THREAD); @@ -523,6 +535,7 @@ // so methods with jsrs in custom class lists in aren't attempted to be // rewritten in the RO section of the shared archive. // Relocated bytecodes don't have to be restored, only the cp cache entries + int len = _methods->length(); for (int i = len-1; i >= 0; i--) { methodHandle m(THREAD, _methods->at(i)); diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/interpreter/rewriter.hpp --- a/hotspot/src/share/vm/interpreter/rewriter.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/interpreter/rewriter.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -199,6 +199,9 @@ void patch_invokedynamic_bytecodes(); + // Do all the work. + void rewrite_bytecodes(TRAPS); + // Revert bytecodes in case of an exception. void restore_bytecodes(); diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/memory/binaryTreeDictionary.cpp --- a/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/memory/binaryTreeDictionary.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -1352,7 +1352,7 @@ template class FreeList_t> void BinaryTreeDictionary::verify_tree() const { guarantee(root() == NULL || total_free_blocks() == 0 || - total_size() != 0, "_total_size should't be 0?"); + total_size() != 0, "_total_size shouldn't be 0?"); guarantee(root() == NULL || root()->parent() == NULL, "_root shouldn't have parent"); verify_tree_helper(root()); } diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/memory/cardTableModRefBS.cpp --- a/hotspot/src/share/vm/memory/cardTableModRefBS.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/memory/cardTableModRefBS.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -54,8 +54,8 @@ size_t CardTableModRefBS::compute_byte_map_size() { assert(_guard_index == cards_required(_whole_heap.word_size()) - 1, - "unitialized, check declaration order"); - assert(_page_size != 0, "unitialized, check declaration order"); + "uninitialized, check declaration order"); + assert(_page_size != 0, "uninitialized, check declaration order"); const size_t granularity = os::vm_allocation_granularity(); return align_size_up(_guard_index + 1, MAX2(_page_size, granularity)); } diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/memory/collectorPolicy.cpp --- a/hotspot/src/share/vm/memory/collectorPolicy.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/memory/collectorPolicy.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -446,18 +446,20 @@ _max_gen0_size = max_new_size; } else { size_t desired_new_size = 0; - if (!FLAG_IS_DEFAULT(NewSize)) { - // If NewSize is set ergonomically (for example by cms), it - // would make sense to use it. If it is used, also use it - // to set the initial size. Although there is no reason - // the minimum size and the initial size have to be the same, - // the current implementation gets into trouble during the calculation - // of the tenured generation sizes if they are different. - // Note that this makes the initial size and the minimum size - // generally small compared to the NewRatio calculation. + if (FLAG_IS_CMDLINE(NewSize)) { + // If NewSize is set on the command line, we must use it as + // the initial size and it also makes sense to use it as the + // lower limit. _min_gen0_size = NewSize; desired_new_size = NewSize; max_new_size = MAX2(max_new_size, NewSize); + } else if (FLAG_IS_ERGO(NewSize)) { + // If NewSize is set ergonomically, we should use it as a lower + // limit, but use NewRatio to calculate the initial size. + _min_gen0_size = NewSize; + desired_new_size = + MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize); + max_new_size = MAX2(max_new_size, NewSize); } else { // For the case where NewSize is the default, use NewRatio // to size the minimum and initial generation sizes. @@ -980,3 +982,110 @@ _gc_policy_counters = new GCPolicyCounters("Copy:MSC", 2, 3); } } + +/////////////// Unit tests /////////////// + +#ifndef PRODUCT +// Testing that the NewSize flag is handled correct is hard because it +// depends on so many other configurable variables. This test only tries to +// verify that there are some basic rules for NewSize honored by the policies. +class TestGenCollectorPolicy { +public: + static void test() { + size_t flag_value; + + save_flags(); + + // Set some limits that makes the math simple. + FLAG_SET_ERGO(uintx, MaxHeapSize, 180 * M); + FLAG_SET_ERGO(uintx, InitialHeapSize, 120 * M); + Arguments::set_min_heap_size(40 * M); + + // If NewSize is set on the command line, it should be used + // for both min and initial young size if less than min heap. + flag_value = 20 * M; + FLAG_SET_CMDLINE(uintx, NewSize, flag_value); + verify_min(flag_value); + verify_initial(flag_value); + + // If NewSize is set on command line, but is larger than the min + // heap size, it should only be used for initial young size. + flag_value = 80 * M; + FLAG_SET_CMDLINE(uintx, NewSize, flag_value); + verify_initial(flag_value); + + // If NewSize has been ergonomically set, the collector policy + // should use it for min but calculate the initial young size + // using NewRatio. + flag_value = 20 * M; + FLAG_SET_ERGO(uintx, NewSize, flag_value); + verify_min(flag_value); + verify_scaled_initial(InitialHeapSize); + + restore_flags(); + + } + + static void verify_min(size_t expected) { + MarkSweepPolicy msp; + msp.initialize_all(); + + assert(msp.min_gen0_size() <= expected, err_msg("%zu > %zu", msp.min_gen0_size(), expected)); + } + + static void verify_initial(size_t expected) { + MarkSweepPolicy msp; + msp.initialize_all(); + + assert(msp.initial_gen0_size() == expected, err_msg("%zu != %zu", msp.initial_gen0_size(), expected)); + } + + static void verify_scaled_initial(size_t initial_heap_size) { + MarkSweepPolicy msp; + msp.initialize_all(); + + size_t expected = msp.scale_by_NewRatio_aligned(initial_heap_size); + assert(msp.initial_gen0_size() == expected, err_msg("%zu != %zu", msp.initial_gen0_size(), expected)); + assert(FLAG_IS_ERGO(NewSize) && NewSize == expected, + err_msg("NewSize should have been set ergonomically to %zu, but was %zu", expected, NewSize)); + } + +private: + static size_t original_InitialHeapSize; + static size_t original_MaxHeapSize; + static size_t original_MaxNewSize; + static size_t original_MinHeapDeltaBytes; + static size_t original_NewSize; + static size_t original_OldSize; + + static void save_flags() { + original_InitialHeapSize = InitialHeapSize; + original_MaxHeapSize = MaxHeapSize; + original_MaxNewSize = MaxNewSize; + original_MinHeapDeltaBytes = MinHeapDeltaBytes; + original_NewSize = NewSize; + original_OldSize = OldSize; + } + + static void restore_flags() { + InitialHeapSize = original_InitialHeapSize; + MaxHeapSize = original_MaxHeapSize; + MaxNewSize = original_MaxNewSize; + MinHeapDeltaBytes = original_MinHeapDeltaBytes; + NewSize = original_NewSize; + OldSize = original_OldSize; + } +}; + +size_t TestGenCollectorPolicy::original_InitialHeapSize = 0; +size_t TestGenCollectorPolicy::original_MaxHeapSize = 0; +size_t TestGenCollectorPolicy::original_MaxNewSize = 0; +size_t TestGenCollectorPolicy::original_MinHeapDeltaBytes = 0; +size_t TestGenCollectorPolicy::original_NewSize = 0; +size_t TestGenCollectorPolicy::original_OldSize = 0; + +void TestNewSize_test() { + TestGenCollectorPolicy::test(); +} + +#endif diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/memory/collectorPolicy.hpp --- a/hotspot/src/share/vm/memory/collectorPolicy.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/memory/collectorPolicy.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -220,6 +220,7 @@ }; class GenCollectorPolicy : public CollectorPolicy { +friend class TestGenCollectorPolicy; protected: size_t _min_gen0_size; size_t _initial_gen0_size; diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/memory/metaspace.cpp --- a/hotspot/src/share/vm/memory/metaspace.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/memory/metaspace.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -746,7 +746,7 @@ assert_lock_strong(SpaceManager::expand_lock()); _container_count++; assert(_container_count == container_count_slow(), - err_msg("Inconsistency in countainer_count _container_count " SIZE_FORMAT + err_msg("Inconsistency in container_count _container_count " SIZE_FORMAT " container_count_slow() " SIZE_FORMAT, _container_count, container_count_slow())); } @@ -759,7 +759,7 @@ #ifdef ASSERT void VirtualSpaceNode::verify_container_count() { assert(_container_count == container_count_slow(), - err_msg("Inconsistency in countainer_count _container_count " SIZE_FORMAT + err_msg("Inconsistency in container_count _container_count " SIZE_FORMAT " container_count_slow() " SIZE_FORMAT, _container_count, container_count_slow())); } #endif diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/memory/referenceProcessor.cpp --- a/hotspot/src/share/vm/memory/referenceProcessor.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/memory/referenceProcessor.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -62,7 +62,7 @@ } guarantee(RefDiscoveryPolicy == ReferenceBasedDiscovery || RefDiscoveryPolicy == ReferentBasedDiscovery, - "Unrecongnized RefDiscoveryPolicy"); + "Unrecognized RefDiscoveryPolicy"); _pending_list_uses_discovered_field = JDK_Version::current().pending_list_uses_discovered_field(); } @@ -95,11 +95,11 @@ uint mt_discovery_degree, bool atomic_discovery, BoolObjectClosure* is_alive_non_header, - bool discovered_list_needs_barrier) : + bool discovered_list_needs_post_barrier) : _discovering_refs(false), _enqueuing_is_done(false), _is_alive_non_header(is_alive_non_header), - _discovered_list_needs_barrier(discovered_list_needs_barrier), + _discovered_list_needs_post_barrier(discovered_list_needs_post_barrier), _processing_is_mt(mt_processing), _next_id(0) { @@ -490,13 +490,13 @@ } else { new_next = _next; } - - if (UseCompressedOops) { - // Remove Reference object from list. - oopDesc::encode_store_heap_oop((narrowOop*)_prev_next, new_next); - } else { - // Remove Reference object from list. - oopDesc::store_heap_oop((oop*)_prev_next, new_next); + // Remove Reference object from discovered list. Note that G1 does not need a + // pre-barrier here because we know the Reference has already been found/marked, + // that's how it ended up in the discovered list in the first place. + oop_store_raw(_prev_next, new_next); + if (_discovered_list_needs_post_barrier && _prev_next != _refs_list.adr_head()) { + // Needs post-barrier and this is not the list head (which is not on the heap) + oopDesc::bs()->write_ref_field(_prev_next, new_next); } NOT_PRODUCT(_removed++); _refs_list.dec_length(1); @@ -544,7 +544,7 @@ OopClosure* keep_alive, VoidClosure* complete_gc) { assert(policy != NULL, "Must have a non-NULL policy"); - DiscoveredListIterator iter(refs_list, keep_alive, is_alive); + DiscoveredListIterator iter(refs_list, keep_alive, is_alive, _discovered_list_needs_post_barrier); // Decide which softly reachable refs should be kept alive. while (iter.has_next()) { iter.load_ptrs(DEBUG_ONLY(!discovery_is_atomic() /* allow_null_referent */)); @@ -584,7 +584,7 @@ BoolObjectClosure* is_alive, OopClosure* keep_alive) { assert(discovery_is_atomic(), "Error"); - DiscoveredListIterator iter(refs_list, keep_alive, is_alive); + DiscoveredListIterator iter(refs_list, keep_alive, is_alive, _discovered_list_needs_post_barrier); while (iter.has_next()) { iter.load_ptrs(DEBUG_ONLY(false /* allow_null_referent */)); DEBUG_ONLY(oop next = java_lang_ref_Reference::next(iter.obj());) @@ -621,7 +621,7 @@ OopClosure* keep_alive, VoidClosure* complete_gc) { assert(!discovery_is_atomic(), "Error"); - DiscoveredListIterator iter(refs_list, keep_alive, is_alive); + DiscoveredListIterator iter(refs_list, keep_alive, is_alive, _discovered_list_needs_post_barrier); while (iter.has_next()) { iter.load_ptrs(DEBUG_ONLY(true /* allow_null_referent */)); HeapWord* next_addr = java_lang_ref_Reference::next_addr(iter.obj()); @@ -664,7 +664,7 @@ OopClosure* keep_alive, VoidClosure* complete_gc) { ResourceMark rm; - DiscoveredListIterator iter(refs_list, keep_alive, is_alive); + DiscoveredListIterator iter(refs_list, keep_alive, is_alive, _discovered_list_needs_post_barrier); while (iter.has_next()) { iter.update_discovered(); iter.load_ptrs(DEBUG_ONLY(false /* allow_null_referent */)); @@ -782,8 +782,8 @@ void ReferenceProcessor::set_discovered(oop ref, oop value) { java_lang_ref_Reference::set_discovered_raw(ref, value); - if (_discovered_list_needs_barrier) { - oopDesc::bs()->write_ref_field(ref, value); + if (_discovered_list_needs_post_barrier) { + oopDesc::bs()->write_ref_field(java_lang_ref_Reference::discovered_addr(ref), value); } } @@ -980,7 +980,7 @@ void ReferenceProcessor::clean_up_discovered_reflist(DiscoveredList& refs_list) { assert(!discovery_is_atomic(), "Else why call this method?"); - DiscoveredListIterator iter(refs_list, NULL, NULL); + DiscoveredListIterator iter(refs_list, NULL, NULL, _discovered_list_needs_post_barrier); while (iter.has_next()) { iter.load_ptrs(DEBUG_ONLY(true /* allow_null_referent */)); oop next = java_lang_ref_Reference::next(iter.obj()); @@ -1076,7 +1076,7 @@ // elided this out for G1, but left in the test for some future // collector that might have need for a pre-barrier here, e.g.:- // oopDesc::bs()->write_ref_field_pre((oop* or narrowOop*)discovered_addr, next_discovered); - assert(!_discovered_list_needs_barrier || UseG1GC, + assert(!_discovered_list_needs_post_barrier || UseG1GC, "Need to check non-G1 collector: " "may need a pre-write-barrier for CAS from NULL below"); oop retest = oopDesc::atomic_compare_exchange_oop(next_discovered, discovered_addr, @@ -1087,7 +1087,7 @@ // is necessary. refs_list.set_head(obj); refs_list.inc_length(1); - if (_discovered_list_needs_barrier) { + if (_discovered_list_needs_post_barrier) { oopDesc::bs()->write_ref_field((void*)discovered_addr, next_discovered); } @@ -1240,7 +1240,7 @@ if (_discovery_is_mt) { add_to_discovered_list_mt(*list, obj, discovered_addr); } else { - // If "_discovered_list_needs_barrier", we do write barriers when + // If "_discovered_list_needs_post_barrier", we do write barriers when // updating the discovered reference list. Otherwise, we do a raw store // here: the field will be visited later when processing the discovered // references. @@ -1252,10 +1252,10 @@ // pre-value, we can safely elide the pre-barrier here for the case of G1. // e.g.:- oopDesc::bs()->write_ref_field_pre((oop* or narrowOop*)discovered_addr, next_discovered); assert(discovered == NULL, "control point invariant"); - assert(!_discovered_list_needs_barrier || UseG1GC, + assert(!_discovered_list_needs_post_barrier || UseG1GC, "For non-G1 collector, may need a pre-write-barrier for CAS from NULL below"); oop_store_raw(discovered_addr, next_discovered); - if (_discovered_list_needs_barrier) { + if (_discovered_list_needs_post_barrier) { oopDesc::bs()->write_ref_field((void*)discovered_addr, next_discovered); } list->set_head(obj); @@ -1351,7 +1351,7 @@ OopClosure* keep_alive, VoidClosure* complete_gc, YieldClosure* yield) { - DiscoveredListIterator iter(refs_list, keep_alive, is_alive); + DiscoveredListIterator iter(refs_list, keep_alive, is_alive, _discovered_list_needs_post_barrier); while (iter.has_next()) { iter.load_ptrs(DEBUG_ONLY(true /* allow_null_referent */)); oop obj = iter.obj(); diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/memory/referenceProcessor.hpp --- a/hotspot/src/share/vm/memory/referenceProcessor.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/memory/referenceProcessor.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -99,6 +99,7 @@ oop _referent; OopClosure* _keep_alive; BoolObjectClosure* _is_alive; + bool _discovered_list_needs_post_barrier; DEBUG_ONLY( oop _first_seen; // cyclic linked list check @@ -112,7 +113,8 @@ public: inline DiscoveredListIterator(DiscoveredList& refs_list, OopClosure* keep_alive, - BoolObjectClosure* is_alive): + BoolObjectClosure* is_alive, + bool discovered_list_needs_post_barrier = false): _refs_list(refs_list), _prev_next(refs_list.adr_head()), _prev(NULL), @@ -126,7 +128,8 @@ #endif _next(NULL), _keep_alive(keep_alive), - _is_alive(is_alive) + _is_alive(is_alive), + _discovered_list_needs_post_barrier(discovered_list_needs_post_barrier) { } // End Of List. @@ -228,12 +231,12 @@ bool _discovery_is_mt; // true if reference discovery is MT. // If true, setting "next" field of a discovered refs list requires - // write barrier(s). (Must be true if used in a collector in which + // write post barrier. (Must be true if used in a collector in which // elements of a discovered list may be moved during discovery: for // example, a collector like Garbage-First that moves objects during a // long-term concurrent marking phase that does weak reference // discovery.) - bool _discovered_list_needs_barrier; + bool _discovered_list_needs_post_barrier; bool _enqueuing_is_done; // true if all weak references enqueued bool _processing_is_mt; // true during phases when @@ -380,8 +383,8 @@ protected: // Set the 'discovered' field of the given reference to - // the given value - emitting barriers depending upon - // the value of _discovered_list_needs_barrier. + // the given value - emitting post barriers depending upon + // the value of _discovered_list_needs_post_barrier. void set_discovered(oop ref, oop value); // "Preclean" the given discovered reference list @@ -425,7 +428,7 @@ bool mt_discovery = false, uint mt_discovery_degree = 1, bool atomic_discovery = true, BoolObjectClosure* is_alive_non_header = NULL, - bool discovered_list_needs_barrier = false); + bool discovered_list_needs_post_barrier = false); // RefDiscoveryPolicy values enum DiscoveryPolicy { diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/oops/constantPool.cpp --- a/hotspot/src/share/vm/oops/constantPool.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/oops/constantPool.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -82,6 +82,9 @@ void ConstantPool::deallocate_contents(ClassLoaderData* loader_data) { MetadataFactory::free_metadata(loader_data, cache()); set_cache(NULL); + MetadataFactory::free_array(loader_data, reference_map()); + set_reference_map(NULL); + MetadataFactory::free_array(loader_data, operands()); set_operands(NULL); diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/oops/instanceKlass.hpp --- a/hotspot/src/share/vm/oops/instanceKlass.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/oops/instanceKlass.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -554,6 +554,7 @@ if (hk == NULL) { return NULL; } else { + assert(*hk != NULL, "host klass should always be set if the address is not null"); return *hk; } } diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/oops/metadata.hpp --- a/hotspot/src/share/vm/oops/metadata.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/oops/metadata.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,7 +40,7 @@ int identity_hash() { return (int)(uintptr_t)this; } // Rehashing support for tables containing pointers to this - unsigned int new_hash(jint seed) { ShouldNotReachHere(); return 0; } + unsigned int new_hash(juint seed) { ShouldNotReachHere(); return 0; } virtual bool is_klass() const volatile { return false; } virtual bool is_method() const volatile { return false; } diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/oops/oop.cpp --- a/hotspot/src/share/vm/oops/oop.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/oops/oop.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -102,7 +102,7 @@ } // When String table needs to rehash -unsigned int oopDesc::new_hash(jint seed) { +unsigned int oopDesc::new_hash(juint seed) { EXCEPTION_MARK; ResourceMark rm; int length; diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/oops/oop.hpp --- a/hotspot/src/share/vm/oops/oop.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/oops/oop.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -362,7 +362,7 @@ intptr_t slow_identity_hash(); // Alternate hashing code if string table is rehashed - unsigned int new_hash(jint seed); + unsigned int new_hash(juint seed); // marks are forwarded to stack when object is locked bool has_displaced_mark() const; diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/oops/symbol.cpp --- a/hotspot/src/share/vm/oops/symbol.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/oops/symbol.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -207,7 +207,7 @@ } // Alternate hashing for unbalanced symbol tables. -unsigned int Symbol::new_hash(jint seed) { +unsigned int Symbol::new_hash(juint seed) { ResourceMark rm; // Use alternate hashing algorithm on this symbol. return AltHashing::murmur3_32(seed, (const jbyte*)as_C_string(), utf8_length()); diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/oops/symbol.hpp --- a/hotspot/src/share/vm/oops/symbol.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/oops/symbol.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -154,7 +154,7 @@ int identity_hash() { return _identity_hash; } // For symbol table alternate hashing - unsigned int new_hash(jint seed); + unsigned int new_hash(juint seed); // Reference counting. See comments above this class for when to use. int refcount() const { return _refcount; } diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/prims/jni.cpp --- a/hotspot/src/share/vm/prims/jni.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/prims/jni.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -1320,9 +1320,13 @@ // interface call KlassHandle h_holder(THREAD, holder); - int itbl_index = m->itable_index(); - Klass* k = h_recv->klass(); - selected_method = InstanceKlass::cast(k)->method_at_itable(h_holder(), itbl_index, CHECK); + if (call_type == JNI_VIRTUAL) { + int itbl_index = m->itable_index(); + Klass* k = h_recv->klass(); + selected_method = InstanceKlass::cast(k)->method_at_itable(h_holder(), itbl_index, CHECK); + } else { + selected_method = m; + } } } @@ -4950,8 +4954,10 @@ void TestMetachunk_test(); void TestVirtualSpaceNode_test(); void TestOldFreeSpaceCalculation_test(); +void TestNewSize_test(); #if INCLUDE_ALL_GCS void TestG1BiasedArray_test(); +void TestBufferingOopClosure_test(); #endif void execute_internal_vm_tests() { @@ -4971,12 +4977,14 @@ run_unit_test(AltHashing::test_alt_hash()); run_unit_test(test_loggc_filename()); run_unit_test(TestOldFreeSpaceCalculation_test()); + run_unit_test(TestNewSize_test()); #if INCLUDE_VM_STRUCTS run_unit_test(VMStructs::test()); #endif #if INCLUDE_ALL_GCS run_unit_test(TestG1BiasedArray_test()); run_unit_test(HeapRegionRemSet::test_prt()); + run_unit_test(TestBufferingOopClosure_test()); #endif tty->print_cr("All internal VM tests passed"); } diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/prims/jvm.cpp --- a/hotspot/src/share/vm/prims/jvm.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/prims/jvm.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -518,6 +518,12 @@ JavaThreadInObjectWaitState jtiows(thread, ms != 0); if (JvmtiExport::should_post_monitor_wait()) { JvmtiExport::post_monitor_wait((JavaThread *)THREAD, (oop)obj(), ms); + + // The current thread already owns the monitor and it has not yet + // been added to the wait queue so the current thread cannot be + // made the successor. This means that the JVMTI_EVENT_MONITOR_WAIT + // event handler cannot accidentally consume an unpark() meant for + // the ParkEvent associated with this ObjectMonitor. } ObjectSynchronizer::wait(obj, ms, CHECK); JVM_END @@ -2875,10 +2881,10 @@ if (JvmtiExport::should_post_resource_exhausted()) { JvmtiExport::post_resource_exhausted( JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR | JVMTI_RESOURCE_EXHAUSTED_THREADS, - "unable to create new native thread"); + os::native_thread_creation_failed_msg()); } THROW_MSG(vmSymbols::java_lang_OutOfMemoryError(), - "unable to create new native thread"); + os::native_thread_creation_failed_msg()); } Thread::start(native_thread); diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/prims/jvmtiCodeBlobEvents.cpp --- a/hotspot/src/share/vm/prims/jvmtiCodeBlobEvents.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/prims/jvmtiCodeBlobEvents.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -26,6 +26,7 @@ #include "code/codeBlob.hpp" #include "code/codeCache.hpp" #include "code/scopeDesc.hpp" +#include "code/vtableStubs.hpp" #include "memory/resourceArea.hpp" #include "oops/oop.inline.hpp" #include "prims/jvmtiCodeBlobEvents.hpp" @@ -63,6 +64,7 @@ // used during a collection static GrowableArray* _global_code_blobs; static void do_blob(CodeBlob* cb); + static void do_vtable_stub(VtableStub* vs); public: CodeBlobCollector() { _code_blobs = NULL; @@ -119,6 +121,10 @@ if (cb->is_nmethod()) { return; } + // exclude VtableStubs, which are processed separately + if (cb->is_buffer_blob() && strcmp(cb->name(), "vtable chunks") == 0) { + return; + } // check if this starting address has been seen already - the // assumption is that stubs are inserted into the list before the @@ -136,6 +142,13 @@ _global_code_blobs->append(scb); } +// called for each VtableStub in VtableStubs + +void CodeBlobCollector::do_vtable_stub(VtableStub* vs) { + JvmtiCodeBlobDesc* scb = new JvmtiCodeBlobDesc(vs->is_vtable_stub() ? "vtable stub" : "itable stub", + vs->code_begin(), vs->code_end()); + _global_code_blobs->append(scb); +} // collects a list of CodeBlobs in the CodeCache. // @@ -166,6 +179,10 @@ _global_code_blobs->append(new JvmtiCodeBlobDesc(desc->name(), desc->begin(), desc->end())); } + // Vtable stubs are not described with StubCodeDesc, + // process them separately + VtableStubs::vtable_stub_do(do_vtable_stub); + // next iterate over all the non-nmethod code blobs and add them to // the list - as noted above this will filter out duplicates and // enclosing blobs. diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/prims/jvmtiEnv.cpp --- a/hotspot/src/share/vm/prims/jvmtiEnv.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/prims/jvmtiEnv.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -1360,8 +1360,10 @@ if (state == NULL) { return JVMTI_ERROR_THREAD_NOT_ALIVE; } - uint32_t debug_bits = 0; - if (is_thread_fully_suspended(java_thread, true, &debug_bits)) { + + // It is only safe to perform the direct operation on the current + // thread. All other usage needs to use a vm-safepoint-op for safety. + if (java_thread == JavaThread::current()) { err = get_frame_count(state, count_ptr); } else { // get java stack frame count at safepoint. @@ -1476,9 +1478,10 @@ jvmtiError JvmtiEnv::GetFrameLocation(JavaThread* java_thread, jint depth, jmethodID* method_ptr, jlocation* location_ptr) { jvmtiError err = JVMTI_ERROR_NONE; - uint32_t debug_bits = 0; - - if (is_thread_fully_suspended(java_thread, true, &debug_bits)) { + + // It is only safe to perform the direct operation on the current + // thread. All other usage needs to use a vm-safepoint-op for safety. + if (java_thread == JavaThread::current()) { err = get_frame_location(java_thread, depth, method_ptr, location_ptr); } else { // JVMTI get java stack frame location at safepoint. diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/prims/jvmtiEnvBase.hpp --- a/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -533,7 +533,11 @@ VMOp_Type type() const { return VMOp_GetFrameCount; } jvmtiError result() { return _result; } void doit() { - _result = ((JvmtiEnvBase*)_env)->get_frame_count(_state, _count_ptr); + _result = JVMTI_ERROR_THREAD_NOT_ALIVE; + JavaThread* jt = _state->get_thread(); + if (Threads::includes(jt) && !jt->is_exiting() && jt->threadObj() != NULL) { + _result = ((JvmtiEnvBase*)_env)->get_frame_count(_state, _count_ptr); + } } }; @@ -559,8 +563,12 @@ VMOp_Type type() const { return VMOp_GetFrameLocation; } jvmtiError result() { return _result; } void doit() { - _result = ((JvmtiEnvBase*)_env)->get_frame_location(_java_thread, _depth, - _method_ptr, _location_ptr); + _result = JVMTI_ERROR_THREAD_NOT_ALIVE; + if (Threads::includes(_java_thread) && !_java_thread->is_exiting() && + _java_thread->threadObj() != NULL) { + _result = ((JvmtiEnvBase*)_env)->get_frame_location(_java_thread, _depth, + _method_ptr, _location_ptr); + } } }; diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/prims/jvmtiTagMap.cpp --- a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -2790,6 +2790,7 @@ return true; } +#ifdef ASSERT // verify that a static oop field is in range static inline bool verify_static_oop(InstanceKlass* ik, oop mirror, int offset) { @@ -2804,6 +2805,7 @@ return false; } } +#endif // #ifdef ASSERT // a class references its super class, interfaces, class loader, ... // and finally its static fields diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/prims/whitebox.cpp --- a/hotspot/src/share/vm/prims/whitebox.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/prims/whitebox.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -105,7 +105,7 @@ WB_ENTRY(void, WB_PrintHeapSizes(JNIEnv* env, jobject o)) { CollectorPolicy * p = Universe::heap()->collector_policy(); gclog_or_tty->print_cr("Minimum heap "SIZE_FORMAT" Initial heap " - SIZE_FORMAT" Maximum heap "SIZE_FORMAT" Min alignment "SIZE_FORMAT" Max alignment "SIZE_FORMAT, + SIZE_FORMAT" Maximum heap "SIZE_FORMAT" Space alignment "SIZE_FORMAT" Heap alignment "SIZE_FORMAT, p->min_heap_byte_size(), p->initial_heap_byte_size(), p->max_heap_byte_size(), p->space_alignment(), p->heap_alignment()); } diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/runtime/arguments.cpp --- a/hotspot/src/share/vm/runtime/arguments.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/runtime/arguments.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -101,7 +101,7 @@ const char* Arguments::_java_vendor_url_bug = DEFAULT_VENDOR_URL_BUG; const char* Arguments::_sun_java_launcher = DEFAULT_JAVA_LAUNCHER; int Arguments::_sun_java_launcher_pid = -1; -bool Arguments::_created_by_gamma_launcher = false; +bool Arguments::_sun_java_launcher_is_altjvm = false; // These parameters are reset in method parse_vm_init_args(JavaVMInitArgs*) bool Arguments::_AlwaysCompileLoopMethods = AlwaysCompileLoopMethods; @@ -151,7 +151,8 @@ // Process java launcher properties. void Arguments::process_sun_java_launcher_properties(JavaVMInitArgs* args) { - // See if sun.java.launcher or sun.java.launcher.pid is defined. + // See if sun.java.launcher, sun.java.launcher.is_altjvm or + // sun.java.launcher.pid is defined. // Must do this before setting up other system properties, // as some of them may depend on launcher type. for (int index = 0; index < args->nOptions; index++) { @@ -162,6 +163,12 @@ process_java_launcher_argument(tail, option->extraInfo); continue; } + if (match_option(option, "-Dsun.java.launcher.is_altjvm=", &tail)) { + if (strcmp(tail, "true") == 0) { + _sun_java_launcher_is_altjvm = true; + } + continue; + } if (match_option(option, "-Dsun.java.launcher.pid=", &tail)) { _sun_java_launcher_pid = atoi(tail); continue; @@ -1013,9 +1020,10 @@ _java_command = value; // Record value in Arguments, but let it get passed to Java. - } else if (strcmp(key, "sun.java.launcher.pid") == 0) { - // launcher.pid property is private and is processed - // in process_sun_java_launcher_properties(); + } else if (strcmp(key, "sun.java.launcher.is_altjvm") == 0 || + strcmp(key, "sun.java.launcher.pid") == 0) { + // sun.java.launcher.is_altjvm and sun.java.launcher.pid property are + // private and are processed in process_sun_java_launcher_properties(); // the sun.java.launcher property is passed on to the java application FreeHeap(key); if (eq != NULL) { @@ -1810,9 +1818,6 @@ void Arguments::process_java_launcher_argument(const char* launcher, void* extra_info) { _sun_java_launcher = strdup(launcher); - if (strcmp("gamma", _sun_java_launcher) == 0) { - _created_by_gamma_launcher = true; - } } bool Arguments::created_by_java_launcher() { @@ -1820,8 +1825,8 @@ return strcmp(DEFAULT_JAVA_LAUNCHER, _sun_java_launcher) != 0; } -bool Arguments::created_by_gamma_launcher() { - return _created_by_gamma_launcher; +bool Arguments::sun_java_launcher_is_altjvm() { + return _sun_java_launcher_is_altjvm; } //=========================================================================================================== @@ -3809,32 +3814,28 @@ } } - // set PauseAtExit if the gamma launcher was used and a debugger is attached - // but only if not already set on the commandline - if (Arguments::created_by_gamma_launcher() && os::is_debugger_attached()) { - bool set = false; - CommandLineFlags::wasSetOnCmdline("PauseAtExit", &set); - if (!set) { - FLAG_SET_DEFAULT(PauseAtExit, true); - } - } - return JNI_OK; } jint Arguments::adjust_after_os() { -#if INCLUDE_ALL_GCS - if (UseParallelGC || UseParallelOldGC) { - if (UseNUMA) { + if (UseNUMA) { + if (UseParallelGC || UseParallelOldGC) { if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) { - FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M); + FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M); } - // For those collectors or operating systems (eg, Windows) that do - // not support full UseNUMA, we will map to UseNUMAInterleaving for now - UseNUMAInterleaving = true; + } + // UseNUMAInterleaving is set to ON for all collectors and + // platforms when UseNUMA is set to ON. NUMA-aware collectors + // such as the parallel collector for Linux and Solaris will + // interleave old gen and survivor spaces on top of NUMA + // allocation policy for the eden space. + // Non NUMA-aware collectors such as CMS, G1 and Serial-GC on + // all platforms and ParallelGC on Windows will interleave all + // of the heap spaces across NUMA nodes. + if (FLAG_IS_DEFAULT(UseNUMAInterleaving)) { + FLAG_SET_ERGO(bool, UseNUMAInterleaving, true); } } -#endif // INCLUDE_ALL_GCS return JNI_OK; } diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/runtime/arguments.hpp --- a/hotspot/src/share/vm/runtime/arguments.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/runtime/arguments.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -269,14 +269,14 @@ static const char* _java_vendor_url_bug; // sun.java.launcher, private property to provide information about - // java/gamma launcher + // java launcher static const char* _sun_java_launcher; // sun.java.launcher.pid, private property static int _sun_java_launcher_pid; - // was this VM created by the gamma launcher - static bool _created_by_gamma_launcher; + // was this VM created via the -XXaltjvm= option + static bool _sun_java_launcher_is_altjvm; // Option flags static bool _has_profile; @@ -498,8 +498,8 @@ static const char* sun_java_launcher() { return _sun_java_launcher; } // Was VM created by a Java launcher? static bool created_by_java_launcher(); - // Was VM created by the gamma Java launcher? - static bool created_by_gamma_launcher(); + // -Dsun.java.launcher.is_altjvm + static bool sun_java_launcher_is_altjvm(); // -Dsun.java.launcher.pid static int sun_java_launcher_pid() { return _sun_java_launcher_pid; } diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/runtime/globals.hpp --- a/hotspot/src/share/vm/runtime/globals.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/runtime/globals.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -565,7 +565,7 @@ "Force NUMA optimizations on single-node/UMA systems") \ \ product(uintx, NUMAChunkResizeWeight, 20, \ - "Percentage (0-100) used to weigh the current sample when " \ + "Percentage (0-100) used to weight the current sample when " \ "computing exponentially decaying average for " \ "AdaptiveNUMAChunkSizing") \ \ @@ -1260,6 +1260,9 @@ develop(bool, TraceJNICalls, false, \ "Trace JNI calls") \ \ + develop(bool, StressRewriter, false, \ + "Stress linktime bytecode rewriting") \ + \ notproduct(bool, TraceJVMCalls, false, \ "Trace JVM calls") \ \ @@ -1502,7 +1505,7 @@ "allocation") \ \ product(uintx, PLABWeight, 75, \ - "Percentage (0-100) used to weigh the current sample when " \ + "Percentage (0-100) used to weight the current sample when " \ "computing exponentially decaying average for ResizePLAB") \ \ product(bool, ResizePLAB, true, \ @@ -1611,11 +1614,11 @@ "is shifted to the right within the period between young GCs") \ \ product(uintx, CMSExpAvgFactor, 50, \ - "Percentage (0-100) used to weigh the current sample when " \ + "Percentage (0-100) used to weight the current sample when " \ "computing exponential averages for CMS statistics") \ \ product(uintx, CMS_FLSWeight, 75, \ - "Percentage (0-100) used to weigh the current sample when " \ + "Percentage (0-100) used to weight the current sample when " \ "computing exponentially decaying averages for CMS FLS " \ "statistics") \ \ @@ -1727,19 +1730,15 @@ "to simulate overflow; a smaller number increases frequency") \ \ product(uintx, CMSMaxAbortablePrecleanLoops, 0, \ - "(Temporary, subject to experimentation) " \ "Maximum number of abortable preclean iterations, if > 0") \ \ product(intx, CMSMaxAbortablePrecleanTime, 5000, \ - "(Temporary, subject to experimentation) " \ "Maximum time in abortable preclean (in milliseconds)") \ \ product(uintx, CMSAbortablePrecleanMinWorkPerIteration, 100, \ - "(Temporary, subject to experimentation) " \ "Nominal minimum work per abortable preclean iteration") \ \ manageable(intx, CMSAbortablePrecleanWaitMillis, 100, \ - "(Temporary, subject to experimentation) " \ "Time that we sleep between iterations when not given " \ "enough work per iteration") \ \ @@ -1955,13 +1954,13 @@ "(other young collectors)") \ \ develop(uintx, PromotionFailureALotInterval, 5, \ - "Total collections between promotion failures alot") \ + "Total collections between promotion failures a lot") \ \ experimental(uintx, WorkStealingSleepMillis, 1, \ "Sleep time when sleep is used for yields") \ \ experimental(uintx, WorkStealingYieldsBeforeSleep, 5000, \ - "Number of yields before a sleep is done during workstealing") \ + "Number of yields before a sleep is done during work stealing") \ \ experimental(uintx, WorkStealingHardSpins, 4096, \ "Number of iterations in a spin loop between checks on " \ @@ -2039,7 +2038,7 @@ "size; deprecated: to be renamed to MaxRAMFraction") \ \ product(uintx, MinRAMFraction, 2, \ - "Minimum fraction (1/n) of real memory used for maxmimum heap " \ + "Minimum fraction (1/n) of real memory used for maximum heap " \ "size on systems with small physical memory size") \ \ product(uintx, InitialRAMFraction, 64, \ diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/runtime/javaCalls.cpp --- a/hotspot/src/share/vm/runtime/javaCalls.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/runtime/javaCalls.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -337,7 +337,7 @@ // A klass might not be initialized since JavaCall's might be used during the executing of // the . For example, a Thread.start might start executing on an object that is // not fully initialized! (bad Java programming style) - assert(holder->is_linked(), "rewritting must have taken place"); + assert(holder->is_linked(), "rewriting must have taken place"); } #endif diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/runtime/mutex.cpp --- a/hotspot/src/share/vm/runtime/mutex.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/runtime/mutex.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -280,16 +280,6 @@ return x & 0x7FFFFFFF ; } -static inline jint MarsagliaXOR (jint * const a) { - jint x = *a ; - if (x == 0) x = UNS(a)|1 ; - x ^= x << 6; - x ^= ((unsigned)x) >> 21; - x ^= x << 7 ; - *a = x ; - return x & 0x7FFFFFFF ; -} - static int Stall (int its) { static volatile jint rv = 1 ; volatile int OnFrame = 0 ; diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/runtime/objectMonitor.cpp --- a/hotspot/src/share/vm/runtime/objectMonitor.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/runtime/objectMonitor.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -382,6 +382,12 @@ DTRACE_MONITOR_PROBE(contended__enter, this, object(), jt); if (JvmtiExport::should_post_monitor_contended_enter()) { JvmtiExport::post_monitor_contended_enter(jt, this); + + // The current thread does not yet own the monitor and does not + // yet appear on any queues that would get it made the successor. + // This means that the JVMTI_EVENT_MONITOR_CONTENDED_ENTER event + // handler cannot accidentally consume an unpark() meant for the + // ParkEvent associated with this ObjectMonitor. } OSThreadContendState osts(Self->osthread()); @@ -439,6 +445,12 @@ DTRACE_MONITOR_PROBE(contended__entered, this, object(), jt); if (JvmtiExport::should_post_monitor_contended_entered()) { JvmtiExport::post_monitor_contended_entered(jt, this); + + // The current thread already owns the monitor and is not going to + // call park() for the remainder of the monitor enter protocol. So + // it doesn't matter if the JVMTI_EVENT_MONITOR_CONTENDED_ENTERED + // event handler consumed an unpark() issued by the thread that + // just exited the monitor. } if (event.should_commit()) { @@ -1456,6 +1468,14 @@ // Note: 'false' parameter is passed here because the // wait was not timed out due to thread interrupt. JvmtiExport::post_monitor_waited(jt, this, false); + + // In this short circuit of the monitor wait protocol, the + // current thread never drops ownership of the monitor and + // never gets added to the wait queue so the current thread + // cannot be made the successor. This means that the + // JVMTI_EVENT_MONITOR_WAITED event handler cannot accidentally + // consume an unpark() meant for the ParkEvent associated with + // this ObjectMonitor. } if (event.should_commit()) { post_monitor_wait_event(&event, 0, millis, false); @@ -1499,21 +1519,6 @@ exit (true, Self) ; // exit the monitor guarantee (_owner != Self, "invariant") ; - // As soon as the ObjectMonitor's ownership is dropped in the exit() - // call above, another thread can enter() the ObjectMonitor, do the - // notify(), and exit() the ObjectMonitor. If the other thread's - // exit() call chooses this thread as the successor and the unpark() - // call happens to occur while this thread is posting a - // MONITOR_CONTENDED_EXIT event, then we run the risk of the event - // handler using RawMonitors and consuming the unpark(). - // - // To avoid the problem, we re-post the event. This does no harm - // even if the original unpark() was not consumed because we are the - // chosen successor for this monitor. - if (node._notified != 0 && _succ == Self) { - node._event->unpark(); - } - // The thread is on the WaitSet list - now park() it. // On MP systems it's conceivable that a brief spin before we park // could be profitable. @@ -1595,6 +1600,25 @@ // post monitor waited event. Note that this is past-tense, we are done waiting. if (JvmtiExport::should_post_monitor_waited()) { JvmtiExport::post_monitor_waited(jt, this, ret == OS_TIMEOUT); + + if (node._notified != 0 && _succ == Self) { + // In this part of the monitor wait-notify-reenter protocol it + // is possible (and normal) for another thread to do a fastpath + // monitor enter-exit while this thread is still trying to get + // to the reenter portion of the protocol. + // + // The ObjectMonitor was notified and the current thread is + // the successor which also means that an unpark() has already + // been done. The JVMTI_EVENT_MONITOR_WAITED event handler can + // consume the unpark() that was done when the successor was + // set because the same ParkEvent is shared between Java + // monitors and JVM/TI RawMonitors (for now). + // + // We redo the unpark() to ensure forward progress, i.e., we + // don't want all pending threads hanging (parked) with none + // entering the unlocked monitor. + node._event->unpark(); + } } if (event.should_commit()) { diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/runtime/os.cpp --- a/hotspot/src/share/vm/runtime/os.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/runtime/os.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -362,7 +362,7 @@ // exceptions anyway, check and abort if this fails. if (signal_thread == NULL || signal_thread->osthread() == NULL) { vm_exit_during_initialization("java.lang.OutOfMemoryError", - "unable to create new native thread"); + os::native_thread_creation_failed_msg()); } java_lang_Thread::set_thread(thread_oop(), signal_thread); @@ -1197,7 +1197,7 @@ char fileSep, char pathSep) { assert((fileSep == '/' && pathSep == ':') || - (fileSep == '\\' && pathSep == ';'), "unexpected seperator chars"); + (fileSep == '\\' && pathSep == ';'), "unexpected separator chars"); // Scan the format string to determine the length of the actual // boot classpath, and handle platform dependencies as well. diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/runtime/os.hpp --- a/hotspot/src/share/vm/runtime/os.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/runtime/os.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -807,6 +807,10 @@ # include "os_bsd_zero.hpp" #endif +#ifndef OS_NATIVE_THREAD_CREATION_FAILED_MSG +#define OS_NATIVE_THREAD_CREATION_FAILED_MSG "unable to create native thread: possibly out of memory or process/resource limits reached" +#endif + public: #ifndef PLATFORM_PRINT_NATIVE_STACK // No platform-specific code for printing the native stack. @@ -829,6 +833,9 @@ // Hint to the underlying OS that a task switch would not be good. // Void return because it's a hint and can fail. static void hint_no_preempt(); + static const char* native_thread_creation_failed_msg() { + return OS_NATIVE_THREAD_CREATION_FAILED_MSG; + } // Used at creation if requested by the diagnostic flag PauseAtStartup. // Causes the VM to wait until an external stimulus has been applied diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/runtime/serviceThread.cpp --- a/hotspot/src/share/vm/runtime/serviceThread.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/runtime/serviceThread.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -27,6 +27,7 @@ #include "runtime/javaCalls.hpp" #include "runtime/serviceThread.hpp" #include "runtime/mutexLocker.hpp" +#include "runtime/os.hpp" #include "prims/jvmtiImpl.hpp" #include "services/gcNotifier.hpp" #include "services/diagnosticArgument.hpp" @@ -66,7 +67,7 @@ // exceptions anyway, check and abort if this fails. if (thread == NULL || thread->osthread() == NULL) { vm_exit_during_initialization("java.lang.OutOfMemoryError", - "unable to create new native thread"); + os::native_thread_creation_failed_msg()); } java_lang_Thread::set_thread(thread_oop(), thread); diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/runtime/synchronizer.cpp --- a/hotspot/src/share/vm/runtime/synchronizer.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/runtime/synchronizer.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -373,23 +373,24 @@ // ----------------------------------------------------------------------------- // Wait/Notify/NotifyAll // NOTE: must use heavy weight monitor to handle wait() -void ObjectSynchronizer::wait(Handle obj, jlong millis, TRAPS) { +int ObjectSynchronizer::wait(Handle obj, jlong millis, TRAPS) { if (UseBiasedLocking) { BiasedLocking::revoke_and_rebias(obj, false, THREAD); assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); } if (millis < 0) { TEVENT (wait - throw IAX) ; - THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "timeout value is negative"); + THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), "timeout value is negative"); } ObjectMonitor* monitor = ObjectSynchronizer::inflate(THREAD, obj()); DTRACE_MONITOR_WAIT_PROBE(monitor, obj(), THREAD, millis); monitor->wait(millis, true, THREAD); - /* This dummy call is in place to get around dtrace bug 6254741. Once - that's fixed we can uncomment the following line and remove the call */ + // This dummy call is in place to get around dtrace bug 6254741. Once + // that's fixed we can uncomment the following line, remove the call + // and change this function back into a "void" func. // DTRACE_MONITOR_PROBE(waited, monitor, obj(), THREAD); - dtrace_waited_probe(monitor, obj, THREAD); + return dtrace_waited_probe(monitor, obj, THREAD); } void ObjectSynchronizer::waitUninterruptibly (Handle obj, jlong millis, TRAPS) { diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/runtime/synchronizer.hpp --- a/hotspot/src/share/vm/runtime/synchronizer.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/runtime/synchronizer.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -68,7 +68,7 @@ static void jni_exit (oop obj, Thread* THREAD); // Handle all interpreter, compiler and jni cases - static void wait (Handle obj, jlong millis, TRAPS); + static int wait (Handle obj, jlong millis, TRAPS); static void notify (Handle obj, TRAPS); static void notifyall (Handle obj, TRAPS); diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/runtime/virtualspace.cpp --- a/hotspot/src/share/vm/runtime/virtualspace.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/runtime/virtualspace.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -215,9 +215,9 @@ noaccess_prefix == _alignment, "noaccess prefix wrong"); assert(markOopDesc::encode_pointer_as_mark(_base)->decode_pointer() == _base, - "area must be distinguisable from marks for mark-sweep"); + "area must be distinguishable from marks for mark-sweep"); assert(markOopDesc::encode_pointer_as_mark(&_base[size])->decode_pointer() == &_base[size], - "area must be distinguisable from marks for mark-sweep"); + "area must be distinguishable from marks for mark-sweep"); } diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/services/attachListener.cpp --- a/hotspot/src/share/vm/services/attachListener.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/services/attachListener.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -532,7 +532,7 @@ // Check that thread and osthread were created if (listener_thread == NULL || listener_thread->osthread() == NULL) { vm_exit_during_initialization("java.lang.OutOfMemoryError", - "unable to create new native thread"); + os::native_thread_creation_failed_msg()); } java_lang_Thread::set_thread(thread_oop(), listener_thread); diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/utilities/array.hpp --- a/hotspot/src/share/vm/utilities/array.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/utilities/array.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -58,7 +58,7 @@ void initialize(size_t esize, int length) { assert(length >= 0, "illegal length"); - assert(_data == NULL, "must be new object"); + assert(StressRewriter || _data == NULL, "must be new object"); _length = length; _data = resource_allocate_bytes(esize * length); DEBUG_ONLY(init_nesting();) diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/utilities/bitMap.cpp --- a/hotspot/src/share/vm/utilities/bitMap.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/utilities/bitMap.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -107,7 +107,7 @@ while (true) { intptr_t res = Atomic::cmpxchg_ptr(nw, pw, w); if (res == w) break; - w = *pw; + w = res; nw = value ? (w | ~mr) : (w & mr); } } diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/utilities/dtrace.hpp --- a/hotspot/src/share/vm/utilities/dtrace.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/utilities/dtrace.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -38,23 +38,19 @@ #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() \ do { volatile size_t dtrace_workaround_tail_call_bug = 1; } while (0) +#elif defined(LINUX) +#define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() +#elif defined(__APPLE__) +#define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() +#include +#else +#error "dtrace enabled for unknown os" +#endif /* defined(SOLARIS) */ + #define USDT2 1 #include "dtracefiles/hotspot.h" #include "dtracefiles/hotspot_jni.h" #include "dtracefiles/hs_private.h" -#elif defined(LINUX) -#define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() -#define USDT1 1 -#elif defined(__APPLE__) -#define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() -#define USDT2 1 -#include -#include "dtracefiles/hotspot.h" -#include "dtracefiles/hotspot_jni.h" -#include "dtracefiles/hs_private.h" -#else -#error "dtrace enabled for unknown os" -#endif /* defined(SOLARIS) */ #else /* defined(DTRACE_ENABLED) */ diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/utilities/hashtable.cpp --- a/hotspot/src/share/vm/utilities/hashtable.cpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/utilities/hashtable.cpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -93,7 +93,7 @@ return false; } -template jint Hashtable::_seed = 0; +template juint Hashtable::_seed = 0; // Create a new table and using alternate hash code, populate the new table // with the existing elements. This can be used to change the hash code diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/src/share/vm/utilities/hashtable.hpp --- a/hotspot/src/share/vm/utilities/hashtable.hpp Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/src/share/vm/utilities/hashtable.hpp Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -280,7 +280,7 @@ // Function to move these elements into the new table. void move_to(Hashtable* new_table); static bool use_alternate_hashcode() { return _seed != 0; } - static jint seed() { return _seed; } + static juint seed() { return _seed; } static int literal_size(Symbol *symbol); static int literal_size(oop oop); @@ -296,7 +296,7 @@ void dump_table(outputStream* st, const char *table_name); private: - static jint _seed; + static juint _seed; }; diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/test/gc/TestVerifySilently.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hotspot/test/gc/TestVerifySilently.java Mon Feb 24 12:56:19 2014 -0800 @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test TestVerifySilently.java + * @key gc + * @bug 8032771 + * @summary Test silent verification. + * @library /testlibrary + */ + +import com.oracle.java.testlibrary.OutputAnalyzer; +import com.oracle.java.testlibrary.ProcessTools; +import java.util.ArrayList; +import java.util.Collections; + +class RunSystemGC { + public static void main(String args[]) throws Exception { + System.gc(); + } +} + + +public class TestVerifySilently { + private static String[] getTestJavaOpts() { + String testVmOptsStr = System.getProperty("test.java.opts"); + if (!testVmOptsStr.isEmpty()) { + return testVmOptsStr.split(" "); + } else { + return new String[] {}; + } + } + + private static OutputAnalyzer runTest(boolean verifySilently) throws Exception { + ArrayList vmOpts = new ArrayList(); + + Collections.addAll(vmOpts, getTestJavaOpts()); + Collections.addAll(vmOpts, new String[] {"-XX:+UnlockDiagnosticVMOptions", + "-XX:+VerifyDuringStartup", + "-XX:+VerifyBeforeGC", + "-XX:+VerifyAfterGC", + "-XX:" + (verifySilently ? "+":"-") + "VerifySilently", + RunSystemGC.class.getName()}); + ProcessBuilder pb = + ProcessTools.createJavaProcessBuilder(vmOpts.toArray(new String[vmOpts.size()])); + OutputAnalyzer output = new OutputAnalyzer(pb.start()); + + System.out.println("Output:\n" + output.getOutput()); + return output; + } + + + public static void main(String args[]) throws Exception { + + OutputAnalyzer output; + + output = runTest(false); + output.shouldContain("[Verifying"); + output.shouldHaveExitValue(0); + + output = runTest(true); + output.shouldNotContain("[Verifying"); + output.shouldHaveExitValue(0); + } +} diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/test/gc/arguments/TestMaxHeapSizeTools.java --- a/hotspot/test/gc/arguments/TestMaxHeapSizeTools.java Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/test/gc/arguments/TestMaxHeapSizeTools.java Mon Feb 24 12:56:19 2014 -0800 @@ -41,8 +41,8 @@ public long initialHeapSize; public long maxHeapSize; - public long minAlignment; - public long maxAlignment; + public long spaceAlignment; + public long heapAlignment; } class TestMaxHeapSizeTools { @@ -192,7 +192,7 @@ // Unfortunately there is no other way to retrieve the minimum heap size and // the alignments. - Matcher m = Pattern.compile("Minimum heap \\d+ Initial heap \\d+ Maximum heap \\d+ Min alignment \\d+ Max alignment \\d+"). + Matcher m = Pattern.compile("Minimum heap \\d+ Initial heap \\d+ Maximum heap \\d+ Space alignment \\d+ Heap alignment \\d+"). matcher(output.getStdout()); if (!m.find()) { throw new RuntimeException("Could not find heap size string."); @@ -204,8 +204,8 @@ val.minHeapSize = valueAfter(match, "Minimum heap "); val.initialHeapSize = valueAfter(match, "Initial heap "); val.maxHeapSize = valueAfter(match, "Maximum heap "); - val.minAlignment = valueAfter(match, "Min alignment "); - val.maxAlignment = valueAfter(match, "Max alignment "); + val.spaceAlignment = valueAfter(match, "Space alignment "); + val.heapAlignment = valueAfter(match, "Heap alignment "); } /** @@ -218,12 +218,12 @@ MinInitialMaxValues v = new MinInitialMaxValues(); getMinInitialMaxHeap(args, v); - if ((expectedMin != -1) && (align_up(expectedMin, v.minAlignment) != v.minHeapSize)) { + if ((expectedMin != -1) && (align_up(expectedMin, v.heapAlignment) != v.minHeapSize)) { throw new RuntimeException("Actual minimum heap size of " + v.minHeapSize + " differs from expected minimum heap size of " + expectedMin); } - if ((expectedInitial != -1) && (align_up(expectedInitial, v.minAlignment) != v.initialHeapSize)) { + if ((expectedInitial != -1) && (align_up(expectedInitial, v.heapAlignment) != v.initialHeapSize)) { throw new RuntimeException("Actual initial heap size of " + v.initialHeapSize + " differs from expected initial heap size of " + expectedInitial); } @@ -247,7 +247,7 @@ MinInitialMaxValues v = new MinInitialMaxValues(); getMinInitialMaxHeap(new String[] { gcflag, "-XX:MaxHeapSize=" + maxHeapsize + "M" }, v); - long expectedHeapSize = align_up(maxHeapsize * K * K, v.maxAlignment); + long expectedHeapSize = align_up(maxHeapsize * K * K, v.heapAlignment); long actualHeapSize = v.maxHeapSize; if (actualHeapSize > expectedHeapSize) { diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/test/runtime/ClassFile/UnsupportedClassFileVersion.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hotspot/test/runtime/ClassFile/UnsupportedClassFileVersion.java Mon Feb 24 12:56:19 2014 -0800 @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @library /testlibrary + * @compile -XDignore.symbol.file UnsupportedClassFileVersion.java + * @run main UnsupportedClassFileVersion + */ + +import java.io.File; +import java.io.FileOutputStream; +import jdk.internal.org.objectweb.asm.ClassWriter; +import jdk.internal.org.objectweb.asm.MethodVisitor; +import jdk.internal.org.objectweb.asm.Opcodes; +import com.oracle.java.testlibrary.*; + +public class UnsupportedClassFileVersion implements Opcodes { + public static void main(String... args) throws Exception { + writeClassFile(); + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, "-cp", ".", "ClassFile"); + OutputAnalyzer output = new OutputAnalyzer(pb.start()); + output.shouldContain("ClassFile has been compiled by a more recent version of the " + + "Java Runtime (class file version 99.0), this version of " + + "the Java Runtime only recognizes class file versions up to " + + System.getProperty("java.class.version")); + + output.shouldHaveExitValue(1); + } + + public static void writeClassFile() throws Exception { + ClassWriter cw = new ClassWriter(0); + MethodVisitor mv; + + cw.visit(99, ACC_PUBLIC + ACC_SUPER, "ClassFile", null, "java/lang/Object", null); + mv = cw.visitMethod(ACC_PUBLIC, "", "()V", null, null); + mv.visitCode(); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "", "()V", false); + mv.visitInsn(RETURN); + mv.visitMaxs(1, 1); + mv.visitEnd(); + cw.visitEnd(); + + try (FileOutputStream fos = new FileOutputStream(new File("ClassFile.class"))) { + fos.write(cw.toByteArray()); + } + } +} diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/test/runtime/RedefineObject/Agent.java --- a/hotspot/test/runtime/RedefineObject/Agent.java Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/test/runtime/RedefineObject/Agent.java Mon Feb 24 12:56:19 2014 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -65,8 +65,8 @@ public static void main(String[] args) { byte[] ba = new byte[0]; - // If it survives 1000 GC's, it's good. - for (int i = 0; i < 1000 ; i++) { + // If it survives 100 GC's, it's good. + for (int i = 0; i < 100 ; i++) { System.gc(); ba.clone(); } diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/test/runtime/lambda-features/InvokespecialInterface.java --- a/hotspot/test/runtime/lambda-features/InvokespecialInterface.java Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/test/runtime/lambda-features/InvokespecialInterface.java Mon Feb 24 12:56:19 2014 -0800 @@ -26,8 +26,9 @@ * @test * @bug 8032024 * @bug 8025937 + * @bug 8033528 * @summary [JDK 8] Test invokespecial and invokeinterface with the same JVM_CONSTANT_InterfaceMethodref - * @run main InvokespecialInterface + * @run main/othervm -XX:+StressRewriter InvokespecialInterface */ import java.util.function.*; import java.util.*; diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/test/runtime/lambda-features/TestConcreteClassWithAbstractMethod.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hotspot/test/runtime/lambda-features/TestConcreteClassWithAbstractMethod.java Mon Feb 24 12:56:19 2014 -0800 @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * @test + * @bug 8032010 + * @summary method lookup on an abstract method in a concrete class should be successful + * @run main TestConcreteClassWithAbstractMethod + */ + +import jdk.internal.org.objectweb.asm.ClassWriter; +import jdk.internal.org.objectweb.asm.MethodVisitor; + +import static jdk.internal.org.objectweb.asm.Opcodes.*; + +/* + * class T1 { public int m() {} } + * class T2 { public abstract int m(); } + * class T3 { public int m() {} } + * + * Call site: T3.test() { invokevirtual T2.m() } + * T3.m() should be invoked + */ +public class TestConcreteClassWithAbstractMethod { + static final String classT1 = "p1.T1"; + static final String classT2 = "p1.T2"; + static final String classT3 = "p1.T3"; + + static final String callerName = classT3; + + public static void main(String[] args) throws Exception { + ClassLoader cl = new ClassLoader() { + public Class loadClass(String name) throws ClassNotFoundException { + if (findLoadedClass(name) != null) { + return findLoadedClass(name); + } + + if (classT1.equals(name)) { + byte[] classFile = dumpT1(); + return defineClass(classT1, classFile, 0, classFile.length); + } + if (classT2.equals(name)) { + byte[] classFile = dumpT2(); + return defineClass(classT2, classFile, 0, classFile.length); + } + if (classT3.equals(name)) { + byte[] classFile = dumpT3(); + return defineClass(classT3, classFile, 0, classFile.length); + } + + return super.loadClass(name); + } + }; + + cl.loadClass(classT1); + cl.loadClass(classT2); + cl.loadClass(classT3); + + //cl.loadClass(callerName).getDeclaredMethod("m"); + cl.loadClass(callerName).newInstance(); + + int result = (Integer)cl.loadClass(callerName).getDeclaredMethod("test").invoke(null); + System.out.println(""+result); + } + + public static byte[] dumpT1() { + ClassWriter cw = new ClassWriter(0); + MethodVisitor mv; + + cw.visit(52, ACC_PUBLIC | ACC_SUPER, "p1/T1", null, "java/lang/Object", null); + { + mv = cw.visitMethod(ACC_PUBLIC, "", "()V", null, null); + mv.visitCode(); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "", "()V", false); + mv.visitInsn(RETURN); + mv.visitMaxs(1, 1); + mv.visitEnd(); + } + { + mv = cw.visitMethod(ACC_PUBLIC, "m", "()I", null, null); + mv.visitCode(); + mv.visitFieldInsn(GETSTATIC, "java/lang/System", "out", "Ljava/io/PrintStream;"); + mv.visitLdcInsn("p1/T1.m()"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "print", "(Ljava/lang/String;)V", false); + mv.visitIntInsn(BIPUSH, 3); + mv.visitInsn(IRETURN); + mv.visitMaxs(2, 1); + mv.visitEnd(); + } + cw.visitEnd(); + + return cw.toByteArray(); + } + + public static byte[] dumpT2() { + ClassWriter cw = new ClassWriter(0); + MethodVisitor mv; + + cw.visit(52, ACC_PUBLIC | ACC_SUPER, "p1/T2", null, "p1/T1", null); + { + mv = cw.visitMethod(ACC_PUBLIC, "", "()V", null, null); + mv.visitCode(); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESPECIAL, "p1/T1", "", "()V", false); + mv.visitInsn(RETURN); + mv.visitMaxs(1, 1); + mv.visitEnd(); + } + { + mv = cw.visitMethod(ACC_PUBLIC + ACC_ABSTRACT, "m", "()I", null, null); + mv.visitEnd(); + } + cw.visitEnd(); + + return cw.toByteArray(); + } + + public static byte[] dumpT3() { + ClassWriter cw = new ClassWriter(0); + MethodVisitor mv; + + cw.visit(52, ACC_PUBLIC + ACC_SUPER, "p1/T3", null, "p1/T2", null); + + { + mv = cw.visitMethod(ACC_PUBLIC, "", "()V", null, null); + mv.visitCode(); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESPECIAL, "p1/T2", "", "()V", false); + mv.visitInsn(RETURN); + mv.visitMaxs(1, 1); + mv.visitEnd(); + } + { + mv = cw.visitMethod(ACC_PUBLIC, "m", "()I", null, null); + mv.visitCode(); + mv.visitFieldInsn(GETSTATIC, "java/lang/System", "out", "Ljava/io/PrintStream;"); + mv.visitLdcInsn("p1/T3.m()"); + mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "print", "(Ljava/lang/String;)V", false); + mv.visitIntInsn(BIPUSH, 2); + mv.visitInsn(IRETURN); + mv.visitMaxs(2, 1); + mv.visitEnd(); + } + { + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "test", "()I", null, null); + mv.visitCode(); + mv.visitTypeInsn(NEW, "p1/T3"); + mv.visitInsn(DUP); + mv.visitMethodInsn(INVOKESPECIAL, "p1/T3", "", "()V", false); + mv.visitMethodInsn(INVOKEVIRTUAL, "p1/T2", "m", "()I", false); + mv.visitInsn(IRETURN); + mv.visitMaxs(3, 2); + mv.visitEnd(); + } + cw.visitEnd(); + + return cw.toByteArray(); + } +} diff -r 69f01034d3d7 -r 6fe3b02842f6 hotspot/test/testlibrary/com/oracle/java/testlibrary/ProcessTools.java --- a/hotspot/test/testlibrary/com/oracle/java/testlibrary/ProcessTools.java Fri Feb 21 11:39:47 2014 -0800 +++ b/hotspot/test/testlibrary/com/oracle/java/testlibrary/ProcessTools.java Mon Feb 24 12:56:19 2014 -0800 @@ -142,11 +142,23 @@ * with any platform specific arguments prepended */ public static ProcessBuilder createJavaProcessBuilder(String... command) throws Exception { + return createJavaProcessBuilder(false, command); + } + + public static ProcessBuilder createJavaProcessBuilder(boolean addTestVmOptions, String... command) throws Exception { String javapath = JDKToolFinder.getJDKTool("java"); ArrayList args = new ArrayList<>(); args.add(javapath); Collections.addAll(args, getPlatformSpecificVMArgs()); + + if (addTestVmOptions) { + String vmopts = System.getProperty("test.vm.opts"); + if (vmopts != null) { + Collections.addAll(args, vmopts.split("\\s")); + } + } + Collections.addAll(args, command); // Reporting @@ -157,5 +169,4 @@ return new ProcessBuilder(args.toArray(new String[args.size()])); } - }