Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream-amber/master' into matchers-ex…
Browse files Browse the repository at this point in the history
…periment

# Conflicts:
#	test/jdk/jdk/classfile/helpers/RebuildingTransformation.java
  • Loading branch information
biboudis committed Dec 3, 2024
2 parents f0f9b58 + 959fa4a commit c14bbc8
Show file tree
Hide file tree
Showing 2,057 changed files with 67,534 additions and 63,443 deletions.
22 changes: 1 addition & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ on:
platforms:
description: 'Platform(s) to execute on (comma separated, e.g. "linux-x64, macos, aarch64")'
required: true
default: 'linux-x64, linux-x86-hs, linux-x64-variants, linux-cross-compile, alpine-linux-x64, macos-x64, macos-aarch64, windows-x64, windows-aarch64, docs'
default: 'linux-x64, linux-x64-variants, linux-cross-compile, alpine-linux-x64, macos-x64, macos-aarch64, windows-x64, windows-aarch64, docs'
configure-arguments:
description: 'Additional configure arguments'
required: false
Expand All @@ -62,7 +62,6 @@ jobs:
EXCLUDED_PLATFORMS: 'alpine-linux-x64'
outputs:
linux-x64: ${{ steps.include.outputs.linux-x64 }}
linux-x86-hs: ${{ steps.include.outputs.linux-x86-hs }}
linux-x64-variants: ${{ steps.include.outputs.linux-x64-variants }}
linux-cross-compile: ${{ steps.include.outputs.linux-cross-compile }}
alpine-linux-x64: ${{ steps.include.outputs.alpine-linux-x64 }}
Expand Down Expand Up @@ -145,7 +144,6 @@ jobs:
}
echo "linux-x64=$(check_platform linux-x64 linux x64)" >> $GITHUB_OUTPUT
echo "linux-x86-hs=$(check_platform linux-x86-hs linux x86)" >> $GITHUB_OUTPUT
echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
echo "alpine-linux-x64=$(check_platform alpine-linux-x64 alpine-linux x64)" >> $GITHUB_OUTPUT
Expand All @@ -170,24 +168,6 @@ jobs:
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.prepare.outputs.linux-x64 == 'true'

build-linux-x86-hs:
name: linux-x86-hs
needs: prepare
uses: ./.github/workflows/build-linux.yml
with:
platform: linux-x86
make-target: 'hotspot'
gcc-major-version: '10'
gcc-package-suffix: '-multilib'
apt-architecture: 'i386'
# Some multilib libraries do not have proper inter-dependencies, so we have to
# install their dependencies manually.
apt-extra-packages: 'libfreetype-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libffi-dev:i386'
extra-conf-options: '--with-target-bits=32 --enable-fallback-linker --enable-libffi-bundling'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.prepare.outputs.linux-x86-hs == 'true'

build-linux-x64-hs-nopch:
name: linux-x64-hs-nopch
needs: prepare
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ NashornProfile.txt
/.settings/
/compile_commands.json
/.cache
/.gdbinit
/.lldbinit
7 changes: 3 additions & 4 deletions doc/building.html
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ <h3 id="building-on-x86">Building on x86</h3>
<p>Even for 32-bit builds, it is recommended to use a 64-bit build
machine, and instead create a 32-bit target using
<code>--with-target-bits=32</code>.</p>
<p>Note: The Windows 32-bit x86 port is deprecated and may be removed in
a future release.</p>
<p>Note: The 32-bit x86 port is deprecated and may be removed in a
future release.</p>
<h3 id="building-on-aarch64">Building on aarch64</h3>
<p>At a minimum, a machine with 8 cores is advisable, as well as 8 GB of
RAM. (The more cores to use, the more memory you need.) At least 6 GB of
Expand Down Expand Up @@ -393,8 +393,7 @@ <h2 id="operating-system-requirements">Operating System
to list successes or failures of building on different platforms.</p>
<h3 id="windows">Windows</h3>
<p>Windows XP is not a supported platform, but all newer Windows should
be able to build the JDK. (Note: The Windows 32-bit x86 port is
deprecated and may be removed in a future release.)</p>
be able to build the JDK.</p>
<p>On Windows, it is important that you pay attention to the
instructions in the <a href="#special-considerations">Special
Considerations</a>.</p>
Expand Down
6 changes: 2 additions & 4 deletions doc/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ space is required.
Even for 32-bit builds, it is recommended to use a 64-bit build machine, and
instead create a 32-bit target using `--with-target-bits=32`.

Note: The Windows 32-bit x86 port is deprecated and may be removed in a future
release.
Note: The 32-bit x86 port is deprecated and may be removed in a future release.

### Building on aarch64

Expand Down Expand Up @@ -191,8 +190,7 @@ on different platforms.
### Windows

Windows XP is not a supported platform, but all newer Windows should be able to
build the JDK. (Note: The Windows 32-bit x86 port is deprecated and may be
removed in a future release.)
build the JDK.

On Windows, it is important that you pay attention to the instructions in the
[Special Considerations](#special-considerations).
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
6 changes: 5 additions & 1 deletion make/Main.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -1344,9 +1344,13 @@ test-hotspot-jtreg-native: test-hotspot_native_sanity
test-hotspot-gtest: exploded-test-gtest
test-jdk-jtreg-native: test-jdk_native_sanity

# Set dependencies for doc tests
$(eval $(call AddTestDependency, docs_all, docs-jdk))
test-docs: test-docs_all

ALL_TARGETS += $(RUN_TEST_TARGETS) run-test exploded-run-test check \
test-hotspot-jtreg test-hotspot-jtreg-native test-hotspot-gtest \
test-jdk-jtreg-native
test-jdk-jtreg-native test-docs

################################################################################
################################################################################
Expand Down
9 changes: 9 additions & 0 deletions make/MainSupport.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ define CleanModule
$(call Clean-include, $1)
endef

define AddTestDependency
test-$(strip $1): $2

exploded-test-$(strip $1): $2

ifneq ($(filter $(TEST), $1), )
TEST_DEPS += $2
endif
endef

################################################################################

Expand Down
72 changes: 69 additions & 3 deletions make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ifneq ($(TEST_VM_OPTS), )
endif

$(eval $(call ParseKeywordVariable, TEST_OPTS, \
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR JCOV JCOV_DIFF_CHANGESET, \
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR JCOV JCOV_DIFF_CHANGESET AOT_JDK, \
STRING_KEYWORDS := VM_OPTIONS JAVA_OPTIONS, \
))

Expand Down Expand Up @@ -202,11 +202,12 @@ $(eval $(call SetTestOpt,JOBS,JTREG))
$(eval $(call SetTestOpt,TIMEOUT_FACTOR,JTREG))
$(eval $(call SetTestOpt,FAILURE_HANDLER_TIMEOUT,JTREG))
$(eval $(call SetTestOpt,REPORT,JTREG))
$(eval $(call SetTestOpt,AOT_JDK,JTREG))

$(eval $(call ParseKeywordVariable, JTREG, \
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR FAILURE_HANDLER_TIMEOUT \
TEST_MODE ASSERT VERBOSE RETAIN TEST_THREAD_FACTORY MAX_MEM RUN_PROBLEM_LISTS \
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT AOT_JDK $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS \
$(CUSTOM_JTREG_STRING_KEYWORDS), \
Expand Down Expand Up @@ -702,6 +703,58 @@ define SetJtregValue
endif
endef


# Parameter 1 is the name of the rule.
#
# Remaining parameters are named arguments.
# VM_OPTIONS List of JVM arguments to use when creating AOT cache
#
# After calling this, the following variables are defined
# $1_AOT_TARGETS List of all targets that the test rule will need to depend on
# $1_AOT_JDK_CACHE The AOT cache file to be used to run the test with
#
SetupAot = $(NamedParamsMacroTemplate)
define SetupAotBody
$1_AOT_JDK_CONF := $$($1_TEST_SUPPORT_DIR)/aot/jdk.aotconf
$1_AOT_JDK_CACHE := $$($1_TEST_SUPPORT_DIR)/aot/jdk.aotcache

$1_JAVA_TOOL_OPTS := $$(addprefix -J, $$($1_VM_OPTIONS))

$$($1_AOT_JDK_CACHE): $$(JDK_IMAGE_DIR)/release
$$(call MakeDir, $$($1_TEST_SUPPORT_DIR)/aot)

$(foreach jtool, javac javap jlink jar, \
$(info AOT: Create cache configuration for $(jtool)) \
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot.$(jtool), ( \
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/$(jtool) $$($1_JAVA_TOOL_OPTS) \
-J-XX:AOTMode=record -J-XX:AOTConfiguration=$$($1_AOT_JDK_CONF).$(jtool) --help \
))
)

$$(info AOT: Copy $(JDK_UNDER_TEST)/lib/classlist to $$($1_AOT_JDK_CONF).jdk )
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot, ( \
$$(FIXPATH) $(CP) $(JDK_UNDER_TEST)/lib/classlist $$($1_AOT_JDK_CONF).jdk \
))

$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).* > $$($1_AOT_JDK_CONF).temp
$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).temp | $(GREP) -v '#' | $(GREP) -v '@' | $(SORT) | \
$(SED) -e 's/id:.*//g' | uniq \
> $$($1_AOT_JDK_CONF)
$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).temp | $(GREP) '@cp' | $(SORT) \
>> $$($1_AOT_JDK_CONF)

$$(info AOT: Generate AOT cache $$($1_AOT_JDK_CACHE) with flags: $$($1_VM_OPTIONS))
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot, ( \
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java \
$$($1_VM_OPTIONS) -Xlog:cds,cds+class=debug:file=$$($1_AOT_JDK_CACHE).log \
-XX:AOTMode=create -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) -XX:AOTCache=$$($1_AOT_JDK_CACHE) \
))

$1_AOT_TARGETS += $$($1_AOT_JDK_CACHE)

endef


SetupRunJtregTest = $(NamedParamsMacroTemplate)
define SetupRunJtregTestBody
$1_TEST_RESULTS_DIR := $$(TEST_RESULTS_DIR)/$1
Expand Down Expand Up @@ -762,6 +815,7 @@ define SetupRunJtregTestBody
JTREG_RETRY_COUNT ?= 0
JTREG_REPEAT_COUNT ?= 0
JTREG_REPORT ?= files
JTREG_AOT_JDK ?= false

ifneq ($$(JTREG_RETRY_COUNT), 0)
ifneq ($$(JTREG_REPEAT_COUNT), 0)
Expand Down Expand Up @@ -891,6 +945,17 @@ define SetupRunJtregTestBody
endif
endif

ifeq ($$(JTREG_AOT_JDK), true)
$$(info Add AOT target for $1)
$$(eval $$(call SetupAot, $1, VM_OPTIONS := $$(JTREG_ALL_OPTIONS) ))

$$(info AOT_TARGETS=$$($1_AOT_TARGETS))
$$(info AOT_JDK_CACHE=$$($1_AOT_JDK_CACHE))

$1_JTREG_BASIC_OPTIONS += -vmoption:-XX:AOTCache="$$($1_AOT_JDK_CACHE)"
endif


$$(eval $$(call SetupRunJtregTestCustom, $1))

# SetupRunJtregTestCustom might also adjust JTREG_AUTO_ variables
Expand All @@ -906,6 +971,7 @@ define SetupRunJtregTestBody
JTREG_TIMEOUT_FACTOR ?= $$(JTREG_AUTO_TIMEOUT_FACTOR)

clean-outputdirs-$1:
$$(call LogWarn, Clean up dirs for $1)
$$(RM) -r $$($1_TEST_SUPPORT_DIR)
$$(RM) -r $$($1_TEST_RESULTS_DIR)

Expand Down Expand Up @@ -953,7 +1019,7 @@ define SetupRunJtregTestBody
done
endif

run-test-$1: pre-run-test clean-outputdirs-$1
run-test-$1: clean-outputdirs-$1 pre-run-test $$($1_AOT_TARGETS)
$$(call LogWarn)
$$(call LogWarn, Running test '$$($1_TEST)')
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR) \
Expand Down
4 changes: 2 additions & 2 deletions make/ZipSecurity.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 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 @@ -27,7 +27,7 @@ default: all

include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include ZipArchive.gmk

################################################################################
#
Expand Down
4 changes: 2 additions & 2 deletions make/ZipSource.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, 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 @@ -27,8 +27,8 @@ default: all

include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include Modules.gmk
include ZipArchive.gmk

SRC_ZIP_WORK_DIR := $(SUPPORT_OUTPUTDIR)/src
$(if $(filter $(TOPDIR)/%, $(SUPPORT_OUTPUTDIR)), $(eval SRC_ZIP_BASE := $(TOPDIR)), $(eval SRC_ZIP_BASE := $(SUPPORT_OUTPUTDIR)))
Expand Down
16 changes: 8 additions & 8 deletions make/autoconf/platform.m4
Original file line number Diff line number Diff line change
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_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
if test "x$OPENJDK_TARGET_CPU" = xx86; then
if test "x$enable_deprecated_ports" = "xyes"; then
AC_MSG_WARN([The 32-bit 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
10 changes: 0 additions & 10 deletions make/common/modules/LauncherCommon.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,8 @@ ifeq ($(call isTargetOsType, unix)+$(MAKEFILE_PREFIX), true+Launcher)
# We assume all our man pages should reside in section 1.

MAN_FILES_MD := $(wildcard $(addsuffix /*.md, $(call FindModuleManDirs, $(MODULE))))
MAN_FILES_TROFF := $(wildcard $(addsuffix /*.1, $(call FindModuleManDirs, $(MODULE))))

ifneq ($(MAN_FILES_MD), )
# If we got markdown files, ignore the troff files
ifeq ($(ENABLE_PANDOC), false)
$(info Warning: pandoc not found. Not generating man pages)
else
Expand Down Expand Up @@ -226,13 +224,5 @@ ifeq ($(call isTargetOsType, unix)+$(MAKEFILE_PREFIX), true+Launcher)

TARGETS += $(BUILD_MAN_PAGES)
endif
else
# No markdown man pages present
$(eval $(call SetupCopyFiles, COPY_MAN_PAGES, \
DEST := $(SUPPORT_OUTPUTDIR)/modules_man/$(MODULE)/man1, \
FILES := $(MAN_FILES_TROFF), \
))

TARGETS += $(COPY_MAN_PAGES)
endif
endif
1 change: 1 addition & 0 deletions make/conf/jib-profiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ var getJibProfilesCommon = function (input, data) {
configure_args: concat(
"--with-exclude-translations=es,fr,it,ko,pt_BR,sv,ca,tr,cs,sk,ja_JP_A,ja_JP_HA,ja_JP_HI,ja_JP_I,zh_TW,zh_HK",
"--disable-jvm-feature-shenandoahgc",
"--disable-cds-archive-coh",
versionArgs(input, common))
};

Expand Down
4 changes: 4 additions & 0 deletions make/hotspot/lib/JvmOverrideFiles.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ ifeq ($(TOOLCHAIN_TYPE), gcc)
# Need extra inlining to collapse shared marking code into the hot marking loop
BUILD_LIBJVM_shenandoahMark.cpp_CXXFLAGS := --param inline-unit-growth=1000
endif
# disable lto in g1ParScanThreadState because of special inlining/flattening used there
ifeq ($(call check-jvm-feature, link-time-opt), true)
BUILD_LIBJVM_g1ParScanThreadState.cpp_CXXFLAGS := -fno-lto
endif
endif

LIBJVM_FDLIBM_COPY_OPT_FLAG := $(CXX_O_FLAG_NONE)
Expand Down
12 changes: 0 additions & 12 deletions make/modules/java.desktop/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,6 @@ EXCLUDE_FILES += \
javax/swing/plaf/nimbus/SpinnerPainter.java \
javax/swing/plaf/nimbus/SplitPanePainter.java \
javax/swing/plaf/nimbus/TabbedPanePainter.java \
sun/awt/resources/security-icon-bw16.png \
sun/awt/resources/security-icon-bw24.png \
sun/awt/resources/security-icon-bw32.png \
sun/awt/resources/security-icon-bw48.png \
sun/awt/resources/security-icon-interim16.png \
sun/awt/resources/security-icon-interim24.png \
sun/awt/resources/security-icon-interim32.png \
sun/awt/resources/security-icon-interim48.png \
sun/awt/resources/security-icon-yellow16.png \
sun/awt/resources/security-icon-yellow24.png \
sun/awt/resources/security-icon-yellow32.png \
sun/awt/resources/security-icon-yellow48.png \
sun/awt/X11/java-icon16.png \
sun/awt/X11/java-icon24.png \
sun/awt/X11/java-icon32.png \
Expand Down
Loading

0 comments on commit c14bbc8

Please sign in to comment.