Skip to content

Commit 1c85924

Browse files
[GR-54006] Merge in tag jdk-23+22
PullRequest: labsjdk-ce/75
2 parents 3781388 + e5e70e2 commit 1c85924

File tree

417 files changed

+7526
-3958
lines changed

Some content is hidden

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

417 files changed

+7526
-3958
lines changed

doc/testing.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,9 @@ <h2 id="test-selection">Test selection</h2>
179179
<p>The test specifications given in <code>TEST</code> is parsed into
180180
fully qualified test descriptors, which clearly and unambigously show
181181
which tests will be run. As an example, <code>:tier1</code> will expand
182-
to
183-
<code>jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 jtreg:$(TOPDIR)/test/nashorn:tier1 jtreg:$(TOPDIR)/test/jaxp:tier1</code>.
182+
to include all subcomponent test directories that define `tier1`,
183+
for example:
184+
<code>jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 ...</code>.
184185
You can always submit a list of fully qualified test descriptors in the
185186
<code>TEST</code> variable if you want to shortcut the parser.</p>
186187
<h3 id="common-test-groups">Common Test Groups</h3>

doc/testing.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ test runs, the `test TEST="x"` solution needs to be used.
103103

104104
The test specifications given in `TEST` is parsed into fully qualified test
105105
descriptors, which clearly and unambigously show which tests will be run. As an
106-
example, `:tier1` will expand to `jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1
107-
jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1
108-
jtreg:$(TOPDIR)/test/nashorn:tier1 jtreg:$(TOPDIR)/test/jaxp:tier1`. You can
109-
always submit a list of fully qualified test descriptors in the `TEST` variable
110-
if you want to shortcut the parser.
106+
example, `:tier1` will expand to include all subcomponent test directories
107+
that define `tier1`, for example: `jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1
108+
jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 ...`. You
109+
can always submit a list of fully qualified test descriptors in the `TEST`
110+
variable if you want to shortcut the parser.
111111

112112
### Common Test Groups
113113

make/Docs.gmk

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -681,28 +681,25 @@ ifeq ($(ENABLE_PANDOC), true)
681681
$(TOPDIR)/make/jdk/src/classes/build/tools/pandocfilter)
682682

683683
$(foreach m, $(ALL_MODULES), \
684-
$(eval MAN_$m := $(call FindModuleManDirs, $m)) \
685-
$(foreach d, $(MAN_$m), \
686-
$(foreach f, $(call ApplySpecFilter, $(filter %.md, $(call FindFiles, $d))), \
687-
$(eval $m_$f_NAME := MAN_TO_HTML_$m_$(strip $(call RelativePath, $f, $(TOPDIR)))) \
688-
$(eval $(call SetupProcessMarkdown, $($m_$f_NAME), \
689-
SRC := $d, \
690-
FILES := $f, \
691-
DEST := $(DOCS_OUTPUTDIR)/specs/man, \
692-
FILTER := $(PANDOC_HTML_MANPAGE_FILTER), \
693-
CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \
694-
REPLACEMENTS := \
695-
@@COPYRIGHT_YEAR@@ => $(COPYRIGHT_YEAR) ; \
696-
@@VERSION_SHORT@@ => $(VERSION_SHORT) ; \
697-
@@VERSION_SPECIFICATION@@ => $(VERSION_SPECIFICATION), \
698-
OPTIONS := --toc -V include-before='$(SPECS_TOP)' -V include-after='$(SPECS_BOTTOM_1)', \
699-
POST_PROCESS := $(TOOL_FIXUPPANDOC) --insert-nav --nav-right-info '$(HEADER_RIGHT_SIDE_INFO)' \
700-
--nav-subdirs 1 --nav-link-guides, \
701-
EXTRA_DEPS := $(PANDOC_HTML_MANPAGE_FILTER) \
702-
$(PANDOC_HTML_MANPAGE_FILTER_SOURCE), \
703-
)) \
704-
$(eval JDK_SPECS_TARGETS += $($($m_$f_NAME))) \
705-
) \
684+
$(eval MAN_$m := $(call ApplySpecFilter, $(filter %.md, $(call FindFiles, \
685+
$(call FindModuleManDirs, $m))))) \
686+
$(if $(MAN_$m), \
687+
$(eval $(call SetupProcessMarkdown, MAN_TO_HTML_$m, \
688+
FILES := $(MAN_$m), \
689+
DEST := $(DOCS_OUTPUTDIR)/specs/man, \
690+
FILTER := $(PANDOC_HTML_MANPAGE_FILTER), \
691+
CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \
692+
REPLACEMENTS := \
693+
@@COPYRIGHT_YEAR@@ => $(COPYRIGHT_YEAR) ; \
694+
@@VERSION_SHORT@@ => $(VERSION_SHORT) ; \
695+
@@VERSION_SPECIFICATION@@ => $(VERSION_SPECIFICATION), \
696+
OPTIONS := --toc -V include-before='$(SPECS_TOP)' -V include-after='$(SPECS_BOTTOM_1)', \
697+
POST_PROCESS := $(TOOL_FIXUPPANDOC) --insert-nav --nav-right-info '$(HEADER_RIGHT_SIDE_INFO)' \
698+
--nav-subdirs 1 --nav-link-guides, \
699+
EXTRA_DEPS := $(PANDOC_HTML_MANPAGE_FILTER) \
700+
$(PANDOC_HTML_MANPAGE_FILTER_SOURCE), \
701+
)) \
702+
$(eval JDK_SPECS_TARGETS += $(MAN_TO_HTML_$m)) \
706703
) \
707704
)
708705

make/TestImage.gmk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ default: all
2828
include $(SPEC)
2929
include MakeBase.gmk
3030

31+
# Hook to include the corresponding custom file, if present.
32+
$(eval $(call IncludeCustomExtension, TestImage-pre.gmk))
33+
3134
############################################################################
3235

3336
BUILD_INFO_PROPERTIES := $(TEST_IMAGE_DIR)/build-info.properties

make/autoconf/flags-cflags.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
459459
CFLAGS_OS_DEF_JVM="-D_ALLBSD_SOURCE -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
460460
CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
461461
elif test "x$OPENJDK_TARGET_OS" = xaix; then
462-
CFLAGS_OS_DEF_JVM="-DAIX -Dalloca'(size)'=__builtin_alloca'(size)' -D_LARGE_FILES"
462+
CFLAGS_OS_DEF_JVM="-DAIX -D_LARGE_FILES"
463463
CFLAGS_OS_DEF_JDK="-D_LARGE_FILES"
464464
elif test "x$OPENJDK_TARGET_OS" = xbsd; then
465465
CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE"

make/autoconf/flags-ldflags.m4

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
118118
119119
# Setup LDFLAGS for linking executables
120120
if test "x$TOOLCHAIN_TYPE" = xgcc; then
121-
EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -Wl,--allow-shlib-undefined"
122121
# Enabling pie on 32 bit builds prevents the JVM from allocating a continuous
123122
# java heap.
124123
if test "x$OPENJDK_TARGET_CPU_BITS" != "x32"; then

make/common/ProcessMarkdown.gmk

Lines changed: 47 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -38,48 +38,53 @@ define ProcessMarkdown
3838
$1_$2_INPUT_FILE := $3/$2
3939
$1_$2_MARKER := $$(subst /,_,$1_$2)
4040

41-
ifneq ($$($1_REPLACEMENTS), )
42-
$1_$2_PANDOC_INPUT := $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER)_pre.tmp
43-
44-
$$(eval $$(call SetupTextFileProcessing, $1_$2_PREPROCESSED, \
45-
SOURCE_FILES := $$($1_$2_INPUT_FILE), \
46-
OUTPUT_FILE := $$($1_$2_PANDOC_INPUT), \
47-
REPLACEMENTS := $$($1_REPLACEMENTS), \
48-
))
49-
else
50-
$1_$2_PANDOC_INPUT := $$($1_$2_INPUT_FILE)
51-
endif
52-
53-
ifneq ($$($1_POST_PROCESS), )
54-
$1_$2_PANDOC_OUTPUT := $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER)_post.tmp
55-
else
56-
$1_$2_PANDOC_OUTPUT := $$($1_$2_OUTPUT_FILE)
57-
endif
41+
# Only continue if this target file hasn't been processed already. This lets
42+
# the first found source file override any other with the same name.
43+
ifeq ($$($1_$2_OUTPUT_FILE_PROCESSED), )
44+
$1_$2_OUTPUT_FILE_PROCESSED := true
45+
46+
ifneq ($$($1_REPLACEMENTS), )
47+
$1_$2_PANDOC_INPUT := $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER)_pre.tmp
48+
49+
$$(eval $$(call SetupTextFileProcessing, $1_$2_PREPROCESSED, \
50+
SOURCE_FILES := $$($1_$2_INPUT_FILE), \
51+
OUTPUT_FILE := $$($1_$2_PANDOC_INPUT), \
52+
REPLACEMENTS := $$($1_REPLACEMENTS), \
53+
))
54+
else
55+
$1_$2_PANDOC_INPUT := $$($1_$2_INPUT_FILE)
56+
endif
5857

59-
ifneq ($$($1_CSS), )
60-
ifneq ($$(findstring https:/, $$($1_CSS)), )
61-
$1_$2_CSS_OPTION := --css '$$($1_CSS)'
58+
ifneq ($$($1_POST_PROCESS), )
59+
$1_$2_PANDOC_OUTPUT := $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER)_post.tmp
6260
else
63-
$1_$2_CSS := $$(strip $$(call RelativePath, $$($1_CSS), $$($1_$2_TARGET_DIR)))
64-
$1_$2_CSS_OPTION := --css '$$($1_$2_CSS)'
61+
$1_$2_PANDOC_OUTPUT := $$($1_$2_OUTPUT_FILE)
6562
endif
66-
endif
6763

68-
# This does not need to be included in VARDEPS since it's from the actual
69-
# source file. Only run the shell if the recipe gets executed below.
70-
$1_$2_OPTIONS_FROM_SRC = \
71-
$$(shell $$(GREP) _pandoc-options_: $3/$2 | $$(CUT) -d : -f 2-)
64+
ifneq ($$($1_CSS), )
65+
ifneq ($$(findstring https:/, $$($1_CSS)), )
66+
$1_$2_CSS_OPTION := --css '$$($1_CSS)'
67+
else
68+
$1_$2_CSS := $$(strip $$(call RelativePath, $$($1_CSS), $$($1_$2_TARGET_DIR)))
69+
$1_$2_CSS_OPTION := --css '$$($1_$2_CSS)'
70+
endif
71+
endif
7272

73-
ifneq ($$($1_FILTER), )
74-
$1_$2_OPTIONS := --filter $$($1_FILTER)
75-
endif
73+
# This does not need to be included in VARDEPS since it's from the actual
74+
# source file. Only run the shell if the recipe gets executed below.
75+
$1_$2_OPTIONS_FROM_SRC = \
76+
$$(shell $$(GREP) _pandoc-options_: $3/$2 | $$(CUT) -d : -f 2-)
77+
78+
ifneq ($$($1_FILTER), )
79+
$1_$2_OPTIONS := --filter $$($1_FILTER)
80+
endif
7681

77-
$1_$2_VARDEPS := $$($1_OPTIONS) $$($1_$2_OPTIONS) $$($1_CSS) \
78-
$$($1_REPLACEMENTS) $$($1_POST_PROCESS)
79-
$1_$2_VARDEPS_FILE := $$(call DependOnVariable, $1_$2_VARDEPS, \
80-
$$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER).vardeps)
82+
$1_$2_VARDEPS := $$($1_OPTIONS) $$($1_$2_OPTIONS) $$($1_CSS) \
83+
$$($1_REPLACEMENTS) $$($1_POST_PROCESS)
84+
$1_$2_VARDEPS_FILE := $$(call DependOnVariable, $1_$2_VARDEPS, \
85+
$$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER).vardeps)
8186

82-
$$($1_$2_PANDOC_OUTPUT): $$($1_$2_PANDOC_INPUT) $$($1_$2_VARDEPS_FILE) $$($1_EXTRA_DEPS)
87+
$$($1_$2_PANDOC_OUTPUT): $$($1_$2_PANDOC_INPUT) $$($1_$2_VARDEPS_FILE) $$($1_EXTRA_DEPS)
8388
$$(call LogInfo, Converting $2 to $$($1_FORMAT))
8489
$$(call MakeDir, $$(SUPPORT_OUTPUTDIR)/markdown $$(dir $$($1_$2_PANDOC_OUTPUT)))
8590
$$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER), \
@@ -96,17 +101,18 @@ define ProcessMarkdown
96101
fi
97102
endif
98103

99-
# If we have no post processing, PANDOC_OUTPUT is set to OUTPUT_FILE. Otherwise
100-
# PANDOC_OUTPUT is a temporary file, and we must now create the real OUTPUT_FILE.
101-
ifneq ($$($1_POST_PROCESS), )
102-
$$($1_$2_OUTPUT_FILE): $$($1_$2_PANDOC_OUTPUT)
104+
# If we have no post processing, PANDOC_OUTPUT is set to OUTPUT_FILE. Otherwise
105+
# PANDOC_OUTPUT is a temporary file, and we must now create the real OUTPUT_FILE.
106+
ifneq ($$($1_POST_PROCESS), )
107+
$$($1_$2_OUTPUT_FILE): $$($1_$2_PANDOC_OUTPUT)
103108
$$(call LogInfo, Post-processing markdown file $2)
104109
$$(call MakeDir, $$(SUPPORT_OUTPUTDIR)/markdown $$($1_$2_TARGET_DIR))
105110
$$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER)_post, \
106111
( $$($1_POST_PROCESS) $$($1_$2_PANDOC_OUTPUT) > $$($1_$2_OUTPUT_FILE) ) )
107-
endif
112+
endif
108113

109-
$1 += $$($1_$2_OUTPUT_FILE)
114+
$1 += $$($1_$2_OUTPUT_FILE)
115+
endif
110116
endef
111117

112118
################################################################################

make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2006, 2024, 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
@@ -970,7 +970,7 @@ private void addAttributes(ModuleDescription md,
970970
}
971971
if (header.moduleMainClass != null) {
972972
int attrIdx = addString(cp, Attribute.ModuleMainClass);
973-
int targetIdx = addString(cp, header.moduleMainClass);
973+
int targetIdx = addClassName(cp, header.moduleMainClass);
974974
attributes.put(Attribute.ModuleMainClass,
975975
new ModuleMainClass_attribute(attrIdx, targetIdx));
976976
}

make/modules/jdk.httpserver/Java.gmk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2020, 2024, 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
@@ -24,3 +24,5 @@
2424
#
2525

2626
DISABLED_WARNINGS_java += missing-explicit-ctor this-escape
27+
28+
COPY += .ico

src/hotspot/cpu/aarch64/aarch64.ad

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,11 @@ reg_class no_special_ptr_reg %{
694694
return _NO_SPECIAL_PTR_REG_mask;
695695
%}
696696

697+
// Class for all non_special pointer registers (excluding rfp)
698+
reg_class no_special_no_rfp_ptr_reg %{
699+
return _NO_SPECIAL_NO_RFP_PTR_REG_mask;
700+
%}
701+
697702
// Class for all float registers
698703
reg_class float_reg(
699704
V0,
@@ -1125,6 +1130,7 @@ extern RegMask _PTR_REG_mask;
11251130
extern RegMask _NO_SPECIAL_REG32_mask;
11261131
extern RegMask _NO_SPECIAL_REG_mask;
11271132
extern RegMask _NO_SPECIAL_PTR_REG_mask;
1133+
extern RegMask _NO_SPECIAL_NO_RFP_PTR_REG_mask;
11281134

11291135
class CallStubImpl {
11301136

@@ -1213,6 +1219,7 @@ source %{
12131219
RegMask _NO_SPECIAL_REG32_mask;
12141220
RegMask _NO_SPECIAL_REG_mask;
12151221
RegMask _NO_SPECIAL_PTR_REG_mask;
1222+
RegMask _NO_SPECIAL_NO_RFP_PTR_REG_mask;
12161223

12171224
void reg_mask_init() {
12181225
// We derive below RegMask(s) from the ones which are auto-generated from
@@ -1249,6 +1256,9 @@ source %{
12491256
_NO_SPECIAL_REG_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
12501257
_NO_SPECIAL_PTR_REG_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
12511258
}
1259+
1260+
_NO_SPECIAL_NO_RFP_PTR_REG_mask = _NO_SPECIAL_PTR_REG_mask;
1261+
_NO_SPECIAL_NO_RFP_PTR_REG_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
12521262
}
12531263

12541264
// Optimizaton of volatile gets and puts
@@ -4690,6 +4700,18 @@ operand iRegPNoSp()
46904700
interface(REG_INTER);
46914701
%}
46924702

4703+
// This operand is not allowed to use rfp even if
4704+
// rfp is not used to hold the frame pointer.
4705+
operand iRegPNoSpNoRfp()
4706+
%{
4707+
constraint(ALLOC_IN_RC(no_special_no_rfp_ptr_reg));
4708+
match(RegP);
4709+
match(iRegPNoSp);
4710+
op_cost(0);
4711+
format %{ %}
4712+
interface(REG_INTER);
4713+
%}
4714+
46934715
// Pointer 64 bit Register R0 only
46944716
operand iRegP_R0()
46954717
%{
@@ -16087,7 +16109,9 @@ instruct CallLeafNoFPDirect(method meth)
1608716109
// Also known as an 'interprocedural jump'.
1608816110
// Target of jump will eventually return to caller.
1608916111
// TailJump below removes the return address.
16090-
instruct TailCalljmpInd(iRegPNoSp jump_target, inline_cache_RegP method_ptr)
16112+
// Don't use rfp for 'jump_target' because a MachEpilogNode has already been
16113+
// emitted just above the TailCall which has reset rfp to the caller state.
16114+
instruct TailCalljmpInd(iRegPNoSpNoRfp jump_target, inline_cache_RegP method_ptr)
1609116115
%{
1609216116
match(TailCall jump_target method_ptr);
1609316117

@@ -16100,7 +16124,7 @@ instruct TailCalljmpInd(iRegPNoSp jump_target, inline_cache_RegP method_ptr)
1610016124
ins_pipe(pipe_class_call);
1610116125
%}
1610216126

16103-
instruct TailjmpInd(iRegPNoSp jump_target, iRegP_R0 ex_oop)
16127+
instruct TailjmpInd(iRegPNoSpNoRfp jump_target, iRegP_R0 ex_oop)
1610416128
%{
1610516129
match(TailJump jump_target ex_oop);
1610616130

0 commit comments

Comments
 (0)