Skip to content

Commit

Permalink
Merge pull request SAP#1398 from SAP/pr-jdk-21+20
Browse files Browse the repository at this point in the history
Merge to tag jdk-21+20
  • Loading branch information
RealCLanger authored May 2, 2023
2 parents 75da5ea + 2882fd8 commit 560d6bf
Show file tree
Hide file tree
Showing 479 changed files with 25,200 additions and 6,939 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,26 @@ jobs:
id: gtest
uses: ./.github/actions/get-gtest

- name: 'Check toolchain installed'
id: toolchain-check
run: |
set +e
'/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/vc/auxiliary/build/vcvars64.bat' -vcvars_ver=${{ inputs.msvc-toolset-version }}
if [ $? -eq 0 ]; then
echo "Toolchain is already installed"
echo "toolchain-installed=true" >> $GITHUB_OUTPUT
else
echo "Toolchain is not yet installed"
echo "toolchain-installed=false" >> $GITHUB_OUTPUT
fi
- name: 'Install toolchain and dependencies'
run: |
# Run Visual Studio Installer
'/c/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe' \
modify --quiet --installPath 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise' \
modify --quiet --installPath 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise' \
--add Microsoft.VisualStudio.Component.VC.${{ inputs.msvc-toolset-version }}.${{ inputs.msvc-toolset-architecture }}
if: steps.toolchain-check.outputs.toolchain-installed != 'true'

- name: 'Configure'
run: >
Expand Down
8 changes: 8 additions & 0 deletions doc/testing.html
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,14 @@ <h4 id="failure_handler_timeout">FAILURE_HANDLER_TIMEOUT</h4>
<p>Sets the argument <code>-timeoutHandlerTimeout</code> for JTReg. The
default value is 0. This is only valid if the failure handler is
built.</p>
<h4 id="jtreg_test_thread_factory">JTREG_TEST_THREAD_FACTORY</h4>
<p>Sets the <code>-testThreadFactory</code> for JTReg. It should be the
fully qualified classname of a class which implements
<code>java.util.concurrent.ThreadFactory</code>. One such implementation
class, named Virtual, is currently part of the JDK build in the
<code>test/jtreg_test_thread_factory/</code> directory. This class gets
compiled during the test image build. The implementation of the Virtual
class creates a new virtual thread for executing each test class.</p>
<h4 id="test_mode">TEST_MODE</h4>
<p>The test mode (<code>agentvm</code> or <code>othervm</code>).</p>
<p>Defaults to <code>agentvm</code>.</p>
Expand Down
9 changes: 9 additions & 0 deletions doc/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,15 @@ Defaults to 4.
Sets the argument `-timeoutHandlerTimeout` for JTReg. The default value is 0.
This is only valid if the failure handler is built.

#### JTREG_TEST_THREAD_FACTORY

Sets the `-testThreadFactory` for JTReg. It should be the fully qualified classname
of a class which implements `java.util.concurrent.ThreadFactory`.
One such implementation class, named Virtual, is currently part of the JDK build
in the `test/jtreg_test_thread_factory/` directory. This class gets compiled during
the test image build. The implementation of the Virtual class creates a new virtual
thread for executing each test class.

#### TEST_MODE

The test mode (`agentvm` or `othervm`).
Expand Down
6 changes: 4 additions & 2 deletions make/CompileInterimLangtools.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2023, 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
Expand Down Expand Up @@ -109,7 +109,9 @@ define SetupInterimModule
$$(INTERIM_LANGTOOLS_ADD_EXPORTS) \
--patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim \
--add-exports java.base/jdk.internal.javac=java.compiler.interim \
--add-exports java.base/jdk.internal.javac=jdk.compiler.interim, \
--add-exports java.base/jdk.internal.javac=jdk.compiler.interim \
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.compiler.interim \
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.javadoc.interim, \
))

$1_DEPS_INTERIM := $$(addsuffix .interim, $$(filter \
Expand Down
8 changes: 6 additions & 2 deletions make/CompileToolsJdk.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
JAVAC_FLAGS := \
--add-exports java.desktop/sun.awt=ALL-UNNAMED \
--add-exports java.base/sun.text=ALL-UNNAMED \
--add-exports java.base/sun.security.util=ALL-UNNAMED, \
--add-exports java.base/sun.security.util=ALL-UNNAMED \
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.compiler.interim \
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.javadoc.interim, \
))

TARGETS += $(BUILD_TOOLS_JDK)
Expand Down Expand Up @@ -90,7 +92,9 @@ $(eval $(call SetupJavaCompilation, COMPILE_DEPEND, \
--add-exports jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED, \
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.compiler.interim \
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.javadoc.interim, \
))

DEPEND_SERVICE_PROVIDER := $(BUILDTOOLS_OUTPUTDIR)/depend/META-INF/services/com.sun.source.util.Plugin
Expand Down
22 changes: 21 additions & 1 deletion make/Main.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, 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
Expand Down Expand Up @@ -747,6 +747,22 @@ ifeq ($(BUILD_FAILURE_HANDLER), true)
))
endif

ifeq ($(BUILD_JTREG_TEST_THREAD_FACTORY), true)
# Builds the test thread factory jtreg extension
$(eval $(call SetupTarget, build-test-test-thread-factory, \
MAKEFILE := test/BuildJtregTestThreadFactory, \
TARGET := build, \
DEPS := interim-langtools exploded-image, \
))

# Copies the jtreg test thread factory into the test image
$(eval $(call SetupTarget, test-image-test-thread-factory, \
MAKEFILE := test/BuildJtregTestThreadFactory, \
TARGET := images, \
DEPS := build-test-test-thread-factory, \
))
endif

$(eval $(call SetupTarget, build-microbenchmark, \
MAKEFILE := test/BuildMicrobenchmark, \
DEPS := interim-langtools exploded-image, \
Expand Down Expand Up @@ -1227,6 +1243,10 @@ ifeq ($(BUILD_FAILURE_HANDLER), true)
test-image: test-image-failure-handler
endif

ifeq ($(BUILD_JTREG_TEST_THREAD_FACTORY), true)
test-image: test-image-test-thread-factory
endif

ifneq ($(JMH_CORE_JAR), )
test-image: build-microbenchmark
endif
Expand Down
14 changes: 13 additions & 1 deletion make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ endif
JTREG_FAILURE_HANDLER_DIR := $(TEST_IMAGE_DIR)/failure_handler
JTREG_FAILURE_HANDLER := $(JTREG_FAILURE_HANDLER_DIR)/jtregFailureHandler.jar

JTREG_TEST_THREAD_FACTORY_DIR := $(TEST_IMAGE_DIR)/jtreg_test_thread_factory
JTREG_TEST_THREAD_FACTORY_JAR := $(JTREG_TEST_THREAD_FACTORY_DIR)/jtregTestThreadFactory.jar

JTREG_FAILURE_HANDLER_TIMEOUT ?= 0

ifneq ($(wildcard $(JTREG_FAILURE_HANDLER)), )
Expand Down Expand Up @@ -200,7 +203,7 @@ $(eval $(call SetTestOpt,REPORT,JTREG))

$(eval $(call ParseKeywordVariable, JTREG, \
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR FAILURE_HANDLER_TIMEOUT \
TEST_MODE ASSERT VERBOSE RETAIN MAX_MEM RUN_PROBLEM_LISTS \
TEST_MODE ASSERT VERBOSE RETAIN TEST_THREAD_FACTORY MAX_MEM RUN_PROBLEM_LISTS \
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS \
Expand Down Expand Up @@ -752,6 +755,7 @@ define SetupRunJtregTestBody

JTREG_VERBOSE ?= fail,error,summary
JTREG_RETAIN ?= fail,error
JTREG_TEST_THREAD_FACTORY ?=
JTREG_RUN_PROBLEM_LISTS ?= false
JTREG_RETRY_COUNT ?= 0
JTREG_REPEAT_COUNT ?= 0
Expand All @@ -765,6 +769,14 @@ define SetupRunJtregTestBody
endif
endif

ifneq ($$(JTREG_TEST_THREAD_FACTORY), )
$1_JTREG_BASIC_OPTIONS += -testThreadFactoryPath:$$(JTREG_TEST_THREAD_FACTORY_JAR)
$1_JTREG_BASIC_OPTIONS += -testThreadFactory:$$(JTREG_TEST_THREAD_FACTORY)
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
$$(addprefix $$($1_TEST_ROOT)/, ProblemList-$$(JTREG_TEST_THREAD_FACTORY).txt) \
))
endif

ifneq ($$(JTREG_LAUNCHER_OPTIONS), )
$1_JTREG_LAUNCHER_OPTIONS += $$(JTREG_LAUNCHER_OPTIONS)
endif
Expand Down
1 change: 1 addition & 0 deletions make/autoconf/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ HOTSPOT_SETUP_MISC
###############################################################################

LIB_TESTS_ENABLE_DISABLE_FAILURE_HANDLER
LIB_TESTS_ENABLE_DISABLE_JTREG_TEST_THREAD_FACTORY

JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
JDKOPT_EXCLUDE_TRANSLATIONS
Expand Down
2 changes: 1 addition & 1 deletion make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
fi
if test "x$TOOLCHAIN_TYPE" = xgcc; then
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fcheck-new -fstack-protector"
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fstack-protector"
TOOLCHAIN_CFLAGS_JDK="-pipe -fstack-protector"
# reduce lib size on linux in link step, this needs also special compile flags
# do this on s390x also for libjvm (where serviceability agent is not supported)
Expand Down
21 changes: 20 additions & 1 deletion make/autoconf/lib-tests.m4
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
################################################################################

# Minimum supported versions
JTREG_MINIMUM_VERSION=7.1.1
JTREG_MINIMUM_VERSION=7.2
GTEST_MINIMUM_VERSION=1.13.0

###############################################################################
Expand Down Expand Up @@ -301,3 +301,22 @@ AC_DEFUN_ONCE([LIB_TESTS_ENABLE_DISABLE_FAILURE_HANDLER],
])
AC_SUBST(BUILD_FAILURE_HANDLER)
])

AC_DEFUN_ONCE([LIB_TESTS_ENABLE_DISABLE_JTREG_TEST_THREAD_FACTORY],
[
UTIL_ARG_ENABLE(NAME: jtreg-test-thread-factory, DEFAULT: auto,
RESULT: BUILD_JTREG_TEST_THREAD_FACTORY,
DESC: [enable building of the jtreg test thread factory],
DEFAULT_DESC: [enabled if jtreg is present],
CHECKING_MSG: [if the jtreg test thread factory should be built],
CHECK_AVAILABLE: [
AC_MSG_CHECKING([if the jtreg test thread factory is available])
if test "x$JT_HOME" != "x"; then
AC_MSG_RESULT([yes])
else
AVAILABLE=false
AC_MSG_RESULT([no (jtreg not present)])
fi
])
AC_SUBST(BUILD_JTREG_TEST_THREAD_FACTORY)
])
6 changes: 5 additions & 1 deletion make/autoconf/spec.gmk.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, 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
Expand Down Expand Up @@ -358,6 +358,8 @@ BUILDJDK_OUTPUTDIR=$(OUTPUTDIR)/buildjdk

BUILD_FAILURE_HANDLER := @BUILD_FAILURE_HANDLER@

BUILD_JTREG_TEST_THREAD_FACTORY := @BUILD_JTREG_TEST_THREAD_FACTORY@

ENABLE_GENERATE_CLASSLIST := @ENABLE_GENERATE_CLASSLIST@

EXCLUDE_TRANSLATIONS := @EXCLUDE_TRANSLATIONS@
Expand Down Expand Up @@ -690,6 +692,8 @@ INTERIM_LANGTOOLS_ADD_EXPORTS := \
--add-exports java.base/sun.invoke.util=jdk.compiler.interim \
--add-exports java.base/jdk.internal.javac=java.compiler.interim \
--add-exports java.base/jdk.internal.javac=jdk.compiler.interim \
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.compiler.interim \
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.javadoc.interim \
#
INTERIM_LANGTOOLS_MODULES_COMMA := $(strip $(subst $(SPACE),$(COMMA),$(strip \
$(INTERIM_LANGTOOLS_MODULES))))
Expand Down
15 changes: 8 additions & 7 deletions make/conf/github-actions.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,17 @@
# Versions and download locations for dependencies used by GitHub Actions (GHA)

GTEST_VERSION=1.13.0
JTREG_VERSION=7.1.1+1
JTREG_VERSION=7.2+1

LINUX_X64_BOOT_JDK_EXT=tar.gz
LINUX_X64_BOOT_JDK_URL=https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jdk-19.0.2_linux-x64_bin.tar.gz
LINUX_X64_BOOT_JDK_SHA256=e7b27e8b5b4ca2a172b0a6299eaba9cf7e0cceeea11aeb37fd3ff1ef71cff018
<<<<<<< HEAD
LINUX_X64_BOOT_JDK_URL=https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jdk-20.0.1_linux-x64_bin.tar.gz
LINUX_X64_BOOT_JDK_SHA256=192de59d7c7b7b6577539117f03ced5b46b4689add537b1e2b1175d013380ecd

MACOS_X64_BOOT_JDK_EXT=tar.gz
MACOS_X64_BOOT_JDK_URL=https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jdk-19.0.2_macos-x64_bin.tar.gz
MACOS_X64_BOOT_JDK_SHA256=526d827d243c97dcee965a40ec5735fc82dcb8d8b32ab5b118a9ce9199d213f9
MACOS_X64_BOOT_JDK_URL=https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jdk-20.0.1_macos-x64_bin.tar.gz
MACOS_X64_BOOT_JDK_SHA256=2140c1c35966c5202e4ded8e3a22b2e2114ad011cd49ea561b529dfd2b4257ab

WINDOWS_X64_BOOT_JDK_EXT=zip
WINDOWS_X64_BOOT_JDK_URL=https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jdk-19.0.2_windows-x64_bin.zip
WINDOWS_X64_BOOT_JDK_SHA256=1be5e8578ea41afd4e1c6d433500adea4847709ba0ea6ab4e2d99a979a970998
WINDOWS_X64_BOOT_JDK_URL=https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jdk-20.0.1_windows-x64_bin.zip
WINDOWS_X64_BOOT_JDK_SHA256=031f0116e4c7d69ddd08c0d448dc5decb912cdbbe7e46f9fdb771576e4ef104e
6 changes: 3 additions & 3 deletions make/conf/jib-profiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ var getJibProfilesCommon = function (input, data) {
};
};

common.boot_jdk_version = "19";
common.boot_jdk_version = "20";
common.boot_jdk_build_number = "36";
common.boot_jdk_home = input.get("boot_jdk", "install_path") + "/jdk-"
+ common.boot_jdk_version
Expand Down Expand Up @@ -1150,9 +1150,9 @@ var getJibProfilesDependencies = function (input, common) {
jtreg: {
server: "jpg",
product: "jtreg",
version: "7.1.1",
version: "7.2",
build_number: "1",
file: "bundles/jtreg-7.1.1+1.zip",
file: "bundles/jtreg-7.2+1.zip",
environment_name: "JT_HOME",
environment_path: input.get("jtreg", "home_path") + "/bin",
configure_args: "--with-jtreg=" + input.get("jtreg", "home_path"),
Expand Down
4 changes: 2 additions & 2 deletions make/conf/version-numbers.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, 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
Expand Down Expand Up @@ -37,6 +37,6 @@ DEFAULT_VERSION_DATE=2023-09-19
DEFAULT_VERSION_CLASSFILE_MAJOR=65 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_VERSION_DOCS_API_SINCE=11
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="19 20 21"
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="20 21"
DEFAULT_JDK_SOURCE_TARGET_VERSION=21
DEFAULT_PROMOTED_VERSION_PRE=ea
Loading

0 comments on commit 560d6bf

Please sign in to comment.