diff -Nru openjdk-lts-11.0.3+7/debian/changelog openjdk-lts-11.0.4+11/debian/changelog --- openjdk-lts-11.0.3+7/debian/changelog 2019-04-23 18:34:35.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/changelog 2019-07-18 18:21:46.000000000 +0000 @@ -1,40 +1,211 @@ -openjdk-lts (11.0.3+7-1ubuntu2~18.04.1) bionic-security; urgency=medium +openjdk-lts (11.0.4+11-1ubuntu2~18.04.3) bionic-security; urgency=medium * Backport from Eoan. - * debian/rules: remove vendor flags from configure as they are breaking - Libre Office. - * debian/tests/jtreg-autopkgtest.sh: fix jdk default path to point to - openjdk-11. - - -- Tiago Stürmer Daitx Tue, 23 Apr 2019 18:34:35 +0000 - -openjdk-lts (11.0.3+7-1ubuntu2) eoan; urgency=medium - - * Security fixes: - - S8211936, CVE-2019-2602: Better String parsing - - S8218453, CVE-2019-2684: More dynamic RMI interactions - - S8214809: CDS storage improvements - * debian/control, debian/control.in: add breaks clause to prevent - openjdk-11-jre-headless from being updated when jetty9, netbeans, - tomcat8, or visualvm are being hold back in unattended-upgrades - due to local conffiles changes. - * Add support for automatic updates: - - debian/watch: upstream has started releasing tarballs and signatures at - https://openjdk-sources.osci.io/openjdk11/ which allows us to track new - releases and check signatures by using uscan. For now it is using the - unmodified upstream tarball while previously the use of get-orig from - the debian/rules file would remove a few files from it - this can be - replicated by either providing a repack script or by adding the - exclusions directly to debian/copyright. - - debian/upstream/signing-key.asc: public signing key used by upstream - to sign their tarball releases. + * Properly generate 'Breaks:' in debian/rules for Bionic (fix typo). + * Remove libgtk-3-dev from and add libxrandr-dev to build dependencies. - -- Tiago Stürmer Daitx Tue, 23 Apr 2019 02:17:15 +0000 + -- Tiago Stürmer Daitx Thu, 18 Jul 2019 18:21:46 +0000 + +openjdk-lts (11.0.4+11-1ubuntu2) eoan; urgency=medium + + * Improve and fix build tests and autopkgtests: + - Update debian/tests/hotspot,jdk,langtools to ignore + jtreg-autopkgtest.sh return code. + - Create debian/tests/jtdiff-autopkgtest.in as it depends + on debian/rules variables. + - debian/tests/jtreg-autopkgtest.sh: + + Enable retry of failed tests to trim out flaky tests. + + Fix unbound variable. + + Force JT_JAVA otherwise jtreg will look for + /usr/lib/jvm/default-java which might not be installed + or be the right JVM to use. + + Keep .jtr files from failed tests only. + - debian/tests/jtdiff-autopkgtest.sh: + + Fail only if an actual regression is detected. + + Force JT_JAVA otherwise jtreg will look for + /usr/lib/jvm/default-java which might not be installed + or be the right JVM to use. + + Add the super-diff comparison from jtdiff. + - debian/rules: + + Preserve all JTreport directories in the test output + directory. + + Use JDK_DIR instead of JDK_TO_TEST for autopkgtest + generation. + + Package all .jtr files from JTwork as jtreg-autopkgtest.sh + makes sure it contains only failing tests. + + -- Tiago Stürmer Daitx Thu, 18 Jul 2019 17:53:52 +0000 + +openjdk-lts (11.0.4+11-1ubuntu1) eoan; urgency=medium + + * Sync packages with 11.0.4+11-1: + - OpenJDK 11.0.4+11 build (release). + - S8212328, CVE-2019-2762: Exceptional throw cases. + - S8213431, CVE-2019-2766: Improve file protocol handling. + - S8213432, CVE-2019-2769: Better copies of CopiesList. + - S8216381, CVE-2019-2786: More limited privilege usage. + - S8217563: Improve realm maintenance. + - S8218863: Better endpoint checks. + - S8218873: Improve JSSE endpoint checking. + - S8218876, CVE-2019-7317: Improve PNG support options. + - S8219775: Certificate validation improvements. + - S8220517: Enhanced GIF support. + - S8221345, CVE-2019-2818: Better Poly1305 support. + - S8221518, CVE-2019-2816: Normalize normalization. + - S8222678, CVE-2019-2821: Improve TLS negotiation. + - Fix more build issues for Ubuntu precise builds. + - Bump standards version. + + [ Tiago Stürmer Daitx ] + * Fix unbound variable debian/tests/jtreg-autopkgtest.in. + * Regenerate debian/tests/jtreg-autopkgtest.sh to fix wrong path. + * Force jtdiff to return success. + + -- Matthias Klose Wed, 17 Jul 2019 02:37:32 +0200 + +openjdk-lts (11.0.4+10-1ubuntu1) eoan; urgency=medium + + * Sync packages with 11.0.4+10-1: + - OpenJDK 11.0.4+10 build (early access). + - Add riscv64 support for zero (Ed Nevill). + - Fix build dependencies for Ubuntu precise builds. + - Fix dependency generation on the libjpeg runtime. Closes: #927965. + - Drop dependency on transitional libgl1-mesa-glx package. Closes: #930611. + + -- Matthias Klose Tue, 02 Jul 2019 15:08:32 +0200 + +openjdk-lts (11.0.4+9-1ubuntu1) eoan; urgency=medium + + * Sync packages with 11.0.4+9-1: + - OpenJDK 11.0.4+9 build (early access). + - Add another break for libequinox-osgi-java (<< 3.9.1). Closes: #931115. + + -- Matthias Klose Wed, 26 Jun 2019 14:02:42 +0200 + +openjdk-lts (11.0.4+8-1ubuntu1) eoan; urgency=medium + + * Sync packages with 11.0.4+8-1: + - OpenJDK 11.0.4+8 build (early access). + - Apply patch for JDK-8225716. + * Remove the icedtea-sound build logic. + * Install swing.properties into /conf instead of /lib. + + -- Matthias Klose Sat, 22 Jun 2019 18:16:21 +0200 + +openjdk-lts (11.0.4+6-1ubuntu1) eoan; urgency=medium + + * Sync packages with 11.0.4+6-1: + - OpenJDK 11.0.4+6 build (early access). + + -- Matthias Klose Thu, 06 Jun 2019 09:36:22 +0200 + +openjdk-lts (11.0.4+4-1ubuntu1) eoan; urgency=medium + + * Sync packages with 11.0.4+4-1: + - OpenJDK 11.0.4+4 build (early access). + - Configure with --with-version-pre='ea' for upstream tags which are + not upstream releases (has to be set manually). Not enabled during + the buster freeze. + - Allow to skip the bootcycle build (DEB_BUILD_OPTIONS=nobootcycle). + - Add a watch file (Paul Wise). + - Print some information about the host configuration before starting + the build. + + -- Matthias Klose Wed, 29 May 2019 08:08:09 +0200 + +openjdk-lts (11.0.4+2-1ubuntu1) eoan; urgency=medium + + * Sync packages with 11.0.4+2-1: + - OpenJDK 11.0.4+2 build. + - Fix src.zip symlink. Closes: #928369. + - Tighten dependency on ca-certificates-java. Closes: #914860. + - Refresh patches. + + -- Matthias Klose Wed, 15 May 2019 01:12:09 +0200 + +openjdk-lts (11.0.4+1-1ubuntu1) eoan; urgency=medium + + * Sync packages with 11.0.4+1-1: + - OpenJDK 11.0.4+1 build. + + -- Matthias Klose Mon, 06 May 2019 17:53:46 +0200 + +openjdk-lts (11.0.3+7-4ubuntu1) eoan; urgency=medium + + * Sync packages with 11.0.3+7-4: + * Add breaks to the openjdk-11-jre-headless package: + - For unattended upgrades: jetty9, netbeans, tomcat8, visualvm. + - For eclipse 3.8 removal: eclipse-platform. Closes: #925071. + - For configuration with vendor flag: libreoffice-core. + * Install jspawnhelper. + * Apply updates from jdk11u-dev, and remove locally applied patches: + - 8218618: Program fails when using JDK addressed by UNC path and using + Security Managerdefault tip. + - 8221924: get(null) on single-entry unmodifiable Map returns null + instead of throwing NPE. + - 8206955: MethodHandleProxies.asInterfaceInstance does not support default + methodsdefault tip. + - 8221304: Problem list java/awt/FontMetrics/MaxAdvanceIsMax.java. + - 8218854: FontMetrics.getMaxAdvance may be less than the maximum + FontMetrics.charWidth. + - 8214002: Cannot use italic font style if the font has embedded bitmap. + - 8222522: Add configure options for Mac Bundle creation. + - 8221880: Better customization for Windows RC properties FileDescription + and ProductName. + - 8222133: Add temporary exceptions for root certs that are due to expire + soon. + - 8222089: [TESTBUG] sun/security/lib/cacerts/VerifyCACerts.java fails due + to cert within 90-day expiry window. + - 8170494: JNI exception pending in PlainDatagramSocketImpl.c. + - 8217879: hs_err should print more instructions in hex dump. + - 8222410: java/nio/file/attribute/BasicFileAttributeView/UnixSocketFile + hangs when "nc" does not accept "-U". + - 8222397: x86_32 tests with UseSHA1Intrinsics SEGV due to garbled + registers. + - 8209914: javadoc search sometimes generates bad URIs. + - 8218020: Fix version number in mesa.md 3rd party legal file. + - 8188133: C2: Static field accesses in clinit can trigger + deoptimizations. + - 8215472: (zipfs) Cleanups in implementation classes of jdk.zipfs and + tests. + - 8211266: [TESTBUG] ZipFSTester.java failed intermittently in + ZipFSTester.checkRead(): bound must be positive. + - 8210899: (zipfs) ZipFileSystem.EntryOutputStreamCRC32 mistakenly set the + crc32 value into size field. + - 8217647: JFR: recordings on 32-bit systems unreadable. + - 8216970: condy causes JVM crash. + - 8222032: x86_32 fails with "wrong size of mach node" on AVX-512 machine. + - 8221917: serviceability/sa/TestPrintMdo.java fails on 32-bit platforms. + - 8220349: The fix done for JDK-8214253 have caused issues in JTree + behaviour. + - 8221833: Readability check in Symbol::is_valid not performed for some + addresses. + - 8220441: [PPC64] Clobber memory effect missing for memory barriers in + atomics. + - 8218991: s390: Add intrinsic for GHASH algorithm. + - 8220625: tools/javac/classreader/8171132/BadConstantValue.java failed + with "did not see expected error". + + -- Matthias Klose Thu, 25 Apr 2019 10:21:12 +0200 + +openjdk-lts (11.0.3+7-2ubuntu1) disco-proposed; urgency=medium + + * Sync packages with 11.0.3+7-2: + - Fix 8210739: Calling JSpinner's setFont with null throws + NullPointerException. + - Fix 8210483: AssertionError in DeferredAttr at setOverloadKind caused by + JDK-8203679. + + -- Matthias Klose Thu, 18 Apr 2019 05:03:41 +0200 openjdk-lts (11.0.3+7-1ubuntu1) disco; urgency=medium * Sync packages with 11.0.3+7-1: - OpenJDK 11.0.3+7 build. + - Security fixes: + - S8211936, CVE-2019-2602: Better String parsing. + - S8218453, CVE-2019-2684: More dynamic RMI interactions. + - S8219066, CVE-2019-2698: Fuzzing TrueType fonts: setCurrGlyphID(). - Support using the Java ATK wrapper (Samuel Thibault). Closes: #900912. - patches/jaw-classpath.diff: Fix finding the Java ATK wrapper. - patches/jaw-optional.diff: Make failing to load the Java ATK wrapper diff -Nru openjdk-lts-11.0.3+7/debian/control openjdk-lts-11.0.4+11/debian/control --- openjdk-lts-11.0.3+7/debian/control 2019-04-23 18:34:35.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/control 2019-07-18 18:21:46.000000000 +0000 @@ -7,24 +7,23 @@ Build-Depends: debhelper (>= 11), m4, lsb-release, zip, unzip, sharutils, gawk, cpio, pkg-config, procps, wdiff, time, fastjar (>= 2:0.96-0ubuntu2), - jtreg , testng , - xvfb , xauth , xfonts-base , libgl1-mesa-dri [!x32] , xfwm4 , x11-xkb-utils , dbus-x11 , + jtreg , testng , xvfb , xauth , xfonts-base , libgl1-mesa-dri [!x32] , xfwm4 , x11-xkb-utils , dbus-x11 , autoconf, automake, autotools-dev, ant, ant-optional, g++-7 , openjdk-11-jdk-headless:native | openjdk-10-jdk-headless:native, - libxtst-dev, libxi-dev, libxt-dev, libxaw7-dev, libxrender-dev, libcups2-dev, libasound2-dev, liblcms2-dev, libfreetype6-dev (>= 2.2.1), libxinerama-dev, libkrb5-dev, xsltproc, libpcsclite-dev, libelf-dev, libfontconfig1-dev, + libxtst-dev, libxi-dev, libxt-dev, libxaw7-dev, libxrender-dev, libcups2-dev, libasound2-dev, liblcms2-dev, libfreetype6-dev (>= 2.2.1), libxinerama-dev, libkrb5-dev, xsltproc, libpcsclite-dev, libxrandr-dev, libelf-dev, libfontconfig1-dev, libffi-dev, zlib1g-dev, libattr1-dev, libpng-dev, libjpeg-dev, libgif-dev, libnss3-dev (>= 2:3.17.1), openjdk-11-jdk-headless , Build-Depends-Indep: graphviz, pandoc, -Standards-Version: 4.3.0 +Standards-Version: 4.4.0 Homepage: http://openjdk.java.net/ Vcs-Git: https://git.launchpad.net/~openjdk/ubuntu/+source/openjdk/+git/openjdk -b openjdk-11 Vcs-Browser: https://code.launchpad.net/~openjdk/ubuntu/+source/openjdk/+git/openjdk/+ref/openjdk-11 Package: openjdk-11-jdk-headless -Architecture: alpha amd64 armel armhf arm64 i386 ia64 mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64 +Architecture: alpha amd64 armel armhf arm64 i386 ia64 mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k riscv64 sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64 Multi-Arch: same Pre-Depends: ${dpkg:Depends} Depends: openjdk-11-jre-headless (= ${binary:Version}), @@ -42,7 +41,7 @@ applets, and components using the Java programming language. Package: openjdk-11-jre-headless -Architecture: alpha amd64 armel armhf arm64 i386 ia64 mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64 +Architecture: alpha amd64 armel armhf arm64 i386 ia64 mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k riscv64 sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64 Multi-Arch: same Pre-Depends: ${dpkg:Depends} Depends: ${jredefault:Depends}, ${cacert:Depends}, @@ -59,7 +58,7 @@ java9-runtime-headless, java10-runtime-headless, java11-runtime-headless, ${defaultvm:Provides}, ${jvm:Provides} -Breaks: clojure1.8 (<= 1.8.0-7ubuntu1~), jetty9 (<< 9.4.15-1~), netbeans (<< 10.0-3~), tomcat8 (<< 8.5.39-1ubuntu1~), visualvm (<< 1.4.2-2~) +Breaks: ${jrehl:Breaks} Conflicts: oracle-java11-installer, openjdk-11-jdk-headless (<< 11~18-2) Replaces: openjdk-11-jdk-headless (<< 11~18-2) Description: OpenJDK Java runtime, using ${vm:Name} (headless) @@ -67,7 +66,7 @@ using ${vm:Name}. Package: openjdk-11-jdk -Architecture: alpha amd64 armel armhf arm64 i386 ia64 mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64 +Architecture: alpha amd64 armel armhf arm64 i386 ia64 mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k riscv64 sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64 Multi-Arch: same Pre-Depends: ${dpkg:Depends} Depends: openjdk-11-jre (= ${binary:Version}), @@ -85,7 +84,7 @@ applets, and components using the Java programming language. Package: openjdk-11-jre -Architecture: alpha amd64 armel armhf arm64 i386 ia64 mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64 +Architecture: alpha amd64 armel armhf arm64 i386 ia64 mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k riscv64 sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64 Multi-Arch: same Pre-Depends: ${dpkg:Depends} Depends: openjdk-11-jre-headless (= ${binary:Version}), @@ -102,7 +101,7 @@ programs, using ${vm:Name}. Package: openjdk-11-demo -Architecture: alpha amd64 armel armhf arm64 i386 ia64 mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64 +Architecture: alpha amd64 armel armhf arm64 i386 ia64 mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k riscv64 sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64 Priority: optional Pre-Depends: ${dpkg:Depends} Depends: openjdk-11-jre (= ${binary:Version}), @@ -138,7 +137,7 @@ This package contains the API documentation. Package: openjdk-11-dbg -Architecture: alpha amd64 armel armhf arm64 i386 ia64 mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64 +Architecture: alpha amd64 armel armhf arm64 i386 ia64 mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k riscv64 sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64 Multi-Arch: same Priority: optional Section: debug diff -Nru openjdk-lts-11.0.3+7/debian/control.in openjdk-lts-11.0.4+11/debian/control.in --- openjdk-lts-11.0.3+7/debian/control.in 2019-04-23 01:45:33.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/control.in 2019-07-17 00:37:32.000000000 +0000 @@ -7,8 +7,7 @@ Build-Depends: @bd_debhelper@ m4, lsb-release, zip, unzip, sharutils, gawk, cpio, pkg-config, procps, wdiff, time, @bd_fastjar@ - jtreg , testng , - xvfb , xauth , xfonts-base , libgl1-mesa-dri [!x32] , xfwm4 , x11-xkb-utils , dbus-x11 , + @bd_check@ @bd_autotools@ @bd_ant@ @bd_gcc@ @bd_bootstrap@ @@ -18,7 +17,7 @@ @bd_nss@ @bd_cross@ Build-Depends-Indep: graphviz, pandoc, -Standards-Version: 4.3.0 +Standards-Version: 4.4.0 Homepage: http://openjdk.java.net/ Vcs-Git: https://git.launchpad.net/~openjdk/ubuntu/+source/openjdk/+git/openjdk -b openjdk-11 Vcs-Browser: https://code.launchpad.net/~openjdk/ubuntu/+source/openjdk/+git/openjdk/+ref/openjdk-11 @@ -59,7 +58,7 @@ java9-runtime-headless, java10-runtime-headless, java11-runtime-headless, ${defaultvm:Provides}, ${jvm:Provides} -Breaks: clojure1.8 (<= 1.8.0-7ubuntu1~), jetty9 (<< 9.4.15-1~), netbeans (<< 10.0-3~), tomcat8 (<< 8.5.39-1ubuntu1~), visualvm (<< 1.4.2-2~) +Breaks: ${jrehl:Breaks} Conflicts: oracle-java11-installer, openjdk-11-jdk-headless (<< 11~18-2) Replaces: openjdk-11-jdk-headless (<< 11~18-2) Description: OpenJDK Java runtime, using ${vm:Name} (headless) diff -Nru openjdk-lts-11.0.3+7/debian/copyright openjdk-lts-11.0.4+11/debian/copyright --- openjdk-lts-11.0.3+7/debian/copyright 2017-11-19 16:04:03.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/copyright 2019-06-22 16:25:50.000000000 +0000 @@ -12,17 +12,6 @@ Sun Microsystems, Inc. Oracle and/or its affiliates. -IcedTea Sound (see AUTHORS for a current list): - Andrew John Hughes - Ioana Ivan - Matthias Klose - Denis Lila - Omair Majid - Xerxes Rånby - Marc Schoenefeld - Joshua Sumali - Jon VanAlten - Java Access Bridge: Bill Haneman Louise Miller @@ -47,9 +36,6 @@ Portions Copyright © 1997 Eastman Kodak Company. Portions Copyright © 1999-2005 The Apache Software Foundation. -IcedTea Sound: - Portions Copyright © 2008-2014 Red Hat, Inc. - Java Access Bridge: Portions Copyright © 2002-2007 Bill Haneman Portions Copyright © 2002-2007 Louise Miller @@ -89,15 +75,6 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -IcedTea Sound: - IcedTea is licensed under the GPL v2. See `/usr/share/common-licenses/GPL-2'. - The exception is: "CLASSPATH" EXCEPTION TO THE GPL. - - The sound files (pulseaudio/testsounds/*.wav) were taken from the KDE Project - (www.kde.org). A copy of them can be obtained from - http://websvn.kde.org/branches/KDE/4.0/kdeartwork/sounds/ . They are licensed - by the copyright holders as GPLv2. - OpenJDK: OpenJDK is licensed under the GPL v2 with exceptions, see `/usr/share/common-licenses/GPL-2'. diff -Nru openjdk-lts-11.0.3+7/debian/patches/8214002.diff openjdk-lts-11.0.4+11/debian/patches/8214002.diff --- openjdk-lts-11.0.3+7/debian/patches/8214002.diff 2019-01-24 14:17:42.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/patches/8214002.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,112 +0,0 @@ - -# HG changeset patch -# User itakiguchi -# Date 1544043590 28800 -# Node ID 7ed5edf6ba0c0d9afc75d6efb2ef14301f0db15b -# Parent fcbea0fb586c1bd8b807df186c459bad7885a96c -8214002: Cannot use italic font style if the font has embedded bitmap -Reviewed-by: prr - ---- a/src/java.desktop/share/native/libfontmanager/freetypeScaler.c -+++ b/src/java.desktop/share/native/libfontmanager/freetypeScaler.c -@@ -680,7 +680,7 @@ Java_sun_font_FreetypeFontScaler_getGlyp - UInt16 width, height; - GlyphInfo *glyphInfo; - int glyph_index; -- int renderFlags = FT_LOAD_RENDER, target; -+ int renderFlags = FT_LOAD_DEFAULT, target; - FT_GlyphSlot ftglyph; - - FTScalerContext* context = ---- /dev/null -+++ b/test/jdk/java/awt/font/TextLayout/FontGlyphCompare.java -@@ -0,0 +1,89 @@ -+/* -+ * Copyright (c) 2018, 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 8214002 -+ * @requires (os.family == "windows") -+ * @summary verify MS Mincho's Plain & Italic style -+ */ -+ -+import java.awt.Font; -+import java.awt.Color; -+import java.awt.Graphics; -+import java.awt.Graphics2D; -+import java.awt.RenderingHints; -+import java.awt.image.BufferedImage; -+ -+public class FontGlyphCompare { -+ -+ static BufferedImage getFontImage(Font font, String text) { -+ int x = 1; -+ int y = 15; -+ int w = 10; -+ int h = 18; -+ BufferedImage bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); -+ Graphics2D g = (Graphics2D)bi.getGraphics(); -+ g.setColor(Color.black); -+ g.fillRect(0, 0, w, h); -+ g.setColor(Color.white); -+ g.setFont(font); -+ g.drawString(text, x, y); -+ return bi; -+ } -+ -+ public static void main(String[] args) throws Exception { -+ String osName = System.getProperty("os.name"); -+ System.out.println("OS is " + osName); -+ osName = osName.toLowerCase(); -+ if (!osName.startsWith("windows")) { -+ return; -+ } -+ Font msMincho = new Font("MS Mincho", Font.PLAIN, 16); -+ String family = msMincho.getFamily(java.util.Locale.ENGLISH); -+ if (!family.equalsIgnoreCase("MS Mincho")) { -+ System.out.println("Japanese fonts not installed"); -+ return; -+ } -+ String s = "|"; -+ BufferedImage bi1 = getFontImage(new Font("MS Mincho", Font.PLAIN, 16), s); -+ int h1 = bi1.getHeight(); -+ int w1 = bi1.getWidth(); -+ BufferedImage bi2 = getFontImage(new Font("MS Mincho", Font.ITALIC, 16), s); -+ int h2 = bi2.getHeight(); -+ int w2 = bi2.getWidth(); -+ if ((h1 == h2) && (w1 == w2)) { -+ int cnt = 0; -+ for(int yy = 0; yy < h1; yy++) { -+ for(int xx = 0; xx < w1; xx++) { -+ if (bi1.getRGB(xx, yy) != bi2.getRGB(xx, yy)) { -+ cnt++; -+ } -+ } -+ } -+ if (cnt == 0) { -+ throw new Exception("Test failed"); -+ } -+ } -+ } -+} diff -Nru openjdk-lts-11.0.3+7/debian/patches/8221083.diff openjdk-lts-11.0.4+11/debian/patches/8221083.diff --- openjdk-lts-11.0.3+7/debian/patches/8221083.diff 2019-03-28 10:00:21.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/patches/8221083.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,139 +0,0 @@ - -# HG changeset patch -# User simonis -# Date 1553597501 -3600 -# Node ID 5487a925f70d3c32aa8bd21901135b431b639942 -# Parent 5ee30b6991a750746ed219719e9dbfbec9dff56d -8221083: [ppc64] Wrong oop compare in C1-generated code -Reviewed-by: mdoerr, goetz - -diff -r 5ee30b6991a7 -r 5487a925f70d src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp ---- a/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp Mon Dec 03 16:25:27 2018 +0100 -+++ b/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp Tue Mar 26 11:51:41 2019 +0100 -@@ -1455,13 +1455,11 @@ - break; - } - } else { -- if (opr2->is_address()) { -- DEBUG_ONLY( Unimplemented(); ) // Seems to be unused at the moment. -- LIR_Address *addr = opr2->as_address_ptr(); -- BasicType type = addr->type(); -- if (type == T_OBJECT) { __ ld(R0, index_or_disp(addr), addr->base()->as_register()); } -- else { __ lwa(R0, index_or_disp(addr), addr->base()->as_register()); } -- __ cmpd(BOOL_RESULT, opr1->as_register(), R0); -+ assert(opr1->type() != T_ADDRESS && opr2->type() != T_ADDRESS, "currently unsupported"); -+ if (opr1->type() == T_OBJECT || opr1->type() == T_ARRAY) { -+ // There are only equal/notequal comparisons on objects. -+ assert(condition == lir_cond_equal || condition == lir_cond_notEqual, "oops"); -+ __ cmpd(BOOL_RESULT, opr1->as_register(), opr2->as_register()); - } else { - if (unsigned_comp) { - __ cmplw(BOOL_RESULT, opr1->as_register(), opr2->as_register()); -@@ -1497,14 +1495,6 @@ - } else { - ShouldNotReachHere(); - } -- } else if (opr1->is_address()) { -- DEBUG_ONLY( Unimplemented(); ) // Seems to be unused at the moment. -- LIR_Address * addr = opr1->as_address_ptr(); -- BasicType type = addr->type(); -- assert (opr2->is_constant(), "Checking"); -- if (type == T_OBJECT) { __ ld(R0, index_or_disp(addr), addr->base()->as_register()); } -- else { __ lwa(R0, index_or_disp(addr), addr->base()->as_register()); } -- __ cmpdi(BOOL_RESULT, R0, opr2->as_constant_ptr()->as_jint()); - } else { - ShouldNotReachHere(); - } -diff -r 5ee30b6991a7 -r 5487a925f70d test/hotspot/jtreg/compiler/codegen/TestOopCmp.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/test/hotspot/jtreg/compiler/codegen/TestOopCmp.java Tue Mar 26 11:51:41 2019 +0100 -@@ -0,0 +1,88 @@ -+/* -+ * Copyright (c) 2019 SAP SE. 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 8221083 -+ * @requires vm.bits == 64 & vm.opt.final.UseCompressedOops == true -+ * @summary On ppc64, C1 erroneously emits a 32-bit compare instruction for oop compares. -+ * @modules java.base/jdk.internal.misc:+open -+ * @library /test/lib / -+ * @build sun.hotspot.WhiteBox -+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox -+ * sun.hotspot.WhiteBox$WhiteBoxPermission -+ * @run main/othervm -Xbatch -XX:-UseTLAB -Xmx4m -XX:+UseSerialGC -XX:HeapBaseMinAddress=0x700000000 -+ * -XX:CompileCommand=compileonly,compiler.codegen.TestOopCmp::nullTest -+ * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -+ * compiler.codegen.TestOopCmp -+ * @author volker.simonis@gmail.com -+ */ -+ -+package compiler.codegen; -+ -+import sun.hotspot.WhiteBox; -+ -+public class TestOopCmp { -+ -+ private static Object nullObj = null; -+ -+ public static boolean nullTest(Object o) { -+ if (o == nullObj) { -+ return true; -+ } else { -+ return false; -+ } -+ } -+ -+ public static void main(String args[]) { -+ -+ WhiteBox WB = WhiteBox.getWhiteBox(); -+ -+ // The test is started with -XX:HeapBaseMinAddress=0x700000000 and a -+ // small heap of only 4mb. This works pretty reliable and at least on -+ // Linux/Windows/Solaris we will get a heap starting at 0x700000000. -+ // The test also runs with -XX:+UseSerialGC which means that we'll get -+ // eden starting at 0x700000000. -+ // Calling 'System.gc()' will clean up all the objects from eden, so if -+ // eden starts at 0x700000000 the first allocation right after the -+ // system GC will be allcoated right at address 0x700000000. -+ System.gc(); -+ String s = new String("I'm not null!!!"); -+ if (WB.getObjectAddress(s) == 0x700000000L) { -+ System.out.println("Got object at address 0x700000000"); -+ } -+ -+ // We call 'nullTest()' with the newly allocated String object. If it was -+ // allocated at 0x700000000, its 32 least-significant bits will be 0 and a -+ // 32-bit comparison with 'nullObj' (which is 'null') will yield true and -+ // result in a test failure. -+ // If the code generated for 'nullTest()' correctly performs a 64-bit -+ // comparison or if we didn't manage to allcoate 's' at 0x700000000 the -+ // test will always succeed. -+ for (int i = 0; i < 30_000; i++) { -+ if (nullTest(s)) { -+ throw new RuntimeException("Comparing non-null object with null returned 'true'"); -+ } -+ } -+ } -+} - diff -Nru openjdk-lts-11.0.3+7/debian/patches/hotspot-disable-exec-shield-workaround.diff openjdk-lts-11.0.4+11/debian/patches/hotspot-disable-exec-shield-workaround.diff --- openjdk-lts-11.0.3+7/debian/patches/hotspot-disable-exec-shield-workaround.diff 2019-04-17 03:00:11.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/patches/hotspot-disable-exec-shield-workaround.diff 2019-05-14 23:15:15.000000000 +0000 @@ -6,6 +6,6 @@ void os::workaround_expand_exec_shield_cs_limit() { -#if defined(IA32) && !defined(ZERO) +#if 0 + assert(Linux::initial_thread_stack_bottom() != NULL, "sanity"); size_t page_size = os::vm_page_size(); - /* diff -Nru openjdk-lts-11.0.3+7/debian/patches/jaw-classpath.diff openjdk-lts-11.0.4+11/debian/patches/jaw-classpath.diff --- openjdk-lts-11.0.3+7/debian/patches/jaw-classpath.diff 2019-04-17 03:00:11.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/patches/jaw-classpath.diff 2019-05-14 23:15:15.000000000 +0000 @@ -1,10 +1,8 @@ Fix finding the Java ATK wrapper, see #900912 -Index: openjdk-10-10.0.1+10/src/hotspot/os/linux/os_linux.cpp -=================================================================== ---- openjdk-10-10.0.1+10.orig/src/hotspot/os/linux/os_linux.cpp -+++ openjdk-10-10.0.1+10/src/hotspot/os/linux/os_linux.cpp -@@ -369,6 +369,7 @@ void os::init_system_properties_values() +--- a/src/hotspot/os/linux/os_linux.cpp ++++ b/src/hotspot/os/linux/os_linux.cpp +@@ -368,6 +368,7 @@ void os::init_system_properties_values() } Arguments::set_java_home(buf); set_boot_path('/', ':'); diff -Nru openjdk-lts-11.0.3+7/debian/patches/jdk-improve-gtk3-compatibility.patch openjdk-lts-11.0.4+11/debian/patches/jdk-improve-gtk3-compatibility.patch --- openjdk-lts-11.0.3+7/debian/patches/jdk-improve-gtk3-compatibility.patch 2019-03-28 10:00:21.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/patches/jdk-improve-gtk3-compatibility.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,391 +0,0 @@ -Description: Upstream fix to improve GTK3 compatibility - This is an issue with gtk version 3.20 and later. GTK has made some major - changes in their theme handling in gtk 3.20 and applications need to change - to adapt to those changes. This issue is reproducible in Ubuntu 18.04 and - OEL 7.5 as the gtk version is >3.20 in both whereas in Ubuntu 16.04, the - default version is 3.18 and works fine. - - This issue solves GTK 3+ compatibility problems. Upstream patch contains - fixes for 4 issues (JDK-8218469, JDK-8218470, JDK-8218472, JDK-8203627). - It applies cleanly to 11u (and I see 11.0.4-oracle), and to 8u with - reshuffling (and I see 8u221/222). Original tests (JSlider, JProgressBar, - JScrollBar, FileChooserDemo) work fine after the patch, and looks wrong - before the patch. 8u requires -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Djdk.gtk.version=3 - to reproduce. The risk is low. -Origin: upstream, http://hg.openjdk.java.net/jdk/jdk/rev/76668d618a99 -Bug: https://bugs.openjdk.java.net/browse/JDK-8203627 -Bug-Ubuntu: http://launchpad.net/bugs/1770278 -Applied-Upstream: 11.0.4, http://hg.openjdk.java.net/jdk/jdk/rev/76668d618a99 -Last-Update: 2019-03-26 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ - -# HG changeset patch -# User pbansal -# Date 1550208537 -19800 -# Node ID fa3eed43d5fa27f22baae50e4c4ec9e82d0166ef -# Parent 619fc2e4250e6ce12d5e2a916ba5420c543fbe22 -8218469: JSlider display issue with slider for GTKLookAndFeel -8218470: JScrollBar display issue with GTKLookAndFeel -8218472: JProgressBar display issue with GTKLookAndFeel -8203627: Swing applications with JRadioButton and JCheckbox fail to render correctly when using GTK3 and the GTK L&F -Reviewed-by: serb, prr - -diff -r 619fc2e4250e -r fa3eed43d5fa src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKStyle.java ---- a/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKStyle.java Fri Feb 15 10:06:25 2019 -0800 -+++ b/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKStyle.java Fri Feb 15 10:58:57 2019 +0530 -@@ -767,6 +767,14 @@ - if (classKey != null) { - Object value = getClassSpecificValue(classKey); - if (value != null) { -+ //This is a workaround as the "slider-length" property has been -+ //deprecated for GtkScale from gtk 3.20, so default value of 31 -+ //is used and makes redering of slider wrong. Value 14 is being -+ //used as default value for Slider.thumbHeight is 14 and making -+ //width 14 as well makes slider thumb render in proper shape -+ if ("Slider.thumbWidth".equals(key) && value.equals(31)) { -+ return 14; -+ } - return value; - } - } -@@ -779,8 +787,15 @@ - return getColorForState(context, ColorType.FOREGROUND); - } - else if (key == "ScrollBar.minimumThumbSize") { -+ //This is a workaround as the "min-slider-length" property has been -+ //deprecated for GtkScrollBar from gtk 3.20, so default value of 21 -+ //is used and makes ScrollBar thumb very small. Value 40 is being -+ //used as this is the value mentioned in css files - int len = - getClassSpecificIntValue(context, "min-slider-length", 21); -+ if (len == 21) { -+ len = 40; -+ } - JScrollBar sb = (JScrollBar)context.getComponent(); - if (sb.getOrientation() == JScrollBar.HORIZONTAL) { - return new DimensionUIResource(len, 0); -diff -r 619fc2e4250e -r fa3eed43d5fa src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c ---- a/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c Fri Feb 15 10:06:25 2019 -0800 -+++ b/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c Fri Feb 15 10:58:57 2019 +0530 -@@ -258,6 +258,7 @@ - - static gboolean gtk3_version_3_10 = TRUE; - static gboolean gtk3_version_3_14 = FALSE; -+static gboolean gtk3_version_3_20 = FALSE; - - GtkApi* gtk3_load(JNIEnv *env, const char* lib_name) - { -@@ -400,6 +401,18 @@ - } - gtk3_version_3_14 = !fp_gtk_check_version(3, 14, 0); - -+ if (!fp_gtk_check_version(3, 20, 0)) { -+ gtk3_version_3_20 = TRUE; -+ fp_gtk_widget_path_copy = dl_symbol("gtk_widget_path_copy"); -+ fp_gtk_widget_path_new = dl_symbol("gtk_widget_path_new"); -+ fp_gtk_widget_path_append_type = dl_symbol("gtk_widget_path_append_type"); -+ fp_gtk_widget_path_iter_set_object_name = dl_symbol("gtk_widget_path_iter_set_object_name"); -+ fp_gtk_style_context_set_path = dl_symbol("gtk_style_context_set_path"); -+ fp_gtk_widget_path_unref = dl_symbol("gtk_widget_path_unref"); -+ fp_gtk_style_context_get_path = dl_symbol("gtk_style_context_get_path"); -+ fp_gtk_style_context_new = dl_symbol("gtk_style_context_new"); -+ } -+ - fp_gdk_window_create_similar_surface = - dl_symbol("gdk_window_create_similar_surface"); - fp_gtk_settings_get_for_screen = -@@ -561,7 +574,6 @@ - "gtk_combo_box_new_with_entry"); - fp_gtk_separator_tool_item_new = dlsym(gtk3_libhandle, - "gtk_separator_tool_item_new"); -- - fp_g_list_append = dl_symbol("g_list_append"); - fp_g_list_free = dl_symbol("g_list_free"); - fp_g_list_free_full = dl_symbol("g_list_free_full"); -@@ -1362,6 +1374,90 @@ - return result; - } - -+static void append_element (GtkWidgetPath *path, const gchar *selector) -+{ -+ fp_gtk_widget_path_append_type (path, G_TYPE_NONE); -+ fp_gtk_widget_path_iter_set_object_name (path, -1, selector); -+} -+ -+static GtkWidgetPath* createWidgetPath(const GtkWidgetPath* path) { -+ if (path == NULL) { -+ return fp_gtk_widget_path_new(); -+ } else { -+ return fp_gtk_widget_path_copy(path); -+ } -+} -+ -+static GtkStyleContext* get_style(WidgetType widget_type, const gchar *detail) -+{ -+ if (!gtk3_version_3_20) { -+ gtk3_widget = gtk3_get_widget(widget_type); -+ GtkStyleContext* context = fp_gtk_widget_get_style_context (gtk3_widget); -+ fp_gtk_style_context_save (context); -+ if (detail != 0) { -+ transform_detail_string(detail, context); -+ } -+ return context; -+ } else { -+ gtk3_widget = gtk3_get_widget(widget_type); -+ GtkStyleContext* widget_context = fp_gtk_widget_get_style_context (gtk3_widget); -+ GtkWidgetPath *path = NULL; -+ if (detail != 0) { -+ if (strcmp(detail, "checkbutton") == 0) { -+ path = createWidgetPath (fp_gtk_style_context_get_path (widget_context)); -+ append_element(path, "check"); -+ } else if (strcmp(detail, "radiobutton") == 0) { -+ path = createWidgetPath (fp_gtk_style_context_get_path (widget_context)); -+ append_element(path, "radio"); -+ } else if (strcmp(detail, "vscale") == 0 || strcmp(detail, "hscale") == 0) { -+ path = createWidgetPath (fp_gtk_style_context_get_path (widget_context)); -+ append_element(path, "slider"); -+ } else if (strcmp(detail, "trough") == 0) { -+ //This is a fast solution to the scrollbar trough not being rendered properly -+ if (widget_type == HSCROLL_BAR || widget_type == HSCROLL_BAR_TRACK || -+ widget_type == VSCROLL_BAR || widget_type == VSCROLL_BAR_TRACK) { -+ path = createWidgetPath (NULL); -+ } else { -+ path = createWidgetPath (fp_gtk_style_context_get_path (widget_context)); -+ } -+ append_element(path, detail); -+ } else if (strcmp(detail, "bar") == 0) { -+ path = createWidgetPath (fp_gtk_style_context_get_path (widget_context)); -+ append_element(path, "trough"); -+ append_element(path, "progress"); -+ } else if (strcmp(detail, "vscrollbar") == 0 || strcmp(detail, "hscrollbar") == 0) { -+ path = createWidgetPath (fp_gtk_style_context_get_path (widget_context)); -+ append_element(path, "button"); -+ } else if (strcmp(detail, "check") == 0) { -+ path = createWidgetPath (NULL); -+ append_element(path, detail); -+ } else if (strcmp(detail, "option") == 0) { -+ path = createWidgetPath (NULL); -+ append_element(path, "radio"); -+ } else { -+ path = createWidgetPath (fp_gtk_style_context_get_path (widget_context)); -+ append_element(path, detail); -+ } -+ } else { -+ path = createWidgetPath (fp_gtk_style_context_get_path (widget_context)); -+ } -+ -+ GtkStyleContext *context = fp_gtk_style_context_new (); -+ fp_gtk_style_context_set_path (context, path); -+ fp_gtk_widget_path_unref (path); -+ return context; -+ } -+} -+ -+static void disposeOrRestoreContext(GtkStyleContext *context) -+{ -+ if (!gtk3_version_3_20) { -+ fp_gtk_style_context_restore (context); -+ } else { -+ fp_g_object_unref (context); -+ } -+} -+ - static void gtk3_paint_arrow(WidgetType widget_type, GtkStateType state_type, - GtkShadowType shadow_type, const gchar *detail, - gint x, gint y, gint width, gint height, -@@ -1509,13 +1605,9 @@ - */ - gtk3_set_direction(gtk3_widget, dir); - -- GtkStyleContext* context = fp_gtk_widget_get_style_context (gtk3_widget); -- fp_gtk_style_context_save (context); -- -- transform_detail_string(detail, context); -+ GtkStyleContext* context = get_style(widget_type, detail); - - GtkStateFlags flags = get_gtk_flags(state_type); -- - if (shadow_type == GTK_SHADOW_IN && widget_type != COMBO_BOX_ARROW_BUTTON) { - flags |= GTK_STATE_FLAG_ACTIVE; - } -@@ -1532,23 +1624,31 @@ - fp_gtk_style_context_add_class (context, "default"); - } - -+ if (fp_gtk_style_context_has_class(context, "trough")) { -+ flags |= GTK_STATE_FLAG_BACKDROP; -+ } -+ - fp_gtk_style_context_set_state (context, flags); - -- if (fp_gtk_style_context_has_class(context, "progressbar")) { -- fp_gtk_render_activity (context, cr, x, y, width, height); -- } else { -- fp_gtk_render_background (context, cr, x, y, width, height); -- if (shadow_type != GTK_SHADOW_NONE) { -- fp_gtk_render_frame(context, cr, x, y, width, height); -- } -+ fp_gtk_render_background (context, cr, x, y, width, height); -+ if (shadow_type != GTK_SHADOW_NONE) { -+ fp_gtk_render_frame(context, cr, x, y, width, height); - } - -- fp_gtk_style_context_restore (context); -+ disposeOrRestoreContext(context); -+ - /* - * Reset the text direction to the default value so that we don't - * accidentally affect other operations and widgets. - */ - gtk3_set_direction(gtk3_widget, GTK_TEXT_DIR_LTR); -+ -+ //This is a fast solution to the scrollbar trough not being rendered properly -+ if ((widget_type == HSCROLL_BAR || widget_type == HSCROLL_BAR_TRACK || -+ widget_type == VSCROLL_BAR || widget_type == VSCROLL_BAR_TRACK) && detail != 0) { -+ gtk3_paint_box(widget_type, state_type, shadow_type, NULL, -+ x, y, width, height, synth_state, dir); -+ } - } - - static void gtk3_paint_box_gap(WidgetType widget_type, GtkStateType state_type, -@@ -1580,23 +1680,19 @@ - static void gtk3_paint_check(WidgetType widget_type, gint synth_state, - const gchar *detail, gint x, gint y, gint width, gint height) - { -- gtk3_widget = gtk3_get_widget(widget_type); -- -- GtkStyleContext* context = fp_gtk_widget_get_style_context (gtk3_widget); -- -- fp_gtk_style_context_save (context); -+ GtkStyleContext* context = get_style(widget_type, detail); - - GtkStateFlags flags = get_gtk_state_flags(synth_state); - if (gtk3_version_3_14 && (synth_state & SELECTED)) { -- flags = GTK_STATE_FLAG_CHECKED; -+ flags &= ~GTK_STATE_FLAG_SELECTED; -+ flags |= GTK_STATE_FLAG_CHECKED; - } - fp_gtk_style_context_set_state(context, flags); - -- fp_gtk_style_context_add_class (context, "check"); -- -- fp_gtk_render_check (context, cr, x, y, width, height); -- -- fp_gtk_style_context_restore (context); -+ fp_gtk_render_background(context, cr, x, y, width, height); -+ fp_gtk_render_frame(context, cr, x, y, width, height); -+ fp_gtk_render_check(context, cr, x, y, width, height); -+ disposeOrRestoreContext(context); - } - - -@@ -1680,7 +1776,6 @@ - gtk3_widget = gtk3_get_widget(widget_type); - - GtkStyleContext* context = fp_gtk_widget_get_style_context (gtk3_widget); -- - fp_gtk_style_context_save (context); - - if (detail != 0) { -@@ -1783,25 +1878,19 @@ - static void gtk3_paint_option(WidgetType widget_type, gint synth_state, - const gchar *detail, gint x, gint y, gint width, gint height) - { -- gtk3_widget = gtk3_get_widget(widget_type); -- -- GtkStyleContext* context = fp_gtk_widget_get_style_context (gtk3_widget); -- -- fp_gtk_style_context_save (context); -+ GtkStyleContext* context = get_style(widget_type, detail); - - GtkStateFlags flags = get_gtk_state_flags(synth_state); - if (gtk3_version_3_14 && (synth_state & SELECTED)) { -- flags = GTK_STATE_FLAG_CHECKED; -+ flags &= ~GTK_STATE_FLAG_SELECTED; -+ flags |= GTK_STATE_FLAG_CHECKED; - } - fp_gtk_style_context_set_state(context, flags); - -- if (detail != 0) { -- transform_detail_string(detail, context); -- } -- -+ fp_gtk_render_background(context, cr, x, y, width, height); -+ fp_gtk_render_frame(context, cr, x, y, width, height); - fp_gtk_render_option(context, cr, x, y, width, height); -- -- fp_gtk_style_context_restore (context); -+ disposeOrRestoreContext(context); - } - - static void gtk3_paint_shadow(WidgetType widget_type, GtkStateType state_type, -@@ -1860,15 +1949,7 @@ - gint x, gint y, gint width, gint height, GtkOrientation orientation, - gboolean has_focus) - { -- gtk3_widget = gtk3_get_widget(widget_type); -- -- GtkStyleContext* context = fp_gtk_widget_get_style_context (gtk3_widget); -- -- fp_gtk_style_context_save (context); -- -- if (detail) { -- transform_detail_string(detail, context); -- } -+ GtkStyleContext *context = get_style(widget_type, detail); - - GtkStateFlags flags = get_gtk_flags(state_type); - -@@ -1882,9 +1963,10 @@ - - fp_gtk_style_context_set_state (context, flags); - -+ fp_gtk_render_background (context, cr, x, y, width, height); -+ fp_gtk_render_frame(context, cr, x, y, width, height); - (*fp_gtk_render_slider)(context, cr, x, y, width, height, orientation); -- -- fp_gtk_style_context_restore (context); -+ disposeOrRestoreContext(context); - } - - static void gtk3_paint_background(WidgetType widget_type, -diff -r 619fc2e4250e -r fa3eed43d5fa src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.h ---- a/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.h Fri Feb 15 10:06:25 2019 -0800 -+++ b/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.h Fri Feb 15 10:58:57 2019 +0530 -@@ -162,6 +162,7 @@ - typedef void GtkRange; - typedef void GtkProgressBar; - typedef void GtkProgress; -+typedef void GtkWidgetPath; - - /* Some real structures */ - typedef struct -@@ -238,7 +239,6 @@ - GType owner_type; - } GParamSpec; - -- - static gchar* (*fp_glib_check_version)(guint required_major, - guint required_minor, guint required_micro); - -@@ -573,5 +573,18 @@ - static void (*fp_gtk_widget_size_request)(GtkWidget *widget, - GtkRequisition *requisition); - static GtkAdjustment* (*fp_gtk_range_get_adjustment)(GtkRange* range); -+static GtkWidgetPath* (*fp_gtk_widget_path_copy) -+ (const GtkWidgetPath *path); -+static const GtkWidgetPath* (*fp_gtk_style_context_get_path) -+ (GtkStyleContext *context); -+static GtkWidgetPath* (*fp_gtk_widget_path_new) (void); -+static gint (*fp_gtk_widget_path_append_type) -+ (GtkWidgetPath *path, GType type); -+static void (*fp_gtk_widget_path_iter_set_object_name) -+ (GtkWidgetPath *path, gint pos, const char *name); -+static void (*fp_gtk_style_context_set_path) -+ (GtkStyleContext *context, GtkWidgetPath *path); -+static void (*fp_gtk_widget_path_unref) (GtkWidgetPath *path); -+static GtkStyleContext* (*fp_gtk_style_context_new) (void); - - #endif /* !_GTK3_INTERFACE_H */ - diff -Nru openjdk-lts-11.0.3+7/debian/patches/m68k-support.diff openjdk-lts-11.0.4+11/debian/patches/m68k-support.diff --- openjdk-lts-11.0.3+7/debian/patches/m68k-support.diff 2019-01-22 12:28:12.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/patches/m68k-support.diff 2019-05-14 23:15:15.000000000 +0000 @@ -1064,7 +1064,7 @@ // Base class for objects stored in Metaspace. // Calling delete will result in fatal error. -@@ -311,7 +311,7 @@ class MetaspaceObj { +@@ -317,7 +317,7 @@ class MetaspaceObj { // that should be read-only by default. See symbol.hpp for an example. This function // is used by the templates in metaspaceClosure.hpp static bool is_read_only_by_default() { return false; } @@ -1073,7 +1073,7 @@ // Base class for classes that constitute name spaces. -@@ -401,7 +401,7 @@ class ResourceObj ALLOCATION_SUPER_CLASS +@@ -407,7 +407,7 @@ class ResourceObj ALLOCATION_SUPER_CLASS void operator delete(void* p); void operator delete [](void* p); diff -Nru openjdk-lts-11.0.3+7/debian/patches/mips-sigset.diff openjdk-lts-11.0.4+11/debian/patches/mips-sigset.diff --- openjdk-lts-11.0.3+7/debian/patches/mips-sigset.diff 2019-04-17 03:00:11.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/patches/mips-sigset.diff 2019-05-14 23:15:15.000000000 +0000 @@ -1,6 +1,6 @@ --- a/src/hotspot/os/linux/os_linux.cpp +++ b/src/hotspot/os/linux/os_linux.cpp -@@ -4505,14 +4505,16 @@ bool os::Linux::signal_handlers_are_inst +@@ -4567,14 +4567,16 @@ bool os::Linux::signal_handlers_are_inst // For signal-chaining struct sigaction sigact[NSIG]; @@ -21,7 +21,7 @@ struct sigaction* os::Linux::get_chained_signal_action(int sig) { struct sigaction *actp = NULL; -@@ -4587,7 +4589,7 @@ bool os::Linux::chained_handler(int sig, +@@ -4649,7 +4651,7 @@ bool os::Linux::chained_handler(int sig, } struct sigaction* os::Linux::get_preinstalled_handler(int sig) { @@ -30,7 +30,7 @@ return &sigact[sig]; } return NULL; -@@ -4596,7 +4598,7 @@ struct sigaction* os::Linux::get_preinst +@@ -4658,7 +4660,7 @@ struct sigaction* os::Linux::get_preinst void os::Linux::save_preinstalled_handler(int sig, struct sigaction& oldAct) { assert(sig > 0 && sig < NSIG, "vm signal out of expected range"); sigact[sig] = oldAct; diff -Nru openjdk-lts-11.0.3+7/debian/patches/riscv64.diff openjdk-lts-11.0.4+11/debian/patches/riscv64.diff --- openjdk-lts-11.0.3+7/debian/patches/riscv64.diff 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/patches/riscv64.diff 2019-07-02 13:10:27.000000000 +0000 @@ -0,0 +1,129 @@ +# HG changeset patch +# User enevill +# Date 1521985117 -3600 +# Sun Mar 25 14:38:37 2018 +0100 +# Node ID 7d1ae835ef5194e7ae5b56b51f944029fe602d11 +# Parent 1b1de4b263c81853719f6bb0385fe23bc4e35f6c +8199138: Add RISC-V support to Zero +Reviewed-by: aph, erikj, ehelin, ihse + +--- a/make/autoconf/build-aux/config.guess ++++ b/make/autoconf/build-aux/config.guess +@@ -27,6 +27,13 @@ + # autoconf system (which might easily get lost in a future update), we wrap it + # and fix the broken property, if needed. + ++machine=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown ++if test $machine = riscv64; then ++ # This is all we need to know for riscv64 ++ echo riscv64-unknown-linux-gnu ++ exit ++fi ++ + DIR=`dirname $0` + OUT=`. $DIR/autoconf-config.guess` + +--- a/make/autoconf/build-aux/config.sub ++++ b/make/autoconf/build-aux/config.sub +@@ -29,8 +29,8 @@ + + DIR=`dirname $0` + +-# First, filter out everything that doesn't begin with "aarch64-" +-if ! echo $* | grep '^aarch64-' >/dev/null ; then ++# First, filter out everything that doesn't begin with "aarch64-" or "riscv64-" ++if ! echo $* | grep '^aarch64-\|^riscv64-' >/dev/null ; then + . $DIR/autoconf-config.sub "$@" + # autoconf-config.sub exits, so we never reach here, but just in + # case we do: +@@ -45,6 +45,10 @@ while test $# -gt 0 ; do + config=`echo $1 | sed 's/^aarch64-/arm-/'` + sub_args="$sub_args $config" + shift; ;; ++ riscv64-* ) ++ config=`echo $1 | sed 's/^riscv64-/x86-/'` ++ sub_args="$sub_args $config" ++ shift; ;; + - ) # Use stdin as input. + sub_args="$sub_args $1" + shift; break ;; +@@ -57,7 +61,7 @@ done + result=`. $DIR/autoconf-config.sub $sub_args "$@"` + exitcode=$? + +-result=`echo $result | sed "s/^arm-/aarch64-/"` ++result=`echo $result | sed "s/^arm-/aarch64-/" | sed "s/^x86-/riscv64-/"` + + echo $result + exit $exitcode +--- a/make/autoconf/platform.m4 ++++ b/make/autoconf/platform.m4 +@@ -118,6 +118,12 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU + VAR_CPU_BITS=64 + VAR_CPU_ENDIAN=little + ;; ++ riscv64) ++ VAR_CPU=riscv64 ++ VAR_CPU_ARCH=riscv64 ++ VAR_CPU_BITS=64 ++ VAR_CPU_ENDIAN=little ++ ;; + s390) + VAR_CPU=s390 + VAR_CPU_ARCH=s390 +@@ -475,6 +481,8 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HEL + HOTSPOT_$1_CPU_DEFINE=SPARC + elif test "x$OPENJDK_$1_CPU" = xppc; then + HOTSPOT_$1_CPU_DEFINE=PPC32 ++ elif test "x$OPENJDK_$1_CPU" = xriscv64; then ++ HOTSPOT_$1_CPU_DEFINE=RISCV64 + elif test "x$OPENJDK_$1_CPU" = xs390; then + HOTSPOT_$1_CPU_DEFINE=S390 + elif test "x$OPENJDK_$1_CPU" = xs390x; then +--- a/src/hotspot/os/linux/os_linux.cpp ++++ b/src/hotspot/os/linux/os_linux.cpp +@@ -1808,6 +1808,9 @@ void * os::dll_load(const char *filename + #ifndef EM_AARCH64 + #define EM_AARCH64 183 /* ARM AARCH64 */ + #endif ++#ifndef EM_RISCV /* RISCV */ ++ #define EM_RISCV 243 ++#endif + + static const arch_t arch_array[]={ + {EM_386, EM_386, ELFCLASS32, ELFDATA2LSB, (char*)"IA 32"}, +@@ -1833,6 +1836,7 @@ void * os::dll_load(const char *filename + {EM_PARISC, EM_PARISC, ELFCLASS32, ELFDATA2MSB, (char*)"PARISC"}, + {EM_68K, EM_68K, ELFCLASS32, ELFDATA2MSB, (char*)"M68k"}, + {EM_AARCH64, EM_AARCH64, ELFCLASS64, ELFDATA2LSB, (char*)"AARCH64"}, ++ {EM_RISCV, EM_RISCV, ELFCLASS64, ELFDATA2LSB, (char*)"RISCV"}, + }; + + #if (defined IA32) +@@ -1849,6 +1853,8 @@ void * os::dll_load(const char *filename + static Elf32_Half running_arch_code=EM_PPC64; + #elif (defined __powerpc__) + static Elf32_Half running_arch_code=EM_PPC; ++#elif (defined RISCV) ++ static Elf32_Half running_arch_code=EM_RISCV; + #elif (defined AARCH64) + static Elf32_Half running_arch_code=EM_AARCH64; + #elif (defined ARM) +@@ -1869,7 +1875,7 @@ void * os::dll_load(const char *filename + static Elf32_Half running_arch_code=EM_SH; + #else + #error Method os::dll_load requires that one of following is defined:\ +- AARCH64, ALPHA, ARM, AMD64, IA32, IA64, M68K, MIPS, MIPSEL, PARISC, __powerpc__, __powerpc64__, S390, SH, __sparc ++ AARCH64, ALPHA, ARM, AMD64, IA32, IA64, M68K, MIPS, MIPSEL, PARISC, __powerpc__, __powerpc64__, S390, SH, __sparc, RISCV + #endif + + // Identify compatability class for VM's architecture and library's architecture +@@ -2502,6 +2508,8 @@ void os::get_summary_cpu_info(char* cpui + strncpy(cpuinfo, "IA64", length); + #elif defined(PPC) + strncpy(cpuinfo, "PPC64", length); ++#elif defined(RISCV) ++ strncpy(cpuinfo, "RISCV", length); + #elif defined(S390) + strncpy(cpuinfo, "S390", length); + #elif defined(SPARC) diff -Nru openjdk-lts-11.0.3+7/debian/patches/series openjdk-lts-11.0.4+11/debian/patches/series --- openjdk-lts-11.0.3+7/debian/patches/series 2019-04-17 03:00:11.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/patches/series 2019-07-02 13:10:27.000000000 +0000 @@ -1,3 +1,4 @@ +# jdk11u-dev-updates.diff system-pcsclite.diff hotspot-mips-align.diff icc_loading_with_symlink.diff @@ -34,9 +35,7 @@ reproducible-properties-timestamp.diff reproducible-javadoc-timestamp.diff Don-t-optimize-fdlibm-fork-for-Zero-on-linux-sparc-Z.patch -8214002.diff -jdk-improve-gtk3-compatibility.patch keep-gtk2-as-default.patch -8221083.diff jaw-classpath.diff jaw-optional.diff +riscv64.diff diff -Nru openjdk-lts-11.0.3+7/debian/patches/system-pcsclite.diff openjdk-lts-11.0.4+11/debian/patches/system-pcsclite.diff --- openjdk-lts-11.0.3+7/debian/patches/system-pcsclite.diff 2019-04-17 03:00:11.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/patches/system-pcsclite.diff 2019-05-14 23:15:15.000000000 +0000 @@ -52,7 +52,7 @@ +]) --- a/make/autoconf/spec.gmk.in +++ b/make/autoconf/spec.gmk.in -@@ -744,6 +744,7 @@ ENABLE_AOT:=@ENABLE_AOT@ +@@ -746,6 +746,7 @@ ENABLE_AOT:=@ENABLE_AOT@ ENABLE_INTREE_EC:=@ENABLE_INTREE_EC@ USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@ USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@ diff -Nru openjdk-lts-11.0.3+7/debian/patches/workaround_expand_exec_shield_cs_limit.diff openjdk-lts-11.0.4+11/debian/patches/workaround_expand_exec_shield_cs_limit.diff --- openjdk-lts-11.0.3+7/debian/patches/workaround_expand_exec_shield_cs_limit.diff 2019-04-17 03:00:11.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/patches/workaround_expand_exec_shield_cs_limit.diff 2019-05-14 23:15:15.000000000 +0000 @@ -6,17 +6,17 @@ void os::workaround_expand_exec_shield_cs_limit() { -#if defined(IA32) +#if defined(IA32) && !defined(ZERO) + assert(Linux::initial_thread_stack_bottom() != NULL, "sanity"); size_t page_size = os::vm_page_size(); - /* --- a/src/hotspot/os/linux/os_linux.cpp +++ b/src/hotspot/os/linux/os_linux.cpp -@@ -5054,7 +5054,7 @@ jint os::init_2(void) { - Linux::capture_initial_stack(JavaThread::stack_size_at_create()); +@@ -5111,7 +5111,7 @@ jint os::init_2(void) { + return JNI_ERR; } -#if defined(IA32) +#if defined(IA32) && !defined(ZERO) - workaround_expand_exec_shield_cs_limit(); - #endif - + // Need to ensure we've determined the process's initial stack to + // perform the workaround + Linux::capture_initial_stack(JavaThread::stack_size_at_create()); diff -Nru openjdk-lts-11.0.3+7/debian/patches/zero-x32.diff openjdk-lts-11.0.4+11/debian/patches/zero-x32.diff --- openjdk-lts-11.0.3+7/debian/patches/zero-x32.diff 2019-04-17 03:00:11.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/patches/zero-x32.diff 2019-05-14 23:15:15.000000000 +0000 @@ -1,6 +1,6 @@ --- a/src/hotspot/os/linux/os_linux.cpp +++ b/src/hotspot/os/linux/os_linux.cpp -@@ -1755,7 +1755,7 @@ void * os::dll_load(const char *filename +@@ -1752,7 +1752,7 @@ void * os::dll_load(const char *filename #if (defined IA32) static Elf32_Half running_arch_code=EM_386; diff -Nru openjdk-lts-11.0.3+7/debian/rules openjdk-lts-11.0.4+11/debian/rules --- openjdk-lts-11.0.3+7/debian/rules 2019-04-23 18:34:35.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/rules 2019-07-18 18:21:46.000000000 +0000 @@ -59,6 +59,10 @@ bootcycle_build = zbootcycle_build = endif +ifneq (,$(filter nobootcycle, $(DEB_BUILD_OPTIONS))) + bootcycle_build = + zbootcycle_build = +endif ifneq (,$(filter $(distrel),lucid precise quantal raring saucy trusty utopic vivid wily lenny etch squeeze wheezy jessie)) is_default = no @@ -66,6 +70,9 @@ is_default = yes endif +# FIXME: change that after the buster freeze for ea builds +is_upstream_release = yes + srcdir = . builddir = build zbuilddir = build-zero @@ -142,12 +149,18 @@ ifneq (,$(filter $(DEB_HOST_ARCH), alpha)) with_check = disabled running check on $(DEB_HOST_ARCH) endif +ifneq (,$(filter $(distrel), precise trusty)) + with_check = disabled for $(distrel) +endif with_docs = $(if $(findstring nodoc, $(DEB_BUILD_OPTIONS)),,yes) +ifneq (,$(filter $(distrel), precise trusty)) + with_docs = +endif with_wqy_zenhai = $(if $(filter $(distrel),lenny),,yes) -arch_map := alpha=alpha arm=arm armel=arm armhf=arm arm64=aarch64 amd64=amd64 hppa=parisc i386=i586 m68k=m68k mips=mips mipsel=mipsel mips64=mips64 mips64el=mips64el powerpc=ppc powerpcspe=ppc ppc64=ppc64 ppc64el=ppc64le sparc=sparc sparc64=sparcv9 sh4=sh s390x=s390x ia64=ia64 x32=x32 +arch_map := alpha=alpha arm=arm armel=arm armhf=arm arm64=aarch64 amd64=amd64 hppa=parisc i386=i586 m68k=m68k mips=mips mipsel=mipsel mips64=mips64 mips64el=mips64el powerpc=ppc powerpcspe=ppc ppc64=ppc64 ppc64el=ppc64le riscv64=riscv64 sparc=sparc sparc64=sparcv9 sh4=sh s390x=s390x ia64=ia64 x32=x32 jvmarch := $(strip $(patsubst $(DEB_HOST_ARCH_CPU)=%, %, \ $(filter $(DEB_HOST_ARCH_CPU)=%, $(arch_map)))) @@ -157,7 +170,7 @@ default_vm = $(if $(filter $(DEB_HOST_ARCH), $(hotspot_archs)),hotspot,zero) -any_archs = alpha amd64 armel armhf arm64 i386 ia64 mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64 +any_archs = alpha amd64 armel armhf arm64 i386 ia64 mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k riscv64 sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64 altzero_archs = $(hotspot_archs) ifneq (,$(filter $(distrel),trusty)) @@ -273,6 +286,9 @@ else ifneq (,$(filter $(distrel),artful bionic)) export CC = $(DEB_HOST_GNU_TYPE)-gcc-7 export CXX = $(DEB_HOST_GNU_TYPE)-g++-7 +else ifneq (,$(filter $(distrel),precise)) + export CC = $(DEB_HOST_GNU_TYPE)-gcc-8 + export CXX = $(DEB_HOST_GNU_TYPE)-g++-8 else export CC = $(DEB_HOST_GNU_TYPE)-gcc-8 export CXX = $(DEB_HOST_GNU_TYPE)-g++-8 @@ -284,9 +300,6 @@ export CXX = $(DEB_HOST_GNU_TYPE)-g++ endif -with_pulse = yes -with_pulse = - ifneq (,$(filter $(distrel),squeeze lucid)) with_bridge = bridge with_jni_bridge = yes @@ -327,10 +340,6 @@ EXTRA_BUILD_ENV += LIBFFI_LIBS=-lffi_pic -ifeq ($(with_pulse),yes) - CONFIGURE_ARGS += --enable-pulse-java -endif - CONFIGURE_ARGS += --enable-system-kerberos ifeq ($(with_nss),yes) @@ -361,9 +370,7 @@ ZERO_CONFIGURE_ARGS += --with-jvm-variants=zero DEFAULT_CONFIGURE_ARGS += --with-boot-jdk=$(BOOTJDK_HOME) -# FIXME: fails on some targets, e.g. ... -#ZERO_CONFIGURE_ARGS += --with-boot-jdk=$(BUILDJDK_HOME) -ZERO_CONFIGURE_ARGS += --with-boot-jdk=$(BOOTJDK_HOME) +ZERO_CONFIGURE_ARGS += --with-boot-jdk=$(BUILDJDK_HOME) COMMON_CONFIGURE_ARGS += --disable-ccache @@ -389,10 +396,39 @@ DEFAULT_CONFIGURE_ARGS += --with-jvm-features=zgc endif +ifeq ($(distribution),Debian) + COMMON_CONFIGURE_ARGS += \ + --with-vendor-name='$(distribution)' \ + --with-vendor-url='https://tracker.debian.org/$(basename)' \ + --with-vendor-bug-url='https://bugs.debian.org/$(basename)' \ + --with-vendor-vm-bug-url='https://bugs.debian.org/$(basename)' +else ifeq ($(distribution),Ubuntu) + ppa_build := $(shell if echo '$(v_pkgrel)' | egrep '^[0-9]+(ubuntu[0-9]+)?(~[0-9.]+)?$$'; then echo no; else echo yes; fi) + ifeq ($(ppa_build),yes) + COMMON_CONFIGURE_ARGS += \ + --with-vendor-name='Private Build' \ + --with-vendor-url='Unknown' \ + --with-vendor-bug-url='Unknown' \ + --with-vendor-vm-bug-url='Unknown' + else + COMMON_CONFIGURE_ARGS += \ + --with-vendor-name='$(distribution)' \ + --with-vendor-url='https://ubuntu.com/' \ + --with-vendor-bug-url='https://bugs.launchpad.net/ubuntu/+source/openjdk-lts' \ + --with-vendor-vm-bug-url='https://bugs.launchpad.net/ubuntu/+source/openjdk-lts' + endif +else + COMMON_CONFIGURE_ARGS += \ + --with-vendor-name='$(distribution)' \ + --with-vendor-url='Unknown' \ + --with-vendor-bug-url='Unknown' \ + --with-vendor-vm-bug-url='Unknown' +endif + COMMON_CONFIGURE_ARGS += \ - --with-version-pre='' \ + --with-version-pre='$(if $(filter yes, $(is_upstream_release)),,ea)' \ --with-version-build='$(v_upbuild)' \ - --with-version-opt='$(distribution)-$(v_pkgrel)' \ + --with-version-opt='post-$(distribution)-$(v_pkgrel)' \ COMMON_CONFIGURE_ARGS += \ --with-debug-level=release \ @@ -404,10 +440,18 @@ --with-libjpeg=system \ --with-lcms=system \ --with-pcsclite=system \ - --with-stdc++lib=dynamic \ --disable-warnings-as-errors \ --disable-javac-server \ +ifneq (,$(filter $(distrel),precise)) + # building with a GCC from a PPA ... + COMMON_CONFIGURE_ARGS += \ + --with-stdc++lib=static +else + COMMON_CONFIGURE_ARGS += \ + --with-stdc++lib=dynamic +endif + ifneq (,$(NJOBS)) COMMON_CONFIGURE_ARGS += --with-num-cores=$(NJOBS) endif @@ -466,7 +510,7 @@ ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64)) jdk_hl_tools += jaotc endif -ifeq (,$(filter $(DEB_HOST_ARCH), alpha armel ia64 m68k mips mipsel mips64el powerpc s390x x32)) +ifeq (,$(filter $(DEB_HOST_ARCH), alpha armel ia64 m68k mips mipsel mips64el powerpc riscv64 s390x x32)) jdk_hl_tools += jhsdb endif jdk_tools = jconsole @@ -477,16 +521,25 @@ jre_hl_tools := $(filter-out $(jre_tools), $(all_jre_tools)) # build dependencies -bd_autotools = autoconf, automake, autotools-dev, +ifneq (,$(filter $(distrel),precise)) + bd_autotools = autoconf2.69, automake, autotools-dev, +else + bd_autotools = autoconf, automake, autotools-dev, +endif -ifneq (,$(filter $(distrel),squeeze wheezy jessie precise trusty xenial)) +ifneq (,$(filter $(distrel),precise)) + bd_bootstrap = openjdk-10-jdk-headless | openjdk-11-jdk-headless, +else ifneq (,$(filter $(distrel),squeeze wheezy jessie trusty xenial)) bd_bootstrap = openjdk-10-jdk-headless:native | openjdk-11-jdk-headless:native, - else +else bd_bootstrap = openjdk-11-jdk-headless:native | openjdk-10-jdk-headless:native, endif ifeq (,$(filter $(distrel),squeeze wheezy jessie precise trusty xenial)) bd_cross += \ $(basename)-jdk-headless , +else + bd_cross += \ + file, endif ifneq (,$(filter $(distrel),squeeze wheezy jessie precise trusty)) @@ -510,6 +563,9 @@ bd_gcc = g++-6 , else ifneq (,$(filter $(distrel),artful bionic)) bd_gcc = g++-7 , +else ifneq (,$(filter $(distrel),precise)) + # FIXME: ftbfs on armhf with the default GCC + bd_gcc = g++-8, else bd_gcc = g++-8 , endif @@ -526,7 +582,7 @@ bd_openjdk = \ libxtst-dev, libxi-dev, libxt-dev, libxaw7-dev, libxrender-dev, libcups2-dev, \ libasound2-dev, liblcms2-dev, libfreetype6-dev (>= 2.2.1), \ - libxinerama-dev, libkrb5-dev, xsltproc, libpcsclite-dev, \ + libxinerama-dev, libkrb5-dev, xsltproc, libpcsclite-dev, libxrandr-dev, \ libelf-dev, libfontconfig1-dev, pkg_ffidev = libffi-dev @@ -539,9 +595,6 @@ bd_ant = ant, ant-optional, bd_fastjar = fastjar (>= 2:0.96-0ubuntu2), -ifeq ($(with_pulse),yes) - bd_pulsejava = libpulse-dev (>= 0.9.12), -endif ifeq ($(with_nss),yes) ifneq (,$(filter $(distrel),squeeze lucid precise quantal)) bd_nss = libnss3-dev (>= 3.12.3), @@ -555,14 +608,36 @@ bd_systemtap = systemtap-sdt-dev [!sh4], endif +ifeq (,$(filter $(distrel),precise)) + nocheck_profile = $(EMPTY) +endif + +bd_check = \ + jtreg$(nocheck_profile), testng$(nocheck_profile), \ + xvfb$(nocheck_profile), xauth$(nocheck_profile), \ + xfonts-base$(nocheck_profile), libgl1-mesa-dri [!x32]$(nocheck_profile), \ + xfwm4$(nocheck_profile), x11-xkb-utils$(nocheck_profile), \ + dbus-x11$(nocheck_profile), + +ifneq (,$(filter $(distrel),precise trusty xenial)) + # no jtreg backport yet + bd_check = file, +endif + dlopen_hl_depends = \ libcups2, liblcms2-2, -ifneq (,$(filter $(distrel),squeeze lucid)) - dlopen_hl_depends += libjpeg62, -else ifneq (,$(filter $(distrel), jessie stretch buster sid)) - dlopen_hl_depends += libjpeg62-turbo, +ifeq ($(derivative),Ubuntu) + ifneq (,$(filter $(distrel),lucid)) + dlopen_hl_depends += libjpeg62, + else + dlopen_hl_depends += libjpeg8, + endif else - dlopen_hl_depends += libjpeg8, + ifneq (,$(filter $(distrel),squeeze)) + dlopen_hl_depends += libjpeg62, + else + dlopen_hl_depends += libjpeg62-turbo, + endif endif dlopen_hl_depends += libfontconfig1, ifneq ($(with_nss),no) @@ -576,7 +651,12 @@ endif dlopen_hl_recommends = dlopen_jre_depends = \ - libglib2.0-0 (>= 2.24), libgtk2.0-0 | libgtk-3-0, libxrandr2, libxinerama1, libgl1-mesa-glx | libgl1 + libglib2.0-0 (>= 2.24), libgtk2.0-0 | libgtk-3-0, libxrandr2, libxinerama1, +ifneq (,$(filter $(distrel),squeeze wheezy jessie stretch lucid precise xenial)) + dlopen_jre_depends = libgl1-mesa-glx | libgl1, +else + dlopen_jre_depends = libgl1, +endif dlopen_jre_recommends = # .desktop files need to be multiarch installable @@ -610,6 +690,26 @@ cjk_fonts += fonts-indic, endif +jrehl_breaks = clojure1.8 (<= 1.8.0-7ubuntu1~), +ifneq (,$(filter $(distrel),buster bionic cosmic disco eoan)) + jrehl_breaks += \ + jetty9 (<< 9.4.15-1~), netbeans (<< 10.0-3~), visualvm (<< 1.4.2-2~), \ + eclipse-platform (<< 3.8.1-11), libequinox-osgi-java (<< 3.9.1), +endif +ifneq (,$(filter $(distrel),bionic cosmic disco eoan)) + jrehl_breaks += \ + tomcat8 (<< 8.5.39-1ubuntu1~), +endif +ifneq (,$(filter $(distrel),buster sid)) + jrehl_breaks += libreoffice-core (<< 1:6.1.5-2~), +else ifneq (,$(filter $(distrel),xenial)) + jrehl_breaks += libreoffice-core (<< 1:5.1.6~rc2-0ubuntu1~xenial7), +else ifneq (,$(filter $(distrel),bionic)) + jrehl_breaks += libreoffice-core (<< 1:6.0.7-0ubuntu0.18.04.6), +else ifneq (,$(filter $(distrel),disco)) + jrehl_breaks += libreoffice-core (<< 1:6.2.2-0ubuntu2), +endif + p_jre = $(basename)-jre p_jrehl = $(basename)-jre-headless p_jrez = $(basename)-jre-zero @@ -637,8 +737,6 @@ '-Vdlopenhl:Recommends=$(dlopen_hl_recommends)' \ '-Vdlopenjre:Depends=$(dlopen_jre_depends)' \ '-Vdlopenjre:Recommends=$(dlopen_jre_recommends)' \ - '-Vpkg:pulseaudio=$(pkg_pulseaudio)' \ - '-Vxulrunner:Depends=$(xulrunner_depends)' \ ifeq ($(with_bridge),atk) control_vars += '-Vbridge:Recommends=libatk-wrapper-java-jni (>= 0.30.4-0ubuntu2)' @@ -657,7 +755,11 @@ endif pkg_certs = ca-certificates-java -control_vars += '-Vcacert:Depends=$(pkg_certs)' +ifneq (,$(filter $(distrel), squeeze wheezy jessie stretch precise trusty xenial bionic cosmic disco)) + control_vars += '-Vcacert:Depends=$(pkg_certs)' +else + control_vars += '-Vcacert:Depends=$(pkg_certs) (>= 20190405~)' +endif ifneq (,$(filter $(distrel), squeeze wheezy jessie lucid precise quantal raring saucy trusty utopic vivid)) control_vars += '-Vmountpoint:Depends=initscripts' @@ -668,6 +770,8 @@ pkg_jcommon = java-common (>= 0.28) control_vars += '-Vjcommon:Depends=$(pkg_jcommon)' +control_vars += '-Vjrehl:Breaks=$(jrehl_breaks)' + debian/control: debian/control.in debian/rules @cp -p debian/control debian/control.old sed \ @@ -681,10 +785,10 @@ -e 's/@bd_gcc@/$(bd_gcc)/g' \ -e 's/@bd_syslibs@/$(bd_syslibs)/g' \ -e 's/@bd_fastjar@/$(bd_fastjar)/g' \ - -e 's/@bd_pulsejava@/$(bd_pulsejava)/g' \ -e 's/@bd_nss@/$(bd_nss)/g' \ -e 's/@bd_systemtap@/$(bd_systemtap)/g' \ -e 's/@bd_ant@/$(bd_ant)/g' \ + -e 's/@bd_check@/$(bd_check)/g' \ -e 's/@core_fonts@/$(core_fonts)/g' \ -e 's/@cjk_fonts@/$(cjk_fonts)/g' \ -e 's/@any_archs@/$(any_archs)/g' \ @@ -705,12 +809,13 @@ debian/tests/%.sh: debian/tests/%.in debian/rules sed \ - -e 's,@JDK_TO_TEST@,/$(basedir),g' \ + -e 's,@JDK_DIR@,/$(basedir),g' \ -e 's/@jtreg_archs@/$(jtreg_archs)/g' \ + -e 's:@doc_dir@:/usr/share/doc/$(p_jrehl)/:g' \ $< > $@; chmod +x $@ -gen-autopkgtests: debian/tests/jtreg-autopkgtest.sh +gen-autopkgtests: debian/tests/jtdiff-autopkgtest.sh debian/tests/jtreg-autopkgtest.sh packaging-files: for f in debian/*.in; do \ @@ -747,7 +852,6 @@ configure: stamps/configure stamps/configure: stamps/unpack @echo '========== $@ ==========' -ifeq (0,1) @echo "Build options: $(DEB_BUILD_OPTIONS), Processors: $$(nproc)" @echo '========== $@ ==========' -cat /proc/meminfo |egrep '^(Mem|Swap)' @@ -762,6 +866,7 @@ @echo '========== $@ ==========' mkdir -p bin +ifeq (0,1) ifeq (,$(filter $(DEB_HOST_ARCH), alpha amd64 arm64 hppa mips64 mips64el ppc64 ppc64el s390x sparc64 x32)) ( \ echo '#! /bin/sh'; \ @@ -775,12 +880,18 @@ echo "UNAME checks" uname -a endif +endif +ifneq (,$(filter $(distrel),precise)) + for i in autoreconf autoheader autoupdate autoscan autom4te ifnames autoconf; do \ + ln -sf /usr/bin/$${i}2.69 bin/$${i}; \ + done +endif + which autoconf /bin/uname -a lsb_release -a -cat /proc/sys/kernel/random/entropy_avail -endif mkdir -p stamps rm -rf $(builddir) mkdir -p $(builddir) @@ -803,33 +914,6 @@ touch $@ -stamps/sound-configure: stamps/build - @echo '========== $@ ==========' - rm -rf icedtea-sound - tar xf icedtea-sound.tar.xz - mv $$(tar tf icedtea-sound.tar.xz | head -1 | sed 's,/.*,,') \ - icedtea-sound - patch -p1 -R < debian/patches/icedtea-sound.diff - patch -p1 < debian/patches/icedtea-sound2.diff - if [ -x icedtea-sound/autogen.sh ]; then \ - cd icedtea-sound && ./autogen.sh; \ - fi - cd icedtea-sound && ./configure \ - --build=$(DEB_BUILD_GNU_TYPE) \ - --host=$(DEB_HOST_GNU_TYPE) \ - --disable-maintainer-mode \ - --with-jdk-home=$(BUILDJDK_HOME) \ - CPPFLAGS="$(EXTRA_CPPFLAGS_IT)" \ - CFLAGS="$(EXTRA_CFLAGS_IT)" \ - CXXFLAGS="$(EXTRA_CXXFLAGS_IT)" \ - LDFLAGS="$(EXTRA_LDFLAGS_IT)" - touch $@ - -stamps/sound-build: stamps/sound-configure - @echo '========== $@ ==========' - $(MAKE) -C icedtea-sound - touch $@ - stamps/unpack: : # apply some architecture specific patches ... ifeq ($(DEB_HOST_ARCH),alpha) @@ -861,10 +945,6 @@ stamps/build \ $(if $(filter $(DEB_HOST_ARCH),$(altzero_archs)),stamps/zero-build) -ifeq ($(with_pulse),yes) - build_stamps += stamps/sound-build -endif - build_stamps += stamps/jtreg-check-default pre-build: @@ -886,7 +966,7 @@ stamps/build: stamps/configure @echo '========== $@ ==========' -ifneq (,$(filter $(DEB_HOST_ARCH), alpha armel armhf ia64 m68k mips mipsel mips64 mips64el powerpc powerpcspe s390x sparc sparc64)) +ifneq (,$(filter $(DEB_HOST_ARCH), alpha armel armhf ia64 m68k mips mipsel mips64 mips64el powerpc powerpcspe riscv64 s390x sparc sparc64)) sh -c 'sh debian/buildwatch.sh $(CURDIR)/$(builddir) &' endif if $(EXTRA_BUILD_ENV) $(MAKE) -C $(builddir) $(build_target); then \ @@ -914,7 +994,9 @@ @echo '========== $@ ==========' mkdir -p $(builddir)/images/docs echo ' ' > $(builddir)/images/docs/index.html +ifeq ($(with_docs),yes) $(MAKE) -C $(builddir) docs +endif touch $@ stamps/jtreg-check-default: stamps/build @@ -965,13 +1047,10 @@ @echo "END jtreg-summary-$(VMNAME)" -for i in hotspot langtools jaxp jdk; do \ - test -f jtreg-test-output/check-$$i-$(VMNAME).log || continue; \ - for t in $$(egrep '^(FAILED|Error)' jtreg-test-output/check-$$i-$(VMNAME).log | grep -v '^Error: Some tests failed or other problems occurred.$$' | sed -e 's/.* \(.*\)\.[^.#]\+\(#id[0-9]*\)\?$$/\1\2/' -e 's/#id/_id/'); do \ - echo jtreg-test-output/$$i/JTwork/$$t.jtr; \ - done; \ + find jtreg-test-output/$$i/JTwork/ -name '*.jtr'; \ done | sort -u > jtreg-test-output/failed_tests-$(VMNAME).list; \ GZIP=-9vn tar --ignore-failed-read -C . -c -z -f jtreg-test-output/failed_tests-$(VMNAME).tar.gz -T jtreg-test-output/failed_tests-$(VMNAME).list - GZIP=-9vn tar -C . -c -z -f jtreg-test-output/jtreport-$(VMNAME).tar.gz jtreg-test-output/*/JTreport/ + GZIP=-9vn tar -C . -c -z -f jtreg-test-output/jtreport-$(VMNAME).tar.gz $$(find jtreg-test-output -name JTreport) else echo "jtreg harness not run for this build" > jtreg-test-output/jtreg_output-$(VMNAME) endif @@ -984,26 +1063,26 @@ check-hotspot: stamps/build mkdir -p jtreg-test-output/hotspot JTREG_OPTIONS=$(JTREG_OPTIONS) VMNAME=$(VMNAME) JDK_TO_TEST=$(builddir)/$(sdkimg) \ - AUTOPKGTEST_TMP=/tmp/ AUTOPKGTEST_ARTIFACTS=jtreg-test-output/hotspot/ \ + AUTOPKGTEST_TMP=/tmp/ AUTOPKGTEST_ARTIFACTS=jtreg-test-output/ \ $(TIME) debian/tests/hotspot | tee jtreg-test-output/$@.log check-langtools: stamps/build mkdir -p jtreg-test-output/langtools JTREG_OPTIONS=$(JTREG_OPTIONS) VMNAME=$(VMNAME) JDK_TO_TEST=$(builddir)/$(sdkimg) \ - AUTOPKGTEST_TMP=/tmp/ AUTOPKGTEST_ARTIFACTS=jtreg-test-output/langtools/ \ + AUTOPKGTEST_TMP=/tmp/ AUTOPKGTEST_ARTIFACTS=jtreg-test-output/ \ $(TIME) debian/tests/langtools | tee jtreg-test-output/$@.log check-jaxp: stamps/build mkdir -p jtreg-test-output/jaxp JTREG_OPTIONS=$(JTREG_OPTIONS) VMNAME=$(VMNAME) JDK_TO_TEST=$(builddir)/$(sdkimg) \ - AUTOPKGTEST_TMP=/tmp/ AUTOPKGTEST_ARTIFACTS=jtreg-test-output/langtools/ \ + AUTOPKGTEST_TMP=/tmp/ AUTOPKGTEST_ARTIFACTS=jtreg-test-output/ \ $(TIME) debian/tests/jaxp | tee jtreg-test-output/$@.log check-jdk: stamps/build mkdir -p jtreg-test-output/jdk JTREG_OPTIONS=$(JTREG_OPTIONS) VMNAME=$(VMNAME) JDK_TO_TEST=$(builddir)/$(sdkimg) \ - AUTOPKGTEST_TMP=/tmp/ AUTOPKGTEST_ARTIFACTS=jtreg-test-output/jdk/ \ + AUTOPKGTEST_TMP=/tmp/ AUTOPKGTEST_ARTIFACTS=jtreg-test-output/ \ $(TIME) debian/tests/jdk | tee jtreg-test-output/$@.log jtregcheck: $(TESTS_TO_RUN) @@ -1018,10 +1097,10 @@ dh_testdir dh_testroot rm -rf stamps build build-* jtreg-test-output - rm -rf icedtea-sound rm -rf autom4te.cache - rm -f bin/{jtreg.tmwrc,my-jtreg-run,my-xvfb-run} + rm -f bin/{jtreg.tmwrc,my-jtreg-run,my-xvfb-run,auto*,ifnames} rm -f buildwatch.pid + rm -f config.log configure.log dh_clean debian-clean: @@ -1059,13 +1138,6 @@ mkdir -p $(d)/$(basedir) cp -a $(builddir)/$(sdkimg)/* $(d)/$(basedir)/ -ifeq ($(with_pulse),yes) -# FIXME: ext no longer supported -# cp icedtea-sound/icedtea-sound.jar $(d)/$(basedir)/lib/ext/. -# cp icedtea-sound/build/native/libicedtea-sound.so \ -# $(d)/$(basedir)/lib/. -endif - chmod -R u+w $(d) : # use javaws from icedtea-netx @@ -1116,7 +1188,7 @@ else cp -p debian/accessibility.properties $(d)/$(basedir)/conf/ endif - cp -p debian/swing.properties $(d)/$(basedir)/lib/ + cp -p debian/swing.properties $(d)/$(basedir)/conf/ ifneq (,$(pkg_certs)) rm -f $(d)/$(basedir)/lib/security/cacerts @@ -1134,9 +1206,9 @@ conf/net.properties \ lib/psfontj2d.properties \ lib/psfont.properties.ja \ - lib/swing.properties \ lib/jfr/default.jfc \ lib/jfr/profile.jfc \ + conf/swing.properties \ conf/management/jmxremote.access \ conf/management/management.properties \ conf/security/java.policy \ @@ -1192,6 +1264,7 @@ echo '$(basedir)/lib/jli/libjli.so'; \ echo '$(basedir)/lib/ct.sym'; \ echo '$(basedir)/lib/jexec'; \ + echo '$(basedir)/lib/jspawnhelper'; \ echo '$(basedir)/lib/jrt-fs.jar'; \ echo '$(basedir)/release'; \ echo '$(basedir)/lib/tzdb.dat'; \ @@ -1231,7 +1304,7 @@ cd $(CURDIR)/$(d); \ for i in $(basedir)/lib/*.so; do \ case "$$i" in \ - */libjavagtk.so|*/libsplashscreen.so|*/libjsoundalsa.so|$(if $(with_pulse),*/libicedtea-sound.so|)*/xawt) echo $$i >> ../$(p_jre).install;; \ + */libjavagtk.so|*/libsplashscreen.so|*/libjsoundalsa.so|*/xawt) echo $$i >> ../$(p_jre).install;; \ */zero) echo $$i >> ../$(p_jrez).install;; \ *) echo $$i >> ../$(p_jrehl).install; \ esac; \ @@ -1429,10 +1502,12 @@ : # create docdir symlinks for $(p_jdk) ( \ echo usr/share/doc/$(p_jre) usr/share/doc/$(p_jdk); \ + echo $(TOP)/$(basename)/lib/src.zip $(TOP)/$(basename)/src.zip; \ ) > $(d_jdk).links # doesn't work, no package dependency ifneq (,$(DEB_HOST_MULTIARCH)) - echo '$(TOP)/$(basename)/src.zip $(basedir)/src.zip' >> $(d_jdkhl).links + echo '$(TOP)/$(basename)/src.zip $(basedir)/lib/src.zip' >> $(d_jdkhl).links + echo '$(TOP)/$(basename)/lib/src.zip $(basedir)/lib/src.zip' >> $(d_jdkhl).links endif : # create docdir symlinks for $(p_dbg) @@ -1573,7 +1648,7 @@ dh_builddeb -i $(nodocs) $(bd_options) absarchdir = $(CURDIR)/$(d_jrehl)/$(basedir)/lib -shlibdeps_ld_path =$(absarchdir):$(absarchdir)/client:$(absarchdir)/server:$(absarchdir)/native_threads$(if $(xulrunner_depends),:$(shell pkg-config --libs-only-L libxul | sed 's/^-L//;s/-devel//;s,/lib *$$,,')) +shlibdeps_ld_path =$(absarchdir):$(absarchdir)/client:$(absarchdir)/server:$(absarchdir)/native_threads # pass vm name as first argument define install_test_results @@ -1662,23 +1737,23 @@ is_release = yes hg_project = jdk11u -hg_tag = jdk-11.0.3+7 +hg_tag = jdk-11.0.4+11 package_version = $(subst jdk-,,$(hg_tag)) ifneq ($(is_release),yes) package_version := $(subst +,~,$(package_version)) endif -hg_url = http://hg.openjdk.java.net/jdk/$(hg_project) +hg_url = http://hg.openjdk.java.net/jdk-updates/$(hg_project) origdir = ../$(basename)-$(package_version).orig topdir = $(basename)-$(package_version) get-orig: mkdir $(origdir) wget -O $(origdir)/jdk.tar.bz2 $(hg_url)/archive/$(hg_tag).tar.bz2 -# cp -p ~/jdk.tar.bz2 $(origdir)/jdk.tar.bz2 set -ex; \ repo=jdk; \ d=$$(tar tf $(origdir)/$$repo.tar.bz2 | head -1 | sed 's,/.*,,'); \ tar xf $(origdir)/$$repo.tar.bz2; \ + chmod 755 $$d/configure; \ case $$repo in jdk) \ rm -v -rf $$d/src/java.base/share/native/libzip/zlib; \ find $$d/src/java.desktop/share/native/libjavajpeg \ diff -Nru openjdk-lts-11.0.3+7/debian/series openjdk-lts-11.0.4+11/debian/series --- openjdk-lts-11.0.3+7/debian/series 2017-11-19 15:40:49.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/series 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -autoconf-select.diff -system-pcsclite.diff -hotspot-mips-align.diff -icc_loading_with_symlink.diff -icedtea-override-redirect-compiz.patch -jdk-freetypeScaler-crash.diff -libpcsclite-dlopen.diff -jexec.diff -default-jvm-cfg.diff -workaround_expand_exec_shield_cs_limit.diff -adlc-parser.patch -multiple-pkcs11-library-init.patch -applet-hole.patch -m68k-support.diff -s390x-thread-stack-size.diff -jdk-getAccessibleValue.diff -zero-x32.diff -jtreg-location.diff -jdk-i18n-pt_BR.diff -mips-sigset.diff -disable-doclint-by-default.diff -hotspot-disable-exec-shield-workaround.diff -atk-wrapper-security.patch -dnd-files.patch -hotspot-powerpcspe.diff -hotspot-libpath.diff diff -Nru openjdk-lts-11.0.3+7/debian/tests/hotspot openjdk-lts-11.0.4+11/debian/tests/hotspot --- openjdk-lts-11.0.3+7/debian/tests/hotspot 2019-01-22 12:28:12.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/tests/hotspot 2019-07-18 18:21:46.000000000 +0000 @@ -4,9 +4,9 @@ set -o pipefail set -o nounset -debian/tests/jtreg-autopkgtest.sh \ +debian/tests/jtreg-autopkgtest.sh hotspot \ -exclude:test/hotspot/jtreg/ProblemList.txt \ -dir:test/hotspot/jtreg \ - :hotspot_compiler :hotspot_gc :hotspot_runtime :hotspot_serviceability + :hotspot_compiler :hotspot_gc :hotspot_runtime :hotspot_serviceability || true debian/tests/jtdiff-autopkgtest.sh hotspot diff -Nru openjdk-lts-11.0.3+7/debian/tests/jaxp openjdk-lts-11.0.4+11/debian/tests/jaxp --- openjdk-lts-11.0.3+7/debian/tests/jaxp 2019-01-22 12:28:12.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/tests/jaxp 2019-07-18 01:45:47.000000000 +0000 @@ -4,5 +4,5 @@ set -o pipefail set -o nounset -debian/tests/jtreg-autopkgtest.sh -exclude:test/jaxp/ProblemList.txt test/jaxp +debian/tests/jtreg-autopkgtest.sh jaxp -exclude:test/jaxp/ProblemList.txt test/jaxp || true debian/tests/jtdiff-autopkgtest.sh jaxp diff -Nru openjdk-lts-11.0.3+7/debian/tests/jdk openjdk-lts-11.0.4+11/debian/tests/jdk --- openjdk-lts-11.0.3+7/debian/tests/jdk 2019-01-22 12:28:12.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/tests/jdk 2019-07-18 01:46:11.000000000 +0000 @@ -22,5 +22,5 @@ debian/tests/start-xvfb.sh 10 & sleep 3 -debian/tests/jtreg-autopkgtest.sh -exclude:test/jdk/ProblemList.txt test/jdk:jdk_stable +debian/tests/jtreg-autopkgtest.sh jdk -exclude:test/jdk/ProblemList.txt test/jdk:jdk_stable || true debian/tests/jtdiff-autopkgtest.sh jdk diff -Nru openjdk-lts-11.0.3+7/debian/tests/jtdiff-autopkgtest.in openjdk-lts-11.0.4+11/debian/tests/jtdiff-autopkgtest.in --- openjdk-lts-11.0.3+7/debian/tests/jtdiff-autopkgtest.in 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/tests/jtdiff-autopkgtest.in 2019-07-18 17:49:06.000000000 +0000 @@ -0,0 +1,55 @@ +#!/bin/bash +set -o errexit +set -o errtrace +set -o pipefail +set -o nounset + +testsuite=$1 +shift + +if [ -z "${AUTOPKGTEST_TMP+x}" ] || [ -z "${AUTOPKGTEST_ARTIFACTS+x}" ]; then + echo "Environment variables AUTOPKGTEST_TMP and AUTOPKGTEST_ARTIFACTS must be set" >&2 + exit 1 +fi + +host_arch=${DEB_HOST_ARCH:-$(dpkg --print-architecture)} + +# force jtreg to use the JDK we depend on instead of default-java +export JT_JAVA=$(echo @JDK_DIR@ | sed "s/-[^-]*$/-$host_arch/") + +vmname=${VMNAME:-hotspot} + +jt_report_tb="@doc_dir@/test-${host_arch}/jtreport-${vmname}.tar.gz" + +if [ ! -f "${jt_report_tb}" ]; then + echo "Unable to compare jtreg results: no build jtreport found for ${vmname}/${host_arch}." + echo "Reason: '${jt_report_tb}' does not exist." + exit 77 +fi + +# create directories to hold the results +mkdir -p "${AUTOPKGTEST_ARTIFACTS}/${testsuite}" +mkdir -p "${AUTOPKGTEST_TMP}/openjdk-pkg-jtreg-report" + +current_report_dir="${AUTOPKGTEST_ARTIFACTS}/${testsuite}" +previous_report_dir="${AUTOPKGTEST_TMP}/openjdk-pkg-jtreg-report/${testsuite}" + +# extract testsuite results from openjdk package +[ -d "${previous_report_dir}" ] || \ + tar -xf "${jt_report_tb}" --strip-components=1 -C "${AUTOPKGTEST_TMP}/openjdk-pkg-jtreg-report" + + +jtdiff -o "${current_report_dir}/jtdiff.html" "${previous_report_dir}/JTreport" "${current_report_dir}/JTreport" || true +jtdiff "${previous_report_dir}/JTreport" "${current_report_dir}/JTreport" | tee "${current_report_dir}/jtdiff.txt" || true + +# create jdiff super-diff structure +jtdiff_dir="${AUTOPKGTEST_TMP}/jtdiff-${testsuite}/${host_arch}" +mkdir -p "${jtdiff_dir}/"{1,2} "${current_report_dir}/jtdiff-super" +ln -sf "${previous_report_dir}/"[0-9] "${jtdiff_dir}/1/" +ln -sf "${current_report_dir}/"[0-9] "${jtdiff_dir}/2/" + +# run jtdiff super-diff +jtdiff -o "${current_report_dir}/jtdiff-super/" -s "${AUTOPKGTEST_TMP}/jtdiff-${testsuite}/" || true + +# fail if we detect a regression +egrep '^pass +[^-]{3}' "${current_report_dir}/jtdiff.txt" && exit 1 diff -Nru openjdk-lts-11.0.3+7/debian/tests/jtdiff-autopkgtest.sh openjdk-lts-11.0.4+11/debian/tests/jtdiff-autopkgtest.sh --- openjdk-lts-11.0.3+7/debian/tests/jtdiff-autopkgtest.sh 2019-03-21 14:10:24.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/tests/jtdiff-autopkgtest.sh 2019-07-18 17:49:11.000000000 +0000 @@ -14,18 +14,12 @@ host_arch=${DEB_HOST_ARCH:-$(dpkg --print-architecture)} -# don't mess around with JT_* env vars. If JDK_TO_TEST is set, then the -# script is called from the build, if not, from the autopkg tests -if [ -z "$JDK_TO_TEST" ]; then - JDK_TO_TEST=@JDK_TO_TEST@ -fi -JVERSION=$($JDK_TO_TEST/bin/java -version 2>&1| sed -n '1s/.*"\(.*\)".*/\1/p') -JMAJOR=$(echo $JVERSION | sed 's/\..*//') +# force jtreg to use the JDK we depend on instead of default-java +export JT_JAVA=$(echo /usr/lib/jvm/java-11-openjdk-amd64 | sed "s/-[^-]*$/-$host_arch/") vmname=${VMNAME:-hotspot} -jt_report_tb="/usr/share/doc/openjdk-$JMAJOR-jdk/test-${host_arch}/jtreport-${vmname}.tar.gz" -build_report_dir="${AUTOPKGTEST_TMP}/jtreg-test-output/${testsuite}/JTreport" +jt_report_tb="/usr/share/doc/openjdk-11-jre-headless//test-${host_arch}/jtreport-${vmname}.tar.gz" if [ ! -f "${jt_report_tb}" ]; then echo "Unable to compare jtreg results: no build jtreport found for ${vmname}/${host_arch}." @@ -33,9 +27,29 @@ exit 77 fi -# extract testsuite results from original openjdk build -[ -d "${build_report_dir}" ] || \ - tar -xf "${jt_report_tb}" -C "${AUTOPKGTEST_TMP}" +# create directories to hold the results +mkdir -p "${AUTOPKGTEST_ARTIFACTS}/${testsuite}" +mkdir -p "${AUTOPKGTEST_TMP}/openjdk-pkg-jtreg-report" + +current_report_dir="${AUTOPKGTEST_ARTIFACTS}/${testsuite}" +previous_report_dir="${AUTOPKGTEST_TMP}/openjdk-pkg-jtreg-report/${testsuite}" + +# extract testsuite results from openjdk package +[ -d "${previous_report_dir}" ] || \ + tar -xf "${jt_report_tb}" --strip-components=1 -C "${AUTOPKGTEST_TMP}/openjdk-pkg-jtreg-report" + + +jtdiff -o "${current_report_dir}/jtdiff.html" "${previous_report_dir}/JTreport" "${current_report_dir}/JTreport" || true +jtdiff "${previous_report_dir}/JTreport" "${current_report_dir}/JTreport" | tee "${current_report_dir}/jtdiff.txt" || true + +# create jdiff super-diff structure +jtdiff_dir="${AUTOPKGTEST_TMP}/jtdiff-${testsuite}/${host_arch}" +mkdir -p "${jtdiff_dir}/"{1,2} "${current_report_dir}/jtdiff-super" +ln -sf "${previous_report_dir}/"[0-9] "${jtdiff_dir}/1/" +ln -sf "${current_report_dir}/"[0-9] "${jtdiff_dir}/2/" + +# run jtdiff super-diff +jtdiff -o "${current_report_dir}/jtdiff-super/" -s "${AUTOPKGTEST_TMP}/jtdiff-${testsuite}/" || true -jtdiff -o "${AUTOPKGTEST_ARTIFACTS}/jtdiff.html" "${build_report_dir}" "${AUTOPKGTEST_ARTIFACTS}/JTreport" || true -jtdiff "${build_report_dir}" "${AUTOPKGTEST_ARTIFACTS}/JTreport" | tee "${AUTOPKGTEST_ARTIFACTS}/jtdiff.txt" +# fail if we detect a regression +egrep '^pass +[^-]{3}' "${current_report_dir}/jtdiff.txt" && exit 1 diff -Nru openjdk-lts-11.0.3+7/debian/tests/jtreg-autopkgtest.in openjdk-lts-11.0.4+11/debian/tests/jtreg-autopkgtest.in --- openjdk-lts-11.0.3+7/debian/tests/jtreg-autopkgtest.in 2019-03-21 14:10:24.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/tests/jtreg-autopkgtest.in 2019-07-18 17:49:06.000000000 +0000 @@ -4,17 +4,20 @@ set -o pipefail set -o nounset +testsuite=$1 +shift + if [ -z "${AUTOPKGTEST_TMP+x}" ] || [ -z "${AUTOPKGTEST_ARTIFACTS+x}" ]; then echo "Environment variables AUTOPKGTEST_TMP and AUTOPKGTEST_ARTIFACTS must be set" >&2 exit 1 fi -host_arch=${DEB_HOST_ARCH:-$(dpkg --print-architecture)} +host_arch="${DEB_HOST_ARCH:-$(dpkg --print-architecture)}" -# don't mess around with JT_* env vars. If JDK_TO_TEST is set, then the -# script is called from the build, if not, from the autopkg tests -if [ -z "$JDK_TO_TEST" ]; then - JDK_TO_TEST=$(echo @JDK_TO_TEST@ | sed "s/-[^-]*$/-$host_arch/") +# force jtreg to use the JDK we depend on instead of default-java +export JT_JAVA=$(echo @JDK_DIR@ | sed "s/-[^-]*$/-$host_arch/") +if [ -z "${JDK_TO_TEST+x}" ]; then + JDK_TO_TEST=$JT_JAVA fi jtreg_version="$(dpkg-query -W jtreg | cut -f2)" @@ -35,7 +38,7 @@ fi # restrict the tests to a few archs (set from debian/rules) -if ! echo "${host_arch}" | grep -E "^($(echo @jtreg_archs@ | tr ' ' '|'))$"; then +if ! echo "${host_arch}" | grep -qE "^($(echo @jtreg_archs@ | tr ' ' '|'))$"; then echo "Error: ${host_arch} is not on the jtreg_archs list, ignoring it." exit 77 fi @@ -43,7 +46,7 @@ jtreg_processes() { ps x -ww -o pid,ppid,args \ | awk '$2 == 1 && $3 ~ /^\/scratch/' \ - | sed "s,${JDK_DIR},,g;s,$(pwd),,g" + | sed "s,${JDK_TO_TEST},,g;s,$(pwd),,g" } jtreg_pids() { @@ -78,14 +81,43 @@ trap "cleanup" EXIT INT TERM ERR -jtreg ${jt_options} \ - -verbose:summary \ - -automatic \ - -retain:none \ - -ignore:quiet \ - -agentvm \ - -timeout:5 \ - -workDir:"${AUTOPKGTEST_ARTIFACTS}/JTwork" \ - -reportDir:"${AUTOPKGTEST_ARTIFACTS}/JTreport" \ - -jdk:${JDK_TO_TEST} \ - $@ +jtwork_dir="${AUTOPKGTEST_TMP}/${testsuite}/JTwork" +output_dir="${AUTOPKGTEST_ARTIFACTS}/${testsuite}/" + +# retry tests with "fail" or "error" status at most 3 times +for i in 0 1 2 3; do + # save each try under its own folder to preserve history + report_path="${i}/JTreport" + report_dir="${output_dir}/${report_path}" + jtreg ${jt_options} \ + -verbose:summary \ + -automatic \ + -retain:none \ + -ignore:quiet \ + -agentvm \ + -timeout:5 \ + -workDir:"${jtwork_dir}" \ + -reportDir:"${report_dir}" \ + -jdk:${JDK_TO_TEST} \ + ${on_retry:-} $@ \ + && exit_code=0 && break || exit_code=$? + + # break if jtdiff reports no difference from previous run + # also deletes the just created JTreport + # DISABLED: don't use it for now as flaky tests could still pass given more retries + #jtdiff "${output_dir}/JTreport" "$report_dir" >/dev/null 2>&1 \ + # && rm -rf "${report_dir}" && break + + # link latest JTreport to output_dir + ln -sf -t "${output_dir}" "$report_path" + on_retry="-status:fail,error" +done + +# copy .jtr files from failed tests for latter debugging +find "${jtwork_dir}" -name '*.jtr' -exec egrep -q '^execStatus=[^Pass]' {} \; -printf "%P\n" \ + | while IF= read -r jtr; do + mkdir -p "$(dirname "${output_dir}/JTwork/${jtr}")" + cp "${jtwork_dir}/${jtr}" "${output_dir}/JTwork/$jtr" + done + +exit $exit_code diff -Nru openjdk-lts-11.0.3+7/debian/tests/jtreg-autopkgtest.sh openjdk-lts-11.0.4+11/debian/tests/jtreg-autopkgtest.sh --- openjdk-lts-11.0.3+7/debian/tests/jtreg-autopkgtest.sh 2019-04-23 18:34:35.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/tests/jtreg-autopkgtest.sh 2019-07-18 17:49:11.000000000 +0000 @@ -4,17 +4,20 @@ set -o pipefail set -o nounset +testsuite=$1 +shift + if [ -z "${AUTOPKGTEST_TMP+x}" ] || [ -z "${AUTOPKGTEST_ARTIFACTS+x}" ]; then echo "Environment variables AUTOPKGTEST_TMP and AUTOPKGTEST_ARTIFACTS must be set" >&2 exit 1 fi -host_arch=${DEB_HOST_ARCH:-$(dpkg --print-architecture)} +host_arch="${DEB_HOST_ARCH:-$(dpkg --print-architecture)}" -# don't mess around with JT_* env vars. If JDK_TO_TEST is set, then the -# script is called from the build, if not, from the autopkg tests -if [ -z "$JDK_TO_TEST" ]; then - JDK_TO_TEST=$(echo /usr/lib/jvm/java-11-openjdk-amd64 | sed "s/-[^-]*$/-$host_arch/") +# force jtreg to use the JDK we depend on instead of default-java +export JT_JAVA=$(echo /usr/lib/jvm/java-11-openjdk-amd64 | sed "s/-[^-]*$/-$host_arch/") +if [ -z "${JDK_TO_TEST+x}" ]; then + JDK_TO_TEST=$JT_JAVA fi jtreg_version="$(dpkg-query -W jtreg | cut -f2)" @@ -35,7 +38,7 @@ fi # restrict the tests to a few archs (set from debian/rules) -if ! echo "${host_arch}" | grep -E "^($(echo amd64 i386 arm64 armhf ppc64 ppc64el sparc64 s390x kfreebsd-amd64 kfreebsd-i386 alpha ia64 powerpc powerpcspe ppc64 sh4 x32 | tr ' ' '|'))$"; then +if ! echo "${host_arch}" | grep -qE "^($(echo amd64 i386 arm64 armhf ppc64 ppc64el sparc64 s390x kfreebsd-amd64 kfreebsd-i386 alpha ia64 powerpc powerpcspe ppc64 sh4 x32 | tr ' ' '|'))$"; then echo "Error: ${host_arch} is not on the jtreg_archs list, ignoring it." exit 77 fi @@ -43,7 +46,7 @@ jtreg_processes() { ps x -ww -o pid,ppid,args \ | awk '$2 == 1 && $3 ~ /^\/scratch/' \ - | sed "s,${JDK_DIR},,g;s,$(pwd),,g" + | sed "s,${JDK_TO_TEST},,g;s,$(pwd),,g" } jtreg_pids() { @@ -78,14 +81,43 @@ trap "cleanup" EXIT INT TERM ERR -jtreg ${jt_options} \ - -verbose:summary \ - -automatic \ - -retain:none \ - -ignore:quiet \ - -agentvm \ - -timeout:5 \ - -workDir:"${AUTOPKGTEST_ARTIFACTS}/JTwork" \ - -reportDir:"${AUTOPKGTEST_ARTIFACTS}/JTreport" \ - -jdk:${JDK_TO_TEST} \ - $@ +jtwork_dir="${AUTOPKGTEST_TMP}/${testsuite}/JTwork" +output_dir="${AUTOPKGTEST_ARTIFACTS}/${testsuite}/" + +# retry tests with "fail" or "error" status at most 3 times +for i in 0 1 2 3; do + # save each try under its own folder to preserve history + report_path="${i}/JTreport" + report_dir="${output_dir}/${report_path}" + jtreg ${jt_options} \ + -verbose:summary \ + -automatic \ + -retain:none \ + -ignore:quiet \ + -agentvm \ + -timeout:5 \ + -workDir:"${jtwork_dir}" \ + -reportDir:"${report_dir}" \ + -jdk:${JDK_TO_TEST} \ + ${on_retry:-} $@ \ + && exit_code=0 && break || exit_code=$? + + # break if jtdiff reports no difference from previous run + # also deletes the just created JTreport + # DISABLED: don't use it for now as flaky tests could still pass given more retries + #jtdiff "${output_dir}/JTreport" "$report_dir" >/dev/null 2>&1 \ + # && rm -rf "${report_dir}" && break + + # link latest JTreport to output_dir + ln -sf -t "${output_dir}" "$report_path" + on_retry="-status:fail,error" +done + +# copy .jtr files from failed tests for latter debugging +find "${jtwork_dir}" -name '*.jtr' -exec egrep -q '^execStatus=[^Pass]' {} \; -printf "%P\n" \ + | while IF= read -r jtr; do + mkdir -p "$(dirname "${output_dir}/JTwork/${jtr}")" + cp "${jtwork_dir}/${jtr}" "${output_dir}/JTwork/$jtr" + done + +exit $exit_code diff -Nru openjdk-lts-11.0.3+7/debian/tests/langtools openjdk-lts-11.0.4+11/debian/tests/langtools --- openjdk-lts-11.0.3+7/debian/tests/langtools 2019-01-22 12:28:12.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/tests/langtools 2019-07-18 18:21:46.000000000 +0000 @@ -4,5 +4,5 @@ set -o pipefail set -o nounset -debian/tests/jtreg-autopkgtest.sh -exclude:test/langtools/ProblemList.txt -dir:test/langtools jdk tools lib +debian/tests/jtreg-autopkgtest.sh langtools -exclude:test/langtools/ProblemList.txt -dir:test/langtools jdk tools lib || true debian/tests/jtdiff-autopkgtest.sh langtools diff -Nru openjdk-lts-11.0.3+7/debian/upstream/signing-key.asc openjdk-lts-11.0.4+11/debian/upstream/signing-key.asc --- openjdk-lts-11.0.3+7/debian/upstream/signing-key.asc 2019-04-23 04:47:55.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/upstream/signing-key.asc 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQINBFyMD3kBEAD18oB8geIaLlD+8SGiIQ09svLWfcVuSAHafYR8Yq7niFB4eMUJ -2eR3PfkPgruHnhr1hDWtkcFobSxAb88g47M1dZPLyVFJQ09cy9kznTCSoNz/RPQr -Uq8G8lOGVbs7EN6iOZBGJvFnGGfY5+uOgiY+2t9cgX6CGzNYE8mJ42Ya+oNeE1fP -9xdgq6x73NLlNXXKfkOQ8LHusb4AThcnS4DtIQSz6IeJUh/R4V8NL0skVCX8YhJq -2LM/u3AdPWEuLIzj+egzYE3nwPD3FgfEFqYnjsfQmB44kpXw6oDOc8lenv72fFDL -Ygr0znVkyLFcuW9w/nIDNXxERFu6+QpiRRZiq38hnorZZpl3LFhAftBbFrfRwQX4 -5NPVJFv5KlsZHbj3JpaQXMKPhcAKf/krodEazF8mph2Q4MPeaTBVpWniwWjKxmMF -ET9ne0yUIk3Zmc4ktIOxcC45dKqQ4TFmfENUPuMdR0nMfbfBO7MkN+LjC7n7sQFQ -/FqEbwptnpciBbg3wB6vx7wzhVNvf+UksMWef9muESmmgqguCs6C57oBrYnOcheb -RljMGnQeqUUUF/6VO+van5M13IcJQc81TP9Nf3jnmmb1YplE9elxAbKv+jGS0i63 -o0QFdkcTB8W11AhCAh/qZZNAhO/GLvxZWeRLFzQNYXSrsNH088JykimhTwARAQAB -tDFPcGVuSkRLIFRlYW0gLSBSZWQgSGF0LCBJbmMuIDxvcGVuamRrQHJlZGhhdC5j -b20+iHUEEBYKAB0WIQRRMled0VQO0j4ExaDP2g+bNZZCIgUCXJJ8JAAKCRDP2g+b -NZZCIsRlAP0QaLY2R50rKxduIhz0BQawikqYshcDDOE1ni099DQuWgEAj/YzZVyJ -jnGWNLzQhOgt0atIVnZiUhvWQtYyEG4/uQCJARwEEAEIAAYFAlySjmYACgkQpc1g -NTMvpnG+LwgAi+azaAKgFkepDprKmtblWPlyyyncapsuKXwerGc5MrxkXS9l7x/C -i3q1DcBvmH/+PXzIJWPj21i+9ZMdkJV5xM0zetCCwhGatAvF8nOuZVioLNfzJCeR -EdUyfSSGnnrMwP+USWEtTB6CW+iWQWoLT+vXuAXwq7QuWickxEdiSdgD7KSbUmE7 -+5zCnmBuYtrIifti4HqfTzzr8lDc1cG8WYiyuUHecpl8ZbNLvyCJip3+0S/+PQTd -KfNAbV5J9a9enXk7VZGSEl9h52sG28R9/0nFOXKmzytJnO42O96jAYYa1f158+st -xkZojlMS5XqHhVfOA4dDLOTi7xyJ06b3W4kBIgQQAQgADAUCXKqPIQUDABJ1AAAK -CRCXELibyletfF1xB/41lEFoby+9gmNQnoUkanYPYGG7GLx8tWQhS8qX3jDiLmdX -DlBjgsHv5qW3Cly9WxXZ2FF11ladfO74fhXa6gQ7njzN8rF64/7xduUJDqIDeTja -Mz6Bjw+mwhjQrQCsnNWgAfhuRs+i7KmbvxDRAC/NzVx4adGnywqzG7i3/Tjk7jxR -yUOoMufXUzENj1ww3WeJsqrcvXdR9xdp86egPgrOngtCDZvnDSZT7y8YRShkh3FW -gpzsFukLVRWsI5KWcCv0b/k2U5NHoX/82MDzlUyTydvZ/U6afG1vyWv1Z4Q+FD3e -xH6yzguwF4L0C0I+uFLjfe5tfGkQPFYKwa5++GXYiQI3BBMBCgAhBQJcjA95Ahsh -BQsJCAcDBRUKCQgLBRYCAwEAAh4BAheAAAoJEJLvjTncExaP3+QQAKsQb6wXNmZb -SkdHwfqdW2Hjh/K4Ly/ZruqlkdxhshwvPh6zpT1ZnRlQ+0IjBCVv8RWX+g0iZuAt -a7SijZpFLFcpquCc9JS+T8q6ULTNor0mL8kjV6Ow7axy9fTYEdQb1S/FduVw1RjQ -uUz7mp6HutDJ4/q+CYwhQsRFT39uae20Y2eozg5XptctUxen1ehTLJO/GgqrR4+f -kFW/3qJQtvFzppI7hOUG1u4KkTK+Xa9HEWxgQonkdKLMhQhKrdl2ZjmeUSTyNK3l -a+MxbUMpvB+Ed/JM+dC5EbpiLOSlSzpaRoLBZy8kPE6Pn30Mpmv59yTbtJOWgBaI -H1CGureoXudePnfsKR32ulxOBWdOUtz2nMv6El6oDTBOpx+En3Bi0sJx+GNbJJXG -6smBRbmlbYqifdPPc48hYDVk3Zpm52ebcAcUUBPpaAAVln7DNldqLpvEVCozWCdx -84GHHX89m+ZUV5jihhkCGfoQpSiZrdcZzZB2C8lL+02zO70gRWpEN0rXuEOapDrM -NIsqumNJBpZdvS50b16XM5jF7a8xfIzAE8zQMeVXQsUU1GHzkYblVWFF6ABOu9Iu -L4PIAdAY6H5nD3aIBVUXL9loCspxkvhqQauhls2no5jt7vjFMBsTTITfA9XE+4uO -jvJK5xvUkqZjBZYe24//USppA4P+rUfxuQINBFyMD8YBEADOF70Gf5vODzHkRY9J -IRxOFpyAbaRrbpBazkMYDpnfO9XDSHJsC8+pT5A1aJFs4QsV+aN3AL9jnhYTbIFI -bFVYPNefyOimGaX5tRnVnt3ATPqWzFGjVES2HDZIP+12ADeDNSg8071QgaKjur0z -oSv/w49t7gUNp7M70vSPdLqKeIhDSNawBiGQzXo/7J/fsFfgMWFeBmSY0rT1qWLn -Xj0A/Eyovs4gnAGkL+QABi5GhJ033mIvE+wYVRCnNm6TNt2gOF+UGauTyK0jE+Mv -pPI2cgBAB3G7S5P/2vc0pzmLVACZeo1IJrMl5JR+VX0HI0PmGUTP2Uz6alE8rWek -J7+V8RkVWNyxKAnMaxbPRWbDpjJKq/jt/P9KRVr9mN6b77U7pYfeFcPCbq07ZiE8 -oU4Ust1hOkle6ICuywaRZ+fagBgrfS0nYw61hfNOsB4dSaQdWSbxpl+2xypmEDUl -N5hO+7TT1/gez2cf2FhZxS1PJomXkL4i8cIhNaXbhOiOJZuuvv4BcLMw/D9M6MLC -8ew47/OEVqBTj1tFnihCO2REgyW+kMxWLVIQ+pV0D/1h5f9pNwYr5AHFRnfibaLg -0iLs5qRQB4qCE1sonedCrnuVc2ayOGnYPVr0MZ/3h/H7SkE0aNGYR/iEvPYSDjT2 -XIfxsUecUf0BrmBKBcGI8xuw1wARAQABiQREBBgBCgAPBQJcjA/GAhsCBQkHhM4A -AikJEJLvjTncExaPwV0gBBkBCgAGBQJcjA/GAAoJEMsmq8Kf8y43UKAQAMt7l6Tt -5TMrPWgBTrOnUIMAdE57o8uMP7m6hUuagT3virPXRGKdBQdN5WbfanjQJ1CukW+y -lZsQdPI52y71DSoReTQa0RtbYbUb2yX3KEkDDvvIJbu8+l2UKu3OXAtxAOupr0lL -oAJGQuW751D6N+3Bxxh8YUgzaFkzevTLi3Tt6tmnz5UT3VnYUNv2AqgyiPFXJIRt -SGBMukMchwGdedJdCe7AaaQBvgDvO5yvOwI40MEeGEG7Myt4JpjhItMtDG1btL+P -k0s6G8RYK024as6K8X8OXZmLZB5tjsYcnqPjc565dYOJ1RKqhMbsSFXxDREKyKFy -EYmu5WjTKyWK9UmZyNFllqgMYYVW4dBN1uWGKPBnJlf85AsJ/08P4771emDg438B -YPwQiUPWCStMWhgnaAO6gu0nWePgUrRP0wlP/Eu3GiW34cpnteZRKeNoyfhQa+MJ -AUcdWHX30qw2hS3wg3RRC4F1+pQjoFeZ9tc0ggS2Pc8sWLPBMbD2qDV5w8e300Oe -FlV0nKr7YR2vyLpUe9mNamS8WlT7pgoz4Lo/AZ5ouErLv1BsihXgags2Lw8iGB9+ -viQX3d67qYKk2L/DDESS+rJetHc++TiEq1JTBKFpVv5mHnJlhxS1hqiL9lv1Pj44 -JgST4x5D6X9RK7MsbGuS8cjF0dYKOoSIF/xXveQP/3OQ4zImObLokf3OoX5+ckAr -UE0+oUrVuSaS9vAOM/8REJtEYjomkEKbkanGGmXYhY2boc71VLJue0nISKgRPIQ/ -OZgIZMHJ1M+7OmqmzTZtQcV8I4XT8qJG0oDBocbiMnRWXqIGIsU7EO2M7R3pvDiz -6bERjv7MG48aGL7+5N7OjmQEMu1+5sgqB0dgJF+uMXvfO4WGcTBlYTqsuN3GdEmv -Jp3eMddrzhjgWPsuteOK18niy8ASKWkD7QykNOnUrVrunZOIa5qAaz7Kulj359ws -notabSwzDl9I7Zd7LaK4OAYkIYXtT2HFoGKvJT6ylFAwH9Rl3yUFp13UfKtl+K18 -GBcyOdKL4ERPVrqH78SDRCWxg5oTcuRH1ihe4S0wdVKTPmnCKgekYRMle58/Zdj1 -seeV0mYqq+P8X7yg8juvkzLDBsavy8zOZxOiNx5Ad6AOK6JCQaBVB6LT+RuOXhLS -ZWqksP/6M+yvFraGNxVA5NGQGVwlrc4ZnOSkSwLZL7NKG2LQy2oAdXWBb7TE0X1q -kP0UD5wicjH5EV+KlUGaRyN3R87Xz0f5jHUfPOI4kzlGogcbhyKbcvB6qV6iMhEN -KBsOBCz3IS2MgB0em0DE5NuSioRyDfqniWLyS5G1Ar9VdfSqfx9QUXP0r0E1d22P -7iX90+bpX0c/CMJbcA7a -=fYyM ------END PGP PUBLIC KEY BLOCK----- diff -Nru openjdk-lts-11.0.3+7/debian/watch openjdk-lts-11.0.4+11/debian/watch --- openjdk-lts-11.0.3+7/debian/watch 2019-04-23 04:49:47.000000000 +0000 +++ openjdk-lts-11.0.4+11/debian/watch 2019-05-29 06:10:51.000000000 +0000 @@ -1,12 +1,4 @@ -# -# For now it is using the unmodified upstream -# tarball while previously the use of get-orig -# from the debian/rules file would remove a -# few files from it - this can be replicated -# by either providing a repack script or by -# adding the exclusions directly to -# debian/copyright. -# version=4 -opts=pgpmode=auto https://openjdk-sources.osci.io/openjdk11/ openjdk@ANY_VERSION@@ARCHIVE_EXT@ - +opts="pagemangle=s{\s*(jdk-11\.[^<\s]*)}{$1}g" \ +https://hg.openjdk.java.net/jdk-updates/jdk11u/tags \ +.*/jdk-(.*).tar.gz diff -Nru openjdk-lts-11.0.3+7/.gitignore openjdk-lts-11.0.4+11/.gitignore --- openjdk-lts-11.0.3+7/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.4+11/.gitignore 2019-05-03 00:43:26.000000000 +0000 @@ -0,0 +1,15 @@ +/build/ +/dist/ +/.idea/ +nbproject/private/ +/webrev +/.src-rev +/.jib/ +.DS_Store +.metadata/ +.recommenders/ +test/nashorn/script/external +test/nashorn/lib +NashornProfile.txt +**/JTreport/** +**/JTwork/** diff -Nru openjdk-lts-11.0.3+7/.hg_archival.txt openjdk-lts-11.0.4+11/.hg_archival.txt --- openjdk-lts-11.0.3+7/.hg_archival.txt 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/.hg_archival.txt 2019-05-03 00:43:26.000000000 +0000 @@ -1,5 +1,5 @@ repo: fd16c54261b32be1aaedd863b7e856801b7f8543 -node: 175eb80c253addb5b49a91c53daa7e204f124581 +node: 6a4d57474e1c971cccf4165b3d9d023928510010 branch: default -tag: jdk-11.0.3+7 -tag: jdk-11.0.3-ga +tag: jdk-11.0.4+11 +tag: jdk-11.0.4-ga diff -Nru openjdk-lts-11.0.3+7/.hgtags openjdk-lts-11.0.4+11/.hgtags --- openjdk-lts-11.0.3+7/.hgtags 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/.hgtags 2019-05-03 00:43:26.000000000 +0000 @@ -533,6 +533,7 @@ a01e0cc0105972acc3b5e213dbe2b84acaee5be3 jdk-11.0.2-ga 0000000000000000000000000000000000000000 jdk-11.0.2-ga 144d476b6efe527c5e9ebf19af93398913c5450f jdk-11.0.2-ga +cd1c042181e934a1a91f9ee59a0066f64c8bad7a jdk-11.0.4+0 98e7354165d3a2443a8b845a5a526cc55d1b0dd7 jdk-11.0.3+0 cd1c042181e934a1a91f9ee59a0066f64c8bad7a jdk-11.0.3+1 9de3f198995c6c384fd6431c97089c311ec6a7ff jdk-11.0.3+2 @@ -540,3 +541,15 @@ 43d6759c3b2e36c1118e9753a080372294e1f17a jdk-11.0.3+4 c9865fee1a6d39a7bd2a5313f54c812d9a0852f5 jdk-11.0.3+5 8e139b8b4f62c0a1c4b13fa216f6fd975df81c1c jdk-11.0.3+6 +175eb80c253addb5b49a91c53daa7e204f124581 jdk-11.0.3+7 +175eb80c253addb5b49a91c53daa7e204f124581 jdk-11.0.3-ga +b3f7a4c524f2e37a8068ca797859df86d9865aad jdk-11.0.4+1 +3b9194001c2eebea3109777c2b308cd784a5dcc7 jdk-11.0.4+2 +3b6fc7cd594608b7125eb0b75bdc05132e7b5f39 jdk-11.0.4+3 +e442b78d7687744475676724bd27b1d52f096d38 jdk-11.0.4+4 +371ce104ac19a12012dfe3749240b0309bfc86ee jdk-11.0.4+5 +9ab8738bf30663e01924f40e04d6d04751271b77 jdk-11.0.4+6 +640251cdca0577fd8aa4a51ddb7c71c3b874033c jdk-11.0.4+7 +ce601e800f56af59edfda40e19a92a8d3121a1cd jdk-11.0.4+8 +26958299a5f8012736b99782c835ec685e18dd43 jdk-11.0.4+9 +3f5829d9d7629ba3893456e20731949a570cc277 jdk-11.0.4+10 diff -Nru openjdk-lts-11.0.3+7/make/autoconf/basics.m4 openjdk-lts-11.0.4+11/make/autoconf/basics.m4 --- openjdk-lts-11.0.3+7/make/autoconf/basics.m4 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/autoconf/basics.m4 2019-05-03 00:43:26.000000000 +0000 @@ -1190,6 +1190,7 @@ BASIC_PATH_PROGS(READELF, [greadelf readelf]) BASIC_PATH_PROGS(DOT, dot) BASIC_PATH_PROGS(HG, hg) + BASIC_PATH_PROGS(GIT, git) BASIC_PATH_PROGS(STAT, stat) BASIC_PATH_PROGS(TIME, time) BASIC_PATH_PROGS(FLOCK, flock) diff -Nru openjdk-lts-11.0.3+7/make/autoconf/flags-cflags.m4 openjdk-lts-11.0.4+11/make/autoconf/flags-cflags.m4 --- openjdk-lts-11.0.3+7/make/autoconf/flags-cflags.m4 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/autoconf/flags-cflags.m4 2019-05-03 00:43:26.000000000 +0000 @@ -524,7 +524,7 @@ fi elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then TOOLCHAIN_CFLAGS_JDK="-mt" - TOOLCHAIN_CFLAGS_JDK_CONLY="-xc99=%none -xCC -Xa -v -W0,-noglobal" # C only + TOOLCHAIN_CFLAGS_JDK_CONLY="-xCC -Xa -v -W0,-noglobal" # C only TOOLCHAIN_CFLAGS_JDK_CXXONLY="-features=no%except -norunpath -xnolib" # CXX only TOOLCHAIN_CFLAGS_JVM="-template=no%extdef -features=no%split_init \ -library=stlport4 -mt -features=no%except" diff -Nru openjdk-lts-11.0.3+7/make/autoconf/flags-other.m4 openjdk-lts-11.0.4+11/make/autoconf/flags-other.m4 --- openjdk-lts-11.0.3+7/make/autoconf/flags-other.m4 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/autoconf/flags-other.m4 2019-05-03 00:43:26.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2019, 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 @@ -83,10 +83,10 @@ RC_FLAGS="$RC_FLAGS \ -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \ -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \ - -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \ + -D\"JDK_COMPONENT=\$(JDK_RC_NAME) binary\" \ -D\"JDK_VER=\$(VERSION_NUMBER)\" \ -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \ - -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_FEATURE)\" \ + -D\"JDK_NAME=\$(JDK_RC_NAME) \$(VERSION_FEATURE)\" \ -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\"" JVM_RCFLAGS="$JVM_RCFLAGS \ diff -Nru openjdk-lts-11.0.3+7/make/autoconf/help.m4 openjdk-lts-11.0.4+11/make/autoconf/help.m4 --- openjdk-lts-11.0.3+7/make/autoconf/help.m4 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/autoconf/help.m4 2019-05-03 00:43:26.000000000 +0000 @@ -102,7 +102,7 @@ ffi) PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;; x11) - PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;; + PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev" ;; ccache) PKGHANDLER_COMMAND="sudo apt-get install ccache" ;; dtrace) @@ -125,7 +125,7 @@ freetype) PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;; x11) - PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;; + PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXrandr-devel libXi-devel" ;; ccache) PKGHANDLER_COMMAND="sudo yum install ccache" ;; esac diff -Nru openjdk-lts-11.0.3+7/make/autoconf/jdk-version.m4 openjdk-lts-11.0.4+11/make/autoconf/jdk-version.m4 --- openjdk-lts-11.0.3+7/make/autoconf/jdk-version.m4 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/autoconf/jdk-version.m4 2019-05-03 00:43:26.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2019, 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 @@ -75,9 +75,52 @@ AC_SUBST(PRODUCT_SUFFIX) AC_SUBST(JDK_RC_PLATFORM_NAME) AC_SUBST(HOTSPOT_VM_DISTRO) + + # Set the MACOSX Bundle Name base + AC_ARG_WITH(macosx-bundle-name-base, [AS_HELP_STRING([--with-macosx-bundle-name-base], + [Set the MacOSX Bundle Name base. This is the base name for calculating MacOSX Bundle Names. + @<:@not specified@:>@])]) + if test "x$with_macosx_bundle_name_base" = xyes; then + AC_MSG_ERROR([--with-macosx-bundle-name-base must have a value]) + elif [ ! [[ $with_macosx_bundle_name_base =~ ^[[:print:]]*$ ]] ]; then + AC_MSG_ERROR([--with-macosx-bundle-name-base contains non-printing characters: $with_macosx_bundle_name_base]) + elif test "x$with_macosx_bundle_name_base" != x; then + # Set MACOSX_BUNDLE_NAME_BASE to the configured value. + MACOSX_BUNDLE_NAME_BASE="$with_macosx_bundle_name_base" + fi AC_SUBST(MACOSX_BUNDLE_NAME_BASE) + + # Set the MACOSX Bundle ID base + AC_ARG_WITH(macosx-bundle-id-base, [AS_HELP_STRING([--with-macosx-bundle-id-base], + [Set the MacOSX Bundle ID base. This is the base ID for calculating MacOSX Bundle IDs. + @<:@not specified@:>@])]) + if test "x$with_macosx_bundle_id_base" = xyes; then + AC_MSG_ERROR([--with-macosx-bundle-id-base must have a value]) + elif [ ! [[ $with_macosx_bundle_id_base =~ ^[[:print:]]*$ ]] ]; then + AC_MSG_ERROR([--with-macosx-bundle-id-base contains non-printing characters: $with_macosx_bundle_id_base]) + elif test "x$with_macosx_bundle_id_base" != x; then + # Set MACOSX_BUNDLE_ID_BASE to the configured value. + MACOSX_BUNDLE_ID_BASE="$with_macosx_bundle_id_base" + fi AC_SUBST(MACOSX_BUNDLE_ID_BASE) + # Set the JDK RC name + AC_ARG_WITH(jdk-rc-name, [AS_HELP_STRING([--with-jdk-rc-name], + [Set JDK RC name. This is used for FileDescription and ProductName properties + of MS Windows binaries. @<:@not specified@:>@])]) + if test "x$with_jdk_rc_name" = xyes; then + AC_MSG_ERROR([--with-jdk-rc-name must have a value]) + elif [ ! [[ $with_jdk_rc_name =~ ^[[:print:]]*$ ]] ]; then + AC_MSG_ERROR([--with-jdk-rc-name contains non-printing characters: $with_jdk_rc_name]) + elif test "x$with_jdk_rc_name" != x; then + # Set JDK_RC_NAME to a custom value if '--with-jdk-rc-name' was used and is not empty. + JDK_RC_NAME="$with_jdk_rc_name" + else + # Otherwise calculate from "version-numbers" included above. + JDK_RC_NAME="$PRODUCT_NAME $JDK_RC_PLATFORM_NAME" + fi + AC_SUBST(JDK_RC_NAME) + # The vendor name, if any AC_ARG_WITH(vendor-name, [AS_HELP_STRING([--with-vendor-name], [Set vendor name. Among others, used to set the 'java.vendor' diff -Nru openjdk-lts-11.0.3+7/make/autoconf/lib-freetype.m4 openjdk-lts-11.0.4+11/make/autoconf/lib-freetype.m4 --- openjdk-lts-11.0.3+7/make/autoconf/lib-freetype.m4 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/autoconf/lib-freetype.m4 2019-05-03 00:43:26.000000000 +0000 @@ -186,6 +186,9 @@ FREETYPE_BASE_DIR="$SYSROOT/usr" if (test "x$OPENJDK_TARGET_CPU_BITS" = "x64"); then LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu], [well-known location]) + if (test "x$FOUND_FREETYPE" != "xyes"); then + LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib64], [well-known location]) + fi else LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location]) if (test "x$FOUND_FREETYPE" != "xyes"); then diff -Nru openjdk-lts-11.0.3+7/make/autoconf/lib-x11.m4 openjdk-lts-11.0.4+11/make/autoconf/lib-x11.m4 --- openjdk-lts-11.0.3+7/make/autoconf/lib-x11.m4 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/autoconf/lib-x11.m4 2019-05-03 00:43:26.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2018, 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 @@ -99,8 +99,14 @@ OLD_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS" + HEADERS_TO_CHECK="X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h" + # There is no Xrandr extension on AIX + if test "x$OPENJDK_TARGET_OS" != xaix; then + HEADERS_TO_CHECK="$HEADERS_TO_CHECK X11/extensions/Xrandr.h" + fi + # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10 - AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h], + AC_CHECK_HEADERS([$HEADERS_TO_CHECK], [X11_HEADERS_OK=yes], [X11_HEADERS_OK=no; break], [ @@ -111,7 +117,7 @@ if test "x$X11_HEADERS_OK" = xno; then HELP_MSG_MISSING_DEPENDENCY([x11]) - AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG]) + AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h Xrander.h XTest.h Intrinsic.h). $HELP_MSG]) fi # If XLinearGradient isn't available in Xrender.h, signal that it needs to be diff -Nru openjdk-lts-11.0.3+7/make/autoconf/spec.gmk.in openjdk-lts-11.0.4+11/make/autoconf/spec.gmk.in --- openjdk-lts-11.0.3+7/make/autoconf/spec.gmk.in 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/autoconf/spec.gmk.in 2019-05-03 00:43:26.000000000 +0000 @@ -148,6 +148,7 @@ PRODUCT_NAME:=@PRODUCT_NAME@ PRODUCT_SUFFIX:=@PRODUCT_SUFFIX@ JDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@ +JDK_RC_NAME:=@JDK_RC_NAME@ COMPANY_NAME:=@COMPANY_NAME@ HOTSPOT_VM_DISTRO:=@HOTSPOT_VM_DISTRO@ MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@ @@ -724,6 +725,7 @@ FILE:=@FILE@ DOT:=@DOT@ HG:=@HG@ +GIT:=@GIT@ OBJCOPY:=@OBJCOPY@ SETFILE:=@SETFILE@ XATTR:=@XATTR@ @@ -879,12 +881,14 @@ JDK_BUNDLE_EXTENSION := tar.gz endif JDK_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION) +JRE_BUNDLE_NAME := jre-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION) JDK_SYMBOLS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz TEST_DEMOS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests-demos$(DEBUG_PART).tar.gz TEST_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests$(DEBUG_PART).tar.gz DOCS_BUNDLE_NAME := jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_BUNDLE_NAME) +JRE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JRE_BUNDLE_NAME) JDK_SYMBOLS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_SYMBOLS_BUNDLE_NAME) TEST_DEMOS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(TEST_DEMOS_BUNDLE_NAME) TEST_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(TEST_BUNDLE_NAME) diff -Nru openjdk-lts-11.0.3+7/make/autoconf/version-numbers openjdk-lts-11.0.4+11/make/autoconf/version-numbers --- openjdk-lts-11.0.3+7/make/autoconf/version-numbers 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/autoconf/version-numbers 2019-05-03 00:43:26.000000000 +0000 @@ -27,12 +27,12 @@ DEFAULT_VERSION_FEATURE=11 DEFAULT_VERSION_INTERIM=0 -DEFAULT_VERSION_UPDATE=3 +DEFAULT_VERSION_UPDATE=4 DEFAULT_VERSION_PATCH=0 DEFAULT_VERSION_EXTRA1=0 DEFAULT_VERSION_EXTRA2=0 DEFAULT_VERSION_EXTRA3=0 -DEFAULT_VERSION_DATE=2019-04-16 +DEFAULT_VERSION_DATE=2019-07-16 DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`" DEFAULT_VERSION_CLASSFILE_MINOR=0 DEFAULT_ACCEPTABLE_BOOT_VERSIONS="10 11" diff -Nru openjdk-lts-11.0.3+7/make/Bundles.gmk openjdk-lts-11.0.4+11/make/Bundles.gmk --- openjdk-lts-11.0.3+7/make/Bundles.gmk 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/Bundles.gmk 2019-05-03 00:43:26.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ include MakeBase.gmk PRODUCT_TARGETS := +LEGACY_TARGETS := TEST_TARGETS := DOCS_TARGETS := @@ -146,19 +147,25 @@ # correct base directories. ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release) JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR) + JRE_IMAGE_DIR := $(JRE_MACOSX_BUNDLE_DIR) JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home + JRE_IMAGE_HOMEDIR := $(JRE_MACOSX_CONTENTS_DIR)/Home JDK_BUNDLE_SUBDIR := + JRE_BUNDLE_SUBDIR := else JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR) + JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR) JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER) + JRE_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER) ifneq ($(DEBUG_LEVEL), release) JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL) + JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL) endif endif ################################################################################ -ifneq ($(filter product-bundles, $(MAKECMDGOALS)), ) +ifneq ($(filter product-bundles legacy-bundles, $(MAKECMDGOALS)), ) $(eval $(call FillCacheFind, $(IMAGES_OUTPUTDIR))) SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.pdb %.map @@ -198,6 +205,22 @@ TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_IMAGE_HOMEDIR)/demo/%, $(ALL_JDK_FILES)) + ALL_JRE_FILES := $(call CacheFind, $(JRE_IMAGE_DIR)) + + # Create special filter rules when dealing with unzipped .dSYM directories on + # macosx + ifeq ($(OPENJDK_TARGET_OS), macosx) + ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false) + JRE_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \ + $(call containing, .dSYM/, $(patsubst $(JRE_IMAGE_DIR)/%, %, $(ALL_JRE_FILES)))) + endif + endif + + JRE_BUNDLE_FILES := $(filter-out \ + $(JRE_SYMBOLS_EXCLUDE_PATTERN) \ + $(SYMBOLS_EXCLUDE_PATTERN), \ + $(ALL_JRE_FILES)) + $(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \ BUNDLE_NAME := $(JDK_BUNDLE_NAME), \ FILES := $(JDK_BUNDLE_FILES), \ @@ -208,6 +231,15 @@ PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE) + $(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \ + BUNDLE_NAME := $(JRE_BUNDLE_NAME), \ + FILES := $(JRE_BUNDLE_FILES), \ + BASE_DIRS := $(JRE_IMAGE_DIR), \ + SUBDIR := $(JRE_BUNDLE_SUBDIR), \ + )) + + LEGACY_TARGETS += $(BUILD_JRE_BUNDLE) + $(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \ BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \ FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \ @@ -268,6 +300,7 @@ ################################################################################ product-bundles: $(PRODUCT_TARGETS) +legacy-bundles: $(LEGACY_TARGETS) test-bundles: $(TEST_TARGETS) docs-bundles: $(DOCS_TARGETS) diff -Nru openjdk-lts-11.0.3+7/make/common/MakeBase.gmk openjdk-lts-11.0.4+11/make/common/MakeBase.gmk --- openjdk-lts-11.0.3+7/make/common/MakeBase.gmk 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/common/MakeBase.gmk 2019-05-03 00:43:26.000000000 +0000 @@ -347,6 +347,7 @@ FindAllReposAbs = \ $(strip $(sort $(dir $(filter-out $(TOPDIR)/build/%, $(wildcard \ $(addprefix $(TOPDIR)/, .hg */.hg */*/.hg */*/*/.hg */*/*/*/.hg) \ + $(addprefix $(TOPDIR)/, .git */.git */*/.git */*/*/.git */*/*/*/.git) \ ))))) # Locate all hg repositories included in the forest, as relative paths diff -Nru openjdk-lts-11.0.3+7/make/conf/jib-profiles.js openjdk-lts-11.0.4+11/make/conf/jib-profiles.js --- openjdk-lts-11.0.3+7/make/conf/jib-profiles.js 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/conf/jib-profiles.js 2019-05-03 00:43:26.000000000 +0000 @@ -525,8 +525,7 @@ profiles[maketestName].default_make_targets = [ "test-make" ]; }); - // Profiles for building the zero jvm variant. These are used for verification - // in JPRT. + // Profiles for building the zero jvm variant. These are used for verification. var zeroProfiles = { "linux-x64-zero": { target_os: "linux", @@ -725,18 +724,8 @@ }); }); - // Profiles used to run tests. Used in JPRT and Mach 5. + // Profiles used to run tests. var testOnlyProfiles = { - "run-test-jprt": { - target_os: input.build_os, - target_cpu: input.build_cpu, - dependencies: [ "jtreg", "gnumake", "boot_jdk", "devkit", "jib" ], - labels: "test", - environment: { - "JT_JAVA": common.boot_jdk_home - } - }, - "run-test": { target_os: input.build_os, target_cpu: input.build_cpu, @@ -798,7 +787,6 @@ + "/Xcode.app/Contents/Developer/usr/bin" }; profiles["run-test"] = concatObjects(profiles["run-test"], macosxRunTestExtra); - profiles["run-test-jprt"] = concatObjects(profiles["run-test-jprt"], macosxRunTestExtra); profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"], macosxRunTestExtra); } // On windows we want the debug symbols available at test time @@ -829,7 +817,7 @@ var getJibProfilesDependencies = function (input, common) { var devkit_platform_revisions = { - linux_x64: "gcc7.3.0-OEL6.4+1.0", + linux_x64: "gcc7.3.0-OEL6.4+1.1", macosx_x64: "Xcode9.4-MacOSX10.13+1.0", solaris_x64: "SS12u4-Solaris11u1+1.0", solaris_sparcv9: "SS12u4-Solaris11u1+1.1", @@ -1146,7 +1134,10 @@ var version = (feature != null ? feature : version_numbers.get("DEFAULT_VERSION_FEATURE")) + "." + (interim != null ? interim : version_numbers.get("DEFAULT_VERSION_INTERIM")) + "." + (update != null ? update : version_numbers.get("DEFAULT_VERSION_UPDATE")) - + "." + (patch != null ? patch : version_numbers.get("DEFAULT_VERSION_PATCH")); + + "." + (patch != null ? patch : version_numbers.get("DEFAULT_VERSION_PATCH")) + + "." + version_numbers.get("DEFAULT_VERSION_EXTRA1") + + "." + version_numbers.get("DEFAULT_VERSION_EXTRA2") + + "." + version_numbers.get("DEFAULT_VERSION_EXTRA3"); while (version.match(".*\\.0$")) { version = version.substring(0, version.length - 2); } diff -Nru openjdk-lts-11.0.3+7/make/data/charsetmapping/charsets openjdk-lts-11.0.4+11/make/data/charsetmapping/charsets --- openjdk-lts-11.0.3+7/make/data/charsetmapping/charsets 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/data/charsetmapping/charsets 2019-05-03 00:43:26.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2019, 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 @@ -440,6 +440,8 @@ alias cp00858 alias 858 alias PC-Multilingual-850+euro + alias ibm858 + alias ibm-858 charset IBM862 IBM862 package sun.nio.cs @@ -1241,6 +1243,16 @@ alias ibm-1124 alias 1124 +charset x-IBM1129 IBM1129 + package sun.nio.cs.ext + type sbcs + hisname Cp1129 + ascii false + alias cp1129 # JDK historical + alias ibm1129 + alias ibm-1129 + alias 1129 + charset x-IBM1364 IBM1364 package sun.nio.cs.ext type ebcdic @@ -1379,6 +1391,7 @@ alias cp833 alias ibm833 alias ibm-833 + alias 833 charset x-IBM834 IBM834 # EBCDIC DBCS-only Korean @@ -1544,12 +1557,22 @@ charset x-IBM964 IBM964 package sun.nio.cs.ext - type source + type template alias cp964 # JDK historical alias ibm964 alias ibm-964 + alias ibm-euctw alias 964 +charset x-IBM29626C IBM29626C + package sun.nio.cs.ext + type template + alias cp29626c # JDK historical + alias ibm29626c + alias ibm-29626c + alias 29626c + alias ibm-eucjp + charset x-IBM33722 IBM33722 package sun.nio.cs.ext type source @@ -1570,6 +1593,8 @@ alias cp01140 alias 1140 alias ebcdic-us-037+euro + alias ibm1140 + alias ibm-1140 charset IBM01141 IBM1141 package sun.nio.cs.ext @@ -1581,6 +1606,8 @@ alias cp01141 alias 1141 alias ebcdic-de-273+euro + alias ibm1141 + alias ibm-1141 charset IBM01142 IBM1142 package sun.nio.cs.ext @@ -1593,6 +1620,8 @@ alias 1142 alias ebcdic-no-277+euro alias ebcdic-dk-277+euro + alias ibm1142 + alias ibm-1142 charset IBM01143 IBM1143 package sun.nio.cs.ext @@ -1605,6 +1634,8 @@ alias 1143 alias ebcdic-fi-278+euro alias ebcdic-se-278+euro + alias ibm1143 + alias ibm-1143 charset IBM01144 IBM1144 package sun.nio.cs.ext @@ -1616,6 +1647,8 @@ alias cp01144 alias 1144 alias ebcdic-it-280+euro + alias ibm1144 + alias ibm-1144 charset IBM01145 IBM1145 package sun.nio.cs.ext @@ -1627,6 +1660,8 @@ alias cp01145 alias 1145 alias ebcdic-es-284+euro + alias ibm1145 + alias ibm-1145 charset IBM01146 IBM1146 package sun.nio.cs.ext @@ -1638,6 +1673,8 @@ alias cp01146 alias 1146 alias ebcdic-gb-285+euro + alias ibm1146 + alias ibm-1146 charset IBM01147 IBM1147 package sun.nio.cs.ext @@ -1649,6 +1686,8 @@ alias cp01147 alias 1147 alias ebcdic-fr-277+euro + alias ibm1147 + alias ibm-1147 charset IBM01148 IBM1148 package sun.nio.cs.ext @@ -1660,6 +1699,8 @@ alias cp01148 alias 1148 alias ebcdic-international-500+euro + alias ibm1148 + alias ibm-1148 charset IBM01149 IBM1149 package sun.nio.cs.ext @@ -1671,6 +1712,8 @@ alias cp01149 alias 1149 alias ebcdic-s-871+euro + alias ibm1149 + alias ibm-1149 charset IBM290 IBM290 package sun.nio.cs.ext @@ -1851,6 +1894,11 @@ minmax 0x21 0x7e 0x21 0x7e internal true # "internal implementation +charset SimpleEUCEncoder SimpleEUCEncoder + package sun.nio.cs.ext + type template + internal true + ######################################################## # # platform specific charsets, to be registered into spi diff -Nru openjdk-lts-11.0.3+7/make/data/charsetmapping/IBM1129.c2b openjdk-lts-11.0.4+11/make/data/charsetmapping/IBM1129.c2b --- openjdk-lts-11.0.3+7/make/data/charsetmapping/IBM1129.c2b 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/data/charsetmapping/IBM1129.c2b 2019-05-03 00:43:26.000000000 +0000 @@ -0,0 +1,94 @@ +0x21 U+ff01 +0x22 U+ff02 +0x23 U+ff03 +0x24 U+ff04 +0x25 U+ff05 +0x26 U+ff06 +0x27 U+ff07 +0x28 U+ff08 +0x29 U+ff09 +0x2a U+ff0a +0x2b U+ff0b +0x2c U+ff0c +0x2d U+ff0d +0x2e U+ff0e +0x2f U+ff0f +0x30 U+ff10 +0x31 U+ff11 +0x32 U+ff12 +0x33 U+ff13 +0x34 U+ff14 +0x35 U+ff15 +0x36 U+ff16 +0x37 U+ff17 +0x38 U+ff18 +0x39 U+ff19 +0x3a U+ff1a +0x3b U+ff1b +0x3c U+ff1c +0x3d U+ff1d +0x3e U+ff1e +0x3f U+ff1f +0x40 U+ff20 +0x41 U+ff21 +0x42 U+ff22 +0x43 U+ff23 +0x44 U+ff24 +0x45 U+ff25 +0x46 U+ff26 +0x47 U+ff27 +0x48 U+ff28 +0x49 U+ff29 +0x4a U+ff2a +0x4b U+ff2b +0x4c U+ff2c +0x4d U+ff2d +0x4e U+ff2e +0x4f U+ff2f +0x50 U+ff30 +0x51 U+ff31 +0x52 U+ff32 +0x53 U+ff33 +0x54 U+ff34 +0x55 U+ff35 +0x56 U+ff36 +0x57 U+ff37 +0x58 U+ff38 +0x59 U+ff39 +0x5a U+ff3a +0x5b U+ff3b +0x5c U+ff3c +0x5d U+ff3d +0x5e U+ff3e +0x5f U+ff3f +0x60 U+ff40 +0x61 U+ff41 +0x62 U+ff42 +0x63 U+ff43 +0x64 U+ff44 +0x65 U+ff45 +0x66 U+ff46 +0x67 U+ff47 +0x68 U+ff48 +0x69 U+ff49 +0x6a U+ff4a +0x6b U+ff4b +0x6c U+ff4c +0x6d U+ff4d +0x6e U+ff4e +0x6f U+ff4f +0x70 U+ff50 +0x71 U+ff51 +0x72 U+ff52 +0x73 U+ff53 +0x74 U+ff54 +0x75 U+ff55 +0x76 U+ff56 +0x77 U+ff57 +0x78 U+ff58 +0x79 U+ff59 +0x7a U+ff5a +0x7b U+ff5b +0x7c U+ff5c +0x7d U+ff5d +0x7e U+ff5e diff -Nru openjdk-lts-11.0.3+7/make/data/charsetmapping/IBM1129.map openjdk-lts-11.0.4+11/make/data/charsetmapping/IBM1129.map --- openjdk-lts-11.0.3+7/make/data/charsetmapping/IBM1129.map 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/data/charsetmapping/IBM1129.map 2019-05-03 00:43:26.000000000 +0000 @@ -0,0 +1,256 @@ +0x00 U+0000 +0x01 U+0001 +0x02 U+0002 +0x03 U+0003 +0x04 U+0004 +0x05 U+0005 +0x06 U+0006 +0x07 U+0007 +0x08 U+0008 +0x09 U+0009 +0x0a U+000a +0x0b U+000b +0x0c U+000c +0x0d U+000d +0x0e U+000e +0x0f U+000f +0x10 U+0010 +0x11 U+0011 +0x12 U+0012 +0x13 U+0013 +0x14 U+0014 +0x15 U+0015 +0x16 U+0016 +0x17 U+0017 +0x18 U+0018 +0x19 U+0019 +0x1a U+001a +0x1b U+001b +0x1c U+001c +0x1d U+001d +0x1e U+001e +0x1f U+001f +0x20 U+0020 +0x21 U+0021 +0x22 U+0022 +0x23 U+0023 +0x24 U+0024 +0x25 U+0025 +0x26 U+0026 +0x27 U+0027 +0x28 U+0028 +0x29 U+0029 +0x2a U+002a +0x2b U+002b +0x2c U+002c +0x2d U+002d +0x2e U+002e +0x2f U+002f +0x30 U+0030 +0x31 U+0031 +0x32 U+0032 +0x33 U+0033 +0x34 U+0034 +0x35 U+0035 +0x36 U+0036 +0x37 U+0037 +0x38 U+0038 +0x39 U+0039 +0x3a U+003a +0x3b U+003b +0x3c U+003c +0x3d U+003d +0x3e U+003e +0x3f U+003f +0x40 U+0040 +0x41 U+0041 +0x42 U+0042 +0x43 U+0043 +0x44 U+0044 +0x45 U+0045 +0x46 U+0046 +0x47 U+0047 +0x48 U+0048 +0x49 U+0049 +0x4a U+004a +0x4b U+004b +0x4c U+004c +0x4d U+004d +0x4e U+004e +0x4f U+004f +0x50 U+0050 +0x51 U+0051 +0x52 U+0052 +0x53 U+0053 +0x54 U+0054 +0x55 U+0055 +0x56 U+0056 +0x57 U+0057 +0x58 U+0058 +0x59 U+0059 +0x5a U+005a +0x5b U+005b +0x5c U+005c +0x5d U+005d +0x5e U+005e +0x5f U+005f +0x60 U+0060 +0x61 U+0061 +0x62 U+0062 +0x63 U+0063 +0x64 U+0064 +0x65 U+0065 +0x66 U+0066 +0x67 U+0067 +0x68 U+0068 +0x69 U+0069 +0x6a U+006a +0x6b U+006b +0x6c U+006c +0x6d U+006d +0x6e U+006e +0x6f U+006f +0x70 U+0070 +0x71 U+0071 +0x72 U+0072 +0x73 U+0073 +0x74 U+0074 +0x75 U+0075 +0x76 U+0076 +0x77 U+0077 +0x78 U+0078 +0x79 U+0079 +0x7a U+007a +0x7b U+007b +0x7c U+007c +0x7d U+007d +0x7e U+007e +0x7f U+007f +0x80 U+0080 +0x81 U+0081 +0x82 U+0082 +0x83 U+0083 +0x84 U+0084 +0x85 U+0085 +0x86 U+0086 +0x87 U+0087 +0x88 U+0088 +0x89 U+0089 +0x8a U+008a +0x8b U+008b +0x8c U+008c +0x8d U+008d +0x8e U+008e +0x8f U+008f +0x90 U+0090 +0x91 U+0091 +0x92 U+0092 +0x93 U+0093 +0x94 U+0094 +0x95 U+0095 +0x96 U+0096 +0x97 U+0097 +0x98 U+0098 +0x99 U+0099 +0x9a U+009a +0x9b U+009b +0x9c U+009c +0x9d U+009d +0x9e U+009e +0x9f U+009f +0xa0 U+00a0 +0xa1 U+00a1 +0xa2 U+00a2 +0xa3 U+00a3 +0xa4 U+00a4 +0xa5 U+00a5 +0xa6 U+00a6 +0xa7 U+00a7 +0xa8 U+0153 +0xa9 U+00a9 +0xaa U+00aa +0xab U+00ab +0xac U+00ac +0xad U+00ad +0xae U+00ae +0xaf U+00af +0xb0 U+00b0 +0xb1 U+00b1 +0xb2 U+00b2 +0xb3 U+00b3 +0xb4 U+0178 +0xb5 U+00b5 +0xb6 U+00b6 +0xb7 U+00b7 +0xb8 U+0152 +0xb9 U+00b9 +0xba U+00ba +0xbb U+00bb +0xbc U+00bc +0xbd U+00bd +0xbe U+00be +0xbf U+00bf +0xc0 U+00c0 +0xc1 U+00c1 +0xc2 U+00c2 +0xc3 U+0102 +0xc4 U+00c4 +0xc5 U+00c5 +0xc6 U+00c6 +0xc7 U+00c7 +0xc8 U+00c8 +0xc9 U+00c9 +0xca U+00ca +0xcb U+00cb +0xcc U+0300 +0xcd U+00cd +0xce U+00ce +0xcf U+00cf +0xd0 U+0110 +0xd1 U+00d1 +0xd2 U+0309 +0xd3 U+00d3 +0xd4 U+00d4 +0xd5 U+01a0 +0xd6 U+00d6 +0xd7 U+00d7 +0xd8 U+00d8 +0xd9 U+00d9 +0xda U+00da +0xdb U+00db +0xdc U+00dc +0xdd U+01af +0xde U+0303 +0xdf U+00df +0xe0 U+00e0 +0xe1 U+00e1 +0xe2 U+00e2 +0xe3 U+0103 +0xe4 U+00e4 +0xe5 U+00e5 +0xe6 U+00e6 +0xe7 U+00e7 +0xe8 U+00e8 +0xe9 U+00e9 +0xea U+00ea +0xeb U+00eb +0xec U+0301 +0xed U+00ed +0xee U+00ee +0xef U+00ef +0xf0 U+0111 +0xf1 U+00f1 +0xf2 U+0323 +0xf3 U+00f3 +0xf4 U+00f4 +0xf5 U+01a1 +0xf6 U+00f6 +0xf7 U+00f7 +0xf8 U+00f8 +0xf9 U+00f9 +0xfa U+00fa +0xfb U+00fb +0xfc U+00fc +0xfd U+01b0 +0xfe U+20ab +0xff U+00ff diff -Nru openjdk-lts-11.0.3+7/make/data/charsetmapping/IBM970.c2b openjdk-lts-11.0.4+11/make/data/charsetmapping/IBM970.c2b --- openjdk-lts-11.0.3+7/make/data/charsetmapping/IBM970.c2b 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/data/charsetmapping/IBM970.c2b 2019-05-03 00:43:26.000000000 +0000 @@ -5,14 +5,3 @@ A2A6 FF5E A2C1 2299 A3DC 20A9 -# -# see .map file for the info regarding following 3 entries -# -a1aa 6950 -a1a9 84f1 -a1ad cf7f - - - - - diff -Nru openjdk-lts-11.0.3+7/make/data/charsetmapping/IBM970.map openjdk-lts-11.0.4+11/make/data/charsetmapping/IBM970.map --- openjdk-lts-11.0.3+7/make/data/charsetmapping/IBM970.map 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/data/charsetmapping/IBM970.map 2019-05-03 00:43:26.000000000 +0000 @@ -1,15 +1,6 @@ # # source: Cp970.b2c, which is identical(?) to 03CA34B0.TPMAP100 # -# Warning: -# following 3 c->b only entries exist in the "old" implementation, -# they don't appear existing in any of of the cdc 970 tables. Added -# them into c2b for "compatibility -# 6950 -> a1aa 2014 -# 84f1 -> a1a9 2010 -# cf7f -> a1ad 301c -# -# 00 0000 01 0001 02 0002 @@ -294,6 +285,7 @@ A2BE 2665 A2BF 2667 A2C0 2663 +A2C1 25C9 A2C2 25C8 A2C3 25A3 A2C4 25D0 diff -Nru openjdk-lts-11.0.3+7/make/data/charsetmapping/stdcs-aix openjdk-lts-11.0.4+11/make/data/charsetmapping/stdcs-aix --- openjdk-lts-11.0.3+7/make/data/charsetmapping/stdcs-aix 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/data/charsetmapping/stdcs-aix 2019-05-03 00:43:26.000000000 +0000 @@ -16,11 +16,18 @@ IBM943 IBM943C IBM950 +IBM964 IBM970 IBM1046 IBM1124 +IBM1129 IBM1383 +IBM29626C ISO_8859_6 ISO_8859_8 +JIS_X_0201 +JIS_X_0208 +JIS_X_0212 MS1252 TIS_620 +SimpleEUCEncoder diff -Nru openjdk-lts-11.0.3+7/make/data/lsrdata/language-subtag-registry.txt openjdk-lts-11.0.4+11/make/data/lsrdata/language-subtag-registry.txt --- openjdk-lts-11.0.3+7/make/data/lsrdata/language-subtag-registry.txt 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/data/lsrdata/language-subtag-registry.txt 2019-05-03 00:43:26.000000000 +0000 @@ -1,4 +1,4 @@ -File-Date: 2018-04-23 +File-Date: 2018-11-30 %% Type: language Subtag: aa @@ -593,6 +593,7 @@ Type: language Subtag: lg Description: Ganda +Description: Luganda Added: 2005-10-16 %% Type: language @@ -3351,7 +3352,7 @@ %% Type: language Subtag: aue -Description: =/Kx'au//'ein +Description: ǂKxʼauǁʼein Added: 2009-07-29 Deprecated: 2015-02-12 Preferred-Value: ktz @@ -9812,6 +9813,12 @@ Added: 2009-07-29 %% Type: language +Subtag: dno +Description: Ndrulo +Description: Northern Lendu +Added: 2018-10-28 +%% +Type: language Subtag: dnr Description: Danaru Added: 2009-07-29 @@ -10338,6 +10345,11 @@ Added: 2016-05-30 %% Type: language +Subtag: dwz +Description: Dewas Rai +Added: 2018-10-28 +%% +Type: language Subtag: dya Description: Dyan Added: 2009-07-29 @@ -12022,7 +12034,7 @@ %% Type: language Subtag: gfx -Description: Mangetti Dune !Xung +Description: Mangetti Dune ǃXung Added: 2012-08-12 Deprecated: 2015-02-12 Preferred-Value: vaj @@ -12328,7 +12340,6 @@ Type: language Subtag: gku Description: ǂUngkue -Description: =/Ungkue Added: 2015-02-12 %% Type: language @@ -12523,7 +12534,6 @@ %% Type: language Subtag: gnk -Description: //Gana Description: ǁGana Added: 2009-07-29 %% @@ -13156,7 +13166,6 @@ %% Type: language Subtag: gwj -Description: /Gwi Description: ǀGwi Added: 2009-07-29 %% @@ -13489,7 +13498,6 @@ %% Type: language Subtag: hgm -Description: Hai//om Description: Haiǁom Added: 2009-07-29 %% @@ -13833,7 +13841,6 @@ %% Type: language Subtag: hnh -Description: //Ani Description: ǁAni Added: 2009-07-29 %% @@ -14113,7 +14120,6 @@ %% Type: language Subtag: huc -Description: =/Hua Description: ǂHua Added: 2009-07-29 %% @@ -18425,7 +18431,6 @@ %% Type: language Subtag: ktz -Description: Ju/'hoan Description: Juǀʼhoan Description: Juǀʼhoansi Added: 2009-07-29 @@ -24926,7 +24931,6 @@ %% Type: language Subtag: ngh -Description: N/u Description: Nǀu Added: 2009-07-29 %% @@ -25641,7 +25645,6 @@ %% Type: language Subtag: nmn -Description: !Xóõ Description: ǃXóõ Added: 2009-07-29 %% @@ -27613,7 +27616,7 @@ %% Type: language Subtag: oun -Description: !O!ung +Description: ǃOǃung Added: 2009-07-29 Deprecated: 2015-02-12 Preferred-Value: vaj @@ -36667,7 +36670,6 @@ Type: language Subtag: vaj Description: Sekele -Description: Northwestern !Kung Description: Northwestern ǃKung Description: Vasekele Added: 2009-07-29 @@ -38299,7 +38301,6 @@ %% Type: language Subtag: xam -Description: /Xam Description: ǀXam Added: 2009-07-29 %% @@ -38559,7 +38560,6 @@ %% Type: language Subtag: xeg -Description: //Xegwi Description: ǁXegwi Added: 2009-07-29 %% @@ -44036,6 +44036,11 @@ Added: 2010-08-16 %% Type: script +Subtag: Elym +Description: Elymaic +Added: 2018-10-28 +%% +Type: script Subtag: Ethi Description: Ethiopic Description: Geʻez @@ -44432,6 +44437,11 @@ Added: 2005-10-16 %% Type: script +Subtag: Nand +Description: Nandinagari +Added: 2018-10-28 +%% +Type: script Subtag: Narb Description: Old North Arabian Description: Ancient North Arabian @@ -46032,6 +46042,8 @@ %% Type: region Subtag: SZ +Description: Eswatini +Description: eSwatini Description: Swaziland Added: 2005-10-16 %% diff -Nru openjdk-lts-11.0.3+7/make/data/publicsuffixlist/public_suffix_list.dat openjdk-lts-11.0.4+11/make/data/publicsuffixlist/public_suffix_list.dat --- openjdk-lts-11.0.3+7/make/data/publicsuffixlist/public_suffix_list.dat 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/data/publicsuffixlist/public_suffix_list.dat 2019-05-03 00:43:26.000000000 +0000 @@ -381,8 +381,13 @@ net.bm org.bm -// bn : https://en.wikipedia.org/wiki/.bn -*.bn +// bn : http://www.bnnic.bn/faqs +bn +com.bn +edu.bn +gov.bn +net.bn +org.bn // bo : https://nic.bo/delegacion2015.php#h-1.10 bo @@ -546,6 +551,7 @@ not.br ntr.br odo.br +ong.br org.br osasco.br palmas.br @@ -1239,7 +1245,7 @@ utazas.hu video.hu -// id : https://register.pandi.or.id/ +// id : https://pandi.id/en/domain/registration-requirements/ id ac.id biz.id @@ -1250,6 +1256,7 @@ my.id net.id or.id +ponpes.id sch.id web.id @@ -1407,9 +1414,9 @@ tos.it toscana.it trentin-sud-tirol.it -trentin-süd-tirol.it +trentin-süd-tirol.it trentin-sudtirol.it -trentin-südtirol.it +trentin-südtirol.it trentin-sued-tirol.it trentin-suedtirol.it trentino-a-adige.it @@ -1419,9 +1426,9 @@ trentino-s-tirol.it trentino-stirol.it trentino-sud-tirol.it -trentino-süd-tirol.it +trentino-süd-tirol.it trentino-sudtirol.it -trentino-südtirol.it +trentino-südtirol.it trentino-sued-tirol.it trentino-suedtirol.it trentino.it @@ -1432,15 +1439,15 @@ trentinos-tirol.it trentinostirol.it trentinosud-tirol.it -trentinosüd-tirol.it +trentinosüd-tirol.it trentinosudtirol.it -trentinosüdtirol.it +trentinosüdtirol.it trentinosued-tirol.it trentinosuedtirol.it trentinsud-tirol.it -trentinsüd-tirol.it +trentinsüd-tirol.it trentinsudtirol.it -trentinsüdtirol.it +trentinsüdtirol.it trentinsued-tirol.it trentinsuedtirol.it tuscany.it @@ -1457,13 +1464,13 @@ valled-aosta.it valledaosta.it vallee-aoste.it -vallée-aoste.it +vallée-aoste.it vallee-d-aoste.it -vallée-d-aoste.it +vallée-d-aoste.it valleeaoste.it -valléeaoste.it +valléeaoste.it valleedaoste.it -valléedaoste.it +valléedaoste.it vao.it vda.it ven.it @@ -1497,7 +1504,7 @@ avellino.it ba.it balsan-sudtirol.it -balsan-südtirol.it +balsan-südtirol.it balsan-suedtirol.it balsan.it bari.it @@ -1516,7 +1523,7 @@ bolzano-altoadige.it bolzano.it bozen-sudtirol.it -bozen-südtirol.it +bozen-südtirol.it bozen-suedtirol.it bozen.it br.it @@ -1525,7 +1532,7 @@ bs.it bt.it bulsan-sudtirol.it -bulsan-südtirol.it +bulsan-südtirol.it bulsan-suedtirol.it bulsan.it bz.it @@ -1545,9 +1552,9 @@ cb.it ce.it cesena-forli.it -cesena-forlì.it +cesena-forlì.it cesenaforli.it -cesenaforlì.it +cesenaforlì.it ch.it chieti.it ci.it @@ -1578,9 +1585,9 @@ fm.it foggia.it forli-cesena.it -forlì-cesena.it +forlì-cesena.it forlicesena.it -forlìcesena.it +forlìcesena.it fr.it frosinone.it ge.it @@ -1711,7 +1718,7 @@ sr.it ss.it suedtirol.it -südtirol.it +südtirol.it sv.it ta.it taranto.it @@ -3692,8 +3699,16 @@ seoul.kr ulsan.kr -// kw : https://en.wikipedia.org/wiki/.kw -*.kw +// kw : https://www.nic.kw/policies/ +// Confirmed by registry +kw +com.kw +edu.kw +emb.kw +gov.kw +ind.kw +net.kw +org.kw // ky : http://www.icta.ky/da_ky_reg_dom.php // Confirmed by registry 2008-06-17 @@ -3775,10 +3790,18 @@ org.lr net.lr -// ls : https://en.wikipedia.org/wiki/.ls +// ls : http://www.nic.ls/ +// Confirmed by registry ls +ac.ls +biz.ls co.ls +edu.ls +gov.ls +info.ls +net.ls org.ls +sc.ls // lt : https://en.wikipedia.org/wiki/.lt lt @@ -4636,9 +4659,6 @@ // ccTLD for the Netherlands nl -// BV.nl will be a registry for dutch BV's (besloten vennootschap) -bv.nl - // no : http://www.norid.no/regelverk/index.en.html // The Norwegian registry has declined to notify us of updates. The web pages // referenced below are the official source of the data. There is also an @@ -8329,9 +8349,6 @@ // goo : 2014-12-18 NTT Resonant Inc. goo -// goodhands : 2015-07-31 Allstate Fire and Casualty Insurance Company -goodhands - // goodyear : 2015-07-02 The Goodyear Tire & Rubber Company goodyear @@ -8608,9 +8625,6 @@ // iveco : 2015-09-03 CNH Industrial N.V. iveco -// iwc : 2014-06-23 Richemont DNS Inc. -iwc - // jaguar : 2014-11-13 Jaguar Land Rover Ltd jaguar @@ -8635,9 +8649,6 @@ // jio : 2015-04-02 Reliance Industries Limited jio -// jlc : 2014-12-04 Richemont DNS Inc. -jlc - // jll : 2015-04-02 Jones Lang LaSalle Incorporated jll @@ -8989,9 +9000,6 @@ // menu : 2013-09-11 Wedding TLD2, LLC menu -// meo : 2014-11-07 MEO Servicos de Comunicacoes e Multimedia, S.A. -meo - // merckmsd : 2016-07-14 MSD Registry Holdings, Inc. merckmsd @@ -9283,9 +9291,6 @@ // panasonic : 2015-07-30 Panasonic Corporation panasonic -// panerai : 2014-11-07 Richemont DNS Inc. -panerai - // paris : 2014-01-30 City of Paris paris @@ -9634,9 +9639,6 @@ // sap : 2014-03-27 SAP AG sap -// sapo : 2014-11-07 MEO Servicos de Comunicacoes e Multimedia, S.A. -sapo - // sarl : 2014-07-03 Binky Moon, LLC sarl @@ -9877,9 +9879,6 @@ // statefarm : 2015-07-30 State Farm Mutual Automobile Insurance Company statefarm -// statoil : 2014-12-04 Statoil ASA -statoil - // stc : 2014-10-09 Saudi Telecom Company stc @@ -9991,9 +9990,6 @@ // technology : 2013-09-13 Binky Moon, LLC technology -// telecity : 2015-02-19 TelecityGroup International Limited -telecity - // telefonica : 2014-10-16 Telefónica S.A. telefonica @@ -10201,9 +10197,6 @@ // vision : 2013-12-05 Binky Moon, LLC vision -// vista : 2014-09-18 Vistaprint Limited -vista - // vistaprint : 2014-09-18 Vistaprint Limited vistaprint @@ -10642,9 +10635,6 @@ // xn--zfr164b : 2013-11-08 China Organizational Name Administration Center 政务 -// xperia : 2015-05-14 Sony Mobile Communications AB -xperia - // xyz : 2013-12-05 XYZ.COM LLC xyz @@ -10737,6 +10727,7 @@ // Amazon Elastic Beanstalk : https://aws.amazon.com/elasticbeanstalk/ // Submitted by Luke Wells cn-north-1.eb.amazonaws.com.cn +cn-northwest-1.eb.amazonaws.com.cn elasticbeanstalk.com ap-northeast-1.elasticbeanstalk.com ap-northeast-2.elasticbeanstalk.com @@ -10823,6 +10814,10 @@ t3l3p0rt.net tele.amune.org +// Apigee : https://apigee.com/ +// Submitted by Apigee Security Team +apigee.io + // Aptible : https://www.aptible.com/ // Submitted by Thomas Orozco on-aptible.com @@ -10842,6 +10837,11 @@ // Submitted by Vincent Tseng myasustor.com +// Automattic Inc. : https://automattic.com/ +// Submitted by Alex Concha +go-vip.co +wpcomstaging.com + // AVM : https://avm.de // Submitted by Andreas Weise myfritz.net @@ -10888,6 +10888,11 @@ // Submitted by Dave Tharp browsersafetymark.io +// Bytemark Hosting : https://www.bytemark.co.uk +// Submitted by Paul Cammish +dh.bytemark.co.uk +vm.bytemark.co.uk + // callidomus : https://www.callidomus.com/ // Submitted by Marcus Popp mycd.eu @@ -11080,6 +11085,11 @@ reg.dk store.dk +// dapps.earth : https://dapps.earth/ +// Submitted by Daniil Burdakov +*.dapps.earth +*.bzz.dapps.earth + // Debian : https://www.debian.org/ // Submitted by Peter Palfrader / Debian Sysadmin Team debian.net @@ -11092,6 +11102,11 @@ // Submitted by Norbert Auler dnshome.de +// DotArai : https://www.dotarai.com/ +// Submitted by Atsadawat Netcharadsang +online.th +shop.th + // DrayTek Corp. : https://www.draytek.com/ // Submitted by Paul Fang drayddns.com @@ -11648,6 +11663,10 @@ app.os.fedoraproject.org app.os.stg.fedoraproject.org +// Fermax : https://fermax.com/ +// submitted by Koen Van Isterdael +mydobiss.com + // Filegear Inc. : https://www.filegear.com // Submitted by Jason Zhu filegear.me @@ -11713,6 +11732,8 @@ // Google, Inc. // Submitted by Eduardo Vela +run.app +a.run.app *.0emm.com appspot.com blogspot.ae @@ -11918,6 +11939,12 @@ lcube-server.de svn-repos.de +// Leadpages : https://www.leadpages.net +// Submitted by Greg Dallavalle +leadpages.co +lpages.co +lpusercontent.com + // Lightmaker Property Manager, Inc. : https://app.lmpm.com/ // Submitted by Greg Holland app.lmpm.com @@ -11935,6 +11962,15 @@ // Submitted by Victor Velchev we.bs +// LubMAN UMCS Sp. z o.o : https://lubman.pl/ +// Submitted by Ireneusz Maliszewski +krasnik.pl +leczna.pl +lubartow.pl +lublin.pl +poniatowa.pl +swidnik.pl + // Lug.org.uk : https://lug.org.uk // Submitted by Jon Spriggs uklugs.org @@ -12322,6 +12358,10 @@ chirurgiens-dentistes-en-france.fr byen.site +// Redstar Consultants : https://www.redstarconsultants.com/ +// Submitted by Jons Slemmer +instantcloud.cn + // Russian Academy of Sciences // Submitted by Tech Support ras.ru @@ -12350,6 +12390,10 @@ rackmaze.com rackmaze.net +// Read The Docs, Inc : https://www.readthedocs.org +// Submitted by David Fischer +readthedocs.io + // Red Hat, Inc. OpenShift : https://openshift.redhat.com/ // Submitted by Tim Kramer rhcloud.com @@ -12426,6 +12470,10 @@ sinaapp.com vipsinaapp.com +// Siteleaf : https://www.siteleaf.com/ +// Submitted by Skylar Challand +siteleaf.net + // Skyhat : http://www.skyhat.io // Submitted by Shante Adam bounty-full.com @@ -12451,10 +12499,6 @@ // Submitted by Stefan Neufeind customer.speedpartner.de -// Stackspace : https://www.stackspace.io/ -// Submitted by Lina He -stackspace.space - // Storj Labs Inc. : https://storj.io/ // Submitted by Philip Hutchins storj.farm @@ -12495,6 +12539,12 @@ med.pl sopot.pl +// Telebit : https://telebit.cloud +// Submitted by AJ ONeal +telebit.app +telebit.io +*.telebit.xyz + // The Gwiddle Foundation : https://gwiddlefoundation.org.uk // Submitted by Joshua Bayfield gwiddle.co.uk @@ -12533,7 +12583,7 @@ webspace.rocks lima.zone -// TransIP : htts://www.transip.nl +// TransIP : https://www.transip.nl // Submitted by Rory Breuk *.transurl.be *.transurl.eu diff -Nru openjdk-lts-11.0.3+7/make/data/publicsuffixlist/VERSION openjdk-lts-11.0.4+11/make/data/publicsuffixlist/VERSION --- openjdk-lts-11.0.3+7/make/data/publicsuffixlist/VERSION 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/data/publicsuffixlist/VERSION 2019-05-03 00:43:26.000000000 +0000 @@ -1,2 +1,2 @@ -Github: https://raw.githubusercontent.com/publicsuffix/list/2225db8d9f4a2a27ec697c883360632fa0c16261/public_suffix_list.dat -Date: 2018-05-24 +Github: https://raw.githubusercontent.com/publicsuffix/list/ce0d1a5fba657e55adea3abde4b7f1e50636ff10/public_suffix_list.dat +Date: 2019-01-28 diff -Nru openjdk-lts-11.0.3+7/make/devkit/Makefile openjdk-lts-11.0.4+11/make/devkit/Makefile --- openjdk-lts-11.0.3+7/make/devkit/Makefile 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/devkit/Makefile 2019-05-03 00:43:26.000000000 +0000 @@ -36,7 +36,7 @@ # By default this Makefile will build a native toolchain for the current # platform if called with something like this: # -# make tars +# make tars BASE_OS=OEL6 # # To build the full set of crosstools for additional platforms, use a command # line looking like this: diff -Nru openjdk-lts-11.0.3+7/make/devkit/Tools.gmk openjdk-lts-11.0.4+11/make/devkit/Tools.gmk --- openjdk-lts-11.0.3+7/make/devkit/Tools.gmk 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/devkit/Tools.gmk 2019-05-03 00:43:26.000000000 +0000 @@ -110,6 +110,7 @@ libXext libXext-devel \ libXtst libXtst-devel \ libXrender libXrender-devel \ + libXrandr libXrandr-devel \ freetype freetype-devel \ libXt libXt-devel \ libSM libSM-devel \ diff -Nru openjdk-lts-11.0.3+7/make/Jprt.gmk openjdk-lts-11.0.4+11/make/Jprt.gmk --- openjdk-lts-11.0.3+7/make/Jprt.gmk 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/Jprt.gmk 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ -# -# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# This file contains targets and utilities needed by JPRT. - -# Cygpath is only defined when running on Cygwin -ifneq ($(CYGPATH), ) - # If we get JPRT_ARCHIVE_*BUNDLE externally, make sure they have /cygdrive - # style paths - ifdef JPRT_ARCHIVE_BUNDLE - override JPRT_ARCHIVE_BUNDLE := $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_BUNDLE)) - endif - ifdef JPRT_ARCHIVE_TEST_BUNDLE - override JPRT_ARCHIVE_TEST_BUNDLE := \ - $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_TEST_BUNDLE)) - endif - ifdef JPRT_ARCHIVE_SYMBOLS_BUNDLE - override JPRT_ARCHIVE_SYMBOLS_BUNDLE := \ - $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_SYMBOLS_BUNDLE)) - endif -endif - -# When running in JPRT these will be provided. Need defaults so that this makefile -# is valid anyway. -ifndef JPRT_ARCHIVE_BUNDLE - JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/jdk-image.zip -endif -ifndef JPRT_ARCHIVE_TEST_BUNDLE - JPRT_ARCHIVE_TEST_BUNDLE=/tmp/jprt_bundles/test-image.zip -endif -ifndef JPRT_ARCHIVE_SYMBOLS_BUNDLE - JPRT_ARCHIVE_SYMBOLS_BUNDLE=/tmp/jprt_bundles/symbols-image.zip -endif - -ifeq ($(SKIP_BOOT_CYCLE), false) - jprt_bundle: bootcycle-images -endif - -################################################################################ -# JPRT specific bundling targets -JPRT_TARGET ?= $(DEFAULT_MAKE_TARGET) -ifeq ($(JPRT_TARGET), $(DEFAULT_MAKE_TARGET)) - jprt_bundle: $(DEFAULT_MAKE_TARGET) $(JPRT_ARCHIVE_BUNDLE) \ - $(JPRT_ARCHIVE_TEST_BUNDLE) - - SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR) - SRC_TEST_IMAGE_DIR := $(TEST_IMAGE_DIR) - - # This target must be called in the context of a SPEC file - $(JPRT_ARCHIVE_BUNDLE): product-images - $(call MakeDir, $(@D)) - $(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIPEXE) -y -q -r $@ . - - $(JPRT_ARCHIVE_TEST_BUNDLE): test-image - $(call MakeDir, $(@D)) - $(CD) $(SRC_TEST_IMAGE_DIR) && $(ZIPEXE) -y -q -r $@ . - - ############################################################################## - # Optional symbols bundle - ifeq ($(GCOV_ENABLED), true) - jprt_bundle: $(JPRT_ARCHIVE_SYMBOLS_BUNDLE) - - $(JPRT_ARCHIVE_SYMBOLS_BUNDLE): product-images - $(call MakeDir, $(@D)) - $(CD) $(SYMBOLS_IMAGE_DIR) && $(ZIPEXE) -y -q -r $@ . - - endif - - ############################################################################## - -else - # Just fake the main bundle to satisfy JPRT - jprt_bundle: $(JPRT_TARGET) - @$(call TargetEnter) - $(MKDIR) -p $(OUTPUTDIR)/bundles - $(CD) $(TOPDIR) && $(TAR) cf - README | $(GZIP) > \ - $(JPRT_ARCHIVE_BUNDLE) - @$(call TargetExit) -endif - -ALL_TARGETS += jprt_bundle - -################################################################################ - -$(eval $(call IncludeCustomExtension, Jprt.gmk)) diff -Nru openjdk-lts-11.0.3+7/make/jprt.properties openjdk-lts-11.0.4+11/make/jprt.properties --- openjdk-lts-11.0.3+7/make/jprt.properties 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/jprt.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,503 +0,0 @@ -# -# Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -############## -# -# Global settings -# - -# Install test bundle for targets in jprt.test.bundle.targets set -jprt.selective.test.bundle.installation=true - -# The current release name -jprt.tools.default.release=jdk9 - -# Allow concurrent changes to be merged in prior to pushing -jprt.sync.push=true - -# Directories to be excluded from the source bundles -jprt.bundle.exclude.src.dirs=build dist webrev ${jprt.bundle.exclude.src.dirs.extra} - -# Use configure when building -jprt.build.use.configure=true -jprt.build.use.jib=true -jprt.test.use.jib=true -jprt.jib.launcher=bin/jib.sh -jprt.build.use.jib.publish=true - -# Clear out all the build needs as JIB handles this -jprt.jdk9.build.needs= -jprt.macosx.jdk9.build.needs= -jprt.windows_i586.jdk9.build.needs= -jprt.windows_x64.jdk9.build.needs= -jprt.solaris.jdk9.build.needs= -jprt.linux_i586.jdk9.build.needs= -jprt.linux_x64.jdk9.build.needs= -jprt.linux_armv6.jdk9.build.needs= -jprt.linux_armvh.jdk9.build.needs= -jprt.linux_arm64.jdk9.build.needs= -jprt.linux_armsflt.jdk9.build.needs= -jprt.linux_armvfpsflt.jdk9.build.needs= -jprt.linux_armvfphflt.jdk9.build.needs= -jprt.linux_armv6vfphflt.jdk9.build.needs= -jprt.solaris.client.build.needs= -jprt.linux.client.build.needs= -jprt.solaris.jdk9.compiler= -jprt.linux.jdk9.compiler= -jprt.jdk9.test.needs= - -# Disable the need for preinstalled Visual Studio and Xcode -jprt.windows.jdk9.compiler= -jprt.windows.6.2.jdk9.compiler= -jprt.windows.6.3.jdk9.compiler= -jprt.windows.jdk9.target.attribute.compilerVS2013.appliesTo.builds=none -jprt.macosx.jdk9.target.attribute.compilerXcode511.appliesTo.builds=none - -# Set up the run flavors (jvm variants) -jprt.run.flavors=c2,default,${my.additional.run.flavors} - -# Setup jib profiles -jprt.linux_i586.product.build.jib.profile=linux-x86 -jprt.linux_x64.product.build.jib.profile=linux-x64 -jprt.macosx_x64.product.build.jib.profile=macosx-x64 -jprt.solaris_sparcv9.product.build.jib.profile=solaris-sparcv9 -jprt.solaris_x64.product.build.jib.profile=solaris-x64 -jprt.windows_i586.product.build.jib.profile=windows-x86 -jprt.windows_x64.product.build.jib.profile=windows-x64 - -jprt.linux_i586.fastdebug.build.jib.profile=linux-x86-debug -jprt.linux_x64.fastdebug.build.jib.profile=linux-x64-debug -jprt.macosx_x64.fastdebug.build.jib.profile=macosx-x64-debug -jprt.solaris_sparcv9.fastdebug.build.jib.profile=solaris-sparcv9-debug -jprt.solaris_x64.fastdebug.build.jib.profile=solaris-x64-debug -jprt.windows_i586.fastdebug.build.jib.profile=windows-x86-debug -jprt.windows_x64.fastdebug.build.jib.profile=windows-x64-debug - -jprt.linux_i586.slowdebug.build.jib.profile=linux-x86-slowdebug -jprt.linux_x64.slowdebug.build.jib.profile=linux-x64-slowdebug -jprt.macosx_x64.slowdebug.build.jib.profile=macosx-x64-slowdebug -jprt.solaris_sparcv9.slowdebug.build.jib.profile=solaris-sparcv9-slowdebug -jprt.solaris_x64.slowdebug.build.jib.profile=solaris-x64-slowdebug -jprt.windows_i586.slowdebug.build.jib.profile=windows-x86-slowdebug -jprt.windows_x64.slowdebug.build.jib.profile=windows-x64-slowdebug - -jprt.linux_i586.productOpen.build.jib.profile=linux-x86-open -jprt.linux_x64.productOpen.build.jib.profile=linux-x64-open -jprt.macosx_x64.productOpen.build.jib.profile=macosx-x64-open -jprt.solaris_sparcv9.productOpen.build.jib.profile=solaris-sparcv9-open -jprt.solaris_x64.productOpen.build.jib.profile=solaris-x64-open -jprt.windows_i586.productOpen.build.jib.profile=windows-x86-open -jprt.windows_x64.productOpen.build.jib.profile=windows-x64-open - -jprt.linux_i586.fastdebugOpen.build.jib.profile=linux-x86-open-debug -jprt.linux_x64.fastdebugOpen.build.jib.profile=linux-x64-open-debug -jprt.macosx_x64.fastdebugOpen.build.jib.profile=macosx-x64-open-debug -jprt.solaris_sparcv9.fastdebugOpen.build.jib.profile=solaris-sparcv9-open-debug -jprt.solaris_x64.fastdebugOpen.build.jib.profile=solaris-x64-open-debug -jprt.windows_i586.fastdebugOpen.build.jib.profile=windows-x86-open-debug -jprt.windows_x64.fastdebugOpen.build.jib.profile=windows-x64-open-debug - -jprt.linux_i586.productZero.build.jib.profile=linux-x86-zero -jprt.linux_x64.productZero.build.jib.profile=linux-x64-zero - -jprt.linux_i586.fastdebugZero.build.jib.profile=linux-x86-zero-debug -jprt.linux_x64.fastdebugZero.build.jib.profile=linux-x64-zero-debug - -jprt.test.jib.profile=run-test-jprt - -# Set make target to use for different build flavors -jprt.build.flavor.fastdebugOpen.target=jprt_bundle -jprt.build.flavor.fastdebug.target=jprt_bundle -jprt.build.flavor.product.target=jprt_bundle -jprt.build.flavor.productOpen.target=jprt_bundle -jprt.build.flavor.optimized.target=jprt_bundle -jprt.build.flavor.optimizedOpen.target=jprt_bundle -jprt.build.flavor.slowdebug.target=jprt_bundle -jprt.build.flavor.productZero.target=jprt_bundle -jprt.build.flavor.fastdebugZero.target=jprt_bundle - -# Use these configure args to define debug level or provide specific -# configuration details not covered by Jib profiles. -jprt.slowdebug.build.configure.args= -jprt.fastdebug.build.configure.args=--disable-precompiled-headers -# Don't disable precompiled headers on windows. It's simply too slow. -jprt.windows_i586.fastdebug.build.configure.args= -jprt.windows_x64.fastdebug.build.configure.args= -jprt.windows_i586.fastdebugOpen.build.configure.args= -jprt.windows_x64.fastdebugOpen.build.configure.args= -jprt.product.build.configure.args= -jprt.optimized.build.configure.args=--with-debug-level=optimized -jprt.slowdebugOpen.build.configure.args=${jprt.slowdebug.build.configure.args} -jprt.fastdebugOpen.build.configure.args=${jprt.fastdebug.build.configure.args} -jprt.productOpen.build.configure.args=${jprt.product.build.configure.args} -jprt.optimizedOpen.build.configure.args=${jprt.product.build.configure.args} - - -# hotspot testset has custom build flavors and build targets -my.jprt.testsetHasCustomBuildFlavors.hotspot=true -my.jprt.testsetHasCustomBuildTargets.hotspot=true -my.jprt.testsetHasCustomBuildFlavors.buildinfra=true -my.jprt.testsetHasCustomBuildTargets.buildinfra=true - -# determine if the specified testset has custom build flavors or build targets -my.jprt.testsetHasCustomBuildFlavors=${my.jprt.testsetHasCustomBuildFlavors.${jprt.test.set}} -my.jprt.testsetHasCustomBuildTargets=${my.jprt.testsetHasCustomBuildTargets.${jprt.test.set}} - -# Select build flavors and build targets based on the specified testset -jprt.build.flavors=${my.jprt.testsetHasCustomBuildFlavors ? \ - ${my.build.flavors.${jprt.test.set}} : ${my.build.flavors.default}} -jprt.build.targets=${my.jprt.testsetHasCustomBuildTargets ? \ - ${my.build.targets.${jprt.test.set}} : ${my.build.targets.default}} - -# Select test targets - jprt default for jprt.test.set is "default" -jprt.test.targets=${my.test.targets.${jprt.test.set}} -jprt.make.rule.test.targets=${my.make.rule.test.targets.${jprt.test.set}} - -# Not all test targets need the test image -jprt.test.bundle.targets=\ - ${my.make.rule.test.targets.svc}, \ - ${my.make.rule.test.targets.hotspot.reg}, \ - ${my.make.rule.test.targets.hotspot.gtest} \ - ${my.make.rule.test.targets.nativesanity} \ - ${my.test.target.set:TESTNAME=jdk_lang} \ - ${my.test.target.set:TESTNAME=jdk_nio} - -# 7155453: Work-around to prevent popups on OSX from blocking test completion -# but the work-around is added to all platforms to be consistent -jprt.jbb.options=-Djava.awt.headless=true - -######## -# -# Build options (generic) -# - -# Configure args common to all builds -# Also allows for additional, testset specific configure arguments to be set -jprt.build.configure.args= \ - --with-output-sync=recurse \ - --with-jobs=$ALT_PARALLEL_COMPILE_JOBS \ - --with-version-opt=$JPRT_JOB_ID \ - ${my.additional.build.configure.args.${jprt.test.set}} \ - ${my.custom.build.configure.args} - -######## -# -# Build targets and options (default/jdk) -# - -# The default build flavors -my.build.flavors.default=fastdebug,product - -# Standard list of jprt build targets for this source tree -my.build.targets.default= \ - solaris_sparcv9_5.11-{product|fastdebug}, \ - solaris_x64_5.11-{product|fastdebug}, \ - linux_i586_3.8-{product|fastdebug}, \ - linux_x64_3.8-{product|fastdebug}, \ - macosx_x64_10.9-{product|fastdebug}, \ - windows_i586_6.3-{product|fastdebug}, \ - windows_x64_6.3-{product|fastdebug}, \ - ${my.additional.build.targets.default} - -# Test target list (no fastdebug & limited c2 testing) -my.test.target.set= \ - solaris_sparcv9_5.11-product-c2-TESTNAME, \ - solaris_x64_5.11-product-c2-TESTNAME, \ - linux_i586_3.8-product-c2-TESTNAME, \ - linux_x64_3.8-product-c2-TESTNAME, \ - macosx_x64_10.9-product-c2-TESTNAME, \ - windows_i586_6.3-product-c2-TESTNAME, \ - windows_x64_6.3-product-c2-TESTNAME - -# Default vm test targets (testset=default) -my.test.targets.default= \ - ${my.test.target.set:TESTNAME=jvm98}, \ - ${my.test.target.set:TESTNAME=scimark} - -# Default jdk test targets (testset=default) -my.make.rule.test.targets.default= \ - ${my.test.target.set:TESTNAME=langtools_jtreg}, \ - ${my.test.target.set:TESTNAME=jdk_lang}, \ - ${my.test.target.set:TESTNAME=jdk_math}, \ - ${my.test.target.set:TESTNAME=jdk_util} - -# Default vm test targets (testset=core) -my.test.targets.core= - -# Core jdk test targets (testset=core) -my.make.rule.test.targets.core= \ - ${my.test.target.set:TESTNAME=jdk_lang}, \ - ${my.test.target.set:TESTNAME=jdk_math}, \ - ${my.test.target.set:TESTNAME=jdk_util}, \ - ${my.test.target.set:TESTNAME=jdk_io}, \ - ${my.test.target.set:TESTNAME=jdk_net}, \ - ${my.test.target.set:TESTNAME=jdk_nio}, \ - ${my.test.target.set:TESTNAME=jdk_security1}, \ - ${my.test.target.set:TESTNAME=jdk_security2}, \ - ${my.test.target.set:TESTNAME=jdk_security3}, \ - ${my.test.target.set:TESTNAME=jdk_security4}, \ - ${my.test.target.set:TESTNAME=jdk_rmi}, \ - ${my.test.target.set:TESTNAME=jdk_text}, \ - ${my.test.target.set:TESTNAME=jdk_time}, \ - ${my.test.target.set:TESTNAME=jdk_other}, \ - ${my.test.target.set:TESTNAME=core_tools} - -# Svc vm test targets (testset=svc) -my.test.targets.svc= - -# Core jdk test targets (testset=svc) -my.make.rule.test.targets.svc= \ - ${my.test.target.set:TESTNAME=jdk_management}, \ - ${my.test.target.set:TESTNAME=jdk_instrument}, \ - ${my.test.target.set:TESTNAME=jdk_jmx}, \ - ${my.test.target.set:TESTNAME=jdk_jdi}, \ - ${my.test.target.set:TESTNAME=jdk_jfr}, \ - ${my.test.target.set:TESTNAME=svc_tools}, \ - ${my.make.rule.test.targets.svc.extra} - -# JAXP vm test targets (testset=jaxp) -my.test.targets.jaxp= - -# JAXP test targets (testset=jaxp) -my.make.rule.test.targets.jaxp= \ - ${my.test.target.set:TESTNAME=jaxp_all} - -# All vm test targets (testset=all) -my.test.targets.all= \ - ${my.test.targets.default}, \ - ${my.test.target.set:TESTNAME=runThese}, \ - ${my.test.target.set:TESTNAME=jbb_default} - -# All jdk test targets (testset=all) -my.make.rule.test.targets.all= \ - ${my.make.rule.test.targets.core}, \ - ${my.make.rule.test.targets.svc}, \ - ${my.test.target.set:TESTNAME=jdk_awt}, \ - ${my.test.target.set:TESTNAME=jdk_beans}, \ - ${my.test.target.set:TESTNAME=jdk_sound}, \ - ${my.test.target.set:TESTNAME=jdk_swing} - -# PIT vm test targets (testset=pit) -my.test.targets.pit= \ - ${my.test.targets.all} - -# PIT jdk test targets (testset=pit) -my.make.rule.test.targets.pit= \ - ${my.test.target.set:TESTNAME=langtools_jtreg}, \ - ${my.make.rule.test.targets.core}, \ - ${my.make.rule.test.targets.svc} \ - ${my.make.rule.test.targets.jaxp} - -# JCK test targets in test/Makefile (no windows) -my.test.target.set.jck= \ - solaris_sparcv9_5.11-product-c2-JCK7TESTRULE, \ - solaris_x64_5.11-product-c2-JCK7TESTRULE, \ - linux_i586_3.8-product-c2-JCK7TESTRULE, \ - linux_x64_3.8-product-c2-JCK7TESTRULE - -# JCK testset targets -my.make.rule.test.targets.jck= \ - ${my.test.target.set.jck:JCK7TESTRULE=jck7devtools}, \ - ${my.test.target.set.jck:JCK7TESTRULE=jck7runtime}, \ - ${my.test.target.set.jck:JCK7TESTRULE=jck7compiler} - - -############# -# -# Hotspot related settings (testset=hotspot) -# - -# The hotspot build flavors -my.build.flavors.hotspot= \ - fastdebugOpen,fastdebug,product,productOpen,optimized,optimizedOpen \ - ${my.additional.build.flavors.hotspot} - -# Platforms built for hotspot push jobs -my.build.targets.hotspot= \ - solaris_sparcv9_5.11-{product|fastdebug}, \ - solaris_x64_5.11-{product|fastdebug}, \ - linux_i586_3.8-{product|fastdebug}, \ - linux_x64_3.8-{product|fastdebug}, \ - macosx_x64_10.9-{product|fastdebug}, \ - windows_i586_6.3-{product|fastdebug}, \ - windows_x64_6.3-{product|fastdebug}, \ - solaris_x64_5.11-{fastdebugOpen}, \ - linux_x64_3.8-{productOpen}, \ - ${my.additional.build.targets.hotspot} - -# Tests to run on the various platforms for hotspot push jobs -my.test.targets.hotspot.solaris.sparcv9= \ - solaris_sparcv9_5.11-{product|fastdebug}-c2-jvm98, \ - solaris_sparcv9_5.11-{product|fastdebug}-c2-jvm98_nontiered, \ - solaris_sparcv9_5.11-{product|fastdebug}-c2-scimark, \ - solaris_sparcv9_5.11-product-c2-runThese8, - -my.test.targets.hotspot.solaris.x64= \ - solaris_x64_5.11-{product|fastdebug}-c2-jvm98, \ - solaris_x64_5.11-{product|fastdebug}-c2-jvm98_nontiered, \ - solaris_x64_5.11-{product|fastdebug}-c2-scimark, \ - solaris_x64_5.11-product-c2-runThese8, \ - solaris_x64_5.11-product-c2-runThese8_Xcomp_lang, \ - solaris_x64_5.11-product-c2-runThese8_Xcomp_vm, - -my.test.targets.hotspot.linux.i586= \ - linux_i586_3.8-{product|fastdebug}-c2-jvm98, \ - linux_i586_3.8-{product|fastdebug}-c2-jvm98_nontiered, \ - linux_i586_3.8-{product|fastdebug}-c2-scimark, \ - linux_i586_3.8-fastdebug-c2-runThese8_Xcomp_lang, \ - linux_i586_3.8-fastdebug-c2-runThese8_Xcomp_vm - -my.test.targets.hotspot.linux.x64= \ - linux_x64_3.8-{product|fastdebug}-c2-jvm98, \ - linux_x64_3.8-{product|fastdebug}-c2-jvm98_nontiered, \ - linux_x64_3.8-{product|fastdebug}-c2-scimark - -my.test.targets.hotspot.macosx.x64= \ - macosx_x64_10.9-{product|fastdebug}-c2-jvm98, \ - macosx_x64_10.9-{product|fastdebug}-c2-jvm98_nontiered, \ - macosx_x64_10.9-{product|fastdebug}-c2-scimark - -my.test.targets.hotspot.windows.i586= \ - windows_i586_6.3-{product|fastdebug}-c2-jvm98, \ - windows_i586_6.3-{product|fastdebug}-c2-jvm98_nontiered, \ - windows_i586_6.3-{product|fastdebug}-c2-scimark, \ - windows_i586_6.3-product-c2-runThese8, \ - windows_i586_6.3-product-c2-runThese8_Xcomp_lang, \ - windows_i586_6.3-product-c2-runThese8_Xcomp_vm, - -my.test.targets.hotspot.windows.x64= \ - windows_x64_6.3-{product|fastdebug}-c2-jvm98, \ - windows_x64_6.3-{product|fastdebug}-c2-jvm98_nontiered, \ - windows_x64_6.3-{product|fastdebug}-c2-scimark, \ - windows_x64_6.3-product-c2-runThese8, \ - windows_x64_6.3-product-c2-runThese8_Xcomp_lang, \ - windows_x64_6.3-product-c2-runThese8_Xcomp_vm, - -# Some basic "smoke" tests for OpenJDK builds -my.test.targets.hotspot.open= \ - solaris_x64_5.11-{productOpen|fastdebugOpen}-c2-jvm98, \ - linux_x64_3.8-{productOpen|fastdebugOpen}-c2-jvm98 - -# The complete list of test targets for jprt -my.test.targets.hotspot= \ - ${my.test.targets.hotspot.open}, \ - ${my.test.targets.hotspot.solaris.sparcv9}, \ - ${my.test.targets.hotspot.solaris.x64}, \ - ${my.test.targets.hotspot.linux.i586}, \ - ${my.test.targets.hotspot.linux.x64}, \ - ${my.test.targets.hotspot.macosx.x64}, \ - ${my.test.targets.hotspot.windows.i586}, \ - ${my.test.targets.hotspot.windows.x64}, \ - ${my.test.targets.hotspot.solaris.sparcv9}, \ - ${my.test.targets.hotspot.solaris.x64}, \ - ${my.test.targets.hotspot.linux.x64}, \ - ${my.test.targets.hotspot.windows.i586}, \ - ${my.test.targets.hotspot.windows.x64}, \ - ${my.additional.test.targets.hotspot} - - -# Make file based test targets - -my.make.rule.test.targets.hotspot.gtest= \ - linux_i586_3.8-*-default-hotspot_gtest, \ - linux_x64_3.8-*-default-hotspot_gtest, \ - macosx_x64_10.9-*-default-hotspot_gtest, \ - solaris_sparcv9_5.11-*-default-hotspot_gtest, \ - solaris_x64_5.11-*-default-hotspot_gtest, \ - windows_i586_6.3-*-default-hotspot_gtest, \ - windows_x64_6.3-*-default-hotspot_gtest, \ - ${my.additional.make.rule.test.targets.hotspot.gtest} - -my.make.rule.test.targets.hotspot.reg.group= \ - solaris_sparcv9_5.11-fastdebug-c2-GROUP, \ - solaris_x64_5.11-fastdebug-c2-GROUP, \ - linux_i586_3.8-fastdebug-c2-GROUP, \ - linux_x64_3.8-fastdebug-c2-GROUP, \ - macosx_x64_10.9-fastdebug-c2-GROUP, \ - windows_i586_6.3-fastdebug-c2-GROUP, \ - windows_x64_6.3-fastdebug-c2-GROUP - -# Hotspot jtreg tests -my.make.rule.test.targets.hotspot.reg= \ - ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_compiler_1}, \ - ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_compiler_2}, \ - ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_compiler_3}, \ - ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_compiler_closed}, \ - ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_gc_1}, \ - ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_gc_2}, \ - ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_gc_closed}, \ - ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_gc_gcold}, \ - ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_gc_gcbasher}, \ - ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_runtime}, \ - ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_tier1_serviceability}, \ - ${my.make.rule.test.targets.hotspot.reg.group:GROUP=jdk_svc_sanity}, \ - solaris_sparcv9_5.11-product-c2-hotspot_tier1_gc_gcbasher, \ - solaris_x64_5.11-product-c2-hotspot_tier1_gc_gcbasher, \ - linux_i586_3.8-product-c2-hotspot_tier1_gc_gcbasher, \ - linux_x64_3.8-product-c2-hotspot_tier1_gc_gcbasher, \ - macosx_x64_10.9-product-c2-hotspot_tier1_gc_gcbasher, \ - windows_i586_6.3-product-c2-hotspot_tier1_gc_gcbasher, \ - windows_x64_6.3-product-c2-hotspot_tier1_gc_gcbasher, \ - ${my.additional.make.rule.test.targets.hotspot.reg} - -# Other Makefile based Hotspot tests -my.make.rule.test.targets.hotspot.other= \ - ${my.make.rule.test.targets.hotspot.gtest}, \ - ${my.additional.make.rule.test.targets.hotspot.other} - -# All the makefile based tests to run -my.make.rule.test.targets.hotspot= \ - ${my.make.rule.test.targets.hotspot.reg} \ - ${my.make.rule.test.targets.hotspot.other} - -# Native jdk and hotspot test targets (testset=nativesanity) -my.make.rule.test.targets.nativesanity= \ - ${my.test.target.set:TESTNAME=jdk_native_sanity}, \ - ${my.test.target.set:TESTNAME=hotspot_native_sanity} - -################################################################################ -# Testset buildinfra -my.build.flavors.buildinfra = \ - product,fastdebug,slowdebug,productZero,fastdebugZero \ - ${my.additional.build.flavors.buildinfra} - -# Platforms built for hotspot push jobs -my.build.targets.buildinfra = \ - solaris_sparcv9_5.11-{product|fastdebug|slowdebug}, \ - solaris_x64_5.11-{product|fastdebug|slowdebug}, \ - linux_i586_3.8-{product|fastdebug|slowdebug|productZero|fastdebugZero}, \ - linux_x64_3.8-{product|fastdebug|slowdebug|productZero|fastdebugZero}, \ - macosx_x64_10.9-{product|fastdebug|slowdebug}, \ - windows_i586_6.3-{product|fastdebug|slowdebug}, \ - windows_x64_6.3-{product|fastdebug|slowdebug}, \ - ${my.additional.build.targets.buildinfra} - -my.test.targets.buildinfra = \ - ${my.test.targets.default}, \ - ${my.test.targets.hotspot} - -my.make.rule.test.targets.buildinfra = \ - ${my.make.rule.test.targets.default}, \ - ${my.make.rule.test.targets.hotspot} diff -Nru openjdk-lts-11.0.3+7/make/launcher/Launcher-java.base.gmk openjdk-lts-11.0.4+11/make/launcher/Launcher-java.base.gmk --- openjdk-lts-11.0.3+7/make/launcher/Launcher-java.base.gmk 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/launcher/Launcher-java.base.gmk 2019-05-03 00:43:26.000000000 +0000 @@ -90,7 +90,7 @@ ################################################################################ -ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), ) +ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix linux), ) $(eval $(call SetupJdkExecutable, BUILD_JSPAWNHELPER, \ NAME := jspawnhelper, \ SRC := $(TOPDIR)/src/$(MODULE)/unix/native/jspawnhelper, \ diff -Nru openjdk-lts-11.0.3+7/make/lib/Awt2dLibraries.gmk openjdk-lts-11.0.4+11/make/lib/Awt2dLibraries.gmk --- openjdk-lts-11.0.3+7/make/lib/Awt2dLibraries.gmk 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/lib/Awt2dLibraries.gmk 2019-05-03 00:43:26.000000000 +0000 @@ -533,7 +533,8 @@ ifneq ($(OPENJDK_TARGET_OS), windows) HARFBUZZ_CFLAGS += -DGETPAGESIZE -DHAVE_MPROTECT -DHAVE_PTHREAD \ - -DHAVE_SYSCONF -DHAVE_SYS_MMAN_H -DHAVE_UNISTD_H + -DHAVE_SYSCONF -DHAVE_SYS_MMAN_H -DHAVE_UNISTD_H \ + -DHB_NO_PRAGMA_GCC_DIAGNOSTIC endif ifneq (, $(findstring $(OPENJDK_TARGET_OS), linux macosx)) HARFBUZZ_CFLAGS += -DHAVE_INTEL_ATOMIC_PRIMITIVES @@ -618,8 +619,8 @@ E_ENUM_VAL_OVERFLOWS_INT_MAX, \ DISABLED_WARNINGS_CXX_solstudio := \ truncwarn wvarhidenmem wvarhidemem wbadlkginit identexpected \ - hidevf w_novirtualdescr arrowrtn2, \ - DISABLED_WARNINGS_microsoft := 4267 4244 4018 4090 4996 4146 4334 4819 4101, \ + hidevf w_novirtualdescr arrowrtn2 unknownpragma, \ + DISABLED_WARNINGS_microsoft := 4267 4244 4018 4090 4996 4146 4334 4819 4101 4068 4805 4138, \ LDFLAGS := $(subst -Xlinker -z -Xlinker defs,, \ $(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB))) $(LDFLAGS_CXX_JDK) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ diff -Nru openjdk-lts-11.0.3+7/make/Main.gmk openjdk-lts-11.0.4+11/make/Main.gmk --- openjdk-lts-11.0.3+7/make/Main.gmk 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/Main.gmk 2019-05-03 00:43:26.000000000 +0000 @@ -568,13 +568,16 @@ product-bundles: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk product-bundles) +legacy-bundles: + +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk legacy-bundles) + test-bundles: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk test-bundles) docs-bundles: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk docs-bundles) -ALL_TARGETS += product-bundles test-bundles docs-bundles +ALL_TARGETS += product-bundles legacy-bundles test-bundles docs-bundles ################################################################################ # Install targets @@ -882,6 +885,8 @@ product-bundles: product-images + legacy-bundles: legacy-images + test-bundles: test-image docs-bundles: docs-image @@ -982,6 +987,9 @@ # (and possibly other, more specific versions) product-images: jdk-image symbols-image exploded-image +# This target builds the legacy images, e.g. the legacy JRE image +legacy-images: legacy-jre-image + # zip-security is actually a bundle, but for now it needs to be considered # an image until this can be cleaned up properly. product-images: zip-security @@ -998,6 +1006,8 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) product-images: mac-jdk-bundle + + legacy-images: mac-legacy-jre-bundle endif # This target builds the documentation image @@ -1028,7 +1038,7 @@ jdk.jdwp.agent-gensrc $(ALL_MODULES) demos \ exploded-image-base exploded-image \ create-buildjdk docs-jdk-api docs-javase-api docs-reference-api docs-jdk \ - docs-javase docs-reference docs-javadoc mac-bundles product-images \ + docs-javase docs-reference docs-javadoc mac-bundles product-images legacy-images \ docs-image test-image all-images \ all-bundles @@ -1130,11 +1140,6 @@ ################################################################################ -# Include JPRT targets -include $(TOPDIR)/make/Jprt.gmk - -################################################################################ - # The following targets are intentionally not added to ALL_TARGETS since they # are internal only, to support Init.gmk. diff -Nru openjdk-lts-11.0.3+7/make/nb_native/nbproject/configurations.xml openjdk-lts-11.0.4+11/make/nb_native/nbproject/configurations.xml --- openjdk-lts-11.0.3+7/make/nb_native/nbproject/configurations.xml 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/make/nb_native/nbproject/configurations.xml 2019-05-03 00:43:26.000000000 +0000 @@ -116,6 +116,7 @@ IBM1122.map IBM1123.map IBM1124.map + IBM1129.map IBM1140.map IBM1141.map IBM1142.map @@ -16284,6 +16285,11 @@ ex="false" tool="3" flavor2="0"> + + $$@ + $$(ECHO) $$(strip $1):`$$(CD) $$($1_REPO_PATH) && $$(ID_COMMAND)` > $$@ REPO_REVISIONS += $$(SUPPORT_OUTPUTDIR)/src-rev/$$($1_FILENAME) endef @@ -94,40 +106,58 @@ $(eval $(call CreateSourceRevisionFile, $(STORED_SOURCE_REVISION))) - store-source-revision: $(STORED_SOURCE_REVISION) + scm-store-source-revision: $(STORED_SOURCE_REVISION) $(eval $(call CreateSourceRevisionFile, $(SOURCE_REVISION_TRACKER))) - create-source-revision-tracker: $(SOURCE_REVISION_TRACKER) + scm-create-source-revision-tracker: $(SOURCE_REVISION_TRACKER) + + STORE_SOURCE_REVISION_TARGET := scm-store-source-revision + CREATE_SOURCE_REVISION_TRACKER_TARGET := scm-create-source-revision-tracker + + .PHONY: scm-store-source-revision scm-create-source-revision-tracker else - # Not using HG + # Not using any SCM ifneq ($(wildcard $(STORED_SOURCE_REVISION)), ) # We have a stored source revision (.src-rev) - store-source-revision: - $(call LogInfo, No mercurial configuration present$(COMMA) not updating .src-rev) + src-store-source-revision: + $(call LogInfo, No SCM configuration present$(COMMA) not updating .src-rev) $(SOURCE_REVISION_TRACKER): $(STORED_SOURCE_REVISION) $(install-file) - create-source-revision-tracker: $(SOURCE_REVISION_TRACKER) + src-create-source-revision-tracker: $(SOURCE_REVISION_TRACKER) else # We don't have a stored source revision. Can't do anything, really. - store-source-revision: - $(call LogWarn, Error: No mercurial configuration present$(COMMA) cannot create .src-rev) + src-store-source-revision: + $(call LogWarn, Error: No SCM configuration present$(COMMA) cannot create .src-rev) exit 2 - create-source-revision-tracker: - $(call LogWarn, Warning: No mercurial configuration present and no .src-rev) + src-create-source-revision-tracker: + $(call LogWarn, Warning: No SCM configuration present and no .src-rev) endif + STORE_SOURCE_REVISION_TARGET := src-store-source-revision + CREATE_SOURCE_REVISION_TRACKER_TARGET := src-create-source-revision-tracker + + .PHONY: src-store-source-revision src-create-source-revision-tracker + endif -all: store-source-revision create-source-revision-tracker +################################################################################ + +$(eval $(call IncludeCustomExtension, SourceRevision-post.gmk)) + +################################################################################ + +store-source-revision: $(STORE_SOURCE_REVISION_TARGET) + +create-source-revision-tracker: $(CREATE_SOURCE_REVISION_TRACKER_TARGET) FRC: # Force target -.PHONY: all store-source-revision create-source-revision-tracker +.PHONY: store-source-revision create-source-revision-tracker diff -Nru openjdk-lts-11.0.3+7/src/hotspot/cpu/aarch64/aarch64.ad openjdk-lts-11.0.4+11/src/hotspot/cpu/aarch64/aarch64.ad --- openjdk-lts-11.0.3+7/src/hotspot/cpu/aarch64/aarch64.ad 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/cpu/aarch64/aarch64.ad 2019-05-03 00:43:26.000000000 +0000 @@ -15534,9 +15534,10 @@ // TODO // provide a near and far version of this code -instruct safePoint(iRegP poll) +instruct safePoint(rFlagsReg cr, iRegP poll) %{ match(SafePoint poll); + effect(KILL cr); format %{ "ldrw zr, [$poll]\t# Safepoint: poll for GC" diff -Nru openjdk-lts-11.0.3+7/src/hotspot/cpu/aarch64/assembler_aarch64.hpp openjdk-lts-11.0.4+11/src/hotspot/cpu/aarch64/assembler_aarch64.hpp --- openjdk-lts-11.0.3+7/src/hotspot/cpu/aarch64/assembler_aarch64.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/cpu/aarch64/assembler_aarch64.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -1484,6 +1484,25 @@ INSN(eorw, 0, 0b10, 0); INSN(andsw, 0, 0b11, 0); +#undef INSN + +#define INSN(NAME, size, op, N) \ + void NAME(Register Rd, Register Rn, Register Rm, \ + enum shift_kind kind = LSL, unsigned shift = 0) { \ + starti; \ + f(N, 21); \ + zrf(Rm, 16), zrf(Rn, 5), zrf(Rd, 0); \ + op_shifted_reg(0b01010, kind, shift, size, op); \ + } \ + \ + /* These instructions have no immediate form. Provide an overload so \ + that if anyone does try to use an immediate operand -- this has \ + happened! -- we'll get a compile-time error. */ \ + void NAME(Register Rd, Register Rn, unsigned imm, \ + enum shift_kind kind = LSL, unsigned shift = 0) { \ + assert(false, " can't be used with immediate operand"); \ + } + INSN(bic, 1, 0b00, 1); INSN(orn, 1, 0b01, 1); INSN(eon, 1, 0b10, 1); diff -Nru openjdk-lts-11.0.3+7/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp openjdk-lts-11.0.4+11/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp --- openjdk-lts-11.0.3+7/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -2214,7 +2214,7 @@ __ ldr(src, Address(sp, 4*BytesPerWord)); // r0 is -1^K where K == partial copied count - __ eonw(rscratch1, r0, 0); + __ eonw(rscratch1, r0, zr); // adjust length down and src/end pos up by partial copied count __ subw(length, length, rscratch1); __ addw(src_pos, src_pos, rscratch1); diff -Nru openjdk-lts-11.0.3+7/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp openjdk-lts-11.0.4+11/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp --- openjdk-lts-11.0.3+7/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -2161,6 +2161,14 @@ hlt(0); } +void MacroAssembler::warn(const char* msg) { + pusha(); + mov(c_rarg0, (address)msg); + mov(lr, CAST_FROM_FN_PTR(address, warning)); + blrt(lr, 1, 0, MacroAssembler::ret_type_void); + popa(); +} + void MacroAssembler::unimplemented(const char* what) { const char* buf = NULL; { diff -Nru openjdk-lts-11.0.3+7/src/hotspot/cpu/aarch64/methodHandles_aarch64.cpp openjdk-lts-11.0.4+11/src/hotspot/cpu/aarch64/methodHandles_aarch64.cpp --- openjdk-lts-11.0.3+7/src/hotspot/cpu/aarch64/methodHandles_aarch64.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/cpu/aarch64/methodHandles_aarch64.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -105,8 +105,8 @@ // compiled code in threads for which the event is enabled. Check here for // interp_only_mode if these events CAN be enabled. - __ ldrb(rscratch1, Address(rthread, JavaThread::interp_only_mode_offset())); - __ cbnz(rscratch1, run_compiled_code); + __ ldrw(rscratch1, Address(rthread, JavaThread::interp_only_mode_offset())); + __ cbzw(rscratch1, run_compiled_code); __ ldr(rscratch1, Address(method, Method::interpreter_entry_offset())); __ br(rscratch1); __ BIND(run_compiled_code); diff -Nru openjdk-lts-11.0.3+7/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp openjdk-lts-11.0.4+11/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp --- openjdk-lts-11.0.3+7/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -135,8 +135,7 @@ int frame_size_in_words = frame_size_in_bytes / wordSize; *total_frame_words = frame_size_in_words; - // Save registers, fpu state, and flags. - + // Save Integer and Float registers. __ enter(); __ push_CPU_state(save_vectors); @@ -2890,7 +2889,7 @@ bool cause_return = (poll_type == POLL_AT_RETURN); bool save_vectors = (poll_type == POLL_AT_VECTOR_LOOP); - // Save registers, fpu state, and flags + // Save Integer and Float registers. map = RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words, save_vectors); // The following is basically a call_VM. However, we need the precise diff -Nru openjdk-lts-11.0.3+7/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp openjdk-lts-11.0.4+11/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp --- openjdk-lts-11.0.3+7/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1684,7 +1684,7 @@ // Helper for generating a dynamic type check. - // Smashes rscratch1. + // Smashes rscratch1, rscratch2. void generate_type_check(Register sub_klass, Register super_check_offset, Register super_klass, @@ -1978,6 +1978,10 @@ StubCodeMark mark(this, "StubRoutines", name); + + // Registers used as temps + const Register dst_klass = c_rarg5; + __ align(CodeEntryAlignment); address start = __ pc(); @@ -2180,8 +2184,7 @@ arraycopy_range_checks(src, src_pos, dst, dst_pos, scratch_length, r18, L_failed); - const Register rscratch2_dst_klass = rscratch2; - __ load_klass(rscratch2_dst_klass, dst); // reload + __ load_klass(dst_klass, dst); // reload // Marshal the base address arguments now, freeing registers. __ lea(from, Address(src, src_pos, Address::lsl(LogBytesPerHeapOop))); @@ -2191,24 +2194,25 @@ __ movw(count, length); // length (reloaded) Register sco_temp = c_rarg3; // this register is free now assert_different_registers(from, to, count, sco_temp, - rscratch2_dst_klass, scratch_src_klass); + dst_klass, scratch_src_klass); // assert_clean_int(count, sco_temp); // Generate the type check. const int sco_offset = in_bytes(Klass::super_check_offset_offset()); - __ ldrw(sco_temp, Address(rscratch2_dst_klass, sco_offset)); - // assert_clean_int(sco_temp, r18); - generate_type_check(scratch_src_klass, sco_temp, rscratch2_dst_klass, L_plain_copy); + __ ldrw(sco_temp, Address(dst_klass, sco_offset)); + + // Smashes rscratch1, rscratch2 + generate_type_check(scratch_src_klass, sco_temp, dst_klass, L_plain_copy); // Fetch destination element klass from the ObjArrayKlass header. int ek_offset = in_bytes(ObjArrayKlass::element_klass_offset()); - __ ldr(rscratch2_dst_klass, Address(rscratch2_dst_klass, ek_offset)); - __ ldrw(sco_temp, Address(rscratch2_dst_klass, sco_offset)); + __ ldr(dst_klass, Address(dst_klass, ek_offset)); + __ ldrw(sco_temp, Address(dst_klass, sco_offset)); // the checkcast_copy loop needs two extra arguments: assert(c_rarg3 == sco_temp, "#3 already in place"); // Set up arguments for checkcast_copy_entry. - __ mov(c_rarg4, rscratch2_dst_klass); // dst.klass.element_klass + __ mov(c_rarg4, dst_klass); // dst.klass.element_klass __ b(RuntimeAddress(checkcast_copy_entry)); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp openjdk-lts-11.0.4+11/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp --- openjdk-lts-11.0.3+7/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1908,8 +1908,8 @@ Label L_done; __ ldrb(rscratch1, Address(rbcp, 0)); - __ cmpw(r1, Bytecodes::_invokestatic); - __ br(Assembler::EQ, L_done); + __ cmpw(rscratch1, Bytecodes::_invokestatic); + __ br(Assembler::NE, L_done); // The member name argument must be restored if _invokestatic is re-executed after a PopFrame call. // Detect such a case in the InterpreterRuntime function and return the member name argument, or NULL. @@ -1944,7 +1944,6 @@ // remove the activation (without doing throws on illegalMonitorExceptions) __ remove_activation(vtos, false, true, false); // restore exception - // restore exception __ get_vm_result(r0, rthread); // In between activations - previous activation type unknown yet @@ -1953,9 +1952,8 @@ // // r0: exception // lr: return address/pc that threw exception - // rsp: expression stack of caller + // esp: expression stack of caller // rfp: fp of caller - // FIXME: There's no point saving LR here because VM calls don't trash it __ stp(r0, lr, Address(__ pre(sp, -2 * wordSize))); // save exception & return address __ super_call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::exception_handler_for_return_address), diff -Nru openjdk-lts-11.0.3+7/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp openjdk-lts-11.0.4+11/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp --- openjdk-lts-11.0.3+7/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -129,8 +129,11 @@ int dcache_line = VM_Version::dcache_line_size(); + // Limit AllocatePrefetchDistance so that it does not exceed the + // constraint in AllocatePrefetchDistanceConstraintFunc. if (FLAG_IS_DEFAULT(AllocatePrefetchDistance)) - FLAG_SET_DEFAULT(AllocatePrefetchDistance, 3*dcache_line); + FLAG_SET_DEFAULT(AllocatePrefetchDistance, MIN2(512, 3*dcache_line)); + if (FLAG_IS_DEFAULT(AllocatePrefetchStepSize)) FLAG_SET_DEFAULT(AllocatePrefetchStepSize, dcache_line); if (FLAG_IS_DEFAULT(PrefetchScanIntervalInBytes)) @@ -261,8 +264,10 @@ if (FLAG_IS_DEFAULT(UseCRC32)) { UseCRC32 = (auxv & HWCAP_CRC32) != 0; } + if (UseCRC32 && (auxv & HWCAP_CRC32) == 0) { warning("UseCRC32 specified, but not supported on this CPU"); + FLAG_SET_DEFAULT(UseCRC32, false); } if (FLAG_IS_DEFAULT(UseAdler32Intrinsics)) { @@ -280,6 +285,7 @@ } else { if (UseLSE) { warning("UseLSE specified, but not supported on this CPU"); + FLAG_SET_DEFAULT(UseLSE, false); } } @@ -294,9 +300,11 @@ } else { if (UseAES) { warning("UseAES specified, but not supported on this CPU"); + FLAG_SET_DEFAULT(UseAES, false); } if (UseAESIntrinsics) { warning("UseAESIntrinsics specified, but not supported on this CPU"); + FLAG_SET_DEFAULT(UseAESIntrinsics, false); } } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp openjdk-lts-11.0.4+11/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp --- openjdk-lts-11.0.3+7/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2017, SAP SE. All rights reserved. + * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2019, SAP SE. 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 @@ -1455,13 +1455,11 @@ break; } } else { - if (opr2->is_address()) { - DEBUG_ONLY( Unimplemented(); ) // Seems to be unused at the moment. - LIR_Address *addr = opr2->as_address_ptr(); - BasicType type = addr->type(); - if (type == T_OBJECT) { __ ld(R0, index_or_disp(addr), addr->base()->as_register()); } - else { __ lwa(R0, index_or_disp(addr), addr->base()->as_register()); } - __ cmpd(BOOL_RESULT, opr1->as_register(), R0); + assert(opr1->type() != T_ADDRESS && opr2->type() != T_ADDRESS, "currently unsupported"); + if (opr1->type() == T_OBJECT || opr1->type() == T_ARRAY) { + // There are only equal/notequal comparisons on objects. + assert(condition == lir_cond_equal || condition == lir_cond_notEqual, "oops"); + __ cmpd(BOOL_RESULT, opr1->as_register(), opr2->as_register()); } else { if (unsigned_comp) { __ cmplw(BOOL_RESULT, opr1->as_register(), opr2->as_register()); @@ -1497,14 +1495,6 @@ } else { ShouldNotReachHere(); } - } else if (opr1->is_address()) { - DEBUG_ONLY( Unimplemented(); ) // Seems to be unused at the moment. - LIR_Address * addr = opr1->as_address_ptr(); - BasicType type = addr->type(); - assert (opr2->is_constant(), "Checking"); - if (type == T_OBJECT) { __ ld(R0, index_or_disp(addr), addr->base()->as_register()); } - else { __ lwa(R0, index_or_disp(addr), addr->base()->as_register()); } - __ cmpdi(BOOL_RESULT, R0, opr2->as_constant_ptr()->as_jint()); } else { ShouldNotReachHere(); } @@ -2378,26 +2368,31 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, Label* failure, Label* obj_is_null) { - Register obj = op->object()->as_register(); + const Register obj = op->object()->as_register(); // Needs to live in this register at safepoint (patching stub). Register k_RInfo = op->tmp1()->as_register(); Register klass_RInfo = op->tmp2()->as_register(); Register Rtmp1 = op->tmp3()->as_register(); Register dst = op->result_opr()->as_register(); ciKlass* k = op->klass(); bool should_profile = op->should_profile(); - bool move_obj_to_dst = (op->code() == lir_checkcast); // Attention: do_temp(opTypeCheck->_object) is not used, i.e. obj may be same as one of the temps. - bool reg_conflict = (obj == k_RInfo || obj == klass_RInfo || obj == Rtmp1); - bool restore_obj = move_obj_to_dst && reg_conflict; + bool reg_conflict = false; + if (obj == k_RInfo) { + k_RInfo = dst; + reg_conflict = true; + } else if (obj == klass_RInfo) { + klass_RInfo = dst; + reg_conflict = true; + } else if (obj == Rtmp1) { + Rtmp1 = dst; + reg_conflict = true; + } + assert_different_registers(obj, k_RInfo, klass_RInfo, Rtmp1); __ cmpdi(CCR0, obj, 0); - if (move_obj_to_dst || reg_conflict) { - __ mr_if_needed(dst, obj); - if (reg_conflict) { obj = dst; } - } - ciMethodData* md; - ciProfileData* data; + ciMethodData* md = NULL; + ciProfileData* data = NULL; int mdo_offset_bias = 0; if (should_profile) { ciMethod* method = op->profiled_method(); @@ -2460,12 +2455,27 @@ } else { // Call out-of-line instance of __ check_klass_subtype_slow_path(...): address entry = Runtime1::entry_for(Runtime1::slow_subtype_check_id); - //__ load_const_optimized(Rtmp1, entry, R0); - __ calculate_address_from_global_toc(Rtmp1, entry, true, true, false); - __ mtctr(Rtmp1); + // Stub needs fixed registers (tmp1-3). + Register original_k_RInfo = op->tmp1()->as_register(); + Register original_klass_RInfo = op->tmp2()->as_register(); + Register original_Rtmp1 = op->tmp3()->as_register(); + bool keep_obj_alive = reg_conflict && (op->code() == lir_checkcast); + bool keep_klass_RInfo_alive = (obj == original_klass_RInfo) && should_profile; + if (keep_obj_alive && (obj != original_Rtmp1)) { __ mr(R0, obj); } + __ mr_if_needed(original_k_RInfo, k_RInfo); + __ mr_if_needed(original_klass_RInfo, klass_RInfo); + if (keep_obj_alive) { __ mr(dst, (obj == original_Rtmp1) ? obj : R0); } + //__ load_const_optimized(original_Rtmp1, entry, R0); + __ calculate_address_from_global_toc(original_Rtmp1, entry, true, true, false); + __ mtctr(original_Rtmp1); __ bctrl(); // sets CR0 + if (keep_obj_alive) { + if (keep_klass_RInfo_alive) { __ mr(R0, obj); } + __ mr(obj, dst); + } if (should_profile) { __ bne(CCR0, *failure_target); + if (keep_klass_RInfo_alive) { __ mr(klass_RInfo, keep_obj_alive ? R0 : obj); } // Fall through to success case. } else { __ beq(CCR0, *success); @@ -2493,11 +2503,6 @@ } __ bind(*failure); - - if (restore_obj) { - __ mr(op->object()->as_register(), dst); - // Fall through to failure case. - } } @@ -2514,8 +2519,8 @@ __ verify_oop(value); CodeStub* stub = op->stub(); // Check if it needs to be profiled. - ciMethodData* md; - ciProfileData* data; + ciMethodData* md = NULL; + ciProfileData* data = NULL; int mdo_offset_bias = 0; if (should_profile) { ciMethod* method = op->profiled_method(); @@ -2590,10 +2595,11 @@ } else if (code == lir_checkcast) { Label success, failure; - emit_typecheck_helper(op, &success, /*fallthru*/&failure, &success); // Moves obj to dst. + emit_typecheck_helper(op, &success, /*fallthru*/&failure, &success); __ b(*op->stub()->entry()); __ align(32, 12); __ bind(success); + __ mr_if_needed(op->result_opr()->as_register(), op->object()->as_register()); } else if (code == lir_instanceof) { Register dst = op->result_opr()->as_register(); Label success, failure, done; diff -Nru openjdk-lts-11.0.3+7/src/hotspot/cpu/ppc/nativeInst_ppc.cpp openjdk-lts-11.0.4+11/src/hotspot/cpu/ppc/nativeInst_ppc.cpp --- openjdk-lts-11.0.3+7/src/hotspot/cpu/ppc/nativeInst_ppc.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/cpu/ppc/nativeInst_ppc.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2015 SAP SE. All rights reserved. + * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2019, SAP SE. 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 @@ -360,8 +360,8 @@ void NativeGeneralJump::insert_unconditional(address code_pos, address entry) { CodeBuffer cb(code_pos, BytesPerInstWord + 1); - MacroAssembler* a = new MacroAssembler(&cb); - a->b(entry); + MacroAssembler a(&cb); + a.b(entry); ICache::ppc64_flush_icache_bytes(code_pos, NativeGeneralJump::instruction_size); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/cpu/s390/frame_s390.cpp openjdk-lts-11.0.4+11/src/hotspot/cpu/s390/frame_s390.cpp --- openjdk-lts-11.0.3+7/src/hotspot/cpu/s390/frame_s390.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/cpu/s390/frame_s390.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016 SAP SE. All rights reserved. + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2019, SAP SE. 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 @@ -478,6 +478,7 @@ // name Method* method = *(Method**)((address)current_fp + _z_ijava_state_neg(method)); if (method) { + ResourceMark rm; if (method->is_synchronized()) st->print("synchronized "); if (method->is_static()) st->print("static "); if (method->is_native()) st->print("native "); @@ -542,6 +543,7 @@ // name Method* method = ((nmethod *)blob)->method(); if (method) { + ResourceMark rm; method->name_and_sig_as_C_string(buf, sizeof(buf)); st->print("%s ", buf); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/cpu/s390/stubGenerator_s390.cpp openjdk-lts-11.0.4+11/src/hotspot/cpu/s390/stubGenerator_s390.cpp --- openjdk-lts-11.0.3+7/src/hotspot/cpu/s390/stubGenerator_s390.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/cpu/s390/stubGenerator_s390.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016, 2017, SAP SE. All rights reserved. + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2019, SAP SE. 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 @@ -1847,6 +1847,51 @@ } + // Compute GHASH function. + address generate_ghash_processBlocks() { + __ align(CodeEntryAlignment); + StubCodeMark mark(this, "StubRoutines", "ghash_processBlocks"); + unsigned int start_off = __ offset(); // Remember stub start address (is rtn value). + + const Register state = Z_ARG1; + const Register subkeyH = Z_ARG2; + const Register data = Z_ARG3; // 1st of even-odd register pair. + const Register blocks = Z_ARG4; + const Register len = blocks; // 2nd of even-odd register pair. + + const int param_block_size = 4 * 8; + const int frame_resize = param_block_size + 8; // Extra space for copy of fp. + + // Reserve stack space for parameter block (R1). + __ z_lgr(Z_R1, Z_SP); + __ resize_frame(-frame_resize, Z_R0, true); + __ z_aghi(Z_R1, -param_block_size); + + // Fill parameter block. + __ z_mvc(Address(Z_R1) , Address(state) , 16); + __ z_mvc(Address(Z_R1, 16), Address(subkeyH), 16); + + // R4+5: data pointer + length + __ z_llgfr(len, blocks); // Cast to 64-bit. + + // R0: function code + __ load_const_optimized(Z_R0, (int)VM_Version::MsgDigest::_GHASH); + + // Compute. + __ z_sllg(len, len, 4); // In bytes. + __ kimd(data); + + // Copy back result and free parameter block. + __ z_mvc(Address(state), Address(Z_R1), 16); + __ z_xc(Address(Z_R1), param_block_size, Address(Z_R1)); + __ z_aghi(Z_SP, frame_resize); + + __ z_br(Z_R14); + + return __ addr_at(start_off); + } + + // Call interface for all SHA* stubs. // // Z_ARG1 - source data block. Ptr to leftmost byte to be processed. @@ -2310,6 +2355,11 @@ StubRoutines::_cipherBlockChaining_decryptAESCrypt = generate_cipherBlockChaining_AES_decrypt("AES_decryptBlock_chaining"); } + // Generate GHASH intrinsics code + if (UseGHASHIntrinsics) { + StubRoutines::_ghash_processBlocks = generate_ghash_processBlocks(); + } + // Generate SHA1/SHA256/SHA512 intrinsics code. if (UseSHA1Intrinsics) { StubRoutines::_sha1_implCompress = generate_SHA1_stub(false, "SHA1_singleBlock"); diff -Nru openjdk-lts-11.0.3+7/src/hotspot/cpu/s390/vm_version_s390.cpp openjdk-lts-11.0.4+11/src/hotspot/cpu/s390/vm_version_s390.cpp --- openjdk-lts-11.0.3+7/src/hotspot/cpu/s390/vm_version_s390.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/cpu/s390/vm_version_s390.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016, 2018 SAP SE. All rights reserved. + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2019 SAP SE. 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 @@ -165,8 +165,10 @@ FLAG_SET_DEFAULT(UseAESCTRIntrinsics, false); } - // TODO: implement GHASH intrinsics - if (UseGHASHIntrinsics) { + if (FLAG_IS_DEFAULT(UseGHASHIntrinsics) && has_Crypto_GHASH()) { + FLAG_SET_DEFAULT(UseGHASHIntrinsics, true); + } + if (UseGHASHIntrinsics && !has_Crypto_GHASH()) { warning("GHASH intrinsics are not available on this CPU"); FLAG_SET_DEFAULT(UseGHASHIntrinsics, false); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/cpu/sparc/stubGenerator_sparc.cpp openjdk-lts-11.0.4+11/src/hotspot/cpu/sparc/stubGenerator_sparc.cpp --- openjdk-lts-11.0.3+7/src/hotspot/cpu/sparc/stubGenerator_sparc.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/cpu/sparc/stubGenerator_sparc.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2019, 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 @@ -4219,7 +4219,7 @@ // save F48:F54 in temp registers __ movdtox(F54,G2); __ movdtox(F52,G3); - __ movdtox(F50,G6); + __ movdtox(F50,L6); __ movdtox(F48,G1); for ( int i = 46; i >= 14; i -= 8 ) { __ aes_dround23(as_FloatRegister(i), F0, F2, F4); @@ -4247,7 +4247,7 @@ // re-init F48:F54 with their original values __ movxtod(G2,F54); __ movxtod(G3,F52); - __ movxtod(G6,F50); + __ movxtod(L6,F50); __ movxtod(G1,F48); __ movxtod(L0,F6); diff -Nru openjdk-lts-11.0.3+7/src/hotspot/cpu/x86/crc32c.h openjdk-lts-11.0.4+11/src/hotspot/cpu/x86/crc32c.h --- openjdk-lts-11.0.3+7/src/hotspot/cpu/x86/crc32c.h 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/cpu/x86/crc32c.h 2019-05-03 00:43:26.000000000 +0000 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,6 +22,9 @@ * */ +#ifndef CPU_X86_CRC32C_H +#define CPU_X86_CRC32C_H + enum { // S. Gueron / Information Processing Letters 112 (2012) 184 // shows than anything above 6K and below 32K is a good choice @@ -64,3 +67,5 @@ // a) constants table generation (hotspot/src/cpu/x86/vm/stubRoutines_x86.cpp) // b) constant fetch from that table (macroAssembler_x86.cpp) // c) unrolled for loop (macroAssembler_x86.cpp) + +#endif /* !CPU_X86_CRC32C_H */ diff -Nru openjdk-lts-11.0.3+7/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp openjdk-lts-11.0.4+11/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp --- openjdk-lts-11.0.3+7/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -2968,9 +2968,8 @@ __ enter(); __ subptr(rsp, 8 * wordSize); - if (multi_block) { - __ push(limit); - } + handleSOERegisters(true /*saving*/); + __ movptr(buf, buf_param); __ movptr(state, state_param); if (multi_block) { @@ -2981,9 +2980,7 @@ __ fast_sha1(abcd, e0, e1, msg0, msg1, msg2, msg3, shuf_mask, buf, state, ofs, limit, rsp, multi_block); - if (multi_block) { - __ pop(limit); - } + handleSOERegisters(false /*restoring*/); __ addptr(rsp, 8 * wordSize); __ leave(); __ ret(0); diff -Nru openjdk-lts-11.0.3+7/src/hotspot/cpu/x86/vm_version_x86.cpp openjdk-lts-11.0.4+11/src/hotspot/cpu/x86/vm_version_x86.cpp --- openjdk-lts-11.0.3+7/src/hotspot/cpu/x86/vm_version_x86.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/cpu/x86/vm_version_x86.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -901,11 +901,15 @@ FLAG_SET_DEFAULT(UseSHA256Intrinsics, false); } +#ifdef _LP64 + // These are only supported on 64-bit if (UseSHA && supports_avx2() && supports_bmi2()) { if (FLAG_IS_DEFAULT(UseSHA512Intrinsics)) { FLAG_SET_DEFAULT(UseSHA512Intrinsics, true); } - } else if (UseSHA512Intrinsics) { + } else +#endif + if (UseSHA512Intrinsics) { warning("Intrinsics for SHA-384 and SHA-512 crypto hash functions not available on this CPU."); FLAG_SET_DEFAULT(UseSHA512Intrinsics, false); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/cpu/x86/x86_32.ad openjdk-lts-11.0.4+11/src/hotspot/cpu/x86/x86_32.ad --- openjdk-lts-11.0.3+7/src/hotspot/cpu/x86/x86_32.ad 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/cpu/x86/x86_32.ad 2019-05-03 00:43:26.000000000 +0000 @@ -1309,7 +1309,7 @@ } uint MachSpillCopyNode::size(PhaseRegAlloc *ra_) const { - return implementation( NULL, ra_, true, NULL ); + return MachNode::size(ra_); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/aix/os_aix.cpp openjdk-lts-11.0.4+11/src/hotspot/os/aix/os_aix.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os/aix/os_aix.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/aix/os_aix.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -3737,8 +3737,7 @@ /* Scan the directory */ bool result = true; - char buf[sizeof(struct dirent) + MAX_PATH]; - while (result && (ptr = ::readdir(dir)) != NULL) { + while (result && (ptr = readdir(dir)) != NULL) { if (strcmp(ptr->d_name, ".") != 0 && strcmp(ptr->d_name, "..") != 0) { result = false; } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/aix/os_aix.inline.hpp openjdk-lts-11.0.4+11/src/hotspot/os/aix/os_aix.inline.hpp --- openjdk-lts-11.0.3+7/src/hotspot/os/aix/os_aix.inline.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/aix/os_aix.inline.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -74,17 +74,6 @@ inline const int os::default_file_open_flags() { return 0;} -inline DIR* os::opendir(const char* dirname) { - assert(dirname != NULL, "just checking"); - return ::opendir(dirname); -} - -inline int os::readdir_buf_size(const char *path) { - // According to aix sys/limits, NAME_MAX must be retrieved at runtime. - const long my_NAME_MAX = pathconf(path, _PC_NAME_MAX); - return my_NAME_MAX + sizeof(dirent) + 1; -} - inline jlong os::lseek(int fd, jlong offset, int whence) { return (jlong) ::lseek64(fd, offset, whence); } @@ -97,23 +86,6 @@ return ::ftruncate64(fd, length); } -inline struct dirent* os::readdir(DIR* dirp, dirent *dbuf) { - dirent* p = NULL; - assert(dirp != NULL, "just checking"); - - // AIX: slightly different from POSIX. - // On AIX, readdir_r returns 0 or != 0 and error details in errno. - if (::readdir_r(dirp, dbuf, &p) != 0) { - return NULL; - } - return p; -} - -inline int os::closedir(DIR *dirp) { - assert(dirp != NULL, "argument is NULL"); - return ::closedir(dirp); -} - // macros for restartable system calls #define RESTARTABLE(_cmd, _result) do { \ diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/aix/os_perf_aix.cpp openjdk-lts-11.0.4+11/src/hotspot/os/aix/os_perf_aix.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os/aix/os_perf_aix.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/aix/os_perf_aix.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -273,110 +273,12 @@ return n; } -static FILE* open_statfile(void) { - FILE *f; - - if ((f = fopen("/proc/stat", "r")) == NULL) { - static int haveWarned = 0; - if (!haveWarned) { - haveWarned = 1; - } - } - return f; -} - -static void -next_line(FILE *f) { - int c; - do { - c = fgetc(f); - } while (c != '\n' && c != EOF); -} - /** - * Return the total number of ticks since the system was booted. - * If the usedTicks parameter is not NULL, it will be filled with - * the number of ticks spent on actual processes (user, system or - * nice processes) since system boot. Note that this is the total number - * of "executed" ticks on _all_ CPU:s, that is on a n-way system it is - * n times the number of ticks that has passed in clock time. - * - * Returns a negative value if the reading of the ticks failed. + * on Linux we got the ticks related information from /proc/stat + * this does not work on AIX, libperfstat might be an alternative */ static OSReturn get_total_ticks(int which_logical_cpu, CPUPerfTicks* pticks) { - FILE* fh; - uint64_t userTicks, niceTicks, systemTicks, idleTicks; - uint64_t iowTicks = 0, irqTicks = 0, sirqTicks= 0; - int logical_cpu = -1; - const int expected_assign_count = (-1 == which_logical_cpu) ? 4 : 5; - int n; - - if ((fh = open_statfile()) == NULL) { - return OS_ERR; - } - if (-1 == which_logical_cpu) { - n = fscanf(fh, "cpu " UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " " - UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT, - &userTicks, &niceTicks, &systemTicks, &idleTicks, - &iowTicks, &irqTicks, &sirqTicks); - } else { - // Move to next line - next_line(fh); - - // find the line for requested cpu faster to just iterate linefeeds? - for (int i = 0; i < which_logical_cpu; i++) { - next_line(fh); - } - - n = fscanf(fh, "cpu%u " UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " " - UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT, - &logical_cpu, &userTicks, &niceTicks, - &systemTicks, &idleTicks, &iowTicks, &irqTicks, &sirqTicks); - } - - fclose(fh); - if (n < expected_assign_count || logical_cpu != which_logical_cpu) { -#ifdef DEBUG_LINUX_PROC_STAT - vm_fprintf(stderr, "[stat] read failed"); -#endif - return OS_ERR; - } - -#ifdef DEBUG_LINUX_PROC_STAT - vm_fprintf(stderr, "[stat] read " - UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " " - UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " \n", - userTicks, niceTicks, systemTicks, idleTicks, - iowTicks, irqTicks, sirqTicks); -#endif - - pticks->used = userTicks + niceTicks; - pticks->usedKernel = systemTicks + irqTicks + sirqTicks; - pticks->total = userTicks + niceTicks + systemTicks + idleTicks + - iowTicks + irqTicks + sirqTicks; - - return OS_OK; -} - - -static int get_systemtype(void) { - static int procEntriesType = UNDETECTED; - DIR *taskDir; - - if (procEntriesType != UNDETECTED) { - return procEntriesType; - } - - // Check whether we have a task subdirectory - if ((taskDir = opendir("/proc/self/task")) == NULL) { - procEntriesType = UNDETECTABLE; - } else { - // The task subdirectory exists; we're on a Linux >= 2.6 system - closedir(taskDir); - procEntriesType = LINUX26_NPTL; - } - - return procEntriesType; + return OS_ERR; } /** read user and system ticks from a named procfile, assumed to be in 'stat' format then. */ @@ -390,26 +292,7 @@ * to the JVM on any CPU. */ static OSReturn get_jvm_ticks(CPUPerfTicks* pticks) { - uint64_t userTicks; - uint64_t systemTicks; - - if (get_systemtype() != LINUX26_NPTL) { - return OS_ERR; - } - - if (read_ticks("/proc/self/stat", &userTicks, &systemTicks) != 2) { - return OS_ERR; - } - - // get the total - if (get_total_ticks(-1, pticks) != OS_OK) { - return OS_ERR; - } - - pticks->used = userTicks; - pticks->usedKernel = systemTicks; - - return OS_OK; + return OS_ERR; } /** @@ -473,29 +356,7 @@ } static int SCANF_ARGS(1, 2) parse_stat(_SCANFMT_ const char* fmt, ...) { - FILE *f; - va_list args; - - va_start(args, fmt); - - if ((f = open_statfile()) == NULL) { - va_end(args); - return OS_ERR; - } - for (;;) { - char line[80]; - if (fgets(line, sizeof(line), f) != NULL) { - if (vsscanf(line, fmt, args) == 1) { - fclose(f); - va_end(args); - return OS_OK; - } - } else { - fclose(f); - va_end(args); - return OS_ERR; - } - } + return OS_ERR; } static int get_noof_context_switches(uint64_t* switches) { @@ -893,21 +754,14 @@ } int SystemProcessInterface::SystemProcesses::ProcessIterator::next_process() { - struct dirent* entry; - if (!is_valid()) { return OS_ERR; } do { - entry = os::readdir(_dir, _entry); - if (entry == NULL) { - // error - _valid = false; - return OS_ERR; - } + _entry = os::readdir(_dir); if (_entry == NULL) { - // reached end + // Error or reached end. Could use errno to distinguish those cases. _valid = false; return OS_ERR; } @@ -929,11 +783,8 @@ } SystemProcessInterface::SystemProcesses::ProcessIterator::~ProcessIterator() { - if (_entry != NULL) { - FREE_C_HEAP_ARRAY(char, _entry); - } if (_dir != NULL) { - closedir(_dir); + os::closedir(_dir); } } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/aix/perfMemory_aix.cpp openjdk-lts-11.0.4+11/src/hotspot/os/aix/perfMemory_aix.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os/aix/perfMemory_aix.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/aix/perfMemory_aix.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -617,9 +617,8 @@ // to determine the user name for the process id. // struct dirent* dentry; - char* tdbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(tmpdirname), mtInternal); errno = 0; - while ((dentry = os::readdir(tmpdirp, (struct dirent *)tdbuf)) != NULL) { + while ((dentry = os::readdir(tmpdirp)) != NULL) { // check if the directory entry is a hsperfdata file if (strncmp(dentry->d_name, PERFDATA_NAME, strlen(PERFDATA_NAME)) != 0) { @@ -653,9 +652,8 @@ } struct dirent* udentry; - char* udbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(usrdir_name), mtInternal); errno = 0; - while ((udentry = os::readdir(subdirp, (struct dirent *)udbuf)) != NULL) { + while ((udentry = os::readdir(subdirp)) != NULL) { if (filename_to_pid(udentry->d_name) == vmid) { struct stat statbuf; @@ -699,11 +697,9 @@ } } os::closedir(subdirp); - FREE_C_HEAP_ARRAY(char, udbuf); FREE_C_HEAP_ARRAY(char, usrdir_name); } os::closedir(tmpdirp); - FREE_C_HEAP_ARRAY(char, tdbuf); return(oldest_user); } @@ -779,10 +775,8 @@ // loop under these conditions is dependent upon the implementation of // opendir/readdir. struct dirent* entry; - char* dbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(dirname), mtInternal); - errno = 0; - while ((entry = os::readdir(dirp, (struct dirent *)dbuf)) != NULL) { + while ((entry = os::readdir(dirp)) != NULL) { pid_t pid = filename_to_pid(entry->d_name); @@ -820,8 +814,6 @@ // Close the directory and reset the current working directory. close_directory_secure_cwd(dirp, saved_cwd_fd); - - FREE_C_HEAP_ARRAY(char, dbuf); } // Make the user specific temporary directory. Returns true if diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/bsd/os_bsd.cpp openjdk-lts-11.0.4+11/src/hotspot/os/bsd/os_bsd.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os/bsd/os_bsd.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/bsd/os_bsd.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -2438,14 +2438,13 @@ #elif defined(__APPLE__) || defined(__NetBSD__) struct sched_param sp; int policy; - pthread_t self = pthread_self(); - if (pthread_getschedparam(self, &policy, &sp) != 0) { + if (pthread_getschedparam(thread->osthread()->pthread_id(), &policy, &sp) != 0) { return OS_ERR; } sp.sched_priority = newpri; - if (pthread_setschedparam(self, policy, &sp) != 0) { + if (pthread_setschedparam(thread->osthread()->pthread_id(), policy, &sp) != 0) { return OS_ERR; } @@ -2469,8 +2468,14 @@ int policy; struct sched_param sp; - pthread_getschedparam(pthread_self(), &policy, &sp); - *priority_ptr = sp.sched_priority; + int res = pthread_getschedparam(thread->osthread()->pthread_id(), &policy, &sp); + if (res != 0) { + *priority_ptr = -1; + return OS_ERR; + } else { + *priority_ptr = sp.sched_priority; + return OS_OK; + } #else *priority_ptr = getpriority(PRIO_PROCESS, thread->osthread()->thread_id()); #endif @@ -3518,8 +3523,7 @@ // Scan the directory bool result = true; - char buf[sizeof(struct dirent) + MAX_PATH]; - while (result && (ptr = ::readdir(dir)) != NULL) { + while (result && (ptr = readdir(dir)) != NULL) { if (strcmp(ptr->d_name, ".") != 0 && strcmp(ptr->d_name, "..") != 0) { result = false; } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/bsd/os_bsd.inline.hpp openjdk-lts-11.0.4+11/src/hotspot/os/bsd/os_bsd.inline.hpp --- openjdk-lts-11.0.3+7/src/hotspot/os/bsd/os_bsd.inline.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/bsd/os_bsd.inline.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -77,17 +77,6 @@ inline const int os::default_file_open_flags() { return 0;} -inline DIR* os::opendir(const char* dirname) -{ - assert(dirname != NULL, "just checking"); - return ::opendir(dirname); -} - -inline int os::readdir_buf_size(const char *path) -{ - return NAME_MAX + sizeof(dirent) + 1; -} - inline jlong os::lseek(int fd, jlong offset, int whence) { return (jlong) ::lseek(fd, offset, whence); } @@ -100,28 +89,6 @@ return ::ftruncate(fd, length); } -inline struct dirent* os::readdir(DIR* dirp, dirent *dbuf) -{ - dirent* p; - int status; - assert(dirp != NULL, "just checking"); - - // NOTE: Bsd readdir_r (on RH 6.2 and 7.2 at least) is NOT like the POSIX - // version. Here is the doc for this function: - // http://www.gnu.org/manual/glibc-2.2.3/html_node/libc_262.html - - if((status = ::readdir_r(dirp, dbuf, &p)) != 0) { - errno = status; - return NULL; - } else - return p; -} - -inline int os::closedir(DIR *dirp) { - assert(dirp != NULL, "argument is NULL"); - return ::closedir(dirp); -} - // macros for restartable system calls #define RESTARTABLE(_cmd, _result) do { \ diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/bsd/perfMemory_bsd.cpp openjdk-lts-11.0.4+11/src/hotspot/os/bsd/perfMemory_bsd.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os/bsd/perfMemory_bsd.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/bsd/perfMemory_bsd.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -535,9 +535,8 @@ // to determine the user name for the process id. // struct dirent* dentry; - char* tdbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(tmpdirname), mtInternal); errno = 0; - while ((dentry = os::readdir(tmpdirp, (struct dirent *)tdbuf)) != NULL) { + while ((dentry = os::readdir(tmpdirp)) != NULL) { // check if the directory entry is a hsperfdata file if (strncmp(dentry->d_name, PERFDATA_NAME, strlen(PERFDATA_NAME)) != 0) { @@ -559,9 +558,8 @@ } struct dirent* udentry; - char* udbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(usrdir_name), mtInternal); errno = 0; - while ((udentry = os::readdir(subdirp, (struct dirent *)udbuf)) != NULL) { + while ((udentry = os::readdir(subdirp)) != NULL) { if (filename_to_pid(udentry->d_name) == vmid) { struct stat statbuf; @@ -605,11 +603,9 @@ } } os::closedir(subdirp); - FREE_C_HEAP_ARRAY(char, udbuf); FREE_C_HEAP_ARRAY(char, usrdir_name); } os::closedir(tmpdirp); - FREE_C_HEAP_ARRAY(char, tdbuf); return(oldest_user); } @@ -688,10 +684,8 @@ // opendir/readdir. // struct dirent* entry; - char* dbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(dirname), mtInternal); - errno = 0; - while ((entry = os::readdir(dirp, (struct dirent *)dbuf)) != NULL) { + while ((entry = os::readdir(dirp)) != NULL) { pid_t pid = filename_to_pid(entry->d_name); @@ -730,8 +724,6 @@ // close the directory and reset the current working directory close_directory_secure_cwd(dirp, saved_cwd_fd); - - FREE_C_HEAP_ARRAY(char, dbuf); } // make the user specific temporary directory. Returns true if diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/linux/globals_linux.hpp openjdk-lts-11.0.4+11/src/hotspot/os/linux/globals_linux.hpp --- openjdk-lts-11.0.3+7/src/hotspot/os/linux/globals_linux.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/linux/globals_linux.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -67,6 +67,16 @@ " of quotas (if set), when true. Otherwise, use the CPU" \ " shares value, provided it is less than quota.") \ \ + diagnostic(bool, DumpPrivateMappingsInCore, true, \ + "If true, sets bit 2 of /proc/PID/coredump_filter, thus " \ + "resulting in file-backed private mappings of the process to "\ + "be dumped into the corefile.") \ + \ + diagnostic(bool, DumpSharedMappingsInCore, true, \ + "If true, sets bit 3 of /proc/PID/coredump_filter, thus " \ + "resulting in file-backed shared mappings of the process to " \ + "be dumped into the corefile.") \ + \ diagnostic(bool, UseCpuAllocPath, false, \ "Use CPU_ALLOC code path in os::active_processor_count ") diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/linux/os_linux.cpp openjdk-lts-11.0.4+11/src/hotspot/os/linux/os_linux.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os/linux/os_linux.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/linux/os_linux.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -128,8 +128,13 @@ // for timer info max values which include all bits #define ALL_64_BITS CONST64(0xFFFFFFFFFFFFFFFF) -#define LARGEPAGES_BIT (1 << 6) -#define DAX_SHARED_BIT (1 << 8) +enum CoredumpFilterBit { + FILE_BACKED_PVT_BIT = 1 << 2, + FILE_BACKED_SHARED_BIT = 1 << 3, + LARGEPAGES_BIT = 1 << 6, + DAX_SHARED_BIT = 1 << 8 +}; + //////////////////////////////////////////////////////////////////////////////// // global variables julong os::Linux::_physical_memory = 0; @@ -221,6 +226,82 @@ return phys_mem; } +static uint64_t initial_total_ticks = 0; +static uint64_t initial_steal_ticks = 0; +static bool has_initial_tick_info = false; + +static void next_line(FILE *f) { + int c; + do { + c = fgetc(f); + } while (c != '\n' && c != EOF); +} + +bool os::Linux::get_tick_information(CPUPerfTicks* pticks, int which_logical_cpu) { + FILE* fh; + uint64_t userTicks, niceTicks, systemTicks, idleTicks; + // since at least kernel 2.6 : iowait: time waiting for I/O to complete + // irq: time servicing interrupts; softirq: time servicing softirqs + uint64_t iowTicks = 0, irqTicks = 0, sirqTicks= 0; + // steal (since kernel 2.6.11): time spent in other OS when running in a virtualized environment + uint64_t stealTicks = 0; + // guest (since kernel 2.6.24): time spent running a virtual CPU for guest OS under the + // control of the Linux kernel + uint64_t guestNiceTicks = 0; + int logical_cpu = -1; + const int required_tickinfo_count = (which_logical_cpu == -1) ? 4 : 5; + int n; + + memset(pticks, 0, sizeof(CPUPerfTicks)); + + if ((fh = fopen("/proc/stat", "r")) == NULL) { + return false; + } + + if (which_logical_cpu == -1) { + n = fscanf(fh, "cpu " UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " " + UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " " + UINT64_FORMAT " " UINT64_FORMAT " ", + &userTicks, &niceTicks, &systemTicks, &idleTicks, + &iowTicks, &irqTicks, &sirqTicks, + &stealTicks, &guestNiceTicks); + } else { + // Move to next line + next_line(fh); + + // find the line for requested cpu faster to just iterate linefeeds? + for (int i = 0; i < which_logical_cpu; i++) { + next_line(fh); + } + + n = fscanf(fh, "cpu%u " UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " " + UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " " + UINT64_FORMAT " " UINT64_FORMAT " ", + &logical_cpu, &userTicks, &niceTicks, + &systemTicks, &idleTicks, &iowTicks, &irqTicks, &sirqTicks, + &stealTicks, &guestNiceTicks); + } + + fclose(fh); + if (n < required_tickinfo_count || logical_cpu != which_logical_cpu) { + return false; + } + pticks->used = userTicks + niceTicks; + pticks->usedKernel = systemTicks + irqTicks + sirqTicks; + pticks->total = userTicks + niceTicks + systemTicks + idleTicks + + iowTicks + irqTicks + sirqTicks + stealTicks + guestNiceTicks; + + if (n > required_tickinfo_count + 3) { + pticks->steal = stealTicks; + pticks->has_steal_ticks = true; + } else { + pticks->steal = 0; + pticks->has_steal_ticks = false; + } + + return true; +} + // Return true if user is running as root. bool os::have_special_privileges() { @@ -1398,6 +1479,9 @@ void os::abort(bool dump_core, void* siginfo, const void* context) { os::shutdown(); if (dump_core) { + if (DumpPrivateMappingsInCore) { + ClassLoader::close_jrt_image(); + } #ifndef PRODUCT fdStream out(defaultStream::output_fd()); out.print_raw("Current thread is "); @@ -1635,9 +1719,6 @@ // This is OK - No Java threads have been created yet, and hence no // stack guard pages to fix. // - // This should happen only when you are building JDK7 using a very - // old version of JDK6 (e.g., with JPRT) and running test_gamma. - // // Dynamic loader will make all stacks executable after // this function returns, and will not do that again. assert(Threads::number_of_threads() == 0, "no Java threads should exist yet."); @@ -1912,6 +1993,35 @@ return true; } +#if defined(S390) || defined(PPC64) +// keywords_to_match - NULL terminated array of keywords +static bool print_matching_lines_from_file(const char* filename, outputStream* st, const char* keywords_to_match[]) { + char* line = NULL; + size_t length = 0; + FILE* fp = fopen(filename, "r"); + if (fp == NULL) { + return false; + } + + st->print_cr("Virtualization information:"); + while (getline(&line, &length, fp) != -1) { + int i = 0; + while (keywords_to_match[i] != NULL) { + if (strncmp(line, keywords_to_match[i], strlen(keywords_to_match[i])) == 0) { + st->print("%s", line); + break; + } + i++; + } + } + + free(line); + fclose(fp); + + return true; +} +#endif + void os::print_dll_info(outputStream *st) { st->print_cr("Dynamic libraries:"); @@ -1995,6 +2105,10 @@ os::Linux::print_ld_preload_file(st); os::Linux::print_container_info(st); + + os::Linux::print_virtualization_info(st); + + os::Linux::print_steal_info(st); } // Try to identify popular distros. @@ -2208,6 +2322,58 @@ st->cr(); } +void os::Linux::print_virtualization_info(outputStream* st) { +#if defined(S390) + // /proc/sysinfo contains interesting information about + // - LPAR + // - whole "Box" (CPUs ) + // - z/VM / KVM (VM); this is not available in an LPAR-only setup + const char* kw[] = { "LPAR", "CPUs", "VM", NULL }; + const char* info_file = "/proc/sysinfo"; + + if (!print_matching_lines_from_file(info_file, st, kw)) { + st->print_cr(" <%s Not Available>", info_file); + } +#elif defined(PPC64) + const char* info_file = "/proc/ppc64/lparcfg"; + const char* kw[] = { "system_type=", // qemu indicates PowerKVM + "partition_entitled_capacity=", // entitled processor capacity percentage + "partition_max_entitled_capacity=", + "capacity_weight=", // partition CPU weight + "partition_active_processors=", + "partition_potential_processors=", + "entitled_proc_capacity_available=", + "capped=", // 0 - uncapped, 1 - vcpus capped at entitled processor capacity percentage + "shared_processor_mode=", // (non)dedicated partition + "system_potential_processors=", + "pool=", // CPU-pool number + "pool_capacity=", + "NumLpars=", // on non-KVM machines, NumLpars is not found for full partition mode machines + NULL }; + if (!print_matching_lines_from_file(info_file, st, kw)) { + st->print_cr(" <%s Not Available>", info_file); + } +#endif +} + +void os::Linux::print_steal_info(outputStream* st) { + if (has_initial_tick_info) { + CPUPerfTicks pticks; + bool res = os::Linux::get_tick_information(&pticks, -1); + + if (res && pticks.has_steal_ticks) { + uint64_t steal_ticks_difference = pticks.steal - initial_steal_ticks; + uint64_t total_ticks_difference = pticks.total - initial_total_ticks; + double steal_ticks_perc = 0.0; + if (total_ticks_difference != 0) { + steal_ticks_perc = (double) steal_ticks_difference / total_ticks_difference; + } + st->print_cr("Steal ticks since vm start: " UINT64_FORMAT, steal_ticks_difference); + st->print_cr("Steal ticks percentage since vm start:%7.3f", steal_ticks_perc); + } + } +} + void os::print_memory_info(outputStream* st) { st->print("Memory:"); @@ -2283,7 +2449,7 @@ #elif defined(PPC64) const char* search_string = "cpu"; #elif defined(S390) -const char* search_string = "processor"; +const char* search_string = "machine ="; #elif defined(SPARC) const char* search_string = "cpu"; #else @@ -3454,8 +3620,6 @@ return result; } -// Set the coredump_filter bits to include largepages in core dump (bit 6) -// // From the coredump_filter documentation: // // - (bit 0) anonymous private memory @@ -3469,10 +3633,9 @@ // - (bit 7) dax private memory // - (bit 8) dax shared memory // -static void set_coredump_filter(bool largepages, bool dax_shared) { +static void set_coredump_filter(CoredumpFilterBit bit) { FILE *f; long cdm; - bool filter_changed = false; if ((f = fopen("/proc/self/coredump_filter", "r+")) == NULL) { return; @@ -3483,17 +3646,11 @@ return; } + long saved_cdm = cdm; rewind(f); + cdm |= bit; - if (largepages && (cdm & LARGEPAGES_BIT) == 0) { - cdm |= LARGEPAGES_BIT; - filter_changed = true; - } - if (dax_shared && (cdm & DAX_SHARED_BIT) == 0) { - cdm |= DAX_SHARED_BIT; - filter_changed = true; - } - if (filter_changed) { + if (cdm != saved_cdm) { fprintf(f, "%#lx", cdm); } @@ -3632,7 +3789,7 @@ size_t large_page_size = Linux::setup_large_page_size(); UseLargePages = Linux::setup_large_page_type(large_page_size); - set_coredump_filter(true /*largepages*/, false /*dax_shared*/); + set_coredump_filter(LARGEPAGES_BIT); } #ifndef SHM_HUGETLB @@ -5000,6 +5157,15 @@ Linux::initialize_os_info(); + os::Linux::CPUPerfTicks pticks; + bool res = os::Linux::get_tick_information(&pticks, -1); + + if (res && pticks.has_steal_ticks) { + has_initial_tick_info = true; + initial_total_ticks = pticks.total; + initial_steal_ticks = pticks.steal; + } + // _main_thread points to the thread that created/loaded the JVM. Linux::_main_thread = pthread_self(); @@ -5049,13 +5215,16 @@ return JNI_ERR; } +#if defined(IA32) + // Need to ensure we've determined the process's initial stack to + // perform the workaround + Linux::capture_initial_stack(JavaThread::stack_size_at_create()); + workaround_expand_exec_shield_cs_limit(); +#else suppress_primordial_thread_resolution = Arguments::created_by_java_launcher(); if (!suppress_primordial_thread_resolution) { Linux::capture_initial_stack(JavaThread::stack_size_at_create()); } - -#if defined(IA32) - workaround_expand_exec_shield_cs_limit(); #endif Linux::libpthread_init(); @@ -5134,8 +5303,17 @@ prio_init(); if (!FLAG_IS_DEFAULT(AllocateHeapAt)) { - set_coredump_filter(false /*largepages*/, true /*dax_shared*/); + set_coredump_filter(DAX_SHARED_BIT); + } + + if (DumpPrivateMappingsInCore) { + set_coredump_filter(FILE_BACKED_PVT_BIT); + } + + if (DumpSharedMappingsInCore) { + set_coredump_filter(FILE_BACKED_SHARED_BIT); } + return JNI_OK; } @@ -5409,8 +5587,7 @@ // Scan the directory bool result = true; - char buf[sizeof(struct dirent) + MAX_PATH]; - while (result && (ptr = ::readdir(dir)) != NULL) { + while (result && (ptr = readdir(dir)) != NULL) { if (strcmp(ptr->d_name, ".") != 0 && strcmp(ptr->d_name, "..") != 0) { result = false; } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/linux/os_linux.hpp openjdk-lts-11.0.4+11/src/hotspot/os/linux/os_linux.hpp --- openjdk-lts-11.0.3+7/src/hotspot/os/linux/os_linux.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/linux/os_linux.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -111,12 +111,24 @@ static void print_full_memory_info(outputStream* st); static void print_container_info(outputStream* st); + static void print_virtualization_info(outputStream* st); + static void print_steal_info(outputStream* st); static void print_distro_info(outputStream* st); static void print_libversion_info(outputStream* st); static void print_proc_sys_info(outputStream* st); static void print_ld_preload_file(outputStream* st); public: + struct CPUPerfTicks { + uint64_t used; + uint64_t usedKernel; + uint64_t total; + uint64_t steal; + bool has_steal_ticks; + }; + + // which_logical_cpu=-1 returns accumulated ticks for all cpus. + static bool get_tick_information(CPUPerfTicks* pticks, int which_logical_cpu); static bool _stack_is_executable; static void *dlopen_helper(const char *name, char *ebuf, int ebuflen); static void *dll_load_in_vmthread(const char *name, char *ebuf, int ebuflen); diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/linux/os_linux.inline.hpp openjdk-lts-11.0.4+11/src/hotspot/os/linux/os_linux.inline.hpp --- openjdk-lts-11.0.3+7/src/hotspot/os/linux/os_linux.inline.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/linux/os_linux.inline.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -69,17 +69,6 @@ inline const int os::default_file_open_flags() { return 0;} -inline DIR* os::opendir(const char* dirname) -{ - assert(dirname != NULL, "just checking"); - return ::opendir(dirname); -} - -inline int os::readdir_buf_size(const char *path) -{ - return NAME_MAX + sizeof(dirent) + 1; -} - inline jlong os::lseek(int fd, jlong offset, int whence) { return (jlong) ::lseek64(fd, offset, whence); } @@ -92,17 +81,6 @@ return ::ftruncate64(fd, length); } -inline struct dirent* os::readdir(DIR* dirp, dirent *dbuf) -{ - assert(dirp != NULL, "just checking"); - return ::readdir(dirp); -} - -inline int os::closedir(DIR *dirp) { - assert(dirp != NULL, "argument is NULL"); - return ::closedir(dirp); -} - // macros for restartable system calls #define RESTARTABLE(_cmd, _result) do { \ diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/linux/os_perf_linux.cpp openjdk-lts-11.0.4+11/src/hotspot/os/linux/os_perf_linux.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os/linux/os_perf_linux.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/linux/os_perf_linux.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -206,13 +206,6 @@ # define _SCANFMT_ #endif - -struct CPUPerfTicks { - uint64_t used; - uint64_t usedKernel; - uint64_t total; -}; - typedef enum { CPU_LOAD_VM_ONLY, CPU_LOAD_GLOBAL, @@ -227,8 +220,8 @@ struct CPUPerfCounters { int nProcs; - CPUPerfTicks jvmTicks; - CPUPerfTicks* cpus; + os::Linux::CPUPerfTicks jvmTicks; + os::Linux::CPUPerfTicks* cpus; }; static double get_cpu_load(int which_logical_cpu, CPUPerfCounters* counters, double* pkernelLoad, CpuLoadTarget target); @@ -287,80 +280,6 @@ return f; } -static void -next_line(FILE *f) { - int c; - do { - c = fgetc(f); - } while (c != '\n' && c != EOF); -} - -/** - * Return the total number of ticks since the system was booted. - * If the usedTicks parameter is not NULL, it will be filled with - * the number of ticks spent on actual processes (user, system or - * nice processes) since system boot. Note that this is the total number - * of "executed" ticks on _all_ CPU:s, that is on a n-way system it is - * n times the number of ticks that has passed in clock time. - * - * Returns a negative value if the reading of the ticks failed. - */ -static OSReturn get_total_ticks(int which_logical_cpu, CPUPerfTicks* pticks) { - FILE* fh; - uint64_t userTicks, niceTicks, systemTicks, idleTicks; - uint64_t iowTicks = 0, irqTicks = 0, sirqTicks= 0; - int logical_cpu = -1; - const int expected_assign_count = (-1 == which_logical_cpu) ? 4 : 5; - int n; - - if ((fh = open_statfile()) == NULL) { - return OS_ERR; - } - if (-1 == which_logical_cpu) { - n = fscanf(fh, "cpu " UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " " - UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT, - &userTicks, &niceTicks, &systemTicks, &idleTicks, - &iowTicks, &irqTicks, &sirqTicks); - } else { - // Move to next line - next_line(fh); - - // find the line for requested cpu faster to just iterate linefeeds? - for (int i = 0; i < which_logical_cpu; i++) { - next_line(fh); - } - - n = fscanf(fh, "cpu%u " UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " " - UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT, - &logical_cpu, &userTicks, &niceTicks, - &systemTicks, &idleTicks, &iowTicks, &irqTicks, &sirqTicks); - } - - fclose(fh); - if (n < expected_assign_count || logical_cpu != which_logical_cpu) { -#ifdef DEBUG_LINUX_PROC_STAT - vm_fprintf(stderr, "[stat] read failed"); -#endif - return OS_ERR; - } - -#ifdef DEBUG_LINUX_PROC_STAT - vm_fprintf(stderr, "[stat] read " - UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " " - UINT64_FORMAT " " UINT64_FORMAT " " UINT64_FORMAT " \n", - userTicks, niceTicks, systemTicks, idleTicks, - iowTicks, irqTicks, sirqTicks); -#endif - - pticks->used = userTicks + niceTicks; - pticks->usedKernel = systemTicks + irqTicks + sirqTicks; - pticks->total = userTicks + niceTicks + systemTicks + idleTicks + - iowTicks + irqTicks + sirqTicks; - - return OS_OK; -} - - static int get_systemtype(void) { static int procEntriesType = UNDETECTED; DIR *taskDir; @@ -391,7 +310,7 @@ * Return the number of ticks spent in any of the processes belonging * to the JVM on any CPU. */ -static OSReturn get_jvm_ticks(CPUPerfTicks* pticks) { +static OSReturn get_jvm_ticks(os::Linux::CPUPerfTicks* pticks) { uint64_t userTicks; uint64_t systemTicks; @@ -404,7 +323,7 @@ } // get the total - if (get_total_ticks(-1, pticks) != OS_OK) { + if (! os::Linux::get_tick_information(pticks, -1)) { return OS_ERR; } @@ -423,8 +342,8 @@ */ static double get_cpu_load(int which_logical_cpu, CPUPerfCounters* counters, double* pkernelLoad, CpuLoadTarget target) { uint64_t udiff, kdiff, tdiff; - CPUPerfTicks* pticks; - CPUPerfTicks tmp; + os::Linux::CPUPerfTicks* pticks; + os::Linux::CPUPerfTicks tmp; double user_load; *pkernelLoad = 0.0; @@ -443,7 +362,7 @@ if (get_jvm_ticks(pticks) != OS_OK) { return -1.0; } - } else if (get_total_ticks(which_logical_cpu, pticks) != OS_OK) { + } else if (! os::Linux::get_tick_information(pticks, which_logical_cpu)) { return -1.0; } @@ -584,19 +503,19 @@ } bool CPUPerformanceInterface::CPUPerformance::initialize() { - size_t tick_array_size = (_counters.nProcs +1) * sizeof(CPUPerfTicks); - _counters.cpus = (CPUPerfTicks*)NEW_C_HEAP_ARRAY(char, tick_array_size, mtInternal); + size_t tick_array_size = (_counters.nProcs +1) * sizeof(os::Linux::CPUPerfTicks); + _counters.cpus = (os::Linux::CPUPerfTicks*)NEW_C_HEAP_ARRAY(char, tick_array_size, mtInternal); if (NULL == _counters.cpus) { return false; } memset(_counters.cpus, 0, tick_array_size); // For the CPU load total - get_total_ticks(-1, &_counters.cpus[_counters.nProcs]); + os::Linux::get_tick_information(&_counters.cpus[_counters.nProcs], -1); // For each CPU for (int i = 0; i < _counters.nProcs; i++) { - get_total_ticks(i, &_counters.cpus[i]); + os::Linux::get_tick_information(&_counters.cpus[i], i); } // For JVM load get_jvm_ticks(&_counters.jvmTicks); @@ -895,21 +814,14 @@ } int SystemProcessInterface::SystemProcesses::ProcessIterator::next_process() { - struct dirent* entry; - if (!is_valid()) { return OS_ERR; } do { - entry = os::readdir(_dir, _entry); - if (entry == NULL) { - // error - _valid = false; - return OS_ERR; - } + _entry = os::readdir(_dir); if (_entry == NULL) { - // reached end + // Error or reached end. Could use errno to distinguish those cases. _valid = false; return OS_ERR; } @@ -926,11 +838,8 @@ } bool SystemProcessInterface::SystemProcesses::ProcessIterator::initialize() { - _dir = opendir("/proc"); - _entry = (struct dirent*)NEW_C_HEAP_ARRAY(char, sizeof(struct dirent) + NAME_MAX + 1, mtInternal); - if (NULL == _entry) { - return false; - } + _dir = os::opendir("/proc"); + _entry = NULL; _valid = true; next_process(); @@ -938,11 +847,8 @@ } SystemProcessInterface::SystemProcesses::ProcessIterator::~ProcessIterator() { - if (_entry != NULL) { - FREE_C_HEAP_ARRAY(char, _entry); - } if (_dir != NULL) { - closedir(_dir); + os::closedir(_dir); } } @@ -1079,7 +985,7 @@ snprintf(buf, sizeof(buf), "/sys/class/net/%s/statistics/%s", iface, counter); - int fd = open(buf, O_RDONLY); + int fd = os::open(buf, O_RDONLY, 0); if (fd == -1) { return -1; } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/linux/perfMemory_linux.cpp openjdk-lts-11.0.4+11/src/hotspot/os/linux/perfMemory_linux.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os/linux/perfMemory_linux.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/linux/perfMemory_linux.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2019, 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 @@ -97,8 +97,8 @@ int result; - RESTARTABLE(::open(destfile, O_CREAT|O_WRONLY|O_TRUNC, S_IREAD|S_IWRITE), - result);; + RESTARTABLE(os::open(destfile, O_CREAT|O_WRONLY|O_TRUNC, S_IRUSR|S_IWUSR), + result); if (result == OS_ERR) { if (PrintMiscellaneous && Verbose) { warning("Could not create Perfdata save file: %s: %s\n", @@ -561,9 +561,8 @@ // to determine the user name for the process id. // struct dirent* dentry; - char* tdbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(tmpdirname), mtInternal); errno = 0; - while ((dentry = os::readdir(tmpdirp, (struct dirent *)tdbuf)) != NULL) { + while ((dentry = os::readdir(tmpdirp)) != NULL) { // check if the directory entry is a hsperfdata file if (strncmp(dentry->d_name, PERFDATA_NAME, strlen(PERFDATA_NAME)) != 0) { @@ -597,9 +596,8 @@ } struct dirent* udentry; - char* udbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(usrdir_name), mtInternal); errno = 0; - while ((udentry = os::readdir(subdirp, (struct dirent *)udbuf)) != NULL) { + while ((udentry = os::readdir(subdirp)) != NULL) { if (filename_to_pid(udentry->d_name) == searchpid) { struct stat statbuf; @@ -643,11 +641,9 @@ } } os::closedir(subdirp); - FREE_C_HEAP_ARRAY(char, udbuf); FREE_C_HEAP_ARRAY(char, usrdir_name); } os::closedir(tmpdirp); - FREE_C_HEAP_ARRAY(char, tdbuf); return(oldest_user); } @@ -769,10 +765,8 @@ // opendir/readdir. // struct dirent* entry; - char* dbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(dirname), mtInternal); - errno = 0; - while ((entry = os::readdir(dirp, (struct dirent *)dbuf)) != NULL) { + while ((entry = os::readdir(dirp)) != NULL) { pid_t pid = filename_to_pid(entry->d_name); @@ -809,8 +803,6 @@ // close the directory and reset the current working directory close_directory_secure_cwd(dirp, saved_cwd_fd); - - FREE_C_HEAP_ARRAY(char, dbuf); } // make the user specific temporary directory. Returns true if @@ -879,7 +871,7 @@ // Cannot use O_TRUNC here; truncation of an existing file has to happen // after the is_file_secure() check below. int result; - RESTARTABLE(::open(filename, O_RDWR|O_CREAT|O_NOFOLLOW, S_IREAD|S_IWRITE), result); + RESTARTABLE(os::open(filename, O_RDWR|O_CREAT|O_NOFOLLOW, S_IRUSR|S_IWUSR), result); if (result == OS_ERR) { if (PrintMiscellaneous && Verbose) { if (errno == ELOOP) { @@ -957,7 +949,7 @@ // open the file int result; - RESTARTABLE(::open(filename, oflags), result); + RESTARTABLE(os::open(filename, oflags, 0), result); if (result == OS_ERR) { if (errno == ENOENT) { THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(), diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/posix/os_posix.cpp openjdk-lts-11.0.4+11/src/hotspot/os/posix/os_posix.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os/posix/os_posix.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/posix/os_posix.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -31,6 +31,7 @@ #include "runtime/os.hpp" #include "services/memTracker.hpp" #include "utilities/align.hpp" +#include "utilities/events.hpp" #include "utilities/formatBuffer.hpp" #include "utilities/macros.hpp" #include "utilities/vmError.hpp" @@ -548,6 +549,21 @@ ::funlockfile(fp); } +DIR* os::opendir(const char* dirname) { + assert(dirname != NULL, "just checking"); + return ::opendir(dirname); +} + +struct dirent* os::readdir(DIR* dirp) { + assert(dirp != NULL, "just checking"); + return ::readdir(dirp); +} + +int os::closedir(DIR *dirp) { + assert(dirp != NULL, "just checking"); + return ::closedir(dirp); +} + // Builds a platform dependent Agent_OnLoad_ function name // which is used to find statically linked in agents. // Parameters: @@ -1224,6 +1240,15 @@ return true; } +bool os::signal_sent_by_kill(const void* siginfo) { + const siginfo_t* const si = (const siginfo_t*)siginfo; + return si->si_code == SI_USER || si->si_code == SI_QUEUE +#ifdef SI_TKILL + || si->si_code == SI_TKILL +#endif + ; +} + void os::print_siginfo(outputStream* os, const void* si0) { const siginfo_t* const si = (const siginfo_t*) si0; @@ -1254,7 +1279,7 @@ // so it depends on the context which member to use. For synchronous error signals, // we print si_addr, unless the signal was sent by another process or thread, in // which case we print out pid or tid of the sender. - if (si->si_code == SI_USER || si->si_code == SI_QUEUE) { + if (signal_sent_by_kill(si)) { const pid_t pid = si->si_pid; os->print(", si_pid: %ld", (long) pid); if (IS_VALID_PID(pid)) { @@ -1280,6 +1305,25 @@ } +bool os::signal_thread(Thread* thread, int sig, const char* reason) { + OSThread* osthread = thread->osthread(); + if (osthread) { +#if defined (SOLARIS) + // Note: we cannot use pthread_kill on Solaris - not because + // its missing, but because we do not have the pthread_t id. + int status = thr_kill(osthread->thread_id(), sig); +#else + int status = pthread_kill(osthread->pthread_id(), sig); +#endif + if (status == 0) { + Events::log(Thread::current(), "sent signal %d to Thread " INTPTR_FORMAT " because %s.", + sig, p2i(thread), reason); + return true; + } + } + return false; +} + int os::Posix::unblock_thread_signal_mask(const sigset_t *set) { return pthread_sigmask(SIG_UNBLOCK, set, NULL); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/solaris/os_perf_solaris.cpp openjdk-lts-11.0.4+11/src/hotspot/os/solaris/os_perf_solaris.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os/solaris/os_perf_solaris.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/solaris/os_perf_solaris.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -74,7 +74,7 @@ int fd = -1; - if ((fd = open(path, O_RDONLY)) < 0) { + if ((fd = os::open(path, O_RDONLY, 0)) < 0) { return OS_ERR; } if (pread(fd, info, s, o) != s) { @@ -604,15 +604,14 @@ } int SystemProcessInterface::SystemProcesses::ProcessIterator::next_process() { - struct dirent* entry; - if (!is_valid()) { return OS_ERR; } do { - if ((entry = os::readdir(_dir, _entry)) == NULL) { - // error + _entry = os::readdir(_dir); + if (_entry == NULL) { + // Error or reached end. Could use errno to distinguish those cases. _valid = false; return OS_ERR; } @@ -629,11 +628,8 @@ } bool SystemProcessInterface::SystemProcesses::ProcessIterator::initialize() { - _dir = opendir("/proc"); - _entry = (struct dirent*)NEW_C_HEAP_ARRAY(char, sizeof(struct dirent) + _PC_NAME_MAX + 1, mtInternal); - if (NULL == _entry) { - return false; - } + _dir = os::opendir("/proc"); + _entry = NULL; _valid = true; next_process(); @@ -641,12 +637,8 @@ } SystemProcessInterface::SystemProcesses::ProcessIterator::~ProcessIterator() { - if (_entry != NULL) { - FREE_C_HEAP_ARRAY(char, _entry); - } - if (_dir != NULL) { - closedir(_dir); + os::closedir(_dir); } } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/solaris/os_solaris.cpp openjdk-lts-11.0.4+11/src/hotspot/os/solaris/os_solaris.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os/solaris/os_solaris.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/solaris/os_solaris.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -4319,9 +4319,7 @@ // Scan the directory bool result = true; - char buf[sizeof(struct dirent) + MAX_PATH]; - struct dirent *dbuf = (struct dirent *) buf; - while (result && (ptr = readdir(dir, dbuf)) != NULL) { + while (result && (ptr = readdir(dir)) != NULL) { if (strcmp(ptr->d_name, ".") != 0 && strcmp(ptr->d_name, "..") != 0) { result = false; } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/solaris/os_solaris.inline.hpp openjdk-lts-11.0.4+11/src/hotspot/os/solaris/os_solaris.inline.hpp --- openjdk-lts-11.0.3+7/src/hotspot/os/solaris/os_solaris.inline.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/solaris/os_solaris.inline.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -68,34 +68,6 @@ inline const int os::default_file_open_flags() { return 0;} -inline DIR* os::opendir(const char* dirname) { - assert(dirname != NULL, "just checking"); - return ::opendir(dirname); -} - -inline int os::readdir_buf_size(const char *path) { - int size = pathconf(path, _PC_NAME_MAX); - return (size < 0 ? MAXPATHLEN : size) + sizeof(dirent) + 1; -} - -inline struct dirent* os::readdir(DIR* dirp, dirent* dbuf) { - assert(dirp != NULL, "just checking"); - dirent* p; - int status; - - if((status = ::readdir_r(dirp, dbuf, &p)) != 0) { - errno = status; - return NULL; - } else { - return p; - } -} - -inline int os::closedir(DIR *dirp) { - assert(dirp != NULL, "argument is NULL"); - return ::closedir(dirp); -} - ////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/solaris/perfMemory_solaris.cpp openjdk-lts-11.0.4+11/src/hotspot/os/solaris/perfMemory_solaris.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os/solaris/perfMemory_solaris.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/solaris/perfMemory_solaris.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -523,9 +523,8 @@ // to determine the user name for the process id. // struct dirent* dentry; - char* tdbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(tmpdirname), mtInternal); errno = 0; - while ((dentry = os::readdir(tmpdirp, (struct dirent *)tdbuf)) != NULL) { + while ((dentry = os::readdir(tmpdirp)) != NULL) { // check if the directory entry is a hsperfdata file if (strncmp(dentry->d_name, PERFDATA_NAME, strlen(PERFDATA_NAME)) != 0) { @@ -559,9 +558,8 @@ } struct dirent* udentry; - char* udbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(usrdir_name), mtInternal); errno = 0; - while ((udentry = os::readdir(subdirp, (struct dirent *)udbuf)) != NULL) { + while ((udentry = os::readdir(subdirp)) != NULL) { if (filename_to_pid(udentry->d_name) == vmid) { struct stat statbuf; @@ -605,11 +603,9 @@ } } os::closedir(subdirp); - FREE_C_HEAP_ARRAY(char, udbuf); FREE_C_HEAP_ARRAY(char, usrdir_name); } os::closedir(tmpdirp); - FREE_C_HEAP_ARRAY(char, tdbuf); return(oldest_user); } @@ -736,10 +732,8 @@ // opendir/readdir. // struct dirent* entry; - char* dbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(dirname), mtInternal); - errno = 0; - while ((entry = os::readdir(dirp, (struct dirent *)dbuf)) != NULL) { + while ((entry = os::readdir(dirp)) != NULL) { pid_t pid = filename_to_pid(entry->d_name); @@ -778,8 +772,6 @@ // close the directory and reset the current working directory close_directory_secure_cwd(dirp, saved_cwd_fd); - - FREE_C_HEAP_ARRAY(char, dbuf); } // make the user specific temporary directory. Returns true if diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/windows/os_windows.cpp openjdk-lts-11.0.4+11/src/hotspot/os/windows/os_windows.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os/windows/os_windows.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/windows/os_windows.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1167,11 +1167,10 @@ return dirp; } -// parameter dbuf unused on Windows -struct dirent * os::readdir(DIR *dirp, dirent *dbuf) { +struct dirent * os::readdir(DIR *dirp) { assert(dirp != NULL, "just checking"); // hotspot change if (dirp->handle == INVALID_HANDLE_VALUE) { - return 0; + return NULL; } strcpy(dirp->dirent.d_name, dirp->find_data.cFileName); @@ -1179,7 +1178,7 @@ if (!FindNextFile(dirp->handle, &dirp->find_data)) { if (GetLastError() == ERROR_INVALID_HANDLE) { errno = EBADF; - return 0; + return NULL; } FindClose(dirp->handle); dirp->handle = INVALID_HANDLE_VALUE; @@ -1791,6 +1790,11 @@ st->cr(); } +bool os::signal_sent_by_kill(const void* siginfo) { + // TODO: Is this possible? + return false; +} + void os::print_siginfo(outputStream *st, const void* siginfo) { const EXCEPTION_RECORD* const er = (EXCEPTION_RECORD*)siginfo; st->print("siginfo:"); @@ -1824,6 +1828,11 @@ st->cr(); } +bool os::signal_thread(Thread* thread, int sig, const char* reason) { + // TODO: Can we kill thread? + return false; +} + void os::print_signal_handlers(outputStream* st, char* buf, size_t buflen) { // do nothing } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/windows/os_windows.inline.hpp openjdk-lts-11.0.4+11/src/hotspot/os/windows/os_windows.inline.hpp --- openjdk-lts-11.0.3+7/src/hotspot/os/windows/os_windows.inline.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/windows/os_windows.inline.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -57,14 +57,6 @@ return true; } -inline int os::readdir_buf_size(const char *path) -{ - /* As Windows doesn't use the directory entry buffer passed to - os::readdir() this can be as short as possible */ - - return 1; -} - // Bang the shadow pages if they need to be touched to be mapped. inline void os::map_stack_shadow_pages(address sp) { // Write to each page of our new frame to force OS mapping. diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os/windows/perfMemory_windows.cpp openjdk-lts-11.0.4+11/src/hotspot/os/windows/perfMemory_windows.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os/windows/perfMemory_windows.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os/windows/perfMemory_windows.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -318,9 +318,8 @@ // to determine the user name for the process id. // struct dirent* dentry; - char* tdbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(tmpdirname), mtInternal); errno = 0; - while ((dentry = os::readdir(tmpdirp, (struct dirent *)tdbuf)) != NULL) { + while ((dentry = os::readdir(tmpdirp)) != NULL) { // check if the directory entry is a hsperfdata file if (strncmp(dentry->d_name, PERFDATA_NAME, strlen(PERFDATA_NAME)) != 0) { @@ -353,9 +352,8 @@ } struct dirent* udentry; - char* udbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(usrdir_name), mtInternal); errno = 0; - while ((udentry = os::readdir(subdirp, (struct dirent *)udbuf)) != NULL) { + while ((udentry = os::readdir(subdirp)) != NULL) { if (filename_to_pid(udentry->d_name) == vmid) { struct stat statbuf; @@ -407,11 +405,9 @@ } } os::closedir(subdirp); - FREE_C_HEAP_ARRAY(char, udbuf); FREE_C_HEAP_ARRAY(char, usrdir_name); } os::closedir(tmpdirp); - FREE_C_HEAP_ARRAY(char, tdbuf); return(latest_user); } @@ -642,9 +638,8 @@ // opendir/readdir. // struct dirent* entry; - char* dbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(dirname), mtInternal); errno = 0; - while ((entry = os::readdir(dirp, (struct dirent *)dbuf)) != NULL) { + while ((entry = os::readdir(dirp)) != NULL) { int pid = filename_to_pid(entry->d_name); @@ -685,7 +680,6 @@ errno = 0; } os::closedir(dirp); - FREE_C_HEAP_ARRAY(char, dbuf); } // create a file mapping object with the requested name, and size diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os_cpu/aix_ppc/atomic_aix_ppc.hpp openjdk-lts-11.0.4+11/src/hotspot/os_cpu/aix_ppc/atomic_aix_ppc.hpp --- openjdk-lts-11.0.3+7/src/hotspot/os_cpu/aix_ppc/atomic_aix_ppc.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os_cpu/aix_ppc/atomic_aix_ppc.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2018 SAP SE. All rights reserved. + * Copyright (c) 2012, 2019 SAP SE. 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 @@ -70,22 +70,13 @@ // Store|Load // -#define strasm_sync "\n sync \n" -#define strasm_lwsync "\n lwsync \n" -#define strasm_isync "\n isync \n" -#define strasm_release strasm_lwsync -#define strasm_acquire strasm_lwsync -#define strasm_fence strasm_sync -#define strasm_nobarrier "" -#define strasm_nobarrier_clobber_memory "" - inline void pre_membar(atomic_memory_order order) { switch (order) { case memory_order_relaxed: case memory_order_acquire: break; case memory_order_release: - case memory_order_acq_rel: __asm__ __volatile__ (strasm_lwsync); break; - default /*conservative*/ : __asm__ __volatile__ (strasm_sync); break; + case memory_order_acq_rel: __asm__ __volatile__ ("lwsync" : : : "memory"); break; + default /*conservative*/ : __asm__ __volatile__ ("sync" : : : "memory"); break; } } @@ -94,8 +85,8 @@ case memory_order_relaxed: case memory_order_release: break; case memory_order_acquire: - case memory_order_acq_rel: __asm__ __volatile__ (strasm_isync); break; - default /*conservative*/ : __asm__ __volatile__ (strasm_sync); break; + case memory_order_acq_rel: __asm__ __volatile__ ("isync" : : : "memory"); break; + default /*conservative*/ : __asm__ __volatile__ ("sync" : : : "memory"); break; } } @@ -408,13 +399,4 @@ return old_value; } -#undef strasm_sync -#undef strasm_lwsync -#undef strasm_isync -#undef strasm_release -#undef strasm_acquire -#undef strasm_fence -#undef strasm_nobarrier -#undef strasm_nobarrier_clobber_memory - #endif // OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_HPP diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp openjdk-lts-11.0.4+11/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -573,8 +573,7 @@ // point to garbage if entry point in an nmethod is corrupted. Leave // this at the end, and hope for the best. address pc = os::Aix::ucontext_get_pc(uc); - st->print_cr("Instructions: (pc=" PTR_FORMAT ")", pc); - print_hex_dump(st, pc - 64, pc + 64, /*instrsize=*/4); + print_instructions(st, pc, /*instrsize=*/4); st->cr(); // Try to decode the instructions. diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp openjdk-lts-11.0.4+11/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1032,8 +1032,8 @@ // point to garbage if entry point in an nmethod is corrupted. Leave // this at the end, and hope for the best. address pc = os::Bsd::ucontext_get_pc(uc); - st->print_cr("Instructions: (pc=" INTPTR_FORMAT ")", (intptr_t)pc); - print_hex_dump(st, pc - 32, pc + 32, sizeof(char)); + print_instructions(st, pc, sizeof(char)); + st->cr(); } void os::print_register_info(outputStream *st, const void *context) { diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp openjdk-lts-11.0.4+11/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -611,8 +611,8 @@ // point to garbage if entry point in an nmethod is corrupted. Leave // this at the end, and hope for the best. address pc = os::Linux::ucontext_get_pc(uc); - st->print_cr("Instructions: (pc=" PTR_FORMAT ")", p2i(pc)); - print_hex_dump(st, pc - 32, pc + 32, sizeof(char)); + print_instructions(st, pc, sizeof(char)); + st->cr(); } void os::print_register_info(outputStream *st, const void *context) { diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp openjdk-lts-11.0.4+11/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -574,8 +574,8 @@ // point to garbage if entry point in an nmethod is corrupted. Leave // this at the end, and hope for the best. address pc = os::Linux::ucontext_get_pc(uc); - st->print_cr("Instructions: (pc=" INTPTR_FORMAT ")", p2i(pc)); - print_hex_dump(st, pc - 32, pc + 32, Assembler::InstructionSize); + print_instructions(st, pc, Assembler::InstructionSize); + st->cr(); } void os::print_register_info(outputStream *st, const void *context) { diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os_cpu/linux_ppc/atomic_linux_ppc.hpp openjdk-lts-11.0.4+11/src/hotspot/os_cpu/linux_ppc/atomic_linux_ppc.hpp --- openjdk-lts-11.0.3+7/src/hotspot/os_cpu/linux_ppc/atomic_linux_ppc.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os_cpu/linux_ppc/atomic_linux_ppc.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2018 SAP SE. All rights reserved. + * Copyright (c) 2012, 2019 SAP SE. 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 @@ -30,6 +30,8 @@ #error "Atomic currently only implemented for PPC64" #endif +#include "utilities/debug.hpp" + // Implementation of class atomic // @@ -68,22 +70,13 @@ // Store|Load // -#define strasm_sync "\n sync \n" -#define strasm_lwsync "\n lwsync \n" -#define strasm_isync "\n isync \n" -#define strasm_release strasm_lwsync -#define strasm_acquire strasm_lwsync -#define strasm_fence strasm_sync -#define strasm_nobarrier "" -#define strasm_nobarrier_clobber_memory "" - inline void pre_membar(atomic_memory_order order) { switch (order) { case memory_order_relaxed: case memory_order_acquire: break; case memory_order_release: - case memory_order_acq_rel: __asm__ __volatile__ (strasm_lwsync); break; - default /*conservative*/ : __asm__ __volatile__ (strasm_sync); break; + case memory_order_acq_rel: __asm__ __volatile__ ("lwsync" : : : "memory"); break; + default /*conservative*/ : __asm__ __volatile__ ("sync" : : : "memory"); break; } } @@ -92,8 +85,8 @@ case memory_order_relaxed: case memory_order_release: break; case memory_order_acquire: - case memory_order_acq_rel: __asm__ __volatile__ (strasm_isync); break; - default /*conservative*/ : __asm__ __volatile__ (strasm_sync); break; + case memory_order_acq_rel: __asm__ __volatile__ ("isync" : : : "memory"); break; + default /*conservative*/ : __asm__ __volatile__ ("sync" : : : "memory"); break; } } @@ -406,13 +399,4 @@ return old_value; } -#undef strasm_sync -#undef strasm_lwsync -#undef strasm_isync -#undef strasm_release -#undef strasm_acquire -#undef strasm_fence -#undef strasm_nobarrier -#undef strasm_nobarrier_clobber_memory - #endif // OS_CPU_LINUX_PPC_VM_ATOMIC_LINUX_PPC_HPP diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp openjdk-lts-11.0.4+11/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2018 SAP SE. All rights reserved. + * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2019 SAP SE. 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 @@ -132,6 +132,10 @@ return NULL; } +static unsigned long ucontext_get_trap(const ucontext_t * uc) { + return uc->uc_mcontext.regs->trap; +} + ExtendedPC os::fetch_frame_from_context(const void* ucVoid, intptr_t** ret_sp, intptr_t** ret_fp) { @@ -298,15 +302,27 @@ address stub = NULL; address pc = NULL; - //%note os_trap_1 if (info != NULL && uc != NULL && thread != NULL) { pc = (address) os::Linux::ucontext_get_pc(uc); // Handle ALL stack overflow variations here if (sig == SIGSEGV) { - // Si_addr may not be valid due to a bug in the linux-ppc64 kernel (see + // si_addr may not be valid due to a bug in the linux-ppc64 kernel (see // comment below). Use get_stack_bang_address instead of si_addr. - address addr = ((NativeInstruction*)pc)->get_stack_bang_address(uc); + // If SIGSEGV is caused due to a branch to an invalid address an + // "Instruction Storage Interrupt" is generated and 'pc' (NIP) already + // contains the invalid address. Otherwise, the SIGSEGV is caused due to + // load/store instruction trying to load/store from/to an invalid address + // and causing a "Data Storage Interrupt", so we inspect the intruction + // in order to extract the faulty data addresss. + address addr; + if ((ucontext_get_trap(uc) & 0x0F00 /* no IRQ reply bits */) == 0x0400) { + // Instruction Storage Interrupt (ISI) + addr = pc; + } else { + // Data Storage Interrupt (DSI), i.e. 0x0300: extract faulty data address + addr = ((NativeInstruction*)pc)->get_stack_bang_address(uc); + } // Check if fault address is within thread stack. if (thread->on_local_stack(addr)) { @@ -483,8 +499,10 @@ // It write enables the page immediately after protecting it // so we can just return to retry the write. if ((sig == SIGSEGV) && - // Si_addr may not be valid due to a bug in the linux-ppc64 kernel (see comment above). - // Use is_memory_serialization instead of si_addr. + // si_addr may not be valid due to a bug in the linux-ppc64 kernel (see comments above). + // So first check if it's indeed a "Data Storage Interrupt" (DSI), caused by load/store, + // and only then use is_memory_serialization instead of si_addr. + (ucontext_get_trap(uc) & 0x0F00 == 0x0300) && ((NativeInstruction*)pc)->is_memory_serialization(thread, ucVoid)) { // Synchronization problem in the pseudo memory barrier code (bug id 6546278) // Block current thread until the memory serialize page permission restored. @@ -588,8 +606,7 @@ // point to garbage if entry point in an nmethod is corrupted. Leave // this at the end, and hope for the best. address pc = os::Linux::ucontext_get_pc(uc); - st->print_cr("Instructions: (pc=" PTR_FORMAT ")", p2i(pc)); - print_hex_dump(st, pc - 64, pc + 64, /*instrsize=*/4); + print_instructions(st, pc, /*instrsize=*/4); st->cr(); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp openjdk-lts-11.0.4+11/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -618,9 +618,7 @@ // point to garbage if entry point in an nmethod is corrupted. Leave // this at the end, and hope for the best. address pc = os::Linux::ucontext_get_pc(uc); - if (Verbose) { st->print_cr("pc at " PTR_FORMAT, p2i(pc)); } - st->print_cr("Instructions: (pc=" PTR_FORMAT ")", p2i(pc)); - print_hex_dump(st, pc-64, pc+64, /*intrsize=*/4); + print_instructions(st, pc, /*intrsize=*/4); st->cr(); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os_cpu/linux_s390/thread_linux_s390.cpp openjdk-lts-11.0.4+11/src/hotspot/os_cpu/linux_s390/thread_linux_s390.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os_cpu/linux_s390/thread_linux_s390.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os_cpu/linux_s390/thread_linux_s390.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016 SAP SE. All rights reserved. + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2019 SAP SE. 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 @@ -63,7 +63,7 @@ if (ret_frame.is_interpreted_frame()) { frame::z_ijava_state* istate = ret_frame.ijava_state_unchecked(); - if (!((Method*)(istate->method))->is_metaspace_object()) { + if ((stack_base() >= (address)istate && (address)istate > stack_end()) || !((Method*)(istate->method))->is_metaspace_object()) { return false; } uint64_t reg_bcp = uc->uc_mcontext.gregs[13/*Z_BCP*/]; diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp openjdk-lts-11.0.4+11/src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -232,8 +232,8 @@ // point to garbage if entry point in an nmethod is corrupted. Leave // this at the end, and hope for the best. address pc = os::Linux::ucontext_get_pc(uc); - st->print_cr("Instructions: (pc=" INTPTR_FORMAT ")", p2i(pc)); - print_hex_dump(st, pc - 32, pc + 32, sizeof(char)); + print_instructions(st, pc, sizeof(char)); + st->cr(); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os_cpu/linux_x86/gc/z/zBackingFile_linux_x86.cpp openjdk-lts-11.0.4+11/src/hotspot/os_cpu/linux_x86/gc/z/zBackingFile_linux_x86.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os_cpu/linux_x86/gc/z/zBackingFile_linux_x86.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os_cpu/linux_x86/gc/z/zBackingFile_linux_x86.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -191,7 +191,7 @@ // Try to create an anonymous file using the O_TMPFILE flag. Note that this // flag requires kernel >= 3.11. If this fails we fall back to open/unlink. - const int fd_anon = open(path.get(), O_TMPFILE|O_EXCL|O_RDWR|O_CLOEXEC, S_IRUSR|S_IWUSR); + const int fd_anon = os::open(path.get(), O_TMPFILE|O_EXCL|O_RDWR|O_CLOEXEC, S_IRUSR|S_IWUSR); if (fd_anon == -1) { ZErrno err; log_debug(gc, init)("Failed to create anonymous file in %s (%s)", path.get(), @@ -217,7 +217,7 @@ snprintf(filename, sizeof(filename), "%s/%s.%d", path.get(), name, os::current_process_id()); // Create file - const int fd = open(filename, O_CREAT|O_EXCL|O_RDWR|O_CLOEXEC, S_IRUSR|S_IWUSR); + const int fd = os::open(filename, O_CREAT|O_EXCL|O_RDWR|O_CLOEXEC, S_IRUSR|S_IWUSR); if (fd == -1) { ZErrno err; log_error(gc, init)("Failed to create file %s (%s)", filename, err.to_string()); diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp openjdk-lts-11.0.4+11/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -766,8 +766,8 @@ // point to garbage if entry point in an nmethod is corrupted. Leave // this at the end, and hope for the best. address pc = os::Linux::ucontext_get_pc(uc); - st->print_cr("Instructions: (pc=" PTR_FORMAT ")", p2i(pc)); - print_hex_dump(st, pc - 32, pc + 32, sizeof(char)); + print_instructions(st, pc, sizeof(char)); + st->cr(); } void os::print_register_info(outputStream *st, const void *context) { @@ -838,6 +838,7 @@ */ void os::workaround_expand_exec_shield_cs_limit() { #if defined(IA32) + assert(Linux::initial_thread_stack_bottom() != NULL, "sanity"); size_t page_size = os::vm_page_size(); /* diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os_cpu/solaris_sparc/os_solaris_sparc.cpp openjdk-lts-11.0.4+11/src/hotspot/os_cpu/solaris_sparc/os_solaris_sparc.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os_cpu/solaris_sparc/os_solaris_sparc.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os_cpu/solaris_sparc/os_solaris_sparc.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -666,8 +666,8 @@ // this at the end, and hope for the best. ExtendedPC epc = os::Solaris::ucontext_get_ExtendedPC(uc); address pc = epc.pc(); - st->print_cr("Instructions: (pc=" PTR_FORMAT ")", pc); - print_hex_dump(st, pc - 32, pc + 32, sizeof(char)); + print_instructions(st, pc, sizeof(char)); + st->cr(); } void os::print_register_info(outputStream *st, const void *context) { diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os_cpu/solaris_x86/os_solaris_x86.cpp openjdk-lts-11.0.4+11/src/hotspot/os_cpu/solaris_x86/os_solaris_x86.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os_cpu/solaris_x86/os_solaris_x86.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os_cpu/solaris_x86/os_solaris_x86.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -837,8 +837,8 @@ // this at the end, and hope for the best. ExtendedPC epc = os::Solaris::ucontext_get_ExtendedPC(uc); address pc = epc.pc(); - st->print_cr("Instructions: (pc=" PTR_FORMAT ")", pc); - print_hex_dump(st, pc - 32, pc + 32, sizeof(char)); + print_instructions(st, pc, sizeof(char)); + st->cr(); } void os::print_register_info(outputStream *st, const void *context) { diff -Nru openjdk-lts-11.0.3+7/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp openjdk-lts-11.0.4+11/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp --- openjdk-lts-11.0.3+7/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -585,8 +585,7 @@ // point to garbage if entry point in an nmethod is corrupted. Leave // this at the end, and hope for the best. address pc = (address)uc->REG_PC; - st->print_cr("Instructions: (pc=" PTR_FORMAT ")", pc); - print_hex_dump(st, pc - 32, pc + 32, sizeof(char)); + print_instructions(st, pc, sizeof(char)); st->cr(); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/ci/ciEnv.cpp openjdk-lts-11.0.4+11/src/hotspot/share/ci/ciEnv.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/ci/ciEnv.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/ci/ciEnv.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2019, 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 @@ -233,10 +233,6 @@ _jvmti_can_pop_frame = JvmtiExport::can_pop_frame(); } -bool ciEnv::should_retain_local_variables() const { - return _jvmti_can_access_local_variables || _jvmti_can_pop_frame; -} - bool ciEnv::jvmti_state_changed() const { if (!_jvmti_can_access_local_variables && JvmtiExport::can_access_local_variables()) { @@ -1249,7 +1245,7 @@ static char buffer[O_BUFLEN]; int ret = jio_snprintf(buffer, O_BUFLEN, "replay_pid%p_compid%d.log", os::current_process_id(), compile_id); if (ret > 0) { - int fd = open(buffer, O_RDWR | O_CREAT | O_TRUNC, 0666); + int fd = os::open(buffer, O_RDWR | O_CREAT | O_TRUNC, 0666); if (fd != -1) { FILE* replay_data_file = os::open(fd, "w"); if (replay_data_file != NULL) { @@ -1267,7 +1263,7 @@ static char buffer[O_BUFLEN]; int ret = jio_snprintf(buffer, O_BUFLEN, "inline_pid%p_compid%d.log", os::current_process_id(), compile_id); if (ret > 0) { - int fd = open(buffer, O_RDWR | O_CREAT | O_TRUNC, 0666); + int fd = os::open(buffer, O_RDWR | O_CREAT | O_TRUNC, 0666); if (fd != -1) { FILE* inline_data_file = os::open(fd, "w"); if (inline_data_file != NULL) { diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/ci/ciEnv.hpp openjdk-lts-11.0.4+11/src/hotspot/share/ci/ciEnv.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/ci/ciEnv.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/ci/ciEnv.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -338,7 +338,9 @@ // Cache Jvmti state void cache_jvmti_state(); bool jvmti_state_changed() const; - bool should_retain_local_variables() const; + bool should_retain_local_variables() const { + return _jvmti_can_access_local_variables || _jvmti_can_pop_frame; + } bool jvmti_can_hotswap_or_post_breakpoint() const { return _jvmti_can_hotswap_or_post_breakpoint; } bool jvmti_can_post_on_exceptions() const { return _jvmti_can_post_on_exceptions; } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/ci/ciMethod.cpp openjdk-lts-11.0.4+11/src/hotspot/share/ci/ciMethod.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/ci/ciMethod.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/ci/ciMethod.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2019, 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 @@ -402,12 +402,14 @@ // will return true for all locals in some cases to improve debug // information. MethodLivenessResult ciMethod::liveness_at_bci(int bci) { - MethodLivenessResult result = raw_liveness_at_bci(bci); if (CURRENT_ENV->should_retain_local_variables() || DeoptimizeALot || CompileTheWorld) { // Keep all locals live for the user's edification and amusement. - result.at_put_range(0, result.size(), true); + MethodLivenessResult result(_max_locals); + result.set_range(0, _max_locals); + result.set_is_valid(); + return result; } - return result; + return raw_liveness_at_bci(bci); } // ciMethod::live_local_oops_at_bci diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/ci/ciMethod.hpp openjdk-lts-11.0.4+11/src/hotspot/share/ci/ciMethod.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/ci/ciMethod.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/ci/ciMethod.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -190,10 +190,11 @@ // Code size for inlining decisions. int code_size_for_inlining(); - bool caller_sensitive() const { return get_Method()->caller_sensitive(); } - bool force_inline() const { return get_Method()->force_inline(); } - bool dont_inline() const { return get_Method()->dont_inline(); } - bool intrinsic_candidate() const { return get_Method()->intrinsic_candidate(); } + bool caller_sensitive() const { return get_Method()->caller_sensitive(); } + bool force_inline() const { return get_Method()->force_inline(); } + bool dont_inline() const { return get_Method()->dont_inline(); } + bool intrinsic_candidate() const { return get_Method()->intrinsic_candidate(); } + bool is_static_initializer() const { return get_Method()->is_static_initializer(); } int comp_level(); int highest_osr_comp_level(); diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/classfile/classLoader.cpp openjdk-lts-11.0.4+11/src/hotspot/share/classfile/classLoader.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/classfile/classLoader.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/classfile/classLoader.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -450,6 +450,13 @@ } } +void ClassPathImageEntry::close_jimage() { + if (_jimage != NULL) { + (*JImageClose)(_jimage); + _jimage = NULL; + } +} + ClassPathImageEntry::ClassPathImageEntry(JImageFile* jimage, const char* name) : ClassPathEntry(), _jimage(jimage) { @@ -731,8 +738,15 @@ void ClassLoader::setup_module_search_path(const char* path, TRAPS) { update_module_path_entry_list(path, THREAD); } + #endif // INCLUDE_CDS +void ClassLoader::close_jrt_image() { + // Not applicable for exploded builds + if (!ClassLoader::has_jrt_entry()) return; + _jrt_entry->close_jimage(); +} + // Construct the array of module/path pairs as specified to --patch-module // for the boot loader to search ahead of the jimage, if the class being // loaded is defined to a module that has been specified to --patch-module. diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/classfile/classLoader.hpp openjdk-lts-11.0.4+11/src/hotspot/share/classfile/classLoader.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/classfile/classLoader.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/classfile/classLoader.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -55,6 +55,7 @@ virtual bool is_jar_file() const = 0; virtual const char* name() const = 0; virtual JImageFile* jimage() const = 0; + virtual void close_jimage() = 0; // Constructor ClassPathEntry() : _next(NULL) {} // Attempt to locate file_name through this class path entry. @@ -72,6 +73,7 @@ bool is_jar_file() const { return false; } const char* name() const { return _dir; } JImageFile* jimage() const { return NULL; } + void close_jimage() {} ClassPathDirEntry(const char* dir); virtual ~ClassPathDirEntry() {} ClassFileStream* open_stream(const char* name, TRAPS); @@ -110,6 +112,7 @@ bool is_jar_file() const { return true; } const char* name() const { return _zip_name; } JImageFile* jimage() const { return NULL; } + void close_jimage() {} ClassPathZipEntry(jzfile* zip, const char* zip_name, bool is_boot_append); virtual ~ClassPathZipEntry(); u1* open_entry(const char* name, jint* filesize, bool nul_terminate, TRAPS); @@ -133,6 +136,7 @@ bool is_open() const { return _jimage != NULL; } const char* name() const { return _name == NULL ? "" : _name; } JImageFile* jimage() const { return _jimage; } + void close_jimage(); ClassPathImageEntry(JImageFile* jimage, const char* name); virtual ~ClassPathImageEntry(); ClassFileStream* open_stream(const char* name, TRAPS); @@ -359,6 +363,7 @@ // Modular java runtime image is present vs. a build with exploded modules static bool has_jrt_entry() { return (_jrt_entry != NULL); } static ClassPathEntry* get_jrt_entry() { return _jrt_entry; } + static void close_jrt_image(); // Add a module's exploded directory to the boot loader's exploded module build list static void add_to_exploded_build_list(Symbol* module_name, TRAPS); diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/classfile/compactHashtable.cpp openjdk-lts-11.0.4+11/src/hotspot/share/classfile/compactHashtable.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/classfile/compactHashtable.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/classfile/compactHashtable.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2019, 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 @@ -309,7 +309,7 @@ quit("Unable to get hashtable dump file size", filename); } _size = st.st_size; - _fd = open(filename, O_RDONLY | O_BINARY, 0); + _fd = os::open(filename, O_RDONLY | O_BINARY, 0); if (_fd < 0) { quit("Unable to open hashtable dump file", filename); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/classfile/javaClasses.cpp openjdk-lts-11.0.4+11/src/hotspot/share/classfile/javaClasses.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/classfile/javaClasses.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/classfile/javaClasses.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -3823,7 +3823,7 @@ // distinct loaders) to ensure the metadata is kept alive. // This mirror may be different than the one in clazz field. new_resolved_method->obj_field_put(_vmholder_offset, m->method_holder()->java_mirror()); - resolved_method = ResolvedMethodTable::add_method(Handle(THREAD, new_resolved_method)); + resolved_method = ResolvedMethodTable::add_method(m, Handle(THREAD, new_resolved_method)); } return resolved_method; } @@ -4163,48 +4163,6 @@ return loader->obj_field(unnamedModule_offset); } -// Caller needs ResourceMark. -const char* java_lang_ClassLoader::describe_external(const oop loader) { - ClassLoaderData *cld = ClassLoaderData::class_loader_data(loader); - const char* name = cld->loader_name_and_id(); - - // bootstrap loader - if (loader == NULL) { - return name; - } - - bool well_known_loader = SystemDictionary::is_system_class_loader(loader) || - SystemDictionary::is_platform_class_loader(loader); - - stringStream ss; - ss.print("%s (instance of %s", name, loader->klass()->external_name()); - if (!well_known_loader) { - oop pl = java_lang_ClassLoader::parent(loader); - const char* parentName = ""; - ClassLoaderData *parent_cld = ClassLoaderData::class_loader_data_or_null(pl); - // The parent loader's ClassLoaderData could be null if it is - // a delegating class loader that has never defined a class. - // In this case the loader's name must be obtained via the parent loader's oop. - if (parent_cld == NULL) { - oop cl_name_and_id = java_lang_ClassLoader::nameAndId(pl); - if (cl_name_and_id != NULL) { - parentName = java_lang_String::as_utf8_string(cl_name_and_id); - } - } else { - parentName = parent_cld->loader_name_and_id(); - } - if (pl != NULL) { - ss.print(", child of %s %s", parentName, pl->klass()->external_name()); - } else { - // bootstrap loader - ss.print(", child of %s", parentName); - } - } - ss.print(")"); - - return ss.as_string(); -} - // Support for java_lang_System // #define SYSTEM_FIELDS_DO(macro) \ diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/classfile/javaClasses.hpp openjdk-lts-11.0.4+11/src/hotspot/share/classfile/javaClasses.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/classfile/javaClasses.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/classfile/javaClasses.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -1318,12 +1318,6 @@ // Debugging friend class JavaClasses; friend class ClassFileParser; // access to number_of_fake_fields - - // Describe ClassLoader for exceptions, tracing ... - // Prints "" (instance of , child of "" ). - // If a classloader has no name, it prints instead. The output - // for well known loaders (system/platform) is abbreviated. - static const char* describe_external(const oop loader); }; diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/classfile/systemDictionary.cpp openjdk-lts-11.0.4+11/src/hotspot/share/classfile/systemDictionary.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/classfile/systemDictionary.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/classfile/systemDictionary.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -2091,9 +2091,9 @@ assert(check->is_instance_klass(), "noninstance in systemdictionary"); if ((defining == true) || (k != check)) { throwException = true; - ss.print("loader %s", java_lang_ClassLoader::describe_external(class_loader())); - ss.print(" attempted duplicate %s definition for %s.", - k->external_kind(), k->external_name()); + ss.print("loader %s", loader_data->loader_name_and_id()); + ss.print(" attempted duplicate %s definition for %s. (%s)", + k->external_kind(), k->external_name(), k->class_in_module_of_loader(false, true)); } else { return; } @@ -2107,15 +2107,17 @@ if (throwException == false) { if (constraints()->check_or_update(k, class_loader, name) == false) { throwException = true; - ss.print("loader constraint violation: loader %s", - java_lang_ClassLoader::describe_external(class_loader())); + ss.print("loader constraint violation: loader %s", loader_data->loader_name_and_id()); ss.print(" wants to load %s %s.", k->external_kind(), k->external_name()); Klass *existing_klass = constraints()->find_constrained_klass(name, class_loader); if (existing_klass->class_loader() != class_loader()) { - ss.print(" A different %s with the same name was previously loaded by %s.", + ss.print(" A different %s with the same name was previously loaded by %s. (%s)", existing_klass->external_kind(), - java_lang_ClassLoader::describe_external(existing_klass->class_loader())); + existing_klass->class_loader_data()->loader_name_and_id(), + existing_klass->class_in_module_of_loader(false, true)); + } else { + ss.print(" (%s)", k->class_in_module_of_loader(false, true)); } } } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/classfile/verifier.cpp openjdk-lts-11.0.4+11/src/hotspot/share/classfile/verifier.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/classfile/verifier.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/classfile/verifier.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1999,7 +1999,9 @@ ss.vprint(msg, va); va_end(va); if (!_method.is_null()) { - ss.print(" in method %s", _method->name_and_sig_as_C_string()); + ss.print(" in method '"); + _method->print_external_name(&ss); + ss.print("'"); } _message = ss.as_string(); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/code/codeBlob.hpp openjdk-lts-11.0.4+11/src/hotspot/share/code/codeBlob.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/code/codeBlob.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/code/codeBlob.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -392,6 +392,10 @@ BufferBlob(const char* name, int size); BufferBlob(const char* name, int size, CodeBuffer* cb); + // This ordinary operator delete is needed even though not used, so the + // below two-argument operator delete will be treated as a placement + // delete rather than an ordinary sized delete; see C++14 3.7.4.2/p2. + void operator delete(void* p); void* operator new(size_t s, unsigned size) throw(); public: @@ -475,6 +479,10 @@ bool caller_must_gc_arguments ); + // This ordinary operator delete is needed even though not used, so the + // below two-argument operator delete will be treated as a placement + // delete rather than an ordinary sized delete; see C++14 3.7.4.2/p2. + void operator delete(void* p); void* operator new(size_t s, unsigned size) throw(); public: @@ -510,6 +518,10 @@ friend class VMStructs; protected: + // This ordinary operator delete is needed even though not used, so the + // below two-argument operator delete will be treated as a placement + // delete rather than an ordinary sized delete; see C++14 3.7.4.2/p2. + void operator delete(void* p); void* operator new(size_t s, unsigned size) throw(); public: diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/code/nmethod.cpp openjdk-lts-11.0.4+11/src/hotspot/share/code/nmethod.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/code/nmethod.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/code/nmethod.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1540,6 +1540,7 @@ } } else if (iter.type() == relocInfo::virtual_call_type) { // Check compiledIC holders associated with this nmethod + ResourceMark rm; CompiledIC *ic = CompiledIC_at(&iter); if (ic->is_icholder_call()) { CompiledICHolder* cichk = ic->cached_icholder(); diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/gc/g1/g1Arguments.hpp openjdk-lts-11.0.4+11/src/hotspot/share/gc/g1/g1Arguments.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/gc/g1/g1Arguments.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/gc/g1/g1Arguments.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -31,7 +31,7 @@ class CollectedHeap; class G1Arguments : public GCArguments { - friend class G1HeapVerifierTest_parse_Test; + friend class G1HeapVerifierTest; private: static void initialize_verification_types(); diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp openjdk-lts-11.0.4+11/src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -391,8 +391,6 @@ #endif // !PRODUCT HeapWord* G1BlockOffsetTablePart::initialize_threshold_raw() { - assert(!G1CollectedHeap::heap()->is_in_reserved(_bot->_offset_array), - "just checking"); _next_offset_index = _bot->index_for_raw(_space->bottom()); _next_offset_index++; _next_offset_threshold = @@ -401,8 +399,6 @@ } void G1BlockOffsetTablePart::zero_bottom_entry_raw() { - assert(!G1CollectedHeap::heap()->is_in_reserved(_bot->_offset_array), - "just checking"); size_t bottom_index = _bot->index_for_raw(_space->bottom()); assert(_bot->address_for_index_raw(bottom_index) == _space->bottom(), "Precondition of call"); @@ -410,8 +406,6 @@ } HeapWord* G1BlockOffsetTablePart::initialize_threshold() { - assert(!G1CollectedHeap::heap()->is_in_reserved(_bot->_offset_array), - "just checking"); _next_offset_index = _bot->index_for(_space->bottom()); _next_offset_index++; _next_offset_threshold = diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/gc/g1/g1BlockOffsetTable.hpp openjdk-lts-11.0.4+11/src/hotspot/share/gc/g1/g1BlockOffsetTable.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/gc/g1/g1BlockOffsetTable.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/gc/g1/g1BlockOffsetTable.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -52,7 +52,7 @@ // Array for keeping offsets for retrieving object start fast given an // address. - u_char* _offset_array; // byte array keeping backwards offsets + volatile u_char* _offset_array; // byte array keeping backwards offsets void check_offset(size_t offset, const char* msg) const { assert(offset <= BOTConstants::N_words, @@ -64,10 +64,7 @@ // For performance these have to devolve to array accesses in product builds. inline u_char offset_array(size_t index) const; - void set_offset_array_raw(size_t index, u_char offset) { - _offset_array[index] = offset; - } - + inline void set_offset_array_raw(size_t index, u_char offset); inline void set_offset_array(size_t index, u_char offset); inline void set_offset_array(size_t index, HeapWord* high, HeapWord* low); diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/gc/g1/g1BlockOffsetTable.inline.hpp openjdk-lts-11.0.4+11/src/hotspot/share/gc/g1/g1BlockOffsetTable.inline.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/gc/g1/g1BlockOffsetTable.inline.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/gc/g1/g1BlockOffsetTable.inline.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -29,6 +29,7 @@ #include "gc/g1/heapRegion.hpp" #include "gc/shared/memset_with_concurrent_readers.hpp" #include "gc/shared/space.hpp" +#include "runtime/atomic.hpp" inline HeapWord* G1BlockOffsetTablePart::block_start(const void* addr) { if (addr >= _space->bottom() && addr < _space->end()) { @@ -51,7 +52,11 @@ u_char G1BlockOffsetTable::offset_array(size_t index) const { check_index(index, "index out of range"); - return _offset_array[index]; + return Atomic::load(&_offset_array[index]); +} + +void G1BlockOffsetTable::set_offset_array_raw(size_t index, u_char offset) { + Atomic::store(offset, &_offset_array[index]); } void G1BlockOffsetTable::set_offset_array(size_t index, u_char offset) { @@ -71,7 +76,8 @@ check_index(right, "right index out of range"); assert(left <= right, "indexes out of order"); size_t num_cards = right - left + 1; - memset_with_concurrent_readers(&_offset_array[left], offset, num_cards); + memset_with_concurrent_readers + (const_cast (&_offset_array[left]), offset, num_cards); } // Variant of index_for that does not check the index for validity. diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/interpreter/linkResolver.cpp openjdk-lts-11.0.4+11/src/hotspot/share/interpreter/linkResolver.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/interpreter/linkResolver.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/interpreter/linkResolver.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -268,10 +268,6 @@ _check_access = true; } -char* LinkInfo::method_string() const { - return Method::name_and_sig_as_C_string(_resolved_klass, _name, _signature); -} - #ifndef PRODUCT void LinkInfo::print() { ResourceMark rm; @@ -600,14 +596,12 @@ Exceptions::fthrow( THREAD_AND_LOCATION, vmSymbols::java_lang_IllegalAccessError(), - "class %s tried to access %s%s%smethod %s.%s%s (%s%s%s)", + "class %s tried to access %s%s%smethod '%s' (%s%s%s)", ref_klass->external_name(), sel_method->is_abstract() ? "abstract " : "", sel_method->is_protected() ? "protected " : "", sel_method->is_private() ? "private " : "", - sel_klass->external_name(), - sel_method->name()->as_C_string(), - sel_method->signature()->as_C_string(), + sel_method->external_name(), (same_module) ? ref_klass->joint_in_module_of_loader(sel_klass) : ref_klass->class_in_module_of_loader(), (same_module) ? "" : "; ", (same_module) ? "" : sel_klass->class_in_module_of_loader() @@ -669,23 +663,27 @@ SystemDictionary::check_signature_loaders(link_info.signature(), current_loader, resolved_loader, true, CHECK); if (failed_type_symbol != NULL) { - const char* msg = "loader constraint violation: when resolving %s" - " \"%s\" the class loader %s of the current class, %s," - " and the class loader %s for the method's defining class, %s, have" - " different Class objects for the type %s used in the signature"; - char* sig = link_info.method_string(); - const char* loader1_name = java_lang_ClassLoader::describe_external(current_loader()); - char* current = link_info.current_klass()->name()->as_C_string(); - const char* loader2_name = java_lang_ClassLoader::describe_external(resolved_loader()); - char* target = resolved_method->method_holder()->name()->as_C_string(); - char* failed_type_name = failed_type_symbol->as_C_string(); - size_t buflen = strlen(msg) + strlen(sig) + strlen(loader1_name) + - strlen(current) + strlen(loader2_name) + strlen(target) + - strlen(failed_type_name) + strlen(method_type) + 1; - char* buf = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, buflen); - jio_snprintf(buf, buflen, msg, method_type, sig, loader1_name, current, loader2_name, - target, failed_type_name); - THROW_MSG(vmSymbols::java_lang_LinkageError(), buf); + Klass* current_class = link_info.current_klass(); + ClassLoaderData* current_loader_data = current_class->class_loader_data(); + assert(current_loader_data != NULL, "current class has no class loader data"); + Klass* resolved_method_class = resolved_method->method_holder(); + ClassLoaderData* target_loader_data = resolved_method_class->class_loader_data(); + assert(target_loader_data != NULL, "resolved method's class has no class loader data"); + + stringStream ss; + ss.print("loader constraint violation: when resolving %s '", method_type); + Method::print_external_name(&ss, link_info.resolved_klass(), link_info.name(), link_info.signature()); + ss.print("' the class loader %s of the current class, %s," + " and the class loader %s for the method's defining class, %s, have" + " different Class objects for the type %s used in the signature (%s; %s)", + current_loader_data->loader_name_and_id(), + current_class->name()->as_C_string(), + target_loader_data->loader_name_and_id(), + resolved_method_class->name()->as_C_string(), + failed_type_symbol->as_C_string(), + current_class->class_in_module_of_loader(false, true), + resolved_method_class->class_in_module_of_loader(false, true)); + THROW_MSG(vmSymbols::java_lang_LinkageError(), ss.as_string()); } } @@ -702,23 +700,23 @@ false, CHECK); if (failed_type_symbol != NULL) { - const char* msg = "loader constraint violation: when resolving field" - " \"%s\" of type %s, the class loader %s of the current class, " - "%s, and the class loader %s for the field's defining " - "type, %s, have different Class objects for type %s"; - const char* field_name = field->as_C_string(); - const char* loader1_name = java_lang_ClassLoader::describe_external(ref_loader()); - const char* sel = sel_klass->external_name(); - const char* loader2_name = java_lang_ClassLoader::describe_external(sel_loader()); + stringStream ss; const char* failed_type_name = failed_type_symbol->as_klass_external_name(); - const char* curr_klass_name = current_klass->external_name(); - size_t buflen = strlen(msg) + strlen(field_name) + 2 * strlen(failed_type_name) + - strlen(loader1_name) + strlen(curr_klass_name) + - strlen(loader2_name) + strlen(sel) + 1; - char* buf = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, buflen); - jio_snprintf(buf, buflen, msg, field_name, failed_type_name, loader1_name, - curr_klass_name, loader2_name, sel, failed_type_name); - THROW_MSG(vmSymbols::java_lang_LinkageError(), buf); + + ss.print("loader constraint violation: when resolving field" + " \"%s\" of type %s, the class loader %s of the current class, " + "%s, and the class loader %s for the field's defining " + "type, %s, have different Class objects for type %s (%s; %s)", + field->as_C_string(), + failed_type_name, + current_klass->class_loader_data()->loader_name_and_id(), + current_klass->external_name(), + sel_klass->class_loader_data()->loader_name_and_id(), + sel_klass->external_name(), + failed_type_name, + current_klass->class_in_module_of_loader(false, true), + sel_klass->class_in_module_of_loader(false, true)); + THROW_MSG(vmSymbols::java_lang_LinkageError(), ss.as_string()); } } @@ -740,9 +738,11 @@ // 2. check constant pool tag for called method - must be JVM_CONSTANT_Methodref if (!link_info.tag().is_invalid() && !link_info.tag().is_method()) { ResourceMark rm(THREAD); - char buf[200]; - jio_snprintf(buf, sizeof(buf), "Method %s must be Methodref constant", link_info.method_string()); - THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), buf); + stringStream ss; + ss.print("Method '"); + Method::print_external_name(&ss, link_info.resolved_klass(), link_info.name(), link_info.signature()); + ss.print("' must be Methodref constant"); + THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), ss.as_string()); } // 3. lookup method in resolved klass and its super klasses @@ -765,11 +765,12 @@ // 5. method lookup failed if (resolved_method.is_null()) { ResourceMark rm(THREAD); + stringStream ss; + ss.print("'"); + Method::print_external_name(&ss, resolved_klass, link_info.name(), link_info.signature()); + ss.print("'"); THROW_MSG_CAUSE_(vmSymbols::java_lang_NoSuchMethodError(), - Method::name_and_sig_as_C_string(resolved_klass, - link_info.name(), - link_info.signature()), - nested_exception, NULL); + ss.as_string(), nested_exception, NULL); } // 6. access checks, access checking may be turned off when calling from within the VM. @@ -841,9 +842,11 @@ // check constant pool tag for called method - must be JVM_CONSTANT_InterfaceMethodref if (!link_info.tag().is_invalid() && !link_info.tag().is_interface_method()) { ResourceMark rm(THREAD); - char buf[200]; - jio_snprintf(buf, sizeof(buf), "Method %s must be InterfaceMethodref constant", link_info.method_string()); - THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), buf); + stringStream ss; + ss.print("Method '"); + Method::print_external_name(&ss, link_info.resolved_klass(), link_info.name(), link_info.signature()); + ss.print("' must be InterfaceMethodref constant"); + THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), ss.as_string()); } // lookup method in this interface or its super, java.lang.Object @@ -858,10 +861,11 @@ if (resolved_method.is_null()) { // no method found ResourceMark rm(THREAD); - THROW_MSG_NULL(vmSymbols::java_lang_NoSuchMethodError(), - Method::name_and_sig_as_C_string(resolved_klass, - link_info.name(), - link_info.signature())); + stringStream ss; + ss.print("'"); + Method::print_external_name(&ss, resolved_klass, link_info.name(), link_info.signature()); + ss.print("'"); + THROW_MSG_NULL(vmSymbols::java_lang_NoSuchMethodError(), ss.as_string()); } if (link_info.check_access()) { @@ -882,11 +886,12 @@ if (code != Bytecodes::_invokestatic && resolved_method->is_static()) { ResourceMark rm(THREAD); - char buf[200]; - jio_snprintf(buf, sizeof(buf), "Expected instance not static method %s", - Method::name_and_sig_as_C_string(resolved_klass, - resolved_method->name(), resolved_method->signature())); - THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), buf); + stringStream ss; + ss.print("Expected instance not static method '"); + Method::print_external_name(&ss, resolved_klass, + resolved_method->name(), resolved_method->signature()); + ss.print("'"); + THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), ss.as_string()); } if (log_develop_is_enabled(Trace, itables)) { @@ -1087,11 +1092,11 @@ // check if static if (!resolved_method->is_static()) { ResourceMark rm(THREAD); - char buf[200]; - jio_snprintf(buf, sizeof(buf), "Expected static method %s", Method::name_and_sig_as_C_string(resolved_klass, - resolved_method->name(), - resolved_method->signature())); - THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), buf); + stringStream ss; + ss.print("Expected static method '"); + resolved_method()->print_external_name(&ss); + ss.print("'"); + THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), ss.as_string()); } return resolved_method; } @@ -1128,14 +1133,16 @@ if (resolved_method->name() == vmSymbols::object_initializer_name() && resolved_method->method_holder() != resolved_klass) { ResourceMark rm(THREAD); + stringStream ss; + ss.print("%s: method '", resolved_klass->external_name()); + resolved_method->signature()->print_as_signature_external_return_type(&ss); + ss.print(" %s(", resolved_method->name()->as_C_string()); + resolved_method->signature()->print_as_signature_external_parameters(&ss); + ss.print(")' not found"); Exceptions::fthrow( THREAD_AND_LOCATION, vmSymbols::java_lang_NoSuchMethodError(), - "%s: method %s%s not found", - resolved_klass->external_name(), - resolved_method->name()->as_C_string(), - resolved_method->signature()->as_C_string() - ); + "%s", ss.as_string()); return NULL; } @@ -1154,27 +1161,23 @@ if (!is_reflect && !klass_to_check->is_same_or_direct_interface(resolved_klass)) { ResourceMark rm(THREAD); - char buf[200]; - jio_snprintf(buf, sizeof(buf), - "Interface method reference: %s, is in an indirect superinterface of %s", - Method::name_and_sig_as_C_string(resolved_klass, - resolved_method->name(), - resolved_method->signature()), - current_klass->external_name()); - THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), buf); + stringStream ss; + ss.print("Interface method reference: '"); + resolved_method->print_external_name(&ss); + ss.print("', is in an indirect superinterface of %s", + current_klass->external_name()); + THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), ss.as_string()); } } // check if not static if (resolved_method->is_static()) { ResourceMark rm(THREAD); - char buf[200]; - jio_snprintf(buf, sizeof(buf), - "Expecting non-static method %s", - Method::name_and_sig_as_C_string(resolved_klass, - resolved_method->name(), - resolved_method->signature())); - THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), buf); + stringStream ss; + ss.print("Expecting non-static method '"); + resolved_method->print_external_name(&ss); + ss.print("'"); + THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), ss.as_string()); } if (log_develop_is_enabled(Trace, itables)) { @@ -1223,10 +1226,11 @@ // check if found if (sel_method.is_null()) { ResourceMark rm(THREAD); - THROW_MSG(vmSymbols::java_lang_AbstractMethodError(), - Method::name_and_sig_as_C_string(resolved_klass, - resolved_method->name(), - resolved_method->signature())); + stringStream ss; + ss.print("'"); + resolved_method->print_external_name(&ss); + ss.print("'"); + THROW_MSG(vmSymbols::java_lang_AbstractMethodError(), ss.as_string()); // check loader constraints if found a different method } else if (sel_method() != resolved_method()) { check_method_loader_constraints(link_info, sel_method, "method", CHECK); @@ -1248,8 +1252,8 @@ char buf[500]; jio_snprintf(buf, sizeof(buf), "Receiver class %s must be the current class or a subtype of interface %s", - receiver_klass->name()->as_C_string(), - sender->name()->as_C_string()); + receiver_klass->external_name(), + sender->external_name()); THROW_MSG(vmSymbols::java_lang_IllegalAccessError(), buf); } } @@ -1258,20 +1262,21 @@ // check if not static if (sel_method->is_static()) { ResourceMark rm(THREAD); - char buf[200]; - jio_snprintf(buf, sizeof(buf), "Expecting non-static method %s", Method::name_and_sig_as_C_string(resolved_klass, - resolved_method->name(), - resolved_method->signature())); - THROW_MSG(vmSymbols::java_lang_IncompatibleClassChangeError(), buf); + stringStream ss; + ss.print("Expecting non-static method '"); + resolved_method->print_external_name(&ss); + ss.print("'"); + THROW_MSG(vmSymbols::java_lang_IncompatibleClassChangeError(), ss.as_string()); } // check if abstract if (sel_method->is_abstract()) { ResourceMark rm(THREAD); - THROW_MSG(vmSymbols::java_lang_AbstractMethodError(), - Method::name_and_sig_as_C_string(resolved_klass, - sel_method->name(), - sel_method->signature())); + stringStream ss; + ss.print("'"); + Method::print_external_name(&ss, resolved_klass, sel_method->name(), sel_method->signature()); + ss.print("'"); + THROW_MSG(vmSymbols::java_lang_AbstractMethodError(), ss.as_string()); } if (log_develop_is_enabled(Trace, itables)) { @@ -1309,23 +1314,22 @@ // This is impossible, if resolve_klass is an interface, we've thrown icce in resolve_method if (resolved_klass->is_interface() && resolved_method->is_private()) { ResourceMark rm(THREAD); - char buf[200]; - jio_snprintf(buf, sizeof(buf), "private interface method requires invokespecial, not invokevirtual: method %s, caller-class:%s", - Method::name_and_sig_as_C_string(resolved_klass, - resolved_method->name(), - resolved_method->signature()), - (current_klass == NULL ? "" : current_klass->internal_name())); - THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), buf); + stringStream ss; + ss.print("private interface method requires invokespecial, not invokevirtual: method '"); + resolved_method->print_external_name(&ss); + ss.print("', caller-class: %s", + (current_klass == NULL ? "" : current_klass->internal_name())); + THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), ss.as_string()); } // check if not static if (resolved_method->is_static()) { ResourceMark rm(THREAD); - char buf[200]; - jio_snprintf(buf, sizeof(buf), "Expecting non-static method %s", Method::name_and_sig_as_C_string(resolved_klass, - resolved_method->name(), - resolved_method->signature())); - THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), buf); + stringStream ss; + ss.print("Expecting non-static method '"); + resolved_method->print_external_name(&ss); + ss.print("'"); + THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), ss.as_string()); } if (log_develop_is_enabled(Trace, vtables)) { @@ -1474,10 +1478,11 @@ // Throw Illegal Access Error if selected_method is not public. if (!selected_method->is_public()) { ResourceMark rm(THREAD); - THROW_MSG(vmSymbols::java_lang_IllegalAccessError(), - Method::name_and_sig_as_C_string(recv_klass, - selected_method->name(), - selected_method->signature())); + stringStream ss; + ss.print("'"); + Method::print_external_name(&ss, recv_klass, selected_method->name(), selected_method->signature()); + ss.print("'"); + THROW_MSG(vmSymbols::java_lang_IllegalAccessError(), ss.as_string()); } // check if abstract if (check_null_and_abstract && selected_method->is_abstract()) { @@ -1816,19 +1821,22 @@ } assert(resolved_method.not_null(), "Sanity"); - ss.print(" resolved method %s%s%s%s of %s %s.", + ss.print(" resolved method '%s%s", resolved_method->is_abstract() ? "abstract " : "", - resolved_method->is_private() ? "private " : "", - resolved_method->name()->as_C_string(), - resolved_method->signature()->as_C_string(), + resolved_method->is_private() ? "private " : ""); + resolved_method->signature()->print_as_signature_external_return_type(&ss); + ss.print(" %s(", resolved_method->name()->as_C_string()); + resolved_method->signature()->print_as_signature_external_parameters(&ss); + ss.print(")' of %s %s.", resolved_klass->external_kind(), resolved_klass->external_name()); if (selected_method.not_null() && !(resolved_method == selected_method)) { - ss.print(" Selected method is %s%s%s.", + ss.print(" Selected method is '%s%s", selected_method->is_abstract() ? "abstract " : "", - selected_method->is_private() ? "private " : "", - selected_method->name_and_sig_as_C_string()); + selected_method->is_private() ? "private " : ""); + selected_method->print_external_name(&ss); + ss.print("'."); } THROW_MSG(vmSymbols::java_lang_AbstractMethodError(), ss.as_string()); diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/interpreter/linkResolver.hpp openjdk-lts-11.0.4+11/src/hotspot/share/interpreter/linkResolver.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/interpreter/linkResolver.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/interpreter/linkResolver.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -184,7 +184,6 @@ methodHandle current_method() const { return _current_method; } constantTag tag() const { return _tag; } bool check_access() const { return _check_access; } - char* method_string() const; void print() PRODUCT_RETURN; }; diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/dcmd/jfrDcmds.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/dcmd/jfrDcmds.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/dcmd/jfrDcmds.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/dcmd/jfrDcmds.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -544,12 +544,12 @@ bool heap) : DCmdWithParser(output, heap), _repository_path("repositorypath", "Path to repository,.e.g \\\"My Repository\\\"", "STRING", false, NULL), _dump_path("dumppath", "Path to dump,.e.g \\\"My Dump path\\\"", "STRING", false, NULL), - _stack_depth("stackdepth", "Stack Depth", "JLONG", false, "64"), - _global_buffer_count("globalbuffercount", "Number of global buffers,", "JLONG", false, "32"), - _global_buffer_size("globalbuffersize", "Size of a global buffers,", "JLONG", false, "524288"), - _thread_buffer_size("thread_buffer_size", "Size of a thread buffer", "JLONG", false, "8192"), - _memory_size("memorysize", "Overall memory size, ", "JLONG", false, "16777216"), - _max_chunk_size("maxchunksize", "Size of an individual disk chunk", "JLONG", false, "12582912"), + _stack_depth("stackdepth", "Stack Depth", "JULONG", false, "64"), + _global_buffer_count("globalbuffercount", "Number of global buffers,", "JULONG", false, "20"), + _global_buffer_size("globalbuffersize", "Size of a global buffers,", "MEMORY SIZE", false, "512k"), + _thread_buffer_size("thread_buffer_size", "Size of a thread buffer", "MEMORY SIZE", false, "8k"), + _memory_size("memorysize", "Overall memory size, ", "MEMORY SIZE", false, "10m"), + _max_chunk_size("maxchunksize", "Size of an individual disk chunk", "MEMORY SIZE", false, "12m"), _sample_threads("samplethreads", "Activate Thread sampling", "BOOLEAN", false, "true") { _dcmdparser.add_dcmd_option(&_repository_path); _dcmdparser.add_dcmd_option(&_dump_path); @@ -612,22 +612,22 @@ jobject global_buffer_size = NULL; if (_global_buffer_size.is_set()) { - global_buffer_size = JfrJavaSupport::new_java_lang_Long(_global_buffer_size.value(), CHECK); + global_buffer_size = JfrJavaSupport::new_java_lang_Long(_global_buffer_size.value()._size, CHECK); } jobject thread_buffer_size = NULL; if (_thread_buffer_size.is_set()) { - thread_buffer_size = JfrJavaSupport::new_java_lang_Long(_thread_buffer_size.value(), CHECK); + thread_buffer_size = JfrJavaSupport::new_java_lang_Long(_thread_buffer_size.value()._size, CHECK); } jobject max_chunk_size = NULL; if (_max_chunk_size.is_set()) { - max_chunk_size = JfrJavaSupport::new_java_lang_Long(_max_chunk_size.value(), CHECK); + max_chunk_size = JfrJavaSupport::new_java_lang_Long(_max_chunk_size.value()._size, CHECK); } jobject memory_size = NULL; if (_memory_size.is_set()) { - memory_size = JfrJavaSupport::new_java_lang_Long(_memory_size.value(), CHECK); + memory_size = JfrJavaSupport::new_java_lang_Long(_memory_size.value()._size, CHECK); } jobject sample_threads = NULL; diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/dcmd/jfrDcmds.hpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/dcmd/jfrDcmds.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/dcmd/jfrDcmds.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/dcmd/jfrDcmds.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -145,10 +145,10 @@ DCmdArgument _dump_path; DCmdArgument _stack_depth; DCmdArgument _global_buffer_count; - DCmdArgument _global_buffer_size; - DCmdArgument _thread_buffer_size; - DCmdArgument _memory_size; - DCmdArgument _max_chunk_size; + DCmdArgument _global_buffer_size; + DCmdArgument _thread_buffer_size; + DCmdArgument _memory_size; + DCmdArgument _max_chunk_size; DCmdArgument _sample_threads; public: diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/jni/jfrJniMethod.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/jni/jfrJniMethod.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/jni/jfrJniMethod.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/jni/jfrJniMethod.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -33,7 +33,7 @@ #include "jfr/recorder/checkpoint/jfrMetadataEvent.hpp" #include "jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp" #include "jfr/recorder/repository/jfrRepository.hpp" -#include "jfr/recorder/repository/jfrChunkSizeNotifier.hpp" +#include "jfr/recorder/repository/jfrChunkRotation.hpp" #include "jfr/recorder/repository/jfrChunkWriter.hpp" #include "jfr/recorder/service/jfrOptionSet.hpp" #include "jfr/recorder/stacktrace/jfrStackTraceRepository.hpp" @@ -114,7 +114,7 @@ NO_TRANSITION_END NO_TRANSITION(void, jfr_set_file_notification(JNIEnv* env, jobject jvm, jlong threshold)) - JfrChunkSizeNotifier::set_chunk_size_threshold((size_t)threshold); + JfrChunkRotation::set_threshold((intptr_t)threshold); NO_TRANSITION_END NO_TRANSITION(void, jfr_set_sample_threads(JNIEnv* env, jobject jvm, jboolean sampleThreads)) @@ -173,6 +173,9 @@ return JfrEventSetting::set_cutoff(event_type_id, cutoff_ticks) ? JNI_TRUE : JNI_FALSE; NO_TRANSITION_END +NO_TRANSITION(jboolean, jfr_should_rotate_disk(JNIEnv* env, jobject jvm)) + return JfrChunkRotation::should_rotate() ? JNI_TRUE : JNI_FALSE; +NO_TRANSITION_END /* * JVM_ENTRY_NO_ENV entries diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/jni/jfrJniMethod.hpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/jni/jfrJniMethod.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/jni/jfrJniMethod.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/jni/jfrJniMethod.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -129,6 +129,9 @@ void JNICALL jfr_emit_old_object_samples(JNIEnv* env, jobject jvm, jlong cutoff_ticks, jboolean); +jboolean JNICALL jfr_should_rotate_disk(JNIEnv* env, jobject jvm); + + #ifdef __cplusplus } #endif diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/jni/jfrJniMethodRegistration.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/jni/jfrJniMethodRegistration.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/jni/jfrJniMethodRegistration.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/jni/jfrJniMethodRegistration.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -78,7 +78,8 @@ (char*)"setForceInstrumentation", (char*)"(Z)V", (void*)jfr_set_force_instrumentation, (char*)"getUnloadedEventClassCount", (char*)"()J", (void*)jfr_get_unloaded_event_classes_count, (char*)"setCutoff", (char*)"(JJ)Z", (void*)jfr_set_cutoff, - (char*)"emitOldObjectSamples", (char*)"(JZ)V", (void*)jfr_emit_old_object_samples + (char*)"emitOldObjectSamples", (char*)"(JZ)V", (void*)jfr_emit_old_object_samples, + (char*)"shouldRotateDisk", (char*)"()Z", (void*)jfr_should_rotate_disk }; const size_t method_array_length = sizeof(method) / sizeof(JNINativeMethod); diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/metadata/metadata.xml openjdk-lts-11.0.4+11/src/hotspot/share/jfr/metadata/metadata.xml --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/metadata/metadata.xml 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/metadata/metadata.xml 2019-05-03 00:43:26.000000000 +0000 @@ -607,7 +607,8 @@ - + + diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -78,6 +78,7 @@ event.set_jvmArguments(Arguments::jvm_args()); event.set_jvmFlags(Arguments::jvm_flags()); event.set_jvmStartTime(Management::vm_init_done_time()); + event.set_pid(os::current_process_id()); event.commit(); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/periodic/sampling/jfrCallTrace.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/periodic/sampling/jfrCallTrace.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/periodic/sampling/jfrCallTrace.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/periodic/sampling/jfrCallTrace.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ #include "code/nmethod.hpp" #include "code/pcDesc.hpp" #include "jfr/periodic/sampling/jfrCallTrace.hpp" +#include "jfr/utilities/jfrTypes.hpp" #include "oops/method.hpp" #include "runtime/javaCalls.hpp" #include "runtime/frame.inline.hpp" @@ -37,7 +38,7 @@ assert(top_frame.cb() != NULL, "invariant"); RegisterMap map(_thread, false); frame candidate = top_frame; - for (int i = 0; i < MaxJavaStackTraceDepth * 2; ++i) { + for (u4 i = 0; i < MAX_STACK_DEPTH * 2; ++i) { if (candidate.is_entry_frame()) { JavaCallWrapper *jcw = candidate.entry_frame_call_wrapper_if_safe(_thread); if (jcw == NULL || jcw->is_first_frame()) { diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2019, 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 @@ -136,6 +136,8 @@ void JfrCheckpointManager::register_full(BufferPtr t, Thread* thread) { // nothing here at the moment + assert(t != NULL, "invariant"); + assert(t->acquired_by(thread), "invariant"); assert(t->retired(), "invariant"); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointWriter.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointWriter.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointWriter.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointWriter.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -44,13 +44,13 @@ } } -static void write_checkpoint_header(u1* pos, jlong size, jlong time, bool flushpoint, juint type_count) { +static void write_checkpoint_header(u1* pos, int64_t size, jlong time, bool flushpoint, u4 type_count) { assert(pos != NULL, "invariant"); JfrBigEndianWriter be_writer(pos, sizeof(JfrCheckpointEntry)); be_writer.write(size); be_writer.write(time); be_writer.write(JfrTicks::now().value() - time); - be_writer.write(flushpoint ? (juint)1 : (juint)0); + be_writer.write(flushpoint ? (u4)1 : (u4)0); be_writer.write(type_count); assert(be_writer.is_valid(), "invariant"); } @@ -71,7 +71,7 @@ assert(this->is_valid(), "invariant"); assert(count() > 0, "invariant"); assert(this->used_size() > sizeof(JfrCheckpointEntry), "invariant"); - const jlong size = this->current_offset(); + const int64_t size = this->current_offset(); assert(size + this->start_pos() == this->current_pos(), "invariant"); write_checkpoint_header(const_cast(this->start_pos()), size, _time, is_flushpoint(), count()); release(); @@ -85,11 +85,11 @@ return _flushpoint; } -juint JfrCheckpointWriter::count() const { +u4 JfrCheckpointWriter::count() const { return _count; } -void JfrCheckpointWriter::set_count(juint count) { +void JfrCheckpointWriter::set_count(u4 count) { _count = count; } @@ -111,7 +111,7 @@ } void JfrCheckpointWriter::write_key(u8 key) { - write(key); + write(key); } void JfrCheckpointWriter::increment() { @@ -119,10 +119,10 @@ } void JfrCheckpointWriter::write_count(u4 nof_entries) { - write((u4)nof_entries); + write(nof_entries); } -void JfrCheckpointWriter::write_count(u4 nof_entries, jlong offset) { +void JfrCheckpointWriter::write_count(u4 nof_entries, int64_t offset) { write_padded_at_offset(nof_entries, offset); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointWriter.hpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointWriter.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointWriter.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointWriter.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -49,21 +49,21 @@ typedef EventWriterHost JfrCheckpointWriterBase; struct JfrCheckpointContext { - jlong offset; - juint count; + int64_t offset; + u4 count; }; class JfrCheckpointWriter : public JfrCheckpointWriterBase { friend class JfrSerializerRegistration; private: JfrTicks _time; - jlong _offset; - juint _count; + int64_t _offset; + u4 _count; bool _flushpoint; bool _header; - juint count() const; - void set_count(juint count); + u4 count() const; + void set_count(u4 count); void increment(); void set_flushpoint(bool flushpoint); bool is_flushpoint() const; @@ -75,7 +75,7 @@ ~JfrCheckpointWriter(); void write_type(JfrTypeId type_id); void write_count(u4 nof_entries); - void write_count(u4 nof_entries, jlong offset); + void write_count(u4 nof_entries, int64_t offset); void write_key(u8 key); const JfrCheckpointContext context() const; void set_context(const JfrCheckpointContext ctx); diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -65,7 +65,7 @@ private: JfrCheckpointWriter& _writer; JfrCheckpointContext _ctx; - const intptr_t _count_position; + const int64_t _count_position; Thread* const _curthread; u4 _count; diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSetWriter.hpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSetWriter.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSetWriter.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSetWriter.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -35,7 +35,7 @@ WriterImpl _impl; JfrCheckpointWriter* _writer; JfrCheckpointContext _ctx; - jlong _count_offset; + int64_t _count_offset; int _count; bool _skip_header; public: diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrChunkRotation.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrChunkRotation.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrChunkRotation.cpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrChunkRotation.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2012, 2018, 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 "jfr/jni/jfrJavaSupport.hpp" +#include "jfr/recorder/repository/jfrChunkRotation.hpp" +#include "jfr/recorder/repository/jfrChunkWriter.hpp" + +static jobject chunk_monitor = NULL; +static intptr_t threshold = 0; +static bool rotate = false; + +static jobject install_chunk_monitor(Thread* thread) { + assert(chunk_monitor == NULL, "invariant"); + // read static field + HandleMark hm(thread); + static const char klass[] = "jdk/jfr/internal/JVM"; + static const char field[] = "FILE_DELTA_CHANGE"; + static const char signature[] = "Ljava/lang/Object;"; + JavaValue result(T_OBJECT); + JfrJavaArguments field_args(&result, klass, field, signature, thread); + JfrJavaSupport::get_field_global_ref(&field_args, thread); + chunk_monitor = result.get_jobject(); + return chunk_monitor; +} + +// lazy install +static jobject get_chunk_monitor(Thread* thread) { + return chunk_monitor != NULL ? chunk_monitor : install_chunk_monitor(thread); +} + +static void notify() { + Thread* const thread = Thread::current(); + JfrJavaSupport::notify_all(get_chunk_monitor(thread), thread); +} + +void JfrChunkRotation::evaluate(const JfrChunkWriter& writer) { + assert(threshold > 0, "invariant"); + if (rotate) { + // already in progress + return; + } + assert(!rotate, "invariant"); + if (writer.size_written() > threshold) { + rotate = true; + notify(); + } +} + +bool JfrChunkRotation::should_rotate() { + return rotate; +} + +void JfrChunkRotation::on_rotation() { + rotate = false; +} + +void JfrChunkRotation::set_threshold(intptr_t bytes) { + threshold = bytes; +} diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrChunkRotation.hpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrChunkRotation.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrChunkRotation.hpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrChunkRotation.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef SHARE_VM_JFR_RECORDER_REPOSITORY_JFRCHUNKROTATION_HPP +#define SHARE_VM_JFR_RECORDER_REPOSITORY_JFRCHUNKROTATION_HPP + +#include "memory/allocation.hpp" + +class JfrChunkWriter; + +// +// Responsible for notifications about current chunk size now exceeding threshold. +// This is a means to initiate a chunk rotation on the basis of the size written. +// +class JfrChunkRotation : AllStatic { + public: + static void evaluate(const JfrChunkWriter& writer); + static void set_threshold(intptr_t bytes); + static bool should_rotate(); + static void on_rotation(); +}; + +#endif // SHARE_VM_JFR_RECORDER_REPOSITORY_JFRCHUNKROTATION_HPP diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrChunkSizeNotifier.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrChunkSizeNotifier.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrChunkSizeNotifier.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrChunkSizeNotifier.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2012, 2018, 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 "jfr/jni/jfrJavaSupport.hpp" -#include "jfr/recorder/repository/jfrChunkWriter.hpp" -#include "jfr/recorder/repository/jfrChunkSizeNotifier.hpp" - -size_t JfrChunkSizeNotifier::_chunk_size_threshold = 0; - -void JfrChunkSizeNotifier::set_chunk_size_threshold(size_t bytes) { - _chunk_size_threshold = bytes; -} - -size_t JfrChunkSizeNotifier::chunk_size_threshold() { - return _chunk_size_threshold; -} - -static jobject new_chunk_monitor = NULL; - -// lazy install -static jobject get_new_chunk_monitor(Thread* thread) { - static bool initialized = false; - if (initialized) { - assert(new_chunk_monitor != NULL, "invariant"); - return new_chunk_monitor; - } - assert(new_chunk_monitor == NULL, "invariant"); - // read static field - HandleMark hm(thread); - static const char klass[] = "jdk/jfr/internal/JVM"; - static const char field[] = "FILE_DELTA_CHANGE"; - static const char signature[] = "Ljava/lang/Object;"; - JavaValue result(T_OBJECT); - JfrJavaArguments field_args(&result, klass, field, signature, thread); - JfrJavaSupport::get_field_global_ref(&field_args, thread); - new_chunk_monitor = result.get_jobject(); - initialized = new_chunk_monitor != NULL; - return new_chunk_monitor; -} - -void JfrChunkSizeNotifier::notify() { - Thread* const thread = Thread::current(); - JfrJavaSupport::notify_all(get_new_chunk_monitor(thread), thread); -} - -void JfrChunkSizeNotifier::release_monitor() { - if (new_chunk_monitor != NULL) { - JfrJavaSupport::destroy_global_jni_handle(new_chunk_monitor); - new_chunk_monitor = NULL; - } -} diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrChunkSizeNotifier.hpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrChunkSizeNotifier.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrChunkSizeNotifier.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrChunkSizeNotifier.hpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#ifndef SHARE_VM_JFR_RECORDER_REPOSITORY_JFRRCHUNKSIZENOTIFIER_HPP -#define SHARE_VM_JFR_RECORDER_REPOSITORY_JFRRCHUNKSIZENOTIFIER_HPP - -#include "memory/allocation.hpp" - -// -// Responsible for notifications about current chunk size now exceeding threshold. -// This is a means to initiate a chunk rotation on the basis of size written. -// -class JfrChunkSizeNotifier : AllStatic { - friend class JfrRecorder; - private: - static size_t _chunk_size_threshold; - static void release_monitor(); - public: - static void set_chunk_size_threshold(size_t bytes); - static size_t chunk_size_threshold(); - static void notify(); -}; - -#endif // SHARE_VM_JFR_RECORDER_REPOSITORY_JFRRCHUNKSIZENOTIFIER_HPP diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrChunkState.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrChunkState.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrChunkState.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrChunkState.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -53,19 +53,19 @@ set_previous_checkpoint_offset(0); } -void JfrChunkState::set_previous_checkpoint_offset(jlong offset) { +void JfrChunkState::set_previous_checkpoint_offset(int64_t offset) { _previous_checkpoint_offset = offset; } -jlong JfrChunkState::previous_checkpoint_offset() const { +int64_t JfrChunkState::previous_checkpoint_offset() const { return _previous_checkpoint_offset; } -jlong JfrChunkState::previous_start_ticks() const { +int64_t JfrChunkState::previous_start_ticks() const { return _previous_start_ticks; } -jlong JfrChunkState::previous_start_nanos() const { +int64_t JfrChunkState::previous_start_nanos() const { return _previous_start_nanos; } @@ -92,7 +92,7 @@ save_current_and_update_start_ticks(); } -jlong JfrChunkState::last_chunk_duration() const { +int64_t JfrChunkState::last_chunk_duration() const { return _start_nanos - _previous_start_nanos; } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrChunkState.hpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrChunkState.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrChunkState.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrChunkState.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -25,7 +25,6 @@ #ifndef SHARE_VM_JFR_RECORDER_REPOSITORY_JFRRCHUNKSTATE_HPP #define SHARE_VM_JFR_RECORDER_REPOSITORY_JFRRCHUNKSTATE_HPP -#include "jni.h" #include "jfr/utilities/jfrAllocation.hpp" #include "jfr/utilities/jfrTypes.hpp" @@ -33,11 +32,11 @@ friend class JfrChunkWriter; private: char* _path; - jlong _start_ticks; - jlong _start_nanos; - jlong _previous_start_ticks; - jlong _previous_start_nanos; - jlong _previous_checkpoint_offset; + int64_t _start_ticks; + int64_t _start_nanos; + int64_t _previous_start_ticks; + int64_t _previous_start_nanos; + int64_t _previous_checkpoint_offset; void update_start_ticks(); void update_start_nanos(); @@ -47,11 +46,11 @@ JfrChunkState(); ~JfrChunkState(); void reset(); - jlong previous_checkpoint_offset() const; - void set_previous_checkpoint_offset(jlong offset); - jlong previous_start_ticks() const; - jlong previous_start_nanos() const; - jlong last_chunk_duration() const; + int64_t previous_checkpoint_offset() const; + void set_previous_checkpoint_offset(int64_t offset); + int64_t previous_start_ticks() const; + int64_t previous_start_nanos() const; + int64_t last_chunk_duration() const; void update_time_to_now(); void set_path(const char* path); const char* path() const; diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -32,9 +32,8 @@ #include "runtime/os.hpp" #include "runtime/os.inline.hpp" -const u2 JFR_VERSION_MAJOR = 2; -const u2 JFR_VERSION_MINOR = 0; - +static const u2 JFR_VERSION_MAJOR = 2; +static const u2 JFR_VERSION_MINOR = 0; static const size_t MAGIC_LEN = 4; static const size_t FILEHEADER_SLOT_SIZE = 8; static const size_t CHUNK_SIZE_OFFSET = 8; @@ -79,14 +78,14 @@ return is_open; } -size_t JfrChunkWriter::close(intptr_t metadata_offset) { +size_t JfrChunkWriter::close(int64_t metadata_offset) { write_header(metadata_offset); this->flush(); this->close_fd(); - return size_written(); + return (size_t)size_written(); } -void JfrChunkWriter::write_header(intptr_t metadata_offset) { +void JfrChunkWriter::write_header(int64_t metadata_offset) { assert(this->is_valid(), "invariant"); // Chunk size this->write_be_at_offset(size_written(), CHUNK_SIZE_OFFSET); @@ -106,15 +105,15 @@ _chunkstate->set_path(chunk_path); } -intptr_t JfrChunkWriter::size_written() const { +int64_t JfrChunkWriter::size_written() const { return this->is_valid() ? this->current_offset() : 0; } -intptr_t JfrChunkWriter::previous_checkpoint_offset() const { +int64_t JfrChunkWriter::previous_checkpoint_offset() const { return _chunkstate->previous_checkpoint_offset(); } -void JfrChunkWriter::set_previous_checkpoint_offset(intptr_t offset) { +void JfrChunkWriter::set_previous_checkpoint_offset(int64_t offset) { _chunkstate->set_previous_checkpoint_offset(offset); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.hpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -41,16 +41,16 @@ JfrChunkState* _chunkstate; bool open(); - size_t close(intptr_t metadata_offset); - void write_header(intptr_t metadata_offset); + size_t close(int64_t metadata_offset); + void write_header(int64_t metadata_offset); void set_chunk_path(const char* chunk_path); public: JfrChunkWriter(); bool initialize(); - intptr_t size_written() const; - intptr_t previous_checkpoint_offset() const; - void set_previous_checkpoint_offset(intptr_t offset); + int64_t size_written() const; + int64_t previous_checkpoint_offset() const; + void set_previous_checkpoint_offset(int64_t offset); void time_stamp_chunk_now(); }; diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrRepository.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrRepository.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrRepository.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrRepository.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -147,10 +147,10 @@ iso8601_to_date_time(buffer); } -static jlong file_size(fio_fd fd) { +static int64_t file_size(fio_fd fd) { assert(fd != invalid_fd, "invariant"); - const jlong current_offset = os::current_file_offset(fd); - const jlong size = os::lseek(fd, 0, SEEK_END); + const int64_t current_offset = os::current_file_offset(fd); + const int64_t size = os::lseek(fd, 0, SEEK_END); os::seek_to_file_offset(fd, current_offset); return size; } @@ -219,7 +219,7 @@ if (invalid_fd == entry_fd) { return NULL; } - const jlong entry_size = file_size(entry_fd); + const int64_t entry_size = file_size(entry_fd); os::close(entry_fd); if (0 == entry_size) { return NULL; @@ -241,11 +241,7 @@ return; } struct dirent* dentry; - char* dir_buffer = NEW_RESOURCE_ARRAY_RETURN_NULL(char, os::readdir_buf_size(_repo)); - if (dir_buffer == NULL) { - return; - } - while ((dentry = os::readdir(dirp, (struct dirent*)dir_buffer)) != NULL) { + while ((dentry = os::readdir(dirp)) != NULL) { const char* const entry_path = filter(dentry->d_name); if (NULL != entry_path) { _files->append(entry_path); @@ -265,6 +261,7 @@ } } #endif + bool RepositoryIterator::has_next() const { return (_files != NULL && _iterator < _files->length()); } @@ -280,21 +277,27 @@ if (file_copy_block == NULL) { return; } - jlong bytes_written_total = 0; + int64_t bytes_written_total = 0; while (iterator.has_next()) { fio_fd current_fd = invalid_fd; const char* const fqn = iterator.next(); if (fqn != NULL) { current_fd = open_existing(fqn); if (current_fd != invalid_fd) { - const jlong current_filesize = file_size(current_fd); + const int64_t current_filesize = file_size(current_fd); assert(current_filesize > 0, "invariant"); - jlong bytes_read = 0; - jlong bytes_written = 0; + int64_t bytes_read = 0; + int64_t bytes_written = 0; while (bytes_read < current_filesize) { - bytes_read += (jlong)os::read_at(current_fd, file_copy_block, size_of_file_copy_block, bytes_read); - assert(bytes_read - bytes_written <= (jlong)size_of_file_copy_block, "invariant"); - bytes_written += (jlong)os::write(emergency_fd, file_copy_block, bytes_read - bytes_written); + const ssize_t read_result = os::read_at(current_fd, file_copy_block, size_of_file_copy_block, bytes_read); + if (-1 == read_result) { + log_info(jfr) ( // For user, should not be "jfr, system" + "Unable to recover JFR data"); + break; + } + bytes_read += (int64_t)read_result; + assert(bytes_read - bytes_written <= (int64_t)size_of_file_copy_block, "invariant"); + bytes_written += (int64_t)os::write(emergency_fd, file_copy_block, bytes_read - bytes_written); assert(bytes_read == bytes_written, "invariant"); } os::close(current_fd); @@ -475,6 +478,6 @@ return _chunkwriter->open(); } -size_t JfrRepository::close_chunk(jlong metadata_offset) { +size_t JfrRepository::close_chunk(int64_t metadata_offset) { return _chunkwriter->close(metadata_offset); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrRepository.hpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrRepository.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/repository/jfrRepository.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/repository/jfrRepository.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -55,7 +55,7 @@ bool set_path(const char* path); void set_chunk_path(const char* path); bool open_chunk(bool vm_error = false); - size_t close_chunk(jlong metadata_offset); + size_t close_chunk(int64_t metadata_offset); void on_vm_error(); static void notify_on_new_chunk_path(); static JfrChunkWriter& chunkwriter(); diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ #include "jfr/recorder/service/jfrMemorySizer.hpp" #include "jfr/recorder/service/jfrOptionSet.hpp" #include "jfr/utilities/jfrAllocation.hpp" +#include "jfr/utilities/jfrTypes.hpp" #include "logging/log.hpp" #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" @@ -106,10 +107,6 @@ return _stack_depth; } -static const u4 STACK_DEPTH_DEFAULT = 64; -static const u4 MIN_STACK_DEPTH = 1; -static const u4 MAX_STACK_DEPTH = 2048; - void JfrOptionSet::set_stackdepth(u4 depth) { if (depth < MIN_STACK_DEPTH) { _stack_depth = MIN_STACK_DEPTH; @@ -352,19 +349,19 @@ configure._stack_depth.set_value(_dcmd_stackdepth.value()); configure._thread_buffer_size.set_is_set(_dcmd_threadbuffersize.is_set()); - configure._thread_buffer_size.set_value(_dcmd_threadbuffersize.value()._size); + configure._thread_buffer_size.set_value(_dcmd_threadbuffersize.value()); configure._global_buffer_count.set_is_set(_dcmd_numglobalbuffers.is_set()); configure._global_buffer_count.set_value(_dcmd_numglobalbuffers.value()); configure._global_buffer_size.set_is_set(_dcmd_globalbuffersize.is_set()); - configure._global_buffer_size.set_value(_dcmd_globalbuffersize.value()._size); + configure._global_buffer_size.set_value(_dcmd_globalbuffersize.value()); configure._max_chunk_size.set_is_set(_dcmd_maxchunksize.is_set()); - configure._max_chunk_size.set_value(_dcmd_maxchunksize.value()._size); + configure._max_chunk_size.set_value(_dcmd_maxchunksize.value()); configure._memory_size.set_is_set(_dcmd_memorysize.is_set()); - configure._memory_size.set_value(_dcmd_memorysize.value()._size); + configure._memory_size.set_value(_dcmd_memorysize.value()); configure._sample_threads.set_is_set(_dcmd_sample_threads.is_set()); configure._sample_threads.set_value(_dcmd_sample_threads.value()); diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -28,7 +28,7 @@ #include "jfr/recorder/jfrRecorder.hpp" #include "jfr/recorder/checkpoint/jfrCheckpointManager.hpp" #include "jfr/recorder/checkpoint/jfrMetadataEvent.hpp" -#include "jfr/recorder/repository/jfrChunkSizeNotifier.hpp" +#include "jfr/recorder/repository/jfrChunkRotation.hpp" #include "jfr/recorder/repository/jfrChunkWriter.hpp" #include "jfr/recorder/repository/jfrRepository.hpp" #include "jfr/recorder/service/jfrPostBox.hpp" @@ -130,18 +130,18 @@ bool not_acquired() const { return !_acquired; } }; -static intptr_t write_checkpoint_event_prologue(JfrChunkWriter& cw, u8 type_id) { - const intptr_t prev_cp_offset = cw.previous_checkpoint_offset(); - const intptr_t prev_cp_relative_offset = 0 == prev_cp_offset ? 0 : prev_cp_offset - cw.current_offset(); +static int64_t write_checkpoint_event_prologue(JfrChunkWriter& cw, u8 type_id) { + const int64_t prev_cp_offset = cw.previous_checkpoint_offset(); + const int64_t prev_cp_relative_offset = 0 == prev_cp_offset ? 0 : prev_cp_offset - cw.current_offset(); cw.reserve(sizeof(u4)); cw.write(EVENT_CHECKPOINT); cw.write(JfrTicks::now()); - cw.write((jlong)0); + cw.write((int64_t)0); cw.write(prev_cp_relative_offset); // write previous checkpoint offset delta cw.write(false); // flushpoint - cw.write((u4)1); // nof types in this checkpoint - cw.write(type_id); - const intptr_t number_of_elements_offset = cw.current_offset(); + cw.write((u4)1); // nof types in this checkpoint + cw.write(type_id); + const int64_t number_of_elements_offset = cw.current_offset(); cw.reserve(sizeof(u4)); return number_of_elements_offset; } @@ -161,8 +161,8 @@ } bool process() { // current_cp_offset is also offset for the event size header field - const intptr_t current_cp_offset = _cw.current_offset(); - const intptr_t num_elements_offset = write_checkpoint_event_prologue(_cw, _type_id); + const int64_t current_cp_offset = _cw.current_offset(); + const int64_t num_elements_offset = write_checkpoint_event_prologue(_cw, _type_id); // invocation _content_functor.process(); const u4 number_of_elements = (u4)_content_functor.processed(); @@ -340,6 +340,7 @@ void JfrRecorderService::open_new_chunk(bool vm_error) { assert(!_chunkwriter.is_valid(), "invariant"); assert(!JfrStream_lock->owned_by_self(), "invariant"); + JfrChunkRotation::on_rotation(); MutexLockerEx stream_lock(JfrStream_lock, Mutex::_no_safepoint_check_flag); if (!_repository.open_chunk(vm_error)) { assert(!_chunkwriter.is_valid(), "invariant"); @@ -467,9 +468,9 @@ JfrMetadataEvent::lock(); } -static jlong write_metadata_event(JfrChunkWriter& chunkwriter) { +static int64_t write_metadata_event(JfrChunkWriter& chunkwriter) { assert(chunkwriter.is_valid(), "invariant"); - const jlong metadata_offset = chunkwriter.current_offset(); + const int64_t metadata_offset = chunkwriter.current_offset(); JfrMetadataEvent::write(chunkwriter, metadata_offset); return metadata_offset; } @@ -535,8 +536,5 @@ } void JfrRecorderService::evaluate_chunk_size_for_rotation() { - const size_t size_written = _chunkwriter.size_written(); - if (size_written > JfrChunkSizeNotifier::chunk_size_threshold()) { - JfrChunkSizeNotifier::notify(); - } + JfrChunkRotation::evaluate(_chunkwriter); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/stacktrace/jfrStackTraceRepository.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/stacktrace/jfrStackTraceRepository.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/stacktrace/jfrStackTraceRepository.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/stacktrace/jfrStackTraceRepository.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -69,8 +69,8 @@ } // handle general case - int loop_count = 0; - int loop_max = MaxJavaStackTraceDepth * 2; + u4 loop_count = 0; + u4 loop_max = MAX_STACK_DEPTH * 2; do { loop_count++; // By the time we get here we should never see unsafe but better safe then segv'd diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/storage/jfrBuffer.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/storage/jfrBuffer.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/storage/jfrBuffer.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/storage/jfrBuffer.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2019, 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 @@ -136,6 +136,14 @@ _identity = NULL; } +bool JfrBuffer::acquired_by(const void* id) const { + return identity() == id; +} + +bool JfrBuffer::acquired_by_self() const { + return acquired_by(Thread::current()); +} + #ifdef ASSERT static bool validate_to(const JfrBuffer* const to, size_t size) { assert(to != NULL, "invariant"); @@ -153,10 +161,6 @@ assert(t->top() + size <= t->pos(), "invariant"); return true; } - -bool JfrBuffer::acquired_by_self() const { - return identity() == Thread::current(); -} #endif // ASSERT void JfrBuffer::move(JfrBuffer* const to, size_t size) { @@ -183,7 +187,6 @@ set_concurrent_top(start()); } -// flags enum FLAG { RETIRED = 1, TRANSIENT = 2, diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/storage/jfrBuffer.hpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/storage/jfrBuffer.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/storage/jfrBuffer.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/storage/jfrBuffer.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -57,7 +57,6 @@ u4 _size; const u1* stable_top() const; - void clear_flags(); public: JfrBuffer(); @@ -150,6 +149,8 @@ void acquire(const void* id); bool try_acquire(const void* id); + bool acquired_by(const void* id) const; + bool acquired_by_self() const; void release(); void move(JfrBuffer* const to, size_t size); @@ -166,8 +167,6 @@ bool retired() const; void set_retired(); void clear_retired(); - - debug_only(bool acquired_by_self() const;) }; class JfrAgeNode : public JfrBuffer { diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/storage/jfrMemorySpace.inline.hpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/storage/jfrMemorySpace.inline.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/storage/jfrMemorySpace.inline.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/storage/jfrMemorySpace.inline.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -346,19 +346,19 @@ template inline bool ReleaseOp::process(typename Mspace::Type* t) { assert(t != NULL, "invariant"); - if (t->retired() || t->try_acquire(_thread)) { - if (t->transient()) { - if (_release_full) { - mspace_release_full_critical(t, _mspace); - } else { - mspace_release_free_critical(t, _mspace); - } - return true; + // assumes some means of exclusive access to t + if (t->transient()) { + if (_release_full) { + mspace_release_full_critical(t, _mspace); + } else { + mspace_release_free_critical(t, _mspace); } - t->reinitialize(); - assert(t->empty(), "invariant"); - t->release(); // publish + return true; } + t->reinitialize(); + assert(t->empty(), "invariant"); + assert(!t->retired(), "invariant"); + t->release(); // publish return true; } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/storage/jfrStorage.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/storage/jfrStorage.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/storage/jfrStorage.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/storage/jfrStorage.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -339,9 +339,9 @@ void JfrStorage::register_full(BufferPtr buffer, Thread* thread) { assert(buffer != NULL, "invariant"); assert(buffer->retired(), "invariant"); + assert(buffer->acquired_by(thread), "invariant"); if (!full_buffer_registration(buffer, _age_mspace, control(), thread)) { handle_registration_failure(buffer); - buffer->release(); } if (control().should_post_buffer_full_message()) { _post_box.post(MSG_FULLBUFFER); @@ -376,8 +376,8 @@ } } assert(buffer->empty(), "invariant"); + assert(buffer->identity() != NULL, "invariant"); control().increment_dead(); - buffer->release(); buffer->set_retired(); } @@ -738,13 +738,14 @@ Scavenger(JfrStorageControl& control, Mspace* mspace) : _control(control), _mspace(mspace), _count(0), _amount(0) {} bool process(Type* t) { if (t->retired()) { + assert(t->identity() != NULL, "invariant"); + assert(t->empty(), "invariant"); assert(!t->transient(), "invariant"); assert(!t->lease(), "invariant"); - assert(t->empty(), "invariant"); - assert(t->identity() == NULL, "invariant"); ++_count; _amount += t->total_size(); t->clear_retired(); + t->release(); _control.decrement_dead(); mspace_release_full_critical(t, _mspace); } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/storage/jfrStorageUtils.hpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/storage/jfrStorageUtils.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/storage/jfrStorageUtils.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/storage/jfrStorageUtils.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -92,7 +92,6 @@ size_t processed() const { return ConcurrentWriteOp::processed(); } }; - template class MutexedWriteOp { private: @@ -104,6 +103,15 @@ size_t processed() const { return _operation.processed(); } }; +template +class ExclusiveOp : private MutexedWriteOp { + public: + typedef typename Operation::Type Type; + ExclusiveOp(Operation& operation) : MutexedWriteOp(operation) {} + bool process(Type* t); + size_t processed() const { return MutexedWriteOp::processed(); } +}; + enum jfr_operation_mode { mutexed = 1, concurrent diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/storage/jfrStorageUtils.inline.hpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/storage/jfrStorageUtils.inline.hpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/storage/jfrStorageUtils.inline.hpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/storage/jfrStorageUtils.inline.hpp 2019-05-03 00:43:26.000000000 +0000 @@ -26,6 +26,7 @@ #define SHARE_VM_JFR_RECORDER_STORAGE_JFRSTORAGEUTILS_INLINE_HPP #include "jfr/recorder/storage/jfrStorageUtils.hpp" +#include "runtime/thread.inline.hpp" template inline bool UnBufferedWriteToChunk::write(T* t, const u1* data, size_t size) { @@ -75,6 +76,28 @@ return result; } +template +static void retired_sensitive_acquire(Type* t) { + assert(t != NULL, "invariant"); + if (t->retired()) { + return; + } + Thread* const thread = Thread::current(); + while (!t->try_acquire(thread)) { + if (t->retired()) { + return; + } + } +} + +template +inline bool ExclusiveOp::process(typename Operation::Type* t) { + retired_sensitive_acquire(t); + assert(t->acquired_by_self() || t->retired(), "invariant"); + // User is required to ensure proper release of the acquisition + return MutexedWriteOp::process(t); +} + template inline bool DiscardOp::process(typename Operation::Type* t) { assert(t != NULL, "invariant"); diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/stringpool/jfrStringPoolBuffer.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/stringpool/jfrStringPoolBuffer.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/stringpool/jfrStringPoolBuffer.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/stringpool/jfrStringPoolBuffer.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,11 +29,9 @@ void JfrStringPoolBuffer::reinitialize() { assert(acquired_by_self() || retired(), "invariant"); - concurrent_top(); - set_pos((start())); set_string_pos(0); set_string_top(0); - set_concurrent_top(start()); + JfrBuffer::reinitialize(); } uint64_t JfrStringPoolBuffer::string_pos() const { @@ -57,7 +55,7 @@ } void JfrStringPoolBuffer::increment(uint64_t value) { - assert(acquired_by_self() || retired(), "invariant"); + assert(acquired_by_self(), "invariant"); ++_string_count_pos; } diff -Nru openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/stringpool/jfrStringPool.cpp openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/stringpool/jfrStringPool.cpp --- openjdk-lts-11.0.3+7/src/hotspot/share/jfr/recorder/stringpool/jfrStringPool.cpp 2019-04-03 01:25:37.000000000 +0000 +++ openjdk-lts-11.0.4+11/src/hotspot/share/jfr/recorder/stringpool/jfrStringPool.cpp 2019-05-03 00:43:26.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2019, 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 @@ -140,93 +140,76 @@ return current_epoch; } -class StringPoolWriteOp { +template