Skip to content

Commit 1ad8aea

Browse files
Merge in jdk-24+29 (24.2)
PullRequest: labsjdk-ce/138
2 parents d5ad830 + 9edf515 commit 1ad8aea

File tree

73 files changed

+4449
-271
lines changed

Some content is hidden

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

73 files changed

+4449
-271
lines changed

src/hotspot/share/gc/shared/genArguments.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ size_t MinNewSize = 0;
3737
size_t MinOldSize = 0;
3838
size_t MaxOldSize = 0;
3939

40-
size_t OldSize = 0;
40+
// If InitialHeapSize or MinHeapSize is not set on cmdline, this variable,
41+
// together with NewSize, is used to derive them.
42+
// Using the same value when it was a configurable flag to avoid breakage.
43+
// See more in JDK-8346005
44+
size_t OldSize = ScaleForWordSize(4*M);
4145

4246
size_t GenAlignment = 0;
4347

src/hotspot/share/oops/compressedKlass.hpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,15 @@ class CompressedKlassPointers : public AllStatic {
258258
is_aligned(addr, klass_alignment_in_bytes());
259259
}
260260

261-
// Check that with the given base, shift and range, aarch64 an encode and decode the klass pointer.
262-
static bool check_klass_decode_mode(address base, int shift, const size_t range) NOT_AARCH64({ return true;});
263-
static bool set_klass_decode_mode() NOT_AARCH64({ return true;}); // can be called after initialization
261+
#if defined(AARCH64) && !defined(ZERO)
262+
// Check that with the given base, shift and range, aarch64 code can encode and decode the klass pointer.
263+
static bool check_klass_decode_mode(address base, int shift, const size_t range);
264+
// Called after initialization.
265+
static bool set_klass_decode_mode();
266+
#else
267+
static bool check_klass_decode_mode(address base, int shift, const size_t range) { return true; }
268+
static bool set_klass_decode_mode() { return true; }
269+
#endif
264270
};
265271

266272
#endif // SHARE_OOPS_COMPRESSEDKLASS_HPP

src/hotspot/share/opto/vectorIntrinsics.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1637,8 +1637,9 @@ bool LibraryCallKit::inline_vector_reduction() {
16371637
int opc = VectorSupport::vop2ideal(opr->get_con(), elem_bt);
16381638
int sopc = ReductionNode::opcode(opc, elem_bt);
16391639

1640+
// Ensure reduction operation for lanewise operation
16401641
// When using mask, mask use type needs to be VecMaskUseLoad.
1641-
if (!arch_supports_vector(sopc, num_elem, elem_bt, is_masked_op ? VecMaskUseLoad : VecMaskNotUsed)) {
1642+
if (sopc == opc || !arch_supports_vector(sopc, num_elem, elem_bt, is_masked_op ? VecMaskUseLoad : VecMaskNotUsed)) {
16421643
log_if_needed(" ** not supported: arity=1 op=%d/reduce vlen=%d etype=%s is_masked_op=%d",
16431644
sopc, num_elem, type2name(elem_bt), is_masked_op ? 1 : 0);
16441645
return false;

src/java.base/share/classes/java/lang/classfile/CompoundElement.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
import java.util.stream.Stream;
3535
import java.util.stream.StreamSupport;
3636

37+
import jdk.internal.classfile.components.ClassPrinter;
38+
3739
/**
3840
* A {@link ClassFileElement} that has complex structure defined in terms of
3941
* other classfile elements, such as a method, field, method body, or entire
@@ -92,4 +94,14 @@ public void accept(E e) {
9294
return Collections.unmodifiableList(list);
9395
}
9496

97+
/**
98+
* {@return a text representation of the compound element and its contents for debugging purposes}
99+
*
100+
* The format, structure and exact contents of the returned string are not specified and may change at any time in the future.
101+
*/
102+
default String toDebugString() {
103+
StringBuilder text = new StringBuilder();
104+
ClassPrinter.toYaml(this, ClassPrinter.Verbosity.TRACE_ALL, text::append);
105+
return text.toString();
106+
}
95107
}

src/java.base/share/classes/java/net/Socket.java

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -569,9 +569,8 @@ void setConnected() {
569569
/**
570570
* Connects this socket to the server.
571571
*
572-
* <p> If the endpoint is an unresolved {@link InetSocketAddress}, or the
573-
* connection cannot be established, then the socket is closed, and an
574-
* {@link IOException} is thrown.
572+
* <p> If the connection cannot be established, then the socket is closed,
573+
* and an {@link IOException} is thrown.
575574
*
576575
* <p> This method is {@linkplain Thread#interrupt() interruptible} in the
577576
* following circumstances:
@@ -591,8 +590,8 @@ void setConnected() {
591590
* @param endpoint the {@code SocketAddress}
592591
* @throws IOException if an error occurs during the connection, the socket
593592
* is already connected or the socket is closed
594-
* @throws UnknownHostException if the endpoint is an unresolved
595-
* {@link InetSocketAddress}
593+
* @throws UnknownHostException if the connection could not be established
594+
* because the endpoint is an unresolved {@link InetSocketAddress}
596595
* @throws java.nio.channels.IllegalBlockingModeException
597596
* if this socket has an associated channel,
598597
* and the channel is in non-blocking mode
@@ -609,9 +608,8 @@ public void connect(SocketAddress endpoint) throws IOException {
609608
* A timeout of zero is interpreted as an infinite timeout. The connection
610609
* will then block until established or an error occurs.
611610
*
612-
* <p> If the endpoint is an unresolved {@link InetSocketAddress}, the
613-
* connection cannot be established, or the timeout expires before the
614-
* connection is established, then the socket is closed, and an
611+
* <p> If the connection cannot be established, or the timeout expires
612+
* before the connection is established, then the socket is closed, and an
615613
* {@link IOException} is thrown.
616614
*
617615
* <p> This method is {@linkplain Thread#interrupt() interruptible} in the
@@ -634,8 +632,8 @@ public void connect(SocketAddress endpoint) throws IOException {
634632
* @throws IOException if an error occurs during the connection, the socket
635633
* is already connected or the socket is closed
636634
* @throws SocketTimeoutException if timeout expires before connecting
637-
* @throws UnknownHostException if the endpoint is an unresolved
638-
* {@link InetSocketAddress}
635+
* @throws UnknownHostException if the connection could not be established
636+
* because the endpoint is an unresolved {@link InetSocketAddress}
639637
* @throws java.nio.channels.IllegalBlockingModeException
640638
* if this socket has an associated channel,
641639
* and the channel is in non-blocking mode
@@ -660,12 +658,6 @@ public void connect(SocketAddress endpoint, int timeout) throws IOException {
660658
if (!(endpoint instanceof InetSocketAddress epoint))
661659
throw new IllegalArgumentException("Unsupported address type");
662660

663-
if (epoint.isUnresolved()) {
664-
var uhe = new UnknownHostException(epoint.getHostName());
665-
closeSuppressingExceptions(uhe);
666-
throw uhe;
667-
}
668-
669661
InetAddress addr = epoint.getAddress();
670662
checkAddress(addr, "connect");
671663

src/java.base/share/classes/java/util/ResourceBundle.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3654,8 +3654,7 @@ private static String toPackageName(String bundleName) {
36543654

36553655
}
36563656

3657-
private static final boolean TRACE_ON = Boolean.getBoolean(
3658-
System.getProperty("resource.bundle.debug", "false"));
3657+
private static final boolean TRACE_ON = Boolean.getBoolean("resource.bundle.debug");
36593658

36603659
private static void trace(String format, Object... params) {
36613660
if (TRACE_ON)

src/java.base/share/classes/module-info.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@
155155
exports jdk.internal.javac to
156156
java.compiler,
157157
java.desktop, // for ScopedValue
158-
java.se, // for ParticipatesInPreview
159158
jdk.compiler,
160159
jdk.incubator.vector, // participates in preview features
161160
jdk.jartool, // participates in preview features

src/java.desktop/share/classes/javax/print/attribute/standard/PresentationDirection.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2001, 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
@@ -43,7 +43,7 @@
4343
* <p>
4444
* <b>IPP Compatibility:</b> This attribute is not an IPP 1.1 attribute; it is
4545
* an attribute in the Production Printing Extension
46-
* (<a href="ftp://ftp.pwg.org/pub/pwg/standards/temp_archive/pwg5100.3.pdf">
46+
* (<a href="https://ftp.pwg.org/pub/pwg/standards/temp_archive/pwg5100.3.pdf">
4747
* PDF</a>) of IPP 1.1. The category name returned by {@code getName()} is the
4848
* IPP attribute name. The enumeration's integer value is the IPP enum value.
4949
* The {@code toString()} method returns the IPP string representation of the

src/java.se/share/classes/module-info.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
* questions.
2424
*/
2525

26-
import jdk.internal.javac.ParticipatesInPreview;
27-
2826
/**
2927
* Defines the API of the Java SE Platform.
3028
*
@@ -40,7 +38,6 @@
4038
* @moduleGraph
4139
* @since 9
4240
*/
43-
@ParticipatesInPreview
4441
module java.se {
4542
requires transitive java.base;
4643
requires transitive java.compiler;

src/java.sql/share/classes/java/sql/SQLPermission.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* A {@code SQLPermission} object contains
3333
* a name (also referred to as a "target name") but no actions
3434
* list; there is either a named permission or there is not.
35-
* The target name is the name of the permission (see below). The
35+
* The target name is the name of the permission. The
3636
* naming convention follows the hierarchical property naming convention.
3737
* In addition, an asterisk
3838
* may appear at the end of the name, following a ".", or by itself, to

0 commit comments

Comments
 (0)