Skip to content

Commit

Permalink
Merge tag 'jdk-22.0.2+9' into ola/24.0_jdk-22.0.2+9
Browse files Browse the repository at this point in the history
Added tag jdk-22.0.2+9 for changeset 8153097
  • Loading branch information
marwan-hallaoui committed Jun 5, 2024
2 parents 05e316c + 8153097 commit 15a3b60
Show file tree
Hide file tree
Showing 223 changed files with 5,047 additions and 2,750 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
15 changes: 13 additions & 2 deletions make/autoconf/jdk-options.m4
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,17 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
fi
AC_SUBST(INCLUDE_SA)
# Setup default CDS alignment. On platforms where one build may run on machines with different
# page sizes, the JVM choses a compatible alignment to fit all possible page sizes. This slightly
# increases archive size.
# The only platform having this problem at the moment is Linux on aarch64, which may encounter
# three different page sizes: 4K, 64K, and if run on Mac m1 hardware, 16K.
COMPATIBLE_CDS_ALIGNMENT_DEFAULT=false
if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
COMPATIBLE_CDS_ALIGNMENT_DEFAULT=true
fi
AC_SUBST(COMPATIBLE_CDS_ALIGNMENT_DEFAULT)
# Compress jars
COMPRESS_JARS=false
Expand Down Expand Up @@ -491,7 +502,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER],
[
# GCC reports lots of likely false positives for stringop-truncation and format-overflow.
# Silence them for now.
UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base"
UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment"
UBSAN_CFLAGS="$UBSAN_CHECKS -Wno-stringop-truncation -Wno-format-overflow -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER"
UBSAN_LDFLAGS="$UBSAN_CHECKS"
UTIL_ARG_ENABLE(NAME: ubsan, DEFAULT: false, RESULT: UBSAN_ENABLED,
Expand Down Expand Up @@ -673,7 +684,7 @@ AC_DEFUN([JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE],
#
AC_DEFUN([JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT],
[
UTIL_ARG_ENABLE(NAME: compatible-cds-alignment, DEFAULT: false,
UTIL_ARG_ENABLE(NAME: compatible-cds-alignment, DEFAULT: $COMPATIBLE_CDS_ALIGNMENT_DEFAULT,
RESULT: ENABLE_COMPATIBLE_CDS_ALIGNMENT,
DESC: [enable use alternative compatible cds core region alignment],
DEFAULT_DESC: [disabled],
Expand Down
2 changes: 1 addition & 1 deletion make/conf/version-numbers.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_VERSION_DOCS_API_SINCE=11
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="21 22"
DEFAULT_JDK_SOURCE_TARGET_VERSION=22
DEFAULT_PROMOTED_VERSION_PRE=ea
DEFAULT_PROMOTED_VERSION_PRE=
2 changes: 1 addition & 1 deletion make/devkit/createJMHBundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ rm -f *
fetchJar() {
url="https://repo.maven.apache.org/maven2/$1/$2/$3/$2-$3.jar"
if command -v curl > /dev/null; then
curl -O --fail $url
curl -OL --fail $url
elif command -v wget > /dev/null; then
wget $url
else
Expand Down
3 changes: 2 additions & 1 deletion make/modules/java.base/Launcher.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ ifeq ($(call isTargetOs, macosx aix linux), true)
NAME := jspawnhelper, \
SRC := $(TOPDIR)/src/$(MODULE)/unix/native/jspawnhelper, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKEXE) -I$(TOPDIR)/src/$(MODULE)/unix/native/libjava, \
CFLAGS := $(CFLAGS_JDKEXE) $(VERSION_CFLAGS) \
-I$(TOPDIR)/src/$(MODULE)/unix/native/libjava, \
EXTRA_OBJECT_FILES := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc$(OBJ_SUFFIX), \
LDFLAGS := $(LDFLAGS_JDKEXE), \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
Expand Down
1 change: 1 addition & 0 deletions make/modules/java.base/lib/CoreLibraries.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJAVA, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBJAVA_CFLAGS), \
jdk_util.c_CFLAGS := $(VERSION_CFLAGS), \
ProcessImpl_md.c_CFLAGS := $(VERSION_CFLAGS), \
WARNINGS_AS_ERRORS_xlc := false, \
DISABLED_WARNINGS_gcc_ProcessImpl_md.c := unused-result, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
Expand Down
4 changes: 3 additions & 1 deletion make/modules/java.desktop/lib/Awt2dLibraries.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,10 @@ else
# noexcept-type required for GCC 7 builds. Not required for GCC 8+.
# expansion-to-defined required for GCC 9 builds. Not required for GCC 10+.
# maybe-uninitialized required for GCC 8 builds. Not required for GCC 9+.
# calloc-transposed-args required for GCC 14 builds. (fixed upstream in Harfbuzz 032c931e1c0cfb20f18e5acb8ba005775242bd92)
HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := class-memaccess noexcept-type \
expansion-to-defined dangling-reference maybe-uninitialized
expansion-to-defined dangling-reference maybe-uninitialized \
calloc-transposed-args
HARFBUZZ_DISABLED_WARNINGS_clang := missing-field-initializers range-loop-analysis
HARFBUZZ_DISABLED_WARNINGS_microsoft := 4267 4244

Expand Down
8 changes: 4 additions & 4 deletions src/hotspot/cpu/aarch64/compressedKlass_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ static char* reserve_at_eor_compatible_address(size_t size, bool aslr) {
0x7800, 0x7c00, 0x7e00, 0x7f00, 0x7f80, 0x7fc0, 0x7fe0, 0x7ff0, 0x7ff8,
0x7ffc, 0x7ffe, 0x7fff
};
static constexpr int num_immediates = sizeof(immediates) / sizeof(immediates[0]);
const int start_index = aslr ? os::next_random((int)os::javaTimeNanos()) : 0;
static constexpr unsigned num_immediates = sizeof(immediates) / sizeof(immediates[0]);
const unsigned start_index = aslr ? os::next_random((int)os::javaTimeNanos()) : 0;
constexpr int max_tries = 64;
for (int ntry = 0; result == nullptr && ntry < max_tries; ntry ++) {
// As in os::attempt_reserve_memory_between, we alternate between higher and lower
// addresses; this maximizes the chance of early success if part of the address space
// is not accessible (e.g. 39-bit address space).
const int alt_index = (ntry & 1) ? 0 : num_immediates / 2;
const int index = (start_index + ntry + alt_index) % num_immediates;
const unsigned alt_index = (ntry & 1) ? 0 : num_immediates / 2;
const unsigned index = (start_index + ntry + alt_index) % num_immediates;
const uint64_t immediate = ((uint64_t)immediates[index]) << 32;
assert(immediate > 0 && Assembler::operand_valid_for_logical_immediate(/*is32*/false, immediate),
"Invalid immediate %d " UINT64_FORMAT, index, immediate);
Expand Down
8 changes: 5 additions & 3 deletions src/hotspot/cpu/aarch64/gc/x/xGlobals_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,11 @@
// * 63-48 Fixed (16-bits, always zero)
//

// Default value if probing is not implemented for a certain platform: 128TB
static const size_t DEFAULT_MAX_ADDRESS_BIT = 47;
// Minimum value returned, if probing fails: 64GB
// Default value if probing is not implemented for a certain platform
// Max address bit is restricted by implicit assumptions in the code, for instance
// the bit layout of XForwardingEntry or Partial array entry (see XMarkStackEntry) in mark stack
static const size_t DEFAULT_MAX_ADDRESS_BIT = 46;
// Minimum value returned, if probing fails
static const size_t MINIMUM_MAX_ADDRESS_BIT = 36;

static size_t probe_valid_max_address_bit() {
Expand Down
8 changes: 5 additions & 3 deletions src/hotspot/cpu/aarch64/gc/z/zAddress_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@
#include <sys/mman.h>
#endif // LINUX

// Default value if probing is not implemented for a certain platform: 128TB
static const size_t DEFAULT_MAX_ADDRESS_BIT = 47;
// Minimum value returned, if probing fails: 64GB
// Default value if probing is not implemented for a certain platform
// Max address bit is restricted by implicit assumptions in the code, for instance
// the bit layout of ZForwardingEntry or Partial array entry (see ZMarkStackEntry) in mark stack
static const size_t DEFAULT_MAX_ADDRESS_BIT = 46;
// Minimum value returned, if probing fail
static const size_t MINIMUM_MAX_ADDRESS_BIT = 36;

static size_t probe_valid_max_address_bit() {
Expand Down
185 changes: 97 additions & 88 deletions src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,13 +390,13 @@ static bool offset_for(uint32_t insn1, uint32_t insn2, ptrdiff_t &byte_offset) {
return false;
}

class Decoder : public RelocActions {
virtual reloc_insn adrpMem() { return &Decoder::adrpMem_impl; }
virtual reloc_insn adrpAdd() { return &Decoder::adrpAdd_impl; }
virtual reloc_insn adrpMovk() { return &Decoder::adrpMovk_impl; }
class AArch64Decoder : public RelocActions {
virtual reloc_insn adrpMem() { return &AArch64Decoder::adrpMem_impl; }
virtual reloc_insn adrpAdd() { return &AArch64Decoder::adrpAdd_impl; }
virtual reloc_insn adrpMovk() { return &AArch64Decoder::adrpMovk_impl; }

public:
Decoder(address insn_addr, uint32_t insn) : RelocActions(insn_addr, insn) {}
AArch64Decoder(address insn_addr, uint32_t insn) : RelocActions(insn_addr, insn) {}

virtual int loadStore(address insn_addr, address &target) {
intptr_t offset = Instruction_aarch64::sextract(_insn, 23, 5);
Expand Down Expand Up @@ -492,7 +492,7 @@ class Decoder : public RelocActions {
};

address MacroAssembler::target_addr_for_insn(address insn_addr, uint32_t insn) {
Decoder decoder(insn_addr, insn);
AArch64Decoder decoder(insn_addr, insn);
address target;
decoder.run(insn_addr, target);
return target;
Expand Down Expand Up @@ -4258,108 +4258,117 @@ void MacroAssembler::kernel_crc32_common_fold_using_crypto_pmull(Register crc, R
}
add(table, table, table_offset);

// Registers v0..v7 are used as data registers.
// Registers v16..v31 are used as tmp registers.
sub(buf, buf, 0x10);
ldrq(v1, Address(buf, 0x10));
ldrq(v2, Address(buf, 0x20));
ldrq(v3, Address(buf, 0x30));
ldrq(v4, Address(buf, 0x40));
ldrq(v5, Address(buf, 0x50));
ldrq(v6, Address(buf, 0x60));
ldrq(v7, Address(buf, 0x70));
ldrq(v8, Address(pre(buf, 0x80)));

movi(v25, T4S, 0);
mov(v25, S, 0, crc);
eor(v1, T16B, v1, v25);

ldrq(v0, Address(table));
ldrq(v0, Address(buf, 0x10));
ldrq(v1, Address(buf, 0x20));
ldrq(v2, Address(buf, 0x30));
ldrq(v3, Address(buf, 0x40));
ldrq(v4, Address(buf, 0x50));
ldrq(v5, Address(buf, 0x60));
ldrq(v6, Address(buf, 0x70));
ldrq(v7, Address(pre(buf, 0x80)));

movi(v31, T4S, 0);
mov(v31, S, 0, crc);
eor(v0, T16B, v0, v31);

// Register v16 contains constants from the crc table.
ldrq(v16, Address(table));
b(CRC_by128_loop);

align(OptoLoopAlignment);
BIND(CRC_by128_loop);
pmull (v9, T1Q, v1, v0, T1D);
pmull2(v10, T1Q, v1, v0, T2D);
ldrq(v1, Address(buf, 0x10));
eor3(v1, T16B, v9, v10, v1);

pmull (v11, T1Q, v2, v0, T1D);
pmull2(v12, T1Q, v2, v0, T2D);
ldrq(v2, Address(buf, 0x20));
eor3(v2, T16B, v11, v12, v2);

pmull (v13, T1Q, v3, v0, T1D);
pmull2(v14, T1Q, v3, v0, T2D);
ldrq(v3, Address(buf, 0x30));
eor3(v3, T16B, v13, v14, v3);

pmull (v15, T1Q, v4, v0, T1D);
pmull2(v16, T1Q, v4, v0, T2D);
ldrq(v4, Address(buf, 0x40));
eor3(v4, T16B, v15, v16, v4);

pmull (v17, T1Q, v5, v0, T1D);
pmull2(v18, T1Q, v5, v0, T2D);
ldrq(v5, Address(buf, 0x50));
eor3(v5, T16B, v17, v18, v5);

pmull (v19, T1Q, v6, v0, T1D);
pmull2(v20, T1Q, v6, v0, T2D);
ldrq(v6, Address(buf, 0x60));
eor3(v6, T16B, v19, v20, v6);

pmull (v21, T1Q, v7, v0, T1D);
pmull2(v22, T1Q, v7, v0, T2D);
ldrq(v7, Address(buf, 0x70));
eor3(v7, T16B, v21, v22, v7);

pmull (v23, T1Q, v8, v0, T1D);
pmull2(v24, T1Q, v8, v0, T2D);
ldrq(v8, Address(pre(buf, 0x80)));
eor3(v8, T16B, v23, v24, v8);
pmull (v17, T1Q, v0, v16, T1D);
pmull2(v18, T1Q, v0, v16, T2D);
ldrq(v0, Address(buf, 0x10));
eor3(v0, T16B, v17, v18, v0);

pmull (v19, T1Q, v1, v16, T1D);
pmull2(v20, T1Q, v1, v16, T2D);
ldrq(v1, Address(buf, 0x20));
eor3(v1, T16B, v19, v20, v1);

pmull (v21, T1Q, v2, v16, T1D);
pmull2(v22, T1Q, v2, v16, T2D);
ldrq(v2, Address(buf, 0x30));
eor3(v2, T16B, v21, v22, v2);

pmull (v23, T1Q, v3, v16, T1D);
pmull2(v24, T1Q, v3, v16, T2D);
ldrq(v3, Address(buf, 0x40));
eor3(v3, T16B, v23, v24, v3);

pmull (v25, T1Q, v4, v16, T1D);
pmull2(v26, T1Q, v4, v16, T2D);
ldrq(v4, Address(buf, 0x50));
eor3(v4, T16B, v25, v26, v4);

pmull (v27, T1Q, v5, v16, T1D);
pmull2(v28, T1Q, v5, v16, T2D);
ldrq(v5, Address(buf, 0x60));
eor3(v5, T16B, v27, v28, v5);

pmull (v29, T1Q, v6, v16, T1D);
pmull2(v30, T1Q, v6, v16, T2D);
ldrq(v6, Address(buf, 0x70));
eor3(v6, T16B, v29, v30, v6);

// Reuse registers v23, v24.
// Using them won't block the first instruction of the next iteration.
pmull (v23, T1Q, v7, v16, T1D);
pmull2(v24, T1Q, v7, v16, T2D);
ldrq(v7, Address(pre(buf, 0x80)));
eor3(v7, T16B, v23, v24, v7);

subs(len, len, 0x80);
br(Assembler::GE, CRC_by128_loop);

// fold into 512 bits
ldrq(v0, Address(table, 0x10));
// Use v31 for constants because v16 can be still in use.
ldrq(v31, Address(table, 0x10));

pmull (v10, T1Q, v1, v0, T1D);
pmull2(v11, T1Q, v1, v0, T2D);
eor3(v1, T16B, v10, v11, v5);
pmull (v17, T1Q, v0, v31, T1D);
pmull2(v18, T1Q, v0, v31, T2D);
eor3(v0, T16B, v17, v18, v4);

pmull (v12, T1Q, v2, v0, T1D);
pmull2(v13, T1Q, v2, v0, T2D);
eor3(v2, T16B, v12, v13, v6);
pmull (v19, T1Q, v1, v31, T1D);
pmull2(v20, T1Q, v1, v31, T2D);
eor3(v1, T16B, v19, v20, v5);

pmull (v14, T1Q, v3, v0, T1D);
pmull2(v15, T1Q, v3, v0, T2D);
eor3(v3, T16B, v14, v15, v7);
pmull (v21, T1Q, v2, v31, T1D);
pmull2(v22, T1Q, v2, v31, T2D);
eor3(v2, T16B, v21, v22, v6);

pmull (v16, T1Q, v4, v0, T1D);
pmull2(v17, T1Q, v4, v0, T2D);
eor3(v4, T16B, v16, v17, v8);
pmull (v23, T1Q, v3, v31, T1D);
pmull2(v24, T1Q, v3, v31, T2D);
eor3(v3, T16B, v23, v24, v7);

// fold into 128 bits
ldrq(v5, Address(table, 0x20));
pmull (v10, T1Q, v1, v5, T1D);
pmull2(v11, T1Q, v1, v5, T2D);
eor3(v4, T16B, v4, v10, v11);

ldrq(v6, Address(table, 0x30));
pmull (v12, T1Q, v2, v6, T1D);
pmull2(v13, T1Q, v2, v6, T2D);
eor3(v4, T16B, v4, v12, v13);

ldrq(v7, Address(table, 0x40));
pmull (v14, T1Q, v3, v7, T1D);
pmull2(v15, T1Q, v3, v7, T2D);
eor3(v1, T16B, v4, v14, v15);
// Use v17 for constants because v31 can be still in use.
ldrq(v17, Address(table, 0x20));
pmull (v25, T1Q, v0, v17, T1D);
pmull2(v26, T1Q, v0, v17, T2D);
eor3(v3, T16B, v3, v25, v26);

// Use v18 for constants because v17 can be still in use.
ldrq(v18, Address(table, 0x30));
pmull (v27, T1Q, v1, v18, T1D);
pmull2(v28, T1Q, v1, v18, T2D);
eor3(v3, T16B, v3, v27, v28);

// Use v19 for constants because v18 can be still in use.
ldrq(v19, Address(table, 0x40));
pmull (v29, T1Q, v2, v19, T1D);
pmull2(v30, T1Q, v2, v19, T2D);
eor3(v0, T16B, v3, v29, v30);

add(len, len, 0x80);
add(buf, buf, 0x10);

mov(tmp0, v1, D, 0);
mov(tmp1, v1, D, 1);
mov(tmp0, v0, D, 0);
mov(tmp1, v0, D, 1);
}

SkipIfEqual::SkipIfEqual(
Expand Down
Loading

0 comments on commit 15a3b60

Please sign in to comment.