Skip to content

Commit

Permalink
JDK-8337199: merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
larry-cable committed Nov 14, 2024
2 parents 57e840c + 7ef2633 commit aa91058
Show file tree
Hide file tree
Showing 3,587 changed files with 160,583 additions and 108,385 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
20 changes: 2 additions & 18 deletions .github/actions/build-jtreg/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,8 @@ runs:

- name: 'Build JTReg'
run: |
# Try building JTReg several times, backing off exponentially on failure.
# ~500 seconds in total should be enough to capture most of the transient
# failures.
for I in `seq 0 8`; do
rm -rf build/images/jtreg
bash make/build.sh --jdk "$JAVA_HOME_17_X64" && break
S=$(( 2 ** $I ))
echo "Failure. Waiting $S seconds before retrying"
sleep $S
done
# Check if build was successful
if [ ! -d build/images/jtreg ]; then
echo "Build failed"
exit 1;
fi
# Move files to the proper locations
# Build JTReg and move files to the proper locations
bash make/build.sh --jdk "$JAVA_HOME_17_X64"
mkdir ../installed
mv build/images/jtreg/* ../installed
working-directory: jtreg/src
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ jobs:
with:
platform: macos-aarch64
runs-on: 'macos-14'
xcode-toolset-version: '14.3.1'
xcode-toolset-version: '15.4'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.prepare.outputs.macos-aarch64 == 'true'
Expand Down Expand Up @@ -354,6 +354,7 @@ jobs:
platform: macos-x64
bootjdk-platform: macos-x64
runs-on: macos-13
xcode-toolset-version: '14.3.1'

test-macos-aarch64:
name: macos-aarch64
Expand All @@ -364,6 +365,7 @@ jobs:
platform: macos-aarch64
bootjdk-platform: macos-aarch64
runs-on: macos-14
xcode-toolset-version: '15.4'

test-windows-x64:
name: windows-x64
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ on:
runs-on:
required: true
type: string
xcode-toolset-version:
required: false
type: string

env:
# These are needed to make the MSYS2 bash work properly
Expand Down Expand Up @@ -147,7 +150,7 @@ jobs:
run: |
# On macOS we need to install some dependencies for testing
brew install make
sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-toolset-version }}.app/Contents/Developer
# This will make GNU make available as 'make' and not only as 'gmake'
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
if: runner.os == 'macOS'
Expand Down
2 changes: 1 addition & 1 deletion make/Global.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ help:
$(info $(_) # method is 'auto', 'ignore' or 'fail' (default))
$(info $(_) TEST="test1 ..." # Use the given test descriptor(s) for testing, e.g.)
$(info $(_) # make test TEST="jdk_lang gtest:all")
$(info $(_) TEST_DEPS="dependency1 ..." # Specify additional dependencies for running tests, e.g docs-jdk
$(info $(_) TEST_DEPS="dependency1 ..." # Specify additional dependencies for running tests, e.g docs-jdk)
$(info $(_) JTREG="OPT1=x;OPT2=y" # Control the JTREG test harness, use 'make test-only JTREG=help' to list)
$(info $(_) GTEST="OPT1=x;OPT2=y" # Control the GTEST test harness, use 'make test-only GTEST=help' to list)
$(info $(_) MICRO="OPT1=x;OPT2=y" # Control the MICRO test harness, use 'make test-only MICRO=help' to list)
Expand Down
24 changes: 21 additions & 3 deletions make/Images.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ JLINK_DISABLE_WARNINGS := | ( $(GREP) -v -e "WARNING: Using incubator module" ||
JDK_IMAGE_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk
JRE_IMAGE_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jre

ifeq ($(JLINK_PRODUCE_LINKABLE_RUNTIME), true)
JLINK_JDK_EXTRA_OPTS += --generate-linkable-runtime
endif

$(eval $(call SetupExecute, jlink_jdk, \
WARN := Creating jdk image, \
DEPS := $(JDK_JMODS) $(BASE_RELEASE_FILE) \
Expand Down Expand Up @@ -132,10 +136,16 @@ CDS_DUMP_FLAGS = -Xmx128M -Xms128M
# Helper function for creating the CDS archives for the JDK and JRE
#
# Param1 - VM variant (e.g., server, client, zero, ...)
# Param2 - _nocoops, or empty
# Param2 - _nocoops, _coh, _nocoops_coh, or empty
define CreateCDSArchive
$1_$2_DUMP_EXTRA_ARG := $(if $(filter _nocoops, $2), -XX:-UseCompressedOops, )
$1_$2_DUMP_TYPE := $(if $(filter _nocoops, $2), -NOCOOPS, )
$1_$2_COOPS_OPTION := $(if $(findstring _nocoops, $2),-XX:-UseCompressedOops)
# enable and also explicitly disable coh as needed.
ifeq ($(call isTargetCpuBits, 64), true)
$1_$2_COH_OPTION := -XX:+UnlockExperimentalVMOptions \
$(if $(findstring _coh, $2),-XX:+UseCompactObjectHeaders,-XX:-UseCompactObjectHeaders)
endif
$1_$2_DUMP_EXTRA_ARG := $$($1_$2_COOPS_OPTION) $$($1_$2_COH_OPTION)
$1_$2_DUMP_TYPE := $(if $(findstring _nocoops, $2),-NOCOOPS,)$(if $(findstring _coh, $2),-COH,)

# Only G1 supports dumping the shared heap, so explicitly use G1 if the JVM supports it.
$1_$2_CDS_DUMP_FLAGS := $(CDS_DUMP_FLAGS) $(if $(filter g1gc, $(JVM_FEATURES_$1)), -XX:+UseG1GC)
Expand Down Expand Up @@ -190,6 +200,14 @@ ifeq ($(BUILD_CDS_ARCHIVE), true)
$(foreach v, $(JVM_VARIANTS), \
$(eval $(call CreateCDSArchive,$v,_nocoops)) \
)
ifeq ($(BUILD_CDS_ARCHIVE_COH), true)
$(foreach v, $(JVM_VARIANTS), \
$(eval $(call CreateCDSArchive,$v,_coh)) \
)
$(foreach v, $(JVM_VARIANTS), \
$(eval $(call CreateCDSArchive,$v,_nocoops_coh)) \
)
endif
endif
endif

Expand Down
6 changes: 5 additions & 1 deletion make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ define SetupRunMicroTestBody
$1_JMH_JVM_ARGS += $$(MICRO_VM_OPTIONS) $$(MICRO_JAVA_OPTIONS)
endif

$1_MICRO_VM_OPTIONS := -jvmArgs $(call ShellQuote,$$($1_JMH_JVM_ARGS))
$1_MICRO_VM_OPTIONS := -jvmArgsPrepend $(call ShellQuote,$$($1_JMH_JVM_ARGS))

ifneq ($$(MICRO_ITER), )
$1_MICRO_ITER := -i $$(MICRO_ITER)
Expand Down Expand Up @@ -856,6 +856,10 @@ define SetupRunJtregTestBody
JTREG_AUTO_PROBLEM_LISTS += ProblemList-zgc.txt
endif

ifneq ($$(findstring -XX:+UseShenandoahGC, $$(JTREG_ALL_OPTIONS)), )
JTREG_AUTO_PROBLEM_LISTS += ProblemList-shenandoah.txt
endif

ifneq ($$(JTREG_EXTRA_PROBLEM_LISTS), )
# Accept both absolute paths as well as relative to the current test root.
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
Expand Down
3 changes: 3 additions & 0 deletions make/autoconf/basic.m4
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
fi
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
AC_MSG_ERROR([32-bit Windows builds are not supported])
fi
BASIC_SETUP_PATHS_WINDOWS
fi
Expand Down
1 change: 1 addition & 0 deletions make/autoconf/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
JDKOPT_EXCLUDE_TRANSLATIONS
JDKOPT_ENABLE_DISABLE_MANPAGES
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE_COH
JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT
JDKOPT_SETUP_MACOSX_SIGNING

Expand Down
30 changes: 30 additions & 0 deletions make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,36 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
IF_FALSE: [$2FDLIBM_CFLAGS=""])
fi
AC_SUBST($2FDLIBM_CFLAGS)
# Check whether the compiler supports the Arm C Language Extensions (ACLE)
# for SVE. Set SVE_CFLAGS to -march=armv8-a+sve if it does.
# ACLE and this flag are required to build the aarch64 SVE related functions in
# libvectormath.
if test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
AC_LANG_PUSH(C)
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -march=armv8-a+sve"
AC_MSG_CHECKING([if Arm SVE ACLE is supported])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <arm_sve.h>],
[
svint32_t r = svdup_n_s32(1);
return 0;
])],
[
AC_MSG_RESULT([yes])
$2SVE_CFLAGS="-march=armv8-a+sve"
],
[
AC_MSG_RESULT([no])
$2SVE_CFLAGS=""
]
)
CFLAGS="$OLD_CFLAGS"
AC_LANG_POP(C)
fi
fi
AC_SUBST($2SVE_CFLAGS)
])

# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
Expand Down
4 changes: 3 additions & 1 deletion make/autoconf/flags-ldflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
if test "x$OPENJDK_TARGET_OS" = xlinux; then
# Clang needs the lld linker to work correctly
BASIC_LDFLAGS="-fuse-ld=lld -Wl,--exclude-libs,ALL"
UTIL_REQUIRE_PROGS(LLD, lld)
if test "x$CXX_IS_USER_SUPPLIED" = xfalse && test "x$CC_IS_USER_SUPPLIED" = xfalse; then
UTIL_REQUIRE_PROGS(LLD, lld, $TOOLCHAIN_PATH:$PATH)
fi
fi
if test "x$OPENJDK_TARGET_OS" = xaix; then
BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-bnolibpath -Wl,-bnoexpall \
Expand Down
71 changes: 64 additions & 7 deletions make/autoconf/jdk-options.m4
Original file line number Diff line number Diff line change
Expand Up @@ -586,13 +586,42 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JMOD_OPTIONS],
################################################################################
#
# jlink options.
# We always keep packaged modules in JDK image.
#
AC_DEFUN_ONCE([JDKOPT_SETUP_JLINK_OPTIONS],
[
UTIL_ARG_ENABLE(NAME: keep-packaged-modules, DEFAULT: true,
################################################################################
#
# Configure option for building a JDK that is suitable for linking from the
# run-time image without JMODs.
#
# Determines whether or not a suitable run-time image is being produced from
# packaged modules. If set to 'true, changes the *default* of packaged
# modules to 'false'.
#
UTIL_ARG_ENABLE(NAME: linkable-runtime, DEFAULT: false,
RESULT: JLINK_PRODUCE_LINKABLE_RUNTIME,
DESC: [enable a JDK build suitable for linking from the run-time image],
CHECKING_MSG: [whether or not a JDK suitable for linking from the run-time image should be produced])
AC_SUBST(JLINK_PRODUCE_LINKABLE_RUNTIME)
if test "x$JLINK_PRODUCE_LINKABLE_RUNTIME" = xtrue; then
DEFAULT_PACKAGED_MODULES=false
else
DEFAULT_PACKAGED_MODULES=true
fi
################################################################################
#
# Configure option for packaged modules
#
# We keep packaged modules in the JDK image unless --enable-linkable-runtime is
# requested.
#
UTIL_ARG_ENABLE(NAME: keep-packaged-modules, DEFAULT: $DEFAULT_PACKAGED_MODULES,
RESULT: JLINK_KEEP_PACKAGED_MODULES,
DESC: [enable keeping of packaged modules in jdk image],
DEFAULT_DESC: [enabled by default unless --enable-linkable-runtime is set],
CHECKING_MSG: [if packaged modules are kept])
AC_SUBST(JLINK_KEEP_PACKAGED_MODULES)
])
Expand Down Expand Up @@ -638,14 +667,11 @@ AC_DEFUN([JDKOPT_EXCLUDE_TRANSLATIONS],

################################################################################
#
# Optionally disable man pages
# Optionally disable man pages (deprecated)
#
AC_DEFUN([JDKOPT_ENABLE_DISABLE_MANPAGES],
[
UTIL_ARG_ENABLE(NAME: manpages, DEFAULT: true, RESULT: BUILD_MANPAGES,
DESC: [enable copying of static man pages],
CHECKING_MSG: [if static man pages should be copied])
AC_SUBST(BUILD_MANPAGES)
UTIL_DEPRECATED_ARG_ENABLE(manpages)
])

################################################################################
Expand Down Expand Up @@ -673,6 +699,37 @@ AC_DEFUN([JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE],
AC_SUBST(BUILD_CDS_ARCHIVE)
])

################################################################################
#
# Enable or disable the default CDS archive generation for Compact Object Headers
#
AC_DEFUN([JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE_COH],
[
UTIL_ARG_ENABLE(NAME: cds-archive-coh, DEFAULT: auto, RESULT: BUILD_CDS_ARCHIVE_COH,
DESC: [enable generation of default CDS archives for compact object headers (requires --enable-cds-archive)],
DEFAULT_DESC: [auto],
CHECKING_MSG: [if default CDS archives for compact object headers should be generated],
CHECK_AVAILABLE: [
AC_MSG_CHECKING([if CDS archive with compact object headers is available])
if test "x$BUILD_CDS_ARCHIVE" = "xfalse"; then
AC_MSG_RESULT([no (CDS default archive generation is disabled)])
AVAILABLE=false
elif test "x$OPENJDK_TARGET_CPU" != "xx86_64" &&
test "x$OPENJDK_TARGET_CPU" != "xaarch64" &&
test "x$OPENJDK_TARGET_CPU" != "xppc64" &&
test "x$OPENJDK_TARGET_CPU" != "xppc64le" &&
test "x$OPENJDK_TARGET_CPU" != "xriscv64" &&
test "x$OPENJDK_TARGET_CPU" != "xs390x"; then
AC_MSG_RESULT([no (compact object headers not supported for this platform)])
AVAILABLE=false
else
AC_MSG_RESULT([yes])
AVAILABLE=true
fi
])
AC_SUBST(BUILD_CDS_ARCHIVE_COH)
])

################################################################################
#
# Enable the alternative CDS core region alignment
Expand Down
18 changes: 9 additions & 9 deletions make/autoconf/platform.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2024, 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 @@ -666,14 +666,14 @@ AC_DEFUN([PLATFORM_CHECK_DEPRECATION],
[
AC_ARG_ENABLE(deprecated-ports, [AS_HELP_STRING([--enable-deprecated-ports@<:@=yes/no@:>@],
[Suppress the error when configuring for a deprecated port @<:@no@:>@])])
if test "x$OPENJDK_TARGET_OS" = xwindows && test "x$OPENJDK_TARGET_CPU" = xx86; then
if test "x$enable_deprecated_ports" = "xyes"; then
AC_MSG_WARN([The Windows 32-bit x86 port is deprecated and may be removed in a future release.])
else
AC_MSG_ERROR(m4_normalize([The Windows 32-bit x86 port is deprecated and may be removed in a future release.
Use --enable-deprecated-ports=yes to suppress this error.]))
fi
fi
# if test "x$OPENJDK_TARGET_CPU" = xx86; then
# if test "x$enable_deprecated_ports" = "xyes"; then
# AC_MSG_WARN([The x86 port is deprecated and may be removed in a future release.])
# else
# AC_MSG_ERROR(m4_normalize([The 32-bit x86 port is deprecated and may be removed in a future release.
# Use --enable-deprecated-ports=yes to suppress this error.]))
# fi
# fi
])

AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
Expand Down
7 changes: 5 additions & 2 deletions make/autoconf/spec.gmk.template
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,8 @@ ENABLE_GENERATE_CLASSLIST := @ENABLE_GENERATE_CLASSLIST@

EXCLUDE_TRANSLATIONS := @EXCLUDE_TRANSLATIONS@

BUILD_MANPAGES := @BUILD_MANPAGES@

BUILD_CDS_ARCHIVE := @BUILD_CDS_ARCHIVE@
BUILD_CDS_ARCHIVE_COH := @BUILD_CDS_ARCHIVE_COH@

ENABLE_COMPATIBLE_CDS_ALIGNMENT := @ENABLE_COMPATIBLE_CDS_ALIGNMENT@

Expand Down Expand Up @@ -707,6 +706,7 @@ NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS)

JMOD_COMPRESS := @JMOD_COMPRESS@
JLINK_KEEP_PACKAGED_MODULES := @JLINK_KEEP_PACKAGED_MODULES@
JLINK_PRODUCE_LINKABLE_RUNTIME := @JLINK_PRODUCE_LINKABLE_RUNTIME@

RCFLAGS := @RCFLAGS@

Expand Down Expand Up @@ -827,6 +827,9 @@ OS_VERSION_MAJOR := @OS_VERSION_MAJOR@
OS_VERSION_MINOR := @OS_VERSION_MINOR@
OS_VERSION_MICRO := @OS_VERSION_MICRO@

# Arm SVE
SVE_CFLAGS := @SVE_CFLAGS@

# Images directory definitions
JDK_IMAGE_SUBDIR := jdk
JRE_IMAGE_SUBDIR := jre
Expand Down
2 changes: 2 additions & 0 deletions make/autoconf/toolchain.m4
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
AC_MSG_ERROR([User supplied compiler $1=[$]$1 does not exist])
fi
fi
$1_IS_USER_SUPPLIED=true
else
# No user supplied value. Locate compiler ourselves.
Expand All @@ -462,6 +463,7 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
HELP_MSG_MISSING_DEPENDENCY([devkit])
AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
fi
$1_IS_USER_SUPPLIED=false
fi
# Now we have a compiler binary in $1. Make sure it's okay.
Expand Down
Loading

0 comments on commit aa91058

Please sign in to comment.