Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Automatic merge of jdk:master into master
  • Loading branch information
duke committed Sep 29, 2020
2 parents ef3dbe5 + 70b0fcc commit 82bc7ce40e09d607de3725beb9713f75f3aebe12
Showing with 1,960 additions and 677 deletions.
  1. +861 −0 .github/workflows/submit.yml
  2. +2 −2 doc/building.html
  3. +2 −2 doc/building.md
  4. +1 −1 make/autoconf/version-numbers
  5. +6 −19 make/conf/jib-profiles.js
  6. +43 −0 make/conf/test-dependencies
  7. +27 −7 make/devkit/Tools.gmk
  8. +11 −2 src/hotspot/cpu/aarch64/gc/shenandoah/c1/shenandoahBarrierSetC1_aarch64.cpp
  9. +10 −40 src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp
  10. +2 −6 src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp
  11. +1 −1 src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
  12. +34 −172 src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
  13. +27 −26 src/hotspot/cpu/aarch64/vm_version_aarch64.hpp
  14. +2 −2 src/hotspot/cpu/arm/interp_masm_arm.cpp
  15. +4 −6 src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp
  16. +4 −4 src/hotspot/cpu/s390/interp_masm_s390.cpp
  17. +4 −8 src/hotspot/cpu/x86/interp_masm_x86.cpp
  18. +1 −1 src/hotspot/cpu/x86/macroAssembler_x86.cpp
  19. +2 −4 src/hotspot/cpu/zero/zeroInterpreter_zero.cpp
  20. +7 −19 src/hotspot/os/aix/os_aix.cpp
  21. +11 −21 src/hotspot/os/bsd/os_bsd.cpp
  22. +16 −2 src/hotspot/os/linux/cgroupSubsystem_linux.cpp
  23. +16 −31 src/hotspot/os/linux/os_linux.cpp
  24. +1 −1 src/hotspot/os/posix/os_posix.cpp
  25. +13 −14 src/hotspot/os/windows/os_windows.cpp
  26. +1 −1 src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp
  27. +1 −1 src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp
  28. +137 −0 src/hotspot/os_cpu/linux_aarch64/vm_version_linux_aarch64.cpp
  29. +3 −3 src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp
  30. +1 −1 src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp
  31. +3 −2 src/hotspot/share/gc/g1/g1CardTable.hpp
  32. +2 −2 src/hotspot/share/gc/g1/g1CardTable.inline.hpp
  33. +22 −8 src/hotspot/share/gc/g1/g1CollectedHeap.cpp
  34. +17 −1 src/hotspot/share/gc/g1/g1CollectedHeap.hpp
  35. +2 −2 src/hotspot/share/gc/g1/g1RegionToSpaceMapper.cpp
  36. +62 −26 src/hotspot/share/gc/g1/g1RemSet.cpp
  37. +3 −1 src/hotspot/share/gc/g1/g1RemSet.hpp
  38. +1 −1 src/hotspot/share/gc/z/zMarkStackAllocator.cpp
  39. +28 −13 src/hotspot/share/gc/z/zStat.cpp
  40. +2 −0 src/hotspot/share/gc/z/zStat.hpp
  41. +13 −16 src/hotspot/share/interpreter/interpreterRuntime.cpp
  42. +1 −1 src/hotspot/share/interpreter/interpreterRuntime.hpp
  43. +5 −17 src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp
  44. +1 −1 src/hotspot/share/jvmci/vmStructs_jvmci.cpp
  45. +2 −2 src/hotspot/share/memory/allocation.inline.hpp
  46. +4 −4 src/hotspot/share/memory/virtualspace.cpp
  47. +8 −0 src/hotspot/share/opto/c2_globals.hpp
  48. +22 −2 src/hotspot/share/opto/compile.cpp
  49. +3 −1 src/hotspot/share/opto/compile.hpp
  50. +11 −0 src/hotspot/share/opto/phaseX.cpp
  51. +3 −0 src/hotspot/share/opto/phaseX.hpp
  52. +0 −2 src/hotspot/share/prims/unsafe.cpp
  53. +2 −2 src/hotspot/share/prims/whitebox.cpp
  54. +0 −1 src/hotspot/share/runtime/deoptimization.cpp
  55. +23 −22 src/hotspot/share/runtime/os.cpp
  56. +19 −9 src/hotspot/share/runtime/os.hpp
  57. +1 −1 src/hotspot/share/runtime/safepointMechanism.cpp
  58. +8 −0 src/hotspot/share/runtime/sharedRuntime.cpp
  59. +2 −2 src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java
  60. +31 −33 src/jdk.httpserver/share/classes/com/sun/net/httpserver/Authenticator.java
  61. +13 −12 src/jdk.httpserver/share/classes/com/sun/net/httpserver/BasicAuthenticator.java
  62. +16 −8 ...compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java
  63. +4 −1 ...e/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java
  64. +2 −2 test/hotspot/gtest/runtime/test_committed_virtualmemory.cpp
  65. +44 −0 test/hotspot/jtreg/compiler/arguments/TestStressIGVNOptions.java
  66. +64 −0 test/hotspot/jtreg/compiler/debug/TestGenerateStressSeed.java
  67. +71 −0 test/hotspot/jtreg/compiler/debug/TestStressIGVN.java
  68. +0 −81 test/hotspot/jtreg/compiler/unsafe/TestUnsafeUnalignedSwap.java
  69. +24 −1 test/hotspot/jtreg/containers/cgroup/CgroupSubsystemFactory.java
  70. +2 −1 test/jdk/ProblemList.txt
  71. +148 −0 test/jdk/javax/swing/JSlider/TestJSliderRendering.java
  72. +20 −2 test/langtools/tools/javac/records/RecordCompilationTests.java

Large diffs are not rendered by default.

@@ -265,7 +265,7 @@ <h2 id="native-compiler-toolchain-requirements">Native Compiler (Toolchain) Requ
<tbody>
<tr class="odd">
<td style="text-align: left;">Linux</td>
<td style="text-align: left;">gcc 9.2.0</td>
<td style="text-align: left;">gcc 10.2.0</td>
</tr>
<tr class="even">
<td style="text-align: left;">macOS</td>
@@ -280,7 +280,7 @@ <h2 id="native-compiler-toolchain-requirements">Native Compiler (Toolchain) Requ
<p>All compilers are expected to be able to compile to the C99 language standard, as some C99 features are used in the source code. Microsoft Visual Studio doesn't fully support C99 so in practice shared code is limited to using C99 features that it does support.</p>
<h3 id="gcc">gcc</h3>
<p>The minimum accepted version of gcc is 5.0. Older versions will generate a warning by <code>configure</code> and are unlikely to work.</p>
<p>The JDK is currently known to be able to compile with at least version 9.2 of gcc.</p>
<p>The JDK is currently known to be able to compile with at least version 10.2 of gcc.</p>
<p>In general, any version between these two should be usable.</p>
<h3 id="clang">clang</h3>
<p>The minimum accepted version of clang is 3.5. Older versions will not be accepted by <code>configure</code>.</p>
@@ -302,7 +302,7 @@ issues.

Operating system Toolchain version
------------------ -------------------------------------------------------
Linux gcc 9.2.0
Linux gcc 10.2.0
macOS Apple Xcode 10.1 (using clang 10.0.0)
Windows Microsoft Visual Studio 2019 update 16.7.2

@@ -316,7 +316,7 @@ features that it does support.
The minimum accepted version of gcc is 5.0. Older versions will generate a warning
by `configure` and are unlikely to work.

The JDK is currently known to be able to compile with at least version 9.2 of
The JDK is currently known to be able to compile with at least version 10.2 of
gcc.

In general, any version between these two should be usable.
@@ -36,7 +36,7 @@ DEFAULT_VERSION_EXTRA3=0
DEFAULT_VERSION_DATE=2021-03-16
DEFAULT_VERSION_CLASSFILE_MAJOR=60 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="14 15 16"
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="15 16"
DEFAULT_JDK_SOURCE_TARGET_VERSION=16
DEFAULT_PROMOTED_VERSION_PRE=ea

@@ -381,7 +381,7 @@ var getJibProfilesCommon = function (input, data) {
};
};

common.boot_jdk_version = "14";
common.boot_jdk_version = "15";
common.boot_jdk_build_number = "36";
common.boot_jdk_home = input.get("boot_jdk", "install_path") + "/jdk-"
+ common.boot_jdk_version
@@ -959,10 +959,10 @@ var getJibProfilesProfiles = function (input, common, data) {
var getJibProfilesDependencies = function (input, common) {

var devkit_platform_revisions = {
linux_x64: "gcc9.2.0-OL6.4+1.0",
linux_x64: "gcc10.2.0-OL6.4+1.0",
macosx_x64: "Xcode11.3.1-MacOSX10.15+1.0",
windows_x64: "VS2019-16.7.2+1.0",
linux_aarch64: "gcc9.2.0-OL7.6+1.0",
linux_aarch64: "gcc10.2.0-OL7.6+1.0",
linux_arm: "gcc8.2.0-Fedora27+1.0",
linux_ppc64le: "gcc8.2.0-Fedora27+1.0",
linux_s390x: "gcc8.2.0-Fedora27+1.0"
@@ -994,17 +994,8 @@ var getJibProfilesDependencies = function (input, common) {
? input.get("gnumake", "install_path") + "/cygwin/bin"
: input.get("gnumake", "install_path") + "/bin");

if (input.build_cpu == 'aarch64') {
boot_jdk = {
organization: common.organization,
ext: "tar.gz",
module: "jdk-linux_aarch64",
revision: "14+1.0",
configure_args: "--with-boot-jdk=" + common.boot_jdk_home,
environment_path: common.boot_jdk_home + "/bin"
}
} else {
boot_jdk = {
var dependencies = {
boot_jdk: {
server: "jpg",
product: "jdk",
version: common.boot_jdk_version,
@@ -1013,11 +1004,7 @@ var getJibProfilesDependencies = function (input, common) {
+ boot_jdk_platform + "_bin" + boot_jdk_ext,
configure_args: "--with-boot-jdk=" + common.boot_jdk_home,
environment_path: common.boot_jdk_home + "/bin"
}
}

var dependencies = {
boot_jdk: boot_jdk,
},

devkit: {
organization: common.organization,
@@ -0,0 +1,43 @@
#
# Copyright (c) 2020, 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.
#

# Versions and download locations for dependencies used by pre-submit testing.

BOOT_JDK_VERSION=15
JTREG_VERSION=5.1
JTREG_BUILD=b01
GTEST_VERSION=1.8.1

LINUX_X64_BOOT_JDK_FILENAME=openjdk-15_linux-x64_bin.tar.gz
LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk15/779bf45e88a44cbd9ea6621d33e33db1/36/GPL/openjdk-15_linux-x64_bin.tar.gz
LINUX_X64_BOOT_JDK_SHA256=bb67cadee687d7b486583d03c9850342afea4593be4f436044d785fba9508fb7

WINDOWS_X64_BOOT_JDK_FILENAME=openjdk-15_windows-x64_bin.zip
WINDOWS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk15/779bf45e88a44cbd9ea6621d33e33db1/36/GPL/openjdk-15_windows-x64_bin.zip
WINDOWS_X64_BOOT_JDK_SHA256=764e39a71252a9791118a31ae56a4247c049463bda5eb72497122ec50b1d07f8

MACOS_X64_BOOT_JDK_FILENAME=openjdk-115_osx-x64_bin.tar.gz
MACOS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk15/779bf45e88a44cbd9ea6621d33e33db1/36/GPL/openjdk-15_osx-x64_bin.tar.gz
MACOS_X64_BOOT_JDK_SHA256=ab842c8c0953b816be308c098c1a021177a4776bef24da85b6bafbbd657c7e1a
@@ -87,35 +87,44 @@ endif
# Define external dependencies

# Latest that could be made to work.
GCC_VER := 9.2.0
ifeq ($(GCC_VER), 9.2.0)
GCC_VER := 10.2.0
ifeq ($(GCC_VER), 10.2.0)
gcc_ver := gcc-10.2.0
binutils_ver := binutils-2.35
ccache_ver := ccache-3.7.11
mpfr_ver := mpfr-4.1.0
gmp_ver := gmp-6.2.0
mpc_ver := mpc-1.1.0
gdb_ver := gdb-9.2
REQUIRED_MIN_MAKE_MAJOR_VERSION := 4
else ifeq ($(GCC_VER), 9.2.0)
gcc_ver := gcc-9.2.0
binutils_ver := binutils-2.34
ccache_ver := 3.7.3
ccache_ver := ccache-3.7.3
mpfr_ver := mpfr-3.1.5
gmp_ver := gmp-6.1.2
mpc_ver := mpc-1.0.3
gdb_ver := gdb-8.3
else ifeq ($(GCC_VER), 8.3.0)
gcc_ver := gcc-8.3.0
binutils_ver := binutils-2.32
ccache_ver := 3.7.3
ccache_ver := ccache-3.7.3
mpfr_ver := mpfr-3.1.5
gmp_ver := gmp-6.1.2
mpc_ver := mpc-1.0.3
gdb_ver := gdb-8.3
else ifeq ($(GCC_VER), 7.3.0)
gcc_ver := gcc-7.3.0
binutils_ver := binutils-2.30
ccache_ver := 3.3.6
ccache_ver := ccache-3.3.6
mpfr_ver := mpfr-3.1.5
gmp_ver := gmp-6.1.2
mpc_ver := mpc-1.0.3
gdb_ver := gdb-8.1
else ifeq ($(GCC_VER), 4.9.2)
gcc_ver := gcc-4.9.2
binutils_ver := binutils-2.25
ccache_ver := 3.2.1
ccache_ver := ccache-3.2.1
mpfr_ver := mpfr-3.0.1
gmp_ver := gmp-4.3.2
mpc_ver := mpc-1.0.1
@@ -124,9 +133,20 @@ else
$(error Unsupported GCC version)
endif

ifneq ($(REQUIRED_MIN_MAKE_MAJOR_VERSION),)
MAKE_MAJOR_VERSION := $(word 1,$(subst ., ,$(MAKE_VERSION)))
SUPPORTED_MAKE_VERSION := $(shell [ $(MAKE_MAJOR_VERSION) -ge $(REQUIRED_MIN_MAKE_MAJOR_VERSION) ] && echo true)
ifneq ($(SUPPORTED_MAKE_VERSION),true)
$(error "Make v$(MAKE_VERSION) is too old, must use v$(REQUIRED_MIN_MAKE_MAJOR_VERSION) or above")
endif
endif

ccache_ver_only := $(patsubst ccache-%,%,$(ccache_ver))


GCC := http://ftp.gnu.org/pub/gnu/gcc/$(gcc_ver)/$(gcc_ver).tar.xz
BINUTILS := http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.gz
CCACHE := https://github.com/ccache/ccache/releases/download/v$(ccache_ver)/ccache-$(ccache_ver).tar.xz
CCACHE := https://github.com/ccache/ccache/releases/download/v$(ccache_ver_only)/$(ccache_ver).tar.xz
MPFR := https://www.mpfr.org/${mpfr_ver}/${mpfr_ver}.tar.bz2
GMP := http://ftp.gnu.org/pub/gnu/gmp/${gmp_ver}.tar.bz2
MPC := http://ftp.gnu.org/pub/gnu/mpc/${mpc_ver}.tar.gz
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2019, Red Hat, Inc. All rights reserved.
* Copyright (c) 2018, 2020, Red Hat, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -48,7 +48,16 @@ void LIR_OpShenandoahCompareAndSwap::emit_code(LIR_Assembler* masm) {
newval = tmp2;
}

ShenandoahBarrierSet::assembler()->cmpxchg_oop(masm->masm(), addr, cmpval, newval, /*acquire*/ false, /*release*/ true, /*is_cae*/ false, result);
ShenandoahBarrierSet::assembler()->cmpxchg_oop(masm->masm(), addr, cmpval, newval, /*acquire*/ true, /*release*/ true, /*is_cae*/ false, result);

if (is_c1_or_interpreter_only()) {
// The membar here is necessary to prevent reordering between the
// release store in the CAS above and a subsequent volatile load.
// However for tiered compilation C1 inserts a full barrier before
// volatile loads which means we don't need an additional barrier
// here (see LIRGenerator::volatile_field_load()).
__ membar(__ AnyAny);
}
}

#undef __
@@ -459,39 +459,10 @@ void ShenandoahBarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler
// from-space, or it refers to the to-space version of an object that
// is being evacuated out of from-space.
//
// By default, this operation implements sequential consistency and the
// value held in the result register following execution of the
// generated code sequence is 0 to indicate failure of CAS, non-zero
// to indicate success. Arguments support variations on this theme:
//
// acquire: Allow relaxation of the memory ordering on CAS from
// sequential consistency. This can be useful when
// sequential consistency is not required, such as when
// another sequentially consistent operation is already
// present in the execution stream. If acquire, successful
// execution has the side effect of assuring that memory
// values updated by other threads and "released" will be
// visible to any read operations perfomed by this thread
// which follow this operation in program order. This is a
// special optimization that should not be enabled by default.
// release: Allow relaxation of the memory ordering on CAS from
// sequential consistency. This can be useful when
// sequential consistency is not required, such as when
// another sequentially consistent operation is already
// present in the execution stream. If release, successful
// completion of this operation has the side effect of
// assuring that all writes to memory performed by this
// thread that precede this operation in program order are
// visible to all other threads that subsequently "acquire"
// before reading the respective memory values. This is a
// special optimization that should not be enabled by default.
// is_cae: This turns CAS (compare and swap) into CAE (compare and
// exchange). This HotSpot convention is that CAE makes
// available to the caller the "failure witness", which is
// the value that was stored in memory which did not match
// the expected value. If is_cae, the result is the value
// most recently fetched from addr rather than a boolean
// success indicator.
// By default the value held in the result register following execution
// of the generated code sequence is 0 to indicate failure of CAS,
// non-zero to indicate success. If is_cae, the result is the value most
// recently fetched from addr rather than a boolean success indicator.
//
// Clobbers rscratch1, rscratch2
void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler* masm,
@@ -526,11 +497,10 @@ void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler* masm,
__ bind (step4);

// Step 4. CAS has failed because the value most recently fetched
// from addr (which is now held in tmp1) is no longer the from-space
// pointer held in tmp2. If a different thread replaced the
// in-memory value with its equivalent to-space pointer, then CAS
// may still be able to succeed. The value held in the expected
// register has not changed.
// from addr is no longer the from-space pointer held in tmp2. If a
// different thread replaced the in-memory value with its equivalent
// to-space pointer, then CAS may still be able to succeed. The
// value held in the expected register has not changed.
//
// It is extremely rare we reach this point. For this reason, the
// implementation opts for smaller rather than potentially faster
@@ -603,8 +573,8 @@ void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler* masm,
// Note that macro implementation of __cmpxchg cannot use same register
// tmp2 for result and expected since it overwrites result before it
// compares result with expected.
__ cmpxchg(addr, tmp2, new_val, size, acquire, release, false, tmp1);
// EQ flag set iff success. tmp2 holds value fetched.
__ cmpxchg(addr, tmp2, new_val, size, acquire, release, false, noreg);
// EQ flag set iff success. tmp2 holds value fetched, tmp1 (rscratch1) clobbered.

// If fetched value did not equal the new expected, this could
// still be a false negative because some other thread may have
@@ -812,9 +812,7 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg)
assert(lock_reg == c_rarg1, "The argument is only for looks. It must be rarg1");

if (UseHeavyMonitors) {
call_VM(noreg,
CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit),
lock_reg);
call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), lock_reg);
} else {
Label done;

@@ -850,9 +848,7 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg)

// Call the runtime routine for slow case.
str(obj_reg, Address(lock_reg, BasicObjectLock::obj_offset_in_bytes())); // restore obj
call_VM(noreg,
CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit),
lock_reg);
call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), lock_reg);

bind(done);

@@ -5266,7 +5266,7 @@ void MacroAssembler::cache_wb(Address line) {
assert(line.offset() == 0, "offset should be 0");
// would like to assert this
// assert(line._ext.shift == 0, "shift should be zero");
if (VM_Version::supports_dcpop()) {
if (VM_Version::features() & VM_Version::CPU_DCPOP) {
// writeback using clear virtual address to point of persistence
dc(Assembler::CVAP, line.base());
} else {

0 comments on commit 82bc7ce

Please sign in to comment.