Skip to content

Commit

Permalink
[GR-54006] Merge in tag jdk-23+22
Browse files Browse the repository at this point in the history
PullRequest: labsjdk-ce/75
  • Loading branch information
OracleLabsAutomation authored and marwan-hallaoui committed May 10, 2024
2 parents 3781388 + e5e70e2 commit 1c85924
Show file tree
Hide file tree
Showing 417 changed files with 7,526 additions and 3,958 deletions.
5 changes: 3 additions & 2 deletions doc/testing.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,9 @@ <h2 id="test-selection">Test selection</h2>
<p>The test specifications given in <code>TEST</code> is parsed into
fully qualified test descriptors, which clearly and unambigously show
which tests will be run. As an example, <code>:tier1</code> will expand
to
<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>.
to include all subcomponent test directories that define `tier1`,
for example:
<code>jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 ...</code>.
You can always submit a list of fully qualified test descriptors in the
<code>TEST</code> variable if you want to shortcut the parser.</p>
<h3 id="common-test-groups">Common Test Groups</h3>
Expand Down
10 changes: 5 additions & 5 deletions doc/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ test runs, the `test TEST="x"` solution needs to be used.

The test specifications given in `TEST` is parsed into fully qualified test
descriptors, which clearly and unambigously show which tests will be run. As an
example, `:tier1` will expand to `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`. You can
always submit a list of fully qualified test descriptors in the `TEST` variable
if you want to shortcut the parser.
example, `:tier1` will expand to include all subcomponent test directories
that define `tier1`, for example: `jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1
jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 ...`. You
can always submit a list of fully qualified test descriptors in the `TEST`
variable if you want to shortcut the parser.

### Common Test Groups

Expand Down
41 changes: 19 additions & 22 deletions make/Docs.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -681,28 +681,25 @@ ifeq ($(ENABLE_PANDOC), true)
$(TOPDIR)/make/jdk/src/classes/build/tools/pandocfilter)

$(foreach m, $(ALL_MODULES), \
$(eval MAN_$m := $(call FindModuleManDirs, $m)) \
$(foreach d, $(MAN_$m), \
$(foreach f, $(call ApplySpecFilter, $(filter %.md, $(call FindFiles, $d))), \
$(eval $m_$f_NAME := MAN_TO_HTML_$m_$(strip $(call RelativePath, $f, $(TOPDIR)))) \
$(eval $(call SetupProcessMarkdown, $($m_$f_NAME), \
SRC := $d, \
FILES := $f, \
DEST := $(DOCS_OUTPUTDIR)/specs/man, \
FILTER := $(PANDOC_HTML_MANPAGE_FILTER), \
CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \
REPLACEMENTS := \
@@COPYRIGHT_YEAR@@ => $(COPYRIGHT_YEAR) ; \
@@VERSION_SHORT@@ => $(VERSION_SHORT) ; \
@@VERSION_SPECIFICATION@@ => $(VERSION_SPECIFICATION), \
OPTIONS := --toc -V include-before='$(SPECS_TOP)' -V include-after='$(SPECS_BOTTOM_1)', \
POST_PROCESS := $(TOOL_FIXUPPANDOC) --insert-nav --nav-right-info '$(HEADER_RIGHT_SIDE_INFO)' \
--nav-subdirs 1 --nav-link-guides, \
EXTRA_DEPS := $(PANDOC_HTML_MANPAGE_FILTER) \
$(PANDOC_HTML_MANPAGE_FILTER_SOURCE), \
)) \
$(eval JDK_SPECS_TARGETS += $($($m_$f_NAME))) \
) \
$(eval MAN_$m := $(call ApplySpecFilter, $(filter %.md, $(call FindFiles, \
$(call FindModuleManDirs, $m))))) \
$(if $(MAN_$m), \
$(eval $(call SetupProcessMarkdown, MAN_TO_HTML_$m, \
FILES := $(MAN_$m), \
DEST := $(DOCS_OUTPUTDIR)/specs/man, \
FILTER := $(PANDOC_HTML_MANPAGE_FILTER), \
CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \
REPLACEMENTS := \
@@COPYRIGHT_YEAR@@ => $(COPYRIGHT_YEAR) ; \
@@VERSION_SHORT@@ => $(VERSION_SHORT) ; \
@@VERSION_SPECIFICATION@@ => $(VERSION_SPECIFICATION), \
OPTIONS := --toc -V include-before='$(SPECS_TOP)' -V include-after='$(SPECS_BOTTOM_1)', \
POST_PROCESS := $(TOOL_FIXUPPANDOC) --insert-nav --nav-right-info '$(HEADER_RIGHT_SIDE_INFO)' \
--nav-subdirs 1 --nav-link-guides, \
EXTRA_DEPS := $(PANDOC_HTML_MANPAGE_FILTER) \
$(PANDOC_HTML_MANPAGE_FILTER_SOURCE), \
)) \
$(eval JDK_SPECS_TARGETS += $(MAN_TO_HTML_$m)) \
) \
)

Expand Down
3 changes: 3 additions & 0 deletions make/TestImage.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ default: all
include $(SPEC)
include MakeBase.gmk

# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, TestImage-pre.gmk))

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

BUILD_INFO_PROPERTIES := $(TEST_IMAGE_DIR)/build-info.properties
Expand Down
2 changes: 1 addition & 1 deletion make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
CFLAGS_OS_DEF_JVM="-D_ALLBSD_SOURCE -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
elif test "x$OPENJDK_TARGET_OS" = xaix; then
CFLAGS_OS_DEF_JVM="-DAIX -Dalloca'(size)'=__builtin_alloca'(size)' -D_LARGE_FILES"
CFLAGS_OS_DEF_JVM="-DAIX -D_LARGE_FILES"
CFLAGS_OS_DEF_JDK="-D_LARGE_FILES"
elif test "x$OPENJDK_TARGET_OS" = xbsd; then
CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE"
Expand Down
1 change: 0 additions & 1 deletion make/autoconf/flags-ldflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
# Setup LDFLAGS for linking executables
if test "x$TOOLCHAIN_TYPE" = xgcc; then
EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -Wl,--allow-shlib-undefined"
# Enabling pie on 32 bit builds prevents the JVM from allocating a continuous
# java heap.
if test "x$OPENJDK_TARGET_CPU_BITS" != "x32"; then
Expand Down
88 changes: 47 additions & 41 deletions make/common/ProcessMarkdown.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -38,48 +38,53 @@ define ProcessMarkdown
$1_$2_INPUT_FILE := $3/$2
$1_$2_MARKER := $$(subst /,_,$1_$2)

ifneq ($$($1_REPLACEMENTS), )
$1_$2_PANDOC_INPUT := $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER)_pre.tmp

$$(eval $$(call SetupTextFileProcessing, $1_$2_PREPROCESSED, \
SOURCE_FILES := $$($1_$2_INPUT_FILE), \
OUTPUT_FILE := $$($1_$2_PANDOC_INPUT), \
REPLACEMENTS := $$($1_REPLACEMENTS), \
))
else
$1_$2_PANDOC_INPUT := $$($1_$2_INPUT_FILE)
endif

ifneq ($$($1_POST_PROCESS), )
$1_$2_PANDOC_OUTPUT := $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER)_post.tmp
else
$1_$2_PANDOC_OUTPUT := $$($1_$2_OUTPUT_FILE)
endif
# Only continue if this target file hasn't been processed already. This lets
# the first found source file override any other with the same name.
ifeq ($$($1_$2_OUTPUT_FILE_PROCESSED), )
$1_$2_OUTPUT_FILE_PROCESSED := true

ifneq ($$($1_REPLACEMENTS), )
$1_$2_PANDOC_INPUT := $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER)_pre.tmp

$$(eval $$(call SetupTextFileProcessing, $1_$2_PREPROCESSED, \
SOURCE_FILES := $$($1_$2_INPUT_FILE), \
OUTPUT_FILE := $$($1_$2_PANDOC_INPUT), \
REPLACEMENTS := $$($1_REPLACEMENTS), \
))
else
$1_$2_PANDOC_INPUT := $$($1_$2_INPUT_FILE)
endif

ifneq ($$($1_CSS), )
ifneq ($$(findstring https:/, $$($1_CSS)), )
$1_$2_CSS_OPTION := --css '$$($1_CSS)'
ifneq ($$($1_POST_PROCESS), )
$1_$2_PANDOC_OUTPUT := $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER)_post.tmp
else
$1_$2_CSS := $$(strip $$(call RelativePath, $$($1_CSS), $$($1_$2_TARGET_DIR)))
$1_$2_CSS_OPTION := --css '$$($1_$2_CSS)'
$1_$2_PANDOC_OUTPUT := $$($1_$2_OUTPUT_FILE)
endif
endif

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

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

ifneq ($$($1_FILTER), )
$1_$2_OPTIONS := --filter $$($1_FILTER)
endif

$1_$2_VARDEPS := $$($1_OPTIONS) $$($1_$2_OPTIONS) $$($1_CSS) \
$$($1_REPLACEMENTS) $$($1_POST_PROCESS)
$1_$2_VARDEPS_FILE := $$(call DependOnVariable, $1_$2_VARDEPS, \
$$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER).vardeps)
$1_$2_VARDEPS := $$($1_OPTIONS) $$($1_$2_OPTIONS) $$($1_CSS) \
$$($1_REPLACEMENTS) $$($1_POST_PROCESS)
$1_$2_VARDEPS_FILE := $$(call DependOnVariable, $1_$2_VARDEPS, \
$$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER).vardeps)

$$($1_$2_PANDOC_OUTPUT): $$($1_$2_PANDOC_INPUT) $$($1_$2_VARDEPS_FILE) $$($1_EXTRA_DEPS)
$$($1_$2_PANDOC_OUTPUT): $$($1_$2_PANDOC_INPUT) $$($1_$2_VARDEPS_FILE) $$($1_EXTRA_DEPS)
$$(call LogInfo, Converting $2 to $$($1_FORMAT))
$$(call MakeDir, $$(SUPPORT_OUTPUTDIR)/markdown $$(dir $$($1_$2_PANDOC_OUTPUT)))
$$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER), \
Expand All @@ -96,17 +101,18 @@ define ProcessMarkdown
fi
endif

# If we have no post processing, PANDOC_OUTPUT is set to OUTPUT_FILE. Otherwise
# PANDOC_OUTPUT is a temporary file, and we must now create the real OUTPUT_FILE.
ifneq ($$($1_POST_PROCESS), )
$$($1_$2_OUTPUT_FILE): $$($1_$2_PANDOC_OUTPUT)
# If we have no post processing, PANDOC_OUTPUT is set to OUTPUT_FILE. Otherwise
# PANDOC_OUTPUT is a temporary file, and we must now create the real OUTPUT_FILE.
ifneq ($$($1_POST_PROCESS), )
$$($1_$2_OUTPUT_FILE): $$($1_$2_PANDOC_OUTPUT)
$$(call LogInfo, Post-processing markdown file $2)
$$(call MakeDir, $$(SUPPORT_OUTPUTDIR)/markdown $$($1_$2_TARGET_DIR))
$$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER)_post, \
( $$($1_POST_PROCESS) $$($1_$2_PANDOC_OUTPUT) > $$($1_$2_OUTPUT_FILE) ) )
endif
endif

$1 += $$($1_$2_OUTPUT_FILE)
$1 += $$($1_$2_OUTPUT_FILE)
endif
endef

################################################################################
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 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 @@ -970,7 +970,7 @@ private void addAttributes(ModuleDescription md,
}
if (header.moduleMainClass != null) {
int attrIdx = addString(cp, Attribute.ModuleMainClass);
int targetIdx = addString(cp, header.moduleMainClass);
int targetIdx = addClassName(cp, header.moduleMainClass);
attributes.put(Attribute.ModuleMainClass,
new ModuleMainClass_attribute(attrIdx, targetIdx));
}
Expand Down
4 changes: 3 additions & 1 deletion make/modules/jdk.httpserver/Java.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2020, 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 All @@ -24,3 +24,5 @@
#

DISABLED_WARNINGS_java += missing-explicit-ctor this-escape

COPY += .ico
28 changes: 26 additions & 2 deletions src/hotspot/cpu/aarch64/aarch64.ad
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,11 @@ reg_class no_special_ptr_reg %{
return _NO_SPECIAL_PTR_REG_mask;
%}

// Class for all non_special pointer registers (excluding rfp)
reg_class no_special_no_rfp_ptr_reg %{
return _NO_SPECIAL_NO_RFP_PTR_REG_mask;
%}

// Class for all float registers
reg_class float_reg(
V0,
Expand Down Expand Up @@ -1125,6 +1130,7 @@ extern RegMask _PTR_REG_mask;
extern RegMask _NO_SPECIAL_REG32_mask;
extern RegMask _NO_SPECIAL_REG_mask;
extern RegMask _NO_SPECIAL_PTR_REG_mask;
extern RegMask _NO_SPECIAL_NO_RFP_PTR_REG_mask;

class CallStubImpl {

Expand Down Expand Up @@ -1213,6 +1219,7 @@ source %{
RegMask _NO_SPECIAL_REG32_mask;
RegMask _NO_SPECIAL_REG_mask;
RegMask _NO_SPECIAL_PTR_REG_mask;
RegMask _NO_SPECIAL_NO_RFP_PTR_REG_mask;

void reg_mask_init() {
// We derive below RegMask(s) from the ones which are auto-generated from
Expand Down Expand Up @@ -1249,6 +1256,9 @@ source %{
_NO_SPECIAL_REG_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
_NO_SPECIAL_PTR_REG_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
}

_NO_SPECIAL_NO_RFP_PTR_REG_mask = _NO_SPECIAL_PTR_REG_mask;
_NO_SPECIAL_NO_RFP_PTR_REG_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
}

// Optimizaton of volatile gets and puts
Expand Down Expand Up @@ -4690,6 +4700,18 @@ operand iRegPNoSp()
interface(REG_INTER);
%}

// This operand is not allowed to use rfp even if
// rfp is not used to hold the frame pointer.
operand iRegPNoSpNoRfp()
%{
constraint(ALLOC_IN_RC(no_special_no_rfp_ptr_reg));
match(RegP);
match(iRegPNoSp);
op_cost(0);
format %{ %}
interface(REG_INTER);
%}

// Pointer 64 bit Register R0 only
operand iRegP_R0()
%{
Expand Down Expand Up @@ -16087,7 +16109,9 @@ instruct CallLeafNoFPDirect(method meth)
// Also known as an 'interprocedural jump'.
// Target of jump will eventually return to caller.
// TailJump below removes the return address.
instruct TailCalljmpInd(iRegPNoSp jump_target, inline_cache_RegP method_ptr)
// Don't use rfp for 'jump_target' because a MachEpilogNode has already been
// emitted just above the TailCall which has reset rfp to the caller state.
instruct TailCalljmpInd(iRegPNoSpNoRfp jump_target, inline_cache_RegP method_ptr)
%{
match(TailCall jump_target method_ptr);

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

instruct TailjmpInd(iRegPNoSp jump_target, iRegP_R0 ex_oop)
instruct TailjmpInd(iRegPNoSpNoRfp jump_target, iRegP_R0 ex_oop)
%{
match(TailJump jump_target ex_oop);

Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/aarch64_vector.ad
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
// Copyright (c) 2020, 2023, Arm Limited. All rights reserved.
// Copyright (c) 2020, 2024, Arm Limited. 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
10 changes: 7 additions & 3 deletions src/hotspot/cpu/aarch64/aarch64_vector_ad.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
// Copyright (c) 2020, 2023, Arm Limited. All rights reserved.
// Copyright (c) 2020, 2024, Arm Limited. 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 @@ -159,9 +159,7 @@ source %{
case Op_VectorMaskGen:
case Op_LoadVectorMasked:
case Op_StoreVectorMasked:
case Op_LoadVectorGather:
case Op_StoreVectorScatter:
case Op_LoadVectorGatherMasked:
case Op_StoreVectorScatterMasked:
case Op_PopulateIndex:
case Op_CompressM:
Expand All @@ -170,6 +168,12 @@ source %{
return false;
}
break;
case Op_LoadVectorGather:
case Op_LoadVectorGatherMasked:
if (UseSVE == 0 || is_subword_type(bt)) {
return false;
}
break;
case Op_MulAddVS2VI:
if (length_in_bytes != 16) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ void SaveLiveRegisters::initialize(BarrierStubC2* stub) {
GrowableArray<RegisterData> registers;
VMReg prev_vm_reg = VMRegImpl::Bad();

RegMaskIterator rmi(stub->live());
RegMaskIterator rmi(stub->preserve_set());
while (rmi.has_next()) {
OptoReg::Name opto_reg = rmi.next();
VMReg vm_reg = OptoReg::as_VMReg(opto_reg);
Expand All @@ -491,7 +491,7 @@ void SaveLiveRegisters::initialize(BarrierStubC2* stub) {
index = registers.append(reg_data);
}
} else if (vm_reg->is_FloatRegister()) {
// We have size encoding in OptoReg of stub->live()
// We have size encoding in OptoReg of stub->preserve_set()
// After encoding, float/neon/sve register has only one slot in regmask
// Decode it to get the actual size
VMReg vm_reg_base = vm_reg->as_FloatRegister()->as_VMReg();
Expand Down Expand Up @@ -532,12 +532,8 @@ void SaveLiveRegisters::initialize(BarrierStubC2* stub) {
}
}

// Remove C-ABI SOE registers, scratch regs and _ref register that will be updated
if (stub->result() != noreg) {
_gp_regs -= RegSet::range(r19, r30) + RegSet::of(r8, r9, stub->result());
} else {
_gp_regs -= RegSet::range(r19, r30) + RegSet::of(r8, r9);
}
// Remove C-ABI SOE registers and scratch regs
_gp_regs -= RegSet::range(r19, r30) + RegSet::of(r8, r9);

// Remove C-ABI SOE fp registers
_fp_regs -= FloatRegSet::range(v8, v15);
Expand Down
Loading

0 comments on commit 1c85924

Please sign in to comment.