Skip to content

Commit 1380eee

Browse files
committed
Merge
2 parents d9071d6 + 3be50da commit 1380eee

File tree

610 files changed

+11250
-6413
lines changed

Some content is hidden

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

610 files changed

+11250
-6413
lines changed

.github/actions/get-msys2/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ runs:
3030
using: composite
3131
steps:
3232
- name: 'Install MSYS2'
33-
uses: msys2/setup-msys2@v2
33+
# use a specific release of msys2/setup-msys2 to prevent jtreg build failures on newer release
34+
uses: msys2/setup-msys2@7efe20baefed56359985e327d329042cde2434ff
3435
with:
3536
install: 'autoconf tar unzip zip make'
3637
path-type: minimal

make/Images.gmk

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2014, 2023, 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
@@ -29,6 +29,7 @@ include $(SPEC)
2929
include MakeBase.gmk
3030
include Execute.gmk
3131
include Modules.gmk
32+
include Utils.gmk
3233

3334
JDK_TARGETS :=
3435
JRE_TARGETS :=
@@ -39,7 +40,7 @@ $(eval $(call IncludeCustomExtension, Images-pre.gmk))
3940
################################################################################
4041

4142
# All modules for the current target platform.
42-
ALL_MODULES := $(call FindAllModules)
43+
ALL_MODULES := $(call FindAllModules) $(EXTRA_MODULES)
4344

4445
$(eval $(call ReadImportMetaData))
4546

@@ -54,7 +55,10 @@ JDK_MODULES_LIST := $(call CommaList, $(JDK_MODULES))
5455

5556
BASE_RELEASE_FILE := $(JDK_OUTPUTDIR)/release
5657

57-
JMODS := $(wildcard $(IMAGES_OUTPUTDIR)/jmods/*.jmod)
58+
JMODS_DIRS := $(EXTRA_JMODS_DIR) $(IMAGES_OUTPUTDIR)/jmods
59+
60+
JDK_JMODS := $(foreach m, $(JDK_MODULES), $(firstword $(wildcard $(addsuffix /$m.jmod, $(JMODS_DIRS)))))
61+
JRE_JMODS := $(foreach m, $(JRE_MODULES), $(firstword $(wildcard $(addsuffix /$m.jmod, $(JMODS_DIRS)))))
5862

5963
JLINK_ORDER_RESOURCES := **module-info.class
6064
JLINK_JLI_CLASSES :=
@@ -71,7 +75,7 @@ JLINK_ORDER_RESOURCES += \
7175
#
7276

7377
JLINK_TOOL := $(JLINK) -J-Djlink.debug=true \
74-
--module-path $(IMAGES_OUTPUTDIR)/jmods \
78+
--module-path $(call PathList, $(JMODS_DIRS)) \
7579
--endian $(OPENJDK_TARGET_CPU_ENDIAN) \
7680
--release-info $(BASE_RELEASE_FILE) \
7781
--order-resources=$(call CommaList, $(JLINK_ORDER_RESOURCES)) \
@@ -87,12 +91,15 @@ endif
8791

8892
JLINK_DISABLE_WARNINGS := | ( $(GREP) -v -e "WARNING: Using incubator module" || test "$$?" = "1" )
8993

94+
JDK_IMAGE_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk
95+
JRE_IMAGE_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jre
96+
9097
$(eval $(call SetupExecute, jlink_jdk, \
9198
WARN := Creating jdk image, \
92-
DEPS := $(JMODS) $(BASE_RELEASE_FILE) \
93-
$(call DependOnVariable, JDK_MODULES_LIST), \
99+
DEPS := $(JDK_JMODS) $(BASE_RELEASE_FILE) \
100+
$(call DependOnVariable, JDK_MODULES_LIST, $(JDK_IMAGE_SUPPORT_DIR)/_jlink_jdk.vardeps), \
94101
OUTPUT_DIR := $(JDK_IMAGE_DIR), \
95-
SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk, \
102+
SUPPORT_DIR := $(JDK_IMAGE_SUPPORT_DIR), \
96103
PRE_COMMAND := $(RM) -r $(JDK_IMAGE_DIR), \
97104
COMMAND := $(JLINK_TOOL) --add-modules $(JDK_MODULES_LIST) \
98105
$(JLINK_JDK_EXTRA_OPTS) --output $(JDK_IMAGE_DIR) \
@@ -103,10 +110,10 @@ JLINK_JDK_TARGETS := $(jlink_jdk)
103110

104111
$(eval $(call SetupExecute, jlink_jre, \
105112
WARN := Creating legacy jre image, \
106-
DEPS := $(JMODS) $(BASE_RELEASE_FILE) \
107-
$(call DependOnVariable, JDK_MODULES_LIST), \
113+
DEPS := $(JRE_JMODS) $(BASE_RELEASE_FILE) \
114+
$(call DependOnVariable, JRE_MODULES_LIST, $(JRE_IMAGE_SUPPORT_DIR)/_jlink_jre.vardeps), \
108115
OUTPUT_DIR := $(JRE_IMAGE_DIR), \
109-
SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jre, \
116+
SUPPORT_DIR := $(JRE_IMAGE_SUPPORT_DIR), \
110117
PRE_COMMAND := $(RM) -r $(JRE_IMAGE_DIR), \
111118
COMMAND := $(JLINK_TOOL) --add-modules $(JRE_MODULES_LIST) \
112119
$(JLINK_JRE_EXTRA_OPTS) --output $(JRE_IMAGE_DIR), \
@@ -142,7 +149,7 @@ define CreateCDSArchive
142149
INFO := Using CDS flags for $1: $$($1_$2_CDS_DUMP_FLAGS), \
143150
DEPS := $$(jlink_jdk), \
144151
OUTPUT_FILE := $$(JDK_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE), \
145-
SUPPORT_DIR := $$(SUPPORT_OUTPUTDIR)/images/jdk, \
152+
SUPPORT_DIR := $$(JDK_IMAGE_SUPPORT_DIR), \
146153
COMMAND := $$(FIXPATH) $$(JDK_IMAGE_DIR)/bin/java -Xshare:dump \
147154
-XX:SharedArchiveFile=$$(JDK_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE) \
148155
-$1 $$($1_$2_DUMP_EXTRA_ARG) $$($1_$2_CDS_DUMP_FLAGS) $$(LOG_INFO), \
@@ -155,7 +162,7 @@ define CreateCDSArchive
155162
INFO := Using CDS flags for $1: $$($1_$2_CDS_DUMP_FLAGS), \
156163
DEPS := $$(jlink_jre), \
157164
OUTPUT_FILE := $$(JRE_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE), \
158-
SUPPORT_DIR := $$(SUPPORT_OUTPUTDIR)/images/jre, \
165+
SUPPORT_DIR := $$(JRE_IMAGE_SUPPORT_DIR), \
159166
COMMAND := $$(FIXPATH) $$(JRE_IMAGE_DIR)/bin/java -Xshare:dump \
160167
-XX:SharedArchiveFile=$$(JRE_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE) \
161168
-$1 $$($1_$2_DUMP_EXTRA_ARG) $$($1_$2_CDS_DUMP_FLAGS) $$(LOG_INFO), \

make/Main.gmk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,8 @@ else
971971
# When creating the BUILDJDK, we don't need to add hashes to java.base, thus
972972
# we don't need to depend on all other jmods
973973
ifneq ($(CREATING_BUILDJDK), true)
974-
java.base-jmod: jrtfs-jar $(filter-out java.base-jmod, $(JMOD_TARGETS))
974+
java.base-jmod: jrtfs-jar $(filter-out java.base-jmod \
975+
$(addsuffix -jmod, $(call FindAllUpgradeableModules)), $(JMOD_TARGETS))
975976
endif
976977

977978
# If not already set, set the JVM target so that the JVM will be built.

make/MainSupport.gmk

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2023, 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
@@ -38,11 +38,16 @@ _MAINSUPPORT_GMK := 1
3838
# TARGET the makefile target
3939
# ARGS arguments to the makefile
4040
# DEPS the target(s) this new rule depends on
41+
# DIR the directory of the makefile (defaults to $(TOPDIR)/make)
4142
#
4243
SetupTarget = $(NamedParamsMacroTemplate)
4344
define SetupTargetBody
45+
ifeq ($$($1_DIR), )
46+
$1_DIR := $(TOPDIR)/make
47+
endif
48+
4449
$1:
45-
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f $$($1_MAKEFILE).gmk $$($1_TARGET) $$($1_ARGS))
50+
+($(CD) $$($1_DIR) && $(MAKE) $(MAKE_ARGS) -f $$($1_MAKEFILE).gmk $$($1_TARGET) $$($1_ARGS))
4651

4752
ALL_TARGETS += $1
4853

make/autoconf/jdk-options.m4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,9 @@ AC_DEFUN([JDKOPT_CHECK_CODESIGN_PARAMS],
822822
$RM "$CODESIGN_TESTFILE"
823823
$TOUCH "$CODESIGN_TESTFILE"
824824
CODESIGN_SUCCESS=false
825+
826+
$ECHO "check codesign, calling $CODESIGN $PARAMS $CODESIGN_TESTFILE" >&AS_MESSAGE_LOG_FD
827+
825828
eval \"$CODESIGN\" $PARAMS \"$CODESIGN_TESTFILE\" 2>&AS_MESSAGE_LOG_FD \
826829
>&AS_MESSAGE_LOG_FD && CODESIGN_SUCCESS=true
827830
$RM "$CODESIGN_TESTFILE"

make/autoconf/util.m4

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2023, 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
@@ -509,7 +509,7 @@ AC_DEFUN([UTIL_CHECK_TYPE_directory],
509509
FAILURE="Directory $1 does not exist or is not readable"
510510
fi
511511
512-
if test "[x]ARG_CHECK_FOR_FILES" != x; then
512+
if test "[x]ARG_CHECK_FOR_FILES" != "x:"; then
513513
for file in ARG_CHECK_FOR_FILES; do
514514
found_files=$($ECHO $(ls $1/$file 2> /dev/null))
515515
if test "x$found_files" = x; then
@@ -781,25 +781,25 @@ UTIL_DEFUN_NAMED([UTIL_ARG_WITH],
781781
else
782782
AC_MSG_RESULT([$ARG_RESULT, $REASON])
783783
fi
784-
fi
785784
786-
# Verify value
787-
# First use our dispatcher to verify that type requirements are satisfied
788-
UTIL_CHECK_TYPE(ARG_TYPE, $ARG_RESULT)
785+
# Verify value
786+
# First use our dispatcher to verify that type requirements are satisfied
787+
UTIL_CHECK_TYPE(ARG_TYPE, $ARG_RESULT)
789788
790-
if test "x$FAILURE" = x; then
791-
# Execute custom verification payload, if present
792-
RESULT="$ARG_RESULT"
789+
if test "x$FAILURE" = x; then
790+
# Execute custom verification payload, if present
791+
RESULT="$ARG_RESULT"
793792
794-
ARG_CHECK_VALUE
793+
ARG_CHECK_VALUE
795794
796-
ARG_RESULT="$RESULT"
797-
fi
795+
ARG_RESULT="$RESULT"
796+
fi
798797
799-
if test "x$FAILURE" != x; then
800-
AC_MSG_NOTICE([Invalid value for [--with-]ARG_NAME: "$ARG_RESULT"])
801-
AC_MSG_NOTICE([$FAILURE])
802-
AC_MSG_ERROR([Cannot continue])
798+
if test "x$FAILURE" != x; then
799+
AC_MSG_NOTICE([Invalid value for [--with-]ARG_NAME: "$ARG_RESULT"])
800+
AC_MSG_NOTICE([$FAILURE])
801+
AC_MSG_ERROR([Cannot continue])
802+
fi
803803
fi
804804
805805
# Execute result payloads, if present

make/common/NativeCompilation.gmk

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ endef
500500
# used both for C and C++.
501501
# LIBS_<toolchain> the libraries to link to for the specified toolchain,
502502
# used both for C and C++.
503-
# LIBS_<OS>_<toolchain> the libraries to link to for the specified target
503+
# LIBS_<toolchain>_<OS> the libraries to link to for the specified target
504504
# OS and toolchain, used both for C and C++.
505505
# ARFLAGS the archiver flags to be used
506506
# OBJECT_DIR the directory where we store the object files
@@ -1031,12 +1031,11 @@ define SetupNativeCompilationBody
10311031

10321032
# Pickup extra OPENJDK_TARGET_OS_TYPE, OPENJDK_TARGET_OS and TOOLCHAIN_TYPE
10331033
# dependent variables for LDFLAGS and LIBS, and additionally the pair dependent
1034-
# TOOLCHAIN_TYPE plus OPENJDK_TARGET_OS for LDFLAGS, or OPENJDK_TARGET_OS plus
1035-
# TOOLCHAIN_TYPE for LIBS
1034+
# TOOLCHAIN_TYPE plus OPENJDK_TARGET_OS
10361035
$1_EXTRA_LDFLAGS += $$($1_LDFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS)) \
10371036
$$($1_LDFLAGS_$(TOOLCHAIN_TYPE)) $$($1_LDFLAGS_$(TOOLCHAIN_TYPE)_$(OPENJDK_TARGET_OS))
10381037
$1_EXTRA_LIBS += $$($1_LIBS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LIBS_$(OPENJDK_TARGET_OS)) \
1039-
$$($1_LIBS_$(OPENJDK_TARGET_OS)_$(TOOLCHAIN_TYPE)) $$($1_LIBS_$(TOOLCHAIN_TYPE))
1038+
$$($1_LIBS_$(TOOLCHAIN_TYPE)) $$($1_LIBS_$(TOOLCHAIN_TYPE)_$(OPENJDK_TARGET_OS))
10401039

10411040
ifneq ($$($1_REAL_MAPFILE), )
10421041
$1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))

make/data/hotspot-symbols/symbols-unix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ JVM_SetNativeThreadName
200200
JVM_SetPrimitiveArrayElement
201201
JVM_SetStackWalkContinuation
202202
JVM_SetThreadPriority
203-
JVM_Sleep
203+
JVM_SleepNanos
204204
JVM_StartThread
205205
JVM_SupportsCX8
206206
JVM_TotalMemory

src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,15 @@ void Runtime1::generate_unwind_exception(StubAssembler *sasm) {
478478
const Register exception_pc = r3;
479479
const Register handler_addr = r1;
480480

481+
if (AbortVMOnException) {
482+
__ mov(rscratch1, exception_oop);
483+
__ enter();
484+
save_live_registers(sasm);
485+
__ call_VM_leaf(CAST_FROM_FN_PTR(address, check_abort_on_vm_exception), rscratch1);
486+
restore_live_registers(sasm);
487+
__ leave();
488+
}
489+
481490
// verify that only r0, is valid at this time
482491
__ invalidate_registers(false, true, true, true, true, true);
483492

src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include "code/codeCache.inline.hpp"
3131
#include "code/vmreg.inline.hpp"
3232
#include "interpreter/interpreter.hpp"
33-
#include "interpreter/oopMapCache.hpp"
3433
#include "runtime/sharedRuntime.hpp"
3534
#include "pauth_aarch64.hpp"
3635

0 commit comments

Comments
 (0)