Mercurial > hg > icedtea8-forest > jdk
changeset 14932:56a21314ba4b
8257192: Integrate AArch64 JIT port into 8u
8163363: AArch64: Stack size in tools/launcher/Settings.java needs to be adjusted
8186090: java.nio.Bits.unaligned() doesn't handle aarch64
8215961: jdk/jfr/event/os/TestCPUInformation.java fails on AArch64
Reviewed-by: shade, aph
author | andrew |
---|---|
date | Mon, 01 Feb 2021 03:35:17 +0000 |
parents | c2ca20f62520 |
children | 09d51037f62f |
files | make/lib/SoundLibraries.gmk src/share/classes/java/nio/Bits.java src/share/classes/sun/security/provider/ByteArrayAccess.java src/share/native/com/sun/media/sound/SoundDefs.h src/solaris/bin/aarch64/jvm.cfg test/jdk/jfr/event/os/TestCPUInformation.java test/tools/launcher/Settings.java |
diffstat | 7 files changed, 59 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/make/lib/SoundLibraries.gmk Sat Dec 21 06:28:48 2019 +0800 +++ b/make/lib/SoundLibraries.gmk Mon Feb 01 03:35:17 2021 +0000 @@ -143,6 +143,10 @@ ifeq ($(OPENJDK_TARGET_CPU), ppc64le) LIBJSOUND_CFLAGS += -DX_ARCH=X_PPC64LE endif + + ifeq ($(OPENJDK_TARGET_CPU), aarch64) + LIBJSOUND_CFLAGS += -DX_ARCH=X_AARCH64 + endif endif LIBJSOUND_CFLAGS += -DEXTRA_SOUND_JNI_LIBS='"$(EXTRA_SOUND_JNI_LIBS)"'
--- a/src/share/classes/java/nio/Bits.java Sat Dec 21 06:28:48 2019 +0800 +++ b/src/share/classes/java/nio/Bits.java Mon Feb 01 03:35:17 2021 +0000 @@ -615,7 +615,8 @@ new sun.security.action.GetPropertyAction("os.arch")); unaligned = arch.equals("i386") || arch.equals("x86") || arch.equals("amd64") || arch.equals("x86_64") - || arch.equals("ppc64") || arch.equals("ppc64le"); + || arch.equals("ppc64") || arch.equals("ppc64le") + || arch.equals("aarch64"); unalignedKnown = true; return unaligned; }
--- a/src/share/classes/sun/security/provider/ByteArrayAccess.java Sat Dec 21 06:28:48 2019 +0800 +++ b/src/share/classes/sun/security/provider/ByteArrayAccess.java Mon Feb 01 03:35:17 2021 +0000 @@ -94,7 +94,8 @@ String arch = java.security.AccessController.doPrivileged (new sun.security.action.GetPropertyAction("os.arch", "")); return arch.equals("i386") || arch.equals("x86") || arch.equals("amd64") - || arch.equals("x86_64") || arch.equals("ppc64") || arch.equals("ppc64le"); + || arch.equals("x86_64") || arch.equals("ppc64") || arch.equals("ppc64le") + || arch.equals("aarch64"); } /**
--- a/src/share/native/com/sun/media/sound/SoundDefs.h Sat Dec 21 06:28:48 2019 +0800 +++ b/src/share/native/com/sun/media/sound/SoundDefs.h Mon Feb 01 03:35:17 2021 +0000 @@ -45,6 +45,7 @@ #define X_PPC 8 #define X_PPC64 9 #define X_PPC64LE 10 +#define X_AARCH64 11 // ********************************** // Make sure you set X_PLATFORM and X_ARCH defines correctly.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/solaris/bin/aarch64/jvm.cfg Mon Feb 01 03:35:17 2021 +0000 @@ -0,0 +1,35 @@ +# Copyright (c) 2003, 2013, 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. +# +# +# List of JVMs that can be used as an option to java, javac, etc. +# Order is important -- first in this list is the default JVM. +# NOTE that this both this file and its format are UNSUPPORTED and +# WILL GO AWAY in a future release. +# +# You may also select a JVM in an arbitrary location with the +# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported +# and may not be available in a future release. +# +-server KNOWN +-client IGNORE
--- a/test/jdk/jfr/event/os/TestCPUInformation.java Sat Dec 21 06:28:48 2019 +0800 +++ b/test/jdk/jfr/event/os/TestCPUInformation.java Mon Feb 01 03:35:17 2021 +0000 @@ -55,7 +55,7 @@ Events.assertField(event, "cores").atLeast(1); Events.assertField(event, "sockets").atLeast(1); Events.assertField(event, "cpu").containsAny("Intel", "AMD", "Unknown x86", "sparc", "ARM", "PPC", "PowerPC", "AArch64", "s390"); - Events.assertField(event, "description").containsAny("Intel", "AMD", "Unknown x86", "SPARC", "ARM", "PPC", "PowerPC", "AArch64", "zArch"); + Events.assertField(event, "description").containsAny("Intel", "AMD", "Unknown x86", "SPARC", "ARM", "PPC", "PowerPC", "AArch64", "s390"); } } }
--- a/test/tools/launcher/Settings.java Sat Dec 21 06:28:48 2019 +0800 +++ b/test/tools/launcher/Settings.java Mon Feb 01 03:35:17 2021 +0000 @@ -65,6 +65,7 @@ private static final String VM_SETTINGS = "VM settings:"; private static final String PROP_SETTINGS = "Property settings:"; private static final String LOCALE_SETTINGS = "Locale settings:"; + private static final String STACKSIZE_SETTINGS = "Stack Size:"; private static final String SYSTEM_SETTINGS = "Operating System Metrics:"; static void containsAllOptions(TestResult tr) { @@ -80,10 +81,22 @@ String stackSize = "256"; // in kb if (getArch().equals("ppc64") || getArch().equals("ppc64le")) { stackSize = "800"; + } else if (getArch().equals("aarch64")) { + /* + * The max value of minimum stack size allowed for aarch64 can be estimated as + * such: suppose the vm page size is 64KB and the test runs with a debug build, + * the initial _java_thread_min_stack_allowed defined in os_linux_aarch64.cpp is + * 72K, stack guard zones could take 192KB, and the shadow zone needs 128KB, + * after aligning up all parts to the page size, the final size would be 448KB. + * See details in JDK-8163363 + */ + stackSize = "448"; } TestResult tr = null; tr = doExec(javaCmd, "-Xms64m", "-Xmx512m", "-Xss" + stackSize + "k", "-XshowSettings", "-jar", testJar.getAbsolutePath()); + // Check the stack size logs printed by -XshowSettings to verify -Xss meaningfully. + checkContains(tr, STACKSIZE_SETTINGS); containsAllOptions(tr); if (!tr.isOK()) { System.out.println(tr.status); @@ -91,6 +104,7 @@ } tr = doExec(javaCmd, "-Xms65536k", "-Xmx712m", "-Xss" + stackSize + "000", "-XshowSettings", "-jar", testJar.getAbsolutePath()); + checkContains(tr, STACKSIZE_SETTINGS); containsAllOptions(tr); if (!tr.isOK()) { System.out.println(tr.status);