Skip to content

Commit 2508de4

Browse files
Merge tag 'jdk-25+11' into labsjdk/adopt-jdk-25+11-master
Added tag jdk-25+11 for changeset 0131c1b
2 parents 407f5fa + 0131c1b commit 2508de4

File tree

447 files changed

+8887
-3650
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

447 files changed

+8887
-3650
lines changed

make/Main.gmk

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,17 @@ $(eval $(call SetupTarget, test-image-lib, \
753753
DEPS := build-test-lib, \
754754
))
755755

756+
$(eval $(call SetupTarget, build-test-setup-aot, \
757+
MAKEFILE := test/BuildTestSetupAOT, \
758+
DEPS := interim-langtools exploded-image, \
759+
))
760+
761+
$(eval $(call SetupTarget, test-image-setup-aot, \
762+
MAKEFILE := test/BuildTestSetupAOT, \
763+
TARGET := images, \
764+
DEPS := build-test-setup-aot, \
765+
))
766+
756767
ifeq ($(BUILD_FAILURE_HANDLER), true)
757768
# Builds the failure handler jtreg extension
758769
$(eval $(call SetupTarget, build-test-failure-handler, \
@@ -1281,7 +1292,8 @@ all-docs-bundles: docs-jdk-bundles docs-javase-bundles docs-reference-bundles
12811292
# This target builds the test image
12821293
test-image: prepare-test-image test-image-jdk-jtreg-native \
12831294
test-image-demos-jdk test-image-libtest-jtreg-native \
1284-
test-image-lib test-image-lib-native
1295+
test-image-lib test-image-lib-native \
1296+
test-image-setup-aot
12851297

12861298
ifneq ($(JVM_TEST_IMAGE_TARGETS), )
12871299
# If JVM_TEST_IMAGE_TARGETS is externally defined, use it instead of the

make/RunTests.gmk

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,9 @@ define SetJtregValue
703703
endif
704704
endef
705705

706+
################################################################################
707+
# Helper function for creating a customized AOT cache for running tests
708+
################################################################################
706709

707710
# Parameter 1 is the name of the rule.
708711
#
@@ -713,48 +716,47 @@ endef
713716
# $1_AOT_TARGETS List of all targets that the test rule will need to depend on
714717
# $1_AOT_JDK_CACHE The AOT cache file to be used to run the test with
715718
#
716-
SetupAot = $(NamedParamsMacroTemplate)
717-
define SetupAotBody
718-
$1_AOT_JDK_CONF := $$($1_TEST_SUPPORT_DIR)/aot/jdk.aotconf
719+
SetupAOT = $(NamedParamsMacroTemplate)
720+
define SetupAOTBody
721+
$1_AOT_JDK_CONF := $$($1_TEST_SUPPORT_DIR)/aot/jdk.aotconf
719722
$1_AOT_JDK_CACHE := $$($1_TEST_SUPPORT_DIR)/aot/jdk.aotcache
720-
721-
$1_JAVA_TOOL_OPTS := $$(addprefix -J, $$($1_VM_OPTIONS))
723+
$1_AOT_JDK_LOG := $$($1_TEST_SUPPORT_DIR)/aot/TestSetupAOT.log
724+
725+
# We execute the training run with $(TEST_IMAGE_DIR)/setup_aot/TestSetupAOT.class
726+
# to touch a fair number of classes inside the JDK. Note that we can't specify a classpath,
727+
# or else the AOT cache cannot be used with jtreg test cases that use a different value
728+
# for their classpaths. Instead, we run in the $(TEST_IMAGE_DIR)/setup_aot/ directory.
729+
# The "java" launcher will have an implicit classpath of ".", so it can pick up the TestSetupAOT
730+
# class from the JVM's current directory.
731+
#
732+
# The TestSetupAOT class (or any other classes that are loaded from ".") will be excluded
733+
# from the the AOT cache as "." is an unsupported location. As a result, the AOT cache will contain
734+
# only classes from the JDK.
722735

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

726-
$(foreach jtool, javac javap jlink jar, \
727-
$(info AOT: Create cache configuration for $(jtool)) \
728-
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot.$(jtool), ( \
729-
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/$(jtool) $$($1_JAVA_TOOL_OPTS) \
730-
-J-XX:AOTMode=record -J-XX:AOTConfiguration=$$($1_AOT_JDK_CONF).$(jtool) --help \
731-
))
732-
)
733-
734-
$$(info AOT: Copy $(JDK_UNDER_TEST)/lib/classlist to $$($1_AOT_JDK_CONF).jdk )
739+
$$(call LogWarn, AOT: Create cache configuration) \
735740
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot, ( \
736-
$$(FIXPATH) $(CP) $(JDK_UNDER_TEST)/lib/classlist $$($1_AOT_JDK_CONF).jdk \
741+
$(CD) $(TEST_IMAGE_DIR)/setup_aot; \
742+
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java $$($1_VM_OPTIONS) \
743+
-Xlog:cds,cds+class=debug:file=$$($1_AOT_JDK_CONF).log -Xlog:cds*=error \
744+
-XX:AOTMode=record -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) \
745+
TestSetupAOT > $$($1_AOT_JDK_LOG) \
737746
))
738747

739-
$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).* > $$($1_AOT_JDK_CONF).temp
740-
$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).temp | $(GREP) -v '#' | $(GREP) -v '@' | $(SORT) | \
741-
$(SED) -e 's/id:.*//g' | uniq \
742-
> $$($1_AOT_JDK_CONF)
743-
$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).temp | $(GREP) '@cp' | $(SORT) \
744-
>> $$($1_AOT_JDK_CONF)
745-
746-
$$(info AOT: Generate AOT cache $$($1_AOT_JDK_CACHE) with flags: $$($1_VM_OPTIONS))
748+
$$(call LogWarn, AOT: Generate AOT cache $$($1_AOT_JDK_CACHE) with flags: $$($1_VM_OPTIONS))
747749
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot, ( \
748-
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java \
749-
$$($1_VM_OPTIONS) -Xlog:cds,cds+class=debug:file=$$($1_AOT_JDK_CACHE).log \
750-
-XX:AOTMode=create -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) -XX:AOTCache=$$($1_AOT_JDK_CACHE) \
750+
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java \
751+
$$($1_VM_OPTIONS) -Xlog:cds,cds+class=debug:file=$$($1_AOT_JDK_CACHE).log -Xlog:cds*=error \
752+
-XX:ExtraSharedClassListFile=$(JDK_UNDER_TEST)/lib/classlist \
753+
-XX:AOTMode=create -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) -XX:AOTCache=$$($1_AOT_JDK_CACHE) \
751754
))
752755

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

755758
endef
756759

757-
758760
SetupRunJtregTest = $(NamedParamsMacroTemplate)
759761
define SetupRunJtregTestBody
760762
$1_TEST_RESULTS_DIR := $$(TEST_RESULTS_DIR)/$1
@@ -946,11 +948,10 @@ define SetupRunJtregTestBody
946948
endif
947949

948950
ifeq ($$(JTREG_AOT_JDK), true)
949-
$$(info Add AOT target for $1)
950-
$$(eval $$(call SetupAot, $1, VM_OPTIONS := $$(JTREG_ALL_OPTIONS) ))
951+
$$(call LogWarn, Add AOT target for $1)
952+
$$(eval $$(call SetupAOT, $1, VM_OPTIONS := $$(JTREG_ALL_OPTIONS) ))
951953

952-
$$(info AOT_TARGETS=$$($1_AOT_TARGETS))
953-
$$(info AOT_JDK_CACHE=$$($1_AOT_JDK_CACHE))
954+
$$(call LogWarn, AOT_JDK_CACHE=$$($1_AOT_JDK_CACHE))
954955

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

make/autoconf/flags-cflags.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
719719
elif test "x$FLAGS_CPU" = xppc64le; then
720720
# Little endian machine uses ELFv2 ABI.
721721
# Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
722-
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power8"
722+
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power10"
723723
fi
724724
elif test "x$FLAGS_CPU" = xs390x; then
725725
$1_CFLAGS_CPU="-mbackchain -march=z10"
@@ -740,7 +740,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
740740
if test "x$FLAGS_CPU" = xppc64le; then
741741
# Little endian machine uses ELFv2 ABI.
742742
# Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
743-
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power8"
743+
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power10"
744744
fi
745745
fi
746746
if test "x$OPENJDK_TARGET_OS" = xaix; then

make/autoconf/jdk-options.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,10 +516,11 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER],
516516
OPTIONAL: true)
517517
518518
# GCC reports lots of likely false positives for stringop-truncation and format-overflow.
519+
# GCC 13 also for array-bounds and stringop-overflow
519520
# Silence them for now.
520521
UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment \
521522
$ADDITIONAL_UBSAN_CHECKS"
522-
UBSAN_CFLAGS="$UBSAN_CHECKS -Wno-stringop-truncation -Wno-format-overflow -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER"
523+
UBSAN_CFLAGS="$UBSAN_CHECKS -Wno-stringop-truncation -Wno-format-overflow -Wno-array-bounds -Wno-stringop-overflow -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER"
523524
UBSAN_LDFLAGS="$UBSAN_CHECKS"
524525
UTIL_ARG_ENABLE(NAME: ubsan, DEFAULT: false, RESULT: UBSAN_ENABLED,
525526
DESC: [enable UndefinedBehaviorSanitizer],

make/autoconf/lib-tests.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
2828
################################################################################
2929

3030
# Minimum supported versions
31-
JTREG_MINIMUM_VERSION=7.4
31+
JTREG_MINIMUM_VERSION=7.5.1
3232
GTEST_MINIMUM_VERSION=1.14.0
3333

3434
################################################################################

make/conf/github-actions.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
2626
# Versions and download locations for dependencies used by GitHub Actions (GHA)
2727

2828
GTEST_VERSION=1.14.0
29-
JTREG_VERSION=7.4+1
29+
JTREG_VERSION=7.5.1+1
3030

3131
LINUX_X64_BOOT_JDK_EXT=tar.gz
3232
LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk23/3c5b90190c68498b986a97f276efd28a/37/GPL/openjdk-23_linux-x64_bin.tar.gz

make/conf/jib-profiles.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,9 +1199,9 @@ var getJibProfilesDependencies = function (input, common) {
11991199
jtreg: {
12001200
server: "jpg",
12011201
product: "jtreg",
1202-
version: "7.4",
1202+
version: "7.5.1",
12031203
build_number: "1",
1204-
file: "bundles/jtreg-7.4+1.zip",
1204+
file: "bundles/jtreg-7.5.1+1.zip",
12051205
environment_name: "JT_HOME",
12061206
environment_path: input.get("jtreg", "home_path") + "/bin",
12071207
configure_args: "--with-jtreg=" + input.get("jtreg", "home_path"),

make/modules/java.desktop/lib/ClientLibraries.gmk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
226226
EXCLUDE_SRC_PATTERNS := $(LIBSPLASHSCREEN_EXCLUDE_SRC_PATTERNS), \
227227
EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
228228
EXCLUDES := $(LIBSPLASHSCREEN_EXCLUDES), \
229-
OPTIMIZATION := LOW, \
229+
OPTIMIZATION := SIZE, \
230230
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) \
231231
$(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS), \
232232
CXXFLAGS := $(LIBSPLASHSCREEN_CFLAGS) \
@@ -407,6 +407,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
407407
LDFLAGS_aix := -Wl$(COMMA)-berok, \
408408
JDK_LIBS := libawt java.base:libjava $(LIBFONTMANAGER_JDK_LIBS), \
409409
JDK_LIBS_macosx := libawt_lwawt, \
410+
JDK_LIBS_unix := java.base:libjvm, \
410411
LIBS := $(LIBFONTMANAGER_LIBS), \
411412
LIBS_unix := $(LIBM), \
412413
LIBS_macosx := \

make/test/BuildTestLib.gmk

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,14 @@ $(eval $(call SetupJavaCompilation, BUILD_WB_JAR, \
5252

5353
TARGETS += $(BUILD_WB_JAR)
5454

55+
ifeq ($(call isTargetOs, linux), false)
56+
BUILD_TEST_LIB_JAR_EXCLUDES := jdk/test/lib/containers
57+
endif
58+
5559
$(eval $(call SetupJavaCompilation, BUILD_TEST_LIB_JAR, \
5660
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
5761
SRC := $(TEST_LIB_SOURCE_DIR), \
58-
EXCLUDES := jdk/test/lib/containers jdk/test/lib/security, \
62+
EXCLUDES := $(BUILD_TEST_LIB_JAR_EXCLUDES), \
5963
BIN := $(TEST_LIB_SUPPORT)/test-lib_classes, \
6064
HEADERS := $(TEST_LIB_SUPPORT)/test-lib_headers, \
6165
JAR := $(TEST_LIB_SUPPORT)/test-lib.jar, \
@@ -64,6 +68,11 @@ $(eval $(call SetupJavaCompilation, BUILD_TEST_LIB_JAR, \
6468
--add-exports java.base/jdk.internal.classfile.attribute=ALL-UNNAMED \
6569
--add-exports java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED \
6670
--add-exports java.base/jdk.internal.module=ALL-UNNAMED \
71+
--add-exports java.base/jdk.internal.platform=ALL-UNNAMED \
72+
--add-exports java.base/sun.security.pkcs=ALL-UNNAMED \
73+
--add-exports java.base/sun.security.provider.certpath=ALL-UNNAMED \
74+
--add-exports java.base/sun.security.tools.keytool=ALL-UNNAMED \
75+
--add-exports java.base/sun.security.x509=ALL-UNNAMED \
6776
--enable-preview, \
6877
))
6978

make/test/BuildTestSetupAOT.gmk

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#
2+
# Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
3+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
#
5+
# This code is free software; you can redistribute it and/or modify it
6+
# under the terms of the GNU General Public License version 2 only, as
7+
# published by the Free Software Foundation. Oracle designates this
8+
# particular file as subject to the "Classpath" exception as provided
9+
# by Oracle in the LICENSE file that accompanied this code.
10+
#
11+
# This code is distributed in the hope that it will be useful, but WITHOUT
12+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
# version 2 for more details (a copy is included in the LICENSE file that
15+
# accompanied this code).
16+
#
17+
# You should have received a copy of the GNU General Public License version
18+
# 2 along with this work; if not, write to the Free Software Foundation,
19+
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20+
#
21+
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22+
# or visit www.oracle.com if you need additional information or have any
23+
# questions.
24+
#
25+
26+
include MakeFileStart.gmk
27+
28+
################################################################################
29+
# This file builds the TestSetupAOT.class, which is used by SetupAOT
30+
# in ../RunTests.gmk
31+
################################################################################
32+
33+
include CopyFiles.gmk
34+
include JavaCompilation.gmk
35+
36+
################################################################################
37+
38+
SETUP_AOT_BASEDIR := $(TOPDIR)/test/setup_aot
39+
SETUP_AOT_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/setup_aot
40+
SETUP_AOT_CLASS := $(SETUP_AOT_SUPPORT)/classes/TestSetupAOT.class
41+
42+
$(eval $(call SetupJavaCompilation, BUILD_SETUP_AOT, \
43+
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
44+
SRC := $(SETUP_AOT_BASEDIR), \
45+
BIN := $(SETUP_AOT_SUPPORT)/classes, \
46+
))
47+
48+
TARGETS += $(BUILD_SETUP_AOT)
49+
50+
################################################################################
51+
# Targets for building test-image.
52+
################################################################################
53+
54+
# Copy to hotspot jtreg test image
55+
$(eval $(call SetupCopyFiles, COPY_SETUP_AOT, \
56+
SRC := $(SETUP_AOT_SUPPORT)/classes, \
57+
DEST := $(TEST_IMAGE_DIR)/setup_aot, \
58+
FILES := TestSetupAOT.class, \
59+
))
60+
61+
IMAGES_TARGETS += $(COPY_SETUP_AOT)
62+
63+
images: $(IMAGES_TARGETS)
64+
65+
.PHONY: images
66+
67+
################################################################################
68+
69+
include MakeFileEnd.gmk

0 commit comments

Comments
 (0)