diff --git a/8300800-UB-Shift-exponent-32-is-too-large-for-32-bit.patch b/8300800-UB-Shift-exponent-32-is-too-large-for-32-bit.patch new file mode 100644 index 0000000000000000000000000000000000000000..9468f5865d6989fb4f2c09309ef08ddfea8d54ea --- /dev/null +++ b/8300800-UB-Shift-exponent-32-is-too-large-for-32-bit.patch @@ -0,0 +1,22 @@ +Subject: 8300800: UB: Shift exponent 32 is too large for 32-bit type 'int' + +--- + src/hotspot/cpu/aarch64/immediate_aarch64.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/hotspot/cpu/aarch64/immediate_aarch64.cpp b/src/hotspot/cpu/aarch64/immediate_aarch64.cpp +index 3d87fde2b..961f93ed7 100644 +--- a/src/hotspot/cpu/aarch64/immediate_aarch64.cpp ++++ b/src/hotspot/cpu/aarch64/immediate_aarch64.cpp +@@ -295,7 +295,7 @@ int expandLogicalImmediate(uint32_t immN, uint32_t immr, + uint64_t and_bits_sub = replicate(and_bit, 1, nbits); + uint64_t or_bits_sub = replicate(or_bit, 1, nbits); + uint64_t and_bits_top = (and_bits_sub << nbits) | ones(nbits); +- uint64_t or_bits_top = (0 << nbits) | or_bits_sub; ++ uint64_t or_bits_top = (UCONST64(0) << nbits) | or_bits_sub; + + tmask = ((tmask + & (replicate(and_bits_top, 2 * nbits, 32 / nbits))) +-- +2.33.0 + diff --git a/8334780-Crash-assert-h_array_list.not_null-failed-in.patch b/8334780-Crash-assert-h_array_list.not_null-failed-in.patch new file mode 100644 index 0000000000000000000000000000000000000000..52dde77a9def47c92bc3c156b29016682fe2c992 --- /dev/null +++ b/8334780-Crash-assert-h_array_list.not_null-failed-in.patch @@ -0,0 +1,25 @@ +Subject: 8334780: Crash: assert(h_array_list.not_null()) failed: invariant + +--- + src/hotspot/share/jfr/support/jfrJdkJfrEvent.cpp | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/hotspot/share/jfr/support/jfrJdkJfrEvent.cpp b/src/hotspot/share/jfr/support/jfrJdkJfrEvent.cpp +index 5388349c3..1f594a19e 100644 +--- a/src/hotspot/share/jfr/support/jfrJdkJfrEvent.cpp ++++ b/src/hotspot/share/jfr/support/jfrJdkJfrEvent.cpp +@@ -136,8 +136,9 @@ jobject JdkJfrEvent::get_all_klasses(TRAPS) { + transform_klasses_to_local_jni_handles(event_subklasses, THREAD); + + Handle h_array_list(THREAD, new_java_util_arraylist(THREAD)); +- assert(h_array_list.not_null(), "invariant"); +- ++ if (h_array_list.is_null()) { ++ return empty_java_util_arraylist; ++ } + static const char add_method_name[] = "add"; + static const char add_method_signature[] = "(Ljava/lang/Object;)Z"; + const Klass* const array_list_klass = JfrJavaSupport::klass(empty_java_util_arraylist); +-- +2.33.0 + diff --git a/8335610-DiagnosticFramework-CmdLine-is_executable-co.patch b/8335610-DiagnosticFramework-CmdLine-is_executable-co.patch new file mode 100644 index 0000000000000000000000000000000000000000..cb055a53f1aaed6b2aa143ad6af6f29fd03883fe --- /dev/null +++ b/8335610-DiagnosticFramework-CmdLine-is_executable-co.patch @@ -0,0 +1,22 @@ +Subject: 8335610: DiagnosticFramework: CmdLine::is_executable() correction + +--- + src/hotspot/share/services/diagnosticFramework.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/hotspot/share/services/diagnosticFramework.hpp b/src/hotspot/share/services/diagnosticFramework.hpp +index 8313954aa..3f5087fd1 100644 +--- a/src/hotspot/share/services/diagnosticFramework.hpp ++++ b/src/hotspot/share/services/diagnosticFramework.hpp +@@ -67,7 +67,7 @@ public: + const char* cmd_addr() const { return _cmd; } + size_t cmd_len() const { return _cmd_len; } + bool is_empty() const { return _cmd_len == 0; } +- bool is_executable() const { return is_empty() || _cmd[0] != '#'; } ++ bool is_executable() const { return !is_empty() && _cmd[0] != '#'; } + bool is_stop() const { return !is_empty() && strncmp("stop", _cmd, _cmd_len) == 0; } + }; + +-- +2.33.0 + diff --git a/8337982-Remove-dead-undef-assrt0n.patch b/8337982-Remove-dead-undef-assrt0n.patch new file mode 100644 index 0000000000000000000000000000000000000000..144f2711463ef0f3b9c8b6532653920147f5d520 --- /dev/null +++ b/8337982-Remove-dead-undef-assrt0n.patch @@ -0,0 +1,21 @@ +Subject: 8337982: Remove dead undef assrt0n + +--- + src/hotspot/share/memory/metaspace/blockTree.cpp | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/hotspot/share/memory/metaspace/blockTree.cpp b/src/hotspot/share/memory/metaspace/blockTree.cpp +index 934f25d84..883f7792e 100644 +--- a/src/hotspot/share/memory/metaspace/blockTree.cpp ++++ b/src/hotspot/share/memory/metaspace/blockTree.cpp +@@ -179,7 +179,6 @@ void BlockTree::verify() const { + // as many nodes as are in this tree) + _counter.check(counter); + +- #undef assrt0n + } + + void BlockTree::zap_range(MetaWord* p, size_t word_size) { +-- +2.33.0 + diff --git a/8339149-jfr_flush_event_writer-return-value-type-mis.patch b/8339149-jfr_flush_event_writer-return-value-type-mis.patch new file mode 100644 index 0000000000000000000000000000000000000000..e5969be15335a30d58fb6af122b11f77c076aa81 --- /dev/null +++ b/8339149-jfr_flush_event_writer-return-value-type-mis.patch @@ -0,0 +1,22 @@ +Subject: 8339149: jfr_flush_event_writer - return value type mismatch + +--- + src/hotspot/share/jfr/jni/jfrJniMethod.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/hotspot/share/jfr/jni/jfrJniMethod.hpp b/src/hotspot/share/jfr/jni/jfrJniMethod.hpp +index c7efe1c6a..90d74d59e 100644 +--- a/src/hotspot/share/jfr/jni/jfrJniMethod.hpp ++++ b/src/hotspot/share/jfr/jni/jfrJniMethod.hpp +@@ -119,7 +119,7 @@ jobject JNICALL jfr_get_event_writer(JNIEnv* env, jclass cls); + + jobject JNICALL jfr_new_event_writer(JNIEnv* env, jclass cls); + +-jboolean JNICALL jfr_event_writer_flush(JNIEnv* env, jclass cls, jobject writer, jint used_size, jint requested_size); ++void JNICALL jfr_event_writer_flush(JNIEnv* env, jclass cls, jobject writer, jint used_size, jint requested_size); + + jlong JNICALL jfr_commit(JNIEnv* env, jclass cls, jlong next_position); + +-- +2.33.0 + diff --git a/8339351-Remove-duplicate-line-in-FileMapHeader-print.patch b/8339351-Remove-duplicate-line-in-FileMapHeader-print.patch new file mode 100644 index 0000000000000000000000000000000000000000..42026d1899e1dfad6cabb539a6e63ba0671f7f98 --- /dev/null +++ b/8339351-Remove-duplicate-line-in-FileMapHeader-print.patch @@ -0,0 +1,21 @@ +Subject: 8339351: Remove duplicate line in FileMapHeader::print + +--- + src/hotspot/share/cds/filemap.cpp | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/hotspot/share/cds/filemap.cpp b/src/hotspot/share/cds/filemap.cpp +index 7d12e1aca..023c0762a 100644 +--- a/src/hotspot/share/cds/filemap.cpp ++++ b/src/hotspot/share/cds/filemap.cpp +@@ -278,7 +278,6 @@ void FileMapHeader::print(outputStream* st) { + st->print_cr("- core_region_alignment: " SIZE_FORMAT, _core_region_alignment); + st->print_cr("- obj_alignment: %d", _obj_alignment); + st->print_cr("- narrow_oop_base: " INTPTR_FORMAT, p2i(_narrow_oop_base)); +- st->print_cr("- narrow_oop_base: " INTPTR_FORMAT, p2i(_narrow_oop_base)); + st->print_cr("- narrow_oop_shift %d", _narrow_oop_shift); + st->print_cr("- compact_strings: %d", _compact_strings); + st->print_cr("- max_heap_size: " UINTX_FORMAT, _max_heap_size); +-- +2.33.0 + diff --git a/BackPort-JDK-8336346-Fix--Wzero-as-null-pointer-cons.patch b/BackPort-JDK-8336346-Fix--Wzero-as-null-pointer-cons.patch new file mode 100644 index 0000000000000000000000000000000000000000..3115d0c287c5746fb1cea48721a45d10a1065b7c --- /dev/null +++ b/BackPort-JDK-8336346-Fix--Wzero-as-null-pointer-cons.patch @@ -0,0 +1,31 @@ +Subject: BackPort of JDK-8336346: Fix -Wzero-as-null-pointer-constant warnings in jvmciJavaClasses.cpp + +--- + src/hotspot/share/jvmci/jvmciJavaClasses.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/hotspot/share/jvmci/jvmciJavaClasses.cpp b/src/hotspot/share/jvmci/jvmciJavaClasses.cpp +index 4346c4050..94229dcb3 100644 +--- a/src/hotspot/share/jvmci/jvmciJavaClasses.cpp ++++ b/src/hotspot/share/jvmci/jvmciJavaClasses.cpp +@@ -581,7 +581,7 @@ void JNIJVMCI::register_natives(JNIEnv* env) { + #define EMPTY2(x,y) + #define FIELD3(className, name, sig) FIELD2(className, name) + #define FIELD2(className, name) \ +- jfieldID JNIJVMCI::className::_##name##_field_id = 0; \ ++ jfieldID JNIJVMCI::className::_##name##_field_id = nullptr; \ + int HotSpotJVMCI::className::_##name##_offset = 0; + #define METHOD(jniCallType, jniGetMethod, hsCallType, returnType, className, methodName, signatureSymbolName, args) + #define CONSTRUCTOR(className, signature) +@@ -623,7 +623,7 @@ JVMCI_CLASSES_DO(EMPTY2, EMPTY0, FIELD2, FIELD2, FIELD2, FIELD2, FIELD2, FIELD3, + void JNIJVMCI::className::check(JVMCIEnv* jvmciEnv, JVMCIObject obj, const char* field_name, jfieldID offset) { \ + assert(obj.is_non_null(), "null field access of %s.%s", #className, field_name); \ + assert(jvmciEnv->isa_##className(obj), "wrong class, " #className " expected, found %s", jvmciEnv->klass_name(obj)); \ +- assert(offset != 0, "must be valid offset"); \ ++ assert(offset != nullptr, "must be valid offset"); \ + } \ + jclass JNIJVMCI::className::_class = nullptr; + +-- +2.33.0 + diff --git a/Backport-JDK-8304484-CDS-dynamic-dumping-incorrectly.patch b/Backport-JDK-8304484-CDS-dynamic-dumping-incorrectly.patch new file mode 100644 index 0000000000000000000000000000000000000000..4ebe2627bd215a9d35a91595a701c43bcd14c1cf --- /dev/null +++ b/Backport-JDK-8304484-CDS-dynamic-dumping-incorrectly.patch @@ -0,0 +1,22 @@ +Subject: Backport JDK-8304484 CDS dynamic dumping incorrectly leads to "Error occurred during initialization of VM" + +--- + src/hotspot/share/classfile/classLoader.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/hotspot/share/classfile/classLoader.cpp b/src/hotspot/share/classfile/classLoader.cpp +index 5e89673a5..e4a14d560 100644 +--- a/src/hotspot/share/classfile/classLoader.cpp ++++ b/src/hotspot/share/classfile/classLoader.cpp +@@ -445,7 +445,7 @@ bool ClassPathImageEntry::is_modules_image() const { + void ClassLoader::exit_with_path_failure(const char* error, const char* message) { + Arguments::assert_is_dumping_archive(); + tty->print_cr("Hint: enable -Xlog:class+path=info to diagnose the failure"); +- vm_exit_during_initialization(error, message); ++ vm_exit_during_cds_dumping(error, message); + } + #endif + +-- +2.33.0 + diff --git a/Backport-JDK-8313909-JVMCI-assert-cp-tag_at-index-.i.patch b/Backport-JDK-8313909-JVMCI-assert-cp-tag_at-index-.i.patch new file mode 100644 index 0000000000000000000000000000000000000000..52ecc8588507cd95b1a84f35347c7ea3f899ef3b --- /dev/null +++ b/Backport-JDK-8313909-JVMCI-assert-cp-tag_at-index-.i.patch @@ -0,0 +1,24 @@ +Subject: Backport JDK-8313909 [JVMCI] assert(cp->tag_at(index).is_unresolved_klass()) in lookupKlassInPool + +--- + src/hotspot/share/jvmci/jvmciCompilerToVM.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp +index 5b45499f9..df9f866b9 100644 +--- a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp ++++ b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp +@@ -879,7 +879,9 @@ C2V_VMENTRY_NULL(jobject, lookupKlassInPool, (JNIEnv* env, jobject, ARGUMENT_PAI + } else if (tag.is_symbol()) { + symbol = cp->symbol_at(index); + } else { +- assert(cp->tag_at(index).is_unresolved_klass(), "wrong tag"); ++ if (!tag.is_unresolved_klass()) { ++ JVMCI_THROW_MSG_NULL(InternalError, err_msg("Expected %d at index %d, got %d", JVM_CONSTANT_UnresolvedClassInError, index, tag.value())); ++ } + symbol = cp->klass_name_at(index); + } + } +-- +2.33.0 + diff --git a/Backport-JDK-8320308-C2-compilation-crashes-in-Libra.patch b/Backport-JDK-8320308-C2-compilation-crashes-in-Libra.patch new file mode 100644 index 0000000000000000000000000000000000000000..88203a960b22bc329a08dc0b338bd3d356f676da --- /dev/null +++ b/Backport-JDK-8320308-C2-compilation-crashes-in-Libra.patch @@ -0,0 +1,161 @@ +Subject: Backport JDK-8320308 C2 compilation crashes in LibraryCallKit::inline_unsafe_access + +--- + src/hotspot/share/opto/library_call.cpp | 7 +- + .../TestUnsafeArrayAccessWithNullBase.java | 113 ++++++++++++++++++ + 2 files changed, 117 insertions(+), 3 deletions(-) + create mode 100644 test/hotspot/jtreg/compiler/parsing/TestUnsafeArrayAccessWithNullBase.java + +diff --git a/src/hotspot/share/opto/library_call.cpp b/src/hotspot/share/opto/library_call.cpp +index af2ea6095..3ef0098c4 100644 +--- a/src/hotspot/share/opto/library_call.cpp ++++ b/src/hotspot/share/opto/library_call.cpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1999, 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 +@@ -2004,7 +2004,7 @@ LibraryCallKit::classify_unsafe_addr(Node* &base, Node* &offset, BasicType type) + if (base_type == nullptr) { + // Unknown type. + return Type::AnyPtr; +- } else if (base_type == TypePtr::NULL_PTR) { ++ } else if (_gvn.type(base->uncast()) == TypePtr::NULL_PTR) { + // Since this is a null+long form, we have to switch to a rawptr. + base = _gvn.transform(new CastX2PNode(offset)); + offset = MakeConX(0); +@@ -2322,8 +2322,9 @@ bool LibraryCallKit::inline_unsafe_access(bool is_store, const BasicType type, c + SafePointNode* old_map = clone_map(); + + Node* adr = make_unsafe_address(base, offset, type, kind == Relaxed); ++ assert(!stopped(), "Inlining of unsafe access failed: address construction stopped unexpectedly"); + +- if (_gvn.type(base)->isa_ptr() == TypePtr::NULL_PTR) { ++ if (_gvn.type(base->uncast())->isa_ptr() == TypePtr::NULL_PTR) { + if (type != T_OBJECT) { + decorators |= IN_NATIVE; // off-heap primitive access + } else { +diff --git a/test/hotspot/jtreg/compiler/parsing/TestUnsafeArrayAccessWithNullBase.java b/test/hotspot/jtreg/compiler/parsing/TestUnsafeArrayAccessWithNullBase.java +new file mode 100644 +index 000000000..28eb4f3c1 +--- /dev/null ++++ b/test/hotspot/jtreg/compiler/parsing/TestUnsafeArrayAccessWithNullBase.java +@@ -0,0 +1,113 @@ ++/* ++ * Copyright (c) 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 ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/** ++ * @test ++ * @bug 8320308 ++ * @summary Unsafe::getShortUnaligned with base null hidden behind CheckCastPP nodes ++ * @library /test/lib ++ * @modules java.base/jdk.internal.misc ++ * @run main/othervm -Xbatch -XX:CompileCommand=quiet -XX:TypeProfileLevel=222 ++ * -XX:+IgnoreUnrecognizedVMOptions -XX:+AlwaysIncrementalInline ++ * -XX:CompileCommand=compileonly,compiler.parsing.TestUnsafeArrayAccessWithNullBase::test* ++ * -XX:-TieredCompilation compiler.parsing.TestUnsafeArrayAccessWithNullBase ++ * @run main compiler.parsing.TestUnsafeArrayAccessWithNullBase ++ */ ++ ++package compiler.parsing; ++ ++import java.lang.reflect.*; ++import jdk.internal.misc.Unsafe; ++ ++public class TestUnsafeArrayAccessWithNullBase { ++ ++ /* ++ Trigger bug when handling Unsafe.getShortUnaligned with null checks and inlined methods. ++ The bug appears when the method is incrementally inlined and optimized based on the argument profile information. ++ ++ Warmup Phase: By warming up with non-null values, the argument profile for the helper methods records non-null types. ++ - insert CheckCastPP: speculative=byte[int:>=0] for return of getSmall/getLarge ++ - insert CheckCastPP: speculative=byte[int:>=0] for argument `Object array` in helperSmall/helperLarge ++ Trigger Phase: Calling test causes LibraryCallKit::inline_unsafe_access(..) for Unsafe::getShortUnaligned to fail: ++ Reason: UNSAFE.getShortUnaligned(array, offset) is called with array=null, ++ but ConP null is now hidden by two CheckCastPP with speculative=byte[int:>=0] in the graph ++ */ ++ ++ private static final Unsafe UNSAFE = Unsafe.getUnsafe(); ++ ++ private static final Object byteArray = new byte[1_050_000]; ++ ++ public static Object getLarge(boolean useNull) { ++ return useNull ? null : byteArray; ++ } ++ ++ public static Object getSmall(boolean useNull) { ++ return useNull ? null : new byte[10]; ++ } ++ ++ // use a helper to delay inlining of UNSAFE.getShortUnaligned ++ public static int helperLarge(Object array, boolean run) { ++ // offset >= os::vm_page_size(): LibraryCallKit::classify_unsafe_addr returns Type::AnyPtr ++ return run ? UNSAFE.getShortUnaligned(array, 1_049_000) : 0; // after warmup CheckCastPP: speculative=byte[int:>=0] ++ } ++ ++ public static int accessLargeArray(boolean useNull, boolean run) { ++ Object array = getLarge(useNull); // after warmup CheckCastPP: speculative=byte[int:>=0] ++ // getLarge() ensures null is only visible after helperLarge was (incrementally) inlined ++ return helperLarge(array, run); ++ } ++ ++ // use a helper to delay inlining of UNSAFE.getShortUnaligned ++ // warmup adds argument profile information for array: CheckCastPP with type non null ++ public static int helperSmall(Object array, boolean run) { ++ // 0 <= offset < os::vm_page_size(): LibraryCallKit::classify_unsafe_addr returns Type::OopPtr ++ return run ? UNSAFE.getShortUnaligned(array, 1) : 0; // after warmup CheckCastPP: speculative=byte[int:>=0] ++ } ++ ++ public static int accessSmallArray(boolean useNull, boolean run) { ++ Object array = getSmall(useNull); // after warmup CheckCastPP: speculative=byte[int:>=0] ++ return helperSmall(array, run); ++ } ++ ++ public static int test1(boolean run) { ++ return accessLargeArray(true, run); ++ } ++ ++ public static int test2(boolean run) { ++ return accessSmallArray(true, run); ++ } ++ ++ public static void main(String[] args) { ++ // Warmup to collect speculative types ++ for (int i = 0; i < 10_000; i++) { ++ accessLargeArray(false, true); ++ accessSmallArray(false, true); ++ } ++ ++ // Trigger Compilation ++ for (int i = 0; i < 10_000; ++i) { ++ test1(false); ++ test2(false); ++ } ++ } ++} +-- +2.33.0 + diff --git a/Backport-JDK-8322812-Manpage-for-jcmd-is-missing-JFR.patch b/Backport-JDK-8322812-Manpage-for-jcmd-is-missing-JFR.patch new file mode 100644 index 0000000000000000000000000000000000000000..544e826de204fcf76e44ba9ad13fd4a375177387 --- /dev/null +++ b/Backport-JDK-8322812-Manpage-for-jcmd-is-missing-JFR.patch @@ -0,0 +1,84 @@ +Subject: Backport JDK-8322812 Manpage for jcmd is missing JFR.view command + +--- + src/jdk.jcmd/share/man/jcmd.1 | 53 +++++++++++++++++++++++++++++++++-- + 1 file changed, 51 insertions(+), 2 deletions(-) + +diff --git a/src/jdk.jcmd/share/man/jcmd.1 b/src/jdk.jcmd/share/man/jcmd.1 +index 27f5ee5eb..f3e254be9 100644 +--- a/src/jdk.jcmd/share/man/jcmd.1 ++++ b/src/jdk.jcmd/share/man/jcmd.1 +@@ -1,4 +1,4 @@ +-.\" Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. ++.\" Copyright (c) 2012, 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 +@@ -35,7 +35,7 @@ + . ftr VB CB + . ftr VBI CBI + .\} +-.TH "JCMD" "1" "2023" "JDK 21" "JDK Commands" ++.TH "JCMD" "1" "2025" "JDK 24-ea" "JDK Commands" + .hy + .SH NAME + .PP +@@ -625,6 +625,55 @@ If no path is provided, the data from the recording is discarded. + value) + .RE + .TP ++\f[V]JFR.view\f[R] [\f[I]options\f[R]] ++Display event data in predefined views. ++.RS ++.PP ++Impact: Medium ++.PP ++\f[B]Note:\f[R] ++.PP ++The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or ++\f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax. ++If no parameters are entered, then a list of available views are ++displayed. ++.PP ++\f[I]options\f[R]: ++.IP \[bu] 2 ++\f[V]cell-height\f[R]: (Optional) Maximum number of rows in a table ++cell. ++(INT, default value depends on the view) ++.IP \[bu] 2 ++\f[V]maxage\f[R]: (Optional) Length of time for the view to span. ++(INT followed by \[aq]s\[aq] for seconds \[aq]m\[aq] for minutes or ++\[aq]h\[aq] for hours, default value is 10m) ++.IP \[bu] 2 ++\f[V]maxsize\f[R]: (Optional) Maximum size for the view to span in bytes ++if one of the following suffixes is not used: \[aq]m\[aq] or \[aq]M\[aq] ++for megabytes OR \[aq]g\[aq] or \[aq]G\[aq] for gigabytes. ++(STRING, default value is 32MB) ++.IP \[bu] 2 ++\f[V]truncate\f[R]: (Optional) Maximum number of rows in a table cell. ++(INT, default value depends on the view) ++.IP \[bu] 2 ++\f[V]verbose\f[R]: (Optional) Displays the query that makes up the view. ++(BOOLEAN, default value is false) ++.IP \[bu] 2 ++\f[V]width\f[R]: (Optional) The width of the view in characters. ++(INT, default value depends on the view) ++.PP ++\f[I]arguments\f[R]: ++.IP \[bu] 2 ++\f[V]view\f[R]: Name of the view or event type to display. ++Use \f[V]help JFR.view\f[R] to see a list of available views. ++(STRING, no default value) ++.PP ++The view parameter can be an event type name. ++Use \f[V]JFR.view types\f[R] to see a list. ++To display all views, use \f[V]JFR.view all-views\f[R]. ++To display all events, use \f[V]JFR.view all-events\f[R]. ++.RE ++.TP + \f[V]JVMTI.agent_load\f[R] [\f[I]arguments\f[R]] + Loads JVMTI native agent. + .RS +-- +2.33.0 + diff --git a/Backport-JDK-8323699-MessageFormat.toPattern-generat.patch b/Backport-JDK-8323699-MessageFormat.toPattern-generat.patch new file mode 100644 index 0000000000000000000000000000000000000000..174cac22b5f2a2b51d3a0e41dc9674fc7b2428bf --- /dev/null +++ b/Backport-JDK-8323699-MessageFormat.toPattern-generat.patch @@ -0,0 +1,566 @@ +Subject: Backport JDK-8323699: MessageFormat.toPattern() generates non-equivalent MessageFormat pattern + +--- + .../classes/java/text/MessageFormat.java | 76 +++- + .../MessageFormatToPatternTest.java | 364 ++++++++++++++++++ + .../MessageFormatsByArgumentIndex.java | 8 +- + .../MessageFormat/MessageRegression.java | 6 +- + 4 files changed, 442 insertions(+), 12 deletions(-) + create mode 100644 test/jdk/java/text/Format/MessageFormat/MessageFormatToPatternTest.java + +diff --git a/src/java.base/share/classes/java/text/MessageFormat.java b/src/java.base/share/classes/java/text/MessageFormat.java +index 28d1474ad..659838c8a 100644 +--- a/src/java.base/share/classes/java/text/MessageFormat.java ++++ b/src/java.base/share/classes/java/text/MessageFormat.java +@@ -548,6 +548,11 @@ public class MessageFormat extends Format { + * The string is constructed from internal information and therefore + * does not necessarily equal the previously applied pattern. + * ++ * @implSpec The implementation in {@link MessageFormat} returns a ++ * string that, when passed to a {@code MessageFormat()} constructor ++ * or {@link #applyPattern applyPattern()}, produces an instance that ++ * is semantically equivalent to this instance. ++ * + * @return a pattern representing the current state of the message format + */ + public String toPattern() { +@@ -559,6 +564,7 @@ public class MessageFormat extends Format { + lastOffset = offsets[i]; + result.append('{').append(argumentNumbers[i]); + Format fmt = formats[i]; ++ String subformatPattern = null; + if (fmt == null) { + // do nothing, string format + } else if (fmt instanceof NumberFormat) { +@@ -571,10 +577,12 @@ public class MessageFormat extends Format { + } else if (fmt.equals(NumberFormat.getIntegerInstance(locale))) { + result.append(",number,integer"); + } else { +- if (fmt instanceof DecimalFormat) { +- result.append(",number,").append(((DecimalFormat)fmt).toPattern()); +- } else if (fmt instanceof ChoiceFormat) { +- result.append(",choice,").append(((ChoiceFormat)fmt).toPattern()); ++ if (fmt instanceof DecimalFormat dfmt) { ++ result.append(",number"); ++ subformatPattern = dfmt.toPattern(); ++ } else if (fmt instanceof ChoiceFormat cfmt) { ++ result.append(",choice"); ++ subformatPattern = cfmt.toPattern(); + } else { + // UNKNOWN + } +@@ -596,8 +604,9 @@ public class MessageFormat extends Format { + } + } + if (index >= DATE_TIME_MODIFIERS.length) { +- if (fmt instanceof SimpleDateFormat) { +- result.append(",date,").append(((SimpleDateFormat)fmt).toPattern()); ++ if (fmt instanceof SimpleDateFormat sdfmt) { ++ result.append(",date"); ++ subformatPattern = sdfmt.toPattern(); + } else { + // UNKNOWN + } +@@ -607,6 +616,14 @@ public class MessageFormat extends Format { + } else { + //result.append(", unknown"); + } ++ if (subformatPattern != null) { ++ result.append(','); ++ ++ // The subformat pattern comes already quoted, but only for those characters that are ++ // special to the subformat. Therefore, we may need to quote additional characters. ++ // The ones we care about at the MessageFormat level are '{' and '}'. ++ copyAndQuoteBraces(subformatPattern, result); ++ } + result.append('}'); + } + copyAndFixQuotes(pattern, lastOffset, pattern.length(), result); +@@ -1624,6 +1641,53 @@ public class MessageFormat extends Format { + } + } + ++ // Copy the text, but add quotes around any quotables that aren't already quoted ++ private static void copyAndQuoteBraces(String source, StringBuilder target) { ++ ++ // Analyze existing string for already quoted and newly quotable characters ++ record Qchar(char ch, boolean quoted) { }; ++ ArrayList qchars = new ArrayList<>(); ++ boolean quoted = false; ++ boolean anyChangeNeeded = false; ++ for (int i = 0; i < source.length(); i++) { ++ char ch = source.charAt(i); ++ if (ch == '\'') { ++ if (i + 1 < source.length() && source.charAt(i + 1) == '\'') { ++ qchars.add(new Qchar('\'', quoted)); ++ i++; ++ } else { ++ quoted = !quoted; ++ } ++ } else { ++ boolean quotable = ch == '{' || ch == '}'; ++ anyChangeNeeded |= quotable && !quoted; ++ qchars.add(new Qchar(ch, quoted || quotable)); ++ } ++ } ++ ++ // Was any change needed? ++ if (!anyChangeNeeded) { ++ target.append(source); ++ return; ++ } ++ ++ // Build new string, automatically consolidating adjacent runs of quoted chars ++ quoted = false; ++ for (Qchar qchar : qchars) { ++ char ch = qchar.ch; ++ if (ch == '\'') { ++ target.append(ch); // doubling works whether quoted or not ++ } else if (qchar.quoted() != quoted) { ++ target.append('\''); ++ quoted = qchar.quoted(); ++ } ++ target.append(ch); ++ } ++ if (quoted) { ++ target.append('\''); ++ } ++ } ++ + /** + * After reading an object from the input stream, do a simple verification + * to maintain class invariants. +diff --git a/test/jdk/java/text/Format/MessageFormat/MessageFormatToPatternTest.java b/test/jdk/java/text/Format/MessageFormat/MessageFormatToPatternTest.java +new file mode 100644 +index 000000000..020bc8033 +--- /dev/null ++++ b/test/jdk/java/text/Format/MessageFormat/MessageFormatToPatternTest.java +@@ -0,0 +1,364 @@ ++/* ++ * Copyright (c) 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 ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* ++ * @test ++ * @summary Verify that MessageFormat.toPattern() properly escapes special curly braces ++ * @bug 8323699 ++ * @run junit MessageFormatToPatternTest ++ */ ++ ++import java.text.ChoiceFormat; ++import java.text.DateFormat; ++import java.text.DecimalFormat; ++import java.text.Format; ++import java.text.MessageFormat; ++import java.text.NumberFormat; ++import java.text.SimpleDateFormat; ++import java.util.ArrayList; ++import java.util.Date; ++import java.util.Locale; ++import java.util.Random; ++import java.util.stream.Stream; ++ ++import org.junit.jupiter.api.AfterAll; ++import org.junit.jupiter.api.BeforeAll; ++import org.junit.jupiter.api.Test; ++import org.junit.jupiter.params.ParameterizedTest; ++import org.junit.jupiter.params.provider.Arguments; ++import org.junit.jupiter.params.provider.MethodSource; ++ ++import static org.junit.jupiter.api.Assertions.assertEquals; ++ ++public class MessageFormatToPatternTest { ++ ++ private static final int NUM_RANDOM_TEST_CASES = 1000; ++ ++ // Max levels of nesting of ChoiceFormats inside MessageFormats ++ private static final int MAX_FORMAT_NESTING = 3; ++ ++ private static Locale savedLocale; ++ private static long randomSeed; // set this to a non-zero value for reproducibility ++ private static Random random; ++ private static boolean spitSeed; ++ private static int textCount; ++ ++// Setup & Teardown ++ ++ @BeforeAll ++ public static void setup() { ++ savedLocale = Locale.getDefault(); ++ Locale.setDefault(Locale.US); ++ if (randomSeed == 0) ++ randomSeed = new Random().nextLong(); ++ random = new Random(randomSeed); ++ } ++ ++ @AfterAll ++ public static void teardown() { ++ Locale.setDefault(savedLocale); ++ } ++ ++// Tests ++ ++ // Test expected output when given a MessageFormat pattern string and value 1.23 ++ @ParameterizedTest ++ @MethodSource("generateOutputTestCases") ++ public void testOutput(String pattern, String expected) { ++ ++ // Test we get the expected output ++ MessageFormat format = new MessageFormat(pattern); ++ String actual = format.format(new Object[] { 1.23 }); ++ assertEquals(expected, actual); ++ ++ // Test round trip as well ++ testRoundTrip(format); ++ } ++ ++ public static Stream generateOutputTestCases() { ++ return Stream.of( ++ ++ // This is the test case from JDK-8323699 ++ Arguments.of("{0,choice,0.0#option A: {0}|1.0#option B: {0}'}'}", "option B: 1.23}"), ++ Arguments.of("{0,choice,0.0#option A: {0}|2.0#option B: {0}'}'}", "option A: 1.23"), ++ ++ // A few more test cases from the PR#17416 discussion ++ Arguments.of("Test: {0,number,foo'{'#.00}", "Test: foo{1.23"), ++ Arguments.of("Test: {0,number,foo'}'#.00}", "Test: foo}1.23"), ++ Arguments.of("{0,number,' abc }'' ' 0.00}", " abc }' 1.23"), ++ Arguments.of("Wayne ''The Great One'' Gretsky", "Wayne 'The Great One' Gretsky"), ++ Arguments.of("'Wayne ''The Great One'' Gretsky'", "Wayne 'The Great One' Gretsky"), ++ Arguments.of("{0,choice,0.0#'''{''curly''}'' braces'}", "{curly} braces"), ++ Arguments.of("{0,choice,0.0#''{''curly''}'' braces}", "{curly} braces"), ++ Arguments.of("{0,choice,0.0#'{0,choice,0.0#''{0,choice,0.0#''''{0,choice,0.0#foo}''''}''}'}", "foo"), ++ ++ // Absurd double quote examples ++ Arguments.of("Foo '}''''''''}' {0,number,bar'}' '}' } baz ", "Foo }''''} bar} } 1 baz "), ++ Arguments.of("'''}''{'''}''''}'", "'}'{'}''}"), ++ ++ // An absurdly complicated example ++ Arguments.of("{0,choice,0.0#text2887 [] '{'1,date,YYYY-MM-DD'}' text2888 [''*'']|1.0#found|2.0#'text2901 [oog'')!''] {2,choice,0.0#''text2897 ['''']''''wq1Q] {2,choice,0.0#''''text2891 [s''''''''&''''''''] {0,number,#0.##} text2892 [8''''''''|$'''''''''''''''''''''''']''''|1.0#''''text2893 [] {0,number,#0.##} text2894 [S'''''''']'''''''']''''|2.0#text2895 [''''''''.''''''''eB] {1,date,YYYY-MM-DD} text2896 [9Y]} text2898 []''|1.0#''text2899 [xk7] {0,number,#0.##} text2900 []''} text2902 [7'':$)''O]'}{0,choice,0.0#'text2903 [] {0,number,#0.##} text2904 [S'':'']'|1.0#'me'}", "foundme") ++ ); ++ } ++ ++ // Go roundrip from MessageFormat -> pattern string -> MessageFormat and verify equivalence ++ @ParameterizedTest ++ @MethodSource("generateRoundTripTestCases") ++ public void testRoundTrip(MessageFormat format1) { ++ ++ // Prepare MessageFormat argument ++ Object[] args = new Object[] { ++ 8.5, // argument for DecimalFormat ++ new Date(1705502102677L), // argument for SimpleDateFormat ++ random.nextInt(6) // argument for ChoiceFormat ++ }; ++ ++ String pattern1 = null; ++ String result1 = null; ++ String pattern2 = null; ++ String result2 = null; ++ try { ++ ++ // Format using the given MessageFormat ++ pattern1 = format1.toPattern(); ++ result1 = format1.format(args); ++ ++ // Round-trip via toPattern() and repeat ++ MessageFormat format2 = new MessageFormat(pattern1); ++ pattern2 = format2.toPattern(); ++ result2 = format2.format(args); ++ ++ // Check equivalence ++ assertEquals(result1, result2); ++ assertEquals(pattern1, pattern2); ++ ++ // Debug ++ //showRoundTrip(format1, pattern1, result1, pattern2, result2); ++ } catch (RuntimeException | Error e) { ++ System.out.println(String.format("%n********** FAILURE **********%n")); ++ System.out.println(String.format("%s%n", e)); ++ if (!spitSeed) { ++ System.out.println(String.format("*** Random seed was 0x%016xL%n", randomSeed)); ++ spitSeed = true; ++ } ++ showRoundTrip(format1, pattern1, result1, pattern2, result2); ++ throw e; ++ } ++ } ++ ++ public static Stream generateRoundTripTestCases() { ++ final ArrayList argList = new ArrayList<>(); ++ for (int i = 0; i < NUM_RANDOM_TEST_CASES; i++) ++ argList.add(Arguments.of(randomFormat())); ++ return argList.stream(); ++ } ++ ++ // Generate a "random" MessageFormat. We do this by creating a MessageFormat with "{0}" placeholders ++ // and then substituting in random DecimalFormat, DateFormat, and ChoiceFormat subformats. The goal here ++ // is to avoid using pattern strings to construct formats, because they're what we're trying to check. ++ private static MessageFormat randomFormat() { ++ ++ // Create a temporary MessageFormat containing "{0}" placeholders and random text ++ StringBuilder tempPattern = new StringBuilder(); ++ int numParts = random.nextInt(3) + 1; ++ for (int i = 0; i < numParts; i++) { ++ if (random.nextBoolean()) ++ tempPattern.append("{0}"); // temporary placeholder for a subformat ++ else ++ tempPattern.append(quoteText(randomText())); ++ } ++ ++ // Replace all the "{0}" placeholders with random subformats ++ MessageFormat format = new MessageFormat(tempPattern.toString()); ++ Format[] formats = format.getFormats(); ++ for (int i = 0; i < formats.length; i++) ++ formats[i] = randomSubFormat(0); ++ format.setFormats(formats); ++ ++ // Done ++ return format; ++ } ++ ++ // Generate some random text ++ private static String randomText() { ++ StringBuilder buf = new StringBuilder(); ++ int length = random.nextInt(6); ++ for (int i = 0; i < length; i++) { ++ char ch = (char)(0x20 + random.nextInt(0x5f)); ++ buf.append(ch); ++ } ++ return buf.toString(); ++ } ++ ++ // Quote non-alphanumeric characters in the given plain text ++ private static String quoteText(String string) { ++ StringBuilder buf = new StringBuilder(); ++ boolean quoted = false; ++ for (int i = 0; i < string.length(); i++) { ++ char ch = string.charAt(i); ++ if (ch == '\'') ++ buf.append("''"); ++ else if (!(ch == ' ' || Character.isLetter(ch) || Character.isDigit(ch))) { ++ if (!quoted) { ++ buf.append('\''); ++ quoted = true; ++ } ++ buf.append(ch); ++ } else { ++ if (quoted) { ++ buf.append('\''); ++ quoted = false; ++ } ++ buf.append(ch); ++ } ++ } ++ if (quoted) ++ buf.append('\''); ++ return buf.toString(); ++ } ++ ++ // Create a random subformat for a MessageFormat ++ private static Format randomSubFormat(int nesting) { ++ int which; ++ if (nesting >= MAX_FORMAT_NESTING) ++ which = random.nextInt(2); // no more recursion ++ else ++ which = random.nextInt(3); ++ switch (which) { ++ case 0: ++ return new DecimalFormat("#.##"); ++ case 1: ++ return new SimpleDateFormat("YYYY-MM-DD"); ++ default: ++ int numChoices = random.nextInt(3) + 1; ++ assert numChoices > 0; ++ final double[] limits = new double[numChoices]; ++ final String[] formats = new String[numChoices]; ++ for (int i = 0; i < limits.length; i++) { ++ limits[i] = (double)i; ++ formats[i] = randomMessageFormatContaining(randomSubFormat(nesting + 1)); ++ } ++ return new ChoiceFormat(limits, formats); ++ } ++ } ++ ++ // Create a MessageFormat pattern string that includes the given Format as a subformat. ++ // The result will be one option in a ChoiceFormat which is nested in an outer MessageFormat. ++ // A ChoiceFormat option string is just a plain string; it's only when that plain string ++ // bubbles up to a containing MessageFormat that it gets interpreted as a MessageFormat string, ++ // and that only happens if the option string contains a '{' character. That will always ++ // be the case for the strings returned by this method of course. ++ private static String randomMessageFormatContaining(Format format) { ++ String beforeText = quoteText(randomText().replaceAll("\\{", "")); // avoid invalid MessageFormat syntax ++ String afterText = quoteText(randomText().replaceAll("\\{", "")); // avoid invalid MessageFormat syntax ++ String middleText; ++ if (format instanceof DecimalFormat dfmt) ++ middleText = String.format("{0,number,%s}", dfmt.toPattern()); ++ else if (format instanceof SimpleDateFormat sdfmt) ++ middleText = String.format("{1,date,%s}", sdfmt.toPattern()); ++ else if (format instanceof ChoiceFormat cfmt) ++ middleText = String.format("{2,choice,%s}", cfmt.toPattern()); ++ else ++ throw new RuntimeException("internal error"); ++ return String.format("text%d [%s] %s text%d [%s]", ++textCount, beforeText, middleText, ++textCount, afterText); ++ } ++ ++// Debug printing ++ ++ private void showRoundTrip(MessageFormat format1, String pattern1, String result1, String pattern2, String result2) { ++ print(0, format1); ++ System.out.println(); ++ if (pattern1 != null) ++ System.out.println(String.format(" pattern1 = %s", javaLiteral(pattern1))); ++ if (result1 != null) ++ System.out.println(String.format(" result1 = %s", javaLiteral(result1))); ++ if (pattern2 != null) ++ System.out.println(String.format(" pattern2 = %s", javaLiteral(pattern2))); ++ if (result2 != null) ++ System.out.println(String.format(" result2 = %s", javaLiteral(result2))); ++ System.out.println(); ++ } ++ ++ private static void print(int depth, Object format) { ++ if (format == null) ++ return; ++ if (format instanceof String) ++ System.out.println(String.format("%s- %s", indent(depth), javaLiteral((String)format))); ++ else if (format instanceof MessageFormat) ++ print(depth, (MessageFormat)format); ++ else if (format instanceof DecimalFormat) ++ print(depth, (DecimalFormat)format); ++ else if (format instanceof SimpleDateFormat) ++ print(depth, (SimpleDateFormat)format); ++ else if (format instanceof ChoiceFormat) ++ print(depth, (ChoiceFormat)format); ++ else ++ throw new RuntimeException("internal error: " + format.getClass()); ++ } ++ ++ private static void print(int depth, MessageFormat format) { ++ System.out.println(String.format("%s- %s: %s", indent(depth), "MessageFormat", javaLiteral(format.toPattern()))); ++ for (Format subformat : format.getFormats()) ++ print(depth + 1, subformat); ++ } ++ ++ private static void print(int depth, DecimalFormat format) { ++ System.out.println(String.format("%s- %s: %s", indent(depth), "DecimalFormat", javaLiteral(format.toPattern()))); ++ } ++ ++ private static void print(int depth, SimpleDateFormat format) { ++ System.out.println(String.format("%s- %s: %s", indent(depth), "SimpleDateFormat", javaLiteral(format.toPattern()))); ++ } ++ ++ private static void print(int depth, ChoiceFormat format) { ++ System.out.println(String.format("%s- %s: %s", indent(depth), "ChoiceFormat", javaLiteral(format.toPattern()))); ++ for (Object subformat : format.getFormats()) ++ print(depth + 1, subformat); ++ } ++ ++ private static String indent(int depth) { ++ StringBuilder buf = new StringBuilder(); ++ for (int i = 0; i < depth; i++) ++ buf.append(" "); ++ return buf.toString(); ++ } ++ ++ // Print a Java string in double quotes so it looks like a String literal (for easy pasting into jshell) ++ private static String javaLiteral(String string) { ++ StringBuilder buf = new StringBuilder(); ++ buf.append('"'); ++ for (int i = 0; i < string.length(); i++) { ++ char ch = string.charAt(i); ++ switch (ch) { ++ case '"': ++ case '\\': ++ buf.append('\\'); ++ // FALLTHROUGH ++ default: ++ buf.append(ch); ++ break; ++ } ++ } ++ return buf.append('"').toString(); ++ } ++} +diff --git a/test/jdk/java/text/Format/MessageFormat/MessageFormatsByArgumentIndex.java b/test/jdk/java/text/Format/MessageFormat/MessageFormatsByArgumentIndex.java +index 1d69258f6..b82d566d3 100644 +--- a/test/jdk/java/text/Format/MessageFormat/MessageFormatsByArgumentIndex.java ++++ b/test/jdk/java/text/Format/MessageFormat/MessageFormatsByArgumentIndex.java +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2000, 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 +@@ -35,6 +35,7 @@ import java.text.NumberFormat; + public class MessageFormatsByArgumentIndex { + + private static String choicePattern = "0.0#are no files|1.0#is one file|1.0 JFR.start filename=dump.jfr + $ jcmd JFR.start filename=%s + $ jcmd JFR.start dumponexit=true +- $ jcmd JFR.start maxage=1h,maxsize=1000M ++ $ jcmd JFR.start maxage=1h maxsize=1000M + $ jcmd JFR.start settings=profile +- $ jcmd JFR.start delay=5m,settings=my.jfc ++ $ jcmd JFR.start delay=5m settings=my.jfc + $ jcmd JFR.start gc=high method-profiling=high + $ jcmd JFR.start jdk.JavaMonitorEnter#threshold=1ms + $ jcmd JFR.start +HelloWorld#enabled=true +HelloWorld#stackTrace=true +-- +2.33.0 + diff --git a/Backport-JDK-8326957-Implement-JEP-474-ZGC-Generatio.patch b/Backport-JDK-8326957-Implement-JEP-474-ZGC-Generatio.patch new file mode 100644 index 0000000000000000000000000000000000000000..2e6333fcf1d9426046f1d8961c20fd84bdfecba7 --- /dev/null +++ b/Backport-JDK-8326957-Implement-JEP-474-ZGC-Generatio.patch @@ -0,0 +1,214 @@ +Subject: Backport JDK-8326957 Implement JEP 474: ZGC: Generational Mode by Default + +--- + src/hotspot/share/gc/shared/gc_globals.hpp | 4 +- + src/hotspot/share/gc/x/xArguments.cpp | 2 + + src/hotspot/share/gc/x/xInitialize.cpp | 2 +- + src/hotspot/share/runtime/arguments.cpp | 3 +- + test/hotspot/jtreg/gc/x/TestDeprecated.java | 50 ++++++++++++++++++ + test/hotspot/jtreg/gc/z/TestDefault.java | 51 +++++++++++++++++++ + .../CommandLine/VMDeprecatedOptions.java | 3 +- + 7 files changed, 110 insertions(+), 5 deletions(-) + create mode 100644 test/hotspot/jtreg/gc/x/TestDeprecated.java + create mode 100644 test/hotspot/jtreg/gc/z/TestDefault.java + +diff --git a/src/hotspot/share/gc/shared/gc_globals.hpp b/src/hotspot/share/gc/shared/gc_globals.hpp +index 5d7202685..8e51632bd 100644 +--- a/src/hotspot/share/gc/shared/gc_globals.hpp ++++ b/src/hotspot/share/gc/shared/gc_globals.hpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 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 +@@ -125,7 +125,7 @@ + product(bool, UseZGC, false, \ + "Use the Z garbage collector") \ + \ +- product(bool, ZGenerational, false, \ ++ product(bool, ZGenerational, true, \ + "Use the generational version of ZGC") \ + \ + product(bool, UseShenandoahGC, false, \ +diff --git a/src/hotspot/share/gc/x/xArguments.cpp b/src/hotspot/share/gc/x/xArguments.cpp +index 60e78d2c7..13cb302d1 100644 +--- a/src/hotspot/share/gc/x/xArguments.cpp ++++ b/src/hotspot/share/gc/x/xArguments.cpp +@@ -42,6 +42,8 @@ void XArguments::initialize_heap_flags_and_sizes() { + } + + void XArguments::initialize() { ++ warning("Non-generational ZGC is deprecated."); ++ + // Check mark stack size + const size_t mark_stack_space_limit = XAddressSpaceLimit::mark_stack(); + if (ZMarkStackSpaceLimit > mark_stack_space_limit) { +diff --git a/src/hotspot/share/gc/x/xInitialize.cpp b/src/hotspot/share/gc/x/xInitialize.cpp +index 01b79f3ff..156be1797 100644 +--- a/src/hotspot/share/gc/x/xInitialize.cpp ++++ b/src/hotspot/share/gc/x/xInitialize.cpp +@@ -41,7 +41,7 @@ XInitialize::XInitialize(XBarrierSet* barrier_set) { + log_info(gc, init)("Version: %s (%s)", + VM_Version::vm_release(), + VM_Version::jdk_debug_level()); +- log_info(gc, init)("Using legacy single-generation mode"); ++ log_info(gc, init)("Using deprecated non-generational mode"); + + // Early initialization + XAddress::initialize(); +diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp +index 720a0e9ba..9b8e5aa87 100644 +--- a/src/hotspot/share/runtime/arguments.cpp ++++ b/src/hotspot/share/runtime/arguments.cpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 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 +@@ -500,6 +500,7 @@ static SpecialFlag const special_jvm_flags[] = { + { "InitialRAMFraction", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() }, + { "AllowRedefinitionToAddDeleteMethods", JDK_Version::jdk(13), JDK_Version::undefined(), JDK_Version::undefined() }, + { "FlightRecorder", JDK_Version::jdk(13), JDK_Version::undefined(), JDK_Version::undefined() }, ++ { "ZGenerational", JDK_Version::jdk(21), JDK_Version::undefined(), JDK_Version::undefined() }, + { "DumpSharedSpaces", JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() }, + { "DynamicDumpSharedSpaces", JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() }, + { "RequireSharedSpaces", JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() }, +diff --git a/test/hotspot/jtreg/gc/x/TestDeprecated.java b/test/hotspot/jtreg/gc/x/TestDeprecated.java +new file mode 100644 +index 000000000..17e2e70f4 +--- /dev/null ++++ b/test/hotspot/jtreg/gc/x/TestDeprecated.java +@@ -0,0 +1,50 @@ ++/* ++ * Copyright (c) 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 ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++package gc.x; ++ ++/* ++ * @test TestDeprecated ++ * @requires vm.gc.ZSinglegen ++ * @summary Test ZGenerational Deprecated ++ * @library /test/lib ++ * @run driver gc.x.TestDeprecated ++ */ ++ ++import java.util.LinkedList; ++import jdk.test.lib.process.ProcessTools; ++ ++public class TestDeprecated { ++ static class Test { ++ public static void main(String[] args) throws Exception {} ++ } ++ public static void main(String[] args) throws Exception { ++ ProcessTools.executeLimitedTestJava("-XX:+UseZGC", ++ "-XX:-ZGenerational", ++ "-Xlog:gc+init", ++ Test.class.getName()) ++ .shouldContain("Option ZGenerational was deprecated") ++ .shouldContain("Using deprecated non-generational mode") ++ .shouldHaveExitValue(0); ++ } ++} +diff --git a/test/hotspot/jtreg/gc/z/TestDefault.java b/test/hotspot/jtreg/gc/z/TestDefault.java +new file mode 100644 +index 000000000..c693e8745 +--- /dev/null ++++ b/test/hotspot/jtreg/gc/z/TestDefault.java +@@ -0,0 +1,51 @@ ++/* ++ * Copyright (c) 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 ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++package gc.z; ++ ++/* ++ * @test TestDefault ++ * @requires vm.gc.ZGenerational ++ * @summary Test that ZGC Generational Mode is Default ++ * @library /test/lib ++ * @run driver gc.z.TestDefault ++ */ ++ ++import java.util.LinkedList; ++import jdk.test.lib.process.ProcessTools; ++ ++public class TestDefault { ++ static class Test { ++ public static void main(String[] args) throws Exception {} ++ } ++ public static void main(String[] args) throws Exception { ++ ProcessTools.executeLimitedTestJava("-XX:+UseZGC", ++ "-Xlog:gc+init", ++ Test.class.getName()) ++ .shouldNotContain("Option ZGenerational was deprecated") ++ .shouldNotContain("Using deprecated non-generational mode") ++ .shouldContain("GC Workers for Old Generation") ++ .shouldContain("GC Workers for Young Generation") ++ .shouldHaveExitValue(0); ++ } ++} +diff --git a/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java b/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java +index 95dd88c72..0c9c2d6ea 100644 +--- a/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java ++++ b/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2015, 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 +@@ -62,6 +62,7 @@ public class VMDeprecatedOptions { + {"InitialRAMFraction", "64"}, + {"TLABStats", "false"}, + {"AllowRedefinitionToAddDeleteMethods", "true"}, ++ {"ZGenerational", "false"}, + + // deprecated alias flags (see also aliased_jvm_flags): + {"DefaultMaxRAMFraction", "4"}, +-- +2.33.0 + diff --git a/Backport-JDK-8327538-The-SSLExtension-class-specifie.patch b/Backport-JDK-8327538-The-SSLExtension-class-specifie.patch new file mode 100644 index 0000000000000000000000000000000000000000..20130629a63829e2da04c9733d2eb9e7758543c2 --- /dev/null +++ b/Backport-JDK-8327538-The-SSLExtension-class-specifie.patch @@ -0,0 +1,38 @@ +Subject: Backport JDK-8327538 The SSLExtension class specifies incorrect values for heartbeat per RFC 6520 and post_handshake_auth per RFC 8446 + +--- + .../share/classes/sun/security/ssl/SSLExtension.java | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/java.base/share/classes/sun/security/ssl/SSLExtension.java b/src/java.base/share/classes/sun/security/ssl/SSLExtension.java +index 2a9239fac..2cb74fb10 100644 +--- a/src/java.base/share/classes/sun/security/ssl/SSLExtension.java ++++ b/src/java.base/share/classes/sun/security/ssl/SSLExtension.java +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2018, 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 +@@ -181,7 +181,7 @@ enum SSLExtension implements SSLStringizer { + USE_SRTP (0x000E, "use_srtp"), + + // Extensions defined in RFC 6520 (TLS and DTLS Heartbeat Extension) +- HEARTBEAT (0x000E, "heartbeat"), ++ HEARTBEAT (0x000F, "heartbeat"), + + // Extensions defined in RFC 7301 (TLS Application-Layer Protocol Negotiation Extension) + CH_ALPN (0x0010, "application_layer_protocol_negotiation", +@@ -406,7 +406,7 @@ enum SSLExtension implements SSLStringizer { + CertificateAuthoritiesExtension.ssStringizer), + + OID_FILTERS (0x0030, "oid_filters"), +- POST_HANDSHAKE_AUTH (0x0030, "post_handshake_auth"), ++ POST_HANDSHAKE_AUTH (0x0031, "post_handshake_auth"), + + CH_SIGNATURE_ALGORITHMS_CERT (0x0032, "signature_algorithms_cert", + SSLHandshake.CLIENT_HELLO, +-- +2.33.0 + diff --git a/Backport-JDK-8328107-Shenandoah-C2-TestVerifyLoopOpt.patch b/Backport-JDK-8328107-Shenandoah-C2-TestVerifyLoopOpt.patch new file mode 100644 index 0000000000000000000000000000000000000000..b6a47291de0cb32161093d91b3ce1372e7bc456f --- /dev/null +++ b/Backport-JDK-8328107-Shenandoah-C2-TestVerifyLoopOpt.patch @@ -0,0 +1,120 @@ +Subject: Backport JDK-8328107 Shenandoah/C2: TestVerifyLoopOptimizations test failure + +--- + .../gc/shenandoah/c2/shenandoahSupport.cpp | 8 ++ + .../compiler/TestBarrierOnLoopBackedge.java | 84 +++++++++++++++++++ + 2 files changed, 92 insertions(+) + create mode 100644 test/hotspot/jtreg/gc/shenandoah/compiler/TestBarrierOnLoopBackedge.java + +diff --git a/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp b/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp +index acf4b8f08..ce6403cb4 100644 +--- a/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp ++++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp +@@ -1321,6 +1321,14 @@ void ShenandoahBarrierC2Support::pin_and_expand(PhaseIdealLoop* phase) { + OuterStripMinedLoopNode* outer = head->as_OuterStripMinedLoop(); + hide_strip_mined_loop(outer, outer->unique_ctrl_out()->as_CountedLoop(), phase); + } ++ if (head->is_BaseCountedLoop() && ctrl->is_IfProj() && ctrl->in(0)->is_BaseCountedLoopEnd() && ++ head->as_BaseCountedLoop()->loopexit() == ctrl->in(0)) { ++ Node* entry = head->in(LoopNode::EntryControl); ++ Node* backedge = head->in(LoopNode::LoopBackControl); ++ Node* new_head = new LoopNode(entry, backedge); ++ phase->register_control(new_head, phase->get_loop(entry), entry); ++ phase->lazy_replace(head, new_head); ++ } + } + + // Expand load-reference-barriers +diff --git a/test/hotspot/jtreg/gc/shenandoah/compiler/TestBarrierOnLoopBackedge.java b/test/hotspot/jtreg/gc/shenandoah/compiler/TestBarrierOnLoopBackedge.java +new file mode 100644 +index 000000000..a72c7d69d +--- /dev/null ++++ b/test/hotspot/jtreg/gc/shenandoah/compiler/TestBarrierOnLoopBackedge.java +@@ -0,0 +1,84 @@ ++/* ++ * Copyright (c) 2024, Red Hat, Inc. 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 ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/** ++ * @test ++ * @bug 8328107 ++ * @summary Barrier expanded on backedge break loop verification code ++ * @requires vm.gc.Shenandoah ++ * ++ * @run main/othervm -XX:+UseShenandoahGC -XX:-BackgroundCompilation -XX:CompileCommand=dontinline,TestBarrierOnLoopBackedge::notInlined ++ * -XX:+IgnoreUnrecognizedVMOptions -XX:+VerifyLoopOptimizations TestBarrierOnLoopBackedge ++ * @run main/othervm -XX:+UseShenandoahGC -XX:-BackgroundCompilation -XX:CompileCommand=dontinline,TestBarrierOnLoopBackedge::notInlined ++ * -XX:+IgnoreUnrecognizedVMOptions -XX:+VerifyLoopOptimizations -XX:-UseCountedLoopSafepoints TestBarrierOnLoopBackedge ++ */ ++ ++public class TestBarrierOnLoopBackedge { ++ private static A field = new A(); ++ private static final A finalField = new A(); ++ private static float floatField; ++ ++ public static void main(String[] args) { ++ A[] array = new A[1]; ++ array[0] = finalField; ++ for (int i = 0; i < 20_000; i++) { ++ test1(); ++ test2(); ++ } ++ } ++ ++ private static void test1() { ++ floatField = field.f; ++ for (int i = 0; i < 1000; i++) { ++ notInlined(field); // load barrier split thru phi and ends up on back edge ++ if (i % 2 == 0) { ++ field = finalField; ++ } ++ } ++ } ++ ++ private static void test2() { ++ A[] array = new A[1]; ++ notInlined(array); ++ int i = 0; ++ A a = array[0]; ++ for (;;) { ++ synchronized (new Object()) { ++ } ++ notInlined(a); ++ i++; ++ if (i >= 1000) { ++ break; ++ } ++ a = array[0]; // load barrier pinned on backedge ++ } ++ } ++ ++ private static void notInlined(Object a) { ++ ++ } ++ ++ private static class A { ++ float f; ++ } ++} +-- +2.33.0 + diff --git a/Backport-JDK-8328553-Get-rid-of-JApplet-in-test-jdk-.patch b/Backport-JDK-8328553-Get-rid-of-JApplet-in-test-jdk-.patch new file mode 100644 index 0000000000000000000000000000000000000000..009f689cfc3874ab904c3726f521c6c2646d7843 --- /dev/null +++ b/Backport-JDK-8328553-Get-rid-of-JApplet-in-test-jdk-.patch @@ -0,0 +1,54 @@ +Subject: Backport JDK-8328553 Get rid of JApplet in test/jdk/sanity/client/lib/SwingSet2/src/DemoModule.java + +--- + .../client/lib/SwingSet2/src/DemoModule.java | 15 ++++----------- + 1 file changed, 4 insertions(+), 11 deletions(-) + +diff --git a/test/jdk/sanity/client/lib/SwingSet2/src/DemoModule.java b/test/jdk/sanity/client/lib/SwingSet2/src/DemoModule.java +index 3511583e9..0e7c71083 100644 +--- a/test/jdk/sanity/client/lib/SwingSet2/src/DemoModule.java ++++ b/test/jdk/sanity/client/lib/SwingSet2/src/DemoModule.java +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2018, 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 +@@ -31,7 +31,6 @@ import java.net.URL; + import javax.swing.BoxLayout; + import javax.swing.Icon; + import javax.swing.ImageIcon; +-import javax.swing.JApplet; + import javax.swing.JFrame; + import javax.swing.JPanel; + import javax.swing.UIManager; +@@ -42,10 +41,8 @@ import javax.swing.border.SoftBevelBorder; + + /** + * A generic SwingSet2 demo module +- * +- * @author Jeff Dinkins + */ +-public class DemoModule extends JApplet { ++public class DemoModule extends JPanel { + + // The preferred size of the demo + private int PREFERRED_WIDTH = 680; +@@ -214,10 +211,6 @@ public class DemoModule extends JApplet { + demo.mainImpl(); + } + +- public void init() { +- getContentPane().setLayout(new BorderLayout()); +- getContentPane().add(getDemoPanel(), BorderLayout.CENTER); +- } +- + void updateDragEnabled(boolean dragEnabled) {} +-} +\ No newline at end of file ++} ++ +-- +2.33.0 + diff --git a/Backport-JDK-8329174-update-CodeBuffer-layout-in-com.patch b/Backport-JDK-8329174-update-CodeBuffer-layout-in-com.patch new file mode 100644 index 0000000000000000000000000000000000000000..392b3f012d263f85424f156d4e9400bf20d516c4 --- /dev/null +++ b/Backport-JDK-8329174-update-CodeBuffer-layout-in-com.patch @@ -0,0 +1,45 @@ +Subject: Backport JDK-8329174 update CodeBuffer layout in comment after constants section moved + +--- + src/hotspot/share/asm/codeBuffer.cpp | 16 ++++++---------- + 1 file changed, 6 insertions(+), 10 deletions(-) + +diff --git a/src/hotspot/share/asm/codeBuffer.cpp b/src/hotspot/share/asm/codeBuffer.cpp +index ab8aed1cb..4bc33cc89 100644 +--- a/src/hotspot/share/asm/codeBuffer.cpp ++++ b/src/hotspot/share/asm/codeBuffer.cpp +@@ -24,6 +24,7 @@ + + #include "precompiled.hpp" + #include "asm/codeBuffer.hpp" ++#include "code/compiledIC.hpp" + #include "code/oopRecorder.inline.hpp" + #include "compiler/disassembler.hpp" + #include "logging/log.hpp" +@@ -65,7 +66,11 @@ + // The structure of the CodeBuffer while code is being accumulated: + // + // _total_start -> \ +-// _insts._start -> +----------------+ ++// _consts._start -> +----------------+ ++// | | ++// | Constants | ++// | | ++// _insts._start -> |----------------| + // | | + // | Code | + // | | +@@ -73,10 +78,6 @@ + // | | + // | Stubs | (also handlers for deopt/exception) + // | | +-// _consts._start -> |----------------| +-// | | +-// | Constants | +-// | | + // +----------------+ + // + _total_size -> | | + // +-- +2.33.0 + diff --git a/Backport-JDK-8329754-The-ThreadSafe-attribute-is-ign.patch b/Backport-JDK-8329754-The-ThreadSafe-attribute-is-ign.patch new file mode 100644 index 0000000000000000000000000000000000000000..7cf8f2ab970c73ca681b4da04e65d36c6dc40c51 --- /dev/null +++ b/Backport-JDK-8329754-The-ThreadSafe-attribute-is-ign.patch @@ -0,0 +1,143 @@ +Subject: Backport JDK-8329754 The ThreadSafe attribute is ignored for SecureRandom algorithm aliases + +--- + .../classes/java/security/SecureRandom.java | 6 +- + .../security/SecureRandom/ThreadSafe.java | 55 +++++++++++++------ + 2 files changed, 41 insertions(+), 20 deletions(-) + +diff --git a/src/java.base/share/classes/java/security/SecureRandom.java b/src/java.base/share/classes/java/security/SecureRandom.java +index 6a1683e99..36e71cf54 100644 +--- a/src/java.base/share/classes/java/security/SecureRandom.java ++++ b/src/java.base/share/classes/java/security/SecureRandom.java +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1996, 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 +@@ -230,8 +230,8 @@ public class SecureRandom extends java.util.Random { + if (provider == null || algorithm == null) { + return false; + } else { +- return Boolean.parseBoolean(provider.getProperty( +- "SecureRandom." + algorithm + " ThreadSafe", "false")); ++ Service service = provider.getService("SecureRandom", algorithm); ++ return Boolean.parseBoolean(service.getAttribute("ThreadSafe")); + } + } + +diff --git a/test/jdk/java/security/SecureRandom/ThreadSafe.java b/test/jdk/java/security/SecureRandom/ThreadSafe.java +index 174f3253c..b0975678e 100644 +--- a/test/jdk/java/security/SecureRandom/ThreadSafe.java ++++ b/test/jdk/java/security/SecureRandom/ThreadSafe.java +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2016, 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 +@@ -21,33 +21,46 @@ + * questions. + */ + ++import static jdk.test.lib.Utils.runAndCheckException; ++ ++import java.lang.Override; + import java.security.Provider; + import java.security.SecureRandom; + import java.security.SecureRandomSpi; ++import java.util.List; + import java.util.Map; + + /* + * @test +- * @bug 7004967 ++ * @library /test/lib ++ * @bug 7004967 8329754 + * @summary SecureRandom should be more explicit about threading + */ ++ + public class ThreadSafe { + public static void main(String[] args) throws Exception { + Provider p = new P(); + NoSync.test(SecureRandom.getInstance("S1", p), 5, 5); +- try { +- NoSync.test(SecureRandom.getInstance("S2", p), 5, 5); +- throw new Exception("Failed"); +- } catch (RuntimeException re) { +- // Good +- } ++ NoSync.test(SecureRandom.getInstance("AliasS1", p), 5, 5); ++ ++ runAndCheckException( ++ () -> NoSync.test(SecureRandom.getInstance("S2", p), 5, 5), ++ RuntimeException.class); ++ ++ runAndCheckException( ++ () -> NoSync.test(SecureRandom.getInstance("AliasS2", p), 5, 5), ++ RuntimeException.class); ++ + NoSync.test(SecureRandom.getInstance("S3", p), 5, 5); +- try { +- NoSync.test(SecureRandom.getInstance("S4", p), 5, 5); +- throw new Exception("Failed"); +- } catch (RuntimeException re) { +- // Good +- } ++ NoSync.test(SecureRandom.getInstance("AliasS3", p), 5, 5); ++ ++ runAndCheckException( ++ () -> NoSync.test(SecureRandom.getInstance("S4", p), 5, 5), ++ RuntimeException.class); ++ ++ runAndCheckException( ++ () -> NoSync.test(SecureRandom.getInstance("AliasS4", p), 5, 5), ++ RuntimeException.class); + } + + public static class P extends Provider { +@@ -58,28 +71,36 @@ public class ThreadSafe { + // Good. No attribute. + put("SecureRandom.S1", S.class.getName()); + ++ // Good. Alias of S1, should pass because S1 is not marked as ThreadSafe ++ put("Alg.alias.SecureRandom.AliasS1", "S1"); ++ + // Bad. Boasting ThreadSafe but isn't + put("SecureRandom.S2", S.class.getName()); + put("SecureRandom.S2 ThreadSafe", "true"); + ++ //Bad. Alias of S2, should fail because S2 is marked as ThreadSafe ++ put("alg.Alias.SecureRandom.AliasS2", "S2"); ++ + // Good. No attribute. + putService(new Service(this, "SecureRandom", "S3", +- S.class.getName(), null, null)); ++ S.class.getName(), List.of("AliasS3"), null)); + + // Bad. Boasting ThreadSafe but isn't + putService(new Service(this, "SecureRandom", "S4", +- S.class.getName(), null, Map.of("ThreadSafe", "true"))); ++ S.class.getName(), List.of("AliasS4"), Map.of("ThreadSafe", "true"))); + } + } + + // This implementation is not itself thread safe. + public static class S extends SecureRandomSpi { +- @java.lang.Override ++ ++ @Override + protected void engineSetSeed(byte[] seed) { + return; + } + + private volatile boolean inCall = false; ++ + @Override + protected void engineNextBytes(byte[] bytes) { + if (inCall) { +-- +2.33.0 + diff --git a/Backport-JDK-8332297-annotation-processor-that-gener.patch b/Backport-JDK-8332297-annotation-processor-that-gener.patch new file mode 100644 index 0000000000000000000000000000000000000000..e49784c083ea786c0d58943d3b7bf29fcb7e769e --- /dev/null +++ b/Backport-JDK-8332297-annotation-processor-that-gener.patch @@ -0,0 +1,183 @@ +Subject: Backport JDK-8332297 annotation processor that generates records sometimes fails due to NPE in javac + +--- + .../com/sun/tools/javac/code/Symbol.java | 6 +- + .../processing/RecordGenerationTest.java | 148 ++++++++++++++++++ + 2 files changed, 152 insertions(+), 2 deletions(-) + create mode 100644 test/langtools/tools/javac/processing/RecordGenerationTest.java + +diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java +index 7a939abb3..3438756be 100644 +--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java ++++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java +@@ -1549,9 +1549,11 @@ public abstract class Symbol extends AnnoConstruct implements PoolConstant, Elem + RecordComponent toRemove = null; + for (RecordComponent rc : recordComponents) { + /* it could be that a record erroneously declares two record components with the same name, in that +- * case we need to use the position to disambiguate ++ * case we need to use the position to disambiguate, but if we loaded the record from a class file ++ * all positions will be -1, in that case we have to ignore the position and match only based on the ++ * name + */ +- if (rc.name == var.name && var.pos == rc.pos) { ++ if (rc.name == var.name && (var.pos == rc.pos || rc.pos == -1)) { + toRemove = rc; + } + } +diff --git a/test/langtools/tools/javac/processing/RecordGenerationTest.java b/test/langtools/tools/javac/processing/RecordGenerationTest.java +new file mode 100644 +index 000000000..9ee28d264 +--- /dev/null ++++ b/test/langtools/tools/javac/processing/RecordGenerationTest.java +@@ -0,0 +1,148 @@ ++/* ++ * Copyright (c) 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 ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/** ++ * @test ++ * @bug 8332297 ++ * @summary annotation processor that generates records sometimes fails due to NPE in javac ++ * @library /tools/lib /tools/javac/lib ++ * @modules jdk.compiler/com.sun.tools.javac.api ++ * jdk.compiler/com.sun.tools.javac.main ++ * @build toolbox.ToolBox toolbox.JavacTask toolbox.Task ++ * @build RecordGenerationTest JavacTestingAbstractProcessor ++ * @run main RecordGenerationTest ++ */ ++ ++import java.io.IOException; ++import java.io.OutputStream; ++import java.io.Writer; ++import java.nio.file.Files; ++import java.nio.file.Path; ++import java.nio.file.Paths; ++import java.util.Set; ++ ++import javax.annotation.processing.FilerException; ++import javax.annotation.processing.RoundEnvironment; ++import javax.annotation.processing.SupportedOptions; ++import javax.annotation.processing.SupportedAnnotationTypes; ++ ++import javax.lang.model.element.TypeElement; ++import javax.tools.StandardLocation; ++ ++import toolbox.JavacTask; ++import toolbox.Task; ++import toolbox.ToolBox; ++ ++public class RecordGenerationTest { ++ public static void main(String... args) throws Exception { ++ new RecordGenerationTest().run(); ++ } ++ ++ Path[] findJavaFiles(Path... paths) throws Exception { ++ return tb.findJavaFiles(paths); ++ } ++ ++ ToolBox tb = new ToolBox(); ++ ++ void run() throws Exception { ++ Path allInOne = Paths.get("allInOne"); ++ if (Files.isDirectory(allInOne)) { ++ tb.cleanDirectory(allInOne); ++ } ++ Files.deleteIfExists(allInOne); ++ tb.createDirectories(allInOne); ++ ++ tb.writeJavaFiles(allInOne, ++ """ ++ import java.io.IOException; ++ import java.io.OutputStream; ++ import java.io.Writer; ++ import java.nio.file.Files; ++ import java.nio.file.Path; ++ import java.nio.file.Paths; ++ import java.util.Set; ++ ++ import javax.annotation.processing.AbstractProcessor; ++ import javax.annotation.processing.FilerException; ++ import javax.annotation.processing.RoundEnvironment; ++ import javax.annotation.processing.SupportedOptions; ++ import javax.annotation.processing.SupportedAnnotationTypes; ++ ++ import javax.lang.model.element.TypeElement; ++ import javax.tools.StandardLocation; ++ ++ @SupportedAnnotationTypes("*") ++ public class AP extends AbstractProcessor { ++ @Override ++ public boolean process(Set annotations, RoundEnvironment roundEnv) { ++ if (roundEnv.processingOver()) { ++ try (Writer w = processingEnv.getFiler().createSourceFile("ConfRecord").openWriter()) { ++ w.append("@RecordBuilder public record ConfRecord(int maxConcurrency) implements Conf {}"); ++ } catch (IOException ex) { ++ throw new IllegalStateException(ex); ++ } ++ } ++ return true; ++ } ++ } ++ """ ++ ); ++ ++ new JavacTask(tb).options("-d", allInOne.toString()) ++ .files(findJavaFiles(allInOne)) ++ .run() ++ .writeAll(); ++ ++ tb.writeJavaFiles(allInOne, ++ """ ++ interface Conf { ++ int maxConcurrency( ); ++ } ++ """, ++ """ ++ import java.lang.annotation.*; ++ public @interface RecordBuilder { ++ } ++ """ ++ ); ++ ++ Path confSource = Paths.get(allInOne.toString(), "Conf.java"); ++ new JavacTask(tb).options("-processor", "AP", ++ "-cp", allInOne.toString(), ++ "-d", allInOne.toString()) ++ .files(confSource) ++ .run() ++ .writeAll(); ++ ++ /* the bug reported at JDK-8332297 was reproducible only every other time this is why we reproduce ++ * the same compilation command as above basically the second time the compiler is completing the ++ * record symbol from the class file produced during the first compilation ++ */ ++ new JavacTask(tb).options("-processor", "AP", ++ "-cp", allInOne.toString(), ++ "-d", allInOne.toString()) ++ .files(confSource) ++ .run() ++ .writeAll(); ++ } ++} +-- +2.33.0 + diff --git a/Backport-JDK-8333599-Improve-description-of-b-matche.patch b/Backport-JDK-8333599-Improve-description-of-b-matche.patch new file mode 100644 index 0000000000000000000000000000000000000000..23ea2136c74175398bf842ead6cd46fe298c9055 --- /dev/null +++ b/Backport-JDK-8333599-Improve-description-of-b-matche.patch @@ -0,0 +1,41 @@ +Subject: Backport JDK-8333599 Improve description of \b matcher in j.u.r.Pattern + +--- + src/java.base/share/classes/java/util/regex/Pattern.java | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/src/java.base/share/classes/java/util/regex/Pattern.java b/src/java.base/share/classes/java/util/regex/Pattern.java +index 45c48ddab..84e5a140d 100644 +--- a/src/java.base/share/classes/java/util/regex/Pattern.java ++++ b/src/java.base/share/classes/java/util/regex/Pattern.java +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1999, 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 +@@ -160,7 +160,7 @@ import jdk.internal.util.regex.Grapheme; + * Any character (may or may not match line terminators) + * {@code \d} + * A digit: {@code [0-9]} if +- * * UNICODE_CHARACTER_CLASS is not set. See Unicode Support. ++ * UNICODE_CHARACTER_CLASS is not set. See Unicode Support. + * {@code \D} + * A non-digit: {@code [^0-9]} + * {@code \h} +@@ -251,8 +251,9 @@ import jdk.internal.util.regex.Grapheme; + * {@code $} + * The end of a line + * {@code \b} +- * A word boundary: {@code (?:(?<=\w)(?=\W)|(?<=\W)(?=\w))} (the location +- * where a non-word character abuts a word character) ++ * A word boundary: ++ * at the beginning or at the end of a line if a word character ({@code \w}) appears there; ++ * or between a word ({@code \w}) and a non-word character ({@code \W}), in either order. + * {@code \b{g}} + * A Unicode extended grapheme cluster boundary + * {@code \B} +-- +2.33.0 + diff --git a/Backport-JDK-8333805-Replaying-compilation-with-null.patch b/Backport-JDK-8333805-Replaying-compilation-with-null.patch new file mode 100644 index 0000000000000000000000000000000000000000..df99142cf9cf3ecb9b5c42b110ce7bd832626b8e --- /dev/null +++ b/Backport-JDK-8333805-Replaying-compilation-with-null.patch @@ -0,0 +1,242 @@ +Subject: Backport JDK-8333805 Replaying compilation with null static final fields results in a crash + +--- + src/hotspot/share/ci/ciInstanceKlass.cpp | 10 ++- + src/hotspot/share/ci/ciReplay.cpp | 89 ++++++++++--------- + .../ciReplay/TestNullStaticField.java | 82 +++++++++++++++++ + 3 files changed, 136 insertions(+), 45 deletions(-) + create mode 100644 test/hotspot/jtreg/compiler/ciReplay/TestNullStaticField.java + +diff --git a/src/hotspot/share/ci/ciInstanceKlass.cpp b/src/hotspot/share/ci/ciInstanceKlass.cpp +index fa084e228..240bb25ae 100644 +--- a/src/hotspot/share/ci/ciInstanceKlass.cpp ++++ b/src/hotspot/share/ci/ciInstanceKlass.cpp +@@ -661,7 +661,8 @@ class StaticFinalFieldPrinter : public FieldClosure { + ResourceMark rm; + oop mirror = fd->field_holder()->java_mirror(); + _out->print("staticfield %s %s %s ", _holder, fd->name()->as_quoted_ascii(), fd->signature()->as_quoted_ascii()); +- switch (fd->field_type()) { ++ BasicType field_type = fd->field_type(); ++ switch (field_type) { + case T_BYTE: _out->print_cr("%d", mirror->byte_field(fd->offset())); break; + case T_BOOLEAN: _out->print_cr("%d", mirror->bool_field(fd->offset())); break; + case T_SHORT: _out->print_cr("%d", mirror->short_field(fd->offset())); break; +@@ -682,9 +683,12 @@ class StaticFinalFieldPrinter : public FieldClosure { + case T_OBJECT: { + oop value = mirror->obj_field_acquire(fd->offset()); + if (value == nullptr) { +- _out->print_cr("null"); ++ if (field_type == T_ARRAY) { ++ _out->print("%d", -1); ++ } ++ _out->cr(); + } else if (value->is_instance()) { +- assert(fd->field_type() == T_OBJECT, ""); ++ assert(field_type == T_OBJECT, ""); + if (value->is_a(vmClasses::String_klass())) { + const char* ascii_value = java_lang_String::as_quoted_ascii(value); + _out->print_cr("\"%s\"", (ascii_value != nullptr) ? ascii_value : ""); +diff --git a/src/hotspot/share/ci/ciReplay.cpp b/src/hotspot/share/ci/ciReplay.cpp +index 68d4308a2..3171a5d51 100644 +--- a/src/hotspot/share/ci/ciReplay.cpp ++++ b/src/hotspot/share/ci/ciReplay.cpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, 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 +@@ -1065,46 +1065,48 @@ class CompileReplay : public StackObj { + int length = parse_int("array length"); + oop value = nullptr; + +- if (field_signature[1] == JVM_SIGNATURE_ARRAY) { +- // multi dimensional array +- ArrayKlass* kelem = (ArrayKlass *)parse_klass(CHECK); +- if (kelem == nullptr) { +- return; +- } +- int rank = 0; +- while (field_signature[rank] == JVM_SIGNATURE_ARRAY) { +- rank++; +- } +- jint* dims = NEW_RESOURCE_ARRAY(jint, rank); +- dims[0] = length; +- for (int i = 1; i < rank; i++) { +- dims[i] = 1; // These aren't relevant to the compiler +- } +- value = kelem->multi_allocate(rank, dims, CHECK); +- } else { +- if (strcmp(field_signature, "[B") == 0) { +- value = oopFactory::new_byteArray(length, CHECK); +- } else if (strcmp(field_signature, "[Z") == 0) { +- value = oopFactory::new_boolArray(length, CHECK); +- } else if (strcmp(field_signature, "[C") == 0) { +- value = oopFactory::new_charArray(length, CHECK); +- } else if (strcmp(field_signature, "[S") == 0) { +- value = oopFactory::new_shortArray(length, CHECK); +- } else if (strcmp(field_signature, "[F") == 0) { +- value = oopFactory::new_floatArray(length, CHECK); +- } else if (strcmp(field_signature, "[D") == 0) { +- value = oopFactory::new_doubleArray(length, CHECK); +- } else if (strcmp(field_signature, "[I") == 0) { +- value = oopFactory::new_intArray(length, CHECK); +- } else if (strcmp(field_signature, "[J") == 0) { +- value = oopFactory::new_longArray(length, CHECK); +- } else if (field_signature[0] == JVM_SIGNATURE_ARRAY && +- field_signature[1] == JVM_SIGNATURE_CLASS) { +- parse_klass(CHECK); // eat up the array class name +- Klass* kelem = resolve_klass(field_signature + 1, CHECK); +- value = oopFactory::new_objArray(kelem, length, CHECK); ++ if (length != -1) { ++ if (field_signature[1] == JVM_SIGNATURE_ARRAY) { ++ // multi dimensional array ++ ArrayKlass* kelem = (ArrayKlass *)parse_klass(CHECK); ++ if (kelem == nullptr) { ++ return; ++ } ++ int rank = 0; ++ while (field_signature[rank] == JVM_SIGNATURE_ARRAY) { ++ rank++; ++ } ++ jint* dims = NEW_RESOURCE_ARRAY(jint, rank); ++ dims[0] = length; ++ for (int i = 1; i < rank; i++) { ++ dims[i] = 1; // These aren't relevant to the compiler ++ } ++ value = kelem->multi_allocate(rank, dims, CHECK); + } else { +- report_error("unhandled array staticfield"); ++ if (strcmp(field_signature, "[B") == 0) { ++ value = oopFactory::new_byteArray(length, CHECK); ++ } else if (strcmp(field_signature, "[Z") == 0) { ++ value = oopFactory::new_boolArray(length, CHECK); ++ } else if (strcmp(field_signature, "[C") == 0) { ++ value = oopFactory::new_charArray(length, CHECK); ++ } else if (strcmp(field_signature, "[S") == 0) { ++ value = oopFactory::new_shortArray(length, CHECK); ++ } else if (strcmp(field_signature, "[F") == 0) { ++ value = oopFactory::new_floatArray(length, CHECK); ++ } else if (strcmp(field_signature, "[D") == 0) { ++ value = oopFactory::new_doubleArray(length, CHECK); ++ } else if (strcmp(field_signature, "[I") == 0) { ++ value = oopFactory::new_intArray(length, CHECK); ++ } else if (strcmp(field_signature, "[J") == 0) { ++ value = oopFactory::new_longArray(length, CHECK); ++ } else if (field_signature[0] == JVM_SIGNATURE_ARRAY && ++ field_signature[1] == JVM_SIGNATURE_CLASS) { ++ Klass* actual_array_klass = parse_klass(CHECK); ++ Klass* kelem = ObjArrayKlass::cast(actual_array_klass)->element_klass(); ++ value = oopFactory::new_objArray(kelem, length, CHECK); ++ } else { ++ report_error("unhandled array staticfield"); ++ } + } + } + java_mirror->obj_field_put(fd.offset(), value); +@@ -1142,8 +1144,11 @@ class CompileReplay : public StackObj { + Handle value = java_lang_String::create_from_str(string_value, CHECK); + java_mirror->obj_field_put(fd.offset(), value()); + } else if (field_signature[0] == JVM_SIGNATURE_CLASS) { +- Klass* k = resolve_klass(string_value, CHECK); +- oop value = InstanceKlass::cast(k)->allocate_instance(CHECK); ++ oop value = nullptr; ++ if (string_value != nullptr) { ++ Klass* k = resolve_klass(string_value, CHECK); ++ value = InstanceKlass::cast(k)->allocate_instance(CHECK); ++ } + java_mirror->obj_field_put(fd.offset(), value); + } else { + report_error("unhandled staticfield"); +diff --git a/test/hotspot/jtreg/compiler/ciReplay/TestNullStaticField.java b/test/hotspot/jtreg/compiler/ciReplay/TestNullStaticField.java +new file mode 100644 +index 000000000..47a78ad5e +--- /dev/null ++++ b/test/hotspot/jtreg/compiler/ciReplay/TestNullStaticField.java +@@ -0,0 +1,82 @@ ++/* ++ * Copyright (c) 2024, Red Hat, Inc. 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 ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* ++ * @test ++ * @bug 8333805 ++ * @library / /test/lib ++ * @summary Replaying compilation with null static final fields results in a crash ++ * @requires vm.flightRecorder != true & vm.compMode != "Xint" & vm.compMode != "Xcomp" & vm.debug == true & vm.compiler2.enabled ++ * @modules java.base/jdk.internal.misc ++ * @build jdk.test.whitebox.WhiteBox ++ * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox ++ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI ++ * compiler.ciReplay.TestNullStaticField ++ */ ++ ++package compiler.ciReplay; ++ ++public class TestNullStaticField extends DumpReplayBase { ++ ++ public static void main(String[] args) { ++ new TestNullStaticField().runTest(TIERED_DISABLED_VM_OPTION); ++ } ++ ++ @Override ++ public void testAction() { ++ positiveTest(TIERED_DISABLED_VM_OPTION, "-XX:+ReplayIgnoreInitErrors"); ++ } ++ ++ @Override ++ public String getTestClass() { ++ return TestClassNullStaticField.class.getName(); ++ } ++ ++} ++ ++class TestClassNullStaticField { ++ ++ static final Object[] staticNullArrayField = null; ++ static final Object[][] staticNullMultiArrayField = null; ++ static final Object staticNullObjectField = null; ++ static final String staticNullStringField = null; ++ static final int[] staticNullIntArrayField = null; ++ static final Object[] staticNotNullArrayField = new A[10]; ++ static final Object[][] staticNotNullMultiArrayField = new A[10][10]; ++ static final Object staticNotNullObjectField = new A(); ++ static final String staticNotNullStringField = "Not null"; ++ static final int[] staticNotNullIntArrayField = new int[10]; ++ ++ public static void main(String[] args) { ++ for (int i = 0; i < 20_000; i++) { ++ test(); ++ } ++ } ++ public static void test() { ++ ++ } ++ ++ private static class A { ++ } ++} ++ +-- +2.33.0 + diff --git a/Backport-JDK-8334758-Incorrect-note-in-Javadoc-for-a.patch b/Backport-JDK-8334758-Incorrect-note-in-Javadoc-for-a.patch new file mode 100644 index 0000000000000000000000000000000000000000..4de6a24418ffe75dc1db5d0851669875cb2844e0 --- /dev/null +++ b/Backport-JDK-8334758-Incorrect-note-in-Javadoc-for-a.patch @@ -0,0 +1,97 @@ +Subject: Backport JDK-8334758: Incorrect note in Javadoc for a few RandomGenerator methods + +--- + .../java/util/random/RandomGenerator.java | 51 +++++++++---------- + 1 file changed, 23 insertions(+), 28 deletions(-) + +diff --git a/src/java.base/share/classes/java/util/random/RandomGenerator.java b/src/java.base/share/classes/java/util/random/RandomGenerator.java +index a7c6bcec3..5c0d07fb1 100644 +--- a/src/java.base/share/classes/java/util/random/RandomGenerator.java ++++ b/src/java.base/share/classes/java/util/random/RandomGenerator.java +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2021, 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 +@@ -640,12 +640,11 @@ public interface RandomGenerator { + * + * @throws IllegalArgumentException if {@code bound} is not positive + * +- * @implSpec The default implementation checks that {@code bound} is a +- * positive {@code int}. Then invokes {@code nextInt()}, limiting the result +- * to be greater than or equal zero and less than {@code bound}. If {@code bound} +- * is a power of two then limiting is a simple masking operation. Otherwise, +- * the result is re-calculated by invoking {@code nextInt()} until the +- * result is greater than or equal zero and less than {@code bound}. ++ * @implSpec The default implementation checks that {@code bound} is positive. ++ * It then invokes {@link #nextInt()} one or more times to ensure a uniform ++ * distribution in the range 0 (inclusive) ++ * to {@code bound} (exclusive). ++ * It assumes the distribution of {@link #nextInt()} to be uniform. + */ + default int nextInt(int bound) { + RandomSupport.checkBound(bound); +@@ -666,13 +665,12 @@ public interface RandomGenerator { + * @throws IllegalArgumentException if {@code origin} is greater than + * or equal to {@code bound} + * +- * @implSpec The default implementation checks that {@code origin} and +- * {@code bound} are positive {@code ints}. Then invokes {@code nextInt()}, +- * limiting the result to be greater that or equal {@code origin} and less +- * than {@code bound}. If {@code bound} is a power of two then limiting is a +- * simple masking operation. Otherwise, the result is re-calculated by +- * invoking {@code nextInt()} until the result is greater than or equal +- * {@code origin} and less than {@code bound}. ++ * @implSpec The default implementation checks that {@code origin} ++ * is less than {@code bound}. ++ * It then invokes {@link #nextInt()} one or more times to ensure a uniform ++ * distribution in the range {@code origin} (inclusive) ++ * to {@code bound} (exclusive). ++ * It assumes the distribution of {@link #nextInt()} to be uniform. + */ + default int nextInt(int origin, int bound) { + RandomSupport.checkRange(origin, bound); +@@ -699,13 +697,11 @@ public interface RandomGenerator { + * + * @throws IllegalArgumentException if {@code bound} is not positive + * +- * @implSpec The default implementation checks that {@code bound} is a +- * positive {@code long}. Then invokes {@code nextLong()}, limiting the +- * result to be greater than or equal zero and less than {@code bound}. If +- * {@code bound} is a power of two then limiting is a simple masking +- * operation. Otherwise, the result is re-calculated by invoking +- * {@code nextLong()} until the result is greater than or equal zero and +- * less than {@code bound}. ++ * @implSpec The default implementation checks that {@code bound} is positive. ++ * It then invokes {@link #nextLong()} one or more times to ensure a uniform ++ * distribution in the range 0 (inclusive) ++ * to {@code bound} (exclusive). ++ * It assumes the distribution of {@link #nextLong()} to be uniform. + */ + default long nextLong(long bound) { + RandomSupport.checkBound(bound); +@@ -726,13 +722,12 @@ public interface RandomGenerator { + * @throws IllegalArgumentException if {@code origin} is greater than + * or equal to {@code bound} + * +- * @implSpec The default implementation checks that {@code origin} and +- * {@code bound} are positive {@code longs}. Then invokes {@code nextLong()}, +- * limiting the result to be greater than or equal {@code origin} and less +- * than {@code bound}. If {@code bound} is a power of two then limiting is a +- * simple masking operation. Otherwise, the result is re-calculated by +- * invoking {@code nextLong()} until the result is greater than or equal +- * {@code origin} and less than {@code bound}. ++ * @implSpec The default implementation checks that {@code origin} ++ * is less than {@code bound}. ++ * It then invokes {@link #nextLong()} one or more times to ensure a uniform ++ * distribution in the range {@code origin} (inclusive) ++ * to {@code bound} (exclusive). ++ * It assumes the distribution of {@link #nextLong()} to be uniform. + */ + default long nextLong(long origin, long bound) { + RandomSupport.checkRange(origin, bound); +-- +2.33.0 + diff --git a/Backport-JDK-8335638-Calling-VarHandle.-access-mode-.patch b/Backport-JDK-8335638-Calling-VarHandle.-access-mode-.patch new file mode 100644 index 0000000000000000000000000000000000000000..15c74dfa842086763080c4d9f3e0e9425b9d7012 --- /dev/null +++ b/Backport-JDK-8335638-Calling-VarHandle.-access-mode-.patch @@ -0,0 +1,162 @@ +Subject: Backport JDK-8335638 Calling VarHandle.{access-mode} methods reflectively throws wrong exception + +--- + src/hotspot/share/prims/methodHandles.cpp | 59 ++++++++++++++++++- + .../VarHandles/VarHandleTestReflection.java | 25 +++++++- + 2 files changed, 78 insertions(+), 6 deletions(-) + +diff --git a/src/hotspot/share/prims/methodHandles.cpp b/src/hotspot/share/prims/methodHandles.cpp +index f6412504a..55a6b3286 100644 +--- a/src/hotspot/share/prims/methodHandles.cpp ++++ b/src/hotspot/share/prims/methodHandles.cpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2008, 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 +@@ -1362,6 +1362,18 @@ JVM_ENTRY(jobject, MH_invokeExact_UOE(JNIEnv* env, jobject mh, jobjectArray args + } + JVM_END + ++/** ++ * Throws a java/lang/UnsupportedOperationException unconditionally. ++ * This is required by the specification of VarHandle.{access-mode} if ++ * invoked directly. ++ */ ++JVM_ENTRY(jobject, VH_UOE(JNIEnv* env, jobject vh, jobjectArray args)) { ++ THROW_MSG_NULL(vmSymbols::java_lang_UnsupportedOperationException(), "VarHandle access mode methods cannot be invoked reflectively"); ++ return nullptr; ++} ++JVM_END ++ ++ + /// JVM_RegisterMethodHandleMethods + + #define LANG "Ljava/lang/" +@@ -1401,6 +1413,40 @@ static JNINativeMethod MH_methods[] = { + {CC "invoke", CC "([" OBJ ")" OBJ, FN_PTR(MH_invoke_UOE)}, + {CC "invokeExact", CC "([" OBJ ")" OBJ, FN_PTR(MH_invokeExact_UOE)} + }; ++static JNINativeMethod VH_methods[] = { ++ // UnsupportedOperationException throwers ++ {CC "get", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "set", CC "([" OBJ ")V", FN_PTR(VH_UOE)}, ++ {CC "getVolatile", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "setVolatile", CC "([" OBJ ")V", FN_PTR(VH_UOE)}, ++ {CC "getAcquire", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "setRelease", CC "([" OBJ ")V", FN_PTR(VH_UOE)}, ++ {CC "getOpaque", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "setOpaque", CC "([" OBJ ")V", FN_PTR(VH_UOE)}, ++ {CC "compareAndSet", CC "([" OBJ ")Z", FN_PTR(VH_UOE)}, ++ {CC "compareAndExchange", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "compareAndExchangeAcquire", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "compareAndExchangeRelease", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "weakCompareAndSetPlain", CC "([" OBJ ")Z", FN_PTR(VH_UOE)}, ++ {CC "weakCompareAndSet", CC "([" OBJ ")Z", FN_PTR(VH_UOE)}, ++ {CC "weakCompareAndSetAcquire", CC "([" OBJ ")Z", FN_PTR(VH_UOE)}, ++ {CC "weakCompareAndSetRelease", CC "([" OBJ ")Z", FN_PTR(VH_UOE)}, ++ {CC "getAndSet", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "getAndSetAcquire", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "getAndSetRelease", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "getAndAdd", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "getAndAddAcquire", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "getAndAddRelease", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "getAndBitwiseOr", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "getAndBitwiseOrAcquire", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "getAndBitwiseOrRelease", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "getAndBitwiseAnd", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "getAndBitwiseAndAcquire", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "getAndBitwiseAndRelease", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "getAndBitwiseXor", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "getAndBitwiseXorAcquire", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)}, ++ {CC "getAndBitwiseXorRelease", CC "([" OBJ ")" OBJ, FN_PTR(VH_UOE)} ++}; + + /** + * This one function is exported, used by NativeLookup. +@@ -1408,9 +1454,12 @@ static JNINativeMethod MH_methods[] = { + JVM_ENTRY(void, JVM_RegisterMethodHandleMethods(JNIEnv *env, jclass MHN_class)) { + assert(!MethodHandles::enabled(), "must not be enabled"); + assert(vmClasses::MethodHandle_klass() != nullptr, "should be present"); ++ assert(vmClasses::VarHandle_klass() != nullptr, "should be present"); + +- oop mirror = vmClasses::MethodHandle_klass()->java_mirror(); +- jclass MH_class = (jclass) JNIHandles::make_local(THREAD, mirror); ++ oop mh_mirror = vmClasses::MethodHandle_klass()->java_mirror(); ++ oop vh_mirror = vmClasses::VarHandle_klass()->java_mirror(); ++ jclass MH_class = (jclass) JNIHandles::make_local(THREAD, mh_mirror); ++ jclass VH_class = (jclass) JNIHandles::make_local(THREAD, vh_mirror); + + { + ThreadToNativeFromVM ttnfv(thread); +@@ -1422,6 +1471,10 @@ JVM_ENTRY(void, JVM_RegisterMethodHandleMethods(JNIEnv *env, jclass MHN_class)) + status = env->RegisterNatives(MH_class, MH_methods, sizeof(MH_methods)/sizeof(JNINativeMethod)); + guarantee(status == JNI_OK && !env->ExceptionOccurred(), + "register java.lang.invoke.MethodHandle natives"); ++ ++ status = env->RegisterNatives(VH_class, VH_methods, sizeof(VH_methods)/sizeof(JNINativeMethod)); ++ guarantee(status == JNI_OK && !env->ExceptionOccurred(), ++ "register java.lang.invoke.VarHandle natives"); + } + + log_debug(methodhandles, indy)("MethodHandle support loaded (using LambdaForms)"); +diff --git a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestReflection.java b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestReflection.java +index 652272ca8..b20e18d26 100644 +--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestReflection.java ++++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestReflection.java +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2014, 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 +@@ -33,6 +33,7 @@ import java.lang.invoke.MethodHandle; + import java.lang.invoke.MethodHandleInfo; + import java.lang.invoke.MethodHandles; + import java.lang.invoke.VarHandle; ++import java.lang.reflect.InvocationTargetException; + import java.lang.reflect.Method; + import java.util.stream.Stream; + +@@ -52,15 +53,33 @@ public class VarHandleTestReflection extends VarHandleBaseTest { + } + + @Test(dataProvider = "accessModesProvider", expectedExceptions = IllegalArgumentException.class) +- public void methodInvocation(VarHandle.AccessMode accessMode) throws Exception { ++ public void methodInvocationArgumentMismatch(VarHandle.AccessMode accessMode) throws Exception { + VarHandle v = handle(); + +- // Try a reflective invoke using a Method ++ // Try a reflective invoke using a Method, with no arguments + + Method vhm = VarHandle.class.getMethod(accessMode.methodName(), Object[].class); + vhm.invoke(v, new Object[]{}); + } + ++ @Test(dataProvider = "accessModesProvider") ++ public void methodInvocationMatchingArguments(VarHandle.AccessMode accessMode) throws Exception { ++ VarHandle v = handle(); ++ ++ // Try a reflective invoke using a Method, with the minimal required arguments ++ ++ Method vhm = VarHandle.class.getMethod(accessMode.methodName(), Object[].class); ++ Object arg = new Object[0]; ++ try { ++ vhm.invoke(v, arg); ++ } catch (InvocationTargetException e) { ++ if (!(e.getCause() instanceof UnsupportedOperationException)) { ++ throw new RuntimeException("expected UnsupportedOperationException but got: " ++ + e.getCause().getClass().getName(), e); ++ } ++ } ++ } ++ + @Test(dataProvider = "accessModesProvider", expectedExceptions = UnsupportedOperationException.class) + public void methodHandleInvoke(VarHandle.AccessMode accessMode) throws Throwable { + VarHandle v = handle(); +-- +2.33.0 + diff --git a/Backport-JDK-8336012-Fix-usages-of-jtreg-reserved-pr.patch b/Backport-JDK-8336012-Fix-usages-of-jtreg-reserved-pr.patch new file mode 100644 index 0000000000000000000000000000000000000000..33b3f5e4aaf4f8d255cab2d54e5c0e8e5d132e0b --- /dev/null +++ b/Backport-JDK-8336012-Fix-usages-of-jtreg-reserved-pr.patch @@ -0,0 +1,29 @@ +Subject: Backport JDK-8336012 Fix usages of jtreg-reserved properties + +--- + test/jdk/java/lang/invoke/PrivateInvokeTest.java | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/test/jdk/java/lang/invoke/PrivateInvokeTest.java b/test/jdk/java/lang/invoke/PrivateInvokeTest.java +index 12edf8e32..8ae78d967 100644 +--- a/test/jdk/java/lang/invoke/PrivateInvokeTest.java ++++ b/test/jdk/java/lang/invoke/PrivateInvokeTest.java +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2009, 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 +@@ -67,8 +67,6 @@ public class PrivateInvokeTest { + String vstr = System.getProperty(THIS_CLASS.getSimpleName()+".verbose"); + if (vstr == null) + vstr = System.getProperty(THIS_CLASS.getName()+".verbose"); +- if (vstr == null) +- vstr = System.getProperty("test.verbose"); + if (vstr != null) verbose = Integer.parseInt(vstr); + } + private static int referenceKind(Method m) { +-- +2.33.0 + diff --git a/Backport-JDK-8336080-Fix--Wzero-as-null-pointer-cons.patch b/Backport-JDK-8336080-Fix--Wzero-as-null-pointer-cons.patch new file mode 100644 index 0000000000000000000000000000000000000000..7cae0ad17fc2c4abcfe136d5548289e6637b4e97 --- /dev/null +++ b/Backport-JDK-8336080-Fix--Wzero-as-null-pointer-cons.patch @@ -0,0 +1,33 @@ +Subject: Backport of JDK-8336080 Fix -Wzero-as-null-pointer-constant warnings in ClassLoaderStats ctor + +--- + src/hotspot/share/classfile/classLoaderStats.hpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/hotspot/share/classfile/classLoaderStats.hpp b/src/hotspot/share/classfile/classLoaderStats.hpp +index 8296c6ee2..4818ddff6 100644 +--- a/src/hotspot/share/classfile/classLoaderStats.hpp ++++ b/src/hotspot/share/classfile/classLoaderStats.hpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2014, 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 +@@ -82,9 +82,9 @@ public: + uintx _hidden_classes_count; + + ClassLoaderStats() : +- _cld(0), +- _class_loader(0), +- _parent(0), ++ _cld(nullptr), ++ _class_loader(), ++ _parent(), + _chunk_sz(0), + _block_sz(0), + _classes_count(0), +-- +2.33.0 + diff --git a/Backport-JDK-8336152-Remove-unused-forward-declarati.patch b/Backport-JDK-8336152-Remove-unused-forward-declarati.patch new file mode 100644 index 0000000000000000000000000000000000000000..b0792cca16049d894d8162305ec35344acf27494 --- /dev/null +++ b/Backport-JDK-8336152-Remove-unused-forward-declarati.patch @@ -0,0 +1,29 @@ +Subject: Backport of JDK-8336152 Remove unused forward declaration in classLoadInfo.hpp + +--- + src/hotspot/share/classfile/classLoadInfo.hpp | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/src/hotspot/share/classfile/classLoadInfo.hpp b/src/hotspot/share/classfile/classLoadInfo.hpp +index b1257dc99..ab665c6b3 100644 +--- a/src/hotspot/share/classfile/classLoadInfo.hpp ++++ b/src/hotspot/share/classfile/classLoadInfo.hpp +@@ -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 +@@ -29,8 +29,6 @@ + + class InstanceKlass; + +-template class GrowableArray; +- + class ClassInstanceInfo : public StackObj { + private: + InstanceKlass* _dynamic_nest_host; +-- +2.33.0 + diff --git a/Backport-JDK-8336855-Duplicate-protected-declaration.patch b/Backport-JDK-8336855-Duplicate-protected-declaration.patch new file mode 100644 index 0000000000000000000000000000000000000000..dab65b0a1a659e446e1cc7f76a18aabe3aa59e23 --- /dev/null +++ b/Backport-JDK-8336855-Duplicate-protected-declaration.patch @@ -0,0 +1,40 @@ +Subject: Backport JDK-8336855 Duplicate protected declaration and comment in interp_masm_aarch64.hpp + +--- + src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp b/src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp +index 019eb2355..6dd8ea70d 100644 +--- a/src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp ++++ b/src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp +@@ -35,8 +35,6 @@ + typedef ByteSize (*OffsetFunction)(uint); + + class InterpreterMacroAssembler: public MacroAssembler { +- protected: +- + protected: + // Interpreter specific version of call_VM_base + using MacroAssembler::call_VM_leaf_base; +@@ -110,8 +108,6 @@ class InterpreterMacroAssembler: public MacroAssembler { + + void get_dispatch(); + +- // Helpers for runtime call arguments/results +- + // Helpers for runtime call arguments/results + void get_method(Register reg) { + ldr(reg, Address(rfp, frame::interpreter_frame_method_offset * wordSize)); +@@ -183,7 +179,7 @@ class InterpreterMacroAssembler: public MacroAssembler { + void load_ptr(int n, Register val); + void store_ptr(int n, Register val); + +-// Load float value from 'address'. The value is loaded onto the FPU register v0. ++ // Load float value from 'address'. The value is loaded onto the FPU register v0. + void load_float(Address src); + void load_double(Address src); + +-- +2.33.0 + diff --git a/Backport-JDK-8336879-Always-true-condition-img-null-.patch b/Backport-JDK-8336879-Always-true-condition-img-null-.patch new file mode 100644 index 0000000000000000000000000000000000000000..7063e49b1ef6eee684a522abeb255356534fcf12 --- /dev/null +++ b/Backport-JDK-8336879-Always-true-condition-img-null-.patch @@ -0,0 +1,34 @@ +Subject: Backport JDK-8336879 Always true condition 'img != null' in GTKPainter.paintPopupMenuBackground + +--- + .../classes/com/sun/java/swing/plaf/gtk/GTKPainter.java | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java b/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java +index 1635ff66f..6231e11d6 100644 +--- a/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java ++++ b/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2002, 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 +@@ -610,10 +610,10 @@ class GTKPainter extends SynthPainter { + x + insets.left, y + insets.top, w - insets.left - insets.right, + h - insets.top - insets.bottom); + BufferedImage img = ENGINE.finishPainting(); +- if(!isHW) { ++ if (!isHW && img != null) { + int border = img.getRGB(0, h / 2); +- if (img != null && border == img.getRGB(w / 2, h / 2)) { +- // fix no menu borders in Adwaita theme ++ if (border == img.getRGB(w / 2, h / 2)) { ++ // fix no menu borders + Graphics g2 = img.getGraphics(); + Color c = new Color(border); + g2.setColor(new Color(Math.max((int) (c.getRed() * 0.8), 0), +-- +2.33.0 + diff --git a/Backport-JDK-8337334-Test-tools-javac-7142086-T71420.patch b/Backport-JDK-8337334-Test-tools-javac-7142086-T71420.patch new file mode 100644 index 0000000000000000000000000000000000000000..7e8b3867d9f873a4a43453cede27f3951ba91eab --- /dev/null +++ b/Backport-JDK-8337334-Test-tools-javac-7142086-T71420.patch @@ -0,0 +1,54 @@ +Subject: Backport JDK-8337334 Test tools/javac/7142086/T7142086.java timeout with fastdebug binary + +--- + test/langtools/TEST.ROOT | 3 ++- + test/langtools/tools/javac/7142086/T7142086.java | 12 ++++++++++-- + 2 files changed, 12 insertions(+), 3 deletions(-) + +diff --git a/test/langtools/TEST.ROOT b/test/langtools/TEST.ROOT +index da884dee1..938c7674b 100644 +--- a/test/langtools/TEST.ROOT ++++ b/test/langtools/TEST.ROOT +@@ -42,4 +42,5 @@ requires.extraPropDefns.vmOpts = \ + -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI \ + --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED + requires.properties= \ +- vm.continuations ++ vm.continuations \ ++ vm.debug +diff --git a/test/langtools/tools/javac/7142086/T7142086.java b/test/langtools/tools/javac/7142086/T7142086.java +index bc8260bd4..b6521b7ff 100644 +--- a/test/langtools/tools/javac/7142086/T7142086.java ++++ b/test/langtools/tools/javac/7142086/T7142086.java +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2012, 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 +@@ -23,12 +23,20 @@ + + /* + * @test +- * @bug 7142086 ++ * @bug 7142086 8337334 ++ * @requires vm.debug == false + * @summary performance problem in Check.checkOverrideClashes(...) + * @modules jdk.compiler + * @run main/timeout=10 T7142086 + */ + ++/* ++ * @test ++ * @requires vm.debug == true ++ * @modules jdk.compiler ++ * @run main/timeout=20 T7142086 ++ */ ++ + import com.sun.source.util.JavacTask; + import java.net.URI; + import java.util.List; +-- +2.33.0 + diff --git a/Backport-JDK-8337679-Memset-warning-in-src-hotspot-s.patch b/Backport-JDK-8337679-Memset-warning-in-src-hotspot-s.patch new file mode 100644 index 0000000000000000000000000000000000000000..ad77865350a1caaeff5c0b5db0ad00e4a02cbbb7 --- /dev/null +++ b/Backport-JDK-8337679-Memset-warning-in-src-hotspot-s.patch @@ -0,0 +1,29 @@ +Subject: Backport JDK-8337679 Memset warning in src/hotspot/share/adlc/adlArena.cpp + +--- + src/hotspot/share/adlc/adlArena.cpp | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/src/hotspot/share/adlc/adlArena.cpp b/src/hotspot/share/adlc/adlArena.cpp +index d29a255a9..f0f489d90 100644 +--- a/src/hotspot/share/adlc/adlArena.cpp ++++ b/src/hotspot/share/adlc/adlArena.cpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1998, 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 +@@ -62,8 +62,6 @@ void AdlChunk::chop() { + AdlChunk *k = this; + while( k ) { + AdlChunk *tmp = k->_next; +- // clear out this chunk (to detect allocation bugs) +- memset(k, 0xBE, k->_len); + free(k); // Free chunk (was malloc'd) + k = tmp; + } +-- +2.33.0 + diff --git a/Backport-JDK-8338010-WB_IsFrameDeoptimized-miss-Reso.patch b/Backport-JDK-8338010-WB_IsFrameDeoptimized-miss-Reso.patch new file mode 100644 index 0000000000000000000000000000000000000000..761150fd686eccb1b7b44329ea546542eba25dc9 --- /dev/null +++ b/Backport-JDK-8338010-WB_IsFrameDeoptimized-miss-Reso.patch @@ -0,0 +1,28 @@ +Subject: Backport JDK-8338010 WB_IsFrameDeoptimized miss ResourceMark + +--- + src/hotspot/share/prims/whitebox.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/hotspot/share/prims/whitebox.cpp b/src/hotspot/share/prims/whitebox.cpp +index 4a7e69ca8..f83e84e30 100644 +--- a/src/hotspot/share/prims/whitebox.cpp ++++ b/src/hotspot/share/prims/whitebox.cpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2012, 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 +@@ -771,6 +771,7 @@ WB_END + WB_ENTRY(jboolean, WB_IsFrameDeoptimized(JNIEnv* env, jobject o, jint depth)) + bool result = false; + if (thread->has_last_Java_frame()) { ++ ResourceMark rm(THREAD); + RegisterMap reg_map(thread, + RegisterMap::UpdateMap::include, + RegisterMap::ProcessFrames::include, +-- +2.33.0 + diff --git a/Backport-JDK-8338938-The-result-of-the-combine-metho.patch b/Backport-JDK-8338938-The-result-of-the-combine-metho.patch new file mode 100644 index 0000000000000000000000000000000000000000..a5ff5fc93fcaec38a1c44a19e61e26aff3b17e80 --- /dev/null +++ b/Backport-JDK-8338938-The-result-of-the-combine-metho.patch @@ -0,0 +1,82 @@ +Subject: Backport JDK-8338938 The result of the combine method of SettingsControl is not used + +--- + .../classes/jdk/jfr/internal/Control.java | 4 +-- + .../jfr/api/settings/TestFilterEvents.java | 31 ++++++++++++++++++- + 2 files changed, 32 insertions(+), 3 deletions(-) + +diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/Control.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/Control.java +index 339346bd6..fbc4d4c91 100644 +--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/Control.java ++++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/Control.java +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2016, 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 +@@ -136,7 +136,7 @@ final class Control { + @Override + public String run() { + try { +- delegate.combine(Collections.unmodifiableSet(values)); ++ return delegate.combine(Collections.unmodifiableSet(values)); + } catch (Throwable t) { + // Prevent malicious user to propagate exception callback in the wrong context + Logger.log(LogTag.JFR_SETTING, LogLevel.WARN, "Exception occurred when combining " + values + " for " + getClass()); +diff --git a/test/jdk/jdk/jfr/api/settings/TestFilterEvents.java b/test/jdk/jdk/jfr/api/settings/TestFilterEvents.java +index 42bfc3176..67619fb10 100644 +--- a/test/jdk/jdk/jfr/api/settings/TestFilterEvents.java ++++ b/test/jdk/jdk/jfr/api/settings/TestFilterEvents.java +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2018, 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 +@@ -70,6 +70,7 @@ public class TestFilterEvents { + continuous.enable(HTTPGetEvent.class).with("threadNames", "\"unused-threadname-1\""); + assertEquals(0, makeProfilingRecording("\"unused-threadname-2\"")); + assertEquals(1, makeProfilingRecording("\"" + Thread.currentThread().getName() + "\"")); ++ assertEquals(2, makeCombineControl()); + continuous.close(); + } + +@@ -94,4 +95,32 @@ public class TestFilterEvents { + } + } + ++ private static int makeCombineControl() throws Exception { ++ try (Recording r1 = new Recording()) { ++ r1.enable(HTTPPostEvent.class).with("uriFilter", "https://www.example.com/list"); ++ r1.start(); ++ ++ try (Recording r2 = new Recording()) { ++ r2.enable(HTTPPostEvent.class).with("uriFilter", "https://www.example.com/get"); ++ r2.start(); ++ ++ HTTPPostEvent e1 = new HTTPPostEvent(); ++ e1.uri = "https://www.example.com/list"; ++ e1.commit(); ++ ++ HTTPPostEvent e2 = new HTTPPostEvent(); ++ e2.uri = "https://www.example.com/get"; ++ e2.commit(); ++ ++ HTTPPostEvent e3 = new HTTPPostEvent(); ++ e3.uri = "https://www.example.com/put"; ++ e3.commit(); ++ } ++ ++ r1.stop(); ++ ++ return Events.fromRecording(r1).size(); ++ } ++ } ++ + } +-- +2.33.0 + diff --git a/Backport-JDK-8339460-CDS-error-when-module-is-locate.patch b/Backport-JDK-8339460-CDS-error-when-module-is-locate.patch new file mode 100644 index 0000000000000000000000000000000000000000..66e3b4bcd82ce46059342d6ac2a35f7ab35518c4 --- /dev/null +++ b/Backport-JDK-8339460-CDS-error-when-module-is-locate.patch @@ -0,0 +1,486 @@ +Subject: Backport JDK-8339460 CDS error when module is located in a directory with space in the name + +--- + src/hotspot/share/cds/classListParser.cpp | 6 +- + src/hotspot/share/cds/classListWriter.cpp | 4 +- + src/hotspot/share/cds/filemap.cpp | 4 +- + src/hotspot/share/classfile/classLoader.cpp | 50 +++++- + src/hotspot/share/classfile/classLoader.hpp | 4 +- + .../share/classfile/classLoaderExt.cpp | 12 +- + test/hotspot/jtreg/TEST.groups | 3 +- + .../cds/appcds/complexURI/ComplexURITest.java | 167 ++++++++++++++++++ + .../appcds/complexURI/mypackage/Another.java | 27 +++ + .../cds/appcds/complexURI/mypackage/Main.java | 37 ++++ + 10 files changed, 296 insertions(+), 18 deletions(-) + create mode 100644 test/hotspot/jtreg/runtime/cds/appcds/complexURI/ComplexURITest.java + create mode 100644 test/hotspot/jtreg/runtime/cds/appcds/complexURI/mypackage/Another.java + create mode 100644 test/hotspot/jtreg/runtime/cds/appcds/complexURI/mypackage/Main.java + +diff --git a/src/hotspot/share/cds/classListParser.cpp b/src/hotspot/share/cds/classListParser.cpp +index a1e1a4131..0ba74ca4e 100644 +--- a/src/hotspot/share/cds/classListParser.cpp ++++ b/src/hotspot/share/cds/classListParser.cpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2015, 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 +@@ -472,7 +472,9 @@ InstanceKlass* ClassListParser::load_class_from_source(Symbol* class_name, TRAPS + THROW_NULL(vmSymbols::java_lang_ClassNotFoundException()); + } + +- InstanceKlass* k = UnregisteredClasses::load_class(class_name, _source, CHECK_NULL); ++ ResourceMark rm; ++ char * source_path = os::strdup_check_oom(ClassLoader::uri_to_path(_source)); ++ InstanceKlass* k = UnregisteredClasses::load_class(class_name, source_path, CHECK_NULL); + if (k->local_interfaces()->length() != _interfaces->length()) { + print_specified_interfaces(); + print_actual_interfaces(k); +diff --git a/src/hotspot/share/cds/classListWriter.cpp b/src/hotspot/share/cds/classListWriter.cpp +index 2a65ee51d..53637429a 100644 +--- a/src/hotspot/share/cds/classListWriter.cpp ++++ b/src/hotspot/share/cds/classListWriter.cpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2021, 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 +@@ -171,6 +171,8 @@ void ClassListWriter::write_to_stream(const InstanceKlass* k, outputStream* stre + } + } + ++ // NB: the string following "source: " is not really a proper file name, but rather ++ // a truncated URI referring to a file. It must be decoded after reading. + #ifdef _WINDOWS + // "file:/C:/dir/foo.jar" -> "C:/dir/foo.jar" + stream->print(" source: %s", cfs->source() + 6); +diff --git a/src/hotspot/share/cds/filemap.cpp b/src/hotspot/share/cds/filemap.cpp +index 023c0762a..f56920c64 100644 +--- a/src/hotspot/share/cds/filemap.cpp ++++ b/src/hotspot/share/cds/filemap.cpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 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 +@@ -583,7 +583,7 @@ int FileMapInfo::get_module_shared_path_index(Symbol* location) { + + // skip_uri_protocol was also called during dump time -- see ClassLoaderExt::process_module_table() + ResourceMark rm; +- const char* file = ClassLoader::skip_uri_protocol(location->as_C_string()); ++ const char* file = ClassLoader::uri_to_path(location->as_C_string()); + for (int i = ClassLoaderExt::app_module_paths_start_index(); i < get_number_of_shared_paths(); i++) { + SharedClassPathEntry* ent = shared_path(i); + assert(ent->in_named_module(), "must be"); +diff --git a/src/hotspot/share/classfile/classLoader.cpp b/src/hotspot/share/classfile/classLoader.cpp +index 5e89673a5..74b9d9300 100644 +--- a/src/hotspot/share/classfile/classLoader.cpp ++++ b/src/hotspot/share/classfile/classLoader.cpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 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 +@@ -78,6 +78,9 @@ + #include "utilities/macros.hpp" + #include "utilities/utf8.hpp" + ++#include ++#include ++ + // Entry point in java.dll for path canonicalization + + typedef int (*canonicalize_fn_t)(const char *orig, char *out, int len); +@@ -1223,7 +1226,7 @@ InstanceKlass* ClassLoader::load_class(Symbol* name, bool search_append_only, TR + } + + #if INCLUDE_CDS +-char* ClassLoader::skip_uri_protocol(char* source) { ++static const char* skip_uri_protocol(const char* source) { + if (strncmp(source, "file:", 5) == 0) { + // file: protocol path could start with file:/ or file:/// + // locate the char after all the forward slashes +@@ -1242,6 +1245,47 @@ char* ClassLoader::skip_uri_protocol(char* source) { + return source; + } + ++static char decode_percent_encoded(const char *str, size_t& index) { ++ if (str[index] == '%' ++ && isxdigit(str[index + 1]) ++ && isxdigit(str[index + 2])) { ++ char hex[3]; ++ hex[0] = str[index + 1]; ++ hex[1] = str[index + 2]; ++ hex[2] = '\0'; ++ index += 2; ++ return (char) strtol(hex, NULL, 16); ++ } ++ return str[index]; ++} ++ ++char* ClassLoader::uri_to_path(const char* uri) { ++ const size_t len = strlen(uri) + 1; ++ char* path = NEW_RESOURCE_ARRAY(char, len); ++ ++ uri = skip_uri_protocol(uri); ++ ++ if (strncmp(uri, "//", 2) == 0) { ++ // Skip the empty "authority" part ++ uri += 2; ++ } ++ ++#ifdef _WINDOWS ++ if (uri[0] == '/') { ++ // Absolute path name on Windows does not begin with a slash ++ uri += 1; ++ } ++#endif ++ ++ size_t path_index = 0; ++ for (size_t i = 0; i < strlen(uri); ++i) { ++ char decoded = decode_percent_encoded(uri, i); ++ path[path_index++] = decoded; ++ } ++ path[path_index] = '\0'; ++ return path; ++} ++ + // Record the shared classpath index and loader type for classes loaded + // by the builtin loaders at dump time. + void ClassLoader::record_result(JavaThread* current, InstanceKlass* ik, +@@ -1275,7 +1319,7 @@ void ClassLoader::record_result(JavaThread* current, InstanceKlass* ik, + // Save the path from the file: protocol or the module name from the jrt: protocol + // if no protocol prefix is found, path is the same as stream->source(). This path + // must be valid since the class has been successfully parsed. +- char* path = skip_uri_protocol(src); ++ const char* path = ClassLoader::uri_to_path(src); + assert(path != nullptr, "sanity"); + for (int i = 0; i < FileMapInfo::get_number_of_shared_paths(); i++) { + SharedClassPathEntry* ent = FileMapInfo::shared_path(i); +diff --git a/src/hotspot/share/classfile/classLoader.hpp b/src/hotspot/share/classfile/classLoader.hpp +index 4cb196719..2f464063e 100644 +--- a/src/hotspot/share/classfile/classLoader.hpp ++++ b/src/hotspot/share/classfile/classLoader.hpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 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 +@@ -364,7 +364,7 @@ class ClassLoader: AllStatic { + // entries during shared classpath setup time. + static int num_module_path_entries(); + static void exit_with_path_failure(const char* error, const char* message); +- static char* skip_uri_protocol(char* source); ++ static char* uri_to_path(const char* uri); + static void record_result(JavaThread* current, InstanceKlass* ik, + const ClassFileStream* stream, bool redefined); + #endif +diff --git a/src/hotspot/share/classfile/classLoaderExt.cpp b/src/hotspot/share/classfile/classLoaderExt.cpp +index c9fd8173b..5334b118e 100644 +--- a/src/hotspot/share/classfile/classLoaderExt.cpp ++++ b/src/hotspot/share/classfile/classLoaderExt.cpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2015, 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 +@@ -98,12 +98,10 @@ void ClassLoaderExt::process_module_table(JavaThread* current, ModuleEntryTable* + ModulePathsGatherer(JavaThread* current, GrowableArray* module_paths) : + _current(current), _module_paths(module_paths) {} + void do_module(ModuleEntry* m) { +- char* path = m->location()->as_C_string(); +- if (strncmp(path, "file:", 5) == 0) { +- path = ClassLoader::skip_uri_protocol(path); +- char* path_copy = NEW_RESOURCE_ARRAY(char, strlen(path) + 1); +- strcpy(path_copy, path); +- _module_paths->append(path_copy); ++ char* uri = m->location()->as_C_string(); ++ if (strncmp(uri, "file:", 5) == 0) { ++ char* path = ClassLoader::uri_to_path(uri); ++ _module_paths->append(path); + } + } + }; +diff --git a/test/hotspot/jtreg/TEST.groups b/test/hotspot/jtreg/TEST.groups +index 4923fbd5b..4c7352956 100644 +--- a/test/hotspot/jtreg/TEST.groups ++++ b/test/hotspot/jtreg/TEST.groups +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2013, 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 +@@ -430,6 +430,7 @@ hotspot_cds_only = \ + hotspot_appcds_dynamic = \ + runtime/cds/appcds/ \ + -runtime/cds/appcds/cacheObject \ ++ -runtime/cds/appcds/complexURI \ + -runtime/cds/appcds/customLoader \ + -runtime/cds/appcds/dynamicArchive \ + -runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java \ +diff --git a/test/hotspot/jtreg/runtime/cds/appcds/complexURI/ComplexURITest.java b/test/hotspot/jtreg/runtime/cds/appcds/complexURI/ComplexURITest.java +new file mode 100644 +index 000000000..409e37e10 +--- /dev/null ++++ b/test/hotspot/jtreg/runtime/cds/appcds/complexURI/ComplexURITest.java +@@ -0,0 +1,167 @@ ++/* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2024 JetBrains s.r.o. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* ++ * @test ++ * @summary Verifies that CDS works with jar located in directories ++ * with names that need escaping ++ * @bug 8339460 ++ * @requires vm.cds ++ * @requires vm.cds.custom.loaders ++ * @requires vm.flagless ++ * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds ++ * @compile mypackage/Main.java mypackage/Another.java ++ * @run main/othervm ComplexURITest ++ */ ++ ++import jdk.test.lib.process.OutputAnalyzer; ++import jdk.test.lib.process.ProcessTools; ++import jdk.test.lib.Platform; ++ ++import java.io.File; ++import java.nio.file.Files; ++import java.nio.file.Path; ++ ++public class ComplexURITest { ++ final static String moduleName = "mymodule"; ++ ++ public static void main(String[] args) throws Exception { ++ System.setProperty("test.noclasspath", "true"); ++ String jarFile = JarBuilder.build(moduleName, "mypackage/Main", "mypackage/Another"); ++ ++ Path subDir = Path.of(".", "dir with space"); ++ Files.createDirectory(subDir); ++ Path newJarFilePath = subDir.resolve(moduleName + ".jar"); ++ Files.move(Path.of(jarFile), newJarFilePath); ++ jarFile = newJarFilePath.toString(); ++ ++ final String listFileName = "test-classlist.txt"; ++ final String staticArchiveName = "test-static.jsa"; ++ final String dynamicArchiveName = "test-dynamic.jsa"; ++ ++ // Verify static archive creation and use ++ File fileList = new File(listFileName); ++ delete(fileList.toPath()); ++ File staticArchive = new File(staticArchiveName); ++ delete(staticArchive.toPath()); ++ ++ createClassList(jarFile, listFileName); ++ if (!fileList.exists()) { ++ throw new RuntimeException("No class list created at " + fileList); ++ } ++ ++ createArchive(jarFile, listFileName, staticArchiveName); ++ if (!staticArchive.exists()) { ++ throw new RuntimeException("No shared classes archive created at " + staticArchive); ++ } ++ ++ useArchive(jarFile, staticArchiveName); ++ ++ // Verify dynamic archive creation and use ++ File dynamicArchive = new File(dynamicArchiveName); ++ delete(dynamicArchive.toPath()); ++ ++ createDynamicArchive(jarFile, dynamicArchiveName); ++ if (!dynamicArchive.exists()) { ++ throw new RuntimeException("No dynamic archive created at " + dynamicArchive); ++ } ++ ++ testDynamicArchive(jarFile, dynamicArchiveName); ++ } ++ ++ private static void delete(Path path) throws Exception { ++ if (Files.exists(path)) { ++ if (Platform.isWindows()) { ++ Files.setAttribute(path, "dos:readonly", false); ++ } ++ Files.delete(path); ++ } ++ } ++ ++ private static void createClassList(String jarFile, String list) throws Exception { ++ String[] launchArgs = { ++ "-XX:DumpLoadedClassList=" + list, ++ "--module-path", ++ jarFile, ++ "--module", ++ moduleName + "/mypackage.Main"}; ++ ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(launchArgs); ++ OutputAnalyzer output = TestCommon.executeAndLog(pb, "create-list"); ++ output.shouldHaveExitValue(0); ++ } ++ ++ private static void createArchive(String jarFile, String list, String archive) throws Exception { ++ String[] launchArgs = { ++ "-Xshare:dump", ++ "-XX:SharedClassListFile=" + list, ++ "-XX:SharedArchiveFile=" + archive, ++ "--module-path", ++ jarFile, ++ "--module", ++ moduleName + "/mypackage.Main"}; ++ ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(launchArgs); ++ OutputAnalyzer output = TestCommon.executeAndLog(pb, "dump-archive"); ++ output.shouldHaveExitValue(0); ++ } ++ ++ private static void useArchive(String jarFile, String archive) throws Exception { ++ String[] launchArgs = { ++ "-Xshare:on", ++ "-XX:SharedArchiveFile=" + archive, ++ "--module-path", ++ jarFile, ++ "--module", ++ moduleName + "/mypackage.Main"}; ++ ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(launchArgs); ++ OutputAnalyzer output = TestCommon.executeAndLog(pb, "use-archive"); ++ output.shouldHaveExitValue(0); ++ } ++ ++ private static void createDynamicArchive(String jarFile, String archive) throws Exception { ++ String[] launchArgs = { ++ "-XX:ArchiveClassesAtExit=" + archive, ++ "--module-path", ++ jarFile, ++ "--module", ++ moduleName + "/mypackage.Main"}; ++ ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(launchArgs); ++ OutputAnalyzer output = TestCommon.executeAndLog(pb, "dynamic-archive"); ++ output.shouldHaveExitValue(0); ++ } ++ ++ private static void testDynamicArchive(String jarFile, String archive) throws Exception { ++ String[] launchArgs = { ++ "-XX:SharedArchiveFile=" + archive, ++ "-XX:+PrintSharedArchiveAndExit", ++ "--module-path", ++ jarFile, ++ "--module", ++ moduleName + "/mypackage.Main"}; ++ ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(launchArgs); ++ OutputAnalyzer output = TestCommon.executeAndLog(pb, "dynamic-archive"); ++ output.shouldHaveExitValue(0); ++ output.shouldContain("archive is valid"); ++ output.shouldContain(": mypackage.Main app_loader"); ++ output.shouldContain(": mypackage.Another unregistered_loader"); ++ } ++} +diff --git a/test/hotspot/jtreg/runtime/cds/appcds/complexURI/mypackage/Another.java b/test/hotspot/jtreg/runtime/cds/appcds/complexURI/mypackage/Another.java +new file mode 100644 +index 000000000..106dfd490 +--- /dev/null ++++ b/test/hotspot/jtreg/runtime/cds/appcds/complexURI/mypackage/Another.java +@@ -0,0 +1,27 @@ ++/* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2024 JetBrains s.r.o. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++package mypackage; ++ ++public class Another { ++} +diff --git a/test/hotspot/jtreg/runtime/cds/appcds/complexURI/mypackage/Main.java b/test/hotspot/jtreg/runtime/cds/appcds/complexURI/mypackage/Main.java +new file mode 100644 +index 000000000..fdb79e895 +--- /dev/null ++++ b/test/hotspot/jtreg/runtime/cds/appcds/complexURI/mypackage/Main.java +@@ -0,0 +1,37 @@ ++/* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2024 JetBrains s.r.o. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++package mypackage; ++ ++import java.net.URL; ++import java.net.URLClassLoader; ++ ++public class Main { ++ public static void main(String[] args) throws Exception { ++ URL url1 = Main.class.getProtectionDomain().getCodeSource().getLocation(); ++ System.out.println("Will load Another from " + url1); ++ ClassLoader cl = URLClassLoader.newInstance(new URL[] { url1 }, null); ++ var anotherClass = cl.loadClass("mypackage.Another"); ++ System.out.println("Class " + anotherClass + " loaded successfully"); ++ } ++} +-- +2.33.0 + diff --git a/Backport-JDK-8340186-Shenandoah-Missing-load_referen.patch b/Backport-JDK-8340186-Shenandoah-Missing-load_referen.patch new file mode 100644 index 0000000000000000000000000000000000000000..f6ca198fea54edc5040a5fe9bfae3607ee427be2 --- /dev/null +++ b/Backport-JDK-8340186-Shenandoah-Missing-load_referen.patch @@ -0,0 +1,30 @@ +Subject: Backport JDK-8340186 Shenandoah: Missing load_reference_barrier_phantom_narrow match in is_shenandoah_lrb_call + +--- + .../share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp b/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp +index ac3afa774..da9fd5466 100644 +--- a/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp ++++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2018, 2021, Red Hat, Inc. All rights reserved. ++ * Copyright (c) 2018, 2023, Red Hat, Inc. 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 +@@ -306,7 +306,8 @@ bool ShenandoahBarrierSetC2::is_shenandoah_lrb_call(Node* call) { + (entry_point == CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_strong_narrow)) || + (entry_point == CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_weak)) || + (entry_point == CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_weak_narrow)) || +- (entry_point == CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_phantom)); ++ (entry_point == CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_phantom)) || ++ (entry_point == CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_phantom_narrow)); + } + + bool ShenandoahBarrierSetC2::is_shenandoah_marking_if(PhaseValues* phase, Node* n) { +-- +2.33.0 + diff --git a/Backport-JDK-8340273-Remove-CounterHalfLifeTime.patch b/Backport-JDK-8340273-Remove-CounterHalfLifeTime.patch new file mode 100644 index 0000000000000000000000000000000000000000..e9162b39846e7fe3ad7b5cb31551865b9d913b1a --- /dev/null +++ b/Backport-JDK-8340273-Remove-CounterHalfLifeTime.patch @@ -0,0 +1,23 @@ +Subject: Backport JDK-8340273 Remove CounterHalfLifeTime + +--- + src/hotspot/share/runtime/globals.hpp | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp +index a066d0d37..6f8b3e85e 100644 +--- a/src/hotspot/share/runtime/globals.hpp ++++ b/src/hotspot/share/runtime/globals.hpp +@@ -1221,9 +1221,6 @@ const int ObjectAlignmentInBytes = 8; + product(bool, UseCounterDecay, true, \ + "Adjust recompilation counters") \ + \ +- develop(intx, CounterHalfLifeTime, 30, \ +- "Half-life time of invocation counters (in seconds)") \ +- \ + develop(intx, CounterDecayMinIntervalLength, 500, \ + "The minimum interval (in milliseconds) between invocation of " \ + "CounterDecay") \ +-- +2.33.0 + diff --git a/Backport-JDK-8340623-Remove-outdated-PROCESSOR_ARCHI.patch b/Backport-JDK-8340623-Remove-outdated-PROCESSOR_ARCHI.patch new file mode 100644 index 0000000000000000000000000000000000000000..39e485f618f56119537df41166806a3cf7cd297b --- /dev/null +++ b/Backport-JDK-8340623-Remove-outdated-PROCESSOR_ARCHI.patch @@ -0,0 +1,23 @@ +Subject: Backport JDK-8340623 Remove outdated PROCESSOR_ARCHITECTURE_IA64 from Windows coding + +--- + src/java.base/windows/native/libjava/java_props_md.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/src/java.base/windows/native/libjava/java_props_md.c b/src/java.base/windows/native/libjava/java_props_md.c +index 2ff4c9e88..280747d0d 100644 +--- a/src/java.base/windows/native/libjava/java_props_md.c ++++ b/src/java.base/windows/native/libjava/java_props_md.c +@@ -263,9 +263,6 @@ cpu_isalist(void) + SYSTEM_INFO info; + GetSystemInfo(&info); + switch (info.wProcessorArchitecture) { +-#ifdef PROCESSOR_ARCHITECTURE_IA64 +- case PROCESSOR_ARCHITECTURE_IA64: return "ia64"; +-#endif + #ifdef PROCESSOR_ARCHITECTURE_AMD64 + case PROCESSOR_ARCHITECTURE_AMD64: return "amd64"; + #endif +-- +2.33.0 + diff --git a/Backport-of-8330191-Fix-typo-in-precompiled.hpp.patch b/Backport-of-8330191-Fix-typo-in-precompiled.hpp.patch new file mode 100644 index 0000000000000000000000000000000000000000..d9c97268b8e578ecc5eab9a89eae37b73109c5d8 --- /dev/null +++ b/Backport-of-8330191-Fix-typo-in-precompiled.hpp.patch @@ -0,0 +1,29 @@ +Subject: Backport of 8330191: Fix typo in precompiled.hpp + +--- + src/hotspot/share/precompiled/precompiled.hpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/hotspot/share/precompiled/precompiled.hpp b/src/hotspot/share/precompiled/precompiled.hpp +index c6b866801..e8dec0fc6 100644 +--- a/src/hotspot/share/precompiled/precompiled.hpp ++++ b/src/hotspot/share/precompiled/precompiled.hpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2010, 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 +@@ -29,7 +29,7 @@ + + // These header files are included in at least 130 C++ files, as of + // measurements made in November 2018. This list excludes files named +-// *.include.hpp, since including them decreased build performance. ++// *.incline.hpp, since including them decreased build performance. + + #include "classfile/classLoaderData.hpp" + #include "classfile/javaClasses.hpp" +-- +2.33.0 + diff --git a/Backport-of-8337245-Fix-wrong-comment-of-StringConca.patch b/Backport-of-8337245-Fix-wrong-comment-of-StringConca.patch new file mode 100644 index 0000000000000000000000000000000000000000..4893b74bc6e6df95b700c1ddc2aa22dbd60535ca --- /dev/null +++ b/Backport-of-8337245-Fix-wrong-comment-of-StringConca.patch @@ -0,0 +1,49 @@ +Subject: Backport of 8337245: Fix wrong comment of StringConcatHelper + +--- + .../share/classes/java/lang/StringConcatHelper.java | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/java.base/share/classes/java/lang/StringConcatHelper.java b/src/java.base/share/classes/java/lang/StringConcatHelper.java +index 139181af0..db4b2d690 100644 +--- a/src/java.base/share/classes/java/lang/StringConcatHelper.java ++++ b/src/java.base/share/classes/java/lang/StringConcatHelper.java +@@ -228,7 +228,7 @@ final class StringConcatHelper { + * @param indexCoder final char index in the buffer, along with coder packed + * into higher bits. + * @param buf buffer to append to +- * @param value boolean value to encode ++ * @param value char value to encode + * @param prefix a constant to prepend before value + * @return updated index (coder value retained) + */ +@@ -263,7 +263,7 @@ final class StringConcatHelper { + * @param indexCoder final char index in the buffer, along with coder packed + * into higher bits. + * @param buf buffer to append to +- * @param value boolean value to encode ++ * @param value int value to encode + * @param prefix a constant to prepend before value + * @return updated index (coder value retained) + */ +@@ -298,7 +298,7 @@ final class StringConcatHelper { + * @param indexCoder final char index in the buffer, along with coder packed + * into higher bits. + * @param buf buffer to append to +- * @param value boolean value to encode ++ * @param value long value to encode + * @param prefix a constant to prepend before value + * @return updated index (coder value retained) + */ +@@ -335,7 +335,7 @@ final class StringConcatHelper { + * @param indexCoder final char index in the buffer, along with coder packed + * into higher bits. + * @param buf buffer to append to +- * @param value boolean value to encode ++ * @param value String value to encode + * @param prefix a constant to prepend before value + * @return updated index (coder value retained) + */ +-- +2.33.0 + diff --git a/Backport-of-8337274-Remove-repeated-the.patch b/Backport-of-8337274-Remove-repeated-the.patch new file mode 100644 index 0000000000000000000000000000000000000000..edf753afd38474e6ba815d8ff393e6d0bb66de41 --- /dev/null +++ b/Backport-of-8337274-Remove-repeated-the.patch @@ -0,0 +1,40 @@ +Subject: Backport of 8337274: Remove repeated 'the' + +--- + .../share/classes/javax/swing/text/html/StyleSheet.java | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java b/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java +index fd3c75829..89e8b63d6 100644 +--- a/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java ++++ b/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java +@@ -688,7 +688,7 @@ public class StyleSheet extends StyleContext { + * to return an AttributeSet that provides some sort of + * attribute conversion. + * +- * @param a The set of attributes to be represented in the ++ * @param a The set of attributes to be represented in + * the compact form. + */ + protected SmallAttributeSet createSmallAttributeSet(AttributeSet a) { +@@ -704,7 +704,7 @@ public class StyleSheet extends StyleContext { + * to return a MutableAttributeSet that provides some sort of + * attribute conversion. + * +- * @param a The set of attributes to be represented in the ++ * @param a The set of attributes to be represented in + * the larger form. + */ + protected MutableAttributeSet createLargeAttributeSet(AttributeSet a) { +@@ -2137,7 +2137,7 @@ public class StyleSheet extends StyleContext { + /** + * Returns a string that represents the value + * of the HTML.Attribute.TYPE attribute. +- * If this attributes is not defined, then ++ * If this attributes is not defined, + * then the type defaults to "disc" unless + * the tag is on Ordered list. In the case + * of the latter, the default type is "decimal". +-- +2.33.0 + diff --git a/Backport-of-8337712-Wrong-javadoc-in-java.util.Date-.patch b/Backport-of-8337712-Wrong-javadoc-in-java.util.Date-.patch new file mode 100644 index 0000000000000000000000000000000000000000..4b4202a9b14c1f888de832ac3e74aaaf2cfb7797 --- /dev/null +++ b/Backport-of-8337712-Wrong-javadoc-in-java.util.Date-.patch @@ -0,0 +1,29 @@ +Subject: Backport of 8337712: Wrong javadoc in java.util.Date#toString(): 61 and right parenthesis + +--- + src/java.base/share/classes/java/util/Date.java | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/java.base/share/classes/java/util/Date.java b/src/java.base/share/classes/java/util/Date.java +index 1850564d8..aa16f2a75 100644 +--- a/src/java.base/share/classes/java/util/Date.java ++++ b/src/java.base/share/classes/java/util/Date.java +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1994, 2023, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1994, 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 +@@ -1012,7 +1012,7 @@ public class Date + *
  • {@code mm} is the minute within the hour ({@code 00} through + * {@code 59}), as two decimal digits. + *
  • {@code ss} is the second within the minute ({@code 00} through +- * {@code 61}, as two decimal digits. ++ * {@code 61}), as two decimal digits. + *
  • {@code zzz} is the time zone (and may reflect daylight saving + * time). Standard time zone abbreviations include those + * recognized by the method {@code parse}. If time zone +-- +2.33.0 + diff --git a/Backport-of-8337787-Fix-Wzero-as-null-pointer-consta.patch b/Backport-of-8337787-Fix-Wzero-as-null-pointer-consta.patch new file mode 100644 index 0000000000000000000000000000000000000000..75838354a5ed8e38e85bd84fa82c4e50b3524aca --- /dev/null +++ b/Backport-of-8337787-Fix-Wzero-as-null-pointer-consta.patch @@ -0,0 +1,33 @@ +Subject: Backport of 8337787: Fix -Wzero-as-null-pointer-constant warnings when JVMTI feature is disabled + +--- + src/hotspot/share/prims/jvmtiExport.hpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/hotspot/share/prims/jvmtiExport.hpp b/src/hotspot/share/prims/jvmtiExport.hpp +index 805c8c090..d8e20086b 100644 +--- a/src/hotspot/share/prims/jvmtiExport.hpp ++++ b/src/hotspot/share/prims/jvmtiExport.hpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1998, 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 +@@ -279,10 +279,10 @@ class JvmtiExport : public AllStatic { + } + + // field access management +- static address get_field_access_count_addr() NOT_JVMTI_RETURN_(0); ++ static address get_field_access_count_addr() NOT_JVMTI_RETURN_(nullptr); + + // field modification management +- static address get_field_modification_count_addr() NOT_JVMTI_RETURN_(0); ++ static address get_field_modification_count_addr() NOT_JVMTI_RETURN_(nullptr); + + // ----------------- + +-- +2.33.0 + diff --git a/LoongArch64-support.patch b/LoongArch64-support.patch index 2cae223112565eb05abdf8228a19f1ee005a2c5b..4f8b7a6674d02c23983228ff094a7c56faffbd1b 100644 --- a/LoongArch64-support.patch +++ b/LoongArch64-support.patch @@ -1,5 +1,11 @@ +commit c35d5dd5296952bdcc213ea4e5768085a8d9e35b +Author: panxuefeng +Date: Tue Feb 11 20:20:18 2025 +0800 + + LoongArch Support + diff --git a/make/autoconf/jvm-features.m4 b/make/autoconf/jvm-features.m4 -index 28801984862..c37c5c27429 100644 +index 288019848..c37c5c274 100644 --- a/make/autoconf/jvm-features.m4 +++ b/make/autoconf/jvm-features.m4 @@ -23,6 +23,12 @@ @@ -49,7 +55,7 @@ index 28801984862..c37c5c27429 100644 AC_MSG_RESULT([no, $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU]) AVAILABLE=false diff --git a/make/autoconf/platform.m4 b/make/autoconf/platform.m4 -index df610cc489b..9f773892ff1 100644 +index df610cc48..9f773892f 100644 --- a/make/autoconf/platform.m4 +++ b/make/autoconf/platform.m4 @@ -23,6 +23,12 @@ @@ -97,7 +103,7 @@ index df610cc489b..9f773892ff1 100644 elif test "x$OPENJDK_$1_CPU" = xsparc; then diff --git a/src/hotspot/cpu/loongarch/abstractInterpreter_loongarch.cpp b/src/hotspot/cpu/loongarch/abstractInterpreter_loongarch.cpp new file mode 100644 -index 00000000000..5423a479801 +index 000000000..5423a4798 --- /dev/null +++ b/src/hotspot/cpu/loongarch/abstractInterpreter_loongarch.cpp @@ -0,0 +1,155 @@ @@ -258,7 +264,7 @@ index 00000000000..5423a479801 + diff --git a/src/hotspot/cpu/loongarch/assembler_loongarch.cpp b/src/hotspot/cpu/loongarch/assembler_loongarch.cpp new file mode 100644 -index 00000000000..f9528680cf0 +index 000000000..f9528680c --- /dev/null +++ b/src/hotspot/cpu/loongarch/assembler_loongarch.cpp @@ -0,0 +1,820 @@ @@ -1084,7 +1090,7 @@ index 00000000000..f9528680cf0 +} diff --git a/src/hotspot/cpu/loongarch/assembler_loongarch.hpp b/src/hotspot/cpu/loongarch/assembler_loongarch.hpp new file mode 100644 -index 00000000000..dd936b41b8a +index 000000000..dd936b41b --- /dev/null +++ b/src/hotspot/cpu/loongarch/assembler_loongarch.hpp @@ -0,0 +1,3213 @@ @@ -4303,7 +4309,7 @@ index 00000000000..dd936b41b8a +#endif // CPU_LOONGARCH_ASSEMBLER_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/assembler_loongarch.inline.hpp b/src/hotspot/cpu/loongarch/assembler_loongarch.inline.hpp new file mode 100644 -index 00000000000..9ca0cd45047 +index 000000000..9ca0cd450 --- /dev/null +++ b/src/hotspot/cpu/loongarch/assembler_loongarch.inline.hpp @@ -0,0 +1,33 @@ @@ -4342,7 +4348,7 @@ index 00000000000..9ca0cd45047 +#endif // CPU_LOONGARCH_ASSEMBLER_LOONGARCH_INLINE_HPP diff --git a/src/hotspot/cpu/loongarch/bytes_loongarch.hpp b/src/hotspot/cpu/loongarch/bytes_loongarch.hpp new file mode 100644 -index 00000000000..763404473e1 +index 000000000..763404473 --- /dev/null +++ b/src/hotspot/cpu/loongarch/bytes_loongarch.hpp @@ -0,0 +1,64 @@ @@ -4412,7 +4418,7 @@ index 00000000000..763404473e1 +#endif // CPU_LOONGARCH_BYTES_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/c1_CodeStubs_loongarch_64.cpp b/src/hotspot/cpu/loongarch/c1_CodeStubs_loongarch_64.cpp new file mode 100644 -index 00000000000..e1cda84acc9 +index 000000000..e1cda84ac --- /dev/null +++ b/src/hotspot/cpu/loongarch/c1_CodeStubs_loongarch_64.cpp @@ -0,0 +1,338 @@ @@ -4756,7 +4762,7 @@ index 00000000000..e1cda84acc9 +#undef __ diff --git a/src/hotspot/cpu/loongarch/c1_Defs_loongarch.hpp b/src/hotspot/cpu/loongarch/c1_Defs_loongarch.hpp new file mode 100644 -index 00000000000..65850bc2520 +index 000000000..65850bc25 --- /dev/null +++ b/src/hotspot/cpu/loongarch/c1_Defs_loongarch.hpp @@ -0,0 +1,88 @@ @@ -4850,7 +4856,7 @@ index 00000000000..65850bc2520 +#endif // CPU_LOONGARCH_C1_DEFS_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/c1_FpuStackSim_loongarch.hpp b/src/hotspot/cpu/loongarch/c1_FpuStackSim_loongarch.hpp new file mode 100644 -index 00000000000..bd8578c72a8 +index 000000000..bd8578c72 --- /dev/null +++ b/src/hotspot/cpu/loongarch/c1_FpuStackSim_loongarch.hpp @@ -0,0 +1,32 @@ @@ -4888,7 +4894,7 @@ index 00000000000..bd8578c72a8 +#endif // CPU_LOONGARCH_C1_FPUSTACKSIM_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/c1_FpuStackSim_loongarch_64.cpp b/src/hotspot/cpu/loongarch/c1_FpuStackSim_loongarch_64.cpp new file mode 100644 -index 00000000000..1a89c437a83 +index 000000000..1a89c437a --- /dev/null +++ b/src/hotspot/cpu/loongarch/c1_FpuStackSim_loongarch_64.cpp @@ -0,0 +1,31 @@ @@ -4925,7 +4931,7 @@ index 00000000000..1a89c437a83 +#include "precompiled.hpp" diff --git a/src/hotspot/cpu/loongarch/c1_FrameMap_loongarch.hpp b/src/hotspot/cpu/loongarch/c1_FrameMap_loongarch.hpp new file mode 100644 -index 00000000000..4f0cf053617 +index 000000000..4f0cf0536 --- /dev/null +++ b/src/hotspot/cpu/loongarch/c1_FrameMap_loongarch.hpp @@ -0,0 +1,143 @@ @@ -5074,7 +5080,7 @@ index 00000000000..4f0cf053617 +#endif // CPU_LOONGARCH_C1_FRAMEMAP_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/c1_FrameMap_loongarch_64.cpp b/src/hotspot/cpu/loongarch/c1_FrameMap_loongarch_64.cpp new file mode 100644 -index 00000000000..f157536797b +index 000000000..f15753679 --- /dev/null +++ b/src/hotspot/cpu/loongarch/c1_FrameMap_loongarch_64.cpp @@ -0,0 +1,345 @@ @@ -5425,7 +5431,7 @@ index 00000000000..f157536797b +} diff --git a/src/hotspot/cpu/loongarch/c1_LIRAssembler_loongarch.hpp b/src/hotspot/cpu/loongarch/c1_LIRAssembler_loongarch.hpp new file mode 100644 -index 00000000000..2d489e691b9 +index 000000000..2d489e691 --- /dev/null +++ b/src/hotspot/cpu/loongarch/c1_LIRAssembler_loongarch.hpp @@ -0,0 +1,84 @@ @@ -5515,7 +5521,7 @@ index 00000000000..2d489e691b9 +#endif // CPU_LOONGARCH_C1_LIRASSEMBLER_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/c1_LIRAssembler_loongarch_64.cpp b/src/hotspot/cpu/loongarch/c1_LIRAssembler_loongarch_64.cpp new file mode 100644 -index 00000000000..5f3a52ac90b +index 000000000..5f3a52ac9 --- /dev/null +++ b/src/hotspot/cpu/loongarch/c1_LIRAssembler_loongarch_64.cpp @@ -0,0 +1,3383 @@ @@ -8904,7 +8910,7 @@ index 00000000000..5f3a52ac90b +#undef __ diff --git a/src/hotspot/cpu/loongarch/c1_LIRGenerator_loongarch_64.cpp b/src/hotspot/cpu/loongarch/c1_LIRGenerator_loongarch_64.cpp new file mode 100644 -index 00000000000..bf5fba7a100 +index 000000000..bf5fba7a1 --- /dev/null +++ b/src/hotspot/cpu/loongarch/c1_LIRGenerator_loongarch_64.cpp @@ -0,0 +1,1393 @@ @@ -10303,7 +10309,7 @@ index 00000000000..bf5fba7a100 +} diff --git a/src/hotspot/cpu/loongarch/c1_LIR_loongarch_64.cpp b/src/hotspot/cpu/loongarch/c1_LIR_loongarch_64.cpp new file mode 100644 -index 00000000000..45e189e4d51 +index 000000000..45e189e4d --- /dev/null +++ b/src/hotspot/cpu/loongarch/c1_LIR_loongarch_64.cpp @@ -0,0 +1,57 @@ @@ -10366,7 +10372,7 @@ index 00000000000..45e189e4d51 +#endif // PRODUCT diff --git a/src/hotspot/cpu/loongarch/c1_LinearScan_loongarch.hpp b/src/hotspot/cpu/loongarch/c1_LinearScan_loongarch.hpp new file mode 100644 -index 00000000000..f15dacafeba +index 000000000..f15dacafe --- /dev/null +++ b/src/hotspot/cpu/loongarch/c1_LinearScan_loongarch.hpp @@ -0,0 +1,70 @@ @@ -10442,7 +10448,7 @@ index 00000000000..f15dacafeba +#endif // CPU_LOONGARCH_C1_LINEARSCAN_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/c1_LinearScan_loongarch_64.cpp b/src/hotspot/cpu/loongarch/c1_LinearScan_loongarch_64.cpp new file mode 100644 -index 00000000000..219b2e3671c +index 000000000..219b2e367 --- /dev/null +++ b/src/hotspot/cpu/loongarch/c1_LinearScan_loongarch_64.cpp @@ -0,0 +1,33 @@ @@ -10481,7 +10487,7 @@ index 00000000000..219b2e3671c +} diff --git a/src/hotspot/cpu/loongarch/c1_MacroAssembler_loongarch.hpp b/src/hotspot/cpu/loongarch/c1_MacroAssembler_loongarch.hpp new file mode 100644 -index 00000000000..d1c63b13896 +index 000000000..d1c63b138 --- /dev/null +++ b/src/hotspot/cpu/loongarch/c1_MacroAssembler_loongarch.hpp @@ -0,0 +1,111 @@ @@ -10598,7 +10604,7 @@ index 00000000000..d1c63b13896 +#endif // CPU_LOONGARCH_C1_MACROASSEMBLER_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/c1_MacroAssembler_loongarch_64.cpp b/src/hotspot/cpu/loongarch/c1_MacroAssembler_loongarch_64.cpp new file mode 100644 -index 00000000000..eaaaf464fe6 +index 000000000..eaaaf464f --- /dev/null +++ b/src/hotspot/cpu/loongarch/c1_MacroAssembler_loongarch_64.cpp @@ -0,0 +1,350 @@ @@ -10954,7 +10960,7 @@ index 00000000000..eaaaf464fe6 +#endif // ifndef PRODUCT diff --git a/src/hotspot/cpu/loongarch/c1_Runtime1_loongarch_64.cpp b/src/hotspot/cpu/loongarch/c1_Runtime1_loongarch_64.cpp new file mode 100644 -index 00000000000..21f7c6f2d00 +index 000000000..21f7c6f2d --- /dev/null +++ b/src/hotspot/cpu/loongarch/c1_Runtime1_loongarch_64.cpp @@ -0,0 +1,1049 @@ @@ -12009,7 +12015,7 @@ index 00000000000..21f7c6f2d00 +} diff --git a/src/hotspot/cpu/loongarch/c1_globals_loongarch.hpp b/src/hotspot/cpu/loongarch/c1_globals_loongarch.hpp new file mode 100644 -index 00000000000..a97091dda04 +index 000000000..a97091dda --- /dev/null +++ b/src/hotspot/cpu/loongarch/c1_globals_loongarch.hpp @@ -0,0 +1,64 @@ @@ -12079,7 +12085,7 @@ index 00000000000..a97091dda04 +#endif // CPU_LOONGARCH_C1_GLOBALS_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/c2_CodeStubs_loongarch.cpp b/src/hotspot/cpu/loongarch/c2_CodeStubs_loongarch.cpp new file mode 100644 -index 00000000000..4672c7b08a8 +index 000000000..4672c7b08 --- /dev/null +++ b/src/hotspot/cpu/loongarch/c2_CodeStubs_loongarch.cpp @@ -0,0 +1,91 @@ @@ -12176,7 +12182,7 @@ index 00000000000..4672c7b08a8 +#undef __ diff --git a/src/hotspot/cpu/loongarch/c2_MacroAssembler_loongarch.cpp b/src/hotspot/cpu/loongarch/c2_MacroAssembler_loongarch.cpp new file mode 100644 -index 00000000000..d83d08e9549 +index 000000000..d83d08e95 --- /dev/null +++ b/src/hotspot/cpu/loongarch/c2_MacroAssembler_loongarch.cpp @@ -0,0 +1,1903 @@ @@ -14085,7 +14091,7 @@ index 00000000000..d83d08e9549 +} diff --git a/src/hotspot/cpu/loongarch/c2_MacroAssembler_loongarch.hpp b/src/hotspot/cpu/loongarch/c2_MacroAssembler_loongarch.hpp new file mode 100644 -index 00000000000..804e060f195 +index 000000000..804e060f1 --- /dev/null +++ b/src/hotspot/cpu/loongarch/c2_MacroAssembler_loongarch.hpp @@ -0,0 +1,141 @@ @@ -14232,7 +14238,7 @@ index 00000000000..804e060f195 +#endif // CPU_LOONGARCH_C2_MACROASSEMBLER_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/c2_globals_loongarch.hpp b/src/hotspot/cpu/loongarch/c2_globals_loongarch.hpp new file mode 100644 -index 00000000000..a1054036f2d +index 000000000..a1054036f --- /dev/null +++ b/src/hotspot/cpu/loongarch/c2_globals_loongarch.hpp @@ -0,0 +1,85 @@ @@ -14323,7 +14329,7 @@ index 00000000000..a1054036f2d +#endif // CPU_LOONGARCH_C2_GLOBALS_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/c2_init_loongarch.cpp b/src/hotspot/cpu/loongarch/c2_init_loongarch.cpp new file mode 100644 -index 00000000000..ec78b942d40 +index 000000000..ec78b942d --- /dev/null +++ b/src/hotspot/cpu/loongarch/c2_init_loongarch.cpp @@ -0,0 +1,37 @@ @@ -14366,7 +14372,7 @@ index 00000000000..ec78b942d40 +} diff --git a/src/hotspot/cpu/loongarch/codeBuffer_loongarch.cpp b/src/hotspot/cpu/loongarch/codeBuffer_loongarch.cpp new file mode 100644 -index 00000000000..3fdfbb27cc0 +index 000000000..3fdfbb27c --- /dev/null +++ b/src/hotspot/cpu/loongarch/codeBuffer_loongarch.cpp @@ -0,0 +1,32 @@ @@ -14404,7 +14410,7 @@ index 00000000000..3fdfbb27cc0 +} diff --git a/src/hotspot/cpu/loongarch/codeBuffer_loongarch.hpp b/src/hotspot/cpu/loongarch/codeBuffer_loongarch.hpp new file mode 100644 -index 00000000000..c8041a57f96 +index 000000000..c8041a57f --- /dev/null +++ b/src/hotspot/cpu/loongarch/codeBuffer_loongarch.hpp @@ -0,0 +1,37 @@ @@ -14447,7 +14453,7 @@ index 00000000000..c8041a57f96 +#endif // CPU_LOONGARCH_CODEBUFFER_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/compiledIC_loongarch.cpp b/src/hotspot/cpu/loongarch/compiledIC_loongarch.cpp new file mode 100644 -index 00000000000..17ee4b75f72 +index 000000000..17ee4b75f --- /dev/null +++ b/src/hotspot/cpu/loongarch/compiledIC_loongarch.cpp @@ -0,0 +1,138 @@ @@ -14591,7 +14597,7 @@ index 00000000000..17ee4b75f72 +#endif // !PRODUCT diff --git a/src/hotspot/cpu/loongarch/continuationEntry_loongarch.hpp b/src/hotspot/cpu/loongarch/continuationEntry_loongarch.hpp new file mode 100644 -index 00000000000..c2d91996000 +index 000000000..c2d919960 --- /dev/null +++ b/src/hotspot/cpu/loongarch/continuationEntry_loongarch.hpp @@ -0,0 +1,33 @@ @@ -14630,7 +14636,7 @@ index 00000000000..c2d91996000 +#endif // CPU_LOONGARCH_CONTINUATIONENTRY_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/continuationEntry_loongarch.inline.hpp b/src/hotspot/cpu/loongarch/continuationEntry_loongarch.inline.hpp new file mode 100644 -index 00000000000..d1c01ee42f0 +index 000000000..d1c01ee42 --- /dev/null +++ b/src/hotspot/cpu/loongarch/continuationEntry_loongarch.inline.hpp @@ -0,0 +1,52 @@ @@ -14688,7 +14694,7 @@ index 00000000000..d1c01ee42f0 +#endif // CPU_LOONGARCH_CONTINUATIONENTRY_LOONGARCH_INLINE_HPP diff --git a/src/hotspot/cpu/loongarch/continuationFreezeThaw_loongarch.inline.hpp b/src/hotspot/cpu/loongarch/continuationFreezeThaw_loongarch.inline.hpp new file mode 100644 -index 00000000000..c4c49842464 +index 000000000..dc61283c1 --- /dev/null +++ b/src/hotspot/cpu/loongarch/continuationFreezeThaw_loongarch.inline.hpp @@ -0,0 +1,284 @@ @@ -14904,7 +14910,7 @@ index 00000000000..c4c49842464 + intptr_t* heap_sp = hf.unextended_sp(); + // If caller is interpreted it already made room for the callee arguments + int overlap = caller.is_interpreted_frame() ? ContinuationHelper::InterpretedFrame::stack_argsize(hf) : 0; -+ const int fsize = ContinuationHelper::InterpretedFrame::frame_bottom(hf) - hf.unextended_sp() - overlap; ++ const int fsize = (int)(ContinuationHelper::InterpretedFrame::frame_bottom(hf) - hf.unextended_sp() - overlap); + const int locals = hf.interpreter_frame_method()->max_locals(); + intptr_t* frame_sp = caller.unextended_sp() - fsize; + intptr_t* fp = frame_sp + (hf.fp() - heap_sp); @@ -14978,7 +14984,7 @@ index 00000000000..c4c49842464 +#endif // CPU_LOONGARCH_CONTINUATIONFREEZETHAW_LOONGARCH_INLINE_HPP diff --git a/src/hotspot/cpu/loongarch/continuationHelper_loongarch.inline.hpp b/src/hotspot/cpu/loongarch/continuationHelper_loongarch.inline.hpp new file mode 100644 -index 00000000000..b36584a968a +index 000000000..b36584a96 --- /dev/null +++ b/src/hotspot/cpu/loongarch/continuationHelper_loongarch.inline.hpp @@ -0,0 +1,145 @@ @@ -15129,7 +15135,7 @@ index 00000000000..b36584a968a +#endif // CPU_LOONGARCH_CONTINUATIONFRAMEHELPERS_LOONGARCH_INLINE_HPP diff --git a/src/hotspot/cpu/loongarch/copy_loongarch.cpp b/src/hotspot/cpu/loongarch/copy_loongarch.cpp new file mode 100644 -index 00000000000..68f3bae9ef3 +index 000000000..68f3bae9e --- /dev/null +++ b/src/hotspot/cpu/loongarch/copy_loongarch.cpp @@ -0,0 +1,147 @@ @@ -15282,7 +15288,7 @@ index 00000000000..68f3bae9ef3 +Copy::FillByte Copy::_fill_to_bytes = c_fill_to_bytes; diff --git a/src/hotspot/cpu/loongarch/copy_loongarch.hpp b/src/hotspot/cpu/loongarch/copy_loongarch.hpp new file mode 100644 -index 00000000000..4ed4766e6e2 +index 000000000..4ed4766e6 --- /dev/null +++ b/src/hotspot/cpu/loongarch/copy_loongarch.hpp @@ -0,0 +1,65 @@ @@ -15353,7 +15359,7 @@ index 00000000000..4ed4766e6e2 +#endif //CPU_LOONGARCH_COPY_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/disassembler_loongarch.hpp b/src/hotspot/cpu/loongarch/disassembler_loongarch.hpp new file mode 100644 -index 00000000000..6fdd1bd1915 +index 000000000..6fdd1bd19 --- /dev/null +++ b/src/hotspot/cpu/loongarch/disassembler_loongarch.hpp @@ -0,0 +1,49 @@ @@ -15408,7 +15414,7 @@ index 00000000000..6fdd1bd1915 +#endif // CPU_LOONGARCH_DISASSEMBLER_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/downcallLinker_loongarch_64.cpp b/src/hotspot/cpu/loongarch/downcallLinker_loongarch_64.cpp new file mode 100644 -index 00000000000..4f936060b6b +index 000000000..4f936060b --- /dev/null +++ b/src/hotspot/cpu/loongarch/downcallLinker_loongarch_64.cpp @@ -0,0 +1,360 @@ @@ -15774,7 +15780,7 @@ index 00000000000..4f936060b6b +} diff --git a/src/hotspot/cpu/loongarch/foreignGlobals_loongarch.cpp b/src/hotspot/cpu/loongarch/foreignGlobals_loongarch.cpp new file mode 100644 -index 00000000000..c0837e64d80 +index 000000000..c0837e64d --- /dev/null +++ b/src/hotspot/cpu/loongarch/foreignGlobals_loongarch.cpp @@ -0,0 +1,195 @@ @@ -15975,7 +15981,7 @@ index 00000000000..c0837e64d80 +} diff --git a/src/hotspot/cpu/loongarch/foreignGlobals_loongarch.hpp b/src/hotspot/cpu/loongarch/foreignGlobals_loongarch.hpp new file mode 100644 -index 00000000000..7e4d0d79e44 +index 000000000..7e4d0d79e --- /dev/null +++ b/src/hotspot/cpu/loongarch/foreignGlobals_loongarch.hpp @@ -0,0 +1,50 @@ @@ -16031,10 +16037,10 @@ index 00000000000..7e4d0d79e44 +#endif // CPU_LOONGARCH_FOREIGN_GLOBALS_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/frame_loongarch.cpp b/src/hotspot/cpu/loongarch/frame_loongarch.cpp new file mode 100644 -index 00000000000..b2c3d9e02f1 +index 000000000..3b4c0884f --- /dev/null +++ b/src/hotspot/cpu/loongarch/frame_loongarch.cpp -@@ -0,0 +1,626 @@ +@@ -0,0 +1,629 @@ +/* + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, Loongson Technology. All rights reserved. @@ -16097,8 +16103,11 @@ index 00000000000..b2c3d9e02f1 + return false; + } + -+ // unextended sp must be within the stack and above or equal sp -+ if (!thread->is_in_stack_range_incl(unextended_sp, sp)) { ++ // unextended sp must be within the stack ++ // Note: sp can be greater than unextended_sp in the case of ++ // interpreted -> interpreted calls that go through a method handle linker, ++ // since those pop the last argument (the appendix) from the stack. ++ if (!thread->is_in_stack_range_incl(unextended_sp, sp - Interpreter::stackElementSize)) { + return false; + } + @@ -16663,7 +16672,7 @@ index 00000000000..b2c3d9e02f1 +} diff --git a/src/hotspot/cpu/loongarch/frame_loongarch.hpp b/src/hotspot/cpu/loongarch/frame_loongarch.hpp new file mode 100644 -index 00000000000..36dd89ff08f +index 000000000..36dd89ff0 --- /dev/null +++ b/src/hotspot/cpu/loongarch/frame_loongarch.hpp @@ -0,0 +1,200 @@ @@ -16869,7 +16878,7 @@ index 00000000000..36dd89ff08f +#endif // CPU_LOONGARCH_FRAME_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/frame_loongarch.inline.hpp b/src/hotspot/cpu/loongarch/frame_loongarch.inline.hpp new file mode 100644 -index 00000000000..a740b3b1df3 +index 000000000..02f7eb198 --- /dev/null +++ b/src/hotspot/cpu/loongarch/frame_loongarch.inline.hpp @@ -0,0 +1,472 @@ @@ -17099,13 +17108,13 @@ index 00000000000..a740b3b1df3 + +inline int frame::frame_size() const { + return is_interpreted_frame() -+ ? sender_sp() - sp() ++ ? pointer_delta_as_int(sender_sp(), sp()) + : cb()->frame_size(); +} + +inline int frame::compiled_frame_stack_argsize() const { + assert(cb()->is_compiled(), ""); -+ return (cb()->as_compiled_method()->method()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord; ++ return (cb()->as_nmethod()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord; +} + +inline void frame::interpreted_frame_oop_map(InterpreterOopMap* mask) const { @@ -17347,7 +17356,7 @@ index 00000000000..a740b3b1df3 +#endif // CPU_LOONGARCH_FRAME_LOONGARCH_INLINE_HPP diff --git a/src/hotspot/cpu/loongarch/gc/g1/g1BarrierSetAssembler_loongarch.cpp b/src/hotspot/cpu/loongarch/gc/g1/g1BarrierSetAssembler_loongarch.cpp new file mode 100644 -index 00000000000..fd125f141f4 +index 000000000..fd125f141 --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/g1/g1BarrierSetAssembler_loongarch.cpp @@ -0,0 +1,491 @@ @@ -17844,7 +17853,7 @@ index 00000000000..fd125f141f4 +#endif // COMPILER1 diff --git a/src/hotspot/cpu/loongarch/gc/g1/g1BarrierSetAssembler_loongarch.hpp b/src/hotspot/cpu/loongarch/gc/g1/g1BarrierSetAssembler_loongarch.hpp new file mode 100644 -index 00000000000..b3725301da2 +index 000000000..b3725301d --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/g1/g1BarrierSetAssembler_loongarch.hpp @@ -0,0 +1,72 @@ @@ -17922,7 +17931,7 @@ index 00000000000..b3725301da2 +#endif // CPU_LOONGARCH_GC_G1_G1BARRIERSETASSEMBLER_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/gc/g1/g1Globals_loongarch.hpp b/src/hotspot/cpu/loongarch/gc/g1/g1Globals_loongarch.hpp new file mode 100644 -index 00000000000..44b7ff1485f +index 000000000..44b7ff148 --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/g1/g1Globals_loongarch.hpp @@ -0,0 +1,30 @@ @@ -17958,7 +17967,7 @@ index 00000000000..44b7ff1485f +#endif // CPU_LOONGARCH_GC_G1_G1GLOBALS_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/gc/shared/barrierSetAssembler_loongarch.cpp b/src/hotspot/cpu/loongarch/gc/shared/barrierSetAssembler_loongarch.cpp new file mode 100644 -index 00000000000..8b45eb5131c +index 000000000..8b45eb513 --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/shared/barrierSetAssembler_loongarch.cpp @@ -0,0 +1,453 @@ @@ -18417,7 +18426,7 @@ index 00000000000..8b45eb5131c +} diff --git a/src/hotspot/cpu/loongarch/gc/shared/barrierSetAssembler_loongarch.hpp b/src/hotspot/cpu/loongarch/gc/shared/barrierSetAssembler_loongarch.hpp new file mode 100644 -index 00000000000..0562518663f +index 000000000..056251866 --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/shared/barrierSetAssembler_loongarch.hpp @@ -0,0 +1,147 @@ @@ -18570,7 +18579,7 @@ index 00000000000..0562518663f +#endif // CPU_LOONGARCH_GC_SHARED_BARRIERSETASSEMBLER_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/gc/shared/barrierSetNMethod_loongarch.cpp b/src/hotspot/cpu/loongarch/gc/shared/barrierSetNMethod_loongarch.cpp new file mode 100644 -index 00000000000..6fd8fac976c +index 000000000..6fd8fac97 --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/shared/barrierSetNMethod_loongarch.cpp @@ -0,0 +1,222 @@ @@ -18798,7 +18807,7 @@ index 00000000000..6fd8fac976c +#endif diff --git a/src/hotspot/cpu/loongarch/gc/shared/cardTableBarrierSetAssembler_loongarch.cpp b/src/hotspot/cpu/loongarch/gc/shared/cardTableBarrierSetAssembler_loongarch.cpp new file mode 100644 -index 00000000000..d04be97df4c +index 000000000..d04be97df --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/shared/cardTableBarrierSetAssembler_loongarch.cpp @@ -0,0 +1,117 @@ @@ -18921,7 +18930,7 @@ index 00000000000..d04be97df4c +} diff --git a/src/hotspot/cpu/loongarch/gc/shared/cardTableBarrierSetAssembler_loongarch.hpp b/src/hotspot/cpu/loongarch/gc/shared/cardTableBarrierSetAssembler_loongarch.hpp new file mode 100644 -index 00000000000..bd91d0623db +index 000000000..bd91d0623 --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/shared/cardTableBarrierSetAssembler_loongarch.hpp @@ -0,0 +1,44 @@ @@ -18971,7 +18980,7 @@ index 00000000000..bd91d0623db +#endif // CPU_LOONGARCH_GC_SHARED_CARDTABLEBARRIERSETASSEMBLER_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/gc/shared/modRefBarrierSetAssembler_loongarch.cpp b/src/hotspot/cpu/loongarch/gc/shared/modRefBarrierSetAssembler_loongarch.cpp new file mode 100644 -index 00000000000..53799c0678a +index 000000000..53799c067 --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/shared/modRefBarrierSetAssembler_loongarch.cpp @@ -0,0 +1,53 @@ @@ -19030,7 +19039,7 @@ index 00000000000..53799c0678a +} diff --git a/src/hotspot/cpu/loongarch/gc/shared/modRefBarrierSetAssembler_loongarch.hpp b/src/hotspot/cpu/loongarch/gc/shared/modRefBarrierSetAssembler_loongarch.hpp new file mode 100644 -index 00000000000..825a8f9d0ea +index 000000000..825a8f9d0 --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/shared/modRefBarrierSetAssembler_loongarch.hpp @@ -0,0 +1,54 @@ @@ -19090,7 +19099,7 @@ index 00000000000..825a8f9d0ea +#endif // CPU_LOONGARCH_GC_SHARED_MODREFBARRIERSETASSEMBLER_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/gc/shenandoah/c1/shenandoahBarrierSetC1_loongarch.cpp b/src/hotspot/cpu/loongarch/gc/shenandoah/c1/shenandoahBarrierSetC1_loongarch.cpp new file mode 100644 -index 00000000000..1fd8cff3904 +index 000000000..1fd8cff39 --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/shenandoah/c1/shenandoahBarrierSetC1_loongarch.cpp @@ -0,0 +1,130 @@ @@ -19226,7 +19235,7 @@ index 00000000000..1fd8cff3904 +} diff --git a/src/hotspot/cpu/loongarch/gc/shenandoah/shenandoahBarrierSetAssembler_loongarch.cpp b/src/hotspot/cpu/loongarch/gc/shenandoah/shenandoahBarrierSetAssembler_loongarch.cpp new file mode 100644 -index 00000000000..d9377db5503 +index 000000000..d9377db55 --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/shenandoah/shenandoahBarrierSetAssembler_loongarch.cpp @@ -0,0 +1,783 @@ @@ -20015,7 +20024,7 @@ index 00000000000..d9377db5503 +#endif // COMPILER1 diff --git a/src/hotspot/cpu/loongarch/gc/shenandoah/shenandoahBarrierSetAssembler_loongarch.hpp b/src/hotspot/cpu/loongarch/gc/shenandoah/shenandoahBarrierSetAssembler_loongarch.hpp new file mode 100644 -index 00000000000..133bbbb0b89 +index 000000000..133bbbb0b --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/shenandoah/shenandoahBarrierSetAssembler_loongarch.hpp @@ -0,0 +1,88 @@ @@ -20109,7 +20118,7 @@ index 00000000000..133bbbb0b89 +#endif // CPU_LOONGARCH_GC_SHENANDOAH_SHENANDOAHBARRIERSETASSEMBLER_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/gc/shenandoah/shenandoah_loongarch_64.ad b/src/hotspot/cpu/loongarch/gc/shenandoah/shenandoah_loongarch_64.ad new file mode 100644 -index 00000000000..2608ef13576 +index 000000000..2608ef135 --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/shenandoah/shenandoah_loongarch_64.ad @@ -0,0 +1,232 @@ @@ -20347,7 +20356,7 @@ index 00000000000..2608ef13576 +%} diff --git a/src/hotspot/cpu/loongarch/gc/x/xBarrierSetAssembler_loongarch.cpp b/src/hotspot/cpu/loongarch/gc/x/xBarrierSetAssembler_loongarch.cpp new file mode 100644 -index 00000000000..0be4ef7c6bc +index 000000000..0be4ef7c6 --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/x/xBarrierSetAssembler_loongarch.cpp @@ -0,0 +1,471 @@ @@ -20824,7 +20833,7 @@ index 00000000000..0be4ef7c6bc +#undef __ diff --git a/src/hotspot/cpu/loongarch/gc/x/xBarrierSetAssembler_loongarch.hpp b/src/hotspot/cpu/loongarch/gc/x/xBarrierSetAssembler_loongarch.hpp new file mode 100644 -index 00000000000..dfe62190ff6 +index 000000000..dfe62190f --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/x/xBarrierSetAssembler_loongarch.hpp @@ -0,0 +1,105 @@ @@ -20935,7 +20944,7 @@ index 00000000000..dfe62190ff6 +#endif // CPU_LOONGARCH_GC_X_XBARRIERSETASSEMBLER_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/gc/x/xGlobals_loongarch.cpp b/src/hotspot/cpu/loongarch/gc/x/xGlobals_loongarch.cpp new file mode 100644 -index 00000000000..2acac4cfd31 +index 000000000..2acac4cfd --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/x/xGlobals_loongarch.cpp @@ -0,0 +1,211 @@ @@ -21152,7 +21161,7 @@ index 00000000000..2acac4cfd31 +} diff --git a/src/hotspot/cpu/loongarch/gc/x/xGlobals_loongarch.hpp b/src/hotspot/cpu/loongarch/gc/x/xGlobals_loongarch.hpp new file mode 100644 -index 00000000000..3134c3d07f8 +index 000000000..3134c3d07 --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/x/xGlobals_loongarch.hpp @@ -0,0 +1,34 @@ @@ -21192,7 +21201,7 @@ index 00000000000..3134c3d07f8 +#endif // CPU_LOONGARCH_GC_X_XGLOBALS_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/gc/x/x_loongarch_64.ad b/src/hotspot/cpu/loongarch/gc/x/x_loongarch_64.ad new file mode 100644 -index 00000000000..c4e77f08b4f +index 000000000..c4e77f08b --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/x/x_loongarch_64.ad @@ -0,0 +1,256 @@ @@ -21454,7 +21463,7 @@ index 00000000000..c4e77f08b4f +%} diff --git a/src/hotspot/cpu/loongarch/gc/z/zAddress_loongarch.cpp b/src/hotspot/cpu/loongarch/gc/z/zAddress_loongarch.cpp new file mode 100644 -index 00000000000..9caa23354c1 +index 000000000..9caa23354 --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/z/zAddress_loongarch.cpp @@ -0,0 +1,109 @@ @@ -21569,7 +21578,7 @@ index 00000000000..9caa23354c1 +} diff --git a/src/hotspot/cpu/loongarch/gc/z/zAddress_loongarch.hpp b/src/hotspot/cpu/loongarch/gc/z/zAddress_loongarch.hpp new file mode 100644 -index 00000000000..8f82152db59 +index 000000000..8f82152db --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/z/zAddress_loongarch.hpp @@ -0,0 +1,35 @@ @@ -21610,7 +21619,7 @@ index 00000000000..8f82152db59 +#endif // CPU_LOONGARCH64_GC_Z_ZADDRESS_LOONGARCH64_HPP diff --git a/src/hotspot/cpu/loongarch/gc/z/zAddress_loongarch.inline.hpp b/src/hotspot/cpu/loongarch/gc/z/zAddress_loongarch.inline.hpp new file mode 100644 -index 00000000000..93ea4144072 +index 000000000..93ea41440 --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/z/zAddress_loongarch.inline.hpp @@ -0,0 +1,38 @@ @@ -21654,7 +21663,7 @@ index 00000000000..93ea4144072 +#endif // CPU_LOONGARCH64_GC_Z_ZADDRESS_LOONGARCH64_INLINE_HPP diff --git a/src/hotspot/cpu/loongarch/gc/z/zBarrierSetAssembler_loongarch.cpp b/src/hotspot/cpu/loongarch/gc/z/zBarrierSetAssembler_loongarch.cpp new file mode 100644 -index 00000000000..427a6f9c24a +index 000000000..427a6f9c2 --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/z/zBarrierSetAssembler_loongarch.cpp @@ -0,0 +1,1226 @@ @@ -22886,7 +22895,7 @@ index 00000000000..427a6f9c24a +#endif // COMPILER2 diff --git a/src/hotspot/cpu/loongarch/gc/z/zBarrierSetAssembler_loongarch.hpp b/src/hotspot/cpu/loongarch/gc/z/zBarrierSetAssembler_loongarch.hpp new file mode 100644 -index 00000000000..754f042f749 +index 000000000..754f042f7 --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/z/zBarrierSetAssembler_loongarch.hpp @@ -0,0 +1,192 @@ @@ -23084,7 +23093,7 @@ index 00000000000..754f042f749 +#endif // CPU_LOONGARCH_GC_Z_ZBARRIERSETASSEMBLER_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/gc/z/zGlobals_loongarch.hpp b/src/hotspot/cpu/loongarch/gc/z/zGlobals_loongarch.hpp new file mode 100644 -index 00000000000..3e012e31420 +index 000000000..3e012e314 --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/z/zGlobals_loongarch.hpp @@ -0,0 +1,30 @@ @@ -23120,7 +23129,7 @@ index 00000000000..3e012e31420 +#endif // CPU_LOONGARCH_GC_Z_ZGLOBALS_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/gc/z/z_loongarch_64.ad b/src/hotspot/cpu/loongarch/gc/z/z_loongarch_64.ad new file mode 100644 -index 00000000000..7a50810acda +index 000000000..7a50810ac --- /dev/null +++ b/src/hotspot/cpu/loongarch/gc/z/z_loongarch_64.ad @@ -0,0 +1,250 @@ @@ -23376,7 +23385,7 @@ index 00000000000..7a50810acda +%} diff --git a/src/hotspot/cpu/loongarch/globalDefinitions_loongarch.hpp b/src/hotspot/cpu/loongarch/globalDefinitions_loongarch.hpp new file mode 100644 -index 00000000000..2306c5bc6d1 +index 000000000..2306c5bc6 --- /dev/null +++ b/src/hotspot/cpu/loongarch/globalDefinitions_loongarch.hpp @@ -0,0 +1,58 @@ @@ -23440,7 +23449,7 @@ index 00000000000..2306c5bc6d1 +#endif // CPU_LOONGARCH_GLOBALDEFINITIONS_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/globals_loongarch.hpp b/src/hotspot/cpu/loongarch/globals_loongarch.hpp new file mode 100644 -index 00000000000..e38b0401bee +index 000000000..e38b0401b --- /dev/null +++ b/src/hotspot/cpu/loongarch/globals_loongarch.hpp @@ -0,0 +1,125 @@ @@ -23571,7 +23580,7 @@ index 00000000000..e38b0401bee +#endif // CPU_LOONGARCH_GLOBALS_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/icBuffer_loongarch.cpp b/src/hotspot/cpu/loongarch/icBuffer_loongarch.cpp new file mode 100644 -index 00000000000..c53d50d78f6 +index 000000000..c53d50d78 --- /dev/null +++ b/src/hotspot/cpu/loongarch/icBuffer_loongarch.cpp @@ -0,0 +1,82 @@ @@ -23659,7 +23668,7 @@ index 00000000000..c53d50d78f6 +} diff --git a/src/hotspot/cpu/loongarch/icache_loongarch.cpp b/src/hotspot/cpu/loongarch/icache_loongarch.cpp new file mode 100644 -index 00000000000..59906711428 +index 000000000..599067114 --- /dev/null +++ b/src/hotspot/cpu/loongarch/icache_loongarch.cpp @@ -0,0 +1,42 @@ @@ -23707,7 +23716,7 @@ index 00000000000..59906711428 +} diff --git a/src/hotspot/cpu/loongarch/icache_loongarch.hpp b/src/hotspot/cpu/loongarch/icache_loongarch.hpp new file mode 100644 -index 00000000000..3a180549fc6 +index 000000000..3a180549f --- /dev/null +++ b/src/hotspot/cpu/loongarch/icache_loongarch.hpp @@ -0,0 +1,41 @@ @@ -23754,7 +23763,7 @@ index 00000000000..3a180549fc6 +#endif // CPU_LOONGARCH_ICACHE_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/interp_masm_loongarch.hpp b/src/hotspot/cpu/loongarch/interp_masm_loongarch.hpp new file mode 100644 -index 00000000000..a632f7b881e +index 000000000..a632f7b88 --- /dev/null +++ b/src/hotspot/cpu/loongarch/interp_masm_loongarch.hpp @@ -0,0 +1,272 @@ @@ -24032,7 +24041,7 @@ index 00000000000..a632f7b881e +#endif // CPU_LOONGARCH_INTERP_MASM_LOONGARCH_64_HPP diff --git a/src/hotspot/cpu/loongarch/interp_masm_loongarch_64.cpp b/src/hotspot/cpu/loongarch/interp_masm_loongarch_64.cpp new file mode 100644 -index 00000000000..3790af7406c +index 000000000..3790af740 --- /dev/null +++ b/src/hotspot/cpu/loongarch/interp_masm_loongarch_64.cpp @@ -0,0 +1,1965 @@ @@ -26003,7 +26012,7 @@ index 00000000000..3790af7406c +} diff --git a/src/hotspot/cpu/loongarch/interpreterRT_loongarch.hpp b/src/hotspot/cpu/loongarch/interpreterRT_loongarch.hpp new file mode 100644 -index 00000000000..d53d951a160 +index 000000000..d53d951a1 --- /dev/null +++ b/src/hotspot/cpu/loongarch/interpreterRT_loongarch.hpp @@ -0,0 +1,62 @@ @@ -26071,7 +26080,7 @@ index 00000000000..d53d951a160 +#endif // CPU_LOONGARCH_INTERPRETERRT_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/interpreterRT_loongarch_64.cpp b/src/hotspot/cpu/loongarch/interpreterRT_loongarch_64.cpp new file mode 100644 -index 00000000000..46e634599e7 +index 000000000..46e634599 --- /dev/null +++ b/src/hotspot/cpu/loongarch/interpreterRT_loongarch_64.cpp @@ -0,0 +1,264 @@ @@ -26341,7 +26350,7 @@ index 00000000000..46e634599e7 +JRT_END diff --git a/src/hotspot/cpu/loongarch/javaFrameAnchor_loongarch.hpp b/src/hotspot/cpu/loongarch/javaFrameAnchor_loongarch.hpp new file mode 100644 -index 00000000000..b912250dce2 +index 000000000..b912250dc --- /dev/null +++ b/src/hotspot/cpu/loongarch/javaFrameAnchor_loongarch.hpp @@ -0,0 +1,86 @@ @@ -26433,7 +26442,7 @@ index 00000000000..b912250dce2 +#endif // CPU_LOONGARCH_JAVAFRAMEANCHOR_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/jniFastGetField_loongarch_64.cpp b/src/hotspot/cpu/loongarch/jniFastGetField_loongarch_64.cpp new file mode 100644 -index 00000000000..8e8e548e610 +index 000000000..8e8e548e6 --- /dev/null +++ b/src/hotspot/cpu/loongarch/jniFastGetField_loongarch_64.cpp @@ -0,0 +1,179 @@ @@ -26618,7 +26627,7 @@ index 00000000000..8e8e548e610 +} diff --git a/src/hotspot/cpu/loongarch/jniTypes_loongarch.hpp b/src/hotspot/cpu/loongarch/jniTypes_loongarch.hpp new file mode 100644 -index 00000000000..3388ddb9db7 +index 000000000..3388ddb9d --- /dev/null +++ b/src/hotspot/cpu/loongarch/jniTypes_loongarch.hpp @@ -0,0 +1,143 @@ @@ -26767,7 +26776,7 @@ index 00000000000..3388ddb9db7 +#endif // CPU_LOONGARCH_JNITYPES_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/jvmciCodeInstaller_loongarch.cpp b/src/hotspot/cpu/loongarch/jvmciCodeInstaller_loongarch.cpp new file mode 100644 -index 00000000000..1a983e338a4 +index 000000000..1a983e338 --- /dev/null +++ b/src/hotspot/cpu/loongarch/jvmciCodeInstaller_loongarch.cpp @@ -0,0 +1,194 @@ @@ -26967,7 +26976,7 @@ index 00000000000..1a983e338a4 +} diff --git a/src/hotspot/cpu/loongarch/loongarch.ad b/src/hotspot/cpu/loongarch/loongarch.ad new file mode 100644 -index 00000000000..80dff0c7626 +index 000000000..80dff0c76 --- /dev/null +++ b/src/hotspot/cpu/loongarch/loongarch.ad @@ -0,0 +1,25 @@ @@ -26998,10 +27007,10 @@ index 00000000000..80dff0c7626 + diff --git a/src/hotspot/cpu/loongarch/loongarch_64.ad b/src/hotspot/cpu/loongarch/loongarch_64.ad new file mode 100644 -index 00000000000..366df18eb9c +index 000000000..47904e7b8 --- /dev/null +++ b/src/hotspot/cpu/loongarch/loongarch_64.ad -@@ -0,0 +1,15833 @@ +@@ -0,0 +1,15888 @@ +// +// Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. +// Copyright (c) 2015, 2023, Loongson Technology. All rights reserved. @@ -27596,6 +27605,10 @@ index 00000000000..366df18eb9c + return _NO_CR_REG_mask; +%} + ++reg_class no_FP_reg %{ ++ return _NO_FP_REG_mask; ++%} ++ +reg_class p_has_s6_reg %{ + return _PTR_HAS_S6_REG_mask; +%} @@ -27803,6 +27816,7 @@ index 00000000000..366df18eb9c +extern RegMask _ANY_REG_mask; +extern RegMask _PTR_REG_mask; +extern RegMask _NO_CR_REG_mask; ++extern RegMask _NO_FP_REG_mask; +extern RegMask _PTR_HAS_S6_REG_mask; + +class CallStubImpl { @@ -27882,6 +27896,7 @@ index 00000000000..366df18eb9c +RegMask _ANY_REG_mask; +RegMask _PTR_REG_mask; +RegMask _NO_CR_REG_mask; ++RegMask _NO_FP_REG_mask; +RegMask _PTR_HAS_S6_REG_mask; + +void reg_mask_init() { @@ -27914,6 +27929,9 @@ index 00000000000..366df18eb9c + _NO_CR_REG_mask = _PTR_REG_mask; + _NO_CR_REG_mask.SUBTRACT(_T0_LONG_REG_mask); + ++ _NO_FP_REG_mask = _PTR_REG_mask; ++ _NO_FP_REG_mask.Remove(OptoReg::as_OptoReg(r22->as_VMReg())); ++ + _PTR_HAS_S6_REG_mask.OR(_S6_LONG_REG_mask); +} + @@ -30652,6 +30670,17 @@ index 00000000000..366df18eb9c + interface(REG_INTER); +%} + ++// This operand is not allowed to use FP even if ++// FP is not used to hold the frame pointer. ++operand no_FP_mRegP() %{ ++ constraint(ALLOC_IN_RC(no_FP_reg)); ++ match(RegP); ++ match(mRegP); ++ ++ format %{ %} ++ interface(REG_INTER); ++%} ++ +operand p_has_s6_mRegP() %{ + constraint(ALLOC_IN_RC(p_has_s6_reg)); + match(RegP); @@ -32388,7 +32417,9 @@ index 00000000000..366df18eb9c +// Also known as an 'interprocedural jump'. +// Target of jump will eventually return to caller. +// TailJump below removes the return address. -+instruct TailCalljmpInd(mRegP jump_target, s3_RegP method_ptr) %{ ++// Don't use FP for 'jump_target' because a MachEpilogNode has already been ++// emitted just above the TailCall which has reset FP to the caller state. ++instruct TailCalljmpInd(no_FP_mRegP jump_target, s3_RegP method_ptr) %{ + match(TailCall jump_target method_ptr); + + format %{ "JMP $jump_target \t# @TailCalljmpInd" %} @@ -38224,7 +38255,7 @@ index 00000000000..366df18eb9c +// "restore" before this instruction (in Epilogue), we need to materialize it +// in %i0. +//FIXME -+instruct tailjmpInd(mRegP jump_target, a0_RegP ex_oop, mA1RegI exception_pc) %{ ++instruct tailjmpInd(no_FP_mRegP jump_target, a0_RegP ex_oop, mA1RegI exception_pc) %{ + match( TailJump jump_target ex_oop ); + ins_cost(200); + format %{ "Jmp $jump_target ; ex_oop = $ex_oop #@tailjmpInd" %} @@ -42733,6 +42764,39 @@ index 00000000000..366df18eb9c + ins_pipe(pipe_slow); +%} + ++// ------------------------------ ReverseBytesV -------------------------------- ++ ++instruct reverseBytesV(vReg dst, vReg src) %{ ++ match(Set dst (ReverseBytesV src)); ++ format %{ "(x)vreverse_byte $dst, $src\t# @reverseBytesV" %} ++ ins_encode %{ ++ if (Matcher::vector_length_in_bytes(this) > 16) { ++ switch (Matcher::vector_element_basic_type(this)) { ++ case T_BYTE : if ($dst$$FloatRegister != $src$$FloatRegister) ++ __ xvori_b($dst$$FloatRegister, $src$$FloatRegister, 0); break; ++ case T_SHORT : __ xvshuf4i_b($dst$$FloatRegister, $src$$FloatRegister, 0b10110001); break; ++ case T_INT : __ xvshuf4i_b($dst$$FloatRegister, $src$$FloatRegister, 0b00011011); break; ++ case T_LONG : __ xvshuf4i_w($dst$$FloatRegister, $src$$FloatRegister, 0b10110001); ++ __ xvshuf4i_b($dst$$FloatRegister, $dst$$FloatRegister, 0b00011011); break; ++ default: ++ ShouldNotReachHere(); ++ } ++ } else { ++ switch (Matcher::vector_element_basic_type(this)) { ++ case T_BYTE : if ($dst$$FloatRegister != $src$$FloatRegister) ++ __ vori_b($dst$$FloatRegister, $src$$FloatRegister, 0); break; ++ case T_SHORT : __ vshuf4i_b($dst$$FloatRegister, $src$$FloatRegister, 0b10110001); break; ++ case T_INT : __ vshuf4i_b($dst$$FloatRegister, $src$$FloatRegister, 0b00011011); break; ++ case T_LONG : __ vshuf4i_w($dst$$FloatRegister, $src$$FloatRegister, 0b10110001); ++ __ vshuf4i_b($dst$$FloatRegister, $dst$$FloatRegister, 0b00011011); break; ++ default: ++ ShouldNotReachHere(); ++ } ++ } ++ %} ++ ins_pipe(pipe_slow); ++%} ++ + +//----------PEEPHOLE RULES----------------------------------------------------- +// These must follow all instruction definitions as they use the names @@ -42837,7 +42901,7 @@ index 00000000000..366df18eb9c + diff --git a/src/hotspot/cpu/loongarch/macroAssembler_loongarch.cpp b/src/hotspot/cpu/loongarch/macroAssembler_loongarch.cpp new file mode 100644 -index 00000000000..e2f69cea31b +index 000000000..e2f69cea3 --- /dev/null +++ b/src/hotspot/cpu/loongarch/macroAssembler_loongarch.cpp @@ -0,0 +1,4242 @@ @@ -47085,7 +47149,7 @@ index 00000000000..e2f69cea31b +#endif diff --git a/src/hotspot/cpu/loongarch/macroAssembler_loongarch.hpp b/src/hotspot/cpu/loongarch/macroAssembler_loongarch.hpp new file mode 100644 -index 00000000000..6727de3aa7a +index 000000000..6727de3aa --- /dev/null +++ b/src/hotspot/cpu/loongarch/macroAssembler_loongarch.hpp @@ -0,0 +1,809 @@ @@ -47900,7 +47964,7 @@ index 00000000000..6727de3aa7a +#endif // CPU_LOONGARCH_MACROASSEMBLER_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/macroAssembler_loongarch.inline.hpp b/src/hotspot/cpu/loongarch/macroAssembler_loongarch.inline.hpp new file mode 100644 -index 00000000000..43b388a2c4b +index 000000000..43b388a2c --- /dev/null +++ b/src/hotspot/cpu/loongarch/macroAssembler_loongarch.inline.hpp @@ -0,0 +1,937 @@ @@ -48843,7 +48907,7 @@ index 00000000000..43b388a2c4b +#endif // CPU_LOONGARCH_MACROASSEMBLER_LOONGARCH_INLINE_HPP diff --git a/src/hotspot/cpu/loongarch/macroAssembler_loongarch_chacha.cpp b/src/hotspot/cpu/loongarch/macroAssembler_loongarch_chacha.cpp new file mode 100644 -index 00000000000..ea4d5a2ac4c +index 000000000..ea4d5a2ac --- /dev/null +++ b/src/hotspot/cpu/loongarch/macroAssembler_loongarch_chacha.cpp @@ -0,0 +1,86 @@ @@ -48935,7 +48999,7 @@ index 00000000000..ea4d5a2ac4c +} diff --git a/src/hotspot/cpu/loongarch/macroAssembler_loongarch_trig.cpp b/src/hotspot/cpu/loongarch/macroAssembler_loongarch_trig.cpp new file mode 100644 -index 00000000000..0c31904a36b +index 000000000..0c31904a3 --- /dev/null +++ b/src/hotspot/cpu/loongarch/macroAssembler_loongarch_trig.cpp @@ -0,0 +1,1626 @@ @@ -50567,7 +50631,7 @@ index 00000000000..0c31904a36b +} diff --git a/src/hotspot/cpu/loongarch/matcher_loongarch.hpp b/src/hotspot/cpu/loongarch/matcher_loongarch.hpp new file mode 100644 -index 00000000000..79b5d4157a8 +index 000000000..79b5d4157 --- /dev/null +++ b/src/hotspot/cpu/loongarch/matcher_loongarch.hpp @@ -0,0 +1,181 @@ @@ -50754,7 +50818,7 @@ index 00000000000..79b5d4157a8 +#endif // CPU_LOONGARCH_MATCHER_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/methodHandles_loongarch.cpp b/src/hotspot/cpu/loongarch/methodHandles_loongarch.cpp new file mode 100644 -index 00000000000..4b5d41aea07 +index 000000000..4b5d41aea --- /dev/null +++ b/src/hotspot/cpu/loongarch/methodHandles_loongarch.cpp @@ -0,0 +1,568 @@ @@ -51328,7 +51392,7 @@ index 00000000000..4b5d41aea07 +#endif //PRODUCT diff --git a/src/hotspot/cpu/loongarch/methodHandles_loongarch.hpp b/src/hotspot/cpu/loongarch/methodHandles_loongarch.hpp new file mode 100644 -index 00000000000..8e129225509 +index 000000000..8e1292255 --- /dev/null +++ b/src/hotspot/cpu/loongarch/methodHandles_loongarch.hpp @@ -0,0 +1,65 @@ @@ -51399,7 +51463,7 @@ index 00000000000..8e129225509 + } diff --git a/src/hotspot/cpu/loongarch/nativeInst_loongarch.cpp b/src/hotspot/cpu/loongarch/nativeInst_loongarch.cpp new file mode 100644 -index 00000000000..c298cda5de7 +index 000000000..c298cda5d --- /dev/null +++ b/src/hotspot/cpu/loongarch/nativeInst_loongarch.cpp @@ -0,0 +1,537 @@ @@ -51942,7 +52006,7 @@ index 00000000000..c298cda5de7 +} diff --git a/src/hotspot/cpu/loongarch/nativeInst_loongarch.hpp b/src/hotspot/cpu/loongarch/nativeInst_loongarch.hpp new file mode 100644 -index 00000000000..3a322a218a3 +index 000000000..3a322a218 --- /dev/null +++ b/src/hotspot/cpu/loongarch/nativeInst_loongarch.hpp @@ -0,0 +1,595 @@ @@ -52543,7 +52607,7 @@ index 00000000000..3a322a218a3 +#endif // CPU_LOONGARCH_NATIVEINST_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/registerMap_loongarch.hpp b/src/hotspot/cpu/loongarch/registerMap_loongarch.hpp new file mode 100644 -index 00000000000..9b0ff3eae76 +index 000000000..9b0ff3eae --- /dev/null +++ b/src/hotspot/cpu/loongarch/registerMap_loongarch.hpp @@ -0,0 +1,59 @@ @@ -52608,7 +52672,7 @@ index 00000000000..9b0ff3eae76 +#endif // CPU_LOONGARCH_REGISTERMAP_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/register_loongarch.cpp b/src/hotspot/cpu/loongarch/register_loongarch.cpp new file mode 100644 -index 00000000000..5378fce5cd2 +index 000000000..5378fce5c --- /dev/null +++ b/src/hotspot/cpu/loongarch/register_loongarch.cpp @@ -0,0 +1,61 @@ @@ -52675,7 +52739,7 @@ index 00000000000..5378fce5cd2 +} diff --git a/src/hotspot/cpu/loongarch/register_loongarch.hpp b/src/hotspot/cpu/loongarch/register_loongarch.hpp new file mode 100644 -index 00000000000..25f7abfe75e +index 000000000..6ffdd41a5 --- /dev/null +++ b/src/hotspot/cpu/loongarch/register_loongarch.hpp @@ -0,0 +1,479 @@ @@ -52736,7 +52800,7 @@ index 00000000000..25f7abfe75e + + public: + // accessors -+ constexpr int raw_encoding() const { return this - first(); } ++ constexpr int raw_encoding() const { return checked_cast(this - first()); } + constexpr int encoding() const { assert(is_valid(), "invalid register"); return raw_encoding(); } + constexpr bool is_valid() const { return 0 <= raw_encoding() && raw_encoding() < number_of_registers; } + @@ -52906,7 +52970,7 @@ index 00000000000..25f7abfe75e + + public: + // accessors -+ constexpr int raw_encoding() const { return this - first(); } ++ constexpr int raw_encoding() const { return checked_cast(this - first()); } + constexpr int encoding() const { assert(is_valid(), "invalid register"); return raw_encoding(); } + constexpr bool is_valid() const { return 0 <= raw_encoding() && raw_encoding() < number_of_registers; } + @@ -53067,7 +53131,7 @@ index 00000000000..25f7abfe75e + + public: + // accessors -+ int raw_encoding() const { return this - first(); } ++ int raw_encoding() const { return checked_cast(this - first()); } + int encoding() const { assert(is_valid(), "invalid register"); return raw_encoding(); } + bool is_valid() const { return 0 <= raw_encoding() && raw_encoding() < number_of_registers; } + @@ -53160,7 +53224,7 @@ index 00000000000..25f7abfe75e +#endif //CPU_LOONGARCH_REGISTER_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/relocInfo_loongarch.cpp b/src/hotspot/cpu/loongarch/relocInfo_loongarch.cpp new file mode 100644 -index 00000000000..d7011d57525 +index 000000000..d7011d575 --- /dev/null +++ b/src/hotspot/cpu/loongarch/relocInfo_loongarch.cpp @@ -0,0 +1,133 @@ @@ -53299,7 +53363,7 @@ index 00000000000..d7011d57525 +} diff --git a/src/hotspot/cpu/loongarch/relocInfo_loongarch.hpp b/src/hotspot/cpu/loongarch/relocInfo_loongarch.hpp new file mode 100644 -index 00000000000..c85ca4963f3 +index 000000000..c85ca4963 --- /dev/null +++ b/src/hotspot/cpu/loongarch/relocInfo_loongarch.hpp @@ -0,0 +1,44 @@ @@ -53349,7 +53413,7 @@ index 00000000000..c85ca4963f3 +#endif // CPU_LOONGARCH_RELOCINFO_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/sharedRuntime_loongarch_64.cpp b/src/hotspot/cpu/loongarch/sharedRuntime_loongarch_64.cpp new file mode 100644 -index 00000000000..834a1e7ffc6 +index 000000000..834a1e7ff --- /dev/null +++ b/src/hotspot/cpu/loongarch/sharedRuntime_loongarch_64.cpp @@ -0,0 +1,2979 @@ @@ -56334,13 +56398,13 @@ index 00000000000..834a1e7ffc6 +extern "C" int SpinPause() {return 0;} diff --git a/src/hotspot/cpu/loongarch/smallRegisterMap_loongarch.inline.hpp b/src/hotspot/cpu/loongarch/smallRegisterMap_loongarch.inline.hpp new file mode 100644 -index 00000000000..ebd11807b24 +index 000000000..7417ece8f --- /dev/null +++ b/src/hotspot/cpu/loongarch/smallRegisterMap_loongarch.inline.hpp -@@ -0,0 +1,92 @@ +@@ -0,0 +1,88 @@ +/* + * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2022, Loongson Technology. All rights reserved. ++ * Copyright (c) 2022, 2024, Loongson Technology. 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 @@ -56371,8 +56435,15 @@ index 00000000000..ebd11807b24 + +// Java frames don't have callee saved registers (except for FP), so we can use a smaller RegisterMap +class SmallRegisterMap { ++ constexpr SmallRegisterMap() = default; ++ ~SmallRegisterMap() = default; ++ NONCOPYABLE(SmallRegisterMap); ++ +public: -+ static constexpr SmallRegisterMap* instance = nullptr; ++ static const SmallRegisterMap* instance() { ++ static constexpr SmallRegisterMap the_instance{}; ++ return &the_instance; ++ } +private: + static void assert_is_fp(VMReg r) NOT_DEBUG_RETURN + DEBUG_ONLY({ assert (r == FP->as_VMReg() || r == FP->as_VMReg()->next(), "Reg: %s", r->name()); }) @@ -56389,17 +56460,6 @@ index 00000000000..ebd11807b24 + return map; + } + -+ SmallRegisterMap() {} -+ -+ SmallRegisterMap(const RegisterMap* map) { -+ #ifdef ASSERT -+ for(int i = 0; i < RegisterMap::reg_count; i++) { -+ VMReg r = VMRegImpl::as_VMReg(i); -+ if (map->location(r, (intptr_t*)nullptr) != nullptr) assert_is_fp(r); -+ } -+ #endif -+ } -+ + inline address location(VMReg reg, intptr_t* sp) const { + assert_is_fp(reg); + return (address)(sp - 2); @@ -56432,7 +56492,7 @@ index 00000000000..ebd11807b24 +#endif // CPU_LOONGARCH_SMALLREGISTERMAP_LOONGARCH_INLINE_HPP diff --git a/src/hotspot/cpu/loongarch/stackChunkFrameStream_loongarch.inline.hpp b/src/hotspot/cpu/loongarch/stackChunkFrameStream_loongarch.inline.hpp new file mode 100644 -index 00000000000..d329c43d661 +index 000000000..0be80eb3e --- /dev/null +++ b/src/hotspot/cpu/loongarch/stackChunkFrameStream_loongarch.inline.hpp @@ -0,0 +1,142 @@ @@ -56473,7 +56533,7 @@ index 00000000000..d329c43d661 +inline bool StackChunkFrameStream::is_in_frame(void* p0) const { + assert(!is_done(), ""); + intptr_t* p = (intptr_t*)p0; -+ int argsize = is_compiled() ? (_cb->as_compiled_method()->method()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord : 0; ++ int argsize = is_compiled() ? (_cb->as_nmethod()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord : 0; + int frame_size = _cb->frame_size() + argsize; + return p == sp() - 2 || ((p - unextended_sp()) >= 0 && (p - unextended_sp()) < frame_size); +} @@ -56553,8 +56613,8 @@ index 00000000000..d329c43d661 + f.interpreted_frame_oop_map(&mask); + return mask.num_oops() + + 1 // for the mirror oop -+ + ((intptr_t*)f.interpreter_frame_monitor_begin() -+ - (intptr_t*)f.interpreter_frame_monitor_end()) / BasicObjectLock::size(); ++ + pointer_delta_as_int((intptr_t*)f.interpreter_frame_monitor_begin(), ++ (intptr_t*)f.interpreter_frame_monitor_end()) / BasicObjectLock::size(); +} + +template<> @@ -56580,7 +56640,7 @@ index 00000000000..d329c43d661 +#endif // CPU_LOONGARCH_STACKCHUNKFRAMESTREAM_LOONGARCH_INLINE_HPP diff --git a/src/hotspot/cpu/loongarch/stackChunkOop_loongarch.inline.hpp b/src/hotspot/cpu/loongarch/stackChunkOop_loongarch.inline.hpp new file mode 100644 -index 00000000000..3e6b0e2a5cb +index 000000000..3e6b0e2a5 --- /dev/null +++ b/src/hotspot/cpu/loongarch/stackChunkOop_loongarch.inline.hpp @@ -0,0 +1,43 @@ @@ -56629,7 +56689,7 @@ index 00000000000..3e6b0e2a5cb +#endif // CPU_LOONGARCH_STACKCHUNKOOP_LOONGARCH_INLINE_HPP diff --git a/src/hotspot/cpu/loongarch/stubGenerator_loongarch_64.cpp b/src/hotspot/cpu/loongarch/stubGenerator_loongarch_64.cpp new file mode 100644 -index 00000000000..87bfcb3f58f +index 000000000..87bfcb3f5 --- /dev/null +++ b/src/hotspot/cpu/loongarch/stubGenerator_loongarch_64.cpp @@ -0,0 +1,5721 @@ @@ -62356,7 +62416,7 @@ index 00000000000..87bfcb3f58f +} diff --git a/src/hotspot/cpu/loongarch/stubRoutines_loongarch.hpp b/src/hotspot/cpu/loongarch/stubRoutines_loongarch.hpp new file mode 100644 -index 00000000000..2614bbd6832 +index 000000000..2614bbd68 --- /dev/null +++ b/src/hotspot/cpu/loongarch/stubRoutines_loongarch.hpp @@ -0,0 +1,118 @@ @@ -62480,7 +62540,7 @@ index 00000000000..2614bbd6832 +#endif // CPU_LOONGARCH_STUBROUTINES_LOONGARCH_64_HPP diff --git a/src/hotspot/cpu/loongarch/stubRoutines_loongarch_64.cpp b/src/hotspot/cpu/loongarch/stubRoutines_loongarch_64.cpp new file mode 100644 -index 00000000000..4d8fe415483 +index 000000000..4d8fe4154 --- /dev/null +++ b/src/hotspot/cpu/loongarch/stubRoutines_loongarch_64.cpp @@ -0,0 +1,196 @@ @@ -62682,7 +62742,7 @@ index 00000000000..4d8fe415483 +}; diff --git a/src/hotspot/cpu/loongarch/templateInterpreterGenerator_loongarch.cpp b/src/hotspot/cpu/loongarch/templateInterpreterGenerator_loongarch.cpp new file mode 100644 -index 00000000000..f625f9b43b9 +index 000000000..f625f9b43 --- /dev/null +++ b/src/hotspot/cpu/loongarch/templateInterpreterGenerator_loongarch.cpp @@ -0,0 +1,2106 @@ @@ -64794,7 +64854,7 @@ index 00000000000..f625f9b43b9 +#endif // !PRODUCT diff --git a/src/hotspot/cpu/loongarch/templateTable_loongarch.hpp b/src/hotspot/cpu/loongarch/templateTable_loongarch.hpp new file mode 100644 -index 00000000000..ddb38faf446 +index 000000000..ddb38faf4 --- /dev/null +++ b/src/hotspot/cpu/loongarch/templateTable_loongarch.hpp @@ -0,0 +1,43 @@ @@ -64843,7 +64903,7 @@ index 00000000000..ddb38faf446 +#endif // CPU_LOONGARCH_TEMPLATETABLE_LOONGARCH_64_HPP diff --git a/src/hotspot/cpu/loongarch/templateTable_loongarch_64.cpp b/src/hotspot/cpu/loongarch/templateTable_loongarch_64.cpp new file mode 100644 -index 00000000000..7d308d998dd +index 000000000..7d308d998 --- /dev/null +++ b/src/hotspot/cpu/loongarch/templateTable_loongarch_64.cpp @@ -0,0 +1,4007 @@ @@ -68856,7 +68916,7 @@ index 00000000000..7d308d998dd +} diff --git a/src/hotspot/cpu/loongarch/upcallLinker_loongarch_64.cpp b/src/hotspot/cpu/loongarch/upcallLinker_loongarch_64.cpp new file mode 100644 -index 00000000000..da902dda7a5 +index 000000000..da902dda7 --- /dev/null +++ b/src/hotspot/cpu/loongarch/upcallLinker_loongarch_64.cpp @@ -0,0 +1,351 @@ @@ -69213,7 +69273,7 @@ index 00000000000..da902dda7a5 +} diff --git a/src/hotspot/cpu/loongarch/vmStructs_loongarch.hpp b/src/hotspot/cpu/loongarch/vmStructs_loongarch.hpp new file mode 100644 -index 00000000000..5b9f7b78981 +index 000000000..5b9f7b789 --- /dev/null +++ b/src/hotspot/cpu/loongarch/vmStructs_loongarch.hpp @@ -0,0 +1,61 @@ @@ -69280,7 +69340,7 @@ index 00000000000..5b9f7b78981 +#endif // CPU_LOONGARCH_VMSTRUCTS_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/vm_version_loongarch.cpp b/src/hotspot/cpu/loongarch/vm_version_loongarch.cpp new file mode 100644 -index 00000000000..44bca90d2c2 +index 000000000..44bca90d2 --- /dev/null +++ b/src/hotspot/cpu/loongarch/vm_version_loongarch.cpp @@ -0,0 +1,511 @@ @@ -69797,7 +69857,7 @@ index 00000000000..44bca90d2c2 +} diff --git a/src/hotspot/cpu/loongarch/vm_version_loongarch.hpp b/src/hotspot/cpu/loongarch/vm_version_loongarch.hpp new file mode 100644 -index 00000000000..04bd6942dc2 +index 000000000..04bd6942d --- /dev/null +++ b/src/hotspot/cpu/loongarch/vm_version_loongarch.hpp @@ -0,0 +1,308 @@ @@ -70111,7 +70171,7 @@ index 00000000000..04bd6942dc2 +#endif // CPU_LOONGARCH_VM_VERSION_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/vmreg_loongarch.cpp b/src/hotspot/cpu/loongarch/vmreg_loongarch.cpp new file mode 100644 -index 00000000000..3433ca028fe +index 000000000..3433ca028 --- /dev/null +++ b/src/hotspot/cpu/loongarch/vmreg_loongarch.cpp @@ -0,0 +1,54 @@ @@ -70171,7 +70231,7 @@ index 00000000000..3433ca028fe +} diff --git a/src/hotspot/cpu/loongarch/vmreg_loongarch.hpp b/src/hotspot/cpu/loongarch/vmreg_loongarch.hpp new file mode 100644 -index 00000000000..ff79e91f60d +index 000000000..ff79e91f6 --- /dev/null +++ b/src/hotspot/cpu/loongarch/vmreg_loongarch.hpp @@ -0,0 +1,58 @@ @@ -70235,7 +70295,7 @@ index 00000000000..ff79e91f60d +#endif // CPU_LOONGARCH_VMREG_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/vmreg_loongarch.inline.hpp b/src/hotspot/cpu/loongarch/vmreg_loongarch.inline.hpp new file mode 100644 -index 00000000000..3f158bd9bae +index 000000000..3f158bd9b --- /dev/null +++ b/src/hotspot/cpu/loongarch/vmreg_loongarch.inline.hpp @@ -0,0 +1,38 @@ @@ -70279,7 +70339,7 @@ index 00000000000..3f158bd9bae +#endif // CPU_LOONGARCH_VMREG_LOONGARCH_INLINE_HPP diff --git a/src/hotspot/cpu/loongarch/vmstorage_loongarch.hpp b/src/hotspot/cpu/loongarch/vmstorage_loongarch.hpp new file mode 100644 -index 00000000000..03b53dc81f8 +index 000000000..03b53dc81 --- /dev/null +++ b/src/hotspot/cpu/loongarch/vmstorage_loongarch.hpp @@ -0,0 +1,87 @@ @@ -70372,7 +70432,7 @@ index 00000000000..03b53dc81f8 +#endif // CPU_LOONGARCH_VMSTORAGE_LOONGARCH_INLINE_HPP diff --git a/src/hotspot/cpu/loongarch/vtableStubs_loongarch_64.cpp b/src/hotspot/cpu/loongarch/vtableStubs_loongarch_64.cpp new file mode 100644 -index 00000000000..ab12021832d +index 000000000..ab1202183 --- /dev/null +++ b/src/hotspot/cpu/loongarch/vtableStubs_loongarch_64.cpp @@ -0,0 +1,312 @@ @@ -70689,7 +70749,7 @@ index 00000000000..ab12021832d + return icache_line_size; +} diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp -index 492300a37d4..b0504aff9c2 100644 +index 7cb862d7c..21093e523 100644 --- a/src/hotspot/os/linux/os_linux.cpp +++ b/src/hotspot/os/linux/os_linux.cpp @@ -23,6 +23,12 @@ @@ -70736,7 +70796,7 @@ index 492300a37d4..b0504aff9c2 100644 const char* search_string = "model name"; #elif defined(M68K) const char* search_string = "CPU"; -@@ -4480,6 +4492,44 @@ void os::Linux::numa_init() { +@@ -4531,6 +4543,44 @@ void os::Linux::numa_init() { // If there's only one node (they start from 0) or if the process // is bound explicitly to a single node using membind, disable NUMA UseNUMA = false; @@ -70782,7 +70842,7 @@ index 492300a37d4..b0504aff9c2 100644 LogTarget(Info,os) log; LogStream ls(log); diff --git a/src/hotspot/os/linux/os_linux.hpp b/src/hotspot/os/linux/os_linux.hpp -index 029f2aa7a52..78bf68a72e9 100644 +index 029f2aa7a..78bf68a72 100644 --- a/src/hotspot/os/linux/os_linux.hpp +++ b/src/hotspot/os/linux/os_linux.hpp @@ -22,6 +22,12 @@ @@ -70808,7 +70868,7 @@ index 029f2aa7a52..78bf68a72e9 100644 static void numa_init(); diff --git a/src/hotspot/os/linux/systemMemoryBarrier_linux.cpp b/src/hotspot/os/linux/systemMemoryBarrier_linux.cpp -index 51397b139d8..96269fef53d 100644 +index 51397b139..96269fef5 100644 --- a/src/hotspot/os/linux/systemMemoryBarrier_linux.cpp +++ b/src/hotspot/os/linux/systemMemoryBarrier_linux.cpp @@ -22,6 +22,12 @@ @@ -70835,7 +70895,7 @@ index 51397b139d8..96269fef53d 100644 #endif diff --git a/src/hotspot/os_cpu/linux_loongarch/assembler_linux_loongarch.cpp b/src/hotspot/os_cpu/linux_loongarch/assembler_linux_loongarch.cpp new file mode 100644 -index 00000000000..30719a0340b +index 000000000..30719a034 --- /dev/null +++ b/src/hotspot/os_cpu/linux_loongarch/assembler_linux_loongarch.cpp @@ -0,0 +1,24 @@ @@ -70865,7 +70925,7 @@ index 00000000000..30719a0340b + */ diff --git a/src/hotspot/os_cpu/linux_loongarch/atomic_linux_loongarch.hpp b/src/hotspot/os_cpu/linux_loongarch/atomic_linux_loongarch.hpp new file mode 100644 -index 00000000000..f0c7a7e3a5d +index 000000000..f0c7a7e3a --- /dev/null +++ b/src/hotspot/os_cpu/linux_loongarch/atomic_linux_loongarch.hpp @@ -0,0 +1,499 @@ @@ -71370,7 +71430,7 @@ index 00000000000..f0c7a7e3a5d +#endif // OS_CPU_LINUX_LOONGARCH_ATOMIC_LINUX_LOONGARCH_HPP diff --git a/src/hotspot/os_cpu/linux_loongarch/copy_linux_loongarch.inline.hpp b/src/hotspot/os_cpu/linux_loongarch/copy_linux_loongarch.inline.hpp new file mode 100644 -index 00000000000..37587b6bf72 +index 000000000..37587b6bf --- /dev/null +++ b/src/hotspot/os_cpu/linux_loongarch/copy_linux_loongarch.inline.hpp @@ -0,0 +1,145 @@ @@ -71521,7 +71581,7 @@ index 00000000000..37587b6bf72 +#endif // OS_CPU_LINUX_LOONGARCH_COPY_LINUX_LOONGARCH_INLINE_HPP diff --git a/src/hotspot/os_cpu/linux_loongarch/gc/x/xSyscall_linux_loongarch.hpp b/src/hotspot/os_cpu/linux_loongarch/gc/x/xSyscall_linux_loongarch.hpp new file mode 100644 -index 00000000000..3ebb1327cd7 +index 000000000..3ebb1327c --- /dev/null +++ b/src/hotspot/os_cpu/linux_loongarch/gc/x/xSyscall_linux_loongarch.hpp @@ -0,0 +1,41 @@ @@ -71568,7 +71628,7 @@ index 00000000000..3ebb1327cd7 +#endif // OS_CPU_LINUX_LOONGARCH_GC_X_XSYSCALL_LINUX_LOONGARCH_HPP diff --git a/src/hotspot/os_cpu/linux_loongarch/gc/z/zSyscall_linux_loongarch.hpp b/src/hotspot/os_cpu/linux_loongarch/gc/z/zSyscall_linux_loongarch.hpp new file mode 100644 -index 00000000000..46d5d5a268b +index 000000000..46d5d5a26 --- /dev/null +++ b/src/hotspot/os_cpu/linux_loongarch/gc/z/zSyscall_linux_loongarch.hpp @@ -0,0 +1,41 @@ @@ -71615,7 +71675,7 @@ index 00000000000..46d5d5a268b +#endif // OS_CPU_LINUX_LOONGARCH_GC_Z_ZSYSCALL_LINUX_LOONGARCH_HPP diff --git a/src/hotspot/os_cpu/linux_loongarch/globals_linux_loongarch.hpp b/src/hotspot/os_cpu/linux_loongarch/globals_linux_loongarch.hpp new file mode 100644 -index 00000000000..0b5247aa0b6 +index 000000000..0b5247aa0 --- /dev/null +++ b/src/hotspot/os_cpu/linux_loongarch/globals_linux_loongarch.hpp @@ -0,0 +1,43 @@ @@ -71664,7 +71724,7 @@ index 00000000000..0b5247aa0b6 +#endif // OS_CPU_LINUX_LOONGARCH_GLOBALS_LINUX_LOONGARCH_HPP diff --git a/src/hotspot/os_cpu/linux_loongarch/javaThread_linux_loongarch.cpp b/src/hotspot/os_cpu/linux_loongarch/javaThread_linux_loongarch.cpp new file mode 100644 -index 00000000000..76a662afe87 +index 000000000..76a662afe --- /dev/null +++ b/src/hotspot/os_cpu/linux_loongarch/javaThread_linux_loongarch.cpp @@ -0,0 +1,105 @@ @@ -71775,7 +71835,7 @@ index 00000000000..76a662afe87 +void JavaThread::cache_global_variables() { } diff --git a/src/hotspot/os_cpu/linux_loongarch/javaThread_linux_loongarch.hpp b/src/hotspot/os_cpu/linux_loongarch/javaThread_linux_loongarch.hpp new file mode 100644 -index 00000000000..ea14dd335a5 +index 000000000..ea14dd335 --- /dev/null +++ b/src/hotspot/os_cpu/linux_loongarch/javaThread_linux_loongarch.hpp @@ -0,0 +1,66 @@ @@ -71847,7 +71907,7 @@ index 00000000000..ea14dd335a5 +#endif // OS_CPU_LINUX_LOONGARCH_JAVATHREAD_LINUX_LOONGARCH_HPP diff --git a/src/hotspot/os_cpu/linux_loongarch/linux_loongarch.s b/src/hotspot/os_cpu/linux_loongarch/linux_loongarch.s new file mode 100644 -index 00000000000..ebd73af0c53 +index 000000000..ebd73af0c --- /dev/null +++ b/src/hotspot/os_cpu/linux_loongarch/linux_loongarch.s @@ -0,0 +1,25 @@ @@ -71878,7 +71938,7 @@ index 00000000000..ebd73af0c53 + diff --git a/src/hotspot/os_cpu/linux_loongarch/orderAccess_linux_loongarch.hpp b/src/hotspot/os_cpu/linux_loongarch/orderAccess_linux_loongarch.hpp new file mode 100644 -index 00000000000..2d096943ae8 +index 000000000..2d096943a --- /dev/null +++ b/src/hotspot/os_cpu/linux_loongarch/orderAccess_linux_loongarch.hpp @@ -0,0 +1,50 @@ @@ -71934,7 +71994,7 @@ index 00000000000..2d096943ae8 +#endif // OS_CPU_LINUX_LOONGARCH_ORDERACCESS_LINUX_LOONGARCH_HPP diff --git a/src/hotspot/os_cpu/linux_loongarch/os_linux_loongarch.cpp b/src/hotspot/os_cpu/linux_loongarch/os_linux_loongarch.cpp new file mode 100644 -index 00000000000..31bfcba8db6 +index 000000000..31bfcba8d --- /dev/null +++ b/src/hotspot/os_cpu/linux_loongarch/os_linux_loongarch.cpp @@ -0,0 +1,491 @@ @@ -72431,7 +72491,7 @@ index 00000000000..31bfcba8db6 +} diff --git a/src/hotspot/os_cpu/linux_loongarch/os_linux_loongarch.inline.hpp b/src/hotspot/os_cpu/linux_loongarch/os_linux_loongarch.inline.hpp new file mode 100644 -index 00000000000..43071194ac1 +index 000000000..43071194a --- /dev/null +++ b/src/hotspot/os_cpu/linux_loongarch/os_linux_loongarch.inline.hpp @@ -0,0 +1,29 @@ @@ -72466,7 +72526,7 @@ index 00000000000..43071194ac1 +#endif // OS_CPU_LINUX_LOONGARCH_OS_LINUX_LOONGARCH_INLINE_HPP diff --git a/src/hotspot/os_cpu/linux_loongarch/prefetch_linux_loongarch.inline.hpp b/src/hotspot/os_cpu/linux_loongarch/prefetch_linux_loongarch.inline.hpp new file mode 100644 -index 00000000000..5fe74ccd97c +index 000000000..5fe74ccd9 --- /dev/null +++ b/src/hotspot/os_cpu/linux_loongarch/prefetch_linux_loongarch.inline.hpp @@ -0,0 +1,56 @@ @@ -72528,7 +72588,7 @@ index 00000000000..5fe74ccd97c +#endif // OS_CPU_LINUX_LOONGARCH_PREFETCH_LINUX_LOONGARCH_INLINE_HPP diff --git a/src/hotspot/os_cpu/linux_loongarch/safefetch_linux_loongarch64.S b/src/hotspot/os_cpu/linux_loongarch/safefetch_linux_loongarch64.S new file mode 100644 -index 00000000000..fdc6da358e5 +index 000000000..fdc6da358 --- /dev/null +++ b/src/hotspot/os_cpu/linux_loongarch/safefetch_linux_loongarch64.S @@ -0,0 +1,56 @@ @@ -72590,7 +72650,7 @@ index 00000000000..fdc6da358e5 + jr $r1 diff --git a/src/hotspot/os_cpu/linux_loongarch/vmStructs_linux_loongarch.hpp b/src/hotspot/os_cpu/linux_loongarch/vmStructs_linux_loongarch.hpp new file mode 100644 -index 00000000000..a39cb79bb1e +index 000000000..a39cb79bb --- /dev/null +++ b/src/hotspot/os_cpu/linux_loongarch/vmStructs_linux_loongarch.hpp @@ -0,0 +1,55 @@ @@ -72651,7 +72711,7 @@ index 00000000000..a39cb79bb1e +#endif // OS_CPU_LINUX_LOONGARCH_VMSTRUCTS_LINUX_LOONGARCH_HPP diff --git a/src/hotspot/os_cpu/linux_loongarch/vm_version_linux_loongarch.cpp b/src/hotspot/os_cpu/linux_loongarch/vm_version_linux_loongarch.cpp new file mode 100644 -index 00000000000..3711a7036a1 +index 000000000..3711a7036 --- /dev/null +++ b/src/hotspot/os_cpu/linux_loongarch/vm_version_linux_loongarch.cpp @@ -0,0 +1,95 @@ @@ -72751,7 +72811,7 @@ index 00000000000..3711a7036a1 + HWCAP_LOONGARCH_LBT_MIPS); +} diff --git a/src/hotspot/share/adlc/formssel.cpp b/src/hotspot/share/adlc/formssel.cpp -index be4ee3a3acf..9eb3b3a9dc7 100644 +index be4ee3a3a..9eb3b3a9d 100644 --- a/src/hotspot/share/adlc/formssel.cpp +++ b/src/hotspot/share/adlc/formssel.cpp @@ -22,6 +22,12 @@ @@ -72776,7 +72836,7 @@ index be4ee3a3acf..9eb3b3a9dc7 100644 } diff --git a/src/hotspot/share/c1/c1_Compiler.cpp b/src/hotspot/share/c1/c1_Compiler.cpp -index 22299b4051b..573ce8ff7b0 100644 +index 22299b405..573ce8ff7 100644 --- a/src/hotspot/share/c1/c1_Compiler.cpp +++ b/src/hotspot/share/c1/c1_Compiler.cpp @@ -43,6 +43,12 @@ @@ -72802,7 +72862,7 @@ index 22299b4051b..573ce8ff7b0 100644 case vmIntrinsics::_updateDirectByteBufferCRC32C: #endif diff --git a/src/hotspot/share/c1/c1_LIR.cpp b/src/hotspot/share/c1/c1_LIR.cpp -index dee208c11be..c147ee8f66a 100644 +index dee208c11..c147ee8f6 100644 --- a/src/hotspot/share/c1/c1_LIR.cpp +++ b/src/hotspot/share/c1/c1_LIR.cpp @@ -22,6 +22,12 @@ @@ -72879,7 +72939,7 @@ index dee208c11be..c147ee8f66a 100644 void LIR_OpConvert::print_bytecode(outputStream* out, Bytecodes::Code code) { diff --git a/src/hotspot/share/c1/c1_LIR.hpp b/src/hotspot/share/c1/c1_LIR.hpp -index 6f527135fbe..2e2910bdb5c 100644 +index 6f527135f..2e2910bdb 100644 --- a/src/hotspot/share/c1/c1_LIR.hpp +++ b/src/hotspot/share/c1/c1_LIR.hpp @@ -22,6 +22,12 @@ @@ -72964,7 +73024,7 @@ index 6f527135fbe..2e2910bdb5c 100644 void call_runtime_leaf(address routine, LIR_Opr tmp, LIR_Opr result, LIR_OprList* arguments) { append(new LIR_OpRTCall(routine, tmp, result, arguments)); diff --git a/src/hotspot/share/c1/c1_LinearScan.cpp b/src/hotspot/share/c1/c1_LinearScan.cpp -index 0634d970c26..f7797935846 100644 +index 0634d970c..f77979358 100644 --- a/src/hotspot/share/c1/c1_LinearScan.cpp +++ b/src/hotspot/share/c1/c1_LinearScan.cpp @@ -22,6 +22,12 @@ @@ -73051,7 +73111,7 @@ index 0634d970c26..f7797935846 100644 } } diff --git a/src/hotspot/share/code/vtableStubs.cpp b/src/hotspot/share/code/vtableStubs.cpp -index eed3dc8e787..c8b58dd459c 100644 +index eed3dc8e7..c8b58dd45 100644 --- a/src/hotspot/share/code/vtableStubs.cpp +++ b/src/hotspot/share/code/vtableStubs.cpp @@ -22,6 +22,12 @@ @@ -73080,7 +73140,7 @@ index eed3dc8e787..c8b58dd459c 100644 #else // These values are good for the non-PRODUCT case (when tracing can be switched on). diff --git a/src/hotspot/share/gc/g1/g1Arguments.cpp b/src/hotspot/share/gc/g1/g1Arguments.cpp -index 28f850938c4..626bfee16a9 100644 +index 28f850938..626bfee16 100644 --- a/src/hotspot/share/gc/g1/g1Arguments.cpp +++ b/src/hotspot/share/gc/g1/g1Arguments.cpp @@ -23,6 +23,12 @@ @@ -73118,7 +73178,7 @@ index 28f850938c4..626bfee16a9 100644 if (ParallelGCThreads == 0) { assert(!FLAG_IS_DEFAULT(ParallelGCThreads), "The default value for ParallelGCThreads should not be 0."); diff --git a/src/hotspot/share/gc/g1/g1ParScanThreadState.inline.hpp b/src/hotspot/share/gc/g1/g1ParScanThreadState.inline.hpp -index 41553e6bf19..d426a240c7e 100644 +index 41553e6bf..d426a240c 100644 --- a/src/hotspot/share/gc/g1/g1ParScanThreadState.inline.hpp +++ b/src/hotspot/share/gc/g1/g1ParScanThreadState.inline.hpp @@ -22,6 +22,12 @@ @@ -73145,7 +73205,7 @@ index 41553e6bf19..d426a240c7e 100644 } diff --git a/src/hotspot/share/gc/parallel/parallelArguments.cpp b/src/hotspot/share/gc/parallel/parallelArguments.cpp -index 468dc7bdfaf..c331cbf2be6 100644 +index 468dc7bdf..c331cbf2b 100644 --- a/src/hotspot/share/gc/parallel/parallelArguments.cpp +++ b/src/hotspot/share/gc/parallel/parallelArguments.cpp @@ -23,6 +23,12 @@ @@ -73175,7 +73235,7 @@ index 468dc7bdfaf..c331cbf2be6 100644 // of the physical memory, up to a maximum of 1GB. FLAG_SET_DEFAULT(ParallelGCThreads, diff --git a/src/hotspot/share/gc/shared/barrierSetNMethod.cpp b/src/hotspot/share/gc/shared/barrierSetNMethod.cpp -index adf0527681b..a1a76917f39 100644 +index adf052768..a1a76917f 100644 --- a/src/hotspot/share/gc/shared/barrierSetNMethod.cpp +++ b/src/hotspot/share/gc/shared/barrierSetNMethod.cpp @@ -22,6 +22,12 @@ @@ -73201,7 +73261,7 @@ index adf0527681b..a1a76917f39 100644 // the counter won't overflow. BarrierSetAssembler::clear_patching_epoch(); diff --git a/src/hotspot/share/gc/shared/c2/barrierSetC2.cpp b/src/hotspot/share/gc/shared/c2/barrierSetC2.cpp -index 41bd15ab000..508e37fa2c4 100644 +index 41bd15ab0..508e37fa2 100644 --- a/src/hotspot/share/gc/shared/c2/barrierSetC2.cpp +++ b/src/hotspot/share/gc/shared/c2/barrierSetC2.cpp @@ -22,6 +22,12 @@ @@ -73241,7 +73301,7 @@ index 41bd15ab000..508e37fa2c4 100644 } } diff --git a/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp b/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp -index 7d31ff02e1a..07dac06aecf 100644 +index 7d31ff02e..07dac06ae 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp @@ -22,6 +22,12 @@ @@ -73267,7 +73327,7 @@ index 7d31ff02e1a..07dac06aecf 100644 #endif diff --git a/src/hotspot/share/gc/z/c1/zBarrierSetC1.cpp b/src/hotspot/share/gc/z/c1/zBarrierSetC1.cpp -index aefec771871..95c0b16d8c6 100644 +index aefec7718..95c0b16d8 100644 --- a/src/hotspot/share/gc/z/c1/zBarrierSetC1.cpp +++ b/src/hotspot/share/gc/z/c1/zBarrierSetC1.cpp @@ -21,6 +21,12 @@ @@ -73315,7 +73375,7 @@ index aefec771871..95c0b16d8c6 100644 return result; } diff --git a/src/hotspot/share/gc/z/zStoreBarrierBuffer.hpp b/src/hotspot/share/gc/z/zStoreBarrierBuffer.hpp -index f917a6c3e7b..a851a673f98 100644 +index f917a6c3e..a851a673f 100644 --- a/src/hotspot/share/gc/z/zStoreBarrierBuffer.hpp +++ b/src/hotspot/share/gc/z/zStoreBarrierBuffer.hpp @@ -21,6 +21,12 @@ @@ -73343,7 +73403,7 @@ index f917a6c3e7b..a851a673f98 100644 ZStoreBarrierEntry _buffer[_buffer_length]; diff --git a/src/hotspot/share/interpreter/interpreterRuntime.cpp b/src/hotspot/share/interpreter/interpreterRuntime.cpp -index ddb6ca32108..0365b9023a0 100644 +index ddb6ca321..0365b9023 100644 --- a/src/hotspot/share/interpreter/interpreterRuntime.cpp +++ b/src/hotspot/share/interpreter/interpreterRuntime.cpp @@ -22,6 +22,12 @@ @@ -73369,7 +73429,7 @@ index ddb6ca32108..0365b9023a0 100644 assert(current == JavaThread::current(), "pre-condition"); if (src_address == dest_address) { diff --git a/src/hotspot/share/interpreter/interpreterRuntime.hpp b/src/hotspot/share/interpreter/interpreterRuntime.hpp -index 97cfcb1eae6..622e49f2f77 100644 +index 97cfcb1ea..622e49f2f 100644 --- a/src/hotspot/share/interpreter/interpreterRuntime.hpp +++ b/src/hotspot/share/interpreter/interpreterRuntime.hpp @@ -22,6 +22,12 @@ @@ -73395,7 +73455,7 @@ index 97cfcb1eae6..622e49f2f77 100644 static void popframe_move_outgoing_args(JavaThread* current, void* src_address, void* dest_address); #endif diff --git a/src/hotspot/share/interpreter/templateInterpreterGenerator.hpp b/src/hotspot/share/interpreter/templateInterpreterGenerator.hpp -index bcccff2fe82..5c836ab5114 100644 +index bcccff2fe..5c836ab51 100644 --- a/src/hotspot/share/interpreter/templateInterpreterGenerator.hpp +++ b/src/hotspot/share/interpreter/templateInterpreterGenerator.hpp @@ -22,6 +22,12 @@ @@ -73424,7 +73484,7 @@ index bcccff2fe82..5c836ab5114 100644 #ifdef ARM32 void generate_math_runtime_call(AbstractInterpreter::MethodKind kind); diff --git a/src/hotspot/share/jfr/utilities/jfrBigEndian.hpp b/src/hotspot/share/jfr/utilities/jfrBigEndian.hpp -index b3a3600deb6..59fd9d3416f 100644 +index b3a3600de..59fd9d341 100644 --- a/src/hotspot/share/jfr/utilities/jfrBigEndian.hpp +++ b/src/hotspot/share/jfr/utilities/jfrBigEndian.hpp @@ -22,6 +22,12 @@ @@ -73450,7 +73510,7 @@ index b3a3600deb6..59fd9d3416f 100644 #else #warning "Unconfigured platform" diff --git a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp -index a4195a04f18..9394ed12b81 100644 +index a4195a04f..9394ed12b 100644 --- a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp +++ b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp @@ -22,6 +22,12 @@ @@ -73485,7 +73545,7 @@ index a4195a04f18..9394ed12b81 100644 #define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \ diff --git a/src/hotspot/share/memory/metaspace.cpp b/src/hotspot/share/memory/metaspace.cpp -index f3008084254..5780d3f3ad6 100644 +index f30080842..5780d3f3a 100644 --- a/src/hotspot/share/memory/metaspace.cpp +++ b/src/hotspot/share/memory/metaspace.cpp @@ -23,6 +23,12 @@ @@ -73537,7 +73597,7 @@ index f3008084254..5780d3f3ad6 100644 #endif // _LP64 diff --git a/src/hotspot/share/oops/stackChunkOop.inline.hpp b/src/hotspot/share/oops/stackChunkOop.inline.hpp -index 9bde7e255d2..8ac313e6b1d 100644 +index eac86b8d0..0c5ecb7c6 100644 --- a/src/hotspot/share/oops/stackChunkOop.inline.hpp +++ b/src/hotspot/share/oops/stackChunkOop.inline.hpp @@ -22,6 +22,12 @@ @@ -73553,7 +73613,7 @@ index 9bde7e255d2..8ac313e6b1d 100644 #ifndef SHARE_OOPS_STACKCHUNKOOP_INLINE_HPP #define SHARE_OOPS_STACKCHUNKOOP_INLINE_HPP -@@ -336,7 +342,7 @@ inline void stackChunkOopDesc::copy_from_stack_to_chunk(intptr_t* from, intptr_t +@@ -337,7 +343,7 @@ inline void stackChunkOopDesc::copy_from_stack_to_chunk(intptr_t* from, intptr_t assert(to >= start_address(), "Chunk underflow"); assert(to + size <= end_address(), "Chunk overflow"); @@ -73562,7 +73622,7 @@ index 9bde7e255d2..8ac313e6b1d 100644 // Suppress compilation warning-as-error on unimplemented architectures // that stub out arch-specific methods. Some compilers are smart enough // to figure out the argument is always null and then warn about it. -@@ -355,7 +361,7 @@ inline void stackChunkOopDesc::copy_from_chunk_to_stack(intptr_t* from, intptr_t +@@ -356,7 +362,7 @@ inline void stackChunkOopDesc::copy_from_chunk_to_stack(intptr_t* from, intptr_t assert(from >= start_address(), ""); assert(from + size <= end_address(), ""); @@ -73572,7 +73632,7 @@ index 9bde7e255d2..8ac313e6b1d 100644 // that stub out arch-specific methods. Some compilers are smart enough // to figure out the argument is always null and then warn about it. diff --git a/src/hotspot/share/opto/classes.hpp b/src/hotspot/share/opto/classes.hpp -index 892ccc6b8ab..6c1b9affcbe 100644 +index 892ccc6b8..6c1b9affc 100644 --- a/src/hotspot/share/opto/classes.hpp +++ b/src/hotspot/share/opto/classes.hpp @@ -22,6 +22,12 @@ @@ -73597,7 +73657,7 @@ index 892ccc6b8ab..6c1b9affcbe 100644 macro(MinI) macro(MinL) diff --git a/src/hotspot/share/opto/compile.cpp b/src/hotspot/share/opto/compile.cpp -index 22817951242..ccb24de6741 100644 +index def117afb..a2fca2de3 100644 --- a/src/hotspot/share/opto/compile.cpp +++ b/src/hotspot/share/opto/compile.cpp @@ -22,6 +22,12 @@ @@ -73613,7 +73673,7 @@ index 22817951242..ccb24de6741 100644 #include "precompiled.hpp" #include "asm/macroAssembler.hpp" #include "asm/macroAssembler.inline.hpp" -@@ -3753,6 +3759,7 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f +@@ -3760,6 +3766,7 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f n->set_req(MemBarNode::Precedent, top()); } break; @@ -73622,7 +73682,7 @@ index 22817951242..ccb24de6741 100644 if (n->as_MemBar()->trailing_load() && n->req() > MemBarNode::Precedent) { // At parse time, the trailing MemBarAcquire for a volatile load diff --git a/src/hotspot/share/opto/memnode.cpp b/src/hotspot/share/opto/memnode.cpp -index 89a064a03b7..6746c08498e 100644 +index d5c02b474..e0c5fa88f 100644 --- a/src/hotspot/share/opto/memnode.cpp +++ b/src/hotspot/share/opto/memnode.cpp @@ -22,6 +22,12 @@ @@ -73638,7 +73698,7 @@ index 89a064a03b7..6746c08498e 100644 #include "precompiled.hpp" #include "classfile/javaClasses.hpp" #include "compiler/compileLog.hpp" -@@ -3281,6 +3287,7 @@ MemBarNode* MemBarNode::make(Compile* C, int opcode, int atp, Node* pn) { +@@ -3318,6 +3324,7 @@ MemBarNode* MemBarNode::make(Compile* C, int opcode, int atp, Node* pn) { case Op_MemBarReleaseLock: return new MemBarReleaseLockNode(C, atp, pn); case Op_MemBarVolatile: return new MemBarVolatileNode(C, atp, pn); case Op_MemBarCPUOrder: return new MemBarCPUOrderNode(C, atp, pn); @@ -73647,7 +73707,7 @@ index 89a064a03b7..6746c08498e 100644 case Op_Initialize: return new InitializeNode(C, atp, pn); default: ShouldNotReachHere(); return nullptr; diff --git a/src/hotspot/share/opto/memnode.hpp b/src/hotspot/share/opto/memnode.hpp -index e511d64ca6f..23bc631434e 100644 +index f12e08f8f..d231fddd4 100644 --- a/src/hotspot/share/opto/memnode.hpp +++ b/src/hotspot/share/opto/memnode.hpp @@ -22,6 +22,12 @@ @@ -73663,7 +73723,7 @@ index e511d64ca6f..23bc631434e 100644 #ifndef SHARE_OPTO_MEMNODE_HPP #define SHARE_OPTO_MEMNODE_HPP -@@ -1289,6 +1295,14 @@ public: +@@ -1293,6 +1299,14 @@ public: virtual uint ideal_reg() const { return 0; } // not matched in the AD file }; @@ -73679,7 +73739,7 @@ index e511d64ca6f..23bc631434e 100644 public: OnSpinWaitNode(Compile* C, int alias_idx, Node* precedent) diff --git a/src/hotspot/share/opto/output.cpp b/src/hotspot/share/opto/output.cpp -index 998be5e1225..c7c8db1dd4e 100644 +index 988e6e42b..3edac67f0 100644 --- a/src/hotspot/share/opto/output.cpp +++ b/src/hotspot/share/opto/output.cpp @@ -22,6 +22,12 @@ @@ -73695,7 +73755,7 @@ index 998be5e1225..c7c8db1dd4e 100644 #include "precompiled.hpp" #include "asm/assembler.inline.hpp" #include "asm/macroAssembler.inline.hpp" -@@ -1616,6 +1622,22 @@ void PhaseOutput::fill_buffer(CodeBuffer* cb, uint* blk_starts) { +@@ -1621,6 +1627,22 @@ void PhaseOutput::fill_buffer(CodeBuffer* cb, uint* blk_starts) { DEBUG_ONLY(uint instr_offset = cb->insts_size()); n->emit(*cb, C->regalloc()); current_offset = cb->insts_size(); @@ -73719,7 +73779,7 @@ index 998be5e1225..c7c8db1dd4e 100644 // Above we only verified that there is enough space in the instruction section. // However, the instruction may emit stubs that cause code buffer expansion. diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp -index 720a0e9ba29..6ae1766f7fa 100644 +index 720a0e9ba..6ae1766f7 100644 --- a/src/hotspot/share/runtime/arguments.cpp +++ b/src/hotspot/share/runtime/arguments.cpp @@ -22,6 +22,12 @@ @@ -73753,7 +73813,7 @@ index 720a0e9ba29..6ae1766f7fa 100644 jio_fprintf(defaultStream::error_stream(), "LockingMode == 0 (LM_MONITOR) is not fully implemented on this architecture"); diff --git a/src/hotspot/share/runtime/continuation.cpp b/src/hotspot/share/runtime/continuation.cpp -index 03c0af1a572..7e468def61d 100644 +index 03c0af1a5..7e468def6 100644 --- a/src/hotspot/share/runtime/continuation.cpp +++ b/src/hotspot/share/runtime/continuation.cpp @@ -22,6 +22,12 @@ @@ -73779,7 +73839,7 @@ index 03c0af1a572..7e468def61d 100644 #else frame sender = frame(); diff --git a/src/hotspot/share/runtime/continuationFreezeThaw.cpp b/src/hotspot/share/runtime/continuationFreezeThaw.cpp -index 0882bc933c2..d08380c4ca9 100644 +index 5de00b773..12c076f64 100644 --- a/src/hotspot/share/runtime/continuationFreezeThaw.cpp +++ b/src/hotspot/share/runtime/continuationFreezeThaw.cpp @@ -22,6 +22,12 @@ @@ -73795,7 +73855,7 @@ index 0882bc933c2..d08380c4ca9 100644 #include "precompiled.hpp" #include "classfile/javaClasses.inline.hpp" #include "classfile/vmSymbols.hpp" -@@ -774,7 +780,7 @@ frame FreezeBase::freeze_start_frame_yield_stub(frame f) { +@@ -799,7 +805,7 @@ frame FreezeBase::freeze_start_frame_yield_stub(frame f) { } frame FreezeBase::freeze_start_frame_safepoint_stub(frame f) { @@ -73804,7 +73864,7 @@ index 0882bc933c2..d08380c4ca9 100644 f.set_fp(f.real_fp()); // f.set_fp(*Frame::callee_link_address(f)); // ???? #else Unimplemented(); -@@ -832,7 +838,7 @@ inline freeze_result FreezeBase::recurse_freeze_java_frame(const frame& f, frame +@@ -857,7 +863,7 @@ inline freeze_result FreezeBase::recurse_freeze_java_frame(const frame& f, frame _freeze_size += fsize; NOT_PRODUCT(_frames++;) @@ -73813,7 +73873,7 @@ index 0882bc933c2..d08380c4ca9 100644 // We don't use FKind::frame_bottom(f) == _bottom_address because on x64 there's sometimes an extra word between // enterSpecial and an interpreted frame -@@ -1603,7 +1609,7 @@ static freeze_result is_pinned0(JavaThread* thread, oop cont_scope, bool safepoi +@@ -1630,7 +1636,7 @@ static freeze_result is_pinned0(JavaThread* thread, oop cont_scope, bool safepoi if (!safepoint) { f = f.sender(&map); // this is the yield frame } else { // safepoint yield @@ -73822,7 +73882,7 @@ index 0882bc933c2..d08380c4ca9 100644 f.set_fp(f.real_fp()); // Instead of this, maybe in ContinuationWrapper::set_last_frame always use the real_fp? #else Unimplemented(); -@@ -2234,8 +2240,8 @@ void ThawBase::recurse_thaw_compiled_frame(const frame& hf, frame& caller, int n +@@ -2269,8 +2275,8 @@ void ThawBase::recurse_thaw_compiled_frame(const frame& hf, frame& caller, int n // If we're the bottom-most thawed frame, we're writing to within one word from entrySP // (we might have one padding word for alignment) @@ -73834,7 +73894,7 @@ index 0882bc933c2..d08380c4ca9 100644 copy_from_chunk(from, to, sz); // copying good oops because we invoked barriers above diff --git a/src/hotspot/share/runtime/javaThread.inline.hpp b/src/hotspot/share/runtime/javaThread.inline.hpp -index 7b1ad7e17e1..c7a0246e375 100644 +index 7b1ad7e17..c7a0246e3 100644 --- a/src/hotspot/share/runtime/javaThread.inline.hpp +++ b/src/hotspot/share/runtime/javaThread.inline.hpp @@ -23,6 +23,12 @@ @@ -73869,7 +73929,7 @@ index 7b1ad7e17e1..c7a0246e375 100644 // Threads::create_vm() for size checks. Atomic::release_store(&_thread_state, s); diff --git a/src/hotspot/share/runtime/objectMonitor.cpp b/src/hotspot/share/runtime/objectMonitor.cpp -index ee0f754b865..e29e7164181 100644 +index ee0f754b8..e29e71641 100644 --- a/src/hotspot/share/runtime/objectMonitor.cpp +++ b/src/hotspot/share/runtime/objectMonitor.cpp @@ -22,6 +22,12 @@ @@ -73904,7 +73964,7 @@ index ee0f754b865..e29e7164181 100644 assert(owner_raw() != current, "invariant"); assert(_Responsible != current, "invariant"); diff --git a/src/hotspot/share/runtime/os.cpp b/src/hotspot/share/runtime/os.cpp -index d27d34d7a81..6cb80af29e5 100644 +index cd0709a7b..0c40c2730 100644 --- a/src/hotspot/share/runtime/os.cpp +++ b/src/hotspot/share/runtime/os.cpp @@ -22,6 +22,12 @@ @@ -73920,7 +73980,7 @@ index d27d34d7a81..6cb80af29e5 100644 #include "precompiled.hpp" #include "classfile/javaClasses.hpp" #include "classfile/moduleEntry.hpp" -@@ -1265,7 +1271,8 @@ bool os::is_first_C_frame(frame* fr) { +@@ -1311,7 +1317,8 @@ bool os::is_first_C_frame(frame* fr) { if ((uintptr_t)fr->sender_sp() == (uintptr_t)-1 || is_pointer_bad(fr->sender_sp())) return true; uintptr_t old_fp = (uintptr_t)fr->link_or_null(); @@ -73931,7 +73991,7 @@ index d27d34d7a81..6cb80af29e5 100644 // stack grows downwards; if old_fp is below current fp or if the stack diff --git a/src/hotspot/share/runtime/sharedRuntime.cpp b/src/hotspot/share/runtime/sharedRuntime.cpp -index 6439a958ccb..622bb9dd8e1 100644 +index f8713f5bb..6e75e8f21 100644 --- a/src/hotspot/share/runtime/sharedRuntime.cpp +++ b/src/hotspot/share/runtime/sharedRuntime.cpp @@ -22,6 +22,12 @@ @@ -73957,7 +74017,7 @@ index 6439a958ccb..622bb9dd8e1 100644 // in the constant pool to ensure ordering between the barrier and oops // accesses. For native_wrappers we need a constant. diff --git a/src/hotspot/share/runtime/sharedRuntimeTrig.cpp b/src/hotspot/share/runtime/sharedRuntimeTrig.cpp -index fac76262f3c..f41cf843d31 100644 +index fac76262f..f41cf843d 100644 --- a/src/hotspot/share/runtime/sharedRuntimeTrig.cpp +++ b/src/hotspot/share/runtime/sharedRuntimeTrig.cpp @@ -22,6 +22,13 @@ @@ -73998,7 +74058,7 @@ index fac76262f3c..f41cf843d31 100644 static double __kernel_sin(double x, double y, int iy) { diff --git a/src/hotspot/share/runtime/synchronizer.cpp b/src/hotspot/share/runtime/synchronizer.cpp -index 6cdb95be2e6..44c93897852 100644 +index b5859ed27..312b68baf 100644 --- a/src/hotspot/share/runtime/synchronizer.cpp +++ b/src/hotspot/share/runtime/synchronizer.cpp @@ -22,6 +22,12 @@ @@ -74024,7 +74084,7 @@ index 6cdb95be2e6..44c93897852 100644 #else return false; diff --git a/src/hotspot/share/runtime/vmStructs.cpp b/src/hotspot/share/runtime/vmStructs.cpp -index d11af5cb5af..80f7ec0d827 100644 +index 827cb0cdf..0c1bc9041 100644 --- a/src/hotspot/share/runtime/vmStructs.cpp +++ b/src/hotspot/share/runtime/vmStructs.cpp @@ -22,6 +22,12 @@ @@ -74040,7 +74100,7 @@ index d11af5cb5af..80f7ec0d827 100644 #include "precompiled.hpp" #include "cds/filemap.hpp" #include "ci/ciField.hpp" -@@ -1566,6 +1572,7 @@ +@@ -1567,6 +1573,7 @@ declare_c2_type(StoreFenceNode, MemBarNode) \ declare_c2_type(MemBarVolatileNode, MemBarNode) \ declare_c2_type(MemBarCPUOrderNode, MemBarNode) \ @@ -74049,7 +74109,7 @@ index d11af5cb5af..80f7ec0d827 100644 declare_c2_type(BlackholeNode, MultiNode) \ declare_c2_type(InitializeNode, MemBarNode) \ diff --git a/src/hotspot/share/utilities/macros.hpp b/src/hotspot/share/utilities/macros.hpp -index 244b18ecdd4..cdb392b5ef2 100644 +index 244b18ecd..cdb392b5e 100644 --- a/src/hotspot/share/utilities/macros.hpp +++ b/src/hotspot/share/utilities/macros.hpp @@ -22,6 +22,12 @@ @@ -74085,7 +74145,7 @@ index 244b18ecdd4..cdb392b5ef2 100644 #ifndef PPC #define PPC diff --git a/src/java.base/share/classes/jdk/internal/foreign/CABI.java b/src/java.base/share/classes/jdk/internal/foreign/CABI.java -index d376a196333..5ceb511ec90 100644 +index d376a1963..5ceb511ec 100644 --- a/src/java.base/share/classes/jdk/internal/foreign/CABI.java +++ b/src/java.base/share/classes/jdk/internal/foreign/CABI.java @@ -23,6 +23,12 @@ @@ -74123,7 +74183,7 @@ index d376a196333..5ceb511ec90 100644 return FALLBACK; // fallback linker } diff --git a/src/java.base/share/classes/jdk/internal/foreign/abi/AbstractLinker.java b/src/java.base/share/classes/jdk/internal/foreign/abi/AbstractLinker.java -index 8a322cdcf7a..4ab3845d35e 100644 +index 8a322cdcf..4ab3845d3 100644 --- a/src/java.base/share/classes/jdk/internal/foreign/abi/AbstractLinker.java +++ b/src/java.base/share/classes/jdk/internal/foreign/abi/AbstractLinker.java @@ -22,6 +22,12 @@ @@ -74156,7 +74216,7 @@ index 8a322cdcf7a..4ab3845d35e 100644 public interface UpcallStubFactory { diff --git a/src/java.base/share/classes/jdk/internal/foreign/abi/SharedUtils.java b/src/java.base/share/classes/jdk/internal/foreign/abi/SharedUtils.java -index 92d10a1dbdf..40cc94cda13 100644 +index 92d10a1db..40cc94cda 100644 --- a/src/java.base/share/classes/jdk/internal/foreign/abi/SharedUtils.java +++ b/src/java.base/share/classes/jdk/internal/foreign/abi/SharedUtils.java @@ -22,6 +22,12 @@ @@ -74190,7 +74250,7 @@ index 92d10a1dbdf..40cc94cda13 100644 }; diff --git a/src/java.base/share/classes/jdk/internal/foreign/abi/loongarch64/LoongArch64Architecture.java b/src/java.base/share/classes/jdk/internal/foreign/abi/loongarch64/LoongArch64Architecture.java new file mode 100644 -index 00000000000..aec9e531708 +index 000000000..aec9e5317 --- /dev/null +++ b/src/java.base/share/classes/jdk/internal/foreign/abi/loongarch64/LoongArch64Architecture.java @@ -0,0 +1,179 @@ @@ -74375,7 +74435,7 @@ index 00000000000..aec9e531708 +} diff --git a/src/java.base/share/classes/jdk/internal/foreign/abi/loongarch64/linux/LinuxLoongArch64CallArranger.java b/src/java.base/share/classes/jdk/internal/foreign/abi/loongarch64/linux/LinuxLoongArch64CallArranger.java new file mode 100644 -index 00000000000..97e84a28b64 +index 000000000..97e84a28b --- /dev/null +++ b/src/java.base/share/classes/jdk/internal/foreign/abi/loongarch64/linux/LinuxLoongArch64CallArranger.java @@ -0,0 +1,472 @@ @@ -74853,7 +74913,7 @@ index 00000000000..97e84a28b64 +} diff --git a/src/java.base/share/classes/jdk/internal/foreign/abi/loongarch64/linux/LinuxLoongArch64Linker.java b/src/java.base/share/classes/jdk/internal/foreign/abi/loongarch64/linux/LinuxLoongArch64Linker.java new file mode 100644 -index 00000000000..c231a91b1bb +index 000000000..c231a91b1 --- /dev/null +++ b/src/java.base/share/classes/jdk/internal/foreign/abi/loongarch64/linux/LinuxLoongArch64Linker.java @@ -0,0 +1,65 @@ @@ -74924,7 +74984,7 @@ index 00000000000..c231a91b1bb +} diff --git a/src/java.base/share/classes/jdk/internal/foreign/abi/loongarch64/linux/TypeClass.java b/src/java.base/share/classes/jdk/internal/foreign/abi/loongarch64/linux/TypeClass.java new file mode 100644 -index 00000000000..117eb529434 +index 000000000..117eb5294 --- /dev/null +++ b/src/java.base/share/classes/jdk/internal/foreign/abi/loongarch64/linux/TypeClass.java @@ -0,0 +1,217 @@ @@ -75146,7 +75206,7 @@ index 00000000000..117eb529434 + } +} diff --git a/src/java.base/share/classes/jdk/internal/util/Architecture.java b/src/java.base/share/classes/jdk/internal/util/Architecture.java -index 5c861902743..f48d3a63204 100644 +index 5c8619027..f48d3a632 100644 --- a/src/java.base/share/classes/jdk/internal/util/Architecture.java +++ b/src/java.base/share/classes/jdk/internal/util/Architecture.java @@ -22,6 +22,14 @@ @@ -75165,7 +75225,7 @@ index 5c861902743..f48d3a63204 100644 import jdk.internal.vm.annotation.ForceInline; diff --git a/src/java.base/share/classes/jdk/internal/util/PlatformProps.java.template b/src/java.base/share/classes/jdk/internal/util/PlatformProps.java.template -index 9c2a2c84511..c0720ad7b9d 100644 +index 9c2a2c845..c0720ad7b 100644 --- a/src/java.base/share/classes/jdk/internal/util/PlatformProps.java.template +++ b/src/java.base/share/classes/jdk/internal/util/PlatformProps.java.template @@ -22,6 +22,14 @@ @@ -75184,7 +75244,7 @@ index 9c2a2c84511..c0720ad7b9d 100644 /** diff --git a/src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.cpp b/src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.cpp -index bebf8d0f05a..44d2a6342a1 100644 +index d2cfbf8e7..726170bd3 100644 --- a/src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.cpp +++ b/src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.cpp @@ -23,6 +23,13 @@ @@ -75221,7 +75281,7 @@ index bebf8d0f05a..44d2a6342a1 100644 extern "C" JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0 (JNIEnv *env, jobject this_obj, jint lwp_id) { -@@ -443,6 +454,9 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo +@@ -442,6 +453,9 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo #ifdef aarch64 #define NPRGREG sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext_NPRGREG #endif @@ -75231,7 +75291,7 @@ index bebf8d0f05a..44d2a6342a1 100644 #ifdef riscv64 #define NPRGREG sun_jvm_hotspot_debugger_riscv64_RISCV64ThreadContext_NPRGREG #endif -@@ -522,6 +536,18 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo +@@ -521,6 +535,18 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo } #endif /* aarch64 */ @@ -75251,7 +75311,7 @@ index bebf8d0f05a..44d2a6342a1 100644 #define REG_INDEX(reg) sun_jvm_hotspot_debugger_riscv64_RISCV64ThreadContext_##reg diff --git a/src/jdk.hotspot.agent/linux/native/libsaproc/libproc.h b/src/jdk.hotspot.agent/linux/native/libsaproc/libproc.h -index a69496e77a4..d2e77252769 100644 +index a69496e77..d2e772527 100644 --- a/src/jdk.hotspot.agent/linux/native/libsaproc/libproc.h +++ b/src/jdk.hotspot.agent/linux/native/libsaproc/libproc.h @@ -22,6 +22,13 @@ @@ -75278,7 +75338,7 @@ index a69496e77a4..d2e77252769 100644 #define user_regs_struct user_pt_regs #elif defined(arm) diff --git a/src/jdk.hotspot.agent/linux/native/libsaproc/ps_proc.c b/src/jdk.hotspot.agent/linux/native/libsaproc/ps_proc.c -index 3068f475626..d35cc73221f 100644 +index 3068f4756..d35cc7322 100644 --- a/src/jdk.hotspot.agent/linux/native/libsaproc/ps_proc.c +++ b/src/jdk.hotspot.agent/linux/native/libsaproc/ps_proc.c @@ -22,6 +22,12 @@ @@ -75304,7 +75364,7 @@ index 3068f475626..d35cc73221f 100644 print_debug("ptrace(PTRACE_GETREGS, ...) failed for lwp(%d) errno(%d) \"%s\"\n", pid, errno, strerror(errno)); diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HotSpotAgent.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HotSpotAgent.java -index 71ed978199c..194088c697a 100644 +index 71ed97819..194088c69 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HotSpotAgent.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HotSpotAgent.java @@ -23,6 +23,12 @@ @@ -75339,7 +75399,7 @@ index 71ed978199c..194088c697a 100644 machDesc = (MachineDescription) diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionLOONGARCH64.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionLOONGARCH64.java new file mode 100644 -index 00000000000..99cea8c7f14 +index 000000000..99cea8c7f --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionLOONGARCH64.java @@ -0,0 +1,41 @@ @@ -75385,7 +75445,7 @@ index 00000000000..99cea8c7f14 + } +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.java -index c100c160947..0b87e7922e7 100644 +index c100c1609..0b87e7922 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.java @@ -23,6 +23,12 @@ @@ -75433,7 +75493,7 @@ index c100c160947..0b87e7922e7 100644 Address sp = context.getRegisterAsAddress(PPC64ThreadContext.SP); if (sp == null) return null; diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxThreadContextFactory.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxThreadContextFactory.java -index 69a34fe2afa..da07fe91258 100644 +index 69a34fe2a..da07fe912 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxThreadContextFactory.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxThreadContextFactory.java @@ -22,6 +22,12 @@ @@ -75470,7 +75530,7 @@ index 69a34fe2afa..da07fe91258 100644 try { diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/loongarch64/LinuxLOONGARCH64CFrame.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/loongarch64/LinuxLOONGARCH64CFrame.java new file mode 100644 -index 00000000000..0e6caee5a49 +index 000000000..0e6caee5a --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/loongarch64/LinuxLOONGARCH64CFrame.java @@ -0,0 +1,92 @@ @@ -75568,7 +75628,7 @@ index 00000000000..0e6caee5a49 +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/loongarch64/LinuxLOONGARCH64ThreadContext.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/loongarch64/LinuxLOONGARCH64ThreadContext.java new file mode 100644 -index 00000000000..604642598e0 +index 000000000..604642598 --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/loongarch64/LinuxLOONGARCH64ThreadContext.java @@ -0,0 +1,47 @@ @@ -75621,7 +75681,7 @@ index 00000000000..604642598e0 +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/loongarch64/LOONGARCH64ThreadContext.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/loongarch64/LOONGARCH64ThreadContext.java new file mode 100644 -index 00000000000..1de3cb1a472 +index 000000000..1de3cb1a4 --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/loongarch64/LOONGARCH64ThreadContext.java @@ -0,0 +1,128 @@ @@ -75754,7 +75814,7 @@ index 00000000000..1de3cb1a472 + public abstract Address getRegisterAsAddress(int index); +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/posix/elf/ELFHeader.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/posix/elf/ELFHeader.java -index 7113a3a497b..de47531db7c 100644 +index 7113a3a49..de47531db 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/posix/elf/ELFHeader.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/posix/elf/ELFHeader.java @@ -22,6 +22,12 @@ @@ -75780,7 +75840,7 @@ index 7113a3a497b..de47531db7c 100644 /** Returns a file type which is defined by the file type constants. */ public short getFileType(); diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java -index d4a7c17dc85..1b3e5d5e971 100644 +index d4a7c17dc..1b3e5d5e9 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java @@ -22,6 +22,12 @@ @@ -75817,7 +75877,7 @@ index d4a7c17dc85..1b3e5d5e971 100644 Class tf = Class.forName("sun.jvm.hotspot.debugger.remote." + diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64Thread.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64Thread.java new file mode 100644 -index 00000000000..242dd279e1a +index 000000000..242dd279e --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64Thread.java @@ -0,0 +1,54 @@ @@ -75877,7 +75937,7 @@ index 00000000000..242dd279e1a +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64ThreadContext.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64ThreadContext.java new file mode 100644 -index 00000000000..634d5ad049f +index 000000000..634d5ad04 --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64ThreadContext.java @@ -0,0 +1,51 @@ @@ -75934,7 +75994,7 @@ index 00000000000..634d5ad049f +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64ThreadFactory.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64ThreadFactory.java new file mode 100644 -index 00000000000..4fb9cc7c069 +index 000000000..4fb9cc7c0 --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64ThreadFactory.java @@ -0,0 +1,45 @@ @@ -75984,7 +76044,7 @@ index 00000000000..4fb9cc7c069 + } +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Threads.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Threads.java -index a6f5da88ad4..2a220f9fd8b 100644 +index a6f5da88a..2a220f9fd 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Threads.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Threads.java @@ -22,6 +22,12 @@ @@ -76019,7 +76079,7 @@ index a6f5da88ad4..2a220f9fd8b 100644 access = (JavaThreadPDAccess) diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/linux_loongarch64/LinuxLOONGARCH64JavaThreadPDAccess.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/linux_loongarch64/LinuxLOONGARCH64JavaThreadPDAccess.java new file mode 100644 -index 00000000000..b92c8eca74b +index 000000000..b92c8eca7 --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/linux_loongarch64/LinuxLOONGARCH64JavaThreadPDAccess.java @@ -0,0 +1,139 @@ @@ -76164,7 +76224,7 @@ index 00000000000..b92c8eca74b +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64CurrentFrameGuess.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64CurrentFrameGuess.java new file mode 100644 -index 00000000000..824270e1329 +index 000000000..824270e13 --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64CurrentFrameGuess.java @@ -0,0 +1,250 @@ @@ -76420,7 +76480,7 @@ index 00000000000..824270e1329 +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64Frame.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64Frame.java new file mode 100644 -index 00000000000..9470781c48e +index 000000000..9470781c4 --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64Frame.java @@ -0,0 +1,540 @@ @@ -76966,7 +77026,7 @@ index 00000000000..9470781c48e +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64JavaCallWrapper.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64JavaCallWrapper.java new file mode 100644 -index 00000000000..0ad9573a42d +index 000000000..0ad9573a4 --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64JavaCallWrapper.java @@ -0,0 +1,59 @@ @@ -77031,7 +77091,7 @@ index 00000000000..0ad9573a42d +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64RegisterMap.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64RegisterMap.java new file mode 100644 -index 00000000000..2cf904d3885 +index 000000000..2cf904d38 --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64RegisterMap.java @@ -0,0 +1,52 @@ @@ -77088,7 +77148,7 @@ index 00000000000..2cf904d3885 + protected Address getLocationPD(VMReg reg) { return null; } +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java -index f4cd4873207..622ddb7349e 100644 +index f4cd48732..622ddb734 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java @@ -22,6 +22,13 @@ @@ -77126,7 +77186,7 @@ index f4cd4873207..622ddb7349e 100644 } diff --git a/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/loongarch64/LoongArch64HotSpotJVMCIBackendFactory.java b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/loongarch64/LoongArch64HotSpotJVMCIBackendFactory.java new file mode 100644 -index 00000000000..1f54e9f3c59 +index 000000000..1f54e9f3c --- /dev/null +++ b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/loongarch64/LoongArch64HotSpotJVMCIBackendFactory.java @@ -0,0 +1,142 @@ @@ -77274,7 +77334,7 @@ index 00000000000..1f54e9f3c59 +} diff --git a/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/loongarch64/LoongArch64HotSpotRegisterConfig.java b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/loongarch64/LoongArch64HotSpotRegisterConfig.java new file mode 100644 -index 00000000000..e1a007000d2 +index 000000000..e1a007000 --- /dev/null +++ b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/loongarch64/LoongArch64HotSpotRegisterConfig.java @@ -0,0 +1,297 @@ @@ -77577,7 +77637,7 @@ index 00000000000..e1a007000d2 +} diff --git a/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/loongarch64/LoongArch64HotSpotVMConfig.java b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/loongarch64/LoongArch64HotSpotVMConfig.java new file mode 100644 -index 00000000000..67173ecab48 +index 000000000..67173ecab --- /dev/null +++ b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/loongarch64/LoongArch64HotSpotVMConfig.java @@ -0,0 +1,79 @@ @@ -77662,7 +77722,7 @@ index 00000000000..67173ecab48 +} diff --git a/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/loongarch64/package-info.java b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/loongarch64/package-info.java new file mode 100644 -index 00000000000..74c6ca9801f +index 000000000..74c6ca980 --- /dev/null +++ b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/loongarch64/package-info.java @@ -0,0 +1,28 @@ @@ -77696,7 +77756,7 @@ index 00000000000..74c6ca9801f +package jdk.vm.ci.hotspot.loongarch64; diff --git a/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/loongarch64/LoongArch64.java b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/loongarch64/LoongArch64.java new file mode 100644 -index 00000000000..c178ec21529 +index 000000000..c178ec215 --- /dev/null +++ b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/loongarch64/LoongArch64.java @@ -0,0 +1,251 @@ @@ -77953,7 +78013,7 @@ index 00000000000..c178ec21529 +} diff --git a/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/loongarch64/LoongArch64Kind.java b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/loongarch64/LoongArch64Kind.java new file mode 100644 -index 00000000000..047a1dbbe36 +index 000000000..047a1dbbe --- /dev/null +++ b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/loongarch64/LoongArch64Kind.java @@ -0,0 +1,163 @@ @@ -78122,7 +78182,7 @@ index 00000000000..047a1dbbe36 +} diff --git a/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/loongarch64/package-info.java b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/loongarch64/package-info.java new file mode 100644 -index 00000000000..6df1b7b3a92 +index 000000000..6df1b7b3a --- /dev/null +++ b/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/loongarch64/package-info.java @@ -0,0 +1,28 @@ @@ -78155,7 +78215,7 @@ index 00000000000..6df1b7b3a92 + */ +package jdk.vm.ci.loongarch64; diff --git a/src/jdk.internal.vm.ci/share/classes/module-info.java b/src/jdk.internal.vm.ci/share/classes/module-info.java -index b4b93f6a747..68fa668e1bc 100644 +index b4b93f6a7..68fa668e1 100644 --- a/src/jdk.internal.vm.ci/share/classes/module-info.java +++ b/src/jdk.internal.vm.ci/share/classes/module-info.java @@ -23,6 +23,12 @@ @@ -78179,7 +78239,7 @@ index b4b93f6a747..68fa668e1bc 100644 jdk.vm.ci.hotspot.riscv64.RISCV64HotSpotJVMCIBackendFactory; } diff --git a/src/utils/hsdis/binutils/hsdis-binutils.c b/src/utils/hsdis/binutils/hsdis-binutils.c -index 279ed53ba5d..3281346aa23 100644 +index 279ed53ba..3281346aa 100644 --- a/src/utils/hsdis/binutils/hsdis-binutils.c +++ b/src/utils/hsdis/binutils/hsdis-binutils.c @@ -44,6 +44,12 @@ @@ -78206,7 +78266,7 @@ index 279ed53ba5d..3281346aa23 100644 if (res == NULL) res = "architecture not set in Makefile!"; diff --git a/test/hotspot/jtreg/compiler/arguments/TestCodeEntryAlignment.java b/test/hotspot/jtreg/compiler/arguments/TestCodeEntryAlignment.java -index 465999eac7f..ba9629d5e77 100644 +index 465999eac..ba9629d5e 100644 --- a/test/hotspot/jtreg/compiler/arguments/TestCodeEntryAlignment.java +++ b/test/hotspot/jtreg/compiler/arguments/TestCodeEntryAlignment.java @@ -22,12 +22,18 @@ @@ -78230,7 +78290,7 @@ index 465999eac7f..ba9629d5e77 100644 * @summary Test large CodeEntryAlignments are accepted * @run driver compiler.arguments.TestCodeEntryAlignment diff --git a/test/hotspot/jtreg/compiler/arraycopy/stress/TestStressArrayCopy.java b/test/hotspot/jtreg/compiler/arraycopy/stress/TestStressArrayCopy.java -index 55dfb0460a2..5f36747a394 100644 +index 55dfb0460..5f36747a3 100644 --- a/test/hotspot/jtreg/compiler/arraycopy/stress/TestStressArrayCopy.java +++ b/test/hotspot/jtreg/compiler/arraycopy/stress/TestStressArrayCopy.java @@ -21,6 +21,12 @@ @@ -78262,7 +78322,7 @@ index 55dfb0460a2..5f36747a394 100644 // Generic config. configs.add(new ArrayList()); diff --git a/test/hotspot/jtreg/compiler/c2/TestBit.java b/test/hotspot/jtreg/compiler/c2/TestBit.java -index a3c9421a3f9..aa02e31f712 100644 +index a3c9421a3..aa02e31f7 100644 --- a/test/hotspot/jtreg/compiler/c2/TestBit.java +++ b/test/hotspot/jtreg/compiler/c2/TestBit.java @@ -21,6 +21,12 @@ @@ -78288,7 +78348,7 @@ index a3c9421a3f9..aa02e31f712 100644 * * @run driver compiler.c2.TestBit diff --git a/test/hotspot/jtreg/compiler/c2/irTests/CmpUWithZero.java b/test/hotspot/jtreg/compiler/c2/irTests/CmpUWithZero.java -index f5b37f229d0..a0eddb2ef1f 100644 +index f5b37f229..a0eddb2ef 100644 --- a/test/hotspot/jtreg/compiler/c2/irTests/CmpUWithZero.java +++ b/test/hotspot/jtreg/compiler/c2/irTests/CmpUWithZero.java @@ -21,6 +21,12 @@ @@ -78314,7 +78374,7 @@ index f5b37f229d0..a0eddb2ef1f 100644 * @requires vm.compiler2.enabled * @run driver compiler.c2.irTests.CmpUWithZero diff --git a/test/hotspot/jtreg/compiler/c2/irTests/TestAutoVecCountingDownLoop.java b/test/hotspot/jtreg/compiler/c2/irTests/TestAutoVecCountingDownLoop.java -index 994ec1e9cc0..5669a094212 100644 +index 994ec1e9c..5669a0942 100644 --- a/test/hotspot/jtreg/compiler/c2/irTests/TestAutoVecCountingDownLoop.java +++ b/test/hotspot/jtreg/compiler/c2/irTests/TestAutoVecCountingDownLoop.java @@ -21,6 +21,12 @@ @@ -78340,7 +78400,7 @@ index 994ec1e9cc0..5669a094212 100644 * @run driver compiler.c2.irTests.TestAutoVecCountingDownLoop */ diff --git a/test/hotspot/jtreg/compiler/c2/irTests/TestIRAbs.java b/test/hotspot/jtreg/compiler/c2/irTests/TestIRAbs.java -index 8ba786d6f20..da9106bf92e 100644 +index 8ba786d6f..da9106bf9 100644 --- a/test/hotspot/jtreg/compiler/c2/irTests/TestIRAbs.java +++ b/test/hotspot/jtreg/compiler/c2/irTests/TestIRAbs.java @@ -21,6 +21,12 @@ @@ -78366,7 +78426,7 @@ index 8ba786d6f20..da9106bf92e 100644 * @run driver compiler.c2.irTests.TestIRAbs */ diff --git a/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizationNotRun.java b/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizationNotRun.java -index 5968b7221c7..6bcdf4d189d 100644 +index 5968b7221..6bcdf4d18 100644 --- a/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizationNotRun.java +++ b/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizationNotRun.java @@ -21,6 +21,12 @@ @@ -78392,7 +78452,7 @@ index 5968b7221c7..6bcdf4d189d 100644 * @library /test/lib / * @run driver compiler.c2.irTests.TestVectorizationNotRun diff --git a/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizeTypeConversion.java b/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizeTypeConversion.java -index 67c26ecbddf..ba69c910ce6 100644 +index 899be4bbc..3aefead5d 100644 --- a/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizeTypeConversion.java +++ b/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizeTypeConversion.java @@ -21,6 +21,12 @@ @@ -78418,7 +78478,7 @@ index 67c26ecbddf..ba69c910ce6 100644 * @run driver compiler.c2.irTests.TestVectorizeTypeConversion */ diff --git a/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizeURShiftSubword.java b/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizeURShiftSubword.java -index ebe3fe63ccf..04ea3cccdef 100644 +index ebe3fe63c..04ea3cccd 100644 --- a/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizeURShiftSubword.java +++ b/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizeURShiftSubword.java @@ -22,6 +22,12 @@ @@ -78444,7 +78504,7 @@ index ebe3fe63ccf..04ea3cccdef 100644 * @run driver compiler.c2.irTests.TestVectorizeURShiftSubword */ diff --git a/test/hotspot/jtreg/compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java b/test/hotspot/jtreg/compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java -index ac3a6d9a8c6..c17598902ff 100644 +index ac3a6d9a8..c17598902 100644 --- a/test/hotspot/jtreg/compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java +++ b/test/hotspot/jtreg/compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java @@ -21,12 +21,18 @@ @@ -78468,7 +78528,7 @@ index ac3a6d9a8c6..c17598902ff 100644 * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/timeout=600 -Xbootclasspath/a:. diff --git a/test/hotspot/jtreg/compiler/cpuflags/TestAESIntrinsicsOnUnsupportedConfig.java b/test/hotspot/jtreg/compiler/cpuflags/TestAESIntrinsicsOnUnsupportedConfig.java -index fdc8f63f9e0..993cf68d011 100644 +index fdc8f63f9..993cf68d0 100644 --- a/test/hotspot/jtreg/compiler/cpuflags/TestAESIntrinsicsOnUnsupportedConfig.java +++ b/test/hotspot/jtreg/compiler/cpuflags/TestAESIntrinsicsOnUnsupportedConfig.java @@ -21,6 +21,12 @@ @@ -78493,35 +78553,8 @@ index fdc8f63f9e0..993cf68d011 100644 * @requires vm.compiler1.enabled | !vm.graal.enabled * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -diff --git a/test/hotspot/jtreg/compiler/intrinsics/TestBitShuffleOpers.java b/test/hotspot/jtreg/compiler/intrinsics/TestBitShuffleOpers.java -index 46469777771..9be18a981ff 100644 ---- a/test/hotspot/jtreg/compiler/intrinsics/TestBitShuffleOpers.java -+++ b/test/hotspot/jtreg/compiler/intrinsics/TestBitShuffleOpers.java -@@ -21,6 +21,12 @@ - * questions. - */ - -+/* -+ * This file has been modified by Loongson Technology in 2023, These -+ * modifications are Copyright (c) 2023, Loongson Technology, and are made -+ * available on the same license terms set forth above. -+ */ -+ - /** - * @test - * @bug 8283894 -@@ -31,7 +37,8 @@ - * (vm.cpu.features ~= ".*bmi2.*" & vm.cpu.features ~= ".*bmi1.*" & - * vm.cpu.features ~= ".*sse2.*")) | - * ((vm.opt.UseSVE == "null" | vm.opt.UseSVE > 1) & -- * os.arch=="aarch64" & vm.cpu.features ~= ".*svebitperm.*")) -+ * os.arch=="aarch64" & vm.cpu.features ~= ".*svebitperm.*") | -+ * os.arch=="loongarch64") - * @library /test/lib / - * @run driver compiler.intrinsics.TestBitShuffleOpers - */ diff --git a/test/hotspot/jtreg/compiler/intrinsics/TestCompareUnsigned.java b/test/hotspot/jtreg/compiler/intrinsics/TestCompareUnsigned.java -index 6d1943ca145..1d80230aa42 100644 +index 6d1943ca1..1d80230aa 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/TestCompareUnsigned.java +++ b/test/hotspot/jtreg/compiler/intrinsics/TestCompareUnsigned.java @@ -20,6 +20,13 @@ @@ -78548,7 +78581,7 @@ index 6d1943ca145..1d80230aa42 100644 * @library /test/lib / * @run driver compiler.intrinsics.TestCompareUnsigned diff --git a/test/hotspot/jtreg/compiler/intrinsics/TestDoubleIsFinite.java b/test/hotspot/jtreg/compiler/intrinsics/TestDoubleIsFinite.java -index ab06e07a482..a6ca357dc92 100644 +index ab06e07a4..a6ca357dc 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/TestDoubleIsFinite.java +++ b/test/hotspot/jtreg/compiler/intrinsics/TestDoubleIsFinite.java @@ -22,10 +22,16 @@ @@ -78570,7 +78603,7 @@ index ab06e07a482..a6ca357dc92 100644 * @run driver compiler.intrinsics.TestDoubleIsFinite */ diff --git a/test/hotspot/jtreg/compiler/intrinsics/TestDoubleIsInfinite.java b/test/hotspot/jtreg/compiler/intrinsics/TestDoubleIsInfinite.java -index b35b6cda3d2..630566360ac 100644 +index b35b6cda3..630566360 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/TestDoubleIsInfinite.java +++ b/test/hotspot/jtreg/compiler/intrinsics/TestDoubleIsInfinite.java @@ -22,10 +22,16 @@ @@ -78592,7 +78625,7 @@ index b35b6cda3d2..630566360ac 100644 * @run driver compiler.intrinsics.TestDoubleIsInfinite */ diff --git a/test/hotspot/jtreg/compiler/intrinsics/TestFloatIsFinite.java b/test/hotspot/jtreg/compiler/intrinsics/TestFloatIsFinite.java -index 7fb0bebc516..e61f2febfcf 100644 +index 7fb0bebc5..e61f2febf 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/TestFloatIsFinite.java +++ b/test/hotspot/jtreg/compiler/intrinsics/TestFloatIsFinite.java @@ -22,10 +22,16 @@ @@ -78614,7 +78647,7 @@ index 7fb0bebc516..e61f2febfcf 100644 * @run driver compiler.intrinsics.TestFloatIsFinite */ diff --git a/test/hotspot/jtreg/compiler/intrinsics/TestFloatIsInfinite.java b/test/hotspot/jtreg/compiler/intrinsics/TestFloatIsInfinite.java -index 54fa7657851..ec35129aae8 100644 +index 54fa76578..ec35129aa 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/TestFloatIsInfinite.java +++ b/test/hotspot/jtreg/compiler/intrinsics/TestFloatIsInfinite.java @@ -22,10 +22,16 @@ @@ -78636,7 +78669,7 @@ index 54fa7657851..ec35129aae8 100644 * @run driver compiler.intrinsics.TestFloatIsInfinite */ diff --git a/test/hotspot/jtreg/compiler/intrinsics/TestIntegerUnsignedDivMod.java b/test/hotspot/jtreg/compiler/intrinsics/TestIntegerUnsignedDivMod.java -index 1b214c32391..5f997a72c4a 100644 +index 9c82f5e75..69c92192e 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/TestIntegerUnsignedDivMod.java +++ b/test/hotspot/jtreg/compiler/intrinsics/TestIntegerUnsignedDivMod.java @@ -21,10 +21,16 @@ @@ -78651,14 +78684,14 @@ index 1b214c32391..5f997a72c4a 100644 + /** * @test - * @summary Test x86_64 intrinsic for divideUnsigned() and remainderUnsigned() methods for Integer --* @requires os.arch=="amd64" | os.arch=="x86_64" -+* @requires os.arch=="amd64" | os.arch=="x86_64" | os.arch=="loongarch64" + * @summary Test intrinsic for divideUnsigned() and remainderUnsigned() methods for Integer +-* @requires os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64" ++* @requires os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64" | os.arch=="loongarch64" * @library /test/lib / * @run driver compiler.intrinsics.TestIntegerUnsignedDivMod */ diff --git a/test/hotspot/jtreg/compiler/intrinsics/TestLongUnsignedDivMod.java b/test/hotspot/jtreg/compiler/intrinsics/TestLongUnsignedDivMod.java -index ee9c6499902..32b1d54a3e3 100644 +index 694860a2d..b2021b0b1 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/TestLongUnsignedDivMod.java +++ b/test/hotspot/jtreg/compiler/intrinsics/TestLongUnsignedDivMod.java @@ -21,10 +21,16 @@ @@ -78673,14 +78706,14 @@ index ee9c6499902..32b1d54a3e3 100644 + /** * @test - * @summary Test x86_64 intrinsic for divideUnsigned() and remainderUnsigned() methods for Long --* @requires os.arch=="amd64" | os.arch=="x86_64" -+* @requires os.arch=="amd64" | os.arch=="x86_64" | os.arch=="loongarch64" + * @summary Test intrinsic for divideUnsigned() and remainderUnsigned() methods for Long +-* @requires os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64" ++* @requires os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64" | os.arch=="loongarch64" * @library /test/lib / * @run driver compiler.intrinsics.TestLongUnsignedDivMod */ diff --git a/test/hotspot/jtreg/compiler/intrinsics/chacha/TestChaCha20.java b/test/hotspot/jtreg/compiler/intrinsics/chacha/TestChaCha20.java -index c2275f6563e..b94e05fc1ff 100644 +index c2275f656..b94e05fc1 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/chacha/TestChaCha20.java +++ b/test/hotspot/jtreg/compiler/intrinsics/chacha/TestChaCha20.java @@ -22,6 +22,12 @@ @@ -78710,7 +78743,7 @@ index c2275f6563e..b94e05fc1ff 100644 // We only have ChaCha20 intrinsics on x64 and aarch64 // currently. If the platform is neither of these then diff --git a/test/hotspot/jtreg/compiler/intrinsics/float16/Binary16Conversion.java b/test/hotspot/jtreg/compiler/intrinsics/float16/Binary16Conversion.java -index 0541121c127..d9fe8c91dc4 100644 +index 0541121c1..d9fe8c91d 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/float16/Binary16Conversion.java +++ b/test/hotspot/jtreg/compiler/intrinsics/float16/Binary16Conversion.java @@ -21,11 +21,17 @@ @@ -78733,7 +78766,7 @@ index 0541121c127..d9fe8c91dc4 100644 * @requires vm.compMode != "Xcomp" * @comment default run diff --git a/test/hotspot/jtreg/compiler/intrinsics/float16/Binary16ConversionNaN.java b/test/hotspot/jtreg/compiler/intrinsics/float16/Binary16ConversionNaN.java -index 38060dfb504..151caa94346 100644 +index 38060dfb5..151caa943 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/float16/Binary16ConversionNaN.java +++ b/test/hotspot/jtreg/compiler/intrinsics/float16/Binary16ConversionNaN.java @@ -21,11 +21,17 @@ @@ -78756,7 +78789,7 @@ index 38060dfb504..151caa94346 100644 * @requires vm.compMode != "Xcomp" * @library /test/lib / diff --git a/test/hotspot/jtreg/compiler/intrinsics/float16/TestAllFloat16ToFloat.java b/test/hotspot/jtreg/compiler/intrinsics/float16/TestAllFloat16ToFloat.java -index 492901f0046..e95554fa944 100644 +index 492901f00..e95554fa9 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/float16/TestAllFloat16ToFloat.java +++ b/test/hotspot/jtreg/compiler/intrinsics/float16/TestAllFloat16ToFloat.java @@ -21,11 +21,17 @@ @@ -78779,7 +78812,7 @@ index 492901f0046..e95554fa944 100644 * @requires vm.compMode != "Xcomp" * @comment default run: diff --git a/test/hotspot/jtreg/compiler/intrinsics/float16/TestConstFloat16ToFloat.java b/test/hotspot/jtreg/compiler/intrinsics/float16/TestConstFloat16ToFloat.java -index b4ba578c9f2..27e6b86abe2 100644 +index b4ba578c9..27e6b86ab 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/float16/TestConstFloat16ToFloat.java +++ b/test/hotspot/jtreg/compiler/intrinsics/float16/TestConstFloat16ToFloat.java @@ -21,11 +21,17 @@ @@ -78802,7 +78835,7 @@ index b4ba578c9f2..27e6b86abe2 100644 * @requires vm.compMode != "Xcomp" * @comment default run: diff --git a/test/hotspot/jtreg/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForOtherCPU.java b/test/hotspot/jtreg/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForOtherCPU.java -index 468cd83d7a2..40d2b03e301 100644 +index 468cd83d7..40d2b03e3 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForOtherCPU.java +++ b/test/hotspot/jtreg/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForOtherCPU.java @@ -21,6 +21,12 @@ @@ -78846,7 +78879,7 @@ index 468cd83d7a2..40d2b03e301 100644 this.checkUseSHA = checkUseSHA; } diff --git a/test/hotspot/jtreg/compiler/intrinsics/string/TestCountPositives.java b/test/hotspot/jtreg/compiler/intrinsics/string/TestCountPositives.java -index afc308c37dd..5b949dfa19a 100644 +index afc308c37..5b949dfa1 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/string/TestCountPositives.java +++ b/test/hotspot/jtreg/compiler/intrinsics/string/TestCountPositives.java @@ -21,13 +21,21 @@ @@ -78882,7 +78915,7 @@ index afc308c37dd..5b949dfa19a 100644 // but only if we're not expecting the full length (no // negative bytes) diff --git a/test/hotspot/jtreg/compiler/intrinsics/string/TestStringCompareToDifferentLength.java b/test/hotspot/jtreg/compiler/intrinsics/string/TestStringCompareToDifferentLength.java -index 26bc03c271b..606f0d4f17d 100644 +index 26bc03c27..606f0d4f1 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/string/TestStringCompareToDifferentLength.java +++ b/test/hotspot/jtreg/compiler/intrinsics/string/TestStringCompareToDifferentLength.java @@ -22,9 +22,15 @@ @@ -78903,7 +78936,7 @@ index 26bc03c271b..606f0d4f17d 100644 * different string length. This test creates string with specified * size and longer string, which is same at beginning. diff --git a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/CodeInstallationTest.java b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/CodeInstallationTest.java -index 7483c45a654..68c280f1f39 100644 +index 7483c45a6..68c280f1f 100644 --- a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/CodeInstallationTest.java +++ b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/CodeInstallationTest.java @@ -20,10 +20,18 @@ @@ -78943,7 +78976,7 @@ index 7483c45a654..68c280f1f39 100644 Assert.fail("unsupported architecture"); return null; diff --git a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java -index adbad3e0b4d..e1ce622af2b 100644 +index adbad3e0b..e1ce622af 100644 --- a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java +++ b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java @@ -21,10 +21,16 @@ @@ -78977,7 +79010,7 @@ index adbad3e0b4d..e1ce622af2b 100644 */ diff --git a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/InterpreterFrameSizeTest.java b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/InterpreterFrameSizeTest.java -index 879e6f86058..fcf7c058232 100644 +index 879e6f860..fcf7c0582 100644 --- a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/InterpreterFrameSizeTest.java +++ b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/InterpreterFrameSizeTest.java @@ -21,10 +21,16 @@ @@ -79011,7 +79044,7 @@ index 879e6f86058..fcf7c058232 100644 */ diff --git a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/MaxOopMapStackOffsetTest.java b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/MaxOopMapStackOffsetTest.java -index 3d49a4f3575..8a0427d3da2 100644 +index 3d49a4f35..8a0427d3d 100644 --- a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/MaxOopMapStackOffsetTest.java +++ b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/MaxOopMapStackOffsetTest.java @@ -21,10 +21,16 @@ @@ -79045,7 +79078,7 @@ index 3d49a4f3575..8a0427d3da2 100644 */ diff --git a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java -index ebd57b6faaf..ed15dff3a5e 100644 +index ebd57b6fa..ed15dff3a 100644 --- a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java +++ b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java @@ -21,10 +21,16 @@ @@ -79079,7 +79112,7 @@ index ebd57b6faaf..ed15dff3a5e 100644 */ package jdk.vm.ci.code.test; diff --git a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java -index 80c63392b6e..f667c799773 100644 +index 80c63392b..f667c7997 100644 --- a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java +++ b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java @@ -21,10 +21,16 @@ @@ -79113,7 +79146,7 @@ index 80c63392b6e..f667c799773 100644 */ diff --git a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java -index c7d8d2cf830..6c4b6506ee5 100644 +index c7d8d2cf8..6c4b6506e 100644 --- a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java +++ b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java @@ -21,10 +21,16 @@ @@ -79147,7 +79180,7 @@ index c7d8d2cf830..6c4b6506ee5 100644 */ diff --git a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java -index 543128e932c..4aa99f24060 100644 +index 543128e93..4aa99f240 100644 --- a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java +++ b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java @@ -21,10 +21,16 @@ @@ -79182,7 +79215,7 @@ index 543128e932c..4aa99f24060 100644 diff --git a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/loongarch64/LoongArch64TestAssembler.java b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/loongarch64/LoongArch64TestAssembler.java new file mode 100644 -index 00000000000..4c76868453a +index 000000000..4c7686845 --- /dev/null +++ b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/loongarch64/LoongArch64TestAssembler.java @@ -0,0 +1,568 @@ @@ -79755,7 +79788,7 @@ index 00000000000..4c76868453a + +} diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java b/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java -index a555249637b..85cb1cb639b 100644 +index e9d84883f..f4cd7ec9d 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java @@ -21,6 +21,12 @@ @@ -79788,7 +79821,7 @@ index a555249637b..85cb1cb639b 100644 } diff --git a/test/hotspot/jtreg/compiler/loopopts/superword/ReductionPerf.java b/test/hotspot/jtreg/compiler/loopopts/superword/ReductionPerf.java -index b1495d00548..61a9eacdf48 100644 +index b1495d005..61a9eacdf 100644 --- a/test/hotspot/jtreg/compiler/loopopts/superword/ReductionPerf.java +++ b/test/hotspot/jtreg/compiler/loopopts/superword/ReductionPerf.java @@ -21,12 +21,18 @@ @@ -79812,10 +79845,10 @@ index b1495d00548..61a9eacdf48 100644 * @run main/othervm -Xbatch -XX:LoopUnrollLimit=250 * -XX:CompileCommand=exclude,compiler.loopopts.superword.ReductionPerf::main diff --git a/test/hotspot/jtreg/compiler/rangechecks/TestRangeCheckHoistingScaledIV.java b/test/hotspot/jtreg/compiler/rangechecks/TestRangeCheckHoistingScaledIV.java -index 390a0dcdd3f..d7baa9bfb75 100644 +index e8759a2be..0a22efb68 100644 --- a/test/hotspot/jtreg/compiler/rangechecks/TestRangeCheckHoistingScaledIV.java +++ b/test/hotspot/jtreg/compiler/rangechecks/TestRangeCheckHoistingScaledIV.java -@@ -21,12 +21,18 @@ +@@ -21,13 +21,19 @@ * questions. */ @@ -79830,13 +79863,14 @@ index 390a0dcdd3f..d7baa9bfb75 100644 * @bug 8289996 * @summary Test range check hoisting for some scaled iv at array index * @library /test/lib / + * @requires vm.flagless - * @requires vm.debug & vm.compiler2.enabled & (os.simpleArch == "x64" | os.arch == "aarch64") + * @requires vm.debug & vm.compiler2.enabled & (os.simpleArch == "x64" | os.arch == "aarch64" | os.arch == "loongarch64") * @modules jdk.incubator.vector * @compile --enable-preview -source ${jdk.version} TestRangeCheckHoistingScaledIV.java * @run main/othervm --enable-preview compiler.rangechecks.TestRangeCheckHoistingScaledIV diff --git a/test/hotspot/jtreg/compiler/runtime/TestConstantsInError.java b/test/hotspot/jtreg/compiler/runtime/TestConstantsInError.java -index 3daf12df879..31018941a9c 100644 +index 3daf12df8..31018941a 100644 --- a/test/hotspot/jtreg/compiler/runtime/TestConstantsInError.java +++ b/test/hotspot/jtreg/compiler/runtime/TestConstantsInError.java @@ -21,6 +21,12 @@ @@ -79889,7 +79923,7 @@ index 3daf12df879..31018941a9c 100644 .shouldMatch("Test_CD2.*::test \\(3 bytes\\) made not entrant") .shouldMatch("Test_CD3.*::test \\(3 bytes\\) made not entrant") diff --git a/test/hotspot/jtreg/compiler/sharedstubs/SharedStubToInterpTest.java b/test/hotspot/jtreg/compiler/sharedstubs/SharedStubToInterpTest.java -index 5dd938442cc..2ec4cab8f62 100644 +index 5dd938442..2ec4cab8f 100644 --- a/test/hotspot/jtreg/compiler/sharedstubs/SharedStubToInterpTest.java +++ b/test/hotspot/jtreg/compiler/sharedstubs/SharedStubToInterpTest.java @@ -22,6 +22,12 @@ @@ -79915,7 +79949,7 @@ index 5dd938442cc..2ec4cab8f62 100644 * @run driver compiler.sharedstubs.SharedStubToInterpTest -XX:-TieredCompilation * diff --git a/test/hotspot/jtreg/compiler/testlibrary/sha/predicate/IntrinsicPredicates.java b/test/hotspot/jtreg/compiler/testlibrary/sha/predicate/IntrinsicPredicates.java -index 689c7c8cc2f..f734c1baa3f 100644 +index 689c7c8cc..f734c1baa 100644 --- a/test/hotspot/jtreg/compiler/testlibrary/sha/predicate/IntrinsicPredicates.java +++ b/test/hotspot/jtreg/compiler/testlibrary/sha/predicate/IntrinsicPredicates.java @@ -21,6 +21,12 @@ @@ -79973,7 +80007,7 @@ index 689c7c8cc2f..f734c1baa3f 100644 public static final BooleanSupplier SHA512_INSTRUCTION_AVAILABLE = new OrPredicate(new CPUSpecificPredicate("aarch64.*", new String[] { "sha512" }, null), diff --git a/test/hotspot/jtreg/compiler/vectorapi/TestVectorTest.java b/test/hotspot/jtreg/compiler/vectorapi/TestVectorTest.java -index 35f357c22f2..e0643272e83 100644 +index 35f357c22..e0643272e 100644 --- a/test/hotspot/jtreg/compiler/vectorapi/TestVectorTest.java +++ b/test/hotspot/jtreg/compiler/vectorapi/TestVectorTest.java @@ -20,6 +20,13 @@ @@ -80000,7 +80034,7 @@ index 35f357c22f2..e0643272e83 100644 */ public class TestVectorTest { diff --git a/test/hotspot/jtreg/compiler/vectorapi/VectorLogicalOpIdentityTest.java b/test/hotspot/jtreg/compiler/vectorapi/VectorLogicalOpIdentityTest.java -index b0037973ad1..3ed2735c525 100644 +index 426dec670..ea25a81a3 100644 --- a/test/hotspot/jtreg/compiler/vectorapi/VectorLogicalOpIdentityTest.java +++ b/test/hotspot/jtreg/compiler/vectorapi/VectorLogicalOpIdentityTest.java @@ -22,6 +22,12 @@ @@ -80026,7 +80060,7 @@ index b0037973ad1..3ed2735c525 100644 * * @run driver compiler.vectorapi.VectorLogicalOpIdentityTest diff --git a/test/hotspot/jtreg/compiler/vectorapi/VectorReverseBytesTest.java b/test/hotspot/jtreg/compiler/vectorapi/VectorReverseBytesTest.java -index 154567922bd..d81a90f2fcb 100644 +index 154567922..d81a90f2f 100644 --- a/test/hotspot/jtreg/compiler/vectorapi/VectorReverseBytesTest.java +++ b/test/hotspot/jtreg/compiler/vectorapi/VectorReverseBytesTest.java @@ -21,6 +21,12 @@ @@ -80052,7 +80086,7 @@ index 154567922bd..d81a90f2fcb 100644 * * @run driver compiler.vectorapi.VectorReverseBytesTest diff --git a/test/hotspot/jtreg/compiler/vectorization/TestAutoVecIntMinMax.java b/test/hotspot/jtreg/compiler/vectorization/TestAutoVecIntMinMax.java -index e3baed37804..18b9333b1d1 100644 +index e3baed378..18b9333b1 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestAutoVecIntMinMax.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestAutoVecIntMinMax.java @@ -21,6 +21,12 @@ @@ -80078,7 +80112,7 @@ index e3baed37804..18b9333b1d1 100644 */ diff --git a/test/hotspot/jtreg/compiler/vectorization/TestBufferVectorization.java b/test/hotspot/jtreg/compiler/vectorization/TestBufferVectorization.java -index 95970256c48..3fcb0c999cb 100644 +index 95970256c..3fcb0c999 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestBufferVectorization.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestBufferVectorization.java @@ -21,6 +21,12 @@ @@ -80104,7 +80138,7 @@ index 95970256c48..3fcb0c999cb 100644 * @run driver compiler.vectorization.TestBufferVectorization array * @run driver compiler.vectorization.TestBufferVectorization arrayOffset diff --git a/test/hotspot/jtreg/compiler/vectorization/TestFloatConversionsVector.java b/test/hotspot/jtreg/compiler/vectorization/TestFloatConversionsVector.java -index 4452e576867..7fc996888cd 100644 +index 4452e5768..7fc996888 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestFloatConversionsVector.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestFloatConversionsVector.java @@ -21,12 +21,18 @@ @@ -80127,34 +80161,8 @@ index 4452e576867..7fc996888cd 100644 * @library /test/lib / * @run driver compiler.vectorization.TestFloatConversionsVector */ -diff --git a/test/hotspot/jtreg/compiler/vectorization/TestNumberOfContinuousZeros.java b/test/hotspot/jtreg/compiler/vectorization/TestNumberOfContinuousZeros.java -index c64b851096d..8dcfbad3994 100644 ---- a/test/hotspot/jtreg/compiler/vectorization/TestNumberOfContinuousZeros.java -+++ b/test/hotspot/jtreg/compiler/vectorization/TestNumberOfContinuousZeros.java -@@ -21,13 +21,20 @@ - * questions. - */ - -+/* -+ * This file has been modified by Loongson Technology in 2023, These -+ * modifications are Copyright (c) 2023, Loongson Technology, and are made -+ * available on the same license terms set forth above. -+ */ -+ - /** - * @test - * @key randomness - * @summary Test vectorization of numberOfTrailingZeros/numberOfLeadingZeros for Long - * @requires vm.compiler2.enabled - * @requires (os.simpleArch == "x64" & vm.cpu.features ~= ".*avx2.*") | --* (os.simpleArch == "aarch64" & vm.cpu.features ~= ".*sve.*" & (vm.opt.UseSVE == "null" | vm.opt.UseSVE > 0)) -+* (os.simpleArch == "aarch64" & vm.cpu.features ~= ".*sve.*" & (vm.opt.UseSVE == "null" | vm.opt.UseSVE > 0)) | -+* (os.simpleArch == "loongarch64") - * @library /test/lib / - * @run driver compiler.vectorization.TestNumberOfContinuousZeros - */ diff --git a/test/hotspot/jtreg/compiler/vectorization/TestPopulateIndex.java b/test/hotspot/jtreg/compiler/vectorization/TestPopulateIndex.java -index 6a709849b9c..0a209d2519a 100644 +index 6a709849b..0a209d251 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestPopulateIndex.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestPopulateIndex.java @@ -21,13 +21,20 @@ @@ -80179,33 +80187,8 @@ index 6a709849b9c..0a209d2519a 100644 * @library /test/lib / * @run driver compiler.vectorization.TestPopulateIndex */ -diff --git a/test/hotspot/jtreg/compiler/vectorization/TestReverseBitsVector.java b/test/hotspot/jtreg/compiler/vectorization/TestReverseBitsVector.java -index 1144186d8e5..f36bb209a6b 100644 ---- a/test/hotspot/jtreg/compiler/vectorization/TestReverseBitsVector.java -+++ b/test/hotspot/jtreg/compiler/vectorization/TestReverseBitsVector.java -@@ -20,12 +20,19 @@ - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -+ -+/* -+ * This file has been modified by Loongson Technology in 2023, These -+ * modifications are Copyright (c) 2023, Loongson Technology, and are made -+ * available on the same license terms set forth above. -+ */ -+ - /** - * @test - * @bug 8290034 - * @summary Auto-vectorization of Reverse bit operation. - * @requires vm.compiler2.enabled -- * @requires (os.simpleArch == "x64" & vm.cpu.features ~= ".*avx2.*") | os.arch == "aarch64" -+ * @requires (os.simpleArch == "x64" & vm.cpu.features ~= ".*avx2.*") | os.arch == "aarch64" | os.arch=="loongarch64" - * @library /test/lib / - * @run driver compiler.vectorization.TestReverseBitsVector - */ diff --git a/test/hotspot/jtreg/compiler/vectorization/TestReverseBytes.java b/test/hotspot/jtreg/compiler/vectorization/TestReverseBytes.java -index 47813e2790e..d30f2d3d177 100644 +index 47813e279..d30f2d3d1 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestReverseBytes.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestReverseBytes.java @@ -20,12 +20,19 @@ @@ -80230,7 +80213,7 @@ index 47813e2790e..d30f2d3d177 100644 * @run driver compiler.vectorization.TestReverseBytes */ diff --git a/test/hotspot/jtreg/compiler/vectorization/TestSignumVector.java b/test/hotspot/jtreg/compiler/vectorization/TestSignumVector.java -index bf6a10b855f..b97c0461eaa 100644 +index bf6a10b85..b97c0461e 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestSignumVector.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestSignumVector.java @@ -21,12 +21,18 @@ @@ -80254,7 +80237,7 @@ index bf6a10b855f..b97c0461eaa 100644 * @run driver compiler.vectorization.TestSignumVector */ diff --git a/test/hotspot/jtreg/compiler/vectorization/runner/ArrayIndexFillTest.java b/test/hotspot/jtreg/compiler/vectorization/runner/ArrayIndexFillTest.java -index a4eca0fe8dd..de44f60520a 100644 +index a4eca0fe8..de44f6052 100644 --- a/test/hotspot/jtreg/compiler/vectorization/runner/ArrayIndexFillTest.java +++ b/test/hotspot/jtreg/compiler/vectorization/runner/ArrayIndexFillTest.java @@ -21,6 +21,12 @@ @@ -80280,7 +80263,7 @@ index a4eca0fe8dd..de44f60520a 100644 */ diff --git a/test/hotspot/jtreg/compiler/vectorization/runner/ArrayInvariantFillTest.java b/test/hotspot/jtreg/compiler/vectorization/runner/ArrayInvariantFillTest.java -index 2e7302bba05..964c03955d1 100644 +index 2e7302bba..964c03955 100644 --- a/test/hotspot/jtreg/compiler/vectorization/runner/ArrayInvariantFillTest.java +++ b/test/hotspot/jtreg/compiler/vectorization/runner/ArrayInvariantFillTest.java @@ -21,6 +21,12 @@ @@ -80306,7 +80289,7 @@ index 2e7302bba05..964c03955d1 100644 */ diff --git a/test/hotspot/jtreg/compiler/vectorization/runner/ArrayShiftOpTest.java b/test/hotspot/jtreg/compiler/vectorization/runner/ArrayShiftOpTest.java -index 74262142247..920f0418e10 100644 +index eea79ac4c..526aec568 100644 --- a/test/hotspot/jtreg/compiler/vectorization/runner/ArrayShiftOpTest.java +++ b/test/hotspot/jtreg/compiler/vectorization/runner/ArrayShiftOpTest.java @@ -21,6 +21,12 @@ @@ -80321,8 +80304,8 @@ index 74262142247..920f0418e10 100644 + /* * @test - * @summary Vectorization test on bug-prone shift operation -@@ -35,7 +41,7 @@ + * @bug 8183390 8332905 +@@ -36,7 +42,7 @@ * -XX:+WhiteBoxAPI * compiler.vectorization.runner.ArrayShiftOpTest * @@ -80332,7 +80315,7 @@ index 74262142247..920f0418e10 100644 */ diff --git a/test/hotspot/jtreg/compiler/vectorization/runner/BasicDoubleOpTest.java b/test/hotspot/jtreg/compiler/vectorization/runner/BasicDoubleOpTest.java -index 2410ebe8554..1f0876eec56 100644 +index 2410ebe85..1f0876eec 100644 --- a/test/hotspot/jtreg/compiler/vectorization/runner/BasicDoubleOpTest.java +++ b/test/hotspot/jtreg/compiler/vectorization/runner/BasicDoubleOpTest.java @@ -21,6 +21,12 @@ @@ -80358,7 +80341,7 @@ index 2410ebe8554..1f0876eec56 100644 */ diff --git a/test/hotspot/jtreg/compiler/vectorization/runner/BasicFloatOpTest.java b/test/hotspot/jtreg/compiler/vectorization/runner/BasicFloatOpTest.java -index c9eda7d7650..dd267e0ae4b 100644 +index c9eda7d76..dd267e0ae 100644 --- a/test/hotspot/jtreg/compiler/vectorization/runner/BasicFloatOpTest.java +++ b/test/hotspot/jtreg/compiler/vectorization/runner/BasicFloatOpTest.java @@ -21,6 +21,12 @@ @@ -80384,7 +80367,7 @@ index c9eda7d7650..dd267e0ae4b 100644 */ diff --git a/test/hotspot/jtreg/compiler/vectorization/runner/BasicLongOpTest.java b/test/hotspot/jtreg/compiler/vectorization/runner/BasicLongOpTest.java -index 80ebd7b64d0..22b92e861c5 100644 +index 80ebd7b64..22b92e861 100644 --- a/test/hotspot/jtreg/compiler/vectorization/runner/BasicLongOpTest.java +++ b/test/hotspot/jtreg/compiler/vectorization/runner/BasicLongOpTest.java @@ -22,6 +22,12 @@ @@ -80410,7 +80393,7 @@ index 80ebd7b64d0..22b92e861c5 100644 */ diff --git a/test/hotspot/jtreg/compiler/vectorization/runner/LoopArrayIndexComputeTest.java b/test/hotspot/jtreg/compiler/vectorization/runner/LoopArrayIndexComputeTest.java -index 2bf59814b4f..f0bd2d2ffb4 100644 +index 2bf59814b..f0bd2d2ff 100644 --- a/test/hotspot/jtreg/compiler/vectorization/runner/LoopArrayIndexComputeTest.java +++ b/test/hotspot/jtreg/compiler/vectorization/runner/LoopArrayIndexComputeTest.java @@ -22,6 +22,12 @@ @@ -80436,7 +80419,7 @@ index 2bf59814b4f..f0bd2d2ffb4 100644 */ diff --git a/test/hotspot/jtreg/compiler/vectorization/runner/LoopReductionOpTest.java b/test/hotspot/jtreg/compiler/vectorization/runner/LoopReductionOpTest.java -index f1c8fea059b..9cf2023fa7d 100644 +index f1c8fea05..9cf2023fa 100644 --- a/test/hotspot/jtreg/compiler/vectorization/runner/LoopReductionOpTest.java +++ b/test/hotspot/jtreg/compiler/vectorization/runner/LoopReductionOpTest.java @@ -21,6 +21,12 @@ @@ -80462,7 +80445,7 @@ index f1c8fea059b..9cf2023fa7d 100644 * */ diff --git a/test/hotspot/jtreg/gc/shenandoah/compiler/TestLinkToNativeRBP.java b/test/hotspot/jtreg/gc/shenandoah/compiler/TestLinkToNativeRBP.java -index a0dff95a23f..fd0fcbd3a90 100644 +index a0dff95a2..fd0fcbd3a 100644 --- a/test/hotspot/jtreg/gc/shenandoah/compiler/TestLinkToNativeRBP.java +++ b/test/hotspot/jtreg/gc/shenandoah/compiler/TestLinkToNativeRBP.java @@ -21,6 +21,12 @@ @@ -80489,7 +80472,7 @@ index a0dff95a23f..fd0fcbd3a90 100644 * @run main/othervm --enable-native-access=ALL-UNNAMED -XX:+UnlockDiagnosticVMOptions diff --git a/test/hotspot/jtreg/loongson/25064/NUMAHelper.java b/test/hotspot/jtreg/loongson/25064/NUMAHelper.java new file mode 100644 -index 00000000000..ee0c4387eb3 +index 000000000..ee0c4387e --- /dev/null +++ b/test/hotspot/jtreg/loongson/25064/NUMAHelper.java @@ -0,0 +1,100 @@ @@ -80595,7 +80578,7 @@ index 00000000000..ee0c4387eb3 +} diff --git a/test/hotspot/jtreg/loongson/25064/TestUseNUMADefault.java b/test/hotspot/jtreg/loongson/25064/TestUseNUMADefault.java new file mode 100644 -index 00000000000..9f7263f5081 +index 000000000..9f7263f50 --- /dev/null +++ b/test/hotspot/jtreg/loongson/25064/TestUseNUMADefault.java @@ -0,0 +1,152 @@ @@ -80753,7 +80736,7 @@ index 00000000000..9f7263f5081 +} diff --git a/test/hotspot/jtreg/loongson/25064/TestUseNUMADisabled.java b/test/hotspot/jtreg/loongson/25064/TestUseNUMADisabled.java new file mode 100644 -index 00000000000..e21dffa418a +index 000000000..e21dffa41 --- /dev/null +++ b/test/hotspot/jtreg/loongson/25064/TestUseNUMADisabled.java @@ -0,0 +1,94 @@ @@ -80853,7 +80836,7 @@ index 00000000000..e21dffa418a +} diff --git a/test/hotspot/jtreg/loongson/25064/TestUseNUMAEnabled.java b/test/hotspot/jtreg/loongson/25064/TestUseNUMAEnabled.java new file mode 100644 -index 00000000000..c05b91e1dcf +index 000000000..c05b91e1d --- /dev/null +++ b/test/hotspot/jtreg/loongson/25064/TestUseNUMAEnabled.java @@ -0,0 +1,165 @@ @@ -81024,7 +81007,7 @@ index 00000000000..c05b91e1dcf +} diff --git a/test/hotspot/jtreg/loongson/25443/Test25443.java b/test/hotspot/jtreg/loongson/25443/Test25443.java new file mode 100644 -index 00000000000..200485d1fdc +index 000000000..200485d1f --- /dev/null +++ b/test/hotspot/jtreg/loongson/25443/Test25443.java @@ -0,0 +1,58 @@ @@ -81088,7 +81071,7 @@ index 00000000000..200485d1fdc +} diff --git a/test/hotspot/jtreg/loongson/26733/Test26733.java b/test/hotspot/jtreg/loongson/26733/Test26733.java new file mode 100644 -index 00000000000..83ba5912879 +index 000000000..83ba59128 --- /dev/null +++ b/test/hotspot/jtreg/loongson/26733/Test26733.java @@ -0,0 +1,570 @@ @@ -81664,7 +81647,7 @@ index 00000000000..83ba5912879 +} diff --git a/test/hotspot/jtreg/loongson/30358/MEMBARType.java b/test/hotspot/jtreg/loongson/30358/MEMBARType.java new file mode 100644 -index 00000000000..71636057901 +index 000000000..716360579 --- /dev/null +++ b/test/hotspot/jtreg/loongson/30358/MEMBARType.java @@ -0,0 +1,38 @@ @@ -81708,7 +81691,7 @@ index 00000000000..71636057901 +} diff --git a/test/hotspot/jtreg/loongson/30358/TEST.properties b/test/hotspot/jtreg/loongson/30358/TEST.properties new file mode 100644 -index 00000000000..9cfabdea488 +index 000000000..9cfabdea4 --- /dev/null +++ b/test/hotspot/jtreg/loongson/30358/TEST.properties @@ -0,0 +1,25 @@ @@ -81739,7 +81722,7 @@ index 00000000000..9cfabdea488 +maxOutputSize = 2500000 diff --git a/test/hotspot/jtreg/loongson/30358/TestLoadLoad.java b/test/hotspot/jtreg/loongson/30358/TestLoadLoad.java new file mode 100644 -index 00000000000..92a4f00c247 +index 000000000..92a4f00c2 --- /dev/null +++ b/test/hotspot/jtreg/loongson/30358/TestLoadLoad.java @@ -0,0 +1,129 @@ @@ -81874,7 +81857,7 @@ index 00000000000..92a4f00c247 +} diff --git a/test/hotspot/jtreg/loongson/30358/TestNewObjectWithFinal.java b/test/hotspot/jtreg/loongson/30358/TestNewObjectWithFinal.java new file mode 100644 -index 00000000000..2bc9ada7ce8 +index 000000000..2bc9ada7c --- /dev/null +++ b/test/hotspot/jtreg/loongson/30358/TestNewObjectWithFinal.java @@ -0,0 +1,247 @@ @@ -82127,7 +82110,7 @@ index 00000000000..2bc9ada7ce8 +} diff --git a/test/hotspot/jtreg/loongson/30358/TestVolatile.java b/test/hotspot/jtreg/loongson/30358/TestVolatile.java new file mode 100644 -index 00000000000..9fefa381c38 +index 000000000..9fefa381c --- /dev/null +++ b/test/hotspot/jtreg/loongson/30358/TestVolatile.java @@ -0,0 +1,358 @@ @@ -82491,7 +82474,7 @@ index 00000000000..9fefa381c38 +} diff --git a/test/hotspot/jtreg/loongson/7432/Test7423.java b/test/hotspot/jtreg/loongson/7432/Test7423.java new file mode 100644 -index 00000000000..defa026410b +index 000000000..defa02641 --- /dev/null +++ b/test/hotspot/jtreg/loongson/7432/Test7423.java @@ -0,0 +1,61 @@ @@ -82557,7 +82540,7 @@ index 00000000000..defa026410b + +} diff --git a/test/hotspot/jtreg/runtime/ReservedStack/ReservedStackTest.java b/test/hotspot/jtreg/runtime/ReservedStack/ReservedStackTest.java -index e75e6643809..88bd67d6b39 100644 +index e75e66438..88bd67d6b 100644 --- a/test/hotspot/jtreg/runtime/ReservedStack/ReservedStackTest.java +++ b/test/hotspot/jtreg/runtime/ReservedStack/ReservedStackTest.java @@ -21,6 +21,12 @@ @@ -82583,7 +82566,7 @@ index e75e6643809..88bd67d6b39 100644 } diff --git a/test/hotspot/jtreg/runtime/os/TestTracePageSizes.java b/test/hotspot/jtreg/runtime/os/TestTracePageSizes.java -index a7faed10e02..8d326d428e6 100644 +index b772e2eb6..be7733d5f 100644 --- a/test/hotspot/jtreg/runtime/os/TestTracePageSizes.java +++ b/test/hotspot/jtreg/runtime/os/TestTracePageSizes.java @@ -21,6 +21,12 @@ @@ -82599,7 +82582,7 @@ index a7faed10e02..8d326d428e6 100644 /* * @test id=no-options * @summary Run test with no arguments apart from the ones required by -@@ -38,7 +44,7 @@ +@@ -39,7 +45,7 @@ * @library /test/lib * @build jdk.test.lib.Platform * @requires os.family == "linux" @@ -82609,7 +82592,7 @@ index a7faed10e02..8d326d428e6 100644 * @run main/othervm -XX:+AlwaysPreTouch -Xmx128m -Xlog:pagesize:ps-%p.log -XX:+UseLargePages -XX:LargePageSizeInBytes=2m TestTracePageSizes * @run main/othervm -XX:+AlwaysPreTouch -Xmx2g -Xlog:pagesize:ps-%p.log -XX:+UseLargePages -XX:LargePageSizeInBytes=1g TestTracePageSizes diff --git a/test/hotspot/jtreg/serviceability/AsyncGetCallTrace/MyPackage/ASGCTBaseTest.java b/test/hotspot/jtreg/serviceability/AsyncGetCallTrace/MyPackage/ASGCTBaseTest.java -index 5c41565db8d..ec9499d92a9 100644 +index 5c41565db..ec9499d92 100644 --- a/test/hotspot/jtreg/serviceability/AsyncGetCallTrace/MyPackage/ASGCTBaseTest.java +++ b/test/hotspot/jtreg/serviceability/AsyncGetCallTrace/MyPackage/ASGCTBaseTest.java @@ -22,6 +22,12 @@ @@ -82635,7 +82618,7 @@ index 5c41565db8d..ec9499d92a9 100644 * @run main/othervm/native -agentlib:AsyncGetCallTraceTest MyPackage.ASGCTBaseTest */ diff --git a/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackLineNumbers.java b/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackLineNumbers.java -index 5d9c3982fb6..f346e763db5 100644 +index 5d9c3982f..f346e763d 100644 --- a/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackLineNumbers.java +++ b/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackLineNumbers.java @@ -21,6 +21,12 @@ @@ -82661,7 +82644,7 @@ index 5d9c3982fb6..f346e763db5 100644 * @requires vm.flagless * @library /test/lib diff --git a/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestIRMatching.java b/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestIRMatching.java -index 4794a9c8127..cc4e5c0b64f 100644 +index 0fd262bd1..0fee3041f 100644 --- a/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestIRMatching.java +++ b/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestIRMatching.java @@ -21,6 +21,12 @@ @@ -82687,7 +82670,7 @@ index 4794a9c8127..cc4e5c0b64f 100644 } else if (Platform.isS390x()){ cmp = "CLFI"; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ArgumentHandler.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ArgumentHandler.java -index 16863189500..e2f3a13473b 100644 +index 168631895..e2f3a1347 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ArgumentHandler.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ArgumentHandler.java @@ -21,6 +21,12 @@ @@ -82917,7 +82900,7 @@ index 16863189500..e2f3a13473b 100644 } diff --git a/test/jdk/java/foreign/callarranger/TestLoongArch64CallArranger.java b/test/jdk/java/foreign/callarranger/TestLoongArch64CallArranger.java new file mode 100644 -index 00000000000..399cdbb252e +index 000000000..399cdbb25 --- /dev/null +++ b/test/jdk/java/foreign/callarranger/TestLoongArch64CallArranger.java @@ -0,0 +1,521 @@ @@ -83443,7 +83426,7 @@ index 00000000000..399cdbb252e + } +} diff --git a/test/jdk/java/foreign/callarranger/platform/PlatformLayouts.java b/test/jdk/java/foreign/callarranger/platform/PlatformLayouts.java -index 97856075bef..c6d6fa8efb5 100644 +index 97856075b..c6d6fa8ef 100644 --- a/test/jdk/java/foreign/callarranger/platform/PlatformLayouts.java +++ b/test/jdk/java/foreign/callarranger/platform/PlatformLayouts.java @@ -23,6 +23,13 @@ @@ -83518,7 +83501,7 @@ index 97856075bef..c6d6fa8efb5 100644 + } } diff --git a/test/jdk/java/util/concurrent/ConcurrentHashMap/MapLoops.java b/test/jdk/java/util/concurrent/ConcurrentHashMap/MapLoops.java -index ca1292afd3a..a8052f06143 100644 +index ca1292afd..a8052f061 100644 --- a/test/jdk/java/util/concurrent/ConcurrentHashMap/MapLoops.java +++ b/test/jdk/java/util/concurrent/ConcurrentHashMap/MapLoops.java @@ -31,6 +31,12 @@ @@ -83544,7 +83527,7 @@ index ca1292afd3a..a8052f06143 100644 * @library /test/lib * @run main/othervm/timeout=1600 -XX:+UnlockExperimentalVMOptions -XX:LockingMode=0 -XX:+VerifyHeavyMonitors MapLoops diff --git a/test/jdk/jdk/jfr/event/os/TestCPUInformation.java b/test/jdk/jdk/jfr/event/os/TestCPUInformation.java -index c5166580010..f51a1468754 100644 +index c51665800..f51a14687 100644 --- a/test/jdk/jdk/jfr/event/os/TestCPUInformation.java +++ b/test/jdk/jdk/jfr/event/os/TestCPUInformation.java @@ -21,6 +21,12 @@ @@ -83572,7 +83555,7 @@ index c5166580010..f51a1468754 100644 } } diff --git a/test/jdk/sun/net/InetAddress/nameservice/simple/DefaultCaching.java b/test/jdk/sun/net/InetAddress/nameservice/simple/DefaultCaching.java -index 37d770b62a5..1c3df61b8a7 100644 +index 37d770b62..1c3df61b8 100644 --- a/test/jdk/sun/net/InetAddress/nameservice/simple/DefaultCaching.java +++ b/test/jdk/sun/net/InetAddress/nameservice/simple/DefaultCaching.java @@ -21,12 +21,19 @@ @@ -83606,7 +83589,7 @@ index 37d770b62a5..1c3df61b8a7 100644 test("foo", "10.5.18.22", true, 5); test("theclub", "129.156.220.1", true, 6); diff --git a/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java b/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java -index f8ce856bddd..84b7ecba37f 100644 +index e78e200ac..0a6abfd08 100644 --- a/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java +++ b/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java @@ -33,6 +33,12 @@ import java.util.HashSet; @@ -83632,7 +83615,7 @@ index f8ce856bddd..84b7ecba37f 100644 OS("isAix", "isLinux", "isOSX", "isWindows"), VM_TYPE("isClient", "isServer", "isMinimal", "isZero", "isEmbedded"), diff --git a/test/lib/jdk/test/lib/Platform.java b/test/lib/jdk/test/lib/Platform.java -index 92663c65d0f..311facd8ee1 100644 +index e2451fc83..be0ecfd98 100644 --- a/test/lib/jdk/test/lib/Platform.java +++ b/test/lib/jdk/test/lib/Platform.java @@ -21,6 +21,12 @@ @@ -83661,7 +83644,7 @@ index 92663c65d0f..311facd8ee1 100644 } diff --git a/test/micro/org/openjdk/bench/loongarch/C2Memory.java b/test/micro/org/openjdk/bench/loongarch/C2Memory.java new file mode 100644 -index 00000000000..65cf1773d09 +index 000000000..65cf1773d --- /dev/null +++ b/test/micro/org/openjdk/bench/loongarch/C2Memory.java @@ -0,0 +1,67 @@ @@ -83734,7 +83717,7 @@ index 00000000000..65cf1773d09 +} diff --git a/test/micro/org/openjdk/bench/loongarch/MisAlignVector.java b/test/micro/org/openjdk/bench/loongarch/MisAlignVector.java new file mode 100644 -index 00000000000..1ee6649cda3 +index 000000000..1ee6649cd --- /dev/null +++ b/test/micro/org/openjdk/bench/loongarch/MisAlignVector.java @@ -0,0 +1,63 @@ diff --git a/OpenJDK20U-jdk_x64_linux_hotspot_20.0.2_9.tar.xz b/OpenJDK20U-jdk_x64_linux_hotspot_20.0.2_9.tar.xz deleted file mode 100644 index ffd60eaaa73c14b209fee3386efedef6c45001be..0000000000000000000000000000000000000000 Binary files a/OpenJDK20U-jdk_x64_linux_hotspot_20.0.2_9.tar.xz and /dev/null differ diff --git a/backport-of-8339298-Remove-unused-function-declarati.patch b/backport-of-8339298-Remove-unused-function-declarati.patch new file mode 100644 index 0000000000000000000000000000000000000000..1090411253f493fa26fff61c445a819270e6a9ac --- /dev/null +++ b/backport-of-8339298-Remove-unused-function-declarati.patch @@ -0,0 +1,36 @@ +Subject: backport of 8339298: Remove unused function declaration poll_for_safepoint + +--- + src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.hpp | 2 -- + src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.hpp | 2 -- + 2 files changed, 4 deletions(-) + +diff --git a/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.hpp b/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.hpp +index 43ec18925..fcb6d2943 100644 +--- a/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.hpp ++++ b/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.hpp +@@ -60,8 +60,6 @@ friend class ArrayCopyStub; + void casw(Register addr, Register newval, Register cmpval); + void casl(Register addr, Register newval, Register cmpval); + +- void poll_for_safepoint(relocInfo::relocType rtype, CodeEmitInfo* info = nullptr); +- + static const int max_tableswitches = 20; + struct tableswitch switches[max_tableswitches]; + int tableswitch_count; +diff --git a/src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.hpp b/src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.hpp +index 04e76796c..a74bf1611 100644 +--- a/src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.hpp ++++ b/src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.hpp +@@ -62,8 +62,6 @@ private: + void caswu(Register addr, Register newval, Register cmpval); + void casl(Register addr, Register newval, Register cmpval); + +- void poll_for_safepoint(relocInfo::relocType rtype, CodeEmitInfo* info = nullptr); +- + void deoptimize_trap(CodeEmitInfo *info); + + enum { +-- +2.33.0 + diff --git a/jdk-updates-jdk21u-jdk-21.0.4+7.tar.gz b/jdk-updates-jdk21u-jdk-21.0.4+7.tar.gz deleted file mode 100644 index 17a24f498b2b503670f6687d067e75ab331833bd..0000000000000000000000000000000000000000 Binary files a/jdk-updates-jdk21u-jdk-21.0.4+7.tar.gz and /dev/null differ diff --git a/OpenJDK20U-jdk_aarch64_linux_hotspot_20.0.2_9.tar.xz b/jdk-updates-jdk21u-jdk-21.0.6+7.tar.gz similarity index 66% rename from OpenJDK20U-jdk_aarch64_linux_hotspot_20.0.2_9.tar.xz rename to jdk-updates-jdk21u-jdk-21.0.6+7.tar.gz index 896dce1cf72940b0bf4ffe2abe329216d335eedc..be9dc81640c254c06e47ea0f0cc3784245e89c5f 100644 Binary files a/OpenJDK20U-jdk_aarch64_linux_hotspot_20.0.2_9.tar.xz and b/jdk-updates-jdk21u-jdk-21.0.6+7.tar.gz differ diff --git a/openjdk-21.spec b/openjdk-21.spec index 866a7c664c2721e99dea7288873a347df8e00db1..7bfd6c9c5c0f3a5438114f5c64fa947e623bc48b 100644 --- a/openjdk-21.spec +++ b/openjdk-21.spec @@ -21,6 +21,8 @@ %bcond_without slowdebug # Enable release builds by default on relevant arches. %bcond_without release +# Disable global LTO +%define _lto_cflags %{nil} # The -g flag says to use strip -g instead of full strip on DSOs or EXEs. # This fixes detailed NMT and other tools which need minimal debug info. @@ -158,7 +160,7 @@ # Used via new version scheme. JDK 19 was # GA'ed in March 2022 => 22.3 %global vendor_version_string BiSheng -%global securityver 4 +%global securityver 6 # buildjdkver is usually same as %%{majorver}, # but in time of bootstrap of next jdk, it is majorver-1, # and this it is better to change it here, on single place @@ -926,15 +928,13 @@ Summary: %{origin_nice} Runtime Environment %{majorver} # The test code includes copies of NSS under the Mozilla Public License v2.0 # The PCSClite headers are under a BSD with advertising license # The elliptic curve cryptography (ECC) source code is licensed under the LGPLv2.1 or any later version -License: ASL 1.1 and ASL 2.0 and BSD and BSD with advertising and GPL+ and GPLv2 and GPLv2 with exceptions and IJG and LGPLv2+ and MIT and MPLv2.0 and Public Domain and W3C and zlib and ISC and FTL and RSA +License: ASL 1.1 and ASL 2.0 and BSD and BSD with advertising and GPL+ and GPLv2 and GPLv2 with exceptions and IJG and LGPLv2+ and MIT and MPLv2.0 and Public Domain and W3C and zlib and ISC and FTL and RSA-MD URL: http://openjdk.java.net/ # to regenerate source0 (jdk) and source8 (jdk's taspets) run update_package.sh # update_package.sh contains hard-coded repos, revisions, tags, and projects to regenerate the source archives Source0: jdk-updates-jdk%{majorver}u-jdk-%{filever}+%{buildver}.tar.gz -Source1: OpenJDK20U-jdk_aarch64_linux_hotspot_20.0.2_9.tar.xz -Source2: OpenJDK20U-jdk_x64_linux_hotspot_20.0.2_9.tar.xz Source8: systemtap_3.2_tapsets_hg-icedtea8-9d464368e06d.tar.xz # Desktop files. Adapted from IcedTea @@ -958,10 +958,6 @@ Source14: TestECDSA.java # ############################################ -# NSS via SunPKCS11 Provider (disabled comment -# due to memory leak). -Patch1000: rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch - # Ignore AWTError when assistive technologies are loaded Patch1: rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch # Restrict access to java-atk-wrapper classes @@ -979,6 +975,51 @@ Patch7: add-downgrade-the-glibc-symver-of-log2f-posix_spawn.patch Patch8: add-downgrade-the-glibc-symver-of-memcpy.patch Patch9: add-downgrade-the-glibc-symbol-of-fcntl.patch +# 21.0.4 +Patch10: Backport-JDK-8336855-Duplicate-protected-declaration.patch +Patch11: Backport-JDK-8334758-Incorrect-note-in-Javadoc-for-a.patch +Patch12: Backport-JDK-8323699-MessageFormat.toPattern-generat.patch +Patch16: Backport-JDK-8333805-Replaying-compilation-with-null.patch +Patch19: 8339351-Remove-duplicate-line-in-FileMapHeader-print.patch +Patch21: 8339149-jfr_flush_event_writer-return-value-type-mis.patch +Patch22: 8300800-UB-Shift-exponent-32-is-too-large-for-32-bit.patch +Patch23: 8334780-Crash-assert-h_array_list.not_null-failed-in.patch +Patch24: 8337982-Remove-dead-undef-assrt0n.patch +Patch26: 8335610-DiagnosticFramework-CmdLine-is_executable-co.patch +Patch27: Backport-of-8337245-Fix-wrong-comment-of-StringConca.patch +Patch28: Backport-of-8337274-Remove-repeated-the.patch +Patch29: backport-of-8339298-Remove-unused-function-declarati.patch +Patch32: BackPort-JDK-8336346-Fix--Wzero-as-null-pointer-cons.patch +Patch37: Backport-JDK-8336080-Fix--Wzero-as-null-pointer-cons.patch +Patch38: Backport-JDK-8336152-Remove-unused-forward-declarati.patch +Patch39: Backport-of-8330191-Fix-typo-in-precompiled.hpp.patch +Patch40: Backport-of-8337787-Fix-Wzero-as-null-pointer-consta.patch +Patch41: Backport-of-8337712-Wrong-javadoc-in-java.util.Date-.patch +Patch49: Backport-JDK-8328107-Shenandoah-C2-TestVerifyLoopOpt.patch +Patch50: Backport-JDK-8328553-Get-rid-of-JApplet-in-test-jdk-.patch +Patch51: Backport-JDK-8329754-The-ThreadSafe-attribute-is-ign.patch +Patch53: Backport-JDK-8335638-Calling-VarHandle.-access-mode-.patch +Patch54: Backport-JDK-8338938-The-result-of-the-combine-metho.patch +Patch55: Backport-JDK-8313909-JVMCI-assert-cp-tag_at-index-.i.patch +Patch56: Backport-JDK-8304484-CDS-dynamic-dumping-incorrectly.patch +Patch57: Backport-JDK-8322812-Manpage-for-jcmd-is-missing-JFR.patch +Patch58: Backport-JDK-8327538-The-SSLExtension-class-specifie.patch +Patch60: Backport-JDK-8333599-Improve-description-of-b-matche.patch +Patch62: Backport-JDK-8336012-Fix-usages-of-jtreg-reserved-pr.patch +Patch63: Backport-JDK-8336879-Always-true-condition-img-null-.patch +Patch64: Backport-JDK-8337334-Test-tools-javac-7142086-T71420.patch +Patch65: Backport-JDK-8340623-Remove-outdated-PROCESSOR_ARCHI.patch +Patch66: Backport-JDK-8338010-WB_IsFrameDeoptimized-miss-Reso.patch +Patch67: Backport-JDK-8340186-Shenandoah-Missing-load_referen.patch +Patch68: Backport-JDK-8340273-Remove-CounterHalfLifeTime.patch +Patch69: Backport-JDK-8339460-CDS-error-when-module-is-locate.patch +Patch70: Backport-JDK-8332297-annotation-processor-that-gener.patch +Patch71: Backport-JDK-8329174-update-CodeBuffer-layout-in-com.patch +Patch72: Backport-JDK-8325994-JFR-Examples-in-JFR.start-help-.patch +Patch73: Backport-JDK-8325730-StringBuilder.toString-allocati.patch +Patch74: Backport-JDK-8337679-Memset-warning-in-src-hotspot-s.patch +Patch75: Backport-JDK-8326957-Implement-JEP-474-ZGC-Generatio.patch +Patch76: Backport-JDK-8320308-C2-compilation-crashes-in-Libra.patch ############################################ # # LoongArch64 specific patches @@ -1207,7 +1248,7 @@ fi # OpenJDK patches # Remove libraries that are linked -sh %{SOURCE12} +# sh %{SOURCE12} %ifnarch loongarch64 pushd %{top_level_dir_name} %patch1 -p1 @@ -1215,6 +1256,50 @@ pushd %{top_level_dir_name} %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch16 -p1 +%patch19 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch26 -p1 +%patch27 -p1 +%patch28 -p1 +%patch29 -p1 +%patch32 -p1 +%patch37 -p1 +%patch38 -p1 +%patch39 -p1 +%patch40 -p1 +%patch41 -p1 +%patch49 -p1 +%patch50 -p1 +%patch51 -p1 +%patch53 -p1 +%patch54 -p1 +%patch55 -p1 +%patch56 -p1 +%patch57 -p1 +%patch58 -p1 +%patch60 -p1 +%patch62 -p1 +%patch63 -p1 +%patch64 -p1 +%patch65 -p1 +%patch66 -p1 +%patch67 -p1 +%patch68 -p1 +%patch69 -p1 +%patch70 -p1 +%patch71 -p1 +%patch72 -p1 +%patch73 -p1 +%patch74 -p1 +%patch75 -p1 +%patch76 -p1 popd # openjdk %endif @@ -1224,8 +1309,6 @@ pushd %{top_level_dir_name} popd %endif -%patch1000 - # Extract systemtap tapsets %if %{with_systemtap} tar --strip-components=1 -x -I xz -f %{SOURCE8} @@ -1330,22 +1413,6 @@ fi ARCH=$(uname -m) BOOTJDKPATH=/usr/lib/jvm/java-%{buildjdkver}-openjdk -if [ "$ARCH" = "x86_64" ]; then - tar -xf %{SOURCE2} - BOOTJDKPATH=$PWD/jdk-20.0.2+9 -elif [ "$ARCH" = "aarch64" ]; then - tar -xf %{SOURCE1} - BOOTJDKPATH=$PWD/jdk-20.0.2+9 -elif [ "$ARCH" = "riscv64" ]; then - : -elif [ "$ARCH" = "loongarch64" ]; then - : -elif [ "$ARCH" = "ppc64le" ]; then - : -else - echo " Failed to set BOOTJDKPATH " - exit 18 -fi echo $BOOTJDKPATH @@ -1363,7 +1430,7 @@ bash ../configure \ --with-toolchain-type=clang \ %endif --with-version-build=%{buildver} \ - --with-version-pre=\"${EA_DESIGNATOR}\" \ + --with-version-pre="${EA_DESIGNATOR}" \ --with-version-opt=%{lts_designator} \ --with-vendor-version-string="%{vendor_version_string}" \ --with-vendor-name="BiSheng" \ @@ -1665,9 +1732,10 @@ else end end -- run content of included file with fake args +arg = nil; -- it is better to null the arg up, no meter if they exists or not, and use cjc as module in unified way, instead of relaying on "main" method during require "copy_jdk_configs.lua" cjc = require "copy_jdk_configs.lua" -arg = {"--currentjvm", "%{uniquesuffix %{nil}}", "--jvmdir", "%{_jvmdir %{nil}}", "--origname", "%{name}", "--origjavaver", "%{javaver}", "--arch", "%{_arch}", "--temp", "%{rpm_state_dir}/%{name}.%{_arch}"} -cjc.mainProgram(arg) +args = {"--currentjvm", "%{uniquesuffix %{nil}}", "--jvmdir", "%{_jvmdir %{nil}}", "--origname", "%{name}", "--origjavaver", "%{javaver}", "--arch", "%{_arch}", "--temp", "%{rpm_state_dir}/%{name}.%{_arch}"} +cjc.mainProgram(args) -- the returns from copy_jdk_configs.lua should not affect this 'main', so it should run under all circumstances, except fatal error %post %{post_script %{nil}} @@ -1792,8 +1860,133 @@ cjc.mainProgram(arg) %changelog -* Wed Oct 30 2024 Pan Xuefeng -1:21.0.4.7-1 -- update LoongArch64 port to 21.0.4.7 +* Tue Feb 11 2025 Pan Xuefeng - 1:21.0.6.7-1 +- update LoongArch64 port to 21.0.6 + +* Thu Jan 23 2025 Benshuai5D - 1:21.0.6.7-0 +- update to jdk21.0.6-ga +- delete Backport-JDK-8207908-JMXStatusTest.java-fails-assert.patch +- delete Backport-JDK-8320682-[AArch64]-C1-compilation-fails-.patch +- delete Backport-JDK-8331391-Enhance-the-keytool-code-by-inv.patch +- delete Backport-JDK-8332866-Crash-in-ImageIO-JPEG-decoding-.patch +- delete Backport-of-8337067-Test-runtime-classFileParserBug-.patch +- delete Backport-of-JDK-8316895-SeenThread-print_action_que.patch +- delete Backport-of-JDK-8328723-IP-Address-error-when-client.patch +- modify Backport-JDK-8329174-update-CodeBuffer-layout-in-com.patch +- modify Backport-JDK-8340623-Remove-outdated-PROCESSOR_ARCHI.patch + +* Wed Dec 25 2024 Dingli Zhang - 1:21.0.5.11-4 +- Remove double colons from patch names +- Fix typo in chagelog + +* Thu Dec 5 2024 kuenking111 - 1:21.0.5.11-3 +- disable LTO + +* Mon Nov 11 2024 Dingli Zhang - 1:21.0.5.11-2 +- Remove redundant patch to fix ci check + +* Wed Nov 6 2024 Pan Xuefeng - 1:21.0.5.11-1 +- update LoongArch64 port to 21.0.5 + +* Wed Oct 16 2024 huangjie - 1:21.0.5.11-0 +- update to jdk21.0.5-ga +- delete Backport-JDK-8333462-Performance-regression-of-new-D.patch +- delete Backport-JDK-8332818-ubsan-archiveHeapLoader.cpp:70:.patch +- detete Backport-JDK-8333887-ubsan-unsafe.cpp:247:13:-runtim.patch +- detete BackPort-JDK-8324580-SIGFPE-on-THP-initialization-on.patch +- delete Backport-JDK-8334239-Introduce-macro-for-ubsan-metho.patch +- delete Backport-of-8333088-ubsan-shenandoahAdaptiveHeuristi.patch +- detete Backport-JDK-8332524-Instead-of-printing-TLSv1.3,-.patch +- delete Backport-JDK-8333149-ubsan-memset-on-nullptr-target-.patch +- detete Backport-JDK-8333622-ubsan-relocInfo_x86.cpp:101:56:.patch +- detete Backport-JDK-8333354-ubsan-frame.inline.hpp:91:25:-a.patch +- delete Backport-JDK-8333639-ubsan-cppVtables.cpp:81:55-runt.patch +- delete Backport-of-JDK-8336343-Add-more-known-sysroot-libra.patch +- delete Backport-of-JDK-8332720-ubsan-instanceKlass.cpp:3550.patch +- delete Backport-JDK-8332920-C2-Partial-Peeling-is-wrongly-a.patch +- delete Backport-JDK-8334123-log-the-opening-of-Type-1-fonts.patch +- delete Backport-JDK-8325022-Incorrect-error-message-on-clie.patch + +* Sat Oct 12 2024 Autistic_boyya - 1:21.0.4.7-5 +- add 8300800-UB-Shift-exponent-32-is-too-large-for-32-bit.patch +- add 8334780-Crash-assert-h_array_list.not_null-failed-in.patch +- add 8335610-DiagnosticFramework-CmdLine-is_executable-co.patch +- add 8337982-Remove-dead-undef-assrt0n.patch +- add 8339149-jfr_flush_event_writer-return-value-type-mis.patch +- add 8339351-Remove-duplicate-line-in-FileMapHeader-print.patch +- add BackPort-JDK-8324580-SIGFPE-on-THP-initialization-on.patch +- add BackPort-JDK-8336346-Fix--Wzero-as-null-pointer-cons.patch +- add Backport-JDK-8207908-JMXStatusTest.java-fails-assert.patch +- add Backport-JDK-8304484-CDS-dynamic-dumping-incorrectly.patch +- add Backport-JDK-8313909-JVMCI-assert-cp-tag_at-index-.i.patch +- add Backport-JDK-8320308-C2-compilation-crashes-in-Libra.patch +- add Backport-JDK-8320682-[AArch64]-C1-compilation-fails-.patch +- add Backport-JDK-8322812-Manpage-for-jcmd-is-missing-JFR.patch +- add Backport-JDK-8323699-MessageFormat.toPattern-generat.patch +- add Backport-JDK-8325022-Incorrect-error-message-on-clie.patch +- add Backport-JDK-8325730-StringBuilder.toString-allocati.patch +- add Backport-JDK-8325994-JFR-Examples-in-JFR.start-help-.patch +- add Backport-JDK-8326957-Implement-JEP-474-ZGC-Generatio.patch +- add Backport-JDK-8327538-The-SSLExtension-class-specifie.patch +- add Backport-JDK-8328107-Shenandoah-C2-TestVerifyLoopOpt.patch +- add Backport-JDK-8328553-Get-rid-of-JApplet-in-test-jdk-.patch +- add Backport-JDK-8329174-update-CodeBuffer-layout-in-com.patch +- add Backport-JDK-8329754-The-ThreadSafe-attribute-is-ign.patch +- add Backport-JDK-8331391-Enhance-the-keytool-code-by-inv.patch +- add Backport-JDK-8332297-annotation-processor-that-gener.patch +- add Backport-JDK-8332524-Instead-of-printing-TLSv1.3,-.patch +- add Backport-JDK-8332818-ubsan-archiveHeapLoader.cpp:70:.patch +- add Backport-JDK-8332866-Crash-in-ImageIO-JPEG-decoding-.patch +- add Backport-JDK-8332920-C2-Partial-Peeling-is-wrongly-a.patch +- add Backport-JDK-8333149-ubsan-memset-on-nullptr-target-.patch +- add Backport-JDK-8333354-ubsan-frame.inline.hpp:91:25:-a.patch +- add Backport-JDK-8333462-Performance-regression-of-new-D.patch +- add Backport-JDK-8333599-Improve-description-of-b-matche.patch +- add Backport-JDK-8333622-ubsan-relocInfo_x86.cpp:101:56:.patch +- add Backport-JDK-8333639-ubsan-cppVtables.cpp:81:55-runt.patch +- add Backport-JDK-8333805-Replaying-compilation-with-null.patch +- add Backport-JDK-8333887-ubsan-unsafe.cpp:247:13:-runtim.patch +- add Backport-JDK-8334123-log-the-opening-of-Type-1-fonts.patch +- add Backport-JDK-8334239-Introduce-macro-for-ubsan-metho.patch +- add Backport-JDK-8334758-Incorrect-note-in-Javadoc-for-a.patch +- add Backport-JDK-8335638-Calling-VarHandle.-access-mode-.patch +- add Backport-JDK-8336012-Fix-usages-of-jtreg-reserved-pr.patch +- add Backport-JDK-8336080-Fix--Wzero-as-null-pointer-cons.patch +- add Backport-JDK-8336152-Remove-unused-forward-declarati.patch +- add Backport-JDK-8336855-Duplicate-protected-declaration.patch +- add Backport-JDK-8336879-Always-true-condition-img-null-.patch +- add Backport-JDK-8337334-Test-tools-javac-7142086-T71420.patch +- add Backport-JDK-8337679-Memset-warning-in-src-hotspot-s.patch +- add Backport-JDK-8338010-WB_IsFrameDeoptimized-miss-Reso.patch +- add Backport-JDK-8338938-The-result-of-the-combine-metho.patch +- add Backport-JDK-8339460-CDS-error-when-module-is-locate.patch +- add Backport-JDK-8340186-Shenandoah-Missing-load_referen.patch +- add Backport-JDK-8340273-Remove-CounterHalfLifeTime.patch +- add Backport-JDK-8340623-Remove-outdated-PROCESSOR_ARCHI.patch +- add Backport-of-8330191-Fix-typo-in-precompiled.hpp.patch +- add Backport-of-8333088-ubsan-shenandoahAdaptiveHeuristi.patch +- add Backport-of-8337067-Test-runtime-classFileParserBug-.patch +- add Backport-of-8337245-Fix-wrong-comment-of-StringConca.patch +- add Backport-of-8337274-Remove-repeated-the.patch +- add Backport-of-8337712-Wrong-javadoc-in-java.util.Date-.patch +- add Backport-of-8337787-Fix-Wzero-as-null-pointer-consta.patch +- add Backport-of-JDK-8316895-SeenThread::print_action_que.patch +- add Backport-of-JDK-8328723-IP-Address-error-when-client.patch +- add Backport-of-JDK-8332720-ubsan-instanceKlass.cpp:3550.patch +- add Backport-of-JDK-8336343-Add-more-known-sysroot-libra.patch +- add backport-of-8339298-Remove-unused-function-declarati.patch + +* Wed Aug 14 2024 songliyang - 1:21.0.4.7-4 +- delete redundant symbols while viewing spec file with vim that make it strange on highlight + +* Wed Aug 7 2024 Autistic_boyya - 1:21.0.4.7-3 +- delete rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch + +* Mon Jul 29 2024 zhaosaisai - 1:21.0.4.7-2 +- change boot jdk to itself + +* Thu Aug 1 2024 aoqi - 1:21.0.4.7-1 +- update LoongArch64 port to 21.0.4 * Thu Jul 18 2024 Autistic_boyya -1:21.0.4.7-rolling - update to jdk21.0.4-ga diff --git a/pr3183-rh1340845-support_system_crypto_policy.patch b/pr3183-rh1340845-support_system_crypto_policy.patch deleted file mode 100644 index 9ca3dc6eb9149d4f085844ca4147402a978ce925..0000000000000000000000000000000000000000 --- a/pr3183-rh1340845-support_system_crypto_policy.patch +++ /dev/null @@ -1,87 +0,0 @@ - -# HG changeset patch -# User andrew -# Date 1478057514 0 -# Node ID 1c4d5cb2096ae55106111da200b0bcad304f650c -# Parent 3d53f19b48384e5252f4ec8891f7a3a82d77af2a -diff -r 3d53f19b4838 -r 1c4d5cb2096a src/java.base/share/classes/java/security/Security.java ---- a/src/java.base/share/classes/java/security/Security.java Wed Oct 26 03:51:39 2016 +0100 -+++ b/src/java.base/share/classes/java/security/Security.java Wed Nov 02 03:31:54 2016 +0000 -@@ -43,6 +43,9 @@ - * implementation-specific location, which is typically the properties file - * {@code conf/security/java.security} in the Java installation directory. - * -+ *

    Additional default values of security properties are read from a -+ * system-specific location, if available.

    -+ * - * @author Benjamin Renaud - * @since 1.1 - */ -@@ -52,6 +55,10 @@ - private static final Debug sdebug = - Debug.getInstance("properties"); - -+ /* System property file*/ -+ private static final String SYSTEM_PROPERTIES = -+ "/etc/crypto-policies/back-ends/java.config"; -+ - /* The java.security properties */ - private static Properties props; - -@@ -93,6 +100,7 @@ - if (sdebug != null) { - sdebug.println("reading security properties file: " + - propFile); -+ sdebug.println(props.toString()); - } - } catch (IOException e) { - if (sdebug != null) { -@@ -114,6 +122,31 @@ - } - - if ("true".equalsIgnoreCase(props.getProperty -+ ("security.useSystemPropertiesFile"))) { -+ -+ // now load the system file, if it exists, so its values -+ // will win if they conflict with the earlier values -+ try (BufferedInputStream bis = -+ new BufferedInputStream(new FileInputStream(SYSTEM_PROPERTIES))) { -+ props.load(bis); -+ loadedProps = true; -+ -+ if (sdebug != null) { -+ sdebug.println("reading system security properties file " + -+ SYSTEM_PROPERTIES); -+ sdebug.println(props.toString()); -+ } -+ } catch (IOException e) { -+ if (sdebug != null) { -+ sdebug.println -+ ("unable to load security properties from " + -+ SYSTEM_PROPERTIES); -+ e.printStackTrace(); -+ } -+ } -+ } -+ -+ if ("true".equalsIgnoreCase(props.getProperty - ("security.overridePropertiesFile"))) { - - String extraPropFile = System.getProperty -diff -r 3d53f19b4838 -r 1c4d5cb2096a src/java.base/share/conf/security/java.security ---- a/src/java.base/share/conf/security/java.security Wed Oct 26 03:51:39 2016 +0100 -+++ b/src/java.base/share/conf/security/java.security Wed Nov 02 03:31:54 2016 +0000 -@@ -276,6 +276,13 @@ - security.overridePropertiesFile=true - - # -+# Determines whether this properties file will be appended to -+# using the system properties file stored at -+# /etc/crypto-policies/back-ends/java.config -+# -+security.useSystemPropertiesFile=true -+ -+# - # Determines the default key and trust manager factory algorithms for - # the javax.net.ssl package. - # diff --git a/rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch b/rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch deleted file mode 100644 index ef4c82864f2bb6b187401dfb31281a8f8f84fe2a..0000000000000000000000000000000000000000 --- a/rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -r e3f940bd3c8f src/java.base/share/conf/security/java.security ---- openjdk/src/java.base/share/conf/security/java.security Thu Jun 11 21:54:51 2020 +0530 -+++ openjdk/src/java.base/share/conf/security/java.security Mon Aug 24 10:14:31 2020 +0200 -@@ -77,7 +77,7 @@ - #ifdef macosx - security.provider.tbd=Apple - #endif --security.provider.tbd=SunPKCS11 -+#security.provider.tbd=SunPKCS11 ${java.home}/lib/security/nss.cfg - - # - # A list of preferred providers for specific algorithms. These providers will