diff --git a/8014628-Support-AES-Encryption-with-HMAC-SHA2-for-Ke.patch b/8014628-Support-AES-Encryption-with-HMAC-SHA2-for-Ke.patch index 08411fd6f00c8cf19db13e61916c1528e037fbc9..df447e6a35706a27fdfbd2349e2c4258a4914258 100644 --- a/8014628-Support-AES-Encryption-with-HMAC-SHA2-for-Ke.patch +++ b/8014628-Support-AES-Encryption-with-HMAC-SHA2-for-Ke.patch @@ -1957,9 +1957,9 @@ index 6413e155b..b59832f73 100644 - * @bug 7152176 8168518 + * @bug 7152176 8168518 8014628 * @summary More krb5 tests - * @library ../../../../java/security/testlibrary/ + * @library ../../../../java/security/testlibrary/ /test/lib * @compile -XDignore.symbol.file ReplayCacheTestProc.java -@@ -126,8 +126,13 @@ public class ReplayCacheTestProc { +@@ -139,8 +139,13 @@ public class ReplayCacheTestProc { kdc.addPrincipalRandKey(service(i)); } @@ -1971,9 +1971,9 @@ index 6413e155b..b59832f73 100644 + // Write KTAB after krb5.conf so it contains no aes-sha2 keys kdc.writeKtab(OneKDC.KTAB); - KDC.saveConfig(OneKDC.KRB5_CONF, kdc); - - // User-provided libs - String userLibs = System.getProperty("test.libs"); + + pi = Proc.create("ReplayCacheTestProc").debug("C") + .args("initiator") diff --git a/jdk/test/sun/security/krb5/etype/ETypeOrder.java b/jdk/test/sun/security/krb5/etype/ETypeOrder.java index 9437b16ed..be36d6372 100644 --- a/jdk/test/sun/security/krb5/etype/ETypeOrder.java diff --git a/8136577_Make_AbortVMOnException_available_in_product_builds.patch b/8136577_Make_AbortVMOnException_available_in_product_builds.patch index 1aa04c7bc9b4677cd2536ad44905707ee88616df..1b13af19532753e32e6a9f3c55ea29944f59ad65 100755 --- a/8136577_Make_AbortVMOnException_available_in_product_builds.patch +++ b/8136577_Make_AbortVMOnException_available_in_product_builds.patch @@ -2,8 +2,8 @@ diff --git a/hotspot/src/share/vm/c1/c1_Runtime1.cpp b/hotspot/src/share/vm/c1/c index 3c1ea7280..b8d866786 100644 --- a/hotspot/src/share/vm/c1/c1_Runtime1.cpp +++ b/hotspot/src/share/vm/c1/c1_Runtime1.cpp -@@ -542,7 +542,7 @@ JRT_ENTRY_NO_ASYNC(static address, exception_handler_for_pc_helper(JavaThread* t - exception->print_value_string(), p2i((address)exception()), nm->method()->print_value_string(), p2i(pc), p2i(thread)); +@@ -544,7 +544,7 @@ JRT_ENTRY_NO_ASYNC(static address, exception_handler_for_pc_helper(JavaThread* t + p2i((address)exception()), nm->method()->print_value_string(), p2i(pc), p2i(thread)); } // for AbortVMOnException flag - NOT_PRODUCT(Exceptions::debug_check_abort(exception)); diff --git a/Backport-6956385-URLConnection.getLastModified-leaks-file-han.patch b/Backport-6956385-URLConnection.getLastModified-leaks-file-han.patch new file mode 100644 index 0000000000000000000000000000000000000000..d05b7ff7eae5ade774ed6192303350f978148bf9 --- /dev/null +++ b/Backport-6956385-URLConnection.getLastModified-leaks-file-han.patch @@ -0,0 +1,168 @@ +From b9649e772450f25e3c5d47ce1a15b3e1afa12017 Mon Sep 17 00:00:00 2001 +Date: Wed, 17 Apr 2024 10:43:54 +0000 +Subject: [PATCH] [Backport]6956385: URLConnection.getLastModified() leaks file handles + for jar:file and file: URLs +--- + .../www/protocol/file/FileURLConnection.java | 6 ++ + .../www/protocol/jar/JarURLConnection.java | 13 ++- + .../protocol/jar/FileURLConnectionLeak.java | 100 ++++++++++++++++++ + 3 files changed, 117 insertions(+), 2 deletions(-) + create mode 100644 jdk/test/sun/net/www/protocol/jar/FileURLConnectionLeak.java + +diff --git a/jdk/src/share/classes/sun/net/www/protocol/file/FileURLConnection.java b/jdk/src/share/classes/sun/net/www/protocol/file/FileURLConnection.java +index 1997cb08c..16f404988 100644 +--- a/jdk/src/share/classes/sun/net/www/protocol/file/FileURLConnection.java ++++ b/jdk/src/share/classes/sun/net/www/protocol/file/FileURLConnection.java +@@ -103,6 +103,12 @@ public class FileURLConnection extends URLConnection { + } + } + ++ public synchronized void closeInputStream() throws IOException { ++ if (is != null) { ++ is.close(); ++ } ++ } ++ + private boolean initializedHeaders = false; + + private void initializeHeaders() { +diff --git a/jdk/src/share/classes/sun/net/www/protocol/jar/JarURLConnection.java b/jdk/src/share/classes/sun/net/www/protocol/jar/JarURLConnection.java +index d7c442442..f1757da78 100644 +--- a/jdk/src/share/classes/sun/net/www/protocol/jar/JarURLConnection.java ++++ b/jdk/src/share/classes/sun/net/www/protocol/jar/JarURLConnection.java +@@ -25,6 +25,8 @@ + + package sun.net.www.protocol.jar; + ++import sun.net.www.protocol.file.FileURLConnection; ++ + import java.io.InputStream; + import java.io.IOException; + import java.io.FileNotFoundException; +@@ -107,8 +109,15 @@ public class JarURLConnection extends java.net.JarURLConnection { + try { + super.close(); + } finally { +- if (!getUseCaches()) { +- jarFile.close(); ++ try { ++ if (!getUseCaches()) { ++ jarFile.close(); ++ } ++ } finally { ++ if (jarFileURLConnection instanceof FileURLConnection) { ++ FileURLConnection fileURLConnection = (FileURLConnection) jarFileURLConnection; ++ fileURLConnection.closeInputStream(); ++ } + } + } + } +diff --git a/jdk/test/sun/net/www/protocol/jar/FileURLConnectionLeak.java b/jdk/test/sun/net/www/protocol/jar/FileURLConnectionLeak.java +new file mode 100644 +index 000000000..4a5f9d7e2 +--- /dev/null ++++ b/jdk/test/sun/net/www/protocol/jar/FileURLConnectionLeak.java +@@ -0,0 +1,100 @@ ++/* ++ * Copyright (c) 2023, 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 6956385 ++ * @summary JarURLConnection may fail to close its underlying FileURLConnection ++ * @run main/othervm FileURLConnectionLeak ++ */ ++ ++import java.io.InputStream; ++import java.io.OutputStream; ++import java.lang.management.ManagementFactory; ++import java.lang.management.RuntimeMXBean; ++import java.net.URI; ++import java.net.URL; ++import java.net.URLConnection; ++import java.nio.file.Files; ++import java.nio.file.Path; ++import java.nio.file.Paths; ++import java.util.jar.Attributes; ++import java.util.jar.JarOutputStream; ++import java.util.jar.Manifest; ++ ++public class FileURLConnectionLeak { ++ public static void main(String[] args) throws Exception { ++ Path jar = Paths.get("x.jar").toAbsolutePath(); ++ Manifest mani = new Manifest(); ++ mani.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0"); ++ try (OutputStream os = Files.newOutputStream(jar); OutputStream jos = new JarOutputStream(os, mani)) {} ++ URL u = URI.create("jar:" + jar.toUri() + "!/META-INF/MANIFEST.MF").toURL(); ++ URLConnection urlConnection = u.openConnection(); ++ urlConnection.setDefaultUseCaches(false); ++ // FileURLConnection.is not used, so was always fine: ++ try (InputStream is = u.openStream()) { ++ byte[] buffer = new byte[1024]; ++ int bytesRead; ++ while ((bytesRead = is.read(buffer)) != -1) { ++ System.out.write(buffer, 0, bytesRead); ++ } ++ } ++ // FileURLConnection.is opened implicitly: ++ URLConnection conn = u.openConnection(); ++ conn.getLastModified(); ++ // Idiom to close URLConnection (cf. JDK-8224095), which must also close the other stream: ++ conn.getInputStream().close(); ++ Path fds = Paths.get("/proc/" + getPid() + "/fd"); ++ if (Files.isDirectory(fds)) { ++ // Linux: verify that x.jar is not open ++ for (Path fd : (Iterable) Files.list(fds)::iterator) { ++ if (Files.isSymbolicLink(fd)) { ++ Path file = Files.readSymbolicLink(fd); ++ if (file.equals(jar)) { ++ throw new IllegalStateException("Still held open " + jar + " from " + fd); ++ } ++ } ++ } ++ } ++ // Windows: verify that mandatory file locks do not prevent deletion ++ Files.delete(jar); ++ } ++ ++ private static int getPid() { ++ try { ++ // get runtime MXBean ++ RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean(); ++ // get pid ++ String name = runtime.getName(); ++ int index = name.indexOf('@'); ++ if (index != -1) { ++ return Integer.parseInt(name.substring(0, index)); ++ } ++ } catch (Exception e) { ++ e.printStackTrace(); ++ } ++ return -1; ++ } ++ ++ ++} +-- +2.23.0 + diff --git a/Backport-7036144-GZIPInputStream-readTrailer-uses-faulty-avai.patch b/Backport-7036144-GZIPInputStream-readTrailer-uses-faulty-avai.patch new file mode 100644 index 0000000000000000000000000000000000000000..f7ec9900fcbeaad2198169e78c1bb0e79a9f82be --- /dev/null +++ b/Backport-7036144-GZIPInputStream-readTrailer-uses-faulty-avai.patch @@ -0,0 +1,169 @@ +From 8f3c271e9d34a1105f069fb9d3081c72e1c48180 Mon Sep 17 00:00:00 2001 +Date: Tue, 28 May 2024 02:31:27 +0000 +Subject: [PATCH] [Backport]7036144:GZIPInputStream readTrailer uses faulty available() + test for end-of-stream +--- + .../java/util/zip/GZIPInputStream.java | 24 ++-- + .../zip/GZIP/GZIPInputStreamAvailable.java | 112 ++++++++++++++++++ + 2 files changed, 121 insertions(+), 15 deletions(-) + create mode 100644 jdk/test/java/util/zip/GZIP/GZIPInputStreamAvailable.java + +diff --git a/jdk/src/share/classes/java/util/zip/GZIPInputStream.java b/jdk/src/share/classes/java/util/zip/GZIPInputStream.java +index b3d9240ba..0d57e8ab3 100644 +--- a/jdk/src/share/classes/java/util/zip/GZIPInputStream.java ++++ b/jdk/src/share/classes/java/util/zip/GZIPInputStream.java +@@ -224,23 +224,17 @@ class GZIPInputStream extends InflaterInputStream { + (readUInt(in) != (inf.getBytesWritten() & 0xffffffffL))) + throw new ZipException("Corrupt GZIP trailer"); + +- // If there are more bytes available in "in" or +- // the leftover in the "inf" is > 26 bytes: +- // this.trailer(8) + next.header.min(10) + next.trailer(8) + // try concatenated case +- if (this.in.available() > 0 || n > 26) { +- int m = 8; // this.trailer +- try { +- m += readHeader(in); // next.header +- } catch (IOException ze) { +- return true; // ignore any malformed, do nothing +- } +- inf.reset(); +- if (n > m) +- inf.setInput(buf, len - n + m, n - m); +- return false; ++ int m = 8; // this.trailer ++ try { ++ m += readHeader(in); // next.header ++ } catch (IOException ze) { ++ return true; // ignore any malformed, do nothing + } +- return true; ++ inf.reset(); ++ if (n > m) ++ inf.setInput(buf, len - n + m, n - m); ++ return false; + } + + /* +diff --git a/jdk/test/java/util/zip/GZIP/GZIPInputStreamAvailable.java b/jdk/test/java/util/zip/GZIP/GZIPInputStreamAvailable.java +new file mode 100644 +index 000000000..265050b17 +--- /dev/null ++++ b/jdk/test/java/util/zip/GZIP/GZIPInputStreamAvailable.java +@@ -0,0 +1,112 @@ ++/* ++ * Copyright (c) 2023, 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 7036144 ++ * @summary Test concatenated gz streams when available() returns zero ++ */ ++ ++import java.io.*; ++import java.util.*; ++import java.util.zip.*; ++ ++public class GZIPInputStreamAvailable { ++ ++ public static final int NUM_COPIES = 100; ++ public static void main(String[] args) throws Throwable { ++ testZeroAvailable(); ++ } ++ ++ public static void testZeroAvailable() throws IOException { ++ ++ // Create some uncompressed data and then repeat it NUM_COPIES times ++ byte[] uncompressed1 = "this is a test".getBytes("ASCII"); ++ byte[] uncompressedN = repeat(uncompressed1, NUM_COPIES); ++ ++ // Compress the original data and then repeat that NUM_COPIES times ++ byte[] compressed1 = deflate(uncompressed1); ++ byte[] compressedN = repeat(compressed1, NUM_COPIES); ++ ++ // (a) Read back inflated data from a stream where available() is accurate and verify ++ byte[] readback1 = inflate(new ByteArrayInputStream(compressedN), uncompressedN.length); ++ assertArrayEquals(uncompressedN, readback1); ++ ++ // (b) Read back inflated data from a stream where available() always returns zero and verify ++ byte[] readback2 = inflate(new ZeroAvailableStream(new ByteArrayInputStream(compressedN)), uncompressedN.length); ++ assertArrayEquals(uncompressedN, readback2); ++ } ++ ++ public static byte[] repeat(byte[] data, int count) { ++ byte[] repeat = new byte[data.length * count]; ++ int off = 0; ++ for (int i = 0; i < count; i++) { ++ System.arraycopy(data, 0, repeat, off, data.length); ++ off += data.length; ++ } ++ return repeat; ++ } ++ ++ public static byte[] deflate(byte[] data) throws IOException { ++ ByteArrayOutputStream buf = new ByteArrayOutputStream(); ++ try (GZIPOutputStream out = new GZIPOutputStream(buf)) { ++ out.write(data); ++ } ++ return buf.toByteArray(); ++ } ++ ++ public static byte[] inflate(InputStream in, int bufferLen) throws IOException { ++ GZIPInputStream gzipInputStream = new GZIPInputStream(in); ++ ByteArrayOutputStream bos = new ByteArrayOutputStream(); ++ byte[] buffer = new byte[bufferLen]; ++ int len; ++ while ((len = gzipInputStream.read(buffer)) != -1) { ++ bos.write(buffer, 0, len); ++ } ++ gzipInputStream.close(); ++ bos.close(); ++ return bos.toByteArray(); ++ } ++ ++ public static class ZeroAvailableStream extends FilterInputStream { ++ public ZeroAvailableStream(InputStream in) { ++ super(in); ++ } ++ @Override ++ public int available() { ++ return 0; ++ } ++ } ++ ++ public static void assertArrayEquals(byte[] arr1, byte[] arr2) { ++ if (arr1 == null && arr2 == null) return; ++ if (arr1 != null && arr2 != null && arr1.length == arr2.length) { ++ for (int i = 0; i < arr1.length; i++) { ++ if (arr1[i] != arr2[i]) { ++ throw new AssertionError(Arrays.toString(arr1) + " != " + Arrays.toString(arr2)); ++ } ++ } ++ return; ++ } ++ throw new AssertionError(Arrays.toString(arr1) + " != " + Arrays.toString(arr2)); ++ } ++} +\ No newline at end of file +-- +2.23.0 + diff --git a/Backport-8068864-C2-failed-modified-node-is-not-on-IGVN._work.patch b/Backport-8068864-C2-failed-modified-node-is-not-on-IGVN._work.patch new file mode 100644 index 0000000000000000000000000000000000000000..8ca64dec638048a8d02bb7231e931b8fdcdcc7c3 --- /dev/null +++ b/Backport-8068864-C2-failed-modified-node-is-not-on-IGVN._work.patch @@ -0,0 +1,27 @@ +From 7af1eca9cf66942bf9e54a582f3046ae9b96a8eb Mon Sep 17 00:00:00 2001 +Date: Thu, 23 May 2024 11:28:10 +0800 +Subject: [PATCH] [Backport]8068864: C2 failed: modified node is not on + IGVN._worklist +--- + hotspot/src/share/vm/opto/loopTransform.cpp | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/hotspot/src/share/vm/opto/loopTransform.cpp b/hotspot/src/share/vm/opto/loopTransform.cpp +index 414edc26b..0aca095ce 100644 +--- a/hotspot/src/share/vm/opto/loopTransform.cpp ++++ b/hotspot/src/share/vm/opto/loopTransform.cpp +@@ -2006,10 +2006,9 @@ void PhaseIdealLoop::do_range_check( IdealLoopTree *loop, Node_List &old_new ) { + } + Node *main_cmp = main_bol->in(1); + if( main_cmp->outcnt() > 1 ) { // CmpNode shared? +- _igvn.hash_delete(main_bol); + main_cmp = main_cmp->clone();// Clone a private CmpNode + register_new_node( main_cmp, main_cle->in(0) ); +- main_bol->set_req(1,main_cmp); ++ _igvn.replace_input_of(main_bol, 1, main_cmp); + } + // Hack the now-private loop bounds + _igvn.replace_input_of(main_cmp, 2, main_limit); +-- +2.19.1 + diff --git a/Backport-8151845-Comment-in-globals.hpp-for-MetaspaceSize-is-.patch b/Backport-8151845-Comment-in-globals.hpp-for-MetaspaceSize-is-.patch new file mode 100644 index 0000000000000000000000000000000000000000..e0638156a16827ddea03904c162c2cf08b016f96 --- /dev/null +++ b/Backport-8151845-Comment-in-globals.hpp-for-MetaspaceSize-is-.patch @@ -0,0 +1,39 @@ +From 005d0a4e518c2f41aa1d5fc76110214001532df8 Mon Sep 17 00:00:00 2001 +Date: Wed, 29 May 2024 14:52:13 +0800 +Subject: [PATCH] [Backport]8151845: Comment in globals.hpp for MetaspaceSize is + incorrect. +--- + hotspot/src/share/vm/memory/metaspace.cpp | 2 +- + hotspot/src/share/vm/runtime/globals.hpp | 3 ++- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/hotspot/src/share/vm/memory/metaspace.cpp b/hotspot/src/share/vm/memory/metaspace.cpp +index d08bfba84..1df9eb606 100644 +--- a/hotspot/src/share/vm/memory/metaspace.cpp ++++ b/hotspot/src/share/vm/memory/metaspace.cpp +@@ -2599,7 +2599,7 @@ void MetaspaceGC::compute_new_size() { + if (PrintGCDetails && Verbose) { + gclog_or_tty->print_cr(" " + " shrinking:" +- " initSize: %.1fK" ++ " initThreshold: %.1fK" + " maximum_desired_capacity: %.1fK", + MetaspaceSize / (double) K, + maximum_desired_capacity / (double) K); +diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp +index 6aa53d2d2..f3daa12a6 100644 +--- a/hotspot/src/share/vm/runtime/globals.hpp ++++ b/hotspot/src/share/vm/runtime/globals.hpp +@@ -3332,7 +3332,8 @@ class CommandLineFlags { + "non-daemon thread (in bytes)") \ + \ + product_pd(uintx, MetaspaceSize, \ +- "Initial size of Metaspaces (in bytes)") \ ++ "Initial threshold (in bytes) at which a garbage collection " \ ++ "is done to reduce Metaspace usage") \ + \ + product(uintx, MaxMetaspaceSize, max_uintx, \ + "Maximum size of Metaspaces (in bytes)") \ +-- +2.23.0 + diff --git a/Backport-8209362-sun-security-ssl-SSLSocketImpl-ReuseAddr.jav.patch b/Backport-8209362-sun-security-ssl-SSLSocketImpl-ReuseAddr.jav.patch new file mode 100644 index 0000000000000000000000000000000000000000..30b6c933a076edb71729d1c4915383f9095e05f7 --- /dev/null +++ b/Backport-8209362-sun-security-ssl-SSLSocketImpl-ReuseAddr.jav.patch @@ -0,0 +1,305 @@ +From 50df8472137e95ff6f64fe4136bbad64db8b46e7 Mon Sep 17 00:00:00 2001 +Date: Mon, 27 May 2024 15:12:37 +0800 +Subject: [PATCH] 8209362: sun/security/ssl/SSLSocketImpl/ReuseAddr.java failed + due to "BindException: Address already in use (Bind failed)" +--- + .../net/ssl/templates/SSLSocketTemplate.java | 6 +- + .../security/ssl/SSLSocketImpl/ReuseAddr.java | 237 ++---------------- + 2 files changed, 17 insertions(+), 226 deletions(-) + +diff --git a/jdk/test/javax/net/ssl/templates/SSLSocketTemplate.java b/jdk/test/javax/net/ssl/templates/SSLSocketTemplate.java +index 9e09a0e35..e62f57eba 100644 +--- a/jdk/test/javax/net/ssl/templates/SSLSocketTemplate.java ++++ b/jdk/test/javax/net/ssl/templates/SSLSocketTemplate.java +@@ -224,12 +224,12 @@ public class SSLSocketTemplate { + /* + * What's the server port? Use any free port by default + */ +- private volatile int serverPort = 0; ++ protected volatile int serverPort = 0; + + /* + * Define the server side of the test. + */ +- private void doServerSide() throws Exception { ++ protected void doServerSide() throws Exception { + // kick start the server side service + SSLContext context = createServerSSLContext(); + SSLServerSocketFactory sslssf = context.getServerSocketFactory(); +@@ -290,7 +290,7 @@ public class SSLSocketTemplate { + /* + * Define the client side of the test. + */ +- private void doClientSide() throws Exception { ++ protected void doClientSide() throws Exception { + + // Wait for server to get started. + // +diff --git a/jdk/test/sun/security/ssl/SSLSocketImpl/ReuseAddr.java b/jdk/test/sun/security/ssl/SSLSocketImpl/ReuseAddr.java +index 650c30988..abad01099 100644 +--- a/jdk/test/sun/security/ssl/SSLSocketImpl/ReuseAddr.java ++++ b/jdk/test/sun/security/ssl/SSLSocketImpl/ReuseAddr.java +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2001, 2018, 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 +@@ -25,240 +25,31 @@ + * @test + * @bug 4482446 + * @summary java.net.SocketTimeoutException on 98, NT, 2000 for JSSE +- * @run main/othervm ReuseAddr ++ * @library /javax/net/ssl/templates ++ * @run main ReuseAddr + * + * SunJSSE does not support dynamic system properties, no way to re-use + * system properties in samevm/agentvm mode. + * @author Brad Wetmore + */ + +-import java.io.*; +-import java.net.*; +-import javax.net.ssl.*; ++import java.net.ServerSocket; + +-public class ReuseAddr { ++public class ReuseAddr extends SSLSocketTemplate { + +- /* +- * ============================================================= +- * Set the various variables needed for the tests, then +- * specify what tests to run on each side. +- */ ++ @Override ++ protected void doServerSide() throws Exception { ++ super.doServerSide(); + +- /* +- * Should we run the client or server in a separate thread? +- * Both sides can throw exceptions, but do you have a preference +- * as to which side should be the main thread. +- */ +- static boolean separateServerThread = true; +- +- /* +- * Where do we find the keystores? +- */ +- private final static String pathToStores = "../../../../javax/net/ssl/etc"; +- static String keyStoreFile = "keystore"; +- static String trustStoreFile = "truststore"; +- static String passwd = "passphrase"; +- +- /* +- * Is the server ready to serve? +- */ +- volatile static boolean serverReady = false; +- +- /* +- * Turn on SSL debugging? +- */ +- static boolean debug = false; +- +- /* +- * If the client or server is doing some kind of object creation +- * that the other side depends on, and that thread prematurely +- * exits, you may experience a hang. The test harness will +- * terminate all hung threads after its timeout has expired, +- * currently 3 minutes by default, but you might try to be +- * smart about it.... +- */ +- +- /* +- * Define the server side of the test. +- * +- * If the server prematurely exits, serverReady will be set to true +- * to avoid infinite hangs. +- */ +- void doServerSide() throws Exception { +- SSLServerSocketFactory sslssf = +- (SSLServerSocketFactory) SSLServerSocketFactory.getDefault(); +- SSLServerSocket sslServerSocket = +- (SSLServerSocket) sslssf.createServerSocket(serverPort); +- serverPort = sslServerSocket.getLocalPort(); +- +- /* +- * Signal Client, we're ready for his connect. +- */ +- serverReady = true; +- +- SSLSocket sslSocket = (SSLSocket) sslServerSocket.accept(); +- InputStream sslIS = sslSocket.getInputStream(); +- OutputStream sslOS = sslSocket.getOutputStream(); +- +- sslIS.read(); +- sslOS.write(85); +- sslOS.flush(); +- +- sslSocket.close(); +- +- // Close original server socket +- sslServerSocket.close(); +- +- // Try rebinding to same port +- sslServerSocket = +- (SSLServerSocket) sslssf.createServerSocket(serverPort); +- sslServerSocket.close(); +- } +- +- /* +- * Define the client side of the test. +- * +- * If the server prematurely exits, serverReady will be set to true +- * to avoid infinite hangs. +- */ +- void doClientSide() throws Exception { +- +- /* +- * Wait for server to get started. +- */ +- while (!serverReady) { +- Thread.sleep(50); ++ // Note that if this port is already used by another test, ++ // this test will fail. ++ System.out.println("Try rebinding to same port: " + serverPort); ++ try (ServerSocket server = new ServerSocket(serverPort)) { ++ System.out.println("Server port: " + server.getLocalPort()); + } +- +- SSLSocketFactory sslsf = +- (SSLSocketFactory) SSLSocketFactory.getDefault(); +- SSLSocket sslSocket = (SSLSocket) +- sslsf.createSocket("localhost", serverPort); +- +- InputStream sslIS = sslSocket.getInputStream(); +- OutputStream sslOS = sslSocket.getOutputStream(); +- +- sslOS.write(280); +- sslOS.flush(); +- sslIS.read(); +- +- sslSocket.close(); + } + +- /* +- * ============================================================= +- * The remainder is just support stuff +- */ +- +- // use any free port by default +- volatile int serverPort = 0; +- +- volatile Exception serverException = null; +- volatile Exception clientException = null; +- + public static void main(String[] args) throws Exception { +- String keyFilename = +- System.getProperty("test.src", "./") + "/" + pathToStores + +- "/" + keyStoreFile; +- String trustFilename = +- System.getProperty("test.src", "./") + "/" + pathToStores + +- "/" + trustStoreFile; +- +- System.setProperty("javax.net.ssl.keyStore", keyFilename); +- System.setProperty("javax.net.ssl.keyStorePassword", passwd); +- System.setProperty("javax.net.ssl.trustStore", trustFilename); +- System.setProperty("javax.net.ssl.trustStorePassword", passwd); +- +- if (debug) +- System.setProperty("javax.net.debug", "all"); +- +- /* +- * Start the tests. +- */ +- new ReuseAddr(); +- } +- +- Thread clientThread = null; +- Thread serverThread = null; +- +- /* +- * Primary constructor, used to drive remainder of the test. +- * +- * Fork off the other side, then do your work. +- */ +- ReuseAddr() throws Exception { +- if (separateServerThread) { +- startServer(true); +- startClient(false); +- } else { +- startClient(true); +- startServer(false); +- } +- +- /* +- * Wait for other side to close down. +- */ +- if (separateServerThread) { +- serverThread.join(); +- } else { +- clientThread.join(); +- } +- +- /* +- * When we get here, the test is pretty much over. +- * +- * If the main thread excepted, that propagates back +- * immediately. If the other thread threw an exception, we +- * should report back. +- */ +- if (serverException != null) +- throw serverException; +- if (clientException != null) +- throw clientException; +- } +- +- void startServer(boolean newThread) throws Exception { +- if (newThread) { +- serverThread = new Thread() { +- public void run() { +- try { +- doServerSide(); +- } catch (Exception e) { +- /* +- * Our server thread just died. +- * +- * Release the client, if not active already... +- */ +- System.err.println("Server died..."); +- serverReady = true; +- serverException = e; +- } +- } +- }; +- serverThread.start(); +- } else { +- doServerSide(); +- } +- } +- +- void startClient(boolean newThread) throws Exception { +- if (newThread) { +- clientThread = new Thread() { +- public void run() { +- try { +- doClientSide(); +- } catch (Exception e) { +- /* +- * Our client thread just died. +- */ +- System.err.println("Client died..."); +- clientException = e; +- } +- } +- }; +- clientThread.start(); +- } else { +- doClientSide(); +- } ++ new ReuseAddr().run(); + } + } +-- +2.19.1 + diff --git a/Backport-8210706-G1-may-deadlock-when-starting-a-concurrent-c.patch b/Backport-8210706-G1-may-deadlock-when-starting-a-concurrent-c.patch new file mode 100644 index 0000000000000000000000000000000000000000..c5b688c088f58066b253b8f32b58ef176ec97d28 --- /dev/null +++ b/Backport-8210706-G1-may-deadlock-when-starting-a-concurrent-c.patch @@ -0,0 +1,171 @@ +From 8e53927b6739a935dc833f7e9527dacb71bae1a8 Mon Sep 17 00:00:00 2001 +Date: Thu, 30 May 2024 07:02:40 +0000 +Subject: [PATCH] [Backport]8210706: G1 may deadlock when starting a concurrent cycle at + shutdown +--- + .../gc_implementation/g1/concurrentMark.cpp | 20 +++++++++++-------- + .../gc_implementation/g1/concurrentMark.hpp | 4 ++++ + .../g1/concurrentMarkThread.cpp | 8 +++++++- + .../gc_implementation/g1/g1CollectedHeap.cpp | 14 +++++++------ + .../shared/concurrentGCThread.hpp | 2 ++ + 5 files changed, 33 insertions(+), 15 deletions(-) + +diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp +index 1347a7e16..cad474b83 100644 +--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp ++++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp +@@ -477,6 +477,16 @@ HeapRegion* CMRootRegions::claim_next() { + return res; + } + ++void CMRootRegions::notify_scan_done() { ++ MutexLockerEx x(RootRegionScan_lock, Mutex::_no_safepoint_check_flag); ++ _scan_in_progress = false; ++ RootRegionScan_lock->notify_all(); ++} ++ ++void CMRootRegions::cancel_scan() { ++ notify_scan_done(); ++} ++ + void CMRootRegions::scan_finished() { + assert(scan_in_progress(), "pre-condition"); + +@@ -486,11 +496,7 @@ void CMRootRegions::scan_finished() { + } + _next_survivor = NULL; + +- { +- MutexLockerEx x(RootRegionScan_lock, Mutex::_no_safepoint_check_flag); +- _scan_in_progress = false; +- RootRegionScan_lock->notify_all(); +- } ++ notify_scan_done(); + } + + bool CMRootRegions::wait_until_scan_finished() { +@@ -1224,13 +1230,11 @@ public: + }; + + void ConcurrentMark::scanRootRegions() { +- // Start of concurrent marking. +- ClassLoaderDataGraph::clear_claimed_marks(); +- + // scan_in_progress() will have been set to true only if there was + // at least one root region to scan. So, if it's false, we + // should not attempt to do any further work. + if (root_regions()->scan_in_progress()) { ++ assert(!has_aborted(), "Aborting before root region scanning is finished not supported."); + _parallel_marking_threads = calc_parallel_marking_threads(); + assert(parallel_marking_threads() <= max_parallel_marking_threads(), + "Maximum number of marking threads exceeded"); +diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp +index bbd5d590a..172caef29 100644 +--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp ++++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp +@@ -333,6 +333,8 @@ private: + volatile bool _should_abort; + HeapRegion* volatile _next_survivor; + ++ void notify_scan_done(); ++ + public: + CMRootRegions(); + // We actually do most of the initialization in this method. +@@ -352,6 +354,8 @@ public: + // all have been claimed. + HeapRegion* claim_next(); + ++ void cancel_scan(); ++ + // Flag that we're done with root region scanning and notify anyone + // who's waiting on it. If aborted is false, assume that all regions + // have been claimed. +diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp +index 9b0452f92..3c4553bf7 100644 +--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp ++++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp +@@ -23,6 +23,7 @@ + */ + + #include "precompiled.hpp" ++#include "classfile/classLoaderData.hpp" + #include "gc_implementation/g1/concurrentMarkThread.inline.hpp" + #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" + #include "gc_implementation/g1/g1CollectorPolicy.hpp" +@@ -100,6 +101,10 @@ void ConcurrentMarkThread::run() { + HandleMark hm; + double cycle_start = os::elapsedVTime(); + ++ { ++ ClassLoaderDataGraph::clear_claimed_marks(); ++ } ++ + // We have to ensure that we finish scanning the root regions + // before the next GC takes place. To ensure this we have to + // make sure that we do not join the STS until the root regions +@@ -109,7 +114,7 @@ void ConcurrentMarkThread::run() { + // correctness issue. + + double scan_start = os::elapsedTime(); +- if (!cm()->has_aborted()) { ++ { + if (G1Log::fine()) { + gclog_or_tty->gclog_stamp(cm()->concurrent_gc_id()); + gclog_or_tty->print_cr("[GC concurrent-root-region-scan-start]"); +@@ -297,6 +302,7 @@ void ConcurrentMarkThread::run() { + } + } + assert(_should_terminate, "just checking"); ++ _cm->root_regions()->cancel_scan(); + + terminate(); + } +diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +index 5b156f99d..3ff5586c1 100644 +--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp ++++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +@@ -1346,8 +1346,7 @@ bool G1CollectedHeap::do_collection(bool explicit_gc, + ref_processor_cm()->verify_no_references_recorded(); + + // Abandon current iterations of concurrent marking and concurrent +- // refinement, if any are in progress. We have to do this before +- // wait_until_scan_finished() below. ++ // refinement, if any are in progress. + concurrent_mark()->abort(); + + // Make sure we'll choose a new allocation region afterwards. +@@ -4032,10 +4031,13 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) { + verify_region_sets_optional(); + verify_dirty_young_regions(); + +- // This call will decide whether this pause is an initial-mark +- // pause. If it is, during_initial_mark_pause() will return true +- // for the duration of this pause. +- g1_policy()->decide_on_conc_mark_initiation(); ++ // We should not be doing initial mark unless the conc mark thread is running ++ if (!_cmThread->should_terminate()) { ++ // This call will decide whether this pause is an initial-mark ++ // pause. If it is, during_initial_mark_pause() will return true ++ // for the duration of this pause. ++ g1_policy()->decide_on_conc_mark_initiation(); ++ } + + // We do not allow initial-mark to be piggy-backed on a mixed GC. + assert(!g1_policy()->during_initial_mark_pause() || +diff --git a/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp b/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp +index 1e16bf726..ceb65b029 100644 +--- a/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp ++++ b/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp +@@ -71,6 +71,8 @@ public: + + // Tester + bool is_ConcurrentGC_thread() const { return true; } ++ ++ bool should_terminate() { return _should_terminate; } + }; + + // The SurrogateLockerThread is used by concurrent GC threads for +-- +2.23.0 + diff --git a/Backport-8318889-Backport-Important-Fixed-Issues-in-Later-Ver.patch b/Backport-8318889-Backport-Important-Fixed-Issues-in-Later-Ver.patch new file mode 100644 index 0000000000000000000000000000000000000000..38c47b873035d7be7f5cb5c5c15c37f0fe687162 --- /dev/null +++ b/Backport-8318889-Backport-Important-Fixed-Issues-in-Later-Ver.patch @@ -0,0 +1,524 @@ +From d9cb35d747e5f38210a3207d6821e333dcf45a8b Mon Sep 17 00:00:00 2001 +Date: Fri, 31 May 2024 15:39:38 +0800 +Subject: [PATCH] [Backport]8318889: Backport Important Fixed Issues in Later Versions + 2024_5_30 +--- + hotspot/src/os/linux/vm/os_perf_linux.cpp | 2 +- + hotspot/src/share/vm/opto/loopnode.cpp | 8 +- + hotspot/src/share/vm/prims/jni.cpp | 5 + + .../abstractMethod/AbstractMethodClass.jasm | 43 ++++++ + .../abstractMethod/TestJNIAbstractMethod.java | 68 +++++++++ + .../jni/abstractMethod/libJNIAbstractMethod.c | 43 ++++++ + .../media/sound/StandardMidiFileReader.java | 13 +- + .../classes/javax/swing/text/html/CSS.java | 6 +- + jdk/src/share/native/java/util/zip/zip_util.c | 2 +- + .../native/sun/awt/image/jpeg/imageioJPEG.c | 4 + + .../native/sun/awt/image/jpeg/jpegdecoder.c | 4 + + .../File/SMFInterruptedRunningStatus.java | 143 ++++++++++++++++++ + 12 files changed, 331 insertions(+), 10 deletions(-) + create mode 100644 hotspot/test/runtime/jni/abstractMethod/AbstractMethodClass.jasm + create mode 100644 hotspot/test/runtime/jni/abstractMethod/TestJNIAbstractMethod.java + create mode 100644 hotspot/test/runtime/jni/abstractMethod/libJNIAbstractMethod.c + create mode 100644 jdk/test/javax/sound/midi/File/SMFInterruptedRunningStatus.java + +diff --git a/hotspot/src/os/linux/vm/os_perf_linux.cpp b/hotspot/src/os/linux/vm/os_perf_linux.cpp +index 0d1f75810..6a92675a6 100644 +--- a/hotspot/src/os/linux/vm/os_perf_linux.cpp ++++ b/hotspot/src/os/linux/vm/os_perf_linux.cpp +@@ -941,7 +941,7 @@ SystemProcessInterface::SystemProcesses::ProcessIterator::ProcessIterator() { + bool SystemProcessInterface::SystemProcesses::ProcessIterator::initialize() { + _dir = os::opendir("/proc"); + _entry = NULL; +- _valid = true; ++ _valid = _dir != NULL; // May be null if /proc is not accessible. + next_process(); + + return true; +diff --git a/hotspot/src/share/vm/opto/loopnode.cpp b/hotspot/src/share/vm/opto/loopnode.cpp +index 5e6d53a48..351e6888b 100644 +--- a/hotspot/src/share/vm/opto/loopnode.cpp ++++ b/hotspot/src/share/vm/opto/loopnode.cpp +@@ -2571,6 +2571,7 @@ void PhaseIdealLoop::build_and_optimize(bool do_split_ifs, bool skip_loop_opts) + NOT_PRODUCT( C->verify_graph_edges(); ) + worklist.push( C->top() ); + build_loop_late( visited, worklist, nstack ); ++ if (C->failing()) { return; } + + if (_verify_only) { + // restore major progress flag +@@ -3781,6 +3782,7 @@ void PhaseIdealLoop::build_loop_late( VectorSet &visited, Node_List &worklist, N + } else { + // All of n's children have been processed, complete post-processing. + build_loop_late_post(n); ++ if (C->failing()) { return; } + if (nstack.is_empty()) { + // Finished all nodes on stack. + // Process next node on the worklist. +@@ -3884,13 +3886,15 @@ void PhaseIdealLoop::build_loop_late_post( Node *n ) { + Node *legal = LCA; // Walk 'legal' up the IDOM chain + Node *least = legal; // Best legal position so far + while( early != legal ) { // While not at earliest legal +-#ifdef ASSERT + if (legal->is_Start() && !early->is_Root()) { ++#ifdef ASSERT + // Bad graph. Print idom path and fail. + dump_bad_graph("Bad graph detected in build_loop_late", n, early, LCA); + assert(false, "Bad graph detected in build_loop_late"); +- } + #endif ++ C->record_method_not_compilable("Bad graph detected in build_loop_late"); ++ return; ++ } + // Find least loop nesting depth + legal = idom(legal); // Bump up the IDOM tree + // Check for lower nesting depth +diff --git a/hotspot/src/share/vm/prims/jni.cpp b/hotspot/src/share/vm/prims/jni.cpp +index de0aae9b4..cccb578ea 100644 +--- a/hotspot/src/share/vm/prims/jni.cpp ++++ b/hotspot/src/share/vm/prims/jni.cpp +@@ -1380,6 +1380,11 @@ static void jni_invoke_nonstatic(JNIEnv *env, JavaValue* result, jobject receive + } + } + ++ if (selected_method->is_abstract()) { ++ ResourceMark rm(THREAD); ++ THROW_MSG(vmSymbols::java_lang_AbstractMethodError(), selected_method->name()->as_C_string()); ++ } ++ + methodHandle method(THREAD, selected_method); + + // Create object to hold arguments for the JavaCall, and associate it with +diff --git a/hotspot/test/runtime/jni/abstractMethod/AbstractMethodClass.jasm b/hotspot/test/runtime/jni/abstractMethod/AbstractMethodClass.jasm +new file mode 100644 +index 000000000..24c53f203 +--- /dev/null ++++ b/hotspot/test/runtime/jni/abstractMethod/AbstractMethodClass.jasm +@@ -0,0 +1,43 @@ ++/* ++ * 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. ++ * ++ */ ++/* ++ * This is a non-abstract class with an abstract method. ++ * ++ */ ++super public class AbstractMethodClass ++ extends java/lang/Object ++ version 51:0 // Java 7 version ++{ ++ ++ public Method "":"()V" ++ stack 1 locals 1 ++ { ++ aload_0; ++ invokespecial Method java/lang/Object."":"()V"; ++ return; ++ } ++ ++ public abstract Method "abstractM":"()V"; ++ ++} +diff --git a/hotspot/test/runtime/jni/abstractMethod/TestJNIAbstractMethod.java b/hotspot/test/runtime/jni/abstractMethod/TestJNIAbstractMethod.java +new file mode 100644 +index 000000000..2384f6d5a +--- /dev/null ++++ b/hotspot/test/runtime/jni/abstractMethod/TestJNIAbstractMethod.java +@@ -0,0 +1,68 @@ ++/* ++ * 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 8323243 ++ * @summary Test that invocation of an abstract method from JNI works correctly ++ * @compile AbstractMethodClass.jasm ++ * @run main/othervm/native TestJNIAbstractMethod ++ */ ++ ++/** ++ * We are testing invocation of an abstract method from JNI - which should ++ * simply result in throwning AbstractMethodError. To invoke an abstract method ++ * we must have an instance method (as abstract static methods are illegal), ++ * but instantiating an abstract class is also illegal at the Java language ++ * level, so we have to use a custom jasm class that contains an abstract method ++ * declaration, but which is not itself declared as an abstract class. ++ */ ++public class TestJNIAbstractMethod { ++ ++ // Invokes an abstract method from JNI and throws AbstractMethodError. ++ private static native void invokeAbstractM(Class AMclass, ++ AbstractMethodClass receiver); ++ ++ static { ++ System.loadLibrary("JNIAbstractMethod"); ++ } ++ ++ public static void main(String[] args) { ++ AbstractMethodClass obj = new AbstractMethodClass(); ++ try { ++ System.out.println("Attempting direct invocation via Java"); ++ obj.abstractM(); ++ throw new RuntimeException("Did not get AbstractMethodError from Java!"); ++ } catch (AbstractMethodError expected) { ++ System.out.println("ok - got expected exception: " + expected); ++ } ++ try { ++ System.out.println("Attempting direct invocation via JNI"); ++ invokeAbstractM(obj.getClass(), obj); ++ throw new RuntimeException("Did not get AbstractMethodError from JNI!"); ++ } catch (AbstractMethodError expected) { ++ System.out.println("ok - got expected exception: " + expected); ++ } ++ } ++} +diff --git a/hotspot/test/runtime/jni/abstractMethod/libJNIAbstractMethod.c b/hotspot/test/runtime/jni/abstractMethod/libJNIAbstractMethod.c +new file mode 100644 +index 000000000..35a28f702 +--- /dev/null ++++ b/hotspot/test/runtime/jni/abstractMethod/libJNIAbstractMethod.c +@@ -0,0 +1,43 @@ ++/* ++ * 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. ++ * ++ */ ++#include ++#include ++#include ++ ++JNIEXPORT void JNICALL Java_TestJNIAbstractMethod_invokeAbstractM(JNIEnv* env, ++ jclass this_cls, ++ jclass target_cls, ++ jobject receiver) { ++ ++ jmethodID mid = (*env)->GetMethodID(env, target_cls, "abstractM", "()V"); ++ if (mid == NULL) { ++ fprintf(stderr, "Error looking up method abstractM\n"); ++ (*env)->ExceptionDescribe(env); ++ exit(1); ++ } ++ ++ printf("Invoking abstract method ...\n"); ++ (*env)->CallVoidMethod(env, receiver, mid); // Should raise exception ++ ++} +diff --git a/jdk/src/share/classes/com/sun/media/sound/StandardMidiFileReader.java b/jdk/src/share/classes/com/sun/media/sound/StandardMidiFileReader.java +index 20ebe4f06..ba7f344a4 100644 +--- a/jdk/src/share/classes/com/sun/media/sound/StandardMidiFileReader.java ++++ b/jdk/src/share/classes/com/sun/media/sound/StandardMidiFileReader.java +@@ -326,10 +326,10 @@ final class SMFParser { + // reset current tick to 0 + long tick = 0; + +- // reset current status byte to 0 (invalid value). ++ // reset current running status byte to 0 (invalid value). + // this should cause us to throw an InvalidMidiDataException if we don't + // get a valid status byte from the beginning of the track. +- int status = 0; ++ int runningStatus = 0; + boolean endOfTrackFound = false; + + while (!trackFinished() && !endOfTrackFound) { +@@ -346,10 +346,17 @@ final class SMFParser { + // check for new status + int byteValue = readUnsigned(); + ++ int status; + if (byteValue >= 0x80) { + status = byteValue; ++ ++ // update running status (only for channel messages) ++ if ((status & 0xF0) != 0xF0) { ++ runningStatus = status; ++ } + } else { +- data1 = byteValue; ++ status = runningStatus; ++ data1 = byteValue; + } + + switch (status & 0xF0) { +diff --git a/jdk/src/share/classes/javax/swing/text/html/CSS.java b/jdk/src/share/classes/javax/swing/text/html/CSS.java +index 4a944d381..4713bcd60 100644 +--- a/jdk/src/share/classes/javax/swing/text/html/CSS.java ++++ b/jdk/src/share/classes/javax/swing/text/html/CSS.java +@@ -2581,8 +2581,8 @@ public class CSS implements Serializable { + * Used for BackgroundImages. + */ + static class BackgroundImage extends CssValue { +- private boolean loadedImage; +- private ImageIcon image; ++ private volatile boolean loadedImage; ++ private ImageIcon image; + + Object parseCssValue(String value) { + BackgroundImage retValue = new BackgroundImage(); +@@ -2600,7 +2600,6 @@ public class CSS implements Serializable { + synchronized(this) { + if (!loadedImage) { + URL url = CSS.getURL(base, svalue); +- loadedImage = true; + if (url != null) { + image = new ImageIcon(); + Image tmpImg = Toolkit.getDefaultToolkit().createImage(url); +@@ -2608,6 +2607,7 @@ public class CSS implements Serializable { + image.setImage(tmpImg); + } + } ++ loadedImage = true; + } + } + } +diff --git a/jdk/src/share/native/java/util/zip/zip_util.c b/jdk/src/share/native/java/util/zip/zip_util.c +index ff59c5ecc..8b0c08909 100644 +--- a/jdk/src/share/native/java/util/zip/zip_util.c ++++ b/jdk/src/share/native/java/util/zip/zip_util.c +@@ -443,7 +443,7 @@ hash(const char *s) + static unsigned int + hashN(const char *s, int length) + { +- int h = 0; ++ unsigned int h = 0; + while (length-- > 0) + h = 31*h + *s++; + return h; +diff --git a/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c b/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c +index 7e1d8c99d..1cd9e8bdb 100644 +--- a/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c ++++ b/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c +@@ -1131,6 +1131,10 @@ imageio_skip_input_data(j_decompress_ptr cinfo, long num_bytes) + return; + } + num_bytes += sb->remaining_skip; ++ // Check for overflow if remaining_skip value is too large ++ if (num_bytes < 0) { ++ return; ++ } + sb->remaining_skip = 0; + + /* First the easy case where we are skipping <= the current contents. */ +diff --git a/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c b/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c +index cea158e17..2f64d33cc 100644 +--- a/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c ++++ b/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c +@@ -406,6 +406,10 @@ sun_jpeg_skip_input_data(j_decompress_ptr cinfo, long num_bytes) + return; + } + num_bytes += src->remaining_skip; ++ // Check for overflow if remaining_skip value is too large ++ if (num_bytes < 0) { ++ return; ++ } + src->remaining_skip = 0; + ret = (int)src->pub.bytes_in_buffer; /* this conversion is safe, because capacity of the buffer is limited by jnit */ + if (ret >= num_bytes) { +diff --git a/jdk/test/javax/sound/midi/File/SMFInterruptedRunningStatus.java b/jdk/test/javax/sound/midi/File/SMFInterruptedRunningStatus.java +new file mode 100644 +index 000000000..1b82e2f73 +--- /dev/null ++++ b/jdk/test/javax/sound/midi/File/SMFInterruptedRunningStatus.java +@@ -0,0 +1,143 @@ ++/* ++ * Copyright (c) 2023, 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. ++ */ ++ ++import java.io.ByteArrayInputStream; ++ ++import javax.sound.midi.MidiSystem; ++import javax.sound.midi.Sequence; ++import javax.sound.midi.Track; ++ ++/** ++ * @test ++ * @bug 8319598 ++ * @summary SMFParser bug with running status, interrupted by Meta or SysEx messages ++ */ ++public class SMFInterruptedRunningStatus { ++ ++ public static void main(String[] args) throws Exception { ++ ++ byte[][] files = new byte[][] {SMF_1, SMF_2, SMF_3}; ++ for (int i = 0; i < files.length; i++) { ++ Sequence seq = MidiSystem.getSequence( ++ new ByteArrayInputStream(files[i])); ++ testSequence(seq, i + 1); ++ } ++ ++ // no exception thrown, all files have been parsed correctly ++ System.out.println("Test passed"); ++ } ++ ++ private static void testSequence(Sequence seq, int fileNumber) { ++ ++ // check number of tracks and number of events ++ Track[] tracks = seq.getTracks(); ++ if (1 != tracks.length) { ++ throw new RuntimeException("file number " ++ + fileNumber + " fails (incorrect number of tracks: " ++ + tracks.length + ")"); ++ } ++ Track track = tracks[0]; ++ if (7 != track.size()) { ++ throw new RuntimeException("file number " + fileNumber ++ + " fails (incorrect number of events: " ++ + track.size() + ")"); ++ } ++ ++ // check status byte of each message ++ int[] expectedStatusBytes = new int[] { ++ 0x90, 0xFF, 0x90, 0x90, 0x90, 0xFF, 0xFF}; ++ for (int i = 0; i < expectedStatusBytes.length; i++) { ++ int expected = expectedStatusBytes[i]; ++ if (expected != track.get(i).getMessage().getStatus()) { ++ throw new RuntimeException("file number " + fileNumber ++ + " fails (wrong status byte in event " + i + ")"); ++ } ++ } ++ } ++ ++ // MIDI file without running status - should work equally before ++ // and after the bugfix ++ private static final byte[] SMF_1 = { ++ 0x4D, 0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06, // file header (start) ++ 0x00, 0x01, 0x00, 0x01, 0x00, (byte) 0x80, // file header (end) ++ 0x4D, 0x54, 0x72, 0x6B, 0x00, 0x00, 0x00, 0x24, // track header ++ 0x00, // delta time ++ (byte) 0x90, 0x3C, 0x7F, // Note-ON (C) ++ 0x40, // delta time ++ (byte) 0xFF, 0x01, 0x04, 0x54, 0x65, 0x73, 0x74, // META (text) ++ 0x20, // delta time ++ (byte) 0x90, 0x3C, 0x00, // Note-OFF (C) ++ 0x20, // delta time ++ (byte) 0x90, 0x3E, 0x7F, // Note-ON (D) ++ 0x60, // delta time ++ (byte) 0x90, 0x3E, 0x00, // Note-OFF (D) ++ 0x20, // delta time ++ (byte) 0xFF, 0x01, 0x04, 0x54, 0x65, 0x73, 0x74, // META (text) ++ 0x00, // delta time ++ (byte) 0xFF, 0x2F, 0x00 // META (end of track) ++ }; ++ ++ // MIDI file with running status, interrupted by a META message ++ // - failed before the bugfix ++ private static final byte[] SMF_2 = { ++ 0x4D, 0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06, // file header (start) ++ 0x00, 0x01, 0x00, 0x01, 0x00, (byte) 0x80, // file header (end) ++ 0x4D, 0x54, 0x72, 0x6B, 0x00, 0x00, 0x00, 0x21, // track header ++ 0x00, // delta time ++ (byte) 0x90, 0x3C, 0x7F, // Note-ON (C) ++ 0x40, // delta time ++ (byte) 0xFF, 0x01, 0x04, 0x54, 0x65, 0x73, 0x74, // META (interruptor) ++ 0x20, // delta time ++ 0x3C, 0x00, // Note-OFF (C) - running status ++ 0x20, // delta time ++ 0x3E, 0x7F, // Note-ON (D) - running status ++ 0x60, // delta time ++ 0x3E, 0x00, // Note-OFF (D) - running status ++ 0x20, // delta time ++ (byte) 0xFF, 0x01, 0x04, 0x54, 0x65, 0x73, 0x74, // META (text) ++ 0x00, // delta time ++ (byte) 0xFF, 0x2F, 0x00 // META (end of track) ++ }; ++ ++ // MIDI file with running status, interrupted by a META message ++ // - succeeded before the bugfix but with wrong interpretation of the data ++ private static final byte[] SMF_3 = { ++ 0x4D, 0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06, // file header (start) ++ 0x00, 0x01, 0x00, 0x01, 0x00, (byte) 0x80, // file header (end) ++ 0x4D, 0x54, 0x72, 0x6B, 0x00, 0x00, 0x00, 0x21, // track header ++ 0x00, // delta time ++ (byte) 0x90, 0x3C, 0x7F, // Note-ON (C) ++ 0x40, // delta time ++ (byte) 0xFF, 0x01, 0x04, 0x54, 0x65, 0x73, 0x74, // META (interruptor) ++ 0x20, // delta time ++ 0x3C, 0x00, // Note-OFF (C) - running status ++ 0x0D, // delta time ++ 0x3E, 0x7F, // Note-ON (D) - running status ++ 0x60, // delta time ++ 0x3E, 0x00, // Note-OFF (D) - running status ++ 0x20, // delta time ++ (byte) 0xFF, 0x01, 0x04, 0x54, 0x65, 0x73, 0x74, // META (text) ++ 0x00, // delta time ++ (byte) 0xFF, 0x2F, 0x00 // META (end of track) ++ }; ++} +-- +2.23.0 + diff --git a/Dynamic-CDS-Archive.patch b/Dynamic-CDS-Archive.patch index 30a6ff8169def8d3ed47633f5431a0b3a19d72dd..ebeb75b4dc1d0728436d76fb24b392d380f8f398 100644 --- a/Dynamic-CDS-Archive.patch +++ b/Dynamic-CDS-Archive.patch @@ -3070,12 +3070,13 @@ index 8dd4e6b21..6a2d8077f 100644 // We take care not to be blocking while holding the // SymbolTable_lock. Otherwise, the system might deadlock, since the // symboltable is used during compilation (VM_thread) The lock free -@@ -236,12 +267,32 @@ unsigned int SymbolTable::hash_symbol(const char* s, int len) { - // entries in the symbol table during normal execution (only during - // safepoints). +@@ -251,13 +282,33 @@ unsigned int SymbolTable::hash_symbol(const char* s, int len) { + return len; + } -Symbol* SymbolTable::lookup(const char* name, int len, TRAPS) { +Symbol* SymbolTable::lookup_common(const char* name, int len) { + len = check_length(name, len); unsigned int hashValue = hash_symbol(name, len); int index = the_table()->hash_to_index(hashValue); + Symbol* s; diff --git a/Huawei-Add-Aggressive-CDS.patch b/Huawei-Add-Aggressive-CDS.patch new file mode 100644 index 0000000000000000000000000000000000000000..b6085e33d4f2d9d972b214dd0b34a1b6d1f92924 --- /dev/null +++ b/Huawei-Add-Aggressive-CDS.patch @@ -0,0 +1,1316 @@ +From a7acbdd7c7885a92e3e62d485c0ceaa95923806f Mon Sep 17 00:00:00 2001 +Date: Mon, 27 May 2024 16:14:55 +0800 +Subject: [PATCH] [Huawei]Add Aggressive CDS +--- + hotspot/make/bsd/makefiles/mapfile-vers-debug | 1 + + .../make/bsd/makefiles/mapfile-vers-product | 1 + + .../make/linux/makefiles/mapfile-vers-debug | 1 + + .../make/linux/makefiles/mapfile-vers-product | 1 + + hotspot/src/share/vm/cds/archiveBuilder.cpp | 5 + + hotspot/src/share/vm/cds/dynamicArchive.cpp | 20 + + .../share/vm/classfile/classFileParser.cpp | 32 ++ + .../vm/classfile/systemDictionaryShared.cpp | 375 ++++++++++++++++++ + .../vm/classfile/systemDictionaryShared.hpp | 13 + + hotspot/src/share/vm/classfile/vmSymbols.hpp | 2 + + hotspot/src/share/vm/memory/filemap.cpp | 53 ++- + hotspot/src/share/vm/memory/filemap.hpp | 11 + + hotspot/src/share/vm/prims/jvm.cpp | 30 ++ + hotspot/src/share/vm/prims/jvm.h | 6 + + hotspot/src/share/vm/runtime/arguments.cpp | 16 + + hotspot/src/share/vm/runtime/arguments.hpp | 4 + + hotspot/src/share/vm/runtime/globals.hpp | 8 + + hotspot/src/share/vm/utilities/macros.hpp | 9 + + jdk/make/mapfiles/libjava/mapfile-linux | 1 + + jdk/make/mapfiles/libjava/mapfile-vers | 1 + + .../share/classes/java/lang/ClassLoader.java | 35 ++ + .../classes/java/net/AggressiveCDSPlugin.java | 45 +++ + .../classes/java/net/URLClassLoader.java | 27 ++ + .../java/security/ProtectionDomain.java | 16 + + .../java/security/SecureClassLoader.java | 12 + + .../share/classes/sun/misc/URLClassPath.java | 18 + + jdk/src/share/javavm/export/jvm.h | 5 + + jdk/src/share/native/java/lang/ClassLoader.c | 25 ++ + 28 files changed, 772 insertions(+), 1 deletion(-) + create mode 100644 jdk/src/share/classes/java/net/AggressiveCDSPlugin.java + +diff --git a/hotspot/make/bsd/makefiles/mapfile-vers-debug b/hotspot/make/bsd/makefiles/mapfile-vers-debug +index c60ad3e00..86af8a1be 100644 +--- a/hotspot/make/bsd/makefiles/mapfile-vers-debug ++++ b/hotspot/make/bsd/makefiles/mapfile-vers-debug +@@ -233,6 +233,7 @@ + _JVM_AdaptiveHeapGetG1PeriodicGCInterval + _JVM_AdaptiveHeapSetG1PeriodicGCLoadThreshold + _JVM_AdaptiveHeapGetG1PeriodicGCLoadThreshold ++ _JVM_DefineTrustedSharedClass + _JVM_Sleep + _JVM_Socket + _JVM_SocketAvailable +diff --git a/hotspot/make/bsd/makefiles/mapfile-vers-product b/hotspot/make/bsd/makefiles/mapfile-vers-product +index 94d123c9f..69cd3f962 100644 +--- a/hotspot/make/bsd/makefiles/mapfile-vers-product ++++ b/hotspot/make/bsd/makefiles/mapfile-vers-product +@@ -233,6 +233,7 @@ + _JVM_AdaptiveHeapGetG1PeriodicGCLoadThreshold + _JVM_AdaptiveHeapSetG1PeriodicGCInterval + _JVM_AdaptiveHeapSetG1PeriodicGCLoadThreshold ++ _JVM_DefineTrustedSharedClass + _JVM_Sleep + _JVM_Socket + _JVM_SocketAvailable +diff --git a/hotspot/make/linux/makefiles/mapfile-vers-debug b/hotspot/make/linux/makefiles/mapfile-vers-debug +index 1ebe436cb..b006a84c2 100644 +--- a/hotspot/make/linux/makefiles/mapfile-vers-debug ++++ b/hotspot/make/linux/makefiles/mapfile-vers-debug +@@ -237,6 +237,7 @@ SUNWprivate_1.1 { + JVM_AdaptiveHeapGetG1PeriodicGCInterval; + JVM_AdaptiveHeapSetG1PeriodicGCLoadThreshold; + JVM_AdaptiveHeapGetG1PeriodicGCLoadThreshold; ++ JVM_DefineTrustedSharedClass; + JVM_Sleep; + JVM_Socket; + JVM_SocketAvailable; +diff --git a/hotspot/make/linux/makefiles/mapfile-vers-product b/hotspot/make/linux/makefiles/mapfile-vers-product +index 75e527894..64ccc47fb 100644 +--- a/hotspot/make/linux/makefiles/mapfile-vers-product ++++ b/hotspot/make/linux/makefiles/mapfile-vers-product +@@ -237,6 +237,7 @@ SUNWprivate_1.1 { + JVM_AdaptiveHeapGetG1PeriodicGCInterval; + JVM_AdaptiveHeapSetG1PeriodicGCLoadThreshold; + JVM_AdaptiveHeapGetG1PeriodicGCLoadThreshold; ++ JVM_DefineTrustedSharedClass; + JVM_Sleep; + JVM_Socket; + JVM_SocketAvailable; +diff --git a/hotspot/src/share/vm/cds/archiveBuilder.cpp b/hotspot/src/share/vm/cds/archiveBuilder.cpp +index 13a620028..decd638e0 100644 +--- a/hotspot/src/share/vm/cds/archiveBuilder.cpp ++++ b/hotspot/src/share/vm/cds/archiveBuilder.cpp +@@ -772,7 +772,12 @@ void ArchiveBuilder::clean_up_src_obj_table() { + } + + void ArchiveBuilder::write_archive(FileMapInfo* mapinfo) { ++#if INCLUDE_AGGRESSIVE_CDS ++ assert(mapinfo->header()->magic() == (UseAggressiveCDS ? ++ CDS_AGGRESSIVE_ARCHIVE_MAGIC : CDS_DYNAMIC_ARCHIVE_MAGIC), "Dynamic CDS or Aggressive CDS calls only"); ++#else + assert(mapinfo->header()->magic() == CDS_DYNAMIC_ARCHIVE_MAGIC, "Dynamic CDS calls only"); ++#endif // INCLUDE_AGGRESSIVE_CDS + + mapinfo->write_dynamic_header(); + +diff --git a/hotspot/src/share/vm/cds/dynamicArchive.cpp b/hotspot/src/share/vm/cds/dynamicArchive.cpp +index a623c5b00..2e5ab9385 100644 +--- a/hotspot/src/share/vm/cds/dynamicArchive.cpp ++++ b/hotspot/src/share/vm/cds/dynamicArchive.cpp +@@ -165,6 +165,16 @@ void DynamicArchiveBuilder::init_header() { + + FileMapInfo* base_info = FileMapInfo::current_info(); + _header->set_base_header_crc(base_info->header()->crc()); ++ ++#if INCLUDE_AGGRESSIVE_CDS ++ if (UseAggressiveCDS) { ++ int crc = FileMapInfo::DynamicArchiveHeader::get_current_program_crc(); ++ _header->set_program_crc(crc); ++ } else { ++ _header->set_program_crc(0); ++ } ++#endif // INCLUDE_AGGRESSIVE_CDS ++ + for (int i = 0; i < MetaspaceShared::n_regions; i++) { + _header->set_base_region_crc(i, base_info->header()->space_crc(i)); + } +@@ -401,6 +411,16 @@ bool DynamicArchive::validate(FileMapInfo* dynamic_info) { + return false; + } + ++#if INCLUDE_AGGRESSIVE_CDS ++ // Check the program crc ++ if (UseAggressiveCDS) { ++ if (dynamic_header->program_crc() != FileMapInfo::DynamicArchiveHeader::get_current_program_crc()) { ++ FileMapInfo::fail_continue("Aggressive Dynamic archive cannot be used: program crc verification failed."); ++ return false; ++ } ++ } ++#endif // INCLUDE_AGGRESSIVE_CDS ++ + // Check each space's crc + for (int i = 0; i < MetaspaceShared::n_regions; i++) { + if (dynamic_header->base_region_crc(i) != base_info->space_crc(i)) { +diff --git a/hotspot/src/share/vm/classfile/classFileParser.cpp b/hotspot/src/share/vm/classfile/classFileParser.cpp +index b9fde38dc..8f1b2d47a 100644 +--- a/hotspot/src/share/vm/classfile/classFileParser.cpp ++++ b/hotspot/src/share/vm/classfile/classFileParser.cpp +@@ -4416,6 +4416,38 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name, + if (DynamicDumpSharedSpaces && !SystemDictionary::is_builtin_loader(class_loader)) { + this_klass->set_shared_classpath_index(UNREGISTERED_INDEX); + SystemDictionaryShared::set_shared_class_misc_info(this_klass(), cfs); ++#if INCLUDE_AGGRESSIVE_CDS ++ if (UseAggressiveCDS && protection_domain() != NULL) { ++ ResourceMark rm(THREAD); ++ KlassHandle protectionDomain_klass(THREAD, SystemDictionary::ProtectionDomain_klass()); ++ JavaValue result(T_OBJECT); ++ JavaCalls::call_virtual(&result, ++ protection_domain, ++ protectionDomain_klass, ++ vmSymbols::getLocationNoFragString_name(), ++ vmSymbols::void_string_signature(), ++ THREAD); ++ if (!HAS_PENDING_EXCEPTION) { ++ oop res_oop = (oop) result.get_jobject(); ++ if (res_oop != NULL) { ++ char* string_value = java_lang_String::as_utf8_string(res_oop); ++ if (strlen(string_value) != 0) { ++ SystemDictionaryShared::set_url_string(this_klass(), string_value); ++ SystemDictionaryShared::save_timestamp(this_klass(), string_value); ++ } ++ } ++ } else { ++ char* ex_msg = const_cast(""); ++ oop message = java_lang_Throwable::message(PENDING_EXCEPTION); ++ if (message != NULL) { ++ ex_msg = java_lang_String::as_utf8_string(message); ++ } ++ dynamic_cds_log->print_cr("get LocationNoFragString from protection_domain has encountered exception: %s %s", ++ PENDING_EXCEPTION->klass()->external_name(), ex_msg); ++ CLEAR_PENDING_EXCEPTION; ++ } ++ } ++#endif // INCLUDE_AGGRESSIVE_CDS + } + #endif // INCLUDE_CDS + +diff --git a/hotspot/src/share/vm/classfile/systemDictionaryShared.cpp b/hotspot/src/share/vm/classfile/systemDictionaryShared.cpp +index 3a601ee37..7707d6ac6 100644 +--- a/hotspot/src/share/vm/classfile/systemDictionaryShared.cpp ++++ b/hotspot/src/share/vm/classfile/systemDictionaryShared.cpp +@@ -35,6 +35,10 @@ + #include "utilities/resourceHash.hpp" + #include "runtime/mutexLocker.hpp" + #include "utilities/ostream.hpp" ++#if INCLUDE_AGGRESSIVE_CDS ++#include "memory/oopFactory.hpp" ++#include "runtime/javaCalls.hpp" ++#endif // INCLUDE_AGGRESSIVE_CDS + + DEBUG_ONLY(bool SystemDictionaryShared::_no_class_loading_should_happen = false;) + bool SystemDictionaryShared::_dump_in_progress = false; +@@ -68,6 +72,14 @@ public: + } + }; + ++#if INCLUDE_AGGRESSIVE_CDS ++ struct DTSharedClassFile { ++ int length; ++ u1 data[1]; ++ int obj_size() { return ((int)sizeof(length)) + length; } ++ }; ++#endif // INCLUDE_AGGRESSIVE_CDS ++ + InstanceKlass* _klass; + InstanceKlass* _nest_host; + bool _failed_verification; +@@ -78,6 +90,10 @@ public: + GrowableArray* _verifier_constraints; + GrowableArray* _verifier_constraint_flags; + GrowableArray* _loader_constraints; ++#if INCLUDE_AGGRESSIVE_CDS ++ DTSharedClassFile* _url_string; ++ int64_t _classfile_timestamp; ++#endif // INCLUDE_AGGRESSIVE_CDS + + DumpTimeSharedClassInfo() { + _klass = NULL; +@@ -92,6 +108,10 @@ public: + _verifier_constraints = NULL; + _verifier_constraint_flags = NULL; + _loader_constraints = NULL; ++#if INCLUDE_AGGRESSIVE_CDS ++ _url_string = NULL; ++ _classfile_timestamp = 0; ++#endif // INCLUDE_AGGRESSIVE_CDS + } + + void add_verification_constraint(InstanceKlass* k, Symbol* name, +@@ -149,6 +169,44 @@ public: + void set_failed_verification() { _failed_verification = true; } + InstanceKlass* nest_host() const { return _nest_host; } + void set_nest_host(InstanceKlass* nest_host) { _nest_host = nest_host; } ++ ++#if INCLUDE_AGGRESSIVE_CDS ++ DTSharedClassFile* url_string() { ++ return _url_string; ++ } ++ ++ size_t url_string_size() { ++ if (_url_string != NULL) { ++ return (size_t)(_url_string->obj_size()); ++ } ++ return (size_t)0; ++ } ++ ++ void copy_url_string(char* string_value) { ++ assert(strlen(string_value) != 0, "sanity"); ++ size_t string_len = strlen(string_value) + (size_t)1; ++ size_t size = offset_of(DTSharedClassFile, data) + string_len; ++ _url_string = (DTSharedClassFile*) NEW_C_HEAP_ARRAY(u1, size, mtInternal); ++ _url_string->length = (int)string_len; ++ memcpy(_url_string->data, string_value, string_len); ++ assert((int)size == _url_string->obj_size(), "sanity"); ++ } ++ ++ void free_url_string() { ++ if (_url_string != NULL) { ++ FREE_C_HEAP_ARRAY(u1, _url_string, mtInternal); ++ _url_string = NULL; ++ } ++ } ++ ++ int64_t classfile_timestamp() { ++ return _classfile_timestamp; ++ } ++ ++ void set_classfile_timestamp(int64_t classfile_timestamp) { ++ _classfile_timestamp = classfile_timestamp; ++ } ++#endif // INCLUDE_AGGRESSIVE_CDS + }; + + inline unsigned DumpTimeSharedClassTable_hash(InstanceKlass* const& k) { +@@ -245,7 +303,18 @@ public: + } + }; + ++#if INCLUDE_AGGRESSIVE_CDS ++ struct RTSharedClassFile { ++ int length; ++ u1 data[1]; ++ }; ++#endif // INCLUDE_AGGRESSIVE_CDS ++ + InstanceKlass* _klass; ++#if INCLUDE_AGGRESSIVE_CDS ++ RTSharedClassFile* _url_string; ++ int64_t _classfile_timestamp; ++#endif // INCLUDE_AGGRESSIVE_CDS + int _num_verifier_constraints; + int _num_loader_constraints; + +@@ -294,6 +363,17 @@ public: + verifier_constraint_flags_size(num_verifier_constraints); + } + ++#if INCLUDE_AGGRESSIVE_CDS ++ static size_t byte_size(DumpTimeSharedClassInfo& info) { ++ size_t previous_size = byte_size(info._klass, info.num_verifier_constraints(), info.num_loader_constraints()); ++ if (UseAggressiveCDS) { ++ size_t cf_size = info.url_string_size(); ++ if (cf_size != 0) return align_up(previous_size, sizeof(int)) + cf_size; ++ } ++ return previous_size; ++ } ++#endif // INCLUDE_AGGRESSIVE_CDS ++ + private: + size_t crc_offset() const { + return header_size_size(); +@@ -321,6 +401,13 @@ private: + assert(0 <= i && i < _num_loader_constraints, "sanity"); + } + ++#if INCLUDE_AGGRESSIVE_CDS ++ size_t url_string_offset() const { ++ return align_up(verifier_constraint_flags_offset() + verifier_constraint_flags_size(_num_verifier_constraints), ++ sizeof(int)); ++ } ++#endif // INCLUDE_AGGRESSIVE_CDS ++ + public: + CrcInfo* crc() const { + assert(crc_size(_klass) > 0, "must be"); +@@ -350,6 +437,20 @@ public: + return loader_constraints() + i; + } + ++#if INCLUDE_AGGRESSIVE_CDS ++ RTSharedClassFile* url_string() { ++ return (RTSharedClassFile*)(address(this) + url_string_offset()); ++ } ++ ++ int64_t classfile_timestamp() { ++ return _classfile_timestamp; ++ } ++ ++ void set_classfile_timestamp(int64_t classfile_timestamp) { ++ _classfile_timestamp = classfile_timestamp; ++ } ++#endif // INCLUDE_AGGRESSIVE_CDS ++ + void init(DumpTimeSharedClassInfo& info) { + ArchiveBuilder* builder = ArchiveBuilder::current(); + assert(builder->is_in_buffer_space(info._klass), "must be"); +@@ -383,6 +484,18 @@ public: + } + } + ++#if INCLUDE_AGGRESSIVE_CDS ++ if (info.url_string_size() != 0) { ++ _url_string = url_string(); ++ memcpy(_url_string, info.url_string(), info.url_string_size()); ++ ArchivePtrMarker::mark_pointer(&_url_string); ++ info.free_url_string(); ++ } else { ++ _url_string = NULL; ++ } ++ set_classfile_timestamp(info.classfile_timestamp()); ++#endif // INCLUDE_AGGRESSIVE_CDS ++ + ArchivePtrMarker::mark_pointer(&_klass); + } + +@@ -426,6 +539,69 @@ public: + const RunTimeSharedClassInfo* value, Symbol* key, int len_unused) { + return (value->_klass->name() == key); + } ++ ++#if INCLUDE_AGGRESSIVE_CDS ++ // check timestamp in the load time when UseAggressiveCDS. ++ // regular_file(*.class): need to check timestamp. ++ // jar_file(*.jar): no need to check timestamp here,already check programe_crc ++ // somewhere else, see DynamicArchive::validate. ++ // other_file: not supported when UseAggressiveCDS. ++ bool check_classfile_timestamp(char* url_string, TRAPS) { ++ if (SystemDictionaryShared::is_regular_file(url_string)) { ++ ResourceMark rm(THREAD); ++ char* dir = SystemDictionaryShared::get_filedir(url_string); ++ if (dir == NULL) { ++ return false; ++ } ++ int64_t timestamp = SystemDictionaryShared::get_timestamp(dir, _klass->name()); ++ if (timestamp != _classfile_timestamp) { ++ dynamic_cds_log->print_cr("%s, timestamp mismatch: " INT64_FORMAT " -> " INT64_FORMAT, _klass->name()->as_C_string(), _classfile_timestamp, timestamp); ++ return false; ++ } ++ } else if (!SystemDictionaryShared::is_jar_file(url_string)) { ++ dynamic_cds_log->print_cr("Unsupported URL:%s", url_string); ++ return false; ++ } ++ return true; ++ } ++ ++ Handle get_protection_domain(Handle class_loader, TRAPS) { ++ if (_url_string == NULL) { ++ return Handle(); ++ } ++ char* data_ptr = (char*)(_url_string->data); ++ ++ if (CheckClassFileTimeStamp) { ++ if (!check_classfile_timestamp(data_ptr, THREAD)) { ++ return Handle(); ++ } ++ } ++ ++ Handle url_string = java_lang_String::create_from_str(data_ptr, THREAD); ++ JavaValue result(T_OBJECT); ++ JavaCalls::call_virtual(&result, ++ class_loader, ++ class_loader->klass(), ++ vmSymbols::getProtectionDomainByURLString_name(), ++ vmSymbols::getProtectionDomainInternal_signature(), ++ url_string, THREAD); ++ if (!HAS_PENDING_EXCEPTION) { ++ oop pd = (oop) result.get_jobject(); ++ return Handle(THREAD, pd); ++ } else { ++ ResourceMark rm(THREAD); ++ char* ex_msg = const_cast(""); ++ oop message = java_lang_Throwable::message(PENDING_EXCEPTION); ++ if (message != NULL) { ++ ex_msg = java_lang_String::as_utf8_string(message); ++ } ++ dynamic_cds_log->print_cr("get protection_domain has encountered exception: %s %s", ++ PENDING_EXCEPTION->klass()->external_name(), ex_msg); ++ CLEAR_PENDING_EXCEPTION; ++ } ++ return Handle(); ++ } ++#endif // INCLUDE_AGGRESSIVE_CDS + }; + + class RunTimeSharedDictionary : public OffsetCompactHashtable< +@@ -710,7 +886,11 @@ public: + + bool do_entry(InstanceKlass* k, DumpTimeSharedClassInfo& info) { + if (!info.is_excluded()) { ++#if INCLUDE_AGGRESSIVE_CDS ++ size_t byte_size = RunTimeSharedClassInfo::byte_size(info); ++#else + size_t byte_size = RunTimeSharedClassInfo::byte_size(info._klass, info.num_verifier_constraints(), info.num_loader_constraints()); ++#endif // INCLUDE_AGGRESSIVE_CDS + _shared_class_info_size += align_up(byte_size, KlassAlignmentInBytes); + } + return true; // keep on iterating +@@ -746,6 +926,38 @@ unsigned int SystemDictionaryShared::hash_for_shared_dictionary(address ptr) { + } + } + ++#if INCLUDE_AGGRESSIVE_CDS ++class ExcludeDuplicateKlass : StackObj { ++public: ++ static const int INITIAL_TABLE_SIZE = 15889; ++ ++ ExcludeDuplicateKlass(int size) : _has_been_visited(size) {} ++ ++ bool do_entry(InstanceKlass* k, DumpTimeSharedClassInfo& info) { ++ if (!info.is_excluded()) { ++ bool created; ++ Symbol* name = info._klass->name(); ++ address* info_ptr = _has_been_visited.add_if_absent((address)name, (address)&info, &created); ++ if (!created) { ++ info.set_excluded(); ++ DumpTimeSharedClassInfo* first_info = (DumpTimeSharedClassInfo*)(*info_ptr); ++ if (!first_info->is_excluded()) { ++ first_info->set_excluded(); ++ } ++ if (TraceDynamicCDS) { ++ ResourceMark rm; ++ dynamic_cds_log->print_cr("[AggressiveCDS] Skipping duplicate class (excluded): %s", name->as_C_string()); ++ } ++ } ++ } ++ return true; ++ } ++ ++private: ++ KVHashtable _has_been_visited; ++}; ++#endif // INCLUDE_AGGRESSIVE_CDS ++ + class CopySharedClassInfoToArchive : StackObj { + CompactHashtableWriter* _writer; + bool _is_builtin; +@@ -757,7 +969,11 @@ public: + + bool do_entry(InstanceKlass* k, DumpTimeSharedClassInfo& info) { + if (!info.is_excluded() && info.is_builtin() == _is_builtin) { ++#if INCLUDE_AGGRESSIVE_CDS ++ size_t byte_size = RunTimeSharedClassInfo::byte_size(info); ++#else + size_t byte_size = RunTimeSharedClassInfo::byte_size(info._klass, info.num_verifier_constraints(), info.num_loader_constraints()); ++#endif // INCLUDE_AGGRESSIVE_CDS + RunTimeSharedClassInfo* record; + record = (RunTimeSharedClassInfo*)ArchiveBuilder::ro_region_alloc(byte_size); + record->init(info); +@@ -787,6 +1003,12 @@ void SystemDictionaryShared::write_dictionary(RunTimeSharedDictionary* dictionar + bool is_builtin) { + CompactHashtableStats stats; + dictionary->reset(); ++#if INCLUDE_AGGRESSIVE_CDS ++ if (UseAggressiveCDS && !is_builtin) { ++ ExcludeDuplicateKlass dup(ExcludeDuplicateKlass::INITIAL_TABLE_SIZE); ++ _dumptime_table->iterate(&dup); ++ } ++#endif // INCLUDE_AGGRESSIVE_CDS + CompactHashtableWriter writer(_dumptime_table->count_of(is_builtin), &stats); + CopySharedClassInfoToArchive copy(&writer, is_builtin); + assert_lock_strong(DumpTimeTable_lock); +@@ -909,3 +1131,156 @@ InstanceKlass* SystemDictionaryShared::find_dynamic_builtin_class(Symbol* name) + return NULL; + } + } ++ ++#if INCLUDE_AGGRESSIVE_CDS ++static const char* JAR_FILE_PREFIX = "jar://file:"; ++static const char* FILE_SEPARATOR = "file://"; ++static const char* CLASSFILE_SUFFIX = ".class"; ++ ++static bool start_with(char* str, const char* prefix) { ++ if (str == NULL || prefix == NULL || strlen(str) < strlen(prefix)) { ++ return false; ++ } ++ if (strncmp(str, prefix, strlen(prefix)) == 0) { ++ return true; ++ } ++ return false; ++} ++ ++bool SystemDictionaryShared::is_jar_file(char* url_string) { ++ if (start_with(url_string, JAR_FILE_PREFIX)) { ++ return true; ++ } ++ return false; ++} ++ ++bool SystemDictionaryShared::is_regular_file(char* url_string) { ++ if (start_with(url_string, FILE_SEPARATOR)) { ++ return true; ++ } ++ return false; ++} ++ ++char* SystemDictionaryShared::get_filedir(char* url_string) { ++ if (!is_regular_file(url_string)) { ++ return NULL; ++ } ++ char* dir = url_string + strlen(FILE_SEPARATOR); ++ struct stat st; ++ if (os::stat(dir, &st) == 0) { ++ if ((st.st_mode & S_IFDIR) == S_IFDIR) { ++ return dir; ++ } ++ } ++ return NULL; ++} ++ ++int64_t SystemDictionaryShared::get_timestamp(char* dir, Symbol* class_name) { ++ char* name = class_name->as_C_string(); ++ size_t name_len = strlen(name); ++ size_t dir_len = strlen(dir); ++ size_t classfile_suffix_len = strlen(CLASSFILE_SUFFIX); ++ char* file_path = NEW_RESOURCE_ARRAY(char, dir_len + name_len + classfile_suffix_len + 1); ++ memcpy(file_path, dir, dir_len); ++ memcpy(file_path + dir_len, name, name_len); ++ memcpy(file_path + dir_len + name_len, CLASSFILE_SUFFIX, classfile_suffix_len + 1); ++ assert(strlen(file_path) == dir_len + name_len + classfile_suffix_len, "sanity"); ++ struct stat st; ++ if (os::stat(file_path, &st) == 0) { ++ return st.st_mtime; ++ } ++ dynamic_cds_log->print_cr("get timestamp failed:%s", file_path); ++ return 0; ++} ++ ++Handle SystemDictionaryShared::get_protection_domain(InstanceKlass* k, Handle class_loader, TRAPS) { ++ assert(UseAggressiveCDS, "sanity"); ++ RunTimeSharedClassInfo* info = RunTimeSharedClassInfo::get_for(k); ++ assert(!is_builtin_loader(class_loader), "sanity"); ++ return info->get_protection_domain(class_loader, THREAD); ++} ++ ++void SystemDictionaryShared::set_url_string(InstanceKlass* k, char* string_value) { ++ assert(UseAggressiveCDS, "sanity"); ++ Arguments::assert_is_dumping_archive(); ++ assert(!is_builtin(k), "must be unregistered class"); ++ DumpTimeSharedClassInfo* info = find_or_allocate_info_for(k); ++ if (info != NULL && info->_url_string == NULL) { ++ info->copy_url_string(string_value); ++ } ++} ++ ++void SystemDictionaryShared::save_timestamp(InstanceKlass* k, char* string_value) { ++ if (SystemDictionaryShared::is_regular_file(string_value)) { ++ char* dir = SystemDictionaryShared::get_filedir(string_value); ++ if (dir != NULL) { ++ int64_t timestamp = SystemDictionaryShared::get_timestamp(dir, k->name()); ++ SystemDictionaryShared::set_classfile_timestamp(k, timestamp); ++ } ++ } else if (!SystemDictionaryShared::is_jar_file(string_value)) { ++ dynamic_cds_log->print_cr("Unsupported URL:%s", string_value); ++ } ++} ++ ++void SystemDictionaryShared::set_classfile_timestamp(InstanceKlass* k, int64_t classfile_timestamp) { ++ assert(UseAggressiveCDS, "sanity"); ++ Arguments::assert_is_dumping_archive(); ++ assert(!is_builtin(k), "must be unregistered class"); ++ DumpTimeSharedClassInfo* info = find_or_allocate_info_for(k); ++ if (info != NULL) { ++ info->set_classfile_timestamp(classfile_timestamp); ++ } ++} ++ ++InstanceKlass* SystemDictionaryShared::lookup_trusted_share_class(Symbol* class_name, ++ Handle class_loader, ++ TRAPS) { ++ assert(UseAggressiveCDS, "sanity"); ++ if (!UseSharedSpaces) { ++ return NULL; ++ } ++ if (class_name == NULL) { // don't do this for hidden classes ++ return NULL; ++ } ++ if (SystemDictionary::is_builtin_loader(class_loader)) { ++ // Do nothing for the BUILTIN loaders. ++ return NULL; ++ } ++ ++ // Classloaders that support parallelism, e.g. bootstrap classloader, ++ // or all classloaders with UnsyncloadClass do not acquire lock here ++ bool DoObjectLock = true; ++ if (is_parallelCapable(class_loader)) { ++ DoObjectLock = false; ++ } ++ ++ register_loader(class_loader, CHECK_NULL); ++ ++ // Make sure we are synchronized on the class loader before we proceed ++ Handle lockObject = compute_loader_lock_object(class_loader, THREAD); ++ check_loader_lock_contention(lockObject, THREAD); ++ ObjectLocker ol(lockObject, THREAD, DoObjectLock); ++ ++ const RunTimeSharedClassInfo* record = find_record(&_dynamic_unregistered_dictionary, class_name); ++ if (record == NULL) { ++ return NULL; ++ } ++ ++ Handle protection_domain = SystemDictionaryShared::get_protection_domain(record->_klass, class_loader, CHECK_NULL); ++ ++ if (protection_domain.is_null()) { ++ // URL not matched, which means should not be loaded by this classloader ++ return NULL; ++ } ++ ++ instanceKlassHandle k = acquire_class_for_current_thread(record->_klass, class_loader, protection_domain, NULL, THREAD); ++ if (!HAS_PENDING_EXCEPTION && k() != NULL) { ++ if (is_parallelCapable(class_loader)) { ++ k = find_or_define_instance_class(class_name, class_loader, k, THREAD); ++ } else { ++ define_instance_class(k, THREAD); ++ } ++ } ++ return k(); ++} ++#endif // INCLUDE_AGGRESSIVE_CDS +\ No newline at end of file +diff --git a/hotspot/src/share/vm/classfile/systemDictionaryShared.hpp b/hotspot/src/share/vm/classfile/systemDictionaryShared.hpp +index fb9583d4e..3025e7350 100644 +--- a/hotspot/src/share/vm/classfile/systemDictionaryShared.hpp ++++ b/hotspot/src/share/vm/classfile/systemDictionaryShared.hpp +@@ -238,6 +238,19 @@ public: + TRAPS); + + static InstanceKlass* find_dynamic_builtin_class(Symbol* name); ++ ++#if INCLUDE_AGGRESSIVE_CDS ++ static bool is_jar_file(char* url_string); ++ static bool is_regular_file(char* url_string); ++ static char* get_filedir(char* url_string); ++ static int64_t get_timestamp(char* dir, Symbol* class_name); ++ static Handle get_protection_domain(InstanceKlass* k, Handle class_loader, TRAPS); ++ static void set_url_string(InstanceKlass* k, char* string_value); ++ static void save_timestamp(InstanceKlass* k, char* string_value); ++ static void set_classfile_timestamp(InstanceKlass* k, int64_t classfile_timestamp); ++ static int64_t get_classfile_timestamp(InstanceKlass* k); ++ static InstanceKlass* lookup_trusted_share_class(Symbol* class_name, Handle class_loader, TRAPS); ++#endif // INCLUDE_AGGRESSIVE_CDS + }; + + #endif // SHARE_VM_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP +diff --git a/hotspot/src/share/vm/classfile/vmSymbols.hpp b/hotspot/src/share/vm/classfile/vmSymbols.hpp +index 79f15589f..2ddc6581e 100644 +--- a/hotspot/src/share/vm/classfile/vmSymbols.hpp ++++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp +@@ -421,6 +421,8 @@ + template(definePackageInternal_signature, "(Ljava/lang/String;Ljava/util/jar/Manifest;Ljava/net/URL;)V") \ + template(getProtectionDomainInternal_name, "getProtectionDomainInternal") \ + template(getProtectionDomainInternal_signature, "(Ljava/lang/String;)Ljava/security/ProtectionDomain;") \ ++ template(getProtectionDomainByURLString_name, "getProtectionDomainByURLString") \ ++ template(getLocationNoFragString_name, "getLocationNoFragString") \ + template(url_code_signer_array_void_signature, "(Ljava/net/URL;[Ljava/security/CodeSigner;)V") \ + template(resolved_references_name, "") \ + template(referencequeue_null_name, "NULL") \ +diff --git a/hotspot/src/share/vm/memory/filemap.cpp b/hotspot/src/share/vm/memory/filemap.cpp +index 166fe2b80..b60d77be6 100644 +--- a/hotspot/src/share/vm/memory/filemap.cpp ++++ b/hotspot/src/share/vm/memory/filemap.cpp +@@ -208,7 +208,11 @@ size_t FileMapInfo::DynamicArchiveHeader::data_size() { + } + + bool FileMapInfo::DynamicArchiveHeader::validate() { ++#if INCLUDE_AGGRESSIVE_CDS ++ if (_magic != (UseAggressiveCDS ? CDS_AGGRESSIVE_ARCHIVE_MAGIC : CDS_DYNAMIC_ARCHIVE_MAGIC)) { ++#else + if (_magic != CDS_DYNAMIC_ARCHIVE_MAGIC) { ++#endif // INCLUDE_AGGRESSIVE_CDS + FileMapInfo::fail_continue("The shared archive file has a bad magic number."); + return false; + } +@@ -243,9 +247,48 @@ bool FileMapInfo::DynamicArchiveHeader::validate() { + return true; + } + ++#if INCLUDE_AGGRESSIVE_CDS ++int FileMapInfo::DynamicArchiveHeader::get_current_program_crc() { ++ int cur_crc = 0; ++ const char* full_cmd = Arguments::java_command(); ++ if (full_cmd == NULL) { ++ return 0; ++ } ++ const char* main_path = Arguments::get_appclasspath(); ++ int main_path_len = strlen(main_path); ++ bool is_jar_file = strncmp(full_cmd, main_path, main_path_len) == 0; ++ if (is_jar_file) { ++ fio_fd fd = os::open(main_path, O_RDONLY | O_BINARY, 0); ++ assert(fd >= 0, "sanity"); ++ ++ uint32_t file_size = (uint32_t) os::lseek(fd, 0, SEEK_END); ++ os::lseek(fd, 0, SEEK_SET); ++ uint32_t max_size = 40 * 1024 * 1024; // 40M ++ ++ ResourceMark rm; ++ char* buf = NEW_RESOURCE_ARRAY(char, max_size); ++ ++ while(file_size) { ++ uint32_t size = MIN2(max_size, file_size); ++ size_t n = os::read(fd, buf, (unsigned int)size); ++ file_size -= n; ++ cur_crc = ClassLoader::crc32(cur_crc, buf, n); ++ } ++ } ++ return cur_crc; ++} ++#endif // INCLUDE_AGGRESSIVE_CDS ++ + void FileMapInfo::FileMapHeader::populate(FileMapInfo* mapinfo, size_t alignment) { + if (DynamicDumpSharedSpaces) { +- _magic = CDS_DYNAMIC_ARCHIVE_MAGIC; ++#if INCLUDE_AGGRESSIVE_CDS ++ if (UseAggressiveCDS) { ++ _magic = CDS_AGGRESSIVE_ARCHIVE_MAGIC; ++ } else ++#endif // INCLUDE_AGGRESSIVE_CDS ++ { ++ _magic = CDS_DYNAMIC_ARCHIVE_MAGIC; ++ } + } else { + _magic = CDS_ARCHIVE_MAGIC; + } +@@ -434,7 +477,11 @@ bool FileMapInfo::get_base_archive_name_from_header(const char* archive_name, + os::close(fd); + return false; + } ++#if INCLUDE_AGGRESSIVE_CDS ++ if (dynamic_header->magic() != (UseAggressiveCDS ? CDS_AGGRESSIVE_ARCHIVE_MAGIC : CDS_DYNAMIC_ARCHIVE_MAGIC)) { ++#else + if (dynamic_header->magic() != CDS_DYNAMIC_ARCHIVE_MAGIC) { ++#endif // INCLUDE_AGGRESSIVE_CDS + // Not a dynamic header, no need to proceed further. + *size = 0; + delete dynamic_header; +@@ -499,7 +546,11 @@ bool FileMapInfo::check_archive(const char* archive_name, bool is_static) { + } + } else { + DynamicArchiveHeader* dynamic_header = (DynamicArchiveHeader*)header; ++#if INCLUDE_AGGRESSIVE_CDS ++ if (dynamic_header->magic() != (UseAggressiveCDS ? CDS_AGGRESSIVE_ARCHIVE_MAGIC : CDS_DYNAMIC_ARCHIVE_MAGIC)) { ++#else + if (dynamic_header->magic() != CDS_DYNAMIC_ARCHIVE_MAGIC) { ++#endif // INCLUDE_AGGRESSIVE_CDS + delete header; + os::close(fd); + vm_exit_during_initialization("Not a top shared archive", archive_name); +diff --git a/hotspot/src/share/vm/memory/filemap.hpp b/hotspot/src/share/vm/memory/filemap.hpp +index f6cf43a64..c246f0367 100644 +--- a/hotspot/src/share/vm/memory/filemap.hpp ++++ b/hotspot/src/share/vm/memory/filemap.hpp +@@ -41,6 +41,7 @@ + + #define CDS_ARCHIVE_MAGIC 0xf00baba2 + #define CDS_DYNAMIC_ARCHIVE_MAGIC 0xf00baba8 ++#define CDS_AGGRESSIVE_ARCHIVE_MAGIC 0xf00baba4 + + static const int JVM_IDENT_MAX = 256; + +@@ -168,6 +169,9 @@ public: + struct DynamicArchiveHeader : FileMapHeader { + private: + int _base_header_crc; ++#if INCLUDE_AGGRESSIVE_CDS ++ int _program_crc; ++#endif // INCLUDE_AGGRESSIVE_CDS + int _base_region_crc[MetaspaceShared::n_regions]; + char* _requested_base_address; // Archive relocation is not necessary if we map with this base address. + size_t _ptrmap_size_in_bits; // Size of pointer relocation bitmap +@@ -186,6 +190,11 @@ public: + _base_region_crc[i] = c; + } + ++#if INCLUDE_AGGRESSIVE_CDS ++ int program_crc() const { return _program_crc; } ++ void set_program_crc(int c) { _program_crc = c; } ++#endif // INCLUDE_AGGRESSIVE_CDS ++ + void set_requested_base(char* b) { + _requested_base_address = b; + } +@@ -199,6 +208,8 @@ public: + char* serialized_data() const { return from_mapped_offset(_serialized_data_offset); } + + virtual bool validate(); ++ ++ static int get_current_program_crc(); + }; + + FileMapHeader * _header; +diff --git a/hotspot/src/share/vm/prims/jvm.cpp b/hotspot/src/share/vm/prims/jvm.cpp +index 55667ac32..2cc38cf66 100644 +--- a/hotspot/src/share/vm/prims/jvm.cpp ++++ b/hotspot/src/share/vm/prims/jvm.cpp +@@ -3321,6 +3321,36 @@ JVM_ENTRY(jint, JVM_AdaptiveHeapGetG1PeriodicGCLoadThreshold(JNIEnv *env, jclass + #endif + JVM_END + ++JVM_ENTRY(jclass, JVM_DefineTrustedSharedClass(JNIEnv *env, const char *name, jobject loader)) ++#if INCLUDE_AGGRESSIVE_CDS ++ assert(UseAggressiveCDS, "sanity"); ++ ++ TempNewSymbol class_name = NULL; ++ if (name != NULL) { ++ const int str_len = (int)strlen(name); ++ if (str_len > Symbol::max_length()) { ++ // It's impossible to create this class; the name cannot fit ++ // into the constant pool. ++ THROW_MSG_0(vmSymbols::java_lang_NoClassDefFoundError(), name); ++ } ++ class_name = SymbolTable::new_symbol(name, str_len, CHECK_NULL); ++ } ++ ++ ResourceMark rm(THREAD); ++ Handle class_loader (THREAD, JNIHandles::resolve(loader)); ++ InstanceKlass* k = SystemDictionaryShared::lookup_trusted_share_class(class_name, ++ class_loader, ++ CHECK_NULL); ++ if (k == NULL) { ++ return NULL; ++ } ++ ++ return (jclass) JNIHandles::make_local(THREAD, k->java_mirror()); ++#else ++ return NULL; ++#endif // INCLUDE_AGGRESSIVE_CDS ++JVM_END ++ + JVM_ENTRY(void, JVM_Yield(JNIEnv *env, jclass threadClass)) + JVMWrapper("JVM_Yield"); + if (os::dont_yield()) return; +diff --git a/hotspot/src/share/vm/prims/jvm.h b/hotspot/src/share/vm/prims/jvm.h +index 0f22f7b12..46a65604c 100644 +--- a/hotspot/src/share/vm/prims/jvm.h ++++ b/hotspot/src/share/vm/prims/jvm.h +@@ -1598,6 +1598,12 @@ JNIEXPORT jint JNICALL + JVM_AdaptiveHeapGetG1PeriodicGCLoadThreshold(JNIEnv *env, jclass clazz); + + ++/** ++ * Define the trusted shared class. ++ */ ++JNIEXPORT jclass JNICALL ++JVM_DefineTrustedSharedClass(JNIEnv *env, const char *name, jobject loader); ++ + /* ========================================================================= + * The following defines a private JVM interface that the JDK can query + * for the JVM version and capabilities. sun.misc.Version defines +diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp +index 45fbc1423..557695791 100644 +--- a/hotspot/src/share/vm/runtime/arguments.cpp ++++ b/hotspot/src/share/vm/runtime/arguments.cpp +@@ -4356,6 +4356,11 @@ jint Arguments::apply_ergo() { + + ArgumentsExt::set_gc_specific_flags(); + ++#if INCLUDE_AGGRESSIVE_CDS ++ result = init_aggressive_cds_properties(); ++ if (result != JNI_OK) return result; ++#endif // INCLUDE_AGGRESSIVE_CDS ++ + // Initialize Metaspace flags and alignments. + Metaspace::ergo_initialize(); + +@@ -4640,3 +4645,14 @@ bool Arguments::copy_expand_pid(const char* src, size_t srclen, + *b = '\0'; + return (p == src_end); // return false if not all of the source was copied + } ++ ++#if INCLUDE_AGGRESSIVE_CDS ++jint Arguments::init_aggressive_cds_properties() { ++ if (!is_dumping_archive() && SharedDynamicArchivePath != NULL && UseAggressiveCDS) { ++ bool added = false; ++ added = add_property("jdk.jbooster.aggressivecds.load=true"); ++ if (!added) return JNI_ENOMEM; ++ } ++ return JNI_OK; ++} ++#endif // INCLUDE_AGGRESSIVE_CDS +\ No newline at end of file +diff --git a/hotspot/src/share/vm/runtime/arguments.hpp b/hotspot/src/share/vm/runtime/arguments.hpp +index 4f7232e48..fdd1d14b0 100644 +--- a/hotspot/src/share/vm/runtime/arguments.hpp ++++ b/hotspot/src/share/vm/runtime/arguments.hpp +@@ -576,6 +576,10 @@ class Arguments : AllStatic { + assert(Arguments::is_dumping_archive(), "dump time only"); + } + ++#if INCLUDE_AGGRESSIVE_CDS ++ static jint init_aggressive_cds_properties(); ++#endif // INCLUDE_AGGRESSIVE_CDS ++ + static bool CompileMethod(char* className, char* methodName) { + return + methodExists( +diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp +index 77a4ff0b2..6aa53d2d2 100644 +--- a/hotspot/src/share/vm/runtime/globals.hpp ++++ b/hotspot/src/share/vm/runtime/globals.hpp +@@ -4119,6 +4119,14 @@ class CommandLineFlags { + product(bool, UseAppCDS, false, \ + "Enable Application Class Data Sharing (AppCDS)") \ + \ ++ experimental(bool, UseAggressiveCDS, false, \ ++ "An aggressive stratage to improve start-up " \ ++ "because we avoid decoding the classfile.") \ ++ \ ++ experimental(bool, CheckClassFileTimeStamp, true, \ ++ "Check whether the modification time of the" \ ++ "class file is changed during UseAggressiveCDS.") \ ++ \ + product(bool, EnableSplitVerifierForAppCDS, false, \ + "Enable Type Check (AppCDS)") \ + \ +diff --git a/hotspot/src/share/vm/utilities/macros.hpp b/hotspot/src/share/vm/utilities/macros.hpp +index 599e1074d..f631c94c4 100644 +--- a/hotspot/src/share/vm/utilities/macros.hpp ++++ b/hotspot/src/share/vm/utilities/macros.hpp +@@ -106,6 +106,7 @@ + + #ifndef INCLUDE_CDS + #define INCLUDE_CDS 1 ++#define INCLUDE_AGGRESSIVE_CDS 1 + #endif + + #if INCLUDE_CDS +@@ -120,6 +121,14 @@ + #define NOT_CDS_RETURN_(code) { return code; } + #endif // INCLUDE_CDS + ++#if INCLUDE_AGGRESSIVE_CDS ++#define AGGRESSIVE_CDS_ONLY(x) x ++#define NOT_AGGRESSIVE_CDS(x) ++#else ++#define AGGRESSIVE_CDS_ONLY(x) ++#define NOT_AGGRESSIVE_CDS(x) x ++#endif // INCLUDE_AGGRESSIVE_CDS ++ + #ifndef INCLUDE_MANAGEMENT + #define INCLUDE_MANAGEMENT 1 + #endif // INCLUDE_MANAGEMENT +diff --git a/jdk/make/mapfiles/libjava/mapfile-linux b/jdk/make/mapfiles/libjava/mapfile-linux +index ae118af70..61ec28513 100644 +--- a/jdk/make/mapfiles/libjava/mapfile-linux ++++ b/jdk/make/mapfiles/libjava/mapfile-linux +@@ -129,6 +129,7 @@ SUNWprivate_1.1 { + Java_java_lang_ClassLoader_defineClass0; + Java_java_lang_ClassLoader_defineClass1; + Java_java_lang_ClassLoader_defineClass2; ++ Java_java_lang_ClassLoader_defineClass3; + Java_java_lang_ClassLoader_findBuiltinLib; + Java_java_lang_ClassLoader_findLoadedClass0; + Java_java_lang_ClassLoader_resolveClass0; +diff --git a/jdk/make/mapfiles/libjava/mapfile-vers b/jdk/make/mapfiles/libjava/mapfile-vers +index 896db04f2..abfde04a9 100644 +--- a/jdk/make/mapfiles/libjava/mapfile-vers ++++ b/jdk/make/mapfiles/libjava/mapfile-vers +@@ -129,6 +129,7 @@ SUNWprivate_1.1 { + Java_java_lang_ClassLoader_defineClass0; + Java_java_lang_ClassLoader_defineClass1; + Java_java_lang_ClassLoader_defineClass2; ++ Java_java_lang_ClassLoader_defineClass3; + Java_java_lang_ClassLoader_findBuiltinLib; + Java_java_lang_ClassLoader_findLoadedClass0; + Java_java_lang_ClassLoader_resolveClass0; +diff --git a/jdk/src/share/classes/java/lang/ClassLoader.java b/jdk/src/share/classes/java/lang/ClassLoader.java +index f305c1e36..d659eff0f 100644 +--- a/jdk/src/share/classes/java/lang/ClassLoader.java ++++ b/jdk/src/share/classes/java/lang/ClassLoader.java +@@ -682,6 +682,20 @@ public abstract class ClassLoader { + } + } + ++ /** ++ * Determine protection domain, and check it. ++ * This method is only for AggressiveCDS. ++ * ++ * @param name the name of the class ++ * @param c the class ++ * @param pd the ProtectionDomain of the class ++ */ ++ private void defineClassProtectionDomain(String name, Class c, ProtectionDomain pd) ++ { ++ pd = preDefineClass(name, pd); ++ postDefineClass(c, pd); ++ } ++ + /** + * Converts an array of bytes into an instance of class Class, + * with an optional ProtectionDomain. If the domain is +@@ -857,6 +871,27 @@ public abstract class ClassLoader { + int off, int len, ProtectionDomain pd, + String source); + ++ /** ++ * This method is only invoked when java.net.AggressiveCDSPlugin enabled. ++ */ ++ private native Class defineClass3(String name); ++ ++ protected final Class defineClass(String name) { ++ Class trustedClass = defineClass3(name); ++ if (trustedClass != null) { ++ ProtectionDomain pd = AccessController.doPrivileged( ++ new PrivilegedAction() { ++ @Override ++ public ProtectionDomain run() { ++ return trustedClass.getProtectionDomain(); ++ } ++ } ++ ); ++ defineClassProtectionDomain(name, trustedClass, pd); ++ } ++ return trustedClass; ++ } ++ + // true if the name is null or has the potential to be a valid binary name + private boolean checkName(String name) { + if ((name == null) || (name.length() == 0)) +diff --git a/jdk/src/share/classes/java/net/AggressiveCDSPlugin.java b/jdk/src/share/classes/java/net/AggressiveCDSPlugin.java +new file mode 100644 +index 000000000..90d1cd78a +--- /dev/null ++++ b/jdk/src/share/classes/java/net/AggressiveCDSPlugin.java +@@ -0,0 +1,45 @@ ++/* ++ * Copyright (c) 2020, 2023, Huawei Technologies Co., Ltd. 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 java.net; ++ ++import java.security.AccessController; ++import sun.security.action.GetBooleanAction; ++ ++/** ++ * The Aggressive CDS plugin for {@link java.net.URLClassLoader}. ++ */ ++final class AggressiveCDSPlugin { ++ private static final boolean IS_ENABLED = ++ AccessController.doPrivileged( ++ new GetBooleanAction("jdk.jbooster.aggressivecds.load")); ++ ++ /** ++ * Check whether Aggressive CDS is enabled. ++ * ++ * @return Is Aggressive CDS enabled ++ */ ++ public static boolean isEnabled() { ++ return IS_ENABLED; ++ } ++} +\ No newline at end of file +diff --git a/jdk/src/share/classes/java/net/URLClassLoader.java b/jdk/src/share/classes/java/net/URLClassLoader.java +index 876a88842..495964ee7 100644 +--- a/jdk/src/share/classes/java/net/URLClassLoader.java ++++ b/jdk/src/share/classes/java/net/URLClassLoader.java +@@ -382,6 +382,17 @@ public class URLClassLoader extends SecureClassLoader implements Closeable { + result = AccessController.doPrivileged( + new PrivilegedExceptionAction>() { + public Class run() throws ClassNotFoundException { ++ if (AggressiveCDSPlugin.isEnabled()) { ++ Class trustedClass = defineClass(name); ++ if (trustedClass != null) { ++ int i = name.lastIndexOf('.'); ++ if (i != -1) { ++ String pkgname = name.substring(0, i); ++ definePackageInternal(pkgname, null, null); ++ } ++ return trustedClass; ++ } ++ } + String path = name.replace('.', '/').concat(".class"); + Resource res = ucp.getResource(path, false); + if (res != null) { +@@ -409,6 +420,22 @@ public class URLClassLoader extends SecureClassLoader implements Closeable { + return result; + } + ++ /** ++ * get ProtectionDomain By URL String. ++ * This method is invoked only in C++ for AggressiveCDS. ++ * ++ * @param urlNoFragString the URL String. ++ * ++ * @return ProtectionDomain create from URL. ++ */ ++ protected ProtectionDomain getProtectionDomainByURLString(String urlNoFragString) { ++ URL url = ucp.getURL(urlNoFragString); ++ if (url != null) { ++ return getProtectionDomainFromURL(url); ++ } ++ return null; ++ } ++ + /* + * Retrieve the package using the specified package name. + * If non-null, verify the package using the specified code +diff --git a/jdk/src/share/classes/java/security/ProtectionDomain.java b/jdk/src/share/classes/java/security/ProtectionDomain.java +index 7a86115e2..727dc4427 100644 +--- a/jdk/src/share/classes/java/security/ProtectionDomain.java ++++ b/jdk/src/share/classes/java/security/ProtectionDomain.java +@@ -25,6 +25,7 @@ + + package java.security; + ++import java.net.URL; + import java.util.ArrayList; + import java.util.Collections; + import java.util.Enumeration; +@@ -35,6 +36,7 @@ import sun.misc.JavaSecurityAccess; + import sun.misc.JavaSecurityProtectionDomainAccess; + import static sun.misc.JavaSecurityProtectionDomainAccess.ProtectionDomainCache; + import sun.misc.SharedSecrets; ++import sun.net.util.URLUtil; + import sun.security.util.Debug; + import sun.security.util.SecurityConstants; + +@@ -206,6 +208,20 @@ public class ProtectionDomain { + return this.codesource; + } + ++ /** ++ * Returns a URL String. ++ * ++ * @return URL String. ++ */ ++ public String getLocationNoFragString() { ++ if (codesource != null) { ++ URL url = codesource.getLocation(); ++ if (url != null) { ++ return URLUtil.urlNoFragString(url); ++ } ++ } ++ return null; ++ } + + /** + * Returns the ClassLoader of this domain. +diff --git a/jdk/src/share/classes/java/security/SecureClassLoader.java b/jdk/src/share/classes/java/security/SecureClassLoader.java +index cb5f017ba..4b0570104 100644 +--- a/jdk/src/share/classes/java/security/SecureClassLoader.java ++++ b/jdk/src/share/classes/java/security/SecureClassLoader.java +@@ -215,6 +215,18 @@ public class SecureClassLoader extends ClassLoader { + return pd; + } + ++ /** ++ * get ProtectionDomain From URL. ++ * This method is only for AggressiveCDS. ++ * ++ * @param url the URL. ++ * ++ * @return ProtectionDomain create from URL. ++ */ ++ protected ProtectionDomain getProtectionDomainFromURL(URL url) { ++ CodeSource cs = new CodeSource(url, (CodeSigner[]) null); ++ return getProtectionDomain(cs); ++ } + + /* + * Check to make sure the class loader has been initialized. +diff --git a/jdk/src/share/classes/sun/misc/URLClassPath.java b/jdk/src/share/classes/sun/misc/URLClassPath.java +index 70a194f50..6b4987cf3 100644 +--- a/jdk/src/share/classes/sun/misc/URLClassPath.java ++++ b/jdk/src/share/classes/sun/misc/URLClassPath.java +@@ -255,6 +255,24 @@ public class URLClassPath { + return null; + } + ++ /** ++ * Finds the URL which has the specified name. ++ * This method is only for AggressiveCDS. ++ * ++ * @param urlNoFragString the name of URL ++ * @return the URL, or null if not found ++ */ ++ public URL getURL(String urlNoFragString) { ++ if (!urls.isEmpty()) { ++ int index = loaders.size(); ++ while(getLoader(index) != null) { ++ index++; ++ } ++ } ++ Loader loader = lmap.get(urlNoFragString); ++ return loader != null ? loader.getBaseURL() : null; ++ } ++ + /** + * Finds all resources on the URL search path with the given name. + * Returns an enumeration of the URL objects. +diff --git a/jdk/src/share/javavm/export/jvm.h b/jdk/src/share/javavm/export/jvm.h +index d27055622..c37f2ad34 100644 +--- a/jdk/src/share/javavm/export/jvm.h ++++ b/jdk/src/share/javavm/export/jvm.h +@@ -1441,6 +1441,11 @@ JVM_AdaptiveHeapSetG1PeriodicGCLoadThreshold(JNIEnv *env, jclass clazz, jint loa + JNIEXPORT jint JNICALL + JVM_AdaptiveHeapGetG1PeriodicGCLoadThreshold(JNIEnv *env, jclass clazz); + ++/** ++ * Define the trusted shared class. ++ */ ++JNIEXPORT jclass JNICALL ++JVM_DefineTrustedSharedClass(JNIEnv *env, const char *name, jobject loader); + + /* ========================================================================= + * The following defines a private JVM interface that the JDK can query +diff --git a/jdk/src/share/native/java/lang/ClassLoader.c b/jdk/src/share/native/java/lang/ClassLoader.c +index 40b0b85bc..a5515f72f 100644 +--- a/jdk/src/share/native/java/lang/ClassLoader.c ++++ b/jdk/src/share/native/java/lang/ClassLoader.c +@@ -224,6 +224,31 @@ Java_java_lang_ClassLoader_defineClass2(JNIEnv *env, + return result; + } + ++JNIEXPORT jclass JNICALL ++Java_java_lang_ClassLoader_defineClass3(JNIEnv *env, ++ jobject loader, ++ jstring name) ++{ ++ char *utfName; ++ jclass result = 0; ++ char buf[128]; ++ ++ if (name != NULL) { ++ utfName = getUTF(env, name, buf, sizeof(buf)); ++ if (utfName == NULL) { ++ JNU_ThrowOutOfMemoryError(env, NULL); ++ return result; ++ } ++ VerifyFixClassname(utfName); ++ } else { ++ utfName = NULL; ++ } ++ ++ result = JVM_DefineTrustedSharedClass(env, utfName, loader); ++ ++ return result; ++} ++ + JNIEXPORT void JNICALL + Java_java_lang_ClassLoader_resolveClass0(JNIEnv *env, jobject this, + jclass cls) +-- +2.23.0 + diff --git a/Huawei-Keep-objects-when-remove-unshareable-info.patch b/Huawei-Keep-objects-when-remove-unshareable-info.patch new file mode 100644 index 0000000000000000000000000000000000000000..a6be5d65cec746c71616456ce6d3599365b2db8b --- /dev/null +++ b/Huawei-Keep-objects-when-remove-unshareable-info.patch @@ -0,0 +1,97 @@ +From 844511f2b4b6a4be079fc5ac2f2d5b56826df85a Mon Sep 17 00:00:00 2001 +Date: Tue, 4 Jun 2024 19:09:40 +0800 +Subject: [PATCH] [Huawei]Keep objects when remove unshareable info +--- + hotspot/src/share/vm/oops/instanceKlass.cpp | 18 +++--------------- + .../Thread/TestThreadDumpClassInitMonitor.java | 15 +++++++++++---- + 2 files changed, 14 insertions(+), 19 deletions(-) + +diff --git a/hotspot/src/share/vm/oops/instanceKlass.cpp b/hotspot/src/share/vm/oops/instanceKlass.cpp +index 833cf9afe..df9aaabfb 100644 +--- a/hotspot/src/share/vm/oops/instanceKlass.cpp ++++ b/hotspot/src/share/vm/oops/instanceKlass.cpp +@@ -2467,21 +2467,6 @@ void InstanceKlass::remove_unshareable_info() { + m->remove_unshareable_info(); + } + +- if (UseAppCDS || DynamicDumpSharedSpaces) { +- if (_oop_map_cache != NULL) { +- delete _oop_map_cache; +- _oop_map_cache = NULL; +- } +- +- JNIid::deallocate(jni_ids()); +- set_jni_ids(NULL); +- +- jmethodID* jmeths = methods_jmethod_ids_acquire(); +- if (jmeths != (jmethodID*)NULL) { +- release_set_methods_jmethod_ids(NULL); +- FreeHeap(jmeths); +- } +- } + // do array classes also. + array_klasses_do(remove_unshareable_in_class); + // These are not allocated from metaspace. They are safe to set to NULL. +@@ -2489,6 +2474,9 @@ void InstanceKlass::remove_unshareable_info() { + _member_names = NULL; + _osr_nmethods_head = NULL; + _init_thread = NULL; ++ _oop_map_cache = NULL; ++ _jni_ids = NULL; ++ _methods_jmethod_ids = NULL; + } + + void InstanceKlass::remove_java_mirror() { +diff --git a/hotspot/test/runtime/Thread/TestThreadDumpClassInitMonitor.java b/hotspot/test/runtime/Thread/TestThreadDumpClassInitMonitor.java +index 8aa218efb..a2111c362 100644 +--- a/hotspot/test/runtime/Thread/TestThreadDumpClassInitMonitor.java ++++ b/hotspot/test/runtime/Thread/TestThreadDumpClassInitMonitor.java +@@ -148,34 +148,41 @@ public class TestThreadDumpClassInitMonitor { + throw new Error("Unexpected thread state line: " + line); + } + if (isProduct) { +- foundLines += 3; ++ foundLines += 4; + } else { + foundLines++; + } + continue; + } + case 2: { // Debug build ++ if (!line.trim().equals(JAVATHREAD_STATE)) { ++ throw new Error("Unexpected JavaThread state line: " + line); ++ } ++ foundLines++; ++ continue; ++ } ++ case 3: { // Debug build + if (!line.startsWith(THREAD_INFO)) { + throw new Error("Unexpected thread info line: " + line); + } + foundLines++; + continue; + } +- case 3: { // Debug build ++ case 4: { // Debug build + if (!line.trim().equals(JAVATHREAD_STATE)) { + throw new Error("Unexpected JavaThread state line: " + line); + } + foundLines++; + continue; + } +- case 4: { ++ case 5: { + if (!line.trim().startsWith(CURRENT_METHOD)) { + throw new Error("Unexpected current method line: " + line); + } + foundLines++; + continue; + } +- case 5: { ++ case 6: { + if (!line.trim().equals(WAIT_INFO)) { + throw new Error("Unexpected monitor information line: " + line); + } +-- +2.23.0 + diff --git a/Huawei-improve-GCTR-performance.patch b/Huawei-improve-GCTR-performance.patch new file mode 100644 index 0000000000000000000000000000000000000000..cbd1992ed09b1e753190af22e5d175bbd739f458 --- /dev/null +++ b/Huawei-improve-GCTR-performance.patch @@ -0,0 +1,62 @@ +From ac1502ff943911bd4d7332bd6531ed0a2454cf05 Mon Sep 17 00:00:00 2001 +Date: Mon, 27 May 2024 12:06:03 +0800 +Subject: [PATCH 2/2] improve GCTR performance +--- + .../classes/com/sun/crypto/provider/GCTR.java | 21 +++++++++++++++++-- + 1 file changed, 19 insertions(+), 2 deletions(-) + +diff --git a/jdk/src/share/classes/com/sun/crypto/provider/GCTR.java b/jdk/src/share/classes/com/sun/crypto/provider/GCTR.java +index 1ab0f63db..12af359b0 100644 +--- a/jdk/src/share/classes/com/sun/crypto/provider/GCTR.java ++++ b/jdk/src/share/classes/com/sun/crypto/provider/GCTR.java +@@ -29,6 +29,10 @@ + + package com.sun.crypto.provider; + ++import com.sun.management.HotSpotDiagnosticMXBean; ++import com.sun.management.VMOption; ++import sun.management.ManagementFactoryHelper; ++ + import java.nio.ByteBuffer; + import java.nio.ByteOrder; + import javax.crypto.IllegalBlockSizeException; +@@ -54,13 +58,26 @@ import static com.sun.crypto.provider.AESConstants.AES_BLOCK_SIZE; + */ + final class GCTR extends CounterMode { + ++ private static final String AES_CTR_INTRINSICS_PARAM = "UseAESCTRIntrinsics"; ++ private static boolean aesctrIntrinsicEnabled = false; ++ ++ static { ++ HotSpotDiagnosticMXBean diagnostic ++ = ManagementFactoryHelper.getDiagnosticMXBean(); ++ VMOption vmOption; ++ try { ++ vmOption = diagnostic.getVMOption(AES_CTR_INTRINSICS_PARAM); ++ } catch (IllegalArgumentException e) { ++ vmOption = null; ++ } ++ aesctrIntrinsicEnabled = Boolean.valueOf(vmOption == null ? null : vmOption.getValue()); ++ } + GCTR(SymmetricCipher cipher, byte[] initialCounterBlk) { + super(cipher); + if (initialCounterBlk.length != AES_BLOCK_SIZE) { + throw new RuntimeException("length of initial counter block (" + initialCounterBlk.length + + ") not equal to AES_BLOCK_SIZE (" + AES_BLOCK_SIZE + ")"); + } +- + iv = initialCounterBlk; + reset(); + } +@@ -93,7 +110,7 @@ final class GCTR extends CounterMode { + + long blocksLeft = blocksUntilRollover(); + int numOfCompleteBlocks = inLen / AES_BLOCK_SIZE; +- if (numOfCompleteBlocks >= blocksLeft) { ++ if (!aesctrIntrinsicEnabled || numOfCompleteBlocks >= blocksLeft) { + // Counter Mode encryption cannot be used because counter will + // roll over incorrectly. Use GCM-specific code instead. + byte[] encryptedCntr = new byte[AES_BLOCK_SIZE]; +-- +2.19.1 + diff --git a/LoongArch64-support.patch b/LoongArch64-support.patch index 6be43aca669dbb53b47d3d2b8021669afbd05995..42052d7cfaef59af38f83a321e5dbd100fab6e55 100644 --- a/LoongArch64-support.patch +++ b/LoongArch64-support.patch @@ -1,659 +1,5 @@ -From f762ff2634a7140bc295b98676f1db9602b15dcd Mon Sep 17 00:00:00 2001 -From: songliyang -Date: Mon, 20 May 2024 09:51:57 +0800 -Subject: [PATCH] add loongarch support - ---- - .../autoconf/build-aux/autoconf-config.guess | 3 + - common/autoconf/build-aux/autoconf-config.sub | 1 + - common/autoconf/build-aux/config.guess | 11 + - common/autoconf/configure.ac | 7 + - common/autoconf/generated-configure.sh | 95 +- - common/autoconf/jdk-options.m4 | 12 + - common/autoconf/platform.m4 | 65 + - common/autoconf/spec.gmk.in | 23 + - hotspot/agent/make/saenv.sh | 14 + - .../agent/src/os/linux/LinuxDebuggerLocal.c | 72 +- - hotspot/agent/src/os/linux/Makefile | 10 +- - hotspot/agent/src/os/linux/libproc.h | 15 +- - hotspot/agent/src/os/linux/ps_proc.c | 8 +- - .../classes/sun/jvm/hotspot/HotSpotAgent.java | 12 + - .../sun/jvm/hotspot/asm/Disassembler.java | 6 + - .../MachineDescriptionLOONGARCH64.java | 41 + - .../debugger/MachineDescriptionMIPS64.java | 41 + - .../debugger/linux/LinuxCDebugger.java | 18 + - .../linux/LinuxThreadContextFactory.java | 6 + - .../loongarch64/LinuxLOONGARCH64CFrame.java | 80 + - .../LinuxLOONGARCH64ThreadContext.java | 47 + - .../linux/mips64/LinuxMIPS64CFrame.java | 80 + - .../mips64/LinuxMIPS64ThreadContext.java | 47 + - .../loongarch64/LOONGARCH64ThreadContext.java | 123 + - .../debugger/mips64/MIPS64ThreadContext.java | 123 + - .../hotspot/debugger/posix/elf/ELFHeader.java | 2 + - .../debugger/proc/ProcDebuggerLocal.java | 12 + - .../loongarch64/ProcLOONGARCH64Thread.java | 92 + - .../ProcLOONGARCH64ThreadContext.java | 47 + - .../ProcLOONGARCH64ThreadFactory.java | 45 + - .../proc/mips64/ProcMIPS64Thread.java | 92 + - .../proc/mips64/ProcMIPS64ThreadContext.java | 47 + - .../proc/mips64/ProcMIPS64ThreadFactory.java | 45 + - .../debugger/remote/RemoteDebuggerClient.java | 12 + - .../loongarch64/RemoteLOONGARCH64Thread.java | 54 + - .../RemoteLOONGARCH64ThreadContext.java | 51 + - .../RemoteLOONGARCH64ThreadFactory.java | 45 + - .../remote/mips64/RemoteMIPS64Thread.java | 54 + - .../mips64/RemoteMIPS64ThreadContext.java | 51 + - .../mips64/RemoteMIPS64ThreadFactory.java | 45 + - .../sun/jvm/hotspot/runtime/Threads.java | 6 + - .../LinuxLOONGARCH64JavaThreadPDAccess.java | 133 + - .../LinuxMIPS64JavaThreadPDAccess.java | 132 + - .../LOONGARCH64CurrentFrameGuess.java | 217 + - .../runtime/loongarch64/LOONGARCH64Frame.java | 534 + - .../LOONGARCH64JavaCallWrapper.java | 57 + - .../loongarch64/LOONGARCH64RegisterMap.java | 52 + - .../mips64/MIPS64CurrentFrameGuess.java | 217 + - .../hotspot/runtime/mips64/MIPS64Frame.java | 547 + - .../runtime/mips64/MIPS64JavaCallWrapper.java | 57 + - .../runtime/mips64/MIPS64RegisterMap.java | 52 + - .../jvm/hotspot/utilities/PlatformInfo.java | 11 + - hotspot/make/defs.make | 37 +- - hotspot/make/linux/Makefile | 4 + - hotspot/make/linux/makefiles/defs.make | 56 + - hotspot/make/linux/makefiles/gcc.make | 11 +- - hotspot/make/linux/makefiles/loongarch64.make | 43 + - hotspot/make/linux/makefiles/mips64.make | 43 + - hotspot/make/linux/makefiles/sa.make | 8 + - hotspot/make/linux/makefiles/saproc.make | 12 + - hotspot/make/linux/makefiles/sparcWorks.make | 7 + - hotspot/make/linux/makefiles/vm.make | 28 + - hotspot/make/linux/platform_loongarch64 | 17 + - hotspot/make/linux/platform_mips64 | 17 + - hotspot/make/sa.files | 16 + - .../aarch64/vm/c1_LIRAssembler_aarch64.cpp | 17 +- - .../aarch64/vm/c1_LIRGenerator_aarch64.cpp | 19 +- - .../cpu/loongarch/vm/assembler_loongarch.cpp | 855 + - .../cpu/loongarch/vm/assembler_loongarch.hpp | 2810 ++++ - .../vm/assembler_loongarch.inline.hpp | 33 + - .../vm/bytecodeInterpreter_loongarch.hpp | 110 + - .../bytecodeInterpreter_loongarch.inline.hpp | 286 + - .../cpu/loongarch/vm/bytecodes_loongarch.cpp | 38 + - .../cpu/loongarch/vm/bytecodes_loongarch.hpp | 31 + - .../src/cpu/loongarch/vm/bytes_loongarch.hpp | 75 + - .../vm/c1_CodeStubs_loongarch_64.cpp | 387 + - .../cpu/loongarch/vm/c1_Defs_loongarch.hpp | 79 + - .../loongarch/vm/c1_FpuStackSim_loongarch.hpp | 32 + - .../vm/c1_FpuStackSim_loongarch_64.cpp | 31 + - .../loongarch/vm/c1_FrameMap_loongarch.hpp | 143 + - .../loongarch/vm/c1_FrameMap_loongarch_64.cpp | 362 + - .../vm/c1_LIRAssembler_loongarch.hpp | 83 + - .../vm/c1_LIRAssembler_loongarch_64.cpp | 3377 ++++ - .../vm/c1_LIRGenerator_loongarch_64.cpp | 1442 ++ - .../loongarch/vm/c1_LinearScan_loongarch.hpp | 70 + - .../vm/c1_LinearScan_loongarch_64.cpp | 33 + - .../vm/c1_MacroAssembler_loongarch.hpp | 112 + - .../vm/c1_MacroAssembler_loongarch_64.cpp | 346 + - .../loongarch/vm/c1_Runtime1_loongarch_64.cpp | 1252 ++ - .../cpu/loongarch/vm/c1_globals_loongarch.hpp | 69 + - .../cpu/loongarch/vm/c2_globals_loongarch.hpp | 87 + - .../cpu/loongarch/vm/c2_init_loongarch.cpp | 34 + - .../cpu/loongarch/vm/codeBuffer_loongarch.hpp | 35 + - .../cpu/loongarch/vm/compiledIC_loongarch.cpp | 167 + - .../src/cpu/loongarch/vm/copy_loongarch.hpp | 90 + - .../vm/cppInterpreterGenerator_loongarch.hpp | 53 + - .../loongarch/vm/cppInterpreter_loongarch.cpp | 215 + - .../src/cpu/loongarch/vm/debug_loongarch.cpp | 51 + - .../cpu/loongarch/vm/depChecker_loongarch.cpp | 30 + - .../cpu/loongarch/vm/depChecker_loongarch.hpp | 31 + - .../loongarch/vm/disassembler_loongarch.hpp | 37 + - .../src/cpu/loongarch/vm/frame_loongarch.cpp | 711 + - .../src/cpu/loongarch/vm/frame_loongarch.hpp | 229 + - .../loongarch/vm/frame_loongarch.inline.hpp | 312 + - .../vm/globalDefinitions_loongarch.hpp | 41 + - .../cpu/loongarch/vm/globals_loongarch.hpp | 103 + - .../cpu/loongarch/vm/icBuffer_loongarch.cpp | 101 + - .../src/cpu/loongarch/vm/icache_loongarch.cpp | 42 + - .../src/cpu/loongarch/vm/icache_loongarch.hpp | 41 + - .../loongarch/vm/interp_masm_loongarch_64.cpp | 1960 +++ - .../loongarch/vm/interp_masm_loongarch_64.hpp | 269 + - .../vm/interpreterGenerator_loongarch.hpp | 51 + - .../loongarch/vm/interpreterRT_loongarch.hpp | 66 + - .../vm/interpreterRT_loongarch_64.cpp | 274 + - .../loongarch/vm/interpreter_loongarch.hpp | 50 + - .../loongarch/vm/interpreter_loongarch_64.cpp | 277 + - .../vm/javaFrameAnchor_loongarch.hpp | 87 + - .../vm/jniFastGetField_loongarch_64.cpp | 169 + - .../cpu/loongarch/vm/jniTypes_loongarch.hpp | 144 + - hotspot/src/cpu/loongarch/vm/jni_loongarch.h | 51 + - hotspot/src/cpu/loongarch/vm/loongarch.ad | 24 + - hotspot/src/cpu/loongarch/vm/loongarch_64.ad | 12861 ++++++++++++++ - .../loongarch/vm/macroAssembler_loongarch.cpp | 3895 +++++ - .../loongarch/vm/macroAssembler_loongarch.hpp | 771 + - .../vm/macroAssembler_loongarch.inline.hpp | 34 + - .../vm/metaspaceShared_loongarch_64.cpp | 120 + - .../loongarch/vm/methodHandles_loongarch.cpp | 566 + - .../loongarch/vm/methodHandles_loongarch.hpp | 62 + - .../cpu/loongarch/vm/nativeInst_loongarch.cpp | 485 + - .../cpu/loongarch/vm/nativeInst_loongarch.hpp | 513 + - .../loongarch/vm/registerMap_loongarch.hpp | 45 + - .../vm/register_definitions_loongarch.cpp | 103 + - .../cpu/loongarch/vm/register_loongarch.cpp | 59 + - .../cpu/loongarch/vm/register_loongarch.hpp | 436 + - .../cpu/loongarch/vm/relocInfo_loongarch.cpp | 130 + - .../cpu/loongarch/vm/relocInfo_loongarch.hpp | 40 + - .../cpu/loongarch/vm/runtime_loongarch_64.cpp | 199 + - .../vm/sharedRuntime_loongarch_64.cpp | 3453 ++++ - .../vm/stubGenerator_loongarch_64.cpp | 3445 ++++ - .../vm/stubRoutines_loongarch_64.cpp | 264 + - .../vm/stubRoutines_loongarch_64.hpp | 60 + - ...templateInterpreterGenerator_loongarch.hpp | 35 + - .../vm/templateInterpreter_loongarch.hpp | 41 + - .../vm/templateInterpreter_loongarch_64.cpp | 2335 +++ - .../vm/templateTable_loongarch_64.cpp | 4024 +++++ - .../vm/templateTable_loongarch_64.hpp | 44 + - .../cpu/loongarch/vm/vmStructs_loongarch.hpp | 68 + - .../loongarch/vm/vm_version_ext_loongarch.cpp | 84 + - .../loongarch/vm/vm_version_ext_loongarch.hpp | 54 + - .../cpu/loongarch/vm/vm_version_loongarch.cpp | 443 + - .../cpu/loongarch/vm/vm_version_loongarch.hpp | 299 + - .../src/cpu/loongarch/vm/vmreg_loongarch.cpp | 51 + - .../src/cpu/loongarch/vm/vmreg_loongarch.hpp | 35 + - .../loongarch/vm/vmreg_loongarch.inline.hpp | 66 + - .../loongarch/vm/vtableStubs_loongarch_64.cpp | 300 + - hotspot/src/cpu/mips/vm/assembler_mips.cpp | 774 + - hotspot/src/cpu/mips/vm/assembler_mips.hpp | 1789 ++ - .../src/cpu/mips/vm/assembler_mips.inline.hpp | 33 + - .../cpu/mips/vm/bytecodeInterpreter_mips.cpp | 53 + - .../cpu/mips/vm/bytecodeInterpreter_mips.hpp | 110 + - .../vm/bytecodeInterpreter_mips.inline.hpp | 286 + - hotspot/src/cpu/mips/vm/bytecodes_mips.cpp | 38 + - hotspot/src/cpu/mips/vm/bytecodes_mips.hpp | 31 + - hotspot/src/cpu/mips/vm/bytes_mips.hpp | 193 + - hotspot/src/cpu/mips/vm/c2_globals_mips.hpp | 100 + - hotspot/src/cpu/mips/vm/c2_init_mips.cpp | 34 + - hotspot/src/cpu/mips/vm/codeBuffer_mips.hpp | 35 + - hotspot/src/cpu/mips/vm/compiledIC_mips.cpp | 173 + - hotspot/src/cpu/mips/vm/copy_mips.hpp | 90 + - .../mips/vm/cppInterpreterGenerator_mips.hpp | 53 + - .../src/cpu/mips/vm/cppInterpreter_mips.cpp | 215 + - .../src/cpu/mips/vm/cppInterpreter_mips.hpp | 40 + - hotspot/src/cpu/mips/vm/debug_mips.cpp | 51 + - hotspot/src/cpu/mips/vm/depChecker_mips.cpp | 30 + - hotspot/src/cpu/mips/vm/depChecker_mips.hpp | 31 + - hotspot/src/cpu/mips/vm/disassembler_mips.hpp | 37 + - hotspot/src/cpu/mips/vm/frame_mips.cpp | 711 + - hotspot/src/cpu/mips/vm/frame_mips.hpp | 229 + - hotspot/src/cpu/mips/vm/frame_mips.inline.hpp | 312 + - .../cpu/mips/vm/globalDefinitions_mips.hpp | 41 + - hotspot/src/cpu/mips/vm/globals_mips.hpp | 124 + - hotspot/src/cpu/mips/vm/icBuffer_mips.cpp | 97 + - hotspot/src/cpu/mips/vm/icache_mips.cpp | 41 + - hotspot/src/cpu/mips/vm/icache_mips.hpp | 41 + - .../src/cpu/mips/vm/interp_masm_mips_64.cpp | 2084 +++ - .../src/cpu/mips/vm/interp_masm_mips_64.hpp | 269 + - .../cpu/mips/vm/interpreterGenerator_mips.hpp | 49 + - .../src/cpu/mips/vm/interpreterRT_mips.hpp | 61 + - .../src/cpu/mips/vm/interpreterRT_mips_64.cpp | 259 + - hotspot/src/cpu/mips/vm/interpreter_mips.hpp | 50 + - .../src/cpu/mips/vm/interpreter_mips_64.cpp | 286 + - .../src/cpu/mips/vm/javaFrameAnchor_mips.hpp | 87 + - .../cpu/mips/vm/jniFastGetField_mips_64.cpp | 172 + - hotspot/src/cpu/mips/vm/jniTypes_mips.hpp | 144 + - hotspot/src/cpu/mips/vm/jni_mips.h | 51 + - .../src/cpu/mips/vm/macroAssembler_mips.cpp | 4332 +++++ - .../src/cpu/mips/vm/macroAssembler_mips.hpp | 701 + - .../mips/vm/macroAssembler_mips.inline.hpp | 34 + - .../cpu/mips/vm/metaspaceShared_mips_64.cpp | 123 + - .../src/cpu/mips/vm/methodHandles_mips.cpp | 576 + - .../src/cpu/mips/vm/methodHandles_mips.hpp | 62 + - hotspot/src/cpu/mips/vm/mips.ad | 25 + - hotspot/src/cpu/mips/vm/mips_64.ad | 14036 ++++++++++++++++ - hotspot/src/cpu/mips/vm/nativeInst_mips.cpp | 1829 ++ - hotspot/src/cpu/mips/vm/nativeInst_mips.hpp | 735 + - hotspot/src/cpu/mips/vm/registerMap_mips.hpp | 47 + - .../cpu/mips/vm/register_definitions_mips.cpp | 103 + - hotspot/src/cpu/mips/vm/register_mips.cpp | 52 + - hotspot/src/cpu/mips/vm/register_mips.hpp | 346 + - hotspot/src/cpu/mips/vm/relocInfo_mips.cpp | 156 + - hotspot/src/cpu/mips/vm/relocInfo_mips.hpp | 40 + - hotspot/src/cpu/mips/vm/runtime_mips_64.cpp | 206 + - .../src/cpu/mips/vm/sharedRuntime_mips_64.cpp | 3816 +++++ - .../src/cpu/mips/vm/stubGenerator_mips_64.cpp | 2147 +++ - .../src/cpu/mips/vm/stubRoutines_mips_64.cpp | 35 + - .../src/cpu/mips/vm/stubRoutines_mips_64.hpp | 59 + - .../vm/templateInterpreterGenerator_mips.hpp | 35 + - .../cpu/mips/vm/templateInterpreter_mips.hpp | 41 + - .../mips/vm/templateInterpreter_mips_64.cpp | 2306 +++ - .../src/cpu/mips/vm/templateTable_mips.hpp | 34 + - .../src/cpu/mips/vm/templateTable_mips_64.cpp | 4623 +++++ - .../src/cpu/mips/vm/templateTable_mips_64.hpp | 44 + - hotspot/src/cpu/mips/vm/vmStructs_mips.hpp | 68 + - .../src/cpu/mips/vm/vm_version_ext_mips.cpp | 89 + - .../src/cpu/mips/vm/vm_version_ext_mips.hpp | 54 + - hotspot/src/cpu/mips/vm/vm_version_mips.cpp | 510 + - hotspot/src/cpu/mips/vm/vm_version_mips.hpp | 221 + - hotspot/src/cpu/mips/vm/vmreg_mips.cpp | 51 + - hotspot/src/cpu/mips/vm/vmreg_mips.hpp | 35 + - hotspot/src/cpu/mips/vm/vmreg_mips.inline.hpp | 68 + - .../src/cpu/mips/vm/vtableStubs_mips_64.cpp | 301 + - .../src/cpu/x86/vm/c1_LIRAssembler_x86.cpp | 10 + - .../src/cpu/x86/vm/c1_LIRGenerator_x86.cpp | 21 +- - hotspot/src/os/linux/vm/os_linux.cpp | 27 +- - hotspot/src/os/linux/vm/os_perf_linux.cpp | 6 + - .../vm/assembler_linux_loongarch.cpp | 92 + - .../vm/atomic_linux_loongarch.inline.hpp | 206 + - .../vm/bytes_linux_loongarch.inline.hpp | 37 + - .../vm/copy_linux_loongarch.inline.hpp | 125 + - .../vm/globals_linux_loongarch.hpp | 43 + - .../vm/orderAccess_linux_loongarch.inline.hpp | 115 + - .../linux_loongarch/vm/os_linux_loongarch.cpp | 750 + - .../linux_loongarch/vm/os_linux_loongarch.hpp | 39 + - .../vm/prefetch_linux_loongarch.inline.hpp | 56 + - .../vm/threadLS_linux_loongarch.cpp | 84 + - .../vm/threadLS_linux_loongarch.hpp | 61 + - .../vm/thread_linux_loongarch.cpp | 99 + - .../vm/thread_linux_loongarch.hpp | 75 + - .../vm/vmStructs_linux_loongarch.hpp | 55 + - .../vm/vm_version_linux_loongarch.cpp | 29 + - .../linux_mips/vm/assembler_linux_mips.cpp | 111 + - .../vm/atomic_linux_mips.inline.hpp | 258 + - .../linux_mips/vm/bytes_linux_mips.inline.hpp | 37 + - .../linux_mips/vm/copy_linux_mips.inline.hpp | 125 + - .../linux_mips/vm/globals_linux_mips.hpp | 51 + - .../src/os_cpu/linux_mips/vm/linux_mips.ad | 153 + - hotspot/src/os_cpu/linux_mips/vm/linux_mips.s | 25 + - .../src/os_cpu/linux_mips/vm/linux_mips_64.ad | 50 + - .../vm/orderAccess_linux_mips.inline.hpp | 115 + - .../os_cpu/linux_mips/vm/os_linux_mips.cpp | 1015 ++ - .../os_cpu/linux_mips/vm/os_linux_mips.hpp | 39 + - .../vm/prefetch_linux_mips.inline.hpp | 58 + - .../linux_mips/vm/threadLS_linux_mips.cpp | 84 + - .../linux_mips/vm/threadLS_linux_mips.hpp | 61 + - .../linux_mips/vm/thread_linux_mips.cpp | 99 + - .../linux_mips/vm/thread_linux_mips.hpp | 75 + - .../linux_mips/vm/vmStructs_linux_mips.hpp | 55 + - .../linux_mips/vm/vm_version_linux_mips.cpp | 28 + - hotspot/src/share/tools/hsdis/Makefile | 13 + - hotspot/src/share/tools/hsdis/hsdis.c | 10 + - hotspot/src/share/vm/adlc/main.cpp | 14 + - hotspot/src/share/vm/asm/assembler.hpp | 20 + - hotspot/src/share/vm/asm/assembler.inline.hpp | 12 + - hotspot/src/share/vm/asm/codeBuffer.cpp | 7 + - hotspot/src/share/vm/asm/codeBuffer.hpp | 12 + - hotspot/src/share/vm/asm/macroAssembler.hpp | 13 +- - .../share/vm/asm/macroAssembler.inline.hpp | 12 + - hotspot/src/share/vm/asm/register.hpp | 12 + - hotspot/src/share/vm/c1/c1_Defs.hpp | 12 + - hotspot/src/share/vm/c1/c1_FpuStackSim.hpp | 9 + - hotspot/src/share/vm/c1/c1_FrameMap.cpp | 9 + - hotspot/src/share/vm/c1/c1_FrameMap.hpp | 9 + - hotspot/src/share/vm/c1/c1_LIR.cpp | 220 +- - hotspot/src/share/vm/c1/c1_LIR.hpp | 199 +- - hotspot/src/share/vm/c1/c1_LIRAssembler.cpp | 22 + - hotspot/src/share/vm/c1/c1_LIRAssembler.hpp | 12 + - hotspot/src/share/vm/c1/c1_LIRGenerator.cpp | 114 +- - hotspot/src/share/vm/c1/c1_LIRGenerator.hpp | 17 +- - hotspot/src/share/vm/c1/c1_LinearScan.cpp | 81 +- - hotspot/src/share/vm/c1/c1_LinearScan.hpp | 9 + - hotspot/src/share/vm/c1/c1_MacroAssembler.hpp | 9 + - hotspot/src/share/vm/c1/c1_Runtime1.cpp | 48 + - hotspot/src/share/vm/c1/c1_globals.hpp | 9 + - .../share/vm/classfile/bytecodeAssembler.cpp | 12 + - .../share/vm/classfile/classFileStream.hpp | 12 + - .../src/share/vm/classfile/stackMapTable.hpp | 12 + - hotspot/src/share/vm/classfile/verifier.cpp | 12 + - hotspot/src/share/vm/code/codeBlob.cpp | 12 + - hotspot/src/share/vm/code/compiledIC.hpp | 12 + - hotspot/src/share/vm/code/relocInfo.hpp | 45 +- - hotspot/src/share/vm/code/vmreg.hpp | 18 + - .../src/share/vm/compiler/disassembler.cpp | 12 + - .../src/share/vm/compiler/disassembler.hpp | 12 + - .../parallelScavenge/cardTableExtension.hpp | 3 + - .../parallelScavenge/parMarkBitMap.cpp | 3 + - .../psCompactionManager.inline.hpp | 6 + - .../parallelScavenge/psParallelCompact.cpp | 9 + - .../parallelScavenge/psParallelCompact.hpp | 6 + - .../psPromotionManager.inline.hpp | 24 +- - .../parallelScavenge/psScavenge.inline.hpp | 21 +- - .../vm/interpreter/abstractInterpreter.hpp | 10 + - hotspot/src/share/vm/interpreter/bytecode.hpp | 12 + - .../vm/interpreter/bytecodeInterpreter.hpp | 15 + - .../bytecodeInterpreter.inline.hpp | 12 + - .../share/vm/interpreter/bytecodeStream.hpp | 12 + - .../src/share/vm/interpreter/bytecodes.cpp | 12 + - .../src/share/vm/interpreter/bytecodes.hpp | 12 + - .../share/vm/interpreter/cppInterpreter.hpp | 12 + - .../interpreter/cppInterpreterGenerator.hpp | 12 + - .../src/share/vm/interpreter/interpreter.hpp | 12 + - .../vm/interpreter/interpreterGenerator.hpp | 12 + - .../vm/interpreter/interpreterRuntime.cpp | 14 +- - .../vm/interpreter/interpreterRuntime.hpp | 14 +- - .../vm/interpreter/templateInterpreter.hpp | 12 + - .../templateInterpreterGenerator.hpp | 12 + - .../share/vm/interpreter/templateTable.hpp | 14 + - .../share/vm/jfr/utilities/jfrBigEndian.hpp | 2 +- - .../src/share/vm/jfr/writers/jfrEncoders.hpp | 12 + - hotspot/src/share/vm/memory/barrierSet.hpp | 25 +- - .../src/share/vm/memory/cardTableModRefBS.hpp | 12 +- - hotspot/src/share/vm/memory/cardTableRS.cpp | 10 +- - hotspot/src/share/vm/memory/cardTableRS.hpp | 9 +- - hotspot/src/share/vm/memory/metaspace.cpp | 13 +- - hotspot/src/share/vm/oops/constantPool.hpp | 13 + - hotspot/src/share/vm/oops/klass.hpp | 17 +- - hotspot/src/share/vm/oops/oop.hpp | 8 +- - hotspot/src/share/vm/oops/oop.inline.hpp | 12 + - hotspot/src/share/vm/oops/oop.pcgc.inline.hpp | 8 +- - hotspot/src/share/vm/opto/buildOopMap.cpp | 12 + - hotspot/src/share/vm/opto/bytecodeInfo.cpp | 11 + - hotspot/src/share/vm/opto/c2_globals.hpp | 12 + - hotspot/src/share/vm/opto/c2compiler.cpp | 10 + - hotspot/src/share/vm/opto/chaitin.hpp | 14 + - hotspot/src/share/vm/opto/compile.cpp | 10 + - hotspot/src/share/vm/opto/compile.hpp | 2 +- - hotspot/src/share/vm/opto/gcm.cpp | 10 + - hotspot/src/share/vm/opto/lcm.cpp | 10 + - hotspot/src/share/vm/opto/locknode.hpp | 10 + - hotspot/src/share/vm/opto/matcher.cpp | 10 + - hotspot/src/share/vm/opto/output.cpp | 43 + - hotspot/src/share/vm/opto/output.hpp | 10 + - hotspot/src/share/vm/opto/regmask.cpp | 10 + - hotspot/src/share/vm/opto/regmask.hpp | 10 + - hotspot/src/share/vm/opto/runtime.cpp | 10 + - hotspot/src/share/vm/opto/type.cpp | 16 + - hotspot/src/share/vm/prims/jniCheck.cpp | 12 + - hotspot/src/share/vm/prims/jni_md.h | 12 + - .../vm/prims/jvmtiClassFileReconstituter.cpp | 12 + - hotspot/src/share/vm/prims/methodHandles.hpp | 13 + - .../src/share/vm/runtime/atomic.inline.hpp | 12 + - .../src/share/vm/runtime/deoptimization.cpp | 18 + - hotspot/src/share/vm/runtime/dtraceJSDT.hpp | 12 + - hotspot/src/share/vm/runtime/frame.cpp | 13 + - hotspot/src/share/vm/runtime/frame.hpp | 16 + - hotspot/src/share/vm/runtime/frame.inline.hpp | 18 + - hotspot/src/share/vm/runtime/globals.hpp | 26 +- - hotspot/src/share/vm/runtime/icache.hpp | 13 +- - hotspot/src/share/vm/runtime/java.cpp | 12 + - hotspot/src/share/vm/runtime/javaCalls.hpp | 12 + - .../src/share/vm/runtime/javaFrameAnchor.hpp | 12 + - hotspot/src/share/vm/runtime/os.cpp | 3 +- - hotspot/src/share/vm/runtime/os.hpp | 12 + - .../src/share/vm/runtime/prefetch.inline.hpp | 6 + - hotspot/src/share/vm/runtime/registerMap.hpp | 18 + - hotspot/src/share/vm/runtime/relocator.hpp | 12 + - hotspot/src/share/vm/runtime/safepoint.cpp | 14 + - .../src/share/vm/runtime/sharedRuntime.cpp | 16 +- - .../share/vm/runtime/sharedRuntimeTrig.cpp | 15 + - .../share/vm/runtime/stackValueCollection.cpp | 12 + - hotspot/src/share/vm/runtime/statSampler.cpp | 12 + - hotspot/src/share/vm/runtime/stubRoutines.hpp | 16 + - hotspot/src/share/vm/runtime/thread.cpp | 6 + - hotspot/src/share/vm/runtime/thread.hpp | 12 + - .../share/vm/runtime/threadLocalStorage.hpp | 12 + - hotspot/src/share/vm/runtime/virtualspace.cpp | 16 + - hotspot/src/share/vm/runtime/vmStructs.cpp | 22 + - hotspot/src/share/vm/runtime/vm_version.cpp | 20 + - hotspot/src/share/vm/utilities/copy.hpp | 13 + - hotspot/src/share/vm/utilities/debug.cpp | 1 + - .../share/vm/utilities/globalDefinitions.hpp | 12 + - hotspot/src/share/vm/utilities/macros.hpp | 30 + - hotspot/src/share/vm/utilities/taskqueue.hpp | 74 +- - hotspot/src/share/vm/utilities/vmError.cpp | 14 +- - .../argumentcorruption/Test8167409.sh | 18 + - .../testcases/GenericTestCaseForOtherCPU.java | 5 +- - .../sha/predicate/IntrinsicPredicates.java | 10 +- - hotspot/test/runtime/6929067/Test6929067.sh | 4 + - hotspot/test/runtime/Unsafe/RangeCheck.java | 3 + - hotspot/test/test_env.sh | 23 + - .../com/oracle/java/testlibrary/Platform.java | 8 + - ...stMutuallyExclusivePlatformPredicates.java | 2 +- - jdk/make/Images.gmk | 20 + - jdk/make/gensrc/GensrcMisc.gmk | 13 + - jdk/make/lib/SoundLibraries.gmk | 14 + - .../classes/sun/misc/Version.java.template | 22 +- - jdk/src/solaris/bin/loongarch64/jvm.cfg | 36 + - jdk/src/solaris/bin/mips64/jvm.cfg | 36 + - .../jdk/jfr/event/os/TestCPUInformation.java | 4 +- - .../bootstrap/linux-loongarch64/launcher | 0 - .../bootstrap/linux-mips64el/launcher | 0 - jdk/test/sun/security/pkcs11/PKCS11Test.java | 8 + - 411 files changed, 111201 insertions(+), 216 deletions(-) - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionLOONGARCH64.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionMIPS64.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/loongarch64/LinuxLOONGARCH64CFrame.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/loongarch64/LinuxLOONGARCH64ThreadContext.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/mips64/LinuxMIPS64CFrame.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/mips64/LinuxMIPS64ThreadContext.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/loongarch64/LOONGARCH64ThreadContext.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/mips64/MIPS64ThreadContext.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/loongarch64/ProcLOONGARCH64Thread.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/loongarch64/ProcLOONGARCH64ThreadContext.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/loongarch64/ProcLOONGARCH64ThreadFactory.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/mips64/ProcMIPS64Thread.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/mips64/ProcMIPS64ThreadContext.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/mips64/ProcMIPS64ThreadFactory.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64Thread.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64ThreadContext.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64ThreadFactory.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/mips64/RemoteMIPS64Thread.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/mips64/RemoteMIPS64ThreadContext.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/mips64/RemoteMIPS64ThreadFactory.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/linux_loongarch64/LinuxLOONGARCH64JavaThreadPDAccess.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/linux_mips64/LinuxMIPS64JavaThreadPDAccess.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64CurrentFrameGuess.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64Frame.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64JavaCallWrapper.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64RegisterMap.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/mips64/MIPS64CurrentFrameGuess.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/mips64/MIPS64Frame.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/mips64/MIPS64JavaCallWrapper.java - create mode 100644 hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/mips64/MIPS64RegisterMap.java - create mode 100644 hotspot/make/linux/makefiles/loongarch64.make - create mode 100644 hotspot/make/linux/makefiles/mips64.make - create mode 100644 hotspot/make/linux/platform_loongarch64 - create mode 100644 hotspot/make/linux/platform_mips64 - create mode 100644 hotspot/src/cpu/loongarch/vm/assembler_loongarch.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/assembler_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/assembler_loongarch.inline.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/bytecodeInterpreter_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/bytecodeInterpreter_loongarch.inline.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/bytecodes_loongarch.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/bytecodes_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/bytes_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/c1_CodeStubs_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/c1_Defs_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/c1_FpuStackSim_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/c1_FpuStackSim_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/c1_FrameMap_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/c1_FrameMap_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/c1_LIRAssembler_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/c1_LIRAssembler_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/c1_LIRGenerator_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/c1_LinearScan_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/c1_LinearScan_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/c1_MacroAssembler_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/c1_MacroAssembler_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/c1_Runtime1_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/c1_globals_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/c2_globals_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/c2_init_loongarch.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/codeBuffer_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/compiledIC_loongarch.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/copy_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/cppInterpreterGenerator_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/cppInterpreter_loongarch.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/debug_loongarch.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/depChecker_loongarch.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/depChecker_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/disassembler_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/frame_loongarch.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/frame_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/frame_loongarch.inline.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/globalDefinitions_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/globals_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/icBuffer_loongarch.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/icache_loongarch.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/icache_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/interp_masm_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/interp_masm_loongarch_64.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/interpreterGenerator_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/interpreterRT_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/interpreterRT_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/interpreter_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/interpreter_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/javaFrameAnchor_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/jniFastGetField_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/jniTypes_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/jni_loongarch.h - create mode 100644 hotspot/src/cpu/loongarch/vm/loongarch.ad - create mode 100644 hotspot/src/cpu/loongarch/vm/loongarch_64.ad - create mode 100644 hotspot/src/cpu/loongarch/vm/macroAssembler_loongarch.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/macroAssembler_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/macroAssembler_loongarch.inline.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/metaspaceShared_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/methodHandles_loongarch.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/methodHandles_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/nativeInst_loongarch.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/nativeInst_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/registerMap_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/register_definitions_loongarch.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/register_loongarch.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/register_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/relocInfo_loongarch.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/relocInfo_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/runtime_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/sharedRuntime_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/stubGenerator_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/stubRoutines_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/stubRoutines_loongarch_64.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/templateInterpreterGenerator_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/templateInterpreter_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/templateInterpreter_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/templateTable_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/templateTable_loongarch_64.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/vmStructs_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/vm_version_ext_loongarch.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/vm_version_ext_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/vm_version_loongarch.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/vm_version_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/vmreg_loongarch.cpp - create mode 100644 hotspot/src/cpu/loongarch/vm/vmreg_loongarch.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/vmreg_loongarch.inline.hpp - create mode 100644 hotspot/src/cpu/loongarch/vm/vtableStubs_loongarch_64.cpp - create mode 100644 hotspot/src/cpu/mips/vm/assembler_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/assembler_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/assembler_mips.inline.hpp - create mode 100644 hotspot/src/cpu/mips/vm/bytecodeInterpreter_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/bytecodeInterpreter_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/bytecodeInterpreter_mips.inline.hpp - create mode 100644 hotspot/src/cpu/mips/vm/bytecodes_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/bytecodes_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/bytes_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/c2_globals_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/c2_init_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/codeBuffer_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/compiledIC_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/copy_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/cppInterpreterGenerator_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/cppInterpreter_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/cppInterpreter_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/debug_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/depChecker_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/depChecker_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/disassembler_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/frame_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/frame_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/frame_mips.inline.hpp - create mode 100644 hotspot/src/cpu/mips/vm/globalDefinitions_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/globals_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/icBuffer_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/icache_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/icache_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/interp_masm_mips_64.cpp - create mode 100644 hotspot/src/cpu/mips/vm/interp_masm_mips_64.hpp - create mode 100644 hotspot/src/cpu/mips/vm/interpreterGenerator_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/interpreterRT_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/interpreterRT_mips_64.cpp - create mode 100644 hotspot/src/cpu/mips/vm/interpreter_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/interpreter_mips_64.cpp - create mode 100644 hotspot/src/cpu/mips/vm/javaFrameAnchor_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/jniFastGetField_mips_64.cpp - create mode 100644 hotspot/src/cpu/mips/vm/jniTypes_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/jni_mips.h - create mode 100644 hotspot/src/cpu/mips/vm/macroAssembler_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/macroAssembler_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/macroAssembler_mips.inline.hpp - create mode 100644 hotspot/src/cpu/mips/vm/metaspaceShared_mips_64.cpp - create mode 100644 hotspot/src/cpu/mips/vm/methodHandles_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/methodHandles_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/mips.ad - create mode 100644 hotspot/src/cpu/mips/vm/mips_64.ad - create mode 100644 hotspot/src/cpu/mips/vm/nativeInst_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/nativeInst_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/registerMap_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/register_definitions_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/register_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/register_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/relocInfo_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/relocInfo_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/runtime_mips_64.cpp - create mode 100644 hotspot/src/cpu/mips/vm/sharedRuntime_mips_64.cpp - create mode 100644 hotspot/src/cpu/mips/vm/stubGenerator_mips_64.cpp - create mode 100644 hotspot/src/cpu/mips/vm/stubRoutines_mips_64.cpp - create mode 100644 hotspot/src/cpu/mips/vm/stubRoutines_mips_64.hpp - create mode 100644 hotspot/src/cpu/mips/vm/templateInterpreterGenerator_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/templateInterpreter_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/templateInterpreter_mips_64.cpp - create mode 100644 hotspot/src/cpu/mips/vm/templateTable_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/templateTable_mips_64.cpp - create mode 100644 hotspot/src/cpu/mips/vm/templateTable_mips_64.hpp - create mode 100644 hotspot/src/cpu/mips/vm/vmStructs_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/vm_version_ext_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/vm_version_ext_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/vm_version_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/vm_version_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/vmreg_mips.cpp - create mode 100644 hotspot/src/cpu/mips/vm/vmreg_mips.hpp - create mode 100644 hotspot/src/cpu/mips/vm/vmreg_mips.inline.hpp - create mode 100644 hotspot/src/cpu/mips/vm/vtableStubs_mips_64.cpp - create mode 100644 hotspot/src/os_cpu/linux_loongarch/vm/assembler_linux_loongarch.cpp - create mode 100644 hotspot/src/os_cpu/linux_loongarch/vm/atomic_linux_loongarch.inline.hpp - create mode 100644 hotspot/src/os_cpu/linux_loongarch/vm/bytes_linux_loongarch.inline.hpp - create mode 100644 hotspot/src/os_cpu/linux_loongarch/vm/copy_linux_loongarch.inline.hpp - create mode 100644 hotspot/src/os_cpu/linux_loongarch/vm/globals_linux_loongarch.hpp - create mode 100644 hotspot/src/os_cpu/linux_loongarch/vm/orderAccess_linux_loongarch.inline.hpp - create mode 100644 hotspot/src/os_cpu/linux_loongarch/vm/os_linux_loongarch.cpp - create mode 100644 hotspot/src/os_cpu/linux_loongarch/vm/os_linux_loongarch.hpp - create mode 100644 hotspot/src/os_cpu/linux_loongarch/vm/prefetch_linux_loongarch.inline.hpp - create mode 100644 hotspot/src/os_cpu/linux_loongarch/vm/threadLS_linux_loongarch.cpp - create mode 100644 hotspot/src/os_cpu/linux_loongarch/vm/threadLS_linux_loongarch.hpp - create mode 100644 hotspot/src/os_cpu/linux_loongarch/vm/thread_linux_loongarch.cpp - create mode 100644 hotspot/src/os_cpu/linux_loongarch/vm/thread_linux_loongarch.hpp - create mode 100644 hotspot/src/os_cpu/linux_loongarch/vm/vmStructs_linux_loongarch.hpp - create mode 100644 hotspot/src/os_cpu/linux_loongarch/vm/vm_version_linux_loongarch.cpp - create mode 100644 hotspot/src/os_cpu/linux_mips/vm/assembler_linux_mips.cpp - create mode 100644 hotspot/src/os_cpu/linux_mips/vm/atomic_linux_mips.inline.hpp - create mode 100644 hotspot/src/os_cpu/linux_mips/vm/bytes_linux_mips.inline.hpp - create mode 100644 hotspot/src/os_cpu/linux_mips/vm/copy_linux_mips.inline.hpp - create mode 100644 hotspot/src/os_cpu/linux_mips/vm/globals_linux_mips.hpp - create mode 100644 hotspot/src/os_cpu/linux_mips/vm/linux_mips.ad - create mode 100644 hotspot/src/os_cpu/linux_mips/vm/linux_mips.s - create mode 100644 hotspot/src/os_cpu/linux_mips/vm/linux_mips_64.ad - create mode 100644 hotspot/src/os_cpu/linux_mips/vm/orderAccess_linux_mips.inline.hpp - create mode 100644 hotspot/src/os_cpu/linux_mips/vm/os_linux_mips.cpp - create mode 100644 hotspot/src/os_cpu/linux_mips/vm/os_linux_mips.hpp - create mode 100644 hotspot/src/os_cpu/linux_mips/vm/prefetch_linux_mips.inline.hpp - create mode 100644 hotspot/src/os_cpu/linux_mips/vm/threadLS_linux_mips.cpp - create mode 100644 hotspot/src/os_cpu/linux_mips/vm/threadLS_linux_mips.hpp - create mode 100644 hotspot/src/os_cpu/linux_mips/vm/thread_linux_mips.cpp - create mode 100644 hotspot/src/os_cpu/linux_mips/vm/thread_linux_mips.hpp - create mode 100644 hotspot/src/os_cpu/linux_mips/vm/vmStructs_linux_mips.hpp - create mode 100644 hotspot/src/os_cpu/linux_mips/vm/vm_version_linux_mips.cpp - create mode 100644 jdk/src/solaris/bin/loongarch64/jvm.cfg - create mode 100644 jdk/src/solaris/bin/mips64/jvm.cfg - create mode 100644 jdk/test/sun/management/jmxremote/bootstrap/linux-loongarch64/launcher - create mode 100644 jdk/test/sun/management/jmxremote/bootstrap/linux-mips64el/launcher - diff --git a/common/autoconf/build-aux/autoconf-config.guess b/common/autoconf/build-aux/autoconf-config.guess -index 15ee4389..3d7555b5 100644 +index 15ee438926..3d7555b52d 100644 --- a/common/autoconf/build-aux/autoconf-config.guess +++ b/common/autoconf/build-aux/autoconf-config.guess @@ -977,6 +977,9 @@ EOF @@ -667,7 +13,7 @@ index 15ee4389..3d7555b5 100644 echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; diff --git a/common/autoconf/build-aux/autoconf-config.sub b/common/autoconf/build-aux/autoconf-config.sub -index 1aab2b30..bd910bdd 100644 +index 1aab2b303e..bd910bddbe 100644 --- a/common/autoconf/build-aux/autoconf-config.sub +++ b/common/autoconf/build-aux/autoconf-config.sub @@ -275,6 +275,7 @@ case $basic_machine in @@ -679,10 +25,10 @@ index 1aab2b30..bd910bdd 100644 | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ diff --git a/common/autoconf/build-aux/config.guess b/common/autoconf/build-aux/config.guess -index 288edb6e..ca6d5871 100644 +index 288edb6e0e..13cd94bf1d 100644 --- a/common/autoconf/build-aux/config.guess +++ b/common/autoconf/build-aux/config.guess -@@ -95,4 +95,15 @@ if [ "x$OUT" = x ]; then +@@ -86,6 +86,17 @@ if [ "x$OUT" = x ]; then fi fi @@ -697,9 +43,11 @@ index 288edb6e..ca6d5871 100644 + fi +fi + - echo $OUT + # Test and fix LoongArch64. + if [ "x$OUT" = x ]; then + if [ `uname -s` = Linux ]; then diff --git a/common/autoconf/configure.ac b/common/autoconf/configure.ac -index 151e5a10..5072409d 100644 +index 151e5a109f..5072409dd4 100644 --- a/common/autoconf/configure.ac +++ b/common/autoconf/configure.ac @@ -23,6 +23,12 @@ @@ -724,7 +72,7 @@ index 151e5a10..5072409d 100644 # Configure flags for the tools FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh -index 85eb8a16..cf57b89f 100644 +index 85eb8a16a2..86a533fe1f 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -716,6 +716,9 @@ SET_EXECUTABLE_ORIGIN @@ -737,23 +85,7 @@ index 85eb8a16..cf57b89f 100644 SYSROOT_LDFLAGS SYSROOT_CFLAGS RC_FLAGS -@@ -1069,6 +1072,7 @@ with_milestone - with_update_version - with_user_release_suffix - with_build_number -+with_company_name - with_vendor_name - with_vendor_url - with_vendor_bug_url -@@ -1922,6 +1926,7 @@ Optional Packages: - Add a custom string to the version string if build - number isn't set.[username_builddateb00] - --with-build-number Set build number value for build [b00] -+ --with-company-name Set company name. - --with-vendor-name Set vendor name. Among others, used to set the - 'java.vendor' and 'java.vm.vendor' system - properties. [not specified] -@@ -4081,6 +4086,12 @@ fi +@@ -4081,6 +4084,12 @@ fi # questions. # @@ -766,7 +98,7 @@ index 85eb8a16..cf57b89f 100644 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD. # Converts autoconf style CPU name to OpenJDK style, into # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN. -@@ -13930,6 +13941,12 @@ test -n "$target_alias" && +@@ -13930,6 +13939,12 @@ test -n "$target_alias" && VAR_CPU_BITS=64 VAR_CPU_ENDIAN=big ;; @@ -779,7 +111,7 @@ index 85eb8a16..cf57b89f 100644 loongarch64) VAR_CPU=loongarch64 VAR_CPU_ARCH=loongarch -@@ -14074,6 +14091,12 @@ $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; } +@@ -14074,6 +14089,12 @@ $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; } VAR_CPU_BITS=64 VAR_CPU_ENDIAN=big ;; @@ -792,7 +124,7 @@ index 85eb8a16..cf57b89f 100644 loongarch64) VAR_CPU=loongarch64 VAR_CPU_ARCH=loongarch -@@ -14202,6 +14225,8 @@ $as_echo "$COMPILE_TYPE" >&6; } +@@ -14202,6 +14223,8 @@ $as_echo "$COMPILE_TYPE" >&6; } OPENJDK_TARGET_CPU_LEGACY_LIB="i386" elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then OPENJDK_TARGET_CPU_LEGACY_LIB="amd64" @@ -801,7 +133,7 @@ index 85eb8a16..cf57b89f 100644 fi -@@ -14235,6 +14260,9 @@ $as_echo "$COMPILE_TYPE" >&6; } +@@ -14235,6 +14258,9 @@ $as_echo "$COMPILE_TYPE" >&6; } elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then # On all platforms except macosx, we replace x86_64 with amd64. OPENJDK_TARGET_CPU_OSARCH="amd64" @@ -811,7 +143,7 @@ index 85eb8a16..cf57b89f 100644 fi -@@ -14244,6 +14272,8 @@ $as_echo "$COMPILE_TYPE" >&6; } +@@ -14244,6 +14270,8 @@ $as_echo "$COMPILE_TYPE" >&6; } elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then # On all platforms except macosx, we replace x86_64 with amd64. OPENJDK_TARGET_CPU_JLI="amd64" @@ -820,7 +152,7 @@ index 85eb8a16..cf57b89f 100644 fi # Now setup the -D flags for building libjli. OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'" -@@ -14256,6 +14286,9 @@ $as_echo "$COMPILE_TYPE" >&6; } +@@ -14256,6 +14284,9 @@ $as_echo "$COMPILE_TYPE" >&6; } elif test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$TOOLCHAIN_TYPE" = xclang ; then OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -stdlib=libc++ -mmacosx-version-min=\$(MACOSX_VERSION_MIN)" fi @@ -830,38 +162,7 @@ index 85eb8a16..cf57b89f 100644 # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths. -@@ -20409,18 +20442,21 @@ fi - - # Now set the JDK version, milestone, build number etc. - -+ # The company name, if any - -+# Check whether --with-company-name was given. -+if test "${with_company_name+set}" = set; then : -+ withval=$with_company_name; -+fi - - -- -- -- -- -- -- -- -- -- -+ if test "x$with_company_name" = xyes; then -+ as_fn_error $? "--with-company-name must have a value" "$LINENO" 5 -+ elif ! [[ $with_company_name =~ ^[[:print:]]*$ ]] ; then -+ as_fn_error $? "--with-company-name contains non-printing characters: $with_company_name" "$LINENO" 5 -+ elif test "x$with_company_name" != x; then -+ COMPANY_NAME="$with_company_name" -+ fi - - # The vendor name, if any - -@@ -42436,6 +42472,47 @@ $as_echo "$ac_cv_c_bigendian" >&6; } +@@ -42436,6 +42467,47 @@ $as_echo "$ac_cv_c_bigendian" >&6; } fi @@ -909,31 +210,8 @@ index 85eb8a16..cf57b89f 100644 # Configure flags for the tools ############################################################################### -diff --git a/common/autoconf/jdk-options.m4 b/common/autoconf/jdk-options.m4 -index 18ba5852..42aeb7bd 100644 ---- a/common/autoconf/jdk-options.m4 -+++ b/common/autoconf/jdk-options.m4 -@@ -539,6 +539,18 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS], - AC_SUBST(MACOSX_BUNDLE_NAME_BASE) - AC_SUBST(MACOSX_BUNDLE_ID_BASE) - -+ # The company name, if any -+ AC_ARG_WITH(company-name, [AS_HELP_STRING([--with-company-name], -+ [Set company name.])]) -+ if test "x$with_company_name" = xyes; then -+ AC_MSG_ERROR([--with-company-name must have a value]) -+ elif [ ! [[ $with_company_name =~ ^[[:print:]]*$ ]] ]; then -+ AC_MSG_ERROR([--with-company-name contains non-printing characters: $with_company_name]) -+ elif test "x$with_company_name" != x; then -+ COMPANY_NAME="$with_company_name" -+ fi -+ AC_SUBST(COMPANY_NAME) -+ - # The vendor name, if any - AC_ARG_WITH(vendor-name, [AS_HELP_STRING([--with-vendor-name], - [Set vendor name. Among others, used to set the 'java.vendor' diff --git a/common/autoconf/platform.m4 b/common/autoconf/platform.m4 -index f54942ac..51cc28c3 100644 +index f54942acf2..51cc28c312 100644 --- a/common/autoconf/platform.m4 +++ b/common/autoconf/platform.m4 @@ -23,6 +23,12 @@ @@ -1048,7 +326,7 @@ index f54942ac..51cc28c3 100644 +AC_SUBST(HOST_NAME) +]) diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in -index 9573bb2c..1b034770 100644 +index 9573bb2cbd..57a903229a 100644 --- a/common/autoconf/spec.gmk.in +++ b/common/autoconf/spec.gmk.in @@ -23,6 +23,12 @@ @@ -1056,8 +334,8 @@ index 9573bb2c..1b034770 100644 # +# -+# This file has been modified by Loongson Technology in 2023. These -+# modifications are Copyright (c) 2018, 2023, Loongson Technology, and are made ++# This file has been modified by Loongson Technology in 2024. These ++# modifications are Copyright (c) 2018, 2024, Loongson Technology, and are made +# available on the same license terms set forth above. +# + @@ -1074,7 +352,7 @@ index 9573bb2c..1b034770 100644 +HOST_NAME:=@HOST_NAME@ + +# Loongson OpenJDK Version info -+VER=8.1.18 ++VER=8.1.19 +ifeq ($(HOST_NAME), ) + HOST_NAME=unknown +endif @@ -1089,7 +367,7 @@ index 9573bb2c..1b034770 100644 DEBUG_LEVEL:=@DEBUG_LEVEL@ diff --git a/hotspot/agent/make/saenv.sh b/hotspot/agent/make/saenv.sh -index ab9a0a43..a2de3fc3 100644 +index ab9a0a431c..a2de3fc329 100644 --- a/hotspot/agent/make/saenv.sh +++ b/hotspot/agent/make/saenv.sh @@ -23,6 +23,12 @@ @@ -1121,7 +399,7 @@ index ab9a0a43..a2de3fc3 100644 SA_LIBPATH=$STARTDIR/../src/os/linux/i386:$STARTDIR/linux/i386 OPTIONS="-Dsa.library.path=$SA_LIBPATH" diff --git a/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c b/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c -index d6a0c7d9..b3b1380b 100644 +index d6a0c7d9a9..b3b1380b29 100644 --- a/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c +++ b/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c @@ -22,6 +22,13 @@ @@ -1236,7 +514,7 @@ index d6a0c7d9..b3b1380b 100644 (*env)->ReleaseLongArrayElements(env, array, regs, JNI_COMMIT); return array; diff --git a/hotspot/agent/src/os/linux/Makefile b/hotspot/agent/src/os/linux/Makefile -index c0b5c869..2cc50b6f 100644 +index c0b5c869c1..2cc50b6fab 100644 --- a/hotspot/agent/src/os/linux/Makefile +++ b/hotspot/agent/src/os/linux/Makefile @@ -22,7 +22,13 @@ @@ -1264,7 +542,7 @@ index c0b5c869..2cc50b6f 100644 sun.jvm.hotspot.debugger.aarch64.AARCH64ThreadContext $(GCC) $(CFLAGS) $< -o $@ diff --git a/hotspot/agent/src/os/linux/libproc.h b/hotspot/agent/src/os/linux/libproc.h -index 6b6e41ca..5eb8211a 100644 +index 6b6e41cab4..5eb8211aa9 100644 --- a/hotspot/agent/src/os/linux/libproc.h +++ b/hotspot/agent/src/os/linux/libproc.h @@ -22,6 +22,12 @@ @@ -1304,7 +582,7 @@ index 6b6e41ca..5eb8211a 100644 #endif diff --git a/hotspot/agent/src/os/linux/ps_proc.c b/hotspot/agent/src/os/linux/ps_proc.c -index c4d6a9ec..7000e927 100644 +index c4d6a9ecc5..7000e92723 100644 --- a/hotspot/agent/src/os/linux/ps_proc.c +++ b/hotspot/agent/src/os/linux/ps_proc.c @@ -22,6 +22,12 @@ @@ -1330,7 +608,7 @@ index c4d6a9ec..7000e927 100644 print_debug("ptrace(PTRACE_GETREGS, ...) failed for lwp %d\n", pid); return false; diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java -index c9633505..20e6f35b 100644 +index c963350591..20e6f35b9c 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java @@ -22,6 +22,12 @@ @@ -1367,7 +645,7 @@ index c9633505..20e6f35b 100644 try { machDesc = (MachineDescription) diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Disassembler.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Disassembler.java -index 993bf7bb..1e075aa5 100644 +index 993bf7bb47..1e075aa57e 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Disassembler.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Disassembler.java @@ -94,6 +94,12 @@ public class Disassembler { @@ -1385,7 +663,7 @@ index 993bf7bb..1e075aa5 100644 libname += "-" + arch + ".so"; diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionLOONGARCH64.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionLOONGARCH64.java new file mode 100644 -index 00000000..0531427d +index 0000000000..0531427dab --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionLOONGARCH64.java @@ -0,0 +1,41 @@ @@ -1432,7 +710,7 @@ index 00000000..0531427d +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionMIPS64.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionMIPS64.java new file mode 100644 -index 00000000..1b49efd2 +index 0000000000..1b49efd201 --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionMIPS64.java @@ -0,0 +1,41 @@ @@ -1478,7 +756,7 @@ index 00000000..1b49efd2 + } +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.java -index f178d6a6..019e794b 100644 +index f178d6a6e7..019e794bbb 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.java @@ -32,11 +32,15 @@ import sun.jvm.hotspot.debugger.cdbg.*; @@ -1519,7 +797,7 @@ index f178d6a6..019e794b 100644 // Runtime exception thrown by LinuxThreadContextFactory if unknown cpu ThreadContext context = (ThreadContext) thread.getContext(); diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxThreadContextFactory.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxThreadContextFactory.java -index 44c2265d..3b6747ac 100644 +index 44c2265d7a..3b6747ac0a 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxThreadContextFactory.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxThreadContextFactory.java @@ -30,6 +30,8 @@ import sun.jvm.hotspot.debugger.linux.amd64.*; @@ -1544,7 +822,7 @@ index 44c2265d..3b6747ac 100644 Class tcc = Class.forName("sun.jvm.hotspot.debugger.linux." + diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/loongarch64/LinuxLOONGARCH64CFrame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/loongarch64/LinuxLOONGARCH64CFrame.java new file mode 100644 -index 00000000..3b20dbbd +index 0000000000..3b20dbbd87 --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/loongarch64/LinuxLOONGARCH64CFrame.java @@ -0,0 +1,80 @@ @@ -1630,7 +908,7 @@ index 00000000..3b20dbbd +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/loongarch64/LinuxLOONGARCH64ThreadContext.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/loongarch64/LinuxLOONGARCH64ThreadContext.java new file mode 100644 -index 00000000..9f22133e +index 0000000000..9f22133eaf --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/loongarch64/LinuxLOONGARCH64ThreadContext.java @@ -0,0 +1,47 @@ @@ -1683,7 +961,7 @@ index 00000000..9f22133e +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/mips64/LinuxMIPS64CFrame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/mips64/LinuxMIPS64CFrame.java new file mode 100644 -index 00000000..2e3eb564 +index 0000000000..2e3eb564da --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/mips64/LinuxMIPS64CFrame.java @@ -0,0 +1,80 @@ @@ -1769,7 +1047,7 @@ index 00000000..2e3eb564 +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/mips64/LinuxMIPS64ThreadContext.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/mips64/LinuxMIPS64ThreadContext.java new file mode 100644 -index 00000000..98e0f3f0 +index 0000000000..98e0f3f0bc --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/mips64/LinuxMIPS64ThreadContext.java @@ -0,0 +1,47 @@ @@ -1822,7 +1100,7 @@ index 00000000..98e0f3f0 +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/loongarch64/LOONGARCH64ThreadContext.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/loongarch64/LOONGARCH64ThreadContext.java new file mode 100644 -index 00000000..90b0cf97 +index 0000000000..90b0cf97e3 --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/loongarch64/LOONGARCH64ThreadContext.java @@ -0,0 +1,123 @@ @@ -1951,7 +1229,7 @@ index 00000000..90b0cf97 +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/mips64/MIPS64ThreadContext.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/mips64/MIPS64ThreadContext.java new file mode 100644 -index 00000000..c57ee9df +index 0000000000..c57ee9dfc9 --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/mips64/MIPS64ThreadContext.java @@ -0,0 +1,123 @@ @@ -2079,7 +1357,7 @@ index 00000000..c57ee9df + public abstract Address getRegisterAsAddress(int index); +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/posix/elf/ELFHeader.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/posix/elf/ELFHeader.java -index 7113a3a4..24273888 100644 +index 7113a3a497..24273888c2 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/posix/elf/ELFHeader.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/posix/elf/ELFHeader.java @@ -63,6 +63,8 @@ public interface ELFHeader { @@ -2092,7 +1370,7 @@ index 7113a3a4..24273888 100644 /** Returns a file type which is defined by the file type constants. */ public short getFileType(); diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java -index ca1a2575..2afa6c55 100644 +index ca1a2575ff..2afa6c55f8 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java @@ -34,10 +34,14 @@ import sun.jvm.hotspot.debugger.proc.amd64.*; @@ -2127,7 +1405,7 @@ index ca1a2575..2afa6c55 100644 Class tfc = Class.forName("sun.jvm.hotspot.debugger.proc." + diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/loongarch64/ProcLOONGARCH64Thread.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/loongarch64/ProcLOONGARCH64Thread.java new file mode 100644 -index 00000000..42a31e34 +index 0000000000..42a31e3486 --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/loongarch64/ProcLOONGARCH64Thread.java @@ -0,0 +1,92 @@ @@ -2225,7 +1503,7 @@ index 00000000..42a31e34 +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/loongarch64/ProcLOONGARCH64ThreadContext.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/loongarch64/ProcLOONGARCH64ThreadContext.java new file mode 100644 -index 00000000..9054f165 +index 0000000000..9054f16506 --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/loongarch64/ProcLOONGARCH64ThreadContext.java @@ -0,0 +1,47 @@ @@ -2278,7 +1556,7 @@ index 00000000..9054f165 +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/loongarch64/ProcLOONGARCH64ThreadFactory.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/loongarch64/ProcLOONGARCH64ThreadFactory.java new file mode 100644 -index 00000000..bc643351 +index 0000000000..bc64335124 --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/loongarch64/ProcLOONGARCH64ThreadFactory.java @@ -0,0 +1,45 @@ @@ -2329,7 +1607,7 @@ index 00000000..bc643351 +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/mips64/ProcMIPS64Thread.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/mips64/ProcMIPS64Thread.java new file mode 100644 -index 00000000..5c1e0be8 +index 0000000000..5c1e0be893 --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/mips64/ProcMIPS64Thread.java @@ -0,0 +1,92 @@ @@ -2427,7 +1705,7 @@ index 00000000..5c1e0be8 +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/mips64/ProcMIPS64ThreadContext.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/mips64/ProcMIPS64ThreadContext.java new file mode 100644 -index 00000000..d44223d7 +index 0000000000..d44223d768 --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/mips64/ProcMIPS64ThreadContext.java @@ -0,0 +1,47 @@ @@ -2480,7 +1758,7 @@ index 00000000..d44223d7 +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/mips64/ProcMIPS64ThreadFactory.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/mips64/ProcMIPS64ThreadFactory.java new file mode 100644 -index 00000000..bad478fc +index 0000000000..bad478fc5c --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/mips64/ProcMIPS64ThreadFactory.java @@ -0,0 +1,45 @@ @@ -2530,7 +1808,7 @@ index 00000000..bad478fc + } +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java -index ffa61b54..9cf3ee2d 100644 +index ffa61b548e..9cf3ee2da3 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java @@ -33,6 +33,8 @@ import sun.jvm.hotspot.debugger.cdbg.*; @@ -2561,7 +1839,7 @@ index ffa61b54..9cf3ee2d 100644 Class tf = Class.forName("sun.jvm.hotspot.debugger.remote." + diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64Thread.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64Thread.java new file mode 100644 -index 00000000..01e3f895 +index 0000000000..01e3f8954b --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64Thread.java @@ -0,0 +1,54 @@ @@ -2621,7 +1899,7 @@ index 00000000..01e3f895 +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64ThreadContext.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64ThreadContext.java new file mode 100644 -index 00000000..ad25bccc +index 0000000000..ad25bccc8d --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64ThreadContext.java @@ -0,0 +1,51 @@ @@ -2678,7 +1956,7 @@ index 00000000..ad25bccc +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64ThreadFactory.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64ThreadFactory.java new file mode 100644 -index 00000000..d8bf50ea +index 0000000000..d8bf50ea5b --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/loongarch64/RemoteLOONGARCH64ThreadFactory.java @@ -0,0 +1,45 @@ @@ -2729,7 +2007,7 @@ index 00000000..d8bf50ea +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/mips64/RemoteMIPS64Thread.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/mips64/RemoteMIPS64Thread.java new file mode 100644 -index 00000000..a9285a3b +index 0000000000..a9285a3b94 --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/mips64/RemoteMIPS64Thread.java @@ -0,0 +1,54 @@ @@ -2789,7 +2067,7 @@ index 00000000..a9285a3b +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/mips64/RemoteMIPS64ThreadContext.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/mips64/RemoteMIPS64ThreadContext.java new file mode 100644 -index 00000000..4d711f9b +index 0000000000..4d711f9ba7 --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/mips64/RemoteMIPS64ThreadContext.java @@ -0,0 +1,51 @@ @@ -2846,7 +2124,7 @@ index 00000000..4d711f9b +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/mips64/RemoteMIPS64ThreadFactory.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/mips64/RemoteMIPS64ThreadFactory.java new file mode 100644 -index 00000000..020a2f1f +index 0000000000..020a2f1ff9 --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/mips64/RemoteMIPS64ThreadFactory.java @@ -0,0 +1,45 @@ @@ -2896,7 +2174,7 @@ index 00000000..020a2f1f + } +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java -index 842a3b35..81efdd02 100644 +index 842a3b357d..81efdd02f8 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java @@ -34,6 +34,8 @@ import sun.jvm.hotspot.runtime.win32_amd64.Win32AMD64JavaThreadPDAccess; @@ -2921,7 +2199,7 @@ index 842a3b35..81efdd02 100644 access = (JavaThreadPDAccess) diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/linux_loongarch64/LinuxLOONGARCH64JavaThreadPDAccess.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/linux_loongarch64/LinuxLOONGARCH64JavaThreadPDAccess.java new file mode 100644 -index 00000000..77c45c2e +index 0000000000..77c45c2e99 --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/linux_loongarch64/LinuxLOONGARCH64JavaThreadPDAccess.java @@ -0,0 +1,133 @@ @@ -3060,7 +2338,7 @@ index 00000000..77c45c2e +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/linux_mips64/LinuxMIPS64JavaThreadPDAccess.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/linux_mips64/LinuxMIPS64JavaThreadPDAccess.java new file mode 100644 -index 00000000..a0fd73fa +index 0000000000..a0fd73fa67 --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/linux_mips64/LinuxMIPS64JavaThreadPDAccess.java @@ -0,0 +1,132 @@ @@ -3198,7 +2476,7 @@ index 00000000..a0fd73fa +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64CurrentFrameGuess.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64CurrentFrameGuess.java new file mode 100644 -index 00000000..0208e6e2 +index 0000000000..0208e6e224 --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64CurrentFrameGuess.java @@ -0,0 +1,217 @@ @@ -3421,7 +2699,7 @@ index 00000000..0208e6e2 +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64Frame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64Frame.java new file mode 100644 -index 00000000..fdf0c79c +index 0000000000..fdf0c79c1a --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64Frame.java @@ -0,0 +1,534 @@ @@ -3961,7 +3239,7 @@ index 00000000..fdf0c79c +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64JavaCallWrapper.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64JavaCallWrapper.java new file mode 100644 -index 00000000..f7dbbcaa +index 0000000000..f7dbbcaacd --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64JavaCallWrapper.java @@ -0,0 +1,57 @@ @@ -4024,7 +3302,7 @@ index 00000000..f7dbbcaa +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64RegisterMap.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64RegisterMap.java new file mode 100644 -index 00000000..021ef523 +index 0000000000..021ef523e3 --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/loongarch64/LOONGARCH64RegisterMap.java @@ -0,0 +1,52 @@ @@ -4082,7 +3360,7 @@ index 00000000..021ef523 +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/mips64/MIPS64CurrentFrameGuess.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/mips64/MIPS64CurrentFrameGuess.java new file mode 100644 -index 00000000..21259a4d +index 0000000000..21259a4d32 --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/mips64/MIPS64CurrentFrameGuess.java @@ -0,0 +1,217 @@ @@ -4305,7 +3583,7 @@ index 00000000..21259a4d +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/mips64/MIPS64Frame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/mips64/MIPS64Frame.java new file mode 100644 -index 00000000..0cc5cf4e +index 0000000000..0cc5cf4e7c --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/mips64/MIPS64Frame.java @@ -0,0 +1,547 @@ @@ -4858,7 +4136,7 @@ index 00000000..0cc5cf4e +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/mips64/MIPS64JavaCallWrapper.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/mips64/MIPS64JavaCallWrapper.java new file mode 100644 -index 00000000..81fcb5b5 +index 0000000000..81fcb5b568 --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/mips64/MIPS64JavaCallWrapper.java @@ -0,0 +1,57 @@ @@ -4921,7 +4199,7 @@ index 00000000..81fcb5b5 +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/mips64/MIPS64RegisterMap.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/mips64/MIPS64RegisterMap.java new file mode 100644 -index 00000000..64850379 +index 0000000000..648503792d --- /dev/null +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/mips64/MIPS64RegisterMap.java @@ -0,0 +1,52 @@ @@ -4978,7 +4256,7 @@ index 00000000..64850379 + protected Address getLocationPD(VMReg reg) { return null; } +} diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java -index aa692578..9c97d09b 100644 +index aa69257866..9c97d09bc3 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java @@ -22,6 +22,13 @@ @@ -5007,7 +4285,7 @@ index aa692578..9c97d09b 100644 try { Class pic = Class.forName("sun.jvm.hotspot.utilities.PlatformInfoClosed"); diff --git a/hotspot/make/defs.make b/hotspot/make/defs.make -index a3573da5..6e93182c 100644 +index a3573da56f..6e93182c92 100644 --- a/hotspot/make/defs.make +++ b/hotspot/make/defs.make @@ -22,6 +22,12 @@ @@ -5085,7 +4363,7 @@ index a3573da5..6e93182c 100644 # Required make macro settings for all platforms diff --git a/hotspot/make/linux/Makefile b/hotspot/make/linux/Makefile -index e8f20104..5aff01e8 100644 +index e8f2010412..5aff01e87d 100644 --- a/hotspot/make/linux/Makefile +++ b/hotspot/make/linux/Makefile @@ -74,6 +74,10 @@ ifneq (,$(findstring $(ARCH), ppc ppc64)) @@ -5100,7 +4378,7 @@ index e8f20104..5aff01e8 100644 ifdef LP64 ifeq ("$(filter $(LP64_ARCH),$(BUILDARCH))","") diff --git a/hotspot/make/linux/makefiles/defs.make b/hotspot/make/linux/makefiles/defs.make -index ec414639..9ade73ab 100644 +index ec414639d2..9ade73ab34 100644 --- a/hotspot/make/linux/makefiles/defs.make +++ b/hotspot/make/linux/makefiles/defs.make @@ -22,6 +22,12 @@ @@ -5198,7 +4476,7 @@ index ec414639..9ade73ab 100644 endif endif diff --git a/hotspot/make/linux/makefiles/gcc.make b/hotspot/make/linux/makefiles/gcc.make -index 7dde7f09..94c6d1d0 100644 +index 7dde7f0963..94c6d1d015 100644 --- a/hotspot/make/linux/makefiles/gcc.make +++ b/hotspot/make/linux/makefiles/gcc.make @@ -22,6 +22,12 @@ @@ -5235,7 +4513,7 @@ index 7dde7f09..94c6d1d0 100644 # However we need to clean the code up before we can unrestrictedly enable this option with Clang diff --git a/hotspot/make/linux/makefiles/loongarch64.make b/hotspot/make/linux/makefiles/loongarch64.make new file mode 100644 -index 00000000..9e3cdb6f +index 0000000000..9e3cdb6f23 --- /dev/null +++ b/hotspot/make/linux/makefiles/loongarch64.make @@ -0,0 +1,43 @@ @@ -5284,7 +4562,7 @@ index 00000000..9e3cdb6f +OPT_CFLAGS/compactingPermGenGen.o = -O1 diff --git a/hotspot/make/linux/makefiles/mips64.make b/hotspot/make/linux/makefiles/mips64.make new file mode 100644 -index 00000000..d9af3b13 +index 0000000000..d9af3b13ab --- /dev/null +++ b/hotspot/make/linux/makefiles/mips64.make @@ -0,0 +1,43 @@ @@ -5332,7 +4610,7 @@ index 00000000..d9af3b13 + +OPT_CFLAGS/compactingPermGenGen.o = -O1 diff --git a/hotspot/make/linux/makefiles/sa.make b/hotspot/make/linux/makefiles/sa.make -index cdcb16a1..34c71bd6 100644 +index cdcb16a1a3..34c71bd666 100644 --- a/hotspot/make/linux/makefiles/sa.make +++ b/hotspot/make/linux/makefiles/sa.make @@ -22,6 +22,12 @@ @@ -5358,7 +4636,7 @@ index cdcb16a1..34c71bd6 100644 $(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.asm.Disassembler diff --git a/hotspot/make/linux/makefiles/saproc.make b/hotspot/make/linux/makefiles/saproc.make -index ffc0ec5c..c04a6765 100644 +index ffc0ec5ce5..c04a6765df 100644 --- a/hotspot/make/linux/makefiles/saproc.make +++ b/hotspot/make/linux/makefiles/saproc.make @@ -21,6 +21,13 @@ @@ -5389,7 +4667,7 @@ index ffc0ec5c..c04a6765 100644 $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE) $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \ diff --git a/hotspot/make/linux/makefiles/sparcWorks.make b/hotspot/make/linux/makefiles/sparcWorks.make -index e3911602..dbc2ace8 100644 +index e39116023c..dbc2ace825 100644 --- a/hotspot/make/linux/makefiles/sparcWorks.make +++ b/hotspot/make/linux/makefiles/sparcWorks.make @@ -22,6 +22,12 @@ @@ -5414,7 +4692,7 @@ index e3911602..dbc2ace8 100644 CFLAGS += $(ARCHFLAG) AOUT_FLAGS += $(ARCHFLAG) diff --git a/hotspot/make/linux/makefiles/vm.make b/hotspot/make/linux/makefiles/vm.make -index 04b7c202..5e428538 100644 +index 04b7c20287..5e428538a0 100644 --- a/hotspot/make/linux/makefiles/vm.make +++ b/hotspot/make/linux/makefiles/vm.make @@ -22,6 +22,12 @@ @@ -5471,7 +4749,7 @@ index 04b7c202..5e428538 100644 # This has to be included here to allow changes to the source diff --git a/hotspot/make/linux/platform_loongarch64 b/hotspot/make/linux/platform_loongarch64 new file mode 100644 -index 00000000..d704cf38 +index 0000000000..d704cf389a --- /dev/null +++ b/hotspot/make/linux/platform_loongarch64 @@ -0,0 +1,17 @@ @@ -5494,7 +4772,7 @@ index 00000000..d704cf38 +sysdefs = -DLINUX -D_GNU_SOURCE -DLOONGARCH64 diff --git a/hotspot/make/linux/platform_mips64 b/hotspot/make/linux/platform_mips64 new file mode 100644 -index 00000000..c283671f +index 0000000000..c283671f82 --- /dev/null +++ b/hotspot/make/linux/platform_mips64 @@ -0,0 +1,17 @@ @@ -5516,7 +4794,7 @@ index 00000000..c283671f + +sysdefs = -DLINUX -D_GNU_SOURCE -DMIPS64 diff --git a/hotspot/make/sa.files b/hotspot/make/sa.files -index d6e728a9..43b08e3a 100644 +index d6e728a9a8..43b08e3ad1 100644 --- a/hotspot/make/sa.files +++ b/hotspot/make/sa.files @@ -22,6 +22,12 @@ @@ -5567,7 +4845,7 @@ index d6e728a9..43b08e3a 100644 $(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/solaris_amd64/*.java \ $(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/solaris_sparc/*.java \ diff --git a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp -index 35d34a08..3b8cf4a1 100644 +index 35d34a08ea..3b8cf4a11d 100644 --- a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp @@ -1177,7 +1177,9 @@ void LIR_Assembler::emit_opBranch(LIR_OpBranch* op) { @@ -5630,7 +4908,7 @@ index 35d34a08..3b8cf4a1 100644 assert(info == NULL, "should never be used, idiv/irem and ldiv/lrem not handled by this method"); diff --git a/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp -index 4f694b17..c0520983 100644 +index 4f694b1775..c052098323 100644 --- a/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp @@ -279,18 +279,29 @@ void LIRGenerator::increment_counter(LIR_Address* addr, int step) { @@ -5669,7 +4947,7 @@ index 4f694b17..c0520983 100644 diff --git a/hotspot/src/cpu/loongarch/vm/assembler_loongarch.cpp b/hotspot/src/cpu/loongarch/vm/assembler_loongarch.cpp new file mode 100644 -index 00000000..2996ef7a +index 0000000000..2996ef7aa7 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/assembler_loongarch.cpp @@ -0,0 +1,855 @@ @@ -6530,7 +5808,7 @@ index 00000000..2996ef7a +} diff --git a/hotspot/src/cpu/loongarch/vm/assembler_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/assembler_loongarch.hpp new file mode 100644 -index 00000000..46b57cfe +index 0000000000..46b57cfe76 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/assembler_loongarch.hpp @@ -0,0 +1,2810 @@ @@ -9346,7 +8624,7 @@ index 00000000..46b57cfe +#endif // CPU_LOONGARCH_VM_ASSEMBLER_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/assembler_loongarch.inline.hpp b/hotspot/src/cpu/loongarch/vm/assembler_loongarch.inline.hpp new file mode 100644 -index 00000000..601f4afe +index 0000000000..601f4afe6f --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/assembler_loongarch.inline.hpp @@ -0,0 +1,33 @@ @@ -9385,7 +8663,7 @@ index 00000000..601f4afe +#endif // CPU_LOONGARCH_VM_ASSEMBLER_LOONGARCH_INLINE_HPP diff --git a/hotspot/src/cpu/loongarch/vm/bytecodeInterpreter_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/bytecodeInterpreter_loongarch.hpp new file mode 100644 -index 00000000..32775e9b +index 0000000000..32775e9bc3 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/bytecodeInterpreter_loongarch.hpp @@ -0,0 +1,110 @@ @@ -9501,7 +8779,7 @@ index 00000000..32775e9b +#endif // CPU_LOONGARCH_VM_BYTECODEINTERPRETER_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/bytecodeInterpreter_loongarch.inline.hpp b/hotspot/src/cpu/loongarch/vm/bytecodeInterpreter_loongarch.inline.hpp new file mode 100644 -index 00000000..07df527e +index 0000000000..07df527e94 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/bytecodeInterpreter_loongarch.inline.hpp @@ -0,0 +1,286 @@ @@ -9793,7 +9071,7 @@ index 00000000..07df527e +#endif // CPU_LOONGARCH_VM_BYTECODEINTERPRETER_LOONGARCH_INLINE_HPP diff --git a/hotspot/src/cpu/loongarch/vm/bytecodes_loongarch.cpp b/hotspot/src/cpu/loongarch/vm/bytecodes_loongarch.cpp new file mode 100644 -index 00000000..86410905 +index 0000000000..8641090584 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/bytecodes_loongarch.cpp @@ -0,0 +1,38 @@ @@ -9837,7 +9115,7 @@ index 00000000..86410905 +} diff --git a/hotspot/src/cpu/loongarch/vm/bytecodes_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/bytecodes_loongarch.hpp new file mode 100644 -index 00000000..fbdf5319 +index 0000000000..fbdf531996 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/bytecodes_loongarch.hpp @@ -0,0 +1,31 @@ @@ -9874,7 +9152,7 @@ index 00000000..fbdf5319 +#endif // CPU_LOONGARCH_VM_BYTECODES_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/bytes_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/bytes_loongarch.hpp new file mode 100644 -index 00000000..8f766a61 +index 0000000000..8f766a617e --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/bytes_loongarch.hpp @@ -0,0 +1,75 @@ @@ -9955,7 +9233,7 @@ index 00000000..8f766a61 +#endif // CPU_LOONGARCH_VM_BYTES_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/c1_CodeStubs_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/c1_CodeStubs_loongarch_64.cpp new file mode 100644 -index 00000000..5166acfa +index 0000000000..5166acfa2b --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/c1_CodeStubs_loongarch_64.cpp @@ -0,0 +1,387 @@ @@ -10348,7 +9626,7 @@ index 00000000..5166acfa +#undef __ diff --git a/hotspot/src/cpu/loongarch/vm/c1_Defs_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/c1_Defs_loongarch.hpp new file mode 100644 -index 00000000..1140e444 +index 0000000000..1140e44431 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/c1_Defs_loongarch.hpp @@ -0,0 +1,79 @@ @@ -10433,7 +9711,7 @@ index 00000000..1140e444 +#endif // CPU_LOONGARCH_C1_DEFS_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/c1_FpuStackSim_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/c1_FpuStackSim_loongarch.hpp new file mode 100644 -index 00000000..bd8578c7 +index 0000000000..bd8578c72a --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/c1_FpuStackSim_loongarch.hpp @@ -0,0 +1,32 @@ @@ -10471,7 +9749,7 @@ index 00000000..bd8578c7 +#endif // CPU_LOONGARCH_C1_FPUSTACKSIM_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/c1_FpuStackSim_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/c1_FpuStackSim_loongarch_64.cpp new file mode 100644 -index 00000000..1a89c437 +index 0000000000..1a89c437a8 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/c1_FpuStackSim_loongarch_64.cpp @@ -0,0 +1,31 @@ @@ -10508,7 +9786,7 @@ index 00000000..1a89c437 +#include "precompiled.hpp" diff --git a/hotspot/src/cpu/loongarch/vm/c1_FrameMap_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/c1_FrameMap_loongarch.hpp new file mode 100644 -index 00000000..4f0cf053 +index 0000000000..4f0cf05361 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/c1_FrameMap_loongarch.hpp @@ -0,0 +1,143 @@ @@ -10657,7 +9935,7 @@ index 00000000..4f0cf053 +#endif // CPU_LOONGARCH_C1_FRAMEMAP_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/c1_FrameMap_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/c1_FrameMap_loongarch_64.cpp new file mode 100644 -index 00000000..25c90bcf +index 0000000000..25c90bcf98 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/c1_FrameMap_loongarch_64.cpp @@ -0,0 +1,362 @@ @@ -11025,7 +10303,7 @@ index 00000000..25c90bcf +} diff --git a/hotspot/src/cpu/loongarch/vm/c1_LIRAssembler_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/c1_LIRAssembler_loongarch.hpp new file mode 100644 -index 00000000..38b0daa0 +index 0000000000..38b0daa025 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/c1_LIRAssembler_loongarch.hpp @@ -0,0 +1,83 @@ @@ -11114,7 +10392,7 @@ index 00000000..38b0daa0 +#endif // CPU_LOONGARCH_C1_LIRASSEMBLER_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/c1_LIRAssembler_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/c1_LIRAssembler_loongarch_64.cpp new file mode 100644 -index 00000000..ee48326b +index 0000000000..ee48326bec --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/c1_LIRAssembler_loongarch_64.cpp @@ -0,0 +1,3377 @@ @@ -14497,13 +13775,13 @@ index 00000000..ee48326b +#undef __ diff --git a/hotspot/src/cpu/loongarch/vm/c1_LIRGenerator_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/c1_LIRGenerator_loongarch_64.cpp new file mode 100644 -index 00000000..7cb15f68 +index 0000000000..e170bee525 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/c1_LIRGenerator_loongarch_64.cpp -@@ -0,0 +1,1442 @@ +@@ -0,0 +1,1444 @@ +/* + * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2021, Loongson Technology. All rights reserved. ++ * Copyright (c) 2021, 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 @@ -14658,8 +13936,10 @@ index 00000000..7cb15f68 + if (index->is_register()) { + // apply the shift and accumulate the displacement + if (shift > 0) { -+ LIR_Opr tmp = new_pointer_register(); -+ __ shift_left(index, shift, tmp); ++ // Use long register to avoid overflow when shifting large index values left. ++ LIR_Opr tmp = new_register(T_LONG); ++ __ convert(Bytecodes::_i2l, index, tmp); ++ __ shift_left(tmp, shift, tmp); + index = tmp; + } + if (large_disp != 0) { @@ -15945,7 +15225,7 @@ index 00000000..7cb15f68 +} diff --git a/hotspot/src/cpu/loongarch/vm/c1_LinearScan_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/c1_LinearScan_loongarch.hpp new file mode 100644 -index 00000000..f15dacaf +index 0000000000..f15dacafeb --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/c1_LinearScan_loongarch.hpp @@ -0,0 +1,70 @@ @@ -16021,7 +15301,7 @@ index 00000000..f15dacaf +#endif // CPU_LOONGARCH_C1_LINEARSCAN_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/c1_LinearScan_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/c1_LinearScan_loongarch_64.cpp new file mode 100644 -index 00000000..219b2e36 +index 0000000000..219b2e3671 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/c1_LinearScan_loongarch_64.cpp @@ -0,0 +1,33 @@ @@ -16060,7 +15340,7 @@ index 00000000..219b2e36 +} diff --git a/hotspot/src/cpu/loongarch/vm/c1_MacroAssembler_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/c1_MacroAssembler_loongarch.hpp new file mode 100644 -index 00000000..38ff4c58 +index 0000000000..38ff4c5836 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/c1_MacroAssembler_loongarch.hpp @@ -0,0 +1,112 @@ @@ -16178,7 +15458,7 @@ index 00000000..38ff4c58 +#endif // CPU_LOONGARCH_C1_MACROASSEMBLER_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/c1_MacroAssembler_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/c1_MacroAssembler_loongarch_64.cpp new file mode 100644 -index 00000000..b75126fb +index 0000000000..b75126fba4 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/c1_MacroAssembler_loongarch_64.cpp @@ -0,0 +1,346 @@ @@ -16530,7 +15810,7 @@ index 00000000..b75126fb +#endif // ifndef PRODUCT diff --git a/hotspot/src/cpu/loongarch/vm/c1_Runtime1_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/c1_Runtime1_loongarch_64.cpp new file mode 100644 -index 00000000..a750dca3 +index 0000000000..a750dca323 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/c1_Runtime1_loongarch_64.cpp @@ -0,0 +1,1252 @@ @@ -17788,7 +17068,7 @@ index 00000000..a750dca3 +} diff --git a/hotspot/src/cpu/loongarch/vm/c1_globals_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/c1_globals_loongarch.hpp new file mode 100644 -index 00000000..df052a05 +index 0000000000..df052a058c --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/c1_globals_loongarch.hpp @@ -0,0 +1,69 @@ @@ -17863,7 +17143,7 @@ index 00000000..df052a05 +#endif // CPU_LOONGARCH_C1_GLOBALS_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/c2_globals_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/c2_globals_loongarch.hpp new file mode 100644 -index 00000000..044b0d25 +index 0000000000..044b0d2536 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/c2_globals_loongarch.hpp @@ -0,0 +1,87 @@ @@ -17956,7 +17236,7 @@ index 00000000..044b0d25 +#endif // CPU_LOONGARCH_VM_C2_GLOBALS_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/c2_init_loongarch.cpp b/hotspot/src/cpu/loongarch/vm/c2_init_loongarch.cpp new file mode 100644 -index 00000000..c7bf590b +index 0000000000..c7bf590b60 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/c2_init_loongarch.cpp @@ -0,0 +1,34 @@ @@ -17996,7 +17276,7 @@ index 00000000..c7bf590b +} diff --git a/hotspot/src/cpu/loongarch/vm/codeBuffer_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/codeBuffer_loongarch.hpp new file mode 100644 -index 00000000..652f6c10 +index 0000000000..652f6c1092 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/codeBuffer_loongarch.hpp @@ -0,0 +1,35 @@ @@ -18037,7 +17317,7 @@ index 00000000..652f6c10 +#endif // CPU_LOONGARCH_VM_CODEBUFFER_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/compiledIC_loongarch.cpp b/hotspot/src/cpu/loongarch/vm/compiledIC_loongarch.cpp new file mode 100644 -index 00000000..70a47fc7 +index 0000000000..70a47fc772 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/compiledIC_loongarch.cpp @@ -0,0 +1,167 @@ @@ -18210,7 +17490,7 @@ index 00000000..70a47fc7 +#endif // !PRODUCT diff --git a/hotspot/src/cpu/loongarch/vm/copy_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/copy_loongarch.hpp new file mode 100644 -index 00000000..cb655401 +index 0000000000..cb65540139 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/copy_loongarch.hpp @@ -0,0 +1,90 @@ @@ -18306,7 +17586,7 @@ index 00000000..cb655401 +#endif //CPU_LOONGARCH_VM_COPY_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/cppInterpreterGenerator_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/cppInterpreterGenerator_loongarch.hpp new file mode 100644 -index 00000000..45d86f5b +index 0000000000..45d86f5bfe --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/cppInterpreterGenerator_loongarch.hpp @@ -0,0 +1,53 @@ @@ -18365,7 +17645,7 @@ index 00000000..45d86f5b +#endif // CPU_LOONGARCH_VM_CPPINTERPRETERGENERATOR_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/cppInterpreter_loongarch.cpp b/hotspot/src/cpu/loongarch/vm/cppInterpreter_loongarch.cpp new file mode 100644 -index 00000000..d6c0df3b +index 0000000000..d6c0df3b77 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/cppInterpreter_loongarch.cpp @@ -0,0 +1,215 @@ @@ -18586,7 +17866,7 @@ index 00000000..d6c0df3b +#endif // CC_INTERP diff --git a/hotspot/src/cpu/loongarch/vm/debug_loongarch.cpp b/hotspot/src/cpu/loongarch/vm/debug_loongarch.cpp new file mode 100644 -index 00000000..50de0365 +index 0000000000..50de03653b --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/debug_loongarch.cpp @@ -0,0 +1,51 @@ @@ -18643,7 +17923,7 @@ index 00000000..50de0365 +#endif // PRODUCT diff --git a/hotspot/src/cpu/loongarch/vm/depChecker_loongarch.cpp b/hotspot/src/cpu/loongarch/vm/depChecker_loongarch.cpp new file mode 100644 -index 00000000..62478be3 +index 0000000000..62478be3dc --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/depChecker_loongarch.cpp @@ -0,0 +1,30 @@ @@ -18679,7 +17959,7 @@ index 00000000..62478be3 +// Nothing to do on LoongArch diff --git a/hotspot/src/cpu/loongarch/vm/depChecker_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/depChecker_loongarch.hpp new file mode 100644 -index 00000000..598be0ee +index 0000000000..598be0ee6f --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/depChecker_loongarch.hpp @@ -0,0 +1,31 @@ @@ -18716,7 +17996,7 @@ index 00000000..598be0ee +#endif // CPU_LOONGARCH_VM_DEPCHECKER_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/disassembler_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/disassembler_loongarch.hpp new file mode 100644 -index 00000000..ccd89e8d +index 0000000000..ccd89e8d6d --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/disassembler_loongarch.hpp @@ -0,0 +1,37 @@ @@ -18759,7 +18039,7 @@ index 00000000..ccd89e8d +#endif // CPU_LOONGARCH_VM_DISASSEMBLER_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/frame_loongarch.cpp b/hotspot/src/cpu/loongarch/vm/frame_loongarch.cpp new file mode 100644 -index 00000000..0f50a571 +index 0000000000..0f50a5715d --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/frame_loongarch.cpp @@ -0,0 +1,711 @@ @@ -19476,7 +18756,7 @@ index 00000000..0f50a571 +#endif diff --git a/hotspot/src/cpu/loongarch/vm/frame_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/frame_loongarch.hpp new file mode 100644 -index 00000000..964026e6 +index 0000000000..964026e621 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/frame_loongarch.hpp @@ -0,0 +1,229 @@ @@ -19711,7 +18991,7 @@ index 00000000..964026e6 +#endif // CPU_LOONGARCH_VM_FRAME_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/frame_loongarch.inline.hpp b/hotspot/src/cpu/loongarch/vm/frame_loongarch.inline.hpp new file mode 100644 -index 00000000..3d22339a +index 0000000000..3d22339ad7 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/frame_loongarch.inline.hpp @@ -0,0 +1,312 @@ @@ -20029,7 +19309,7 @@ index 00000000..3d22339a +#endif // CPU_LOONGARCH_VM_FRAME_LOONGARCH_INLINE_HPP diff --git a/hotspot/src/cpu/loongarch/vm/globalDefinitions_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/globalDefinitions_loongarch.hpp new file mode 100644 -index 00000000..f9f93b9e +index 0000000000..f9f93b9e65 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/globalDefinitions_loongarch.hpp @@ -0,0 +1,41 @@ @@ -20076,7 +19356,7 @@ index 00000000..f9f93b9e +#endif // CPU_LOONGARCH_VM_GLOBALDEFINITIONS_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/globals_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/globals_loongarch.hpp new file mode 100644 -index 00000000..182be608 +index 0000000000..182be608a3 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/globals_loongarch.hpp @@ -0,0 +1,103 @@ @@ -20185,7 +19465,7 @@ index 00000000..182be608 +#endif // CPU_LOONGARCH_VM_GLOBALS_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/icBuffer_loongarch.cpp b/hotspot/src/cpu/loongarch/vm/icBuffer_loongarch.cpp new file mode 100644 -index 00000000..8c782253 +index 0000000000..8c78225346 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/icBuffer_loongarch.cpp @@ -0,0 +1,101 @@ @@ -20292,7 +19572,7 @@ index 00000000..8c782253 +} diff --git a/hotspot/src/cpu/loongarch/vm/icache_loongarch.cpp b/hotspot/src/cpu/loongarch/vm/icache_loongarch.cpp new file mode 100644 -index 00000000..d577e41f +index 0000000000..d577e41f59 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/icache_loongarch.cpp @@ -0,0 +1,42 @@ @@ -20340,7 +19620,7 @@ index 00000000..d577e41f +} diff --git a/hotspot/src/cpu/loongarch/vm/icache_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/icache_loongarch.hpp new file mode 100644 -index 00000000..15e45cb3 +index 0000000000..15e45cb350 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/icache_loongarch.hpp @@ -0,0 +1,41 @@ @@ -20387,7 +19667,7 @@ index 00000000..15e45cb3 +#endif // CPU_LOONGARCH_VM_ICACHE_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/interp_masm_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/interp_masm_loongarch_64.cpp new file mode 100644 -index 00000000..8c84f215 +index 0000000000..8c84f21511 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/interp_masm_loongarch_64.cpp @@ -0,0 +1,1960 @@ @@ -22353,7 +21633,7 @@ index 00000000..8c84f215 +} diff --git a/hotspot/src/cpu/loongarch/vm/interp_masm_loongarch_64.hpp b/hotspot/src/cpu/loongarch/vm/interp_masm_loongarch_64.hpp new file mode 100644 -index 00000000..9113da54 +index 0000000000..9113da54ff --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/interp_masm_loongarch_64.hpp @@ -0,0 +1,269 @@ @@ -22628,7 +21908,7 @@ index 00000000..9113da54 +#endif // CPU_LOONGARCH_VM_INTERP_MASM_LOONGARCH_64_HPP diff --git a/hotspot/src/cpu/loongarch/vm/interpreterGenerator_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/interpreterGenerator_loongarch.hpp new file mode 100644 -index 00000000..7f253b2d +index 0000000000..7f253b2d51 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/interpreterGenerator_loongarch.hpp @@ -0,0 +1,51 @@ @@ -22685,7 +21965,7 @@ index 00000000..7f253b2d +#endif // CPU_LOONGARCH_VM_INTERPRETERGENERATOR_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/interpreterRT_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/interpreterRT_loongarch.hpp new file mode 100644 -index 00000000..052eb997 +index 0000000000..052eb997e4 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/interpreterRT_loongarch.hpp @@ -0,0 +1,66 @@ @@ -22757,7 +22037,7 @@ index 00000000..052eb997 +#endif // CPU_LOONGARCH_VM_INTERPRETERRT_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/interpreterRT_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/interpreterRT_loongarch_64.cpp new file mode 100644 -index 00000000..0c9df4aa +index 0000000000..0c9df4aa71 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/interpreterRT_loongarch_64.cpp @@ -0,0 +1,274 @@ @@ -23037,7 +22317,7 @@ index 00000000..0c9df4aa +IRT_END diff --git a/hotspot/src/cpu/loongarch/vm/interpreter_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/interpreter_loongarch.hpp new file mode 100644 -index 00000000..c83afbda +index 0000000000..c83afbdaf0 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/interpreter_loongarch.hpp @@ -0,0 +1,50 @@ @@ -23093,7 +22373,7 @@ index 00000000..c83afbda +#endif // CPU_LOONGARCH_VM_INTERPRETER_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/interpreter_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/interpreter_loongarch_64.cpp new file mode 100644 -index 00000000..5a4f102c +index 0000000000..5a4f102cfd --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/interpreter_loongarch_64.cpp @@ -0,0 +1,277 @@ @@ -23376,7 +22656,7 @@ index 00000000..5a4f102c +} diff --git a/hotspot/src/cpu/loongarch/vm/javaFrameAnchor_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/javaFrameAnchor_loongarch.hpp new file mode 100644 -index 00000000..de97de58 +index 0000000000..de97de5804 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/javaFrameAnchor_loongarch.hpp @@ -0,0 +1,87 @@ @@ -23469,7 +22749,7 @@ index 00000000..de97de58 +#endif // CPU_LOONGARCH_VM_JAVAFRAMEANCHOR_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/jniFastGetField_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/jniFastGetField_loongarch_64.cpp new file mode 100644 -index 00000000..5b52e54e +index 0000000000..5b52e54e08 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/jniFastGetField_loongarch_64.cpp @@ -0,0 +1,169 @@ @@ -23644,7 +22924,7 @@ index 00000000..5b52e54e +} diff --git a/hotspot/src/cpu/loongarch/vm/jniTypes_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/jniTypes_loongarch.hpp new file mode 100644 -index 00000000..554ff216 +index 0000000000..554ff216ac --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/jniTypes_loongarch.hpp @@ -0,0 +1,144 @@ @@ -23794,7 +23074,7 @@ index 00000000..554ff216 +#endif // CPU_LOONGARCH_VM_JNITYPES_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/jni_loongarch.h b/hotspot/src/cpu/loongarch/vm/jni_loongarch.h new file mode 100644 -index 00000000..eb25cbc3 +index 0000000000..eb25cbc354 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/jni_loongarch.h @@ -0,0 +1,51 @@ @@ -23851,7 +23131,7 @@ index 00000000..eb25cbc3 +#endif diff --git a/hotspot/src/cpu/loongarch/vm/loongarch.ad b/hotspot/src/cpu/loongarch/vm/loongarch.ad new file mode 100644 -index 00000000..48c44779 +index 0000000000..48c44779e7 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/loongarch.ad @@ -0,0 +1,24 @@ @@ -23881,7 +23161,7 @@ index 00000000..48c44779 +// diff --git a/hotspot/src/cpu/loongarch/vm/loongarch_64.ad b/hotspot/src/cpu/loongarch/vm/loongarch_64.ad new file mode 100644 -index 00000000..fa4bf6e1 +index 0000000000..fa4bf6e170 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/loongarch_64.ad @@ -0,0 +1,12861 @@ @@ -36748,7 +36028,7 @@ index 00000000..fa4bf6e1 + diff --git a/hotspot/src/cpu/loongarch/vm/macroAssembler_loongarch.cpp b/hotspot/src/cpu/loongarch/vm/macroAssembler_loongarch.cpp new file mode 100644 -index 00000000..89295343 +index 0000000000..89295343ce --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/macroAssembler_loongarch.cpp @@ -0,0 +1,3895 @@ @@ -40649,7 +39929,7 @@ index 00000000..89295343 +} diff --git a/hotspot/src/cpu/loongarch/vm/macroAssembler_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/macroAssembler_loongarch.hpp new file mode 100644 -index 00000000..8b123c29 +index 0000000000..8b123c2906 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/macroAssembler_loongarch.hpp @@ -0,0 +1,771 @@ @@ -41426,7 +40706,7 @@ index 00000000..8b123c29 +#endif // CPU_LOONGARCH_VM_MACROASSEMBLER_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/macroAssembler_loongarch.inline.hpp b/hotspot/src/cpu/loongarch/vm/macroAssembler_loongarch.inline.hpp new file mode 100644 -index 00000000..0b265a4d +index 0000000000..0b265a4def --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/macroAssembler_loongarch.inline.hpp @@ -0,0 +1,34 @@ @@ -41466,7 +40746,7 @@ index 00000000..0b265a4d +#endif // CPU_LOONGARCH_VM_MACROASSEMBLER_LOONGARCH_INLINE_HPP diff --git a/hotspot/src/cpu/loongarch/vm/metaspaceShared_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/metaspaceShared_loongarch_64.cpp new file mode 100644 -index 00000000..b36216c5 +index 0000000000..b36216c533 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/metaspaceShared_loongarch_64.cpp @@ -0,0 +1,120 @@ @@ -41592,7 +40872,7 @@ index 00000000..b36216c5 +} diff --git a/hotspot/src/cpu/loongarch/vm/methodHandles_loongarch.cpp b/hotspot/src/cpu/loongarch/vm/methodHandles_loongarch.cpp new file mode 100644 -index 00000000..cb31ca5a +index 0000000000..cb31ca5ad5 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/methodHandles_loongarch.cpp @@ -0,0 +1,566 @@ @@ -42164,7 +41444,7 @@ index 00000000..cb31ca5a +#endif //PRODUCT diff --git a/hotspot/src/cpu/loongarch/vm/methodHandles_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/methodHandles_loongarch.hpp new file mode 100644 -index 00000000..f8433742 +index 0000000000..f84337424b --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/methodHandles_loongarch.hpp @@ -0,0 +1,62 @@ @@ -42232,7 +41512,7 @@ index 00000000..f8433742 + } diff --git a/hotspot/src/cpu/loongarch/vm/nativeInst_loongarch.cpp b/hotspot/src/cpu/loongarch/vm/nativeInst_loongarch.cpp new file mode 100644 -index 00000000..639ac6cd +index 0000000000..639ac6cd3e --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/nativeInst_loongarch.cpp @@ -0,0 +1,485 @@ @@ -42723,7 +42003,7 @@ index 00000000..639ac6cd +} diff --git a/hotspot/src/cpu/loongarch/vm/nativeInst_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/nativeInst_loongarch.hpp new file mode 100644 -index 00000000..49323992 +index 0000000000..493239923b --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/nativeInst_loongarch.hpp @@ -0,0 +1,513 @@ @@ -43242,7 +42522,7 @@ index 00000000..49323992 +#endif // CPU_LOONGARCH_VM_NATIVEINST_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/registerMap_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/registerMap_loongarch.hpp new file mode 100644 -index 00000000..5ff7555d +index 0000000000..5ff7555d2f --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/registerMap_loongarch.hpp @@ -0,0 +1,45 @@ @@ -43293,7 +42573,7 @@ index 00000000..5ff7555d +#endif // CPU_LOONGARCH_VM_REGISTERMAP_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/register_definitions_loongarch.cpp b/hotspot/src/cpu/loongarch/vm/register_definitions_loongarch.cpp new file mode 100644 -index 00000000..c6424c32 +index 0000000000..c6424c321f --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/register_definitions_loongarch.cpp @@ -0,0 +1,103 @@ @@ -43402,7 +42682,7 @@ index 00000000..c6424c32 +REGISTER_DEFINITION(FloatRegister, f31); diff --git a/hotspot/src/cpu/loongarch/vm/register_loongarch.cpp b/hotspot/src/cpu/loongarch/vm/register_loongarch.cpp new file mode 100644 -index 00000000..3104cd1c +index 0000000000..3104cd1cc5 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/register_loongarch.cpp @@ -0,0 +1,59 @@ @@ -43467,7 +42747,7 @@ index 00000000..3104cd1c +} diff --git a/hotspot/src/cpu/loongarch/vm/register_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/register_loongarch.hpp new file mode 100644 -index 00000000..37b39f91 +index 0000000000..37b39f9129 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/register_loongarch.hpp @@ -0,0 +1,436 @@ @@ -43909,7 +43189,7 @@ index 00000000..37b39f91 +#endif //CPU_LOONGARCH_VM_REGISTER_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/relocInfo_loongarch.cpp b/hotspot/src/cpu/loongarch/vm/relocInfo_loongarch.cpp new file mode 100644 -index 00000000..bf4498dc +index 0000000000..bf4498dc62 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/relocInfo_loongarch.cpp @@ -0,0 +1,130 @@ @@ -44045,7 +43325,7 @@ index 00000000..bf4498dc +} diff --git a/hotspot/src/cpu/loongarch/vm/relocInfo_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/relocInfo_loongarch.hpp new file mode 100644 -index 00000000..211242f3 +index 0000000000..211242f3fb --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/relocInfo_loongarch.hpp @@ -0,0 +1,40 @@ @@ -44091,7 +43371,7 @@ index 00000000..211242f3 +#endif // CPU_LOONGARCH_VM_RELOCINFO_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/runtime_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/runtime_loongarch_64.cpp new file mode 100644 -index 00000000..e6ee65f3 +index 0000000000..e6ee65f367 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/runtime_loongarch_64.cpp @@ -0,0 +1,199 @@ @@ -44296,7 +43576,7 @@ index 00000000..e6ee65f3 +} diff --git a/hotspot/src/cpu/loongarch/vm/sharedRuntime_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/sharedRuntime_loongarch_64.cpp new file mode 100644 -index 00000000..36786b53 +index 0000000000..36786b53bd --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/sharedRuntime_loongarch_64.cpp @@ -0,0 +1,3453 @@ @@ -47755,7 +47035,7 @@ index 00000000..36786b53 +extern "C" int SpinPause() {return 0;} diff --git a/hotspot/src/cpu/loongarch/vm/stubGenerator_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/stubGenerator_loongarch_64.cpp new file mode 100644 -index 00000000..361b7751 +index 0000000000..361b775144 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/stubGenerator_loongarch_64.cpp @@ -0,0 +1,3445 @@ @@ -51206,7 +50486,7 @@ index 00000000..361b7751 +} diff --git a/hotspot/src/cpu/loongarch/vm/stubRoutines_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/stubRoutines_loongarch_64.cpp new file mode 100644 -index 00000000..f0f3d55a +index 0000000000..f0f3d55a4e --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/stubRoutines_loongarch_64.cpp @@ -0,0 +1,264 @@ @@ -51476,7 +50756,7 @@ index 00000000..f0f3d55a +}; diff --git a/hotspot/src/cpu/loongarch/vm/stubRoutines_loongarch_64.hpp b/hotspot/src/cpu/loongarch/vm/stubRoutines_loongarch_64.hpp new file mode 100644 -index 00000000..d020a527 +index 0000000000..d020a527e4 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/stubRoutines_loongarch_64.hpp @@ -0,0 +1,60 @@ @@ -51542,7 +50822,7 @@ index 00000000..d020a527 +#endif // CPU_LOONGARCH_VM_STUBROUTINES_LOONGARCH_64_HPP diff --git a/hotspot/src/cpu/loongarch/vm/templateInterpreterGenerator_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/templateInterpreterGenerator_loongarch.hpp new file mode 100644 -index 00000000..213e69b0 +index 0000000000..213e69b0b2 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/templateInterpreterGenerator_loongarch.hpp @@ -0,0 +1,35 @@ @@ -51583,7 +50863,7 @@ index 00000000..213e69b0 +#endif // CPU_LOONGARCH_VM_TEMPLATEINTERPRETERGENERATOR_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/templateInterpreter_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/templateInterpreter_loongarch.hpp new file mode 100644 -index 00000000..39e3ad7b +index 0000000000..39e3ad7bb5 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/templateInterpreter_loongarch.hpp @@ -0,0 +1,41 @@ @@ -51630,7 +50910,7 @@ index 00000000..39e3ad7b +#endif // CPU_LOONGARCH_VM_TEMPLATEINTERPRETER_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/templateInterpreter_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/templateInterpreter_loongarch_64.cpp new file mode 100644 -index 00000000..b25086a3 +index 0000000000..b25086a399 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/templateInterpreter_loongarch_64.cpp @@ -0,0 +1,2335 @@ @@ -53971,7 +53251,7 @@ index 00000000..b25086a3 +#endif // ! CC_INTERP diff --git a/hotspot/src/cpu/loongarch/vm/templateTable_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/templateTable_loongarch_64.cpp new file mode 100644 -index 00000000..228217f0 +index 0000000000..228217f001 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/templateTable_loongarch_64.cpp @@ -0,0 +1,4024 @@ @@ -58001,7 +57281,7 @@ index 00000000..228217f0 +#endif // !CC_INTERP diff --git a/hotspot/src/cpu/loongarch/vm/templateTable_loongarch_64.hpp b/hotspot/src/cpu/loongarch/vm/templateTable_loongarch_64.hpp new file mode 100644 -index 00000000..c48d76e0 +index 0000000000..c48d76e0a2 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/templateTable_loongarch_64.hpp @@ -0,0 +1,44 @@ @@ -58051,7 +57331,7 @@ index 00000000..c48d76e0 +#endif // CPU_LOONGARCH_VM_TEMPLATETABLE_LOONGARCH_64_HPP diff --git a/hotspot/src/cpu/loongarch/vm/vmStructs_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/vmStructs_loongarch.hpp new file mode 100644 -index 00000000..7c3ce680 +index 0000000000..7c3ce68010 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/vmStructs_loongarch.hpp @@ -0,0 +1,68 @@ @@ -58125,7 +57405,7 @@ index 00000000..7c3ce680 +#endif // CPU_LOONGARCH_VM_VMSTRUCTS_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/vm_version_ext_loongarch.cpp b/hotspot/src/cpu/loongarch/vm/vm_version_ext_loongarch.cpp new file mode 100644 -index 00000000..c71f64e1 +index 0000000000..c71f64e132 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/vm_version_ext_loongarch.cpp @@ -0,0 +1,84 @@ @@ -58215,7 +57495,7 @@ index 00000000..c71f64e1 +} diff --git a/hotspot/src/cpu/loongarch/vm/vm_version_ext_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/vm_version_ext_loongarch.hpp new file mode 100644 -index 00000000..682dd9c7 +index 0000000000..682dd9c78f --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/vm_version_ext_loongarch.hpp @@ -0,0 +1,54 @@ @@ -58275,7 +57555,7 @@ index 00000000..682dd9c7 +#endif // CPU_LOONGARCH_VM_VM_VERSION_EXT_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/vm_version_loongarch.cpp b/hotspot/src/cpu/loongarch/vm/vm_version_loongarch.cpp new file mode 100644 -index 00000000..81ea3b23 +index 0000000000..81ea3b230c --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/vm_version_loongarch.cpp @@ -0,0 +1,443 @@ @@ -58724,7 +58004,7 @@ index 00000000..81ea3b23 +} diff --git a/hotspot/src/cpu/loongarch/vm/vm_version_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/vm_version_loongarch.hpp new file mode 100644 -index 00000000..3b5f907a +index 0000000000..3b5f907a79 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/vm_version_loongarch.hpp @@ -0,0 +1,299 @@ @@ -59029,7 +58309,7 @@ index 00000000..3b5f907a +#endif // CPU_LOONGARCH_VM_VM_VERSION_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/vmreg_loongarch.cpp b/hotspot/src/cpu/loongarch/vm/vmreg_loongarch.cpp new file mode 100644 -index 00000000..52bccfc1 +index 0000000000..52bccfc183 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/vmreg_loongarch.cpp @@ -0,0 +1,51 @@ @@ -59086,7 +58366,7 @@ index 00000000..52bccfc1 +} diff --git a/hotspot/src/cpu/loongarch/vm/vmreg_loongarch.hpp b/hotspot/src/cpu/loongarch/vm/vmreg_loongarch.hpp new file mode 100644 -index 00000000..80a1fc57 +index 0000000000..80a1fc57de --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/vmreg_loongarch.hpp @@ -0,0 +1,35 @@ @@ -59127,7 +58407,7 @@ index 00000000..80a1fc57 +#endif // CPU_LOONGARCH_VM_VMREG_LOONGARCH_HPP diff --git a/hotspot/src/cpu/loongarch/vm/vmreg_loongarch.inline.hpp b/hotspot/src/cpu/loongarch/vm/vmreg_loongarch.inline.hpp new file mode 100644 -index 00000000..f822d4c3 +index 0000000000..f822d4c355 --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/vmreg_loongarch.inline.hpp @@ -0,0 +1,66 @@ @@ -59199,7 +58479,7 @@ index 00000000..f822d4c3 +#endif // CPU_LOONGARCH_VM_VMREG_LOONGARCH_INLINE_HPP diff --git a/hotspot/src/cpu/loongarch/vm/vtableStubs_loongarch_64.cpp b/hotspot/src/cpu/loongarch/vm/vtableStubs_loongarch_64.cpp new file mode 100644 -index 00000000..df0d176b +index 0000000000..df0d176b8b --- /dev/null +++ b/hotspot/src/cpu/loongarch/vm/vtableStubs_loongarch_64.cpp @@ -0,0 +1,300 @@ @@ -59505,7 +58785,7 @@ index 00000000..df0d176b +} diff --git a/hotspot/src/cpu/mips/vm/assembler_mips.cpp b/hotspot/src/cpu/mips/vm/assembler_mips.cpp new file mode 100644 -index 00000000..6c720972 +index 0000000000..6c720972ad --- /dev/null +++ b/hotspot/src/cpu/mips/vm/assembler_mips.cpp @@ -0,0 +1,774 @@ @@ -60285,7 +59565,7 @@ index 00000000..6c720972 +} diff --git a/hotspot/src/cpu/mips/vm/assembler_mips.hpp b/hotspot/src/cpu/mips/vm/assembler_mips.hpp new file mode 100644 -index 00000000..e91b9db2 +index 0000000000..e91b9db222 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/assembler_mips.hpp @@ -0,0 +1,1789 @@ @@ -62080,7 +61360,7 @@ index 00000000..e91b9db2 +#endif // CPU_MIPS_VM_ASSEMBLER_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/assembler_mips.inline.hpp b/hotspot/src/cpu/mips/vm/assembler_mips.inline.hpp new file mode 100644 -index 00000000..39aeb550 +index 0000000000..39aeb5509a --- /dev/null +++ b/hotspot/src/cpu/mips/vm/assembler_mips.inline.hpp @@ -0,0 +1,33 @@ @@ -62119,7 +61399,7 @@ index 00000000..39aeb550 +#endif // CPU_MIPS_VM_ASSEMBLER_MIPS_INLINE_HPP diff --git a/hotspot/src/cpu/mips/vm/bytecodeInterpreter_mips.cpp b/hotspot/src/cpu/mips/vm/bytecodeInterpreter_mips.cpp new file mode 100644 -index 00000000..a4a1b28c +index 0000000000..a4a1b28c2d --- /dev/null +++ b/hotspot/src/cpu/mips/vm/bytecodeInterpreter_mips.cpp @@ -0,0 +1,53 @@ @@ -62178,7 +61458,7 @@ index 00000000..a4a1b28c +#endif // CC_INTERP (all) diff --git a/hotspot/src/cpu/mips/vm/bytecodeInterpreter_mips.hpp b/hotspot/src/cpu/mips/vm/bytecodeInterpreter_mips.hpp new file mode 100644 -index 00000000..aac8b7a2 +index 0000000000..aac8b7a2b7 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/bytecodeInterpreter_mips.hpp @@ -0,0 +1,110 @@ @@ -62294,7 +61574,7 @@ index 00000000..aac8b7a2 +#endif // CPU_MIPS_VM_BYTECODEINTERPRETER_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/bytecodeInterpreter_mips.inline.hpp b/hotspot/src/cpu/mips/vm/bytecodeInterpreter_mips.inline.hpp new file mode 100644 -index 00000000..8ce77ab9 +index 0000000000..8ce77ab92f --- /dev/null +++ b/hotspot/src/cpu/mips/vm/bytecodeInterpreter_mips.inline.hpp @@ -0,0 +1,286 @@ @@ -62586,7 +61866,7 @@ index 00000000..8ce77ab9 +#endif // CPU_MIPS_VM_BYTECODEINTERPRETER_MIPS_INLINE_HPP diff --git a/hotspot/src/cpu/mips/vm/bytecodes_mips.cpp b/hotspot/src/cpu/mips/vm/bytecodes_mips.cpp new file mode 100644 -index 00000000..61efd1f5 +index 0000000000..61efd1f561 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/bytecodes_mips.cpp @@ -0,0 +1,38 @@ @@ -62630,7 +61910,7 @@ index 00000000..61efd1f5 +} diff --git a/hotspot/src/cpu/mips/vm/bytecodes_mips.hpp b/hotspot/src/cpu/mips/vm/bytecodes_mips.hpp new file mode 100644 -index 00000000..25a9562a +index 0000000000..25a9562acd --- /dev/null +++ b/hotspot/src/cpu/mips/vm/bytecodes_mips.hpp @@ -0,0 +1,31 @@ @@ -62667,7 +61947,7 @@ index 00000000..25a9562a +#endif // CPU_MIPS_VM_BYTECODES_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/bytes_mips.hpp b/hotspot/src/cpu/mips/vm/bytes_mips.hpp new file mode 100644 -index 00000000..515ffad4 +index 0000000000..515ffad4b0 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/bytes_mips.hpp @@ -0,0 +1,193 @@ @@ -62866,7 +62146,7 @@ index 00000000..515ffad4 +#endif // CPU_MIPS_VM_BYTES_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/c2_globals_mips.hpp b/hotspot/src/cpu/mips/vm/c2_globals_mips.hpp new file mode 100644 -index 00000000..f254e07a +index 0000000000..f254e07abd --- /dev/null +++ b/hotspot/src/cpu/mips/vm/c2_globals_mips.hpp @@ -0,0 +1,100 @@ @@ -62972,7 +62252,7 @@ index 00000000..f254e07a +#endif // CPU_MIPS_VM_C2_GLOBALS_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/c2_init_mips.cpp b/hotspot/src/cpu/mips/vm/c2_init_mips.cpp new file mode 100644 -index 00000000..e6d5815f +index 0000000000..e6d5815f42 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/c2_init_mips.cpp @@ -0,0 +1,34 @@ @@ -63012,7 +62292,7 @@ index 00000000..e6d5815f +} diff --git a/hotspot/src/cpu/mips/vm/codeBuffer_mips.hpp b/hotspot/src/cpu/mips/vm/codeBuffer_mips.hpp new file mode 100644 -index 00000000..1836b7a9 +index 0000000000..1836b7a921 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/codeBuffer_mips.hpp @@ -0,0 +1,35 @@ @@ -63053,7 +62333,7 @@ index 00000000..1836b7a9 +#endif // CPU_MIPS_VM_CODEBUFFER_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/compiledIC_mips.cpp b/hotspot/src/cpu/mips/vm/compiledIC_mips.cpp new file mode 100644 -index 00000000..8ffaaaf8 +index 0000000000..8ffaaaf841 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/compiledIC_mips.cpp @@ -0,0 +1,173 @@ @@ -63232,7 +62512,7 @@ index 00000000..8ffaaaf8 +#endif // !PRODUCT diff --git a/hotspot/src/cpu/mips/vm/copy_mips.hpp b/hotspot/src/cpu/mips/vm/copy_mips.hpp new file mode 100644 -index 00000000..4442e1dc +index 0000000000..4442e1dc71 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/copy_mips.hpp @@ -0,0 +1,90 @@ @@ -63328,7 +62608,7 @@ index 00000000..4442e1dc +#endif //CPU_MIPS_VM_COPY_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/cppInterpreterGenerator_mips.hpp b/hotspot/src/cpu/mips/vm/cppInterpreterGenerator_mips.hpp new file mode 100644 -index 00000000..37bd03b0 +index 0000000000..37bd03b00b --- /dev/null +++ b/hotspot/src/cpu/mips/vm/cppInterpreterGenerator_mips.hpp @@ -0,0 +1,53 @@ @@ -63387,7 +62667,7 @@ index 00000000..37bd03b0 +#endif // CPU_MIPS_VM_CPPINTERPRETERGENERATOR_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/cppInterpreter_mips.cpp b/hotspot/src/cpu/mips/vm/cppInterpreter_mips.cpp new file mode 100644 -index 00000000..1f8d75d5 +index 0000000000..1f8d75d593 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/cppInterpreter_mips.cpp @@ -0,0 +1,215 @@ @@ -63608,7 +62888,7 @@ index 00000000..1f8d75d5 +#endif // CC_INTERP diff --git a/hotspot/src/cpu/mips/vm/cppInterpreter_mips.hpp b/hotspot/src/cpu/mips/vm/cppInterpreter_mips.hpp new file mode 100644 -index 00000000..49c47330 +index 0000000000..49c4733049 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/cppInterpreter_mips.hpp @@ -0,0 +1,40 @@ @@ -63654,7 +62934,7 @@ index 00000000..49c47330 +#endif // CPU_MIPS_VM_CPPINTERPRETER_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/debug_mips.cpp b/hotspot/src/cpu/mips/vm/debug_mips.cpp new file mode 100644 -index 00000000..50de0365 +index 0000000000..50de03653b --- /dev/null +++ b/hotspot/src/cpu/mips/vm/debug_mips.cpp @@ -0,0 +1,51 @@ @@ -63711,7 +62991,7 @@ index 00000000..50de0365 +#endif // PRODUCT diff --git a/hotspot/src/cpu/mips/vm/depChecker_mips.cpp b/hotspot/src/cpu/mips/vm/depChecker_mips.cpp new file mode 100644 -index 00000000..756ccb68 +index 0000000000..756ccb68f9 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/depChecker_mips.cpp @@ -0,0 +1,30 @@ @@ -63747,7 +63027,7 @@ index 00000000..756ccb68 +// Nothing to do on mips diff --git a/hotspot/src/cpu/mips/vm/depChecker_mips.hpp b/hotspot/src/cpu/mips/vm/depChecker_mips.hpp new file mode 100644 -index 00000000..11e52b4e +index 0000000000..11e52b4e8f --- /dev/null +++ b/hotspot/src/cpu/mips/vm/depChecker_mips.hpp @@ -0,0 +1,31 @@ @@ -63784,7 +63064,7 @@ index 00000000..11e52b4e +#endif // CPU_MIPS_VM_DEPCHECKER_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/disassembler_mips.hpp b/hotspot/src/cpu/mips/vm/disassembler_mips.hpp new file mode 100644 -index 00000000..c5f3a888 +index 0000000000..c5f3a8888d --- /dev/null +++ b/hotspot/src/cpu/mips/vm/disassembler_mips.hpp @@ -0,0 +1,37 @@ @@ -63827,7 +63107,7 @@ index 00000000..c5f3a888 +#endif // CPU_MIPS_VM_DISASSEMBLER_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/frame_mips.cpp b/hotspot/src/cpu/mips/vm/frame_mips.cpp new file mode 100644 -index 00000000..1c928976 +index 0000000000..1c928976fc --- /dev/null +++ b/hotspot/src/cpu/mips/vm/frame_mips.cpp @@ -0,0 +1,711 @@ @@ -64544,7 +63824,7 @@ index 00000000..1c928976 +#endif diff --git a/hotspot/src/cpu/mips/vm/frame_mips.hpp b/hotspot/src/cpu/mips/vm/frame_mips.hpp new file mode 100644 -index 00000000..9e684a8d +index 0000000000..9e684a8dc3 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/frame_mips.hpp @@ -0,0 +1,229 @@ @@ -64779,7 +64059,7 @@ index 00000000..9e684a8d +#endif // CPU_MIPS_VM_FRAME_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/frame_mips.inline.hpp b/hotspot/src/cpu/mips/vm/frame_mips.inline.hpp new file mode 100644 -index 00000000..60e56ac7 +index 0000000000..60e56ac7ab --- /dev/null +++ b/hotspot/src/cpu/mips/vm/frame_mips.inline.hpp @@ -0,0 +1,312 @@ @@ -65097,7 +64377,7 @@ index 00000000..60e56ac7 +#endif // CPU_MIPS_VM_FRAME_MIPS_INLINE_HPP diff --git a/hotspot/src/cpu/mips/vm/globalDefinitions_mips.hpp b/hotspot/src/cpu/mips/vm/globalDefinitions_mips.hpp new file mode 100644 -index 00000000..bd00a8d4 +index 0000000000..bd00a8d473 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/globalDefinitions_mips.hpp @@ -0,0 +1,41 @@ @@ -65144,7 +64424,7 @@ index 00000000..bd00a8d4 +#endif // CPU_MIPS_VM_GLOBALDEFINITIONS_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/globals_mips.hpp b/hotspot/src/cpu/mips/vm/globals_mips.hpp new file mode 100644 -index 00000000..988bc351 +index 0000000000..988bc35137 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/globals_mips.hpp @@ -0,0 +1,124 @@ @@ -65274,7 +64554,7 @@ index 00000000..988bc351 +#endif // CPU_MIPS_VM_GLOBALS_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/icBuffer_mips.cpp b/hotspot/src/cpu/mips/vm/icBuffer_mips.cpp new file mode 100644 -index 00000000..96ea3453 +index 0000000000..96ea345360 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/icBuffer_mips.cpp @@ -0,0 +1,97 @@ @@ -65377,7 +64657,7 @@ index 00000000..96ea3453 +} diff --git a/hotspot/src/cpu/mips/vm/icache_mips.cpp b/hotspot/src/cpu/mips/vm/icache_mips.cpp new file mode 100644 -index 00000000..848964b6 +index 0000000000..848964b63f --- /dev/null +++ b/hotspot/src/cpu/mips/vm/icache_mips.cpp @@ -0,0 +1,41 @@ @@ -65424,7 +64704,7 @@ index 00000000..848964b6 +} diff --git a/hotspot/src/cpu/mips/vm/icache_mips.hpp b/hotspot/src/cpu/mips/vm/icache_mips.hpp new file mode 100644 -index 00000000..78ee11cc +index 0000000000..78ee11cc73 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/icache_mips.hpp @@ -0,0 +1,41 @@ @@ -65471,7 +64751,7 @@ index 00000000..78ee11cc +#endif // CPU_MIPS_VM_ICACHE_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/interp_masm_mips_64.cpp b/hotspot/src/cpu/mips/vm/interp_masm_mips_64.cpp new file mode 100644 -index 00000000..ed2d931e +index 0000000000..ed2d931e94 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/interp_masm_mips_64.cpp @@ -0,0 +1,2084 @@ @@ -67561,7 +66841,7 @@ index 00000000..ed2d931e +} diff --git a/hotspot/src/cpu/mips/vm/interp_masm_mips_64.hpp b/hotspot/src/cpu/mips/vm/interp_masm_mips_64.hpp new file mode 100644 -index 00000000..a2ebdec3 +index 0000000000..a2ebdec3ad --- /dev/null +++ b/hotspot/src/cpu/mips/vm/interp_masm_mips_64.hpp @@ -0,0 +1,269 @@ @@ -67836,7 +67116,7 @@ index 00000000..a2ebdec3 +#endif // CPU_MIPS_VM_INTERP_MASM_MIPS_64_HPP diff --git a/hotspot/src/cpu/mips/vm/interpreterGenerator_mips.hpp b/hotspot/src/cpu/mips/vm/interpreterGenerator_mips.hpp new file mode 100644 -index 00000000..26fced49 +index 0000000000..26fced492a --- /dev/null +++ b/hotspot/src/cpu/mips/vm/interpreterGenerator_mips.hpp @@ -0,0 +1,49 @@ @@ -67891,7 +67171,7 @@ index 00000000..26fced49 +#endif // CPU_MIPS_VM_INTERPRETERGENERATOR_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/interpreterRT_mips.hpp b/hotspot/src/cpu/mips/vm/interpreterRT_mips.hpp new file mode 100644 -index 00000000..8dec2007 +index 0000000000..8dec2007c6 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/interpreterRT_mips.hpp @@ -0,0 +1,61 @@ @@ -67958,7 +67238,7 @@ index 00000000..8dec2007 +#endif // CPU_MIPS_VM_INTERPRETERRT_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/interpreterRT_mips_64.cpp b/hotspot/src/cpu/mips/vm/interpreterRT_mips_64.cpp new file mode 100644 -index 00000000..14b7e39a +index 0000000000..14b7e39af7 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/interpreterRT_mips_64.cpp @@ -0,0 +1,259 @@ @@ -68223,7 +67503,7 @@ index 00000000..14b7e39a +IRT_END diff --git a/hotspot/src/cpu/mips/vm/interpreter_mips.hpp b/hotspot/src/cpu/mips/vm/interpreter_mips.hpp new file mode 100644 -index 00000000..9a21d704 +index 0000000000..9a21d704fa --- /dev/null +++ b/hotspot/src/cpu/mips/vm/interpreter_mips.hpp @@ -0,0 +1,50 @@ @@ -68279,7 +67559,7 @@ index 00000000..9a21d704 +#endif // CPU_MIPS_VM_INTERPRETER_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/interpreter_mips_64.cpp b/hotspot/src/cpu/mips/vm/interpreter_mips_64.cpp new file mode 100644 -index 00000000..014c8127 +index 0000000000..014c812713 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/interpreter_mips_64.cpp @@ -0,0 +1,286 @@ @@ -68571,7 +67851,7 @@ index 00000000..014c8127 +} diff --git a/hotspot/src/cpu/mips/vm/javaFrameAnchor_mips.hpp b/hotspot/src/cpu/mips/vm/javaFrameAnchor_mips.hpp new file mode 100644 -index 00000000..dccdf6a0 +index 0000000000..dccdf6a019 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/javaFrameAnchor_mips.hpp @@ -0,0 +1,87 @@ @@ -68664,7 +67944,7 @@ index 00000000..dccdf6a0 +#endif // CPU_MIPS_VM_JAVAFRAMEANCHOR_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/jniFastGetField_mips_64.cpp b/hotspot/src/cpu/mips/vm/jniFastGetField_mips_64.cpp new file mode 100644 -index 00000000..0f7dd942 +index 0000000000..0f7dd9424a --- /dev/null +++ b/hotspot/src/cpu/mips/vm/jniFastGetField_mips_64.cpp @@ -0,0 +1,172 @@ @@ -68842,7 +68122,7 @@ index 00000000..0f7dd942 +} diff --git a/hotspot/src/cpu/mips/vm/jniTypes_mips.hpp b/hotspot/src/cpu/mips/vm/jniTypes_mips.hpp new file mode 100644 -index 00000000..dfcd47b4 +index 0000000000..dfcd47b478 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/jniTypes_mips.hpp @@ -0,0 +1,144 @@ @@ -68992,7 +68272,7 @@ index 00000000..dfcd47b4 +#endif // CPU_MIPS_VM_JNITYPES_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/jni_mips.h b/hotspot/src/cpu/mips/vm/jni_mips.h new file mode 100644 -index 00000000..6714f51d +index 0000000000..6714f51d5d --- /dev/null +++ b/hotspot/src/cpu/mips/vm/jni_mips.h @@ -0,0 +1,51 @@ @@ -69049,7 +68329,7 @@ index 00000000..6714f51d +#endif diff --git a/hotspot/src/cpu/mips/vm/macroAssembler_mips.cpp b/hotspot/src/cpu/mips/vm/macroAssembler_mips.cpp new file mode 100644 -index 00000000..2b8840ae +index 0000000000..2b8840ae10 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/macroAssembler_mips.cpp @@ -0,0 +1,4332 @@ @@ -73387,7 +72667,7 @@ index 00000000..2b8840ae +} diff --git a/hotspot/src/cpu/mips/vm/macroAssembler_mips.hpp b/hotspot/src/cpu/mips/vm/macroAssembler_mips.hpp new file mode 100644 -index 00000000..ab972779 +index 0000000000..ab9727793f --- /dev/null +++ b/hotspot/src/cpu/mips/vm/macroAssembler_mips.hpp @@ -0,0 +1,701 @@ @@ -74094,7 +73374,7 @@ index 00000000..ab972779 +#endif // CPU_MIPS_VM_MACROASSEMBLER_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/macroAssembler_mips.inline.hpp b/hotspot/src/cpu/mips/vm/macroAssembler_mips.inline.hpp new file mode 100644 -index 00000000..92c05fb7 +index 0000000000..92c05fb726 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/macroAssembler_mips.inline.hpp @@ -0,0 +1,34 @@ @@ -74134,7 +73414,7 @@ index 00000000..92c05fb7 +#endif // CPU_MIPS_VM_MACROASSEMBLER_MIPS_INLINE_HPP diff --git a/hotspot/src/cpu/mips/vm/metaspaceShared_mips_64.cpp b/hotspot/src/cpu/mips/vm/metaspaceShared_mips_64.cpp new file mode 100644 -index 00000000..0c467df2 +index 0000000000..0c467df2f3 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/metaspaceShared_mips_64.cpp @@ -0,0 +1,123 @@ @@ -74263,7 +73543,7 @@ index 00000000..0c467df2 +} diff --git a/hotspot/src/cpu/mips/vm/methodHandles_mips.cpp b/hotspot/src/cpu/mips/vm/methodHandles_mips.cpp new file mode 100644 -index 00000000..428c2713 +index 0000000000..428c271362 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/methodHandles_mips.cpp @@ -0,0 +1,576 @@ @@ -74845,7 +74125,7 @@ index 00000000..428c2713 +#endif //PRODUCT diff --git a/hotspot/src/cpu/mips/vm/methodHandles_mips.hpp b/hotspot/src/cpu/mips/vm/methodHandles_mips.hpp new file mode 100644 -index 00000000..03b65fc8 +index 0000000000..03b65fc8ef --- /dev/null +++ b/hotspot/src/cpu/mips/vm/methodHandles_mips.hpp @@ -0,0 +1,62 @@ @@ -74913,7 +74193,7 @@ index 00000000..03b65fc8 + } diff --git a/hotspot/src/cpu/mips/vm/mips.ad b/hotspot/src/cpu/mips/vm/mips.ad new file mode 100644 -index 00000000..3563bbe0 +index 0000000000..3563bbe0e5 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/mips.ad @@ -0,0 +1,25 @@ @@ -74944,7 +74224,7 @@ index 00000000..3563bbe0 + diff --git a/hotspot/src/cpu/mips/vm/mips_64.ad b/hotspot/src/cpu/mips/vm/mips_64.ad new file mode 100644 -index 00000000..29125913 +index 0000000000..29125913a4 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/mips_64.ad @@ -0,0 +1,14036 @@ @@ -88986,7 +88266,7 @@ index 00000000..29125913 + diff --git a/hotspot/src/cpu/mips/vm/nativeInst_mips.cpp b/hotspot/src/cpu/mips/vm/nativeInst_mips.cpp new file mode 100644 -index 00000000..e1f7cd94 +index 0000000000..e1f7cd944d --- /dev/null +++ b/hotspot/src/cpu/mips/vm/nativeInst_mips.cpp @@ -0,0 +1,1829 @@ @@ -90821,7 +90101,7 @@ index 00000000..e1f7cd94 +} diff --git a/hotspot/src/cpu/mips/vm/nativeInst_mips.hpp b/hotspot/src/cpu/mips/vm/nativeInst_mips.hpp new file mode 100644 -index 00000000..13a4cb4e +index 0000000000..13a4cb4ef1 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/nativeInst_mips.hpp @@ -0,0 +1,735 @@ @@ -91562,7 +90842,7 @@ index 00000000..13a4cb4e +#endif // CPU_MIPS_VM_NATIVEINST_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/registerMap_mips.hpp b/hotspot/src/cpu/mips/vm/registerMap_mips.hpp new file mode 100644 -index 00000000..7f800eb1 +index 0000000000..7f800eb107 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/registerMap_mips.hpp @@ -0,0 +1,47 @@ @@ -91615,7 +90895,7 @@ index 00000000..7f800eb1 +#endif // CPU_MIPS_VM_REGISTERMAP_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/register_definitions_mips.cpp b/hotspot/src/cpu/mips/vm/register_definitions_mips.cpp new file mode 100644 -index 00000000..4af25318 +index 0000000000..4af2531834 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/register_definitions_mips.cpp @@ -0,0 +1,103 @@ @@ -91724,7 +91004,7 @@ index 00000000..4af25318 +REGISTER_DEFINITION(FloatRegister, f31); diff --git a/hotspot/src/cpu/mips/vm/register_mips.cpp b/hotspot/src/cpu/mips/vm/register_mips.cpp new file mode 100644 -index 00000000..4a9b22bf +index 0000000000..4a9b22bfef --- /dev/null +++ b/hotspot/src/cpu/mips/vm/register_mips.cpp @@ -0,0 +1,52 @@ @@ -91782,7 +91062,7 @@ index 00000000..4a9b22bf + diff --git a/hotspot/src/cpu/mips/vm/register_mips.hpp b/hotspot/src/cpu/mips/vm/register_mips.hpp new file mode 100644 -index 00000000..88bf2d68 +index 0000000000..88bf2d68cc --- /dev/null +++ b/hotspot/src/cpu/mips/vm/register_mips.hpp @@ -0,0 +1,346 @@ @@ -92134,7 +91414,7 @@ index 00000000..88bf2d68 +#endif //CPU_MIPS_VM_REGISTER_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/relocInfo_mips.cpp b/hotspot/src/cpu/mips/vm/relocInfo_mips.cpp new file mode 100644 -index 00000000..cae43b2d +index 0000000000..cae43b2d96 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/relocInfo_mips.cpp @@ -0,0 +1,156 @@ @@ -92296,7 +91576,7 @@ index 00000000..cae43b2d +} diff --git a/hotspot/src/cpu/mips/vm/relocInfo_mips.hpp b/hotspot/src/cpu/mips/vm/relocInfo_mips.hpp new file mode 100644 -index 00000000..04ad5dac +index 0000000000..04ad5dac96 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/relocInfo_mips.hpp @@ -0,0 +1,40 @@ @@ -92342,7 +91622,7 @@ index 00000000..04ad5dac +#endif // CPU_MIPS_VM_RELOCINFO_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/runtime_mips_64.cpp b/hotspot/src/cpu/mips/vm/runtime_mips_64.cpp new file mode 100644 -index 00000000..bb9269b4 +index 0000000000..bb9269b423 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/runtime_mips_64.cpp @@ -0,0 +1,206 @@ @@ -92554,7 +91834,7 @@ index 00000000..bb9269b4 +} diff --git a/hotspot/src/cpu/mips/vm/sharedRuntime_mips_64.cpp b/hotspot/src/cpu/mips/vm/sharedRuntime_mips_64.cpp new file mode 100644 -index 00000000..daf04c44 +index 0000000000..daf04c4422 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/sharedRuntime_mips_64.cpp @@ -0,0 +1,3816 @@ @@ -96376,7 +95656,7 @@ index 00000000..daf04c44 +} diff --git a/hotspot/src/cpu/mips/vm/stubGenerator_mips_64.cpp b/hotspot/src/cpu/mips/vm/stubGenerator_mips_64.cpp new file mode 100644 -index 00000000..aeb797fa +index 0000000000..aeb797faf9 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/stubGenerator_mips_64.cpp @@ -0,0 +1,2147 @@ @@ -98529,7 +97809,7 @@ index 00000000..aeb797fa +} diff --git a/hotspot/src/cpu/mips/vm/stubRoutines_mips_64.cpp b/hotspot/src/cpu/mips/vm/stubRoutines_mips_64.cpp new file mode 100644 -index 00000000..733a48b8 +index 0000000000..733a48b889 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/stubRoutines_mips_64.cpp @@ -0,0 +1,35 @@ @@ -98570,7 +97850,7 @@ index 00000000..733a48b8 +address StubRoutines::gs2::_call_stub_compiled_return = NULL; diff --git a/hotspot/src/cpu/mips/vm/stubRoutines_mips_64.hpp b/hotspot/src/cpu/mips/vm/stubRoutines_mips_64.hpp new file mode 100644 -index 00000000..920c0884 +index 0000000000..920c08844e --- /dev/null +++ b/hotspot/src/cpu/mips/vm/stubRoutines_mips_64.hpp @@ -0,0 +1,59 @@ @@ -98635,7 +97915,7 @@ index 00000000..920c0884 +#endif // CPU_MIPS_VM_STUBROUTINES_MIPS_64_HPP diff --git a/hotspot/src/cpu/mips/vm/templateInterpreterGenerator_mips.hpp b/hotspot/src/cpu/mips/vm/templateInterpreterGenerator_mips.hpp new file mode 100644 -index 00000000..a83c3728 +index 0000000000..a83c3728f8 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/templateInterpreterGenerator_mips.hpp @@ -0,0 +1,35 @@ @@ -98676,7 +97956,7 @@ index 00000000..a83c3728 +#endif // CPU_MIPS_VM_TEMPLATEINTERPRETERGENERATOR_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/templateInterpreter_mips.hpp b/hotspot/src/cpu/mips/vm/templateInterpreter_mips.hpp new file mode 100644 -index 00000000..204f1b2f +index 0000000000..204f1b2f21 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/templateInterpreter_mips.hpp @@ -0,0 +1,41 @@ @@ -98723,7 +98003,7 @@ index 00000000..204f1b2f +#endif // CPU_MIPS_VM_TEMPLATEINTERPRETER_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/templateInterpreter_mips_64.cpp b/hotspot/src/cpu/mips/vm/templateInterpreter_mips_64.cpp new file mode 100644 -index 00000000..0cc5d330 +index 0000000000..0cc5d33070 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/templateInterpreter_mips_64.cpp @@ -0,0 +1,2306 @@ @@ -101035,7 +100315,7 @@ index 00000000..0cc5d330 +#endif // ! CC_INTERP diff --git a/hotspot/src/cpu/mips/vm/templateTable_mips.hpp b/hotspot/src/cpu/mips/vm/templateTable_mips.hpp new file mode 100644 -index 00000000..d879e6dc +index 0000000000..d879e6dc92 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/templateTable_mips.hpp @@ -0,0 +1,34 @@ @@ -101075,7 +100355,7 @@ index 00000000..d879e6dc + static void index_check_without_pop(Register array, Register index); diff --git a/hotspot/src/cpu/mips/vm/templateTable_mips_64.cpp b/hotspot/src/cpu/mips/vm/templateTable_mips_64.cpp new file mode 100644 -index 00000000..7415511b +index 0000000000..7415511b99 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/templateTable_mips_64.cpp @@ -0,0 +1,4623 @@ @@ -105704,7 +104984,7 @@ index 00000000..7415511b +#endif // !CC_INTERP diff --git a/hotspot/src/cpu/mips/vm/templateTable_mips_64.hpp b/hotspot/src/cpu/mips/vm/templateTable_mips_64.hpp new file mode 100644 -index 00000000..b63274a2 +index 0000000000..b63274a206 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/templateTable_mips_64.hpp @@ -0,0 +1,44 @@ @@ -105754,7 +105034,7 @@ index 00000000..b63274a2 +#endif // CPU_MIPS_VM_TEMPLATETABLE_MIPS_64_HPP diff --git a/hotspot/src/cpu/mips/vm/vmStructs_mips.hpp b/hotspot/src/cpu/mips/vm/vmStructs_mips.hpp new file mode 100644 -index 00000000..69399143 +index 0000000000..6939914356 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/vmStructs_mips.hpp @@ -0,0 +1,68 @@ @@ -105828,7 +105108,7 @@ index 00000000..69399143 +#endif // CPU_MIPS_VM_VMSTRUCTS_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/vm_version_ext_mips.cpp b/hotspot/src/cpu/mips/vm/vm_version_ext_mips.cpp new file mode 100644 -index 00000000..a98f70d9 +index 0000000000..a98f70d9ff --- /dev/null +++ b/hotspot/src/cpu/mips/vm/vm_version_ext_mips.cpp @@ -0,0 +1,89 @@ @@ -105923,7 +105203,7 @@ index 00000000..a98f70d9 +} diff --git a/hotspot/src/cpu/mips/vm/vm_version_ext_mips.hpp b/hotspot/src/cpu/mips/vm/vm_version_ext_mips.hpp new file mode 100644 -index 00000000..a240fcc2 +index 0000000000..a240fcc2e9 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/vm_version_ext_mips.hpp @@ -0,0 +1,54 @@ @@ -105983,7 +105263,7 @@ index 00000000..a240fcc2 +#endif // CPU_MIPS_VM_VM_VERSION_EXT_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/vm_version_mips.cpp b/hotspot/src/cpu/mips/vm/vm_version_mips.cpp new file mode 100644 -index 00000000..aef8f074 +index 0000000000..aef8f0746a --- /dev/null +++ b/hotspot/src/cpu/mips/vm/vm_version_mips.cpp @@ -0,0 +1,510 @@ @@ -106499,7 +105779,7 @@ index 00000000..aef8f074 +} diff --git a/hotspot/src/cpu/mips/vm/vm_version_mips.hpp b/hotspot/src/cpu/mips/vm/vm_version_mips.hpp new file mode 100644 -index 00000000..0de01e5f +index 0000000000..0de01e5f64 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/vm_version_mips.hpp @@ -0,0 +1,221 @@ @@ -106726,7 +106006,7 @@ index 00000000..0de01e5f +#endif // CPU_MIPS_VM_VM_VERSION_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/vmreg_mips.cpp b/hotspot/src/cpu/mips/vm/vmreg_mips.cpp new file mode 100644 -index 00000000..86bd74d4 +index 0000000000..86bd74d430 --- /dev/null +++ b/hotspot/src/cpu/mips/vm/vmreg_mips.cpp @@ -0,0 +1,51 @@ @@ -106783,7 +106063,7 @@ index 00000000..86bd74d4 +} diff --git a/hotspot/src/cpu/mips/vm/vmreg_mips.hpp b/hotspot/src/cpu/mips/vm/vmreg_mips.hpp new file mode 100644 -index 00000000..6a970ea9 +index 0000000000..6a970ea91a --- /dev/null +++ b/hotspot/src/cpu/mips/vm/vmreg_mips.hpp @@ -0,0 +1,35 @@ @@ -106824,7 +106104,7 @@ index 00000000..6a970ea9 +#endif // CPU_MIPS_VM_VMREG_MIPS_HPP diff --git a/hotspot/src/cpu/mips/vm/vmreg_mips.inline.hpp b/hotspot/src/cpu/mips/vm/vmreg_mips.inline.hpp new file mode 100644 -index 00000000..77e18ce5 +index 0000000000..77e18ce57d --- /dev/null +++ b/hotspot/src/cpu/mips/vm/vmreg_mips.inline.hpp @@ -0,0 +1,68 @@ @@ -106898,7 +106178,7 @@ index 00000000..77e18ce5 +#endif // CPU_MIPS_VM_VMREG_MIPS_INLINE_HPP diff --git a/hotspot/src/cpu/mips/vm/vtableStubs_mips_64.cpp b/hotspot/src/cpu/mips/vm/vtableStubs_mips_64.cpp new file mode 100644 -index 00000000..7779c58e +index 0000000000..7779c58e0a --- /dev/null +++ b/hotspot/src/cpu/mips/vm/vtableStubs_mips_64.cpp @@ -0,0 +1,301 @@ @@ -107204,7 +106484,7 @@ index 00000000..7779c58e + return wordSize; +} diff --git a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp -index c1c053e6..5c90df10 100644 +index c1c053e66c..5c90df1079 100644 --- a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp +++ b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp @@ -1513,6 +1513,10 @@ void LIR_Assembler::emit_opBranch(LIR_OpBranch* op) { @@ -107232,7 +106512,7 @@ index c1c053e6..5c90df10 100644 assert(info == NULL, "should never be used, idiv/irem and ldiv/lrem not handled by this method"); diff --git a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp -index 92b73e1c..45da327e 100644 +index 92b73e1c71..45da327efb 100644 --- a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp +++ b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp @@ -242,20 +242,27 @@ void LIRGenerator::increment_counter(LIR_Address* addr, int step) { @@ -107271,7 +106551,7 @@ index 92b73e1c..45da327e 100644 bool LIRGenerator::strength_reduce_multiply(LIR_Opr left, jint c, LIR_Opr result, LIR_Opr tmp) { if (tmp->is_valid() && c > 0 && c < max_jint) { diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp -index 54cfcdd1..c3d22ba5 100644 +index 54cfcdd116..c3d22ba5d3 100644 --- a/hotspot/src/os/linux/vm/os_linux.cpp +++ b/hotspot/src/os/linux/vm/os_linux.cpp @@ -22,6 +22,12 @@ @@ -107358,7 +106638,7 @@ index 54cfcdd1..c3d22ba5 100644 "Specify at least %dk", os::Linux::min_stack_allowed/ K); diff --git a/hotspot/src/os/linux/vm/os_perf_linux.cpp b/hotspot/src/os/linux/vm/os_perf_linux.cpp -index 0d1f7581..cbc6c075 100644 +index 0d1f75810a..cbc6c0757c 100644 --- a/hotspot/src/os/linux/vm/os_perf_linux.cpp +++ b/hotspot/src/os/linux/vm/os_perf_linux.cpp @@ -50,6 +50,12 @@ @@ -107376,7 +106656,7 @@ index 0d1f7581..cbc6c075 100644 #include diff --git a/hotspot/src/os_cpu/linux_loongarch/vm/assembler_linux_loongarch.cpp b/hotspot/src/os_cpu/linux_loongarch/vm/assembler_linux_loongarch.cpp new file mode 100644 -index 00000000..5ee0965f +index 0000000000..5ee0965f42 --- /dev/null +++ b/hotspot/src/os_cpu/linux_loongarch/vm/assembler_linux_loongarch.cpp @@ -0,0 +1,92 @@ @@ -107474,7 +106754,7 @@ index 00000000..5ee0965f +} diff --git a/hotspot/src/os_cpu/linux_loongarch/vm/atomic_linux_loongarch.inline.hpp b/hotspot/src/os_cpu/linux_loongarch/vm/atomic_linux_loongarch.inline.hpp new file mode 100644 -index 00000000..69590ba5 +index 0000000000..69590ba582 --- /dev/null +++ b/hotspot/src/os_cpu/linux_loongarch/vm/atomic_linux_loongarch.inline.hpp @@ -0,0 +1,206 @@ @@ -107686,7 +106966,7 @@ index 00000000..69590ba5 +#endif // OS_CPU_LINUX_LOONGARCH_VM_ATOMIC_LINUX_LOONGARCH_INLINE_HPP diff --git a/hotspot/src/os_cpu/linux_loongarch/vm/bytes_linux_loongarch.inline.hpp b/hotspot/src/os_cpu/linux_loongarch/vm/bytes_linux_loongarch.inline.hpp new file mode 100644 -index 00000000..4e205c46 +index 0000000000..4e205c468e --- /dev/null +++ b/hotspot/src/os_cpu/linux_loongarch/vm/bytes_linux_loongarch.inline.hpp @@ -0,0 +1,37 @@ @@ -107729,7 +107009,7 @@ index 00000000..4e205c46 +#endif // OS_CPU_LINUX_LOONGARCH_VM_BYTES_LINUX_LOONGARCH_INLINE_HPP diff --git a/hotspot/src/os_cpu/linux_loongarch/vm/copy_linux_loongarch.inline.hpp b/hotspot/src/os_cpu/linux_loongarch/vm/copy_linux_loongarch.inline.hpp new file mode 100644 -index 00000000..7d6e11a9 +index 0000000000..7d6e11a935 --- /dev/null +++ b/hotspot/src/os_cpu/linux_loongarch/vm/copy_linux_loongarch.inline.hpp @@ -0,0 +1,125 @@ @@ -107860,7 +107140,7 @@ index 00000000..7d6e11a9 +#endif // OS_CPU_LINUX_LOONGARCH_VM_COPY_LINUX_LOONGARCH_INLINE_HPP diff --git a/hotspot/src/os_cpu/linux_loongarch/vm/globals_linux_loongarch.hpp b/hotspot/src/os_cpu/linux_loongarch/vm/globals_linux_loongarch.hpp new file mode 100644 -index 00000000..8ec3fa82 +index 0000000000..8ec3fa8239 --- /dev/null +++ b/hotspot/src/os_cpu/linux_loongarch/vm/globals_linux_loongarch.hpp @@ -0,0 +1,43 @@ @@ -107909,7 +107189,7 @@ index 00000000..8ec3fa82 +#endif // OS_CPU_LINUX_LOONGARCH_VM_GLOBALS_LINUX_LOONGARCH_HPP diff --git a/hotspot/src/os_cpu/linux_loongarch/vm/orderAccess_linux_loongarch.inline.hpp b/hotspot/src/os_cpu/linux_loongarch/vm/orderAccess_linux_loongarch.inline.hpp new file mode 100644 -index 00000000..3e050c8d +index 0000000000..3e050c8d09 --- /dev/null +++ b/hotspot/src/os_cpu/linux_loongarch/vm/orderAccess_linux_loongarch.inline.hpp @@ -0,0 +1,115 @@ @@ -108030,7 +107310,7 @@ index 00000000..3e050c8d +#endif // OS_CPU_LINUX_LOONGARCH_VM_ORDERACCESS_LINUX_LOONGARCH_INLINE_HPP diff --git a/hotspot/src/os_cpu/linux_loongarch/vm/os_linux_loongarch.cpp b/hotspot/src/os_cpu/linux_loongarch/vm/os_linux_loongarch.cpp new file mode 100644 -index 00000000..f2c3df84 +index 0000000000..f2c3df84a1 --- /dev/null +++ b/hotspot/src/os_cpu/linux_loongarch/vm/os_linux_loongarch.cpp @@ -0,0 +1,750 @@ @@ -108786,7 +108066,7 @@ index 00000000..f2c3df84 +} diff --git a/hotspot/src/os_cpu/linux_loongarch/vm/os_linux_loongarch.hpp b/hotspot/src/os_cpu/linux_loongarch/vm/os_linux_loongarch.hpp new file mode 100644 -index 00000000..a7321ae0 +index 0000000000..a7321ae025 --- /dev/null +++ b/hotspot/src/os_cpu/linux_loongarch/vm/os_linux_loongarch.hpp @@ -0,0 +1,39 @@ @@ -108831,7 +108111,7 @@ index 00000000..a7321ae0 +#endif // OS_CPU_LINUX_LOONGARCH_VM_OS_LINUX_LOONGARCH_HPP diff --git a/hotspot/src/os_cpu/linux_loongarch/vm/prefetch_linux_loongarch.inline.hpp b/hotspot/src/os_cpu/linux_loongarch/vm/prefetch_linux_loongarch.inline.hpp new file mode 100644 -index 00000000..a1cedcd8 +index 0000000000..a1cedcd8cf --- /dev/null +++ b/hotspot/src/os_cpu/linux_loongarch/vm/prefetch_linux_loongarch.inline.hpp @@ -0,0 +1,56 @@ @@ -108893,7 +108173,7 @@ index 00000000..a1cedcd8 +#endif // OS_CPU_LINUX_LOONGARCH_VM_PREFETCH_LINUX_LOONGARCH_INLINE_HPP diff --git a/hotspot/src/os_cpu/linux_loongarch/vm/threadLS_linux_loongarch.cpp b/hotspot/src/os_cpu/linux_loongarch/vm/threadLS_linux_loongarch.cpp new file mode 100644 -index 00000000..be28a562 +index 0000000000..be28a562a1 --- /dev/null +++ b/hotspot/src/os_cpu/linux_loongarch/vm/threadLS_linux_loongarch.cpp @@ -0,0 +1,84 @@ @@ -108983,7 +108263,7 @@ index 00000000..be28a562 +} diff --git a/hotspot/src/os_cpu/linux_loongarch/vm/threadLS_linux_loongarch.hpp b/hotspot/src/os_cpu/linux_loongarch/vm/threadLS_linux_loongarch.hpp new file mode 100644 -index 00000000..4fab788a +index 0000000000..4fab788a75 --- /dev/null +++ b/hotspot/src/os_cpu/linux_loongarch/vm/threadLS_linux_loongarch.hpp @@ -0,0 +1,61 @@ @@ -109050,7 +108330,7 @@ index 00000000..4fab788a +#endif // OS_CPU_LINUX_LOONGARCH_VM_THREADLS_LINUX_LOONGARCH_HPP diff --git a/hotspot/src/os_cpu/linux_loongarch/vm/thread_linux_loongarch.cpp b/hotspot/src/os_cpu/linux_loongarch/vm/thread_linux_loongarch.cpp new file mode 100644 -index 00000000..44f666d6 +index 0000000000..44f666d61f --- /dev/null +++ b/hotspot/src/os_cpu/linux_loongarch/vm/thread_linux_loongarch.cpp @@ -0,0 +1,99 @@ @@ -109155,7 +108435,7 @@ index 00000000..44f666d6 + diff --git a/hotspot/src/os_cpu/linux_loongarch/vm/thread_linux_loongarch.hpp b/hotspot/src/os_cpu/linux_loongarch/vm/thread_linux_loongarch.hpp new file mode 100644 -index 00000000..d6dd2521 +index 0000000000..d6dd2521f4 --- /dev/null +++ b/hotspot/src/os_cpu/linux_loongarch/vm/thread_linux_loongarch.hpp @@ -0,0 +1,75 @@ @@ -109236,7 +108516,7 @@ index 00000000..d6dd2521 +#endif // OS_CPU_LINUX_LOONGARCH_VM_THREAD_LINUX_LOONGARCH_HPP diff --git a/hotspot/src/os_cpu/linux_loongarch/vm/vmStructs_linux_loongarch.hpp b/hotspot/src/os_cpu/linux_loongarch/vm/vmStructs_linux_loongarch.hpp new file mode 100644 -index 00000000..0097cadc +index 0000000000..0097cadcb7 --- /dev/null +++ b/hotspot/src/os_cpu/linux_loongarch/vm/vmStructs_linux_loongarch.hpp @@ -0,0 +1,55 @@ @@ -109297,7 +108577,7 @@ index 00000000..0097cadc +#endif // OS_CPU_LINUX_LOONGARCH_VM_VMSTRUCTS_LINUX_LOONGARCH_HPP diff --git a/hotspot/src/os_cpu/linux_loongarch/vm/vm_version_linux_loongarch.cpp b/hotspot/src/os_cpu/linux_loongarch/vm/vm_version_linux_loongarch.cpp new file mode 100644 -index 00000000..80a1538d +index 0000000000..80a1538de9 --- /dev/null +++ b/hotspot/src/os_cpu/linux_loongarch/vm/vm_version_linux_loongarch.cpp @@ -0,0 +1,29 @@ @@ -109332,7 +108612,7 @@ index 00000000..80a1538d + diff --git a/hotspot/src/os_cpu/linux_mips/vm/assembler_linux_mips.cpp b/hotspot/src/os_cpu/linux_mips/vm/assembler_linux_mips.cpp new file mode 100644 -index 00000000..4ba53d93 +index 0000000000..4ba53d9341 --- /dev/null +++ b/hotspot/src/os_cpu/linux_mips/vm/assembler_linux_mips.cpp @@ -0,0 +1,111 @@ @@ -109449,7 +108729,7 @@ index 00000000..4ba53d93 +} diff --git a/hotspot/src/os_cpu/linux_mips/vm/atomic_linux_mips.inline.hpp b/hotspot/src/os_cpu/linux_mips/vm/atomic_linux_mips.inline.hpp new file mode 100644 -index 00000000..1c7ad605 +index 0000000000..1c7ad605e9 --- /dev/null +++ b/hotspot/src/os_cpu/linux_mips/vm/atomic_linux_mips.inline.hpp @@ -0,0 +1,258 @@ @@ -109713,7 +108993,7 @@ index 00000000..1c7ad605 +#endif // OS_CPU_LINUX_MIPS_VM_ATOMIC_LINUX_MIPS_INLINE_HPP diff --git a/hotspot/src/os_cpu/linux_mips/vm/bytes_linux_mips.inline.hpp b/hotspot/src/os_cpu/linux_mips/vm/bytes_linux_mips.inline.hpp new file mode 100644 -index 00000000..5b5cd10a +index 0000000000..5b5cd10aa5 --- /dev/null +++ b/hotspot/src/os_cpu/linux_mips/vm/bytes_linux_mips.inline.hpp @@ -0,0 +1,37 @@ @@ -109756,7 +109036,7 @@ index 00000000..5b5cd10a +#endif // OS_CPU_LINUX_MIPS_VM_BYTES_LINUX_MIPS_INLINE_HPP diff --git a/hotspot/src/os_cpu/linux_mips/vm/copy_linux_mips.inline.hpp b/hotspot/src/os_cpu/linux_mips/vm/copy_linux_mips.inline.hpp new file mode 100644 -index 00000000..73ac3450 +index 0000000000..73ac34501b --- /dev/null +++ b/hotspot/src/os_cpu/linux_mips/vm/copy_linux_mips.inline.hpp @@ -0,0 +1,125 @@ @@ -109887,7 +109167,7 @@ index 00000000..73ac3450 +#endif // OS_CPU_LINUX_MIPS_VM_COPY_LINUX_MIPS_INLINE_HPP diff --git a/hotspot/src/os_cpu/linux_mips/vm/globals_linux_mips.hpp b/hotspot/src/os_cpu/linux_mips/vm/globals_linux_mips.hpp new file mode 100644 -index 00000000..f1599ac5 +index 0000000000..f1599ac5f1 --- /dev/null +++ b/hotspot/src/os_cpu/linux_mips/vm/globals_linux_mips.hpp @@ -0,0 +1,51 @@ @@ -109944,7 +109224,7 @@ index 00000000..f1599ac5 +#endif // OS_CPU_LINUX_MIPS_VM_GLOBALS_LINUX_MIPS_HPP diff --git a/hotspot/src/os_cpu/linux_mips/vm/linux_mips.ad b/hotspot/src/os_cpu/linux_mips/vm/linux_mips.ad new file mode 100644 -index 00000000..5e38996f +index 0000000000..5e38996ffa --- /dev/null +++ b/hotspot/src/os_cpu/linux_mips/vm/linux_mips.ad @@ -0,0 +1,153 @@ @@ -110103,7 +109383,7 @@ index 00000000..5e38996f +%} diff --git a/hotspot/src/os_cpu/linux_mips/vm/linux_mips.s b/hotspot/src/os_cpu/linux_mips/vm/linux_mips.s new file mode 100644 -index 00000000..f87fbf26 +index 0000000000..f87fbf265d --- /dev/null +++ b/hotspot/src/os_cpu/linux_mips/vm/linux_mips.s @@ -0,0 +1,25 @@ @@ -110134,7 +109414,7 @@ index 00000000..f87fbf26 + diff --git a/hotspot/src/os_cpu/linux_mips/vm/linux_mips_64.ad b/hotspot/src/os_cpu/linux_mips/vm/linux_mips_64.ad new file mode 100644 -index 00000000..ca4d0947 +index 0000000000..ca4d094738 --- /dev/null +++ b/hotspot/src/os_cpu/linux_mips/vm/linux_mips_64.ad @@ -0,0 +1,50 @@ @@ -110190,7 +109470,7 @@ index 00000000..ca4d0947 +// specified. diff --git a/hotspot/src/os_cpu/linux_mips/vm/orderAccess_linux_mips.inline.hpp b/hotspot/src/os_cpu/linux_mips/vm/orderAccess_linux_mips.inline.hpp new file mode 100644 -index 00000000..c9bc169a +index 0000000000..c9bc169aa5 --- /dev/null +++ b/hotspot/src/os_cpu/linux_mips/vm/orderAccess_linux_mips.inline.hpp @@ -0,0 +1,115 @@ @@ -110311,7 +109591,7 @@ index 00000000..c9bc169a +#endif // OS_CPU_LINUX_MIPS_VM_ORDERACCESS_LINUX_MIPS_INLINE_HPP diff --git a/hotspot/src/os_cpu/linux_mips/vm/os_linux_mips.cpp b/hotspot/src/os_cpu/linux_mips/vm/os_linux_mips.cpp new file mode 100644 -index 00000000..43487dab +index 0000000000..43487dab98 --- /dev/null +++ b/hotspot/src/os_cpu/linux_mips/vm/os_linux_mips.cpp @@ -0,0 +1,1015 @@ @@ -111332,7 +110612,7 @@ index 00000000..43487dab +} diff --git a/hotspot/src/os_cpu/linux_mips/vm/os_linux_mips.hpp b/hotspot/src/os_cpu/linux_mips/vm/os_linux_mips.hpp new file mode 100644 -index 00000000..c07d0815 +index 0000000000..c07d08156f --- /dev/null +++ b/hotspot/src/os_cpu/linux_mips/vm/os_linux_mips.hpp @@ -0,0 +1,39 @@ @@ -111377,7 +110657,7 @@ index 00000000..c07d0815 +#endif // OS_CPU_LINUX_MIPS_VM_OS_LINUX_MIPS_HPP diff --git a/hotspot/src/os_cpu/linux_mips/vm/prefetch_linux_mips.inline.hpp b/hotspot/src/os_cpu/linux_mips/vm/prefetch_linux_mips.inline.hpp new file mode 100644 -index 00000000..93490345 +index 0000000000..93490345f0 --- /dev/null +++ b/hotspot/src/os_cpu/linux_mips/vm/prefetch_linux_mips.inline.hpp @@ -0,0 +1,58 @@ @@ -111441,7 +110721,7 @@ index 00000000..93490345 +#endif // OS_CPU_LINUX_MIPS_VM_PREFETCH_LINUX_MIPS_INLINE_HPP diff --git a/hotspot/src/os_cpu/linux_mips/vm/threadLS_linux_mips.cpp b/hotspot/src/os_cpu/linux_mips/vm/threadLS_linux_mips.cpp new file mode 100644 -index 00000000..be28a562 +index 0000000000..be28a562a1 --- /dev/null +++ b/hotspot/src/os_cpu/linux_mips/vm/threadLS_linux_mips.cpp @@ -0,0 +1,84 @@ @@ -111531,7 +110811,7 @@ index 00000000..be28a562 +} diff --git a/hotspot/src/os_cpu/linux_mips/vm/threadLS_linux_mips.hpp b/hotspot/src/os_cpu/linux_mips/vm/threadLS_linux_mips.hpp new file mode 100644 -index 00000000..e595195e +index 0000000000..e595195e21 --- /dev/null +++ b/hotspot/src/os_cpu/linux_mips/vm/threadLS_linux_mips.hpp @@ -0,0 +1,61 @@ @@ -111598,7 +110878,7 @@ index 00000000..e595195e +#endif // OS_CPU_LINUX_MIPS_VM_THREADLS_LINUX_MIPS_HPP diff --git a/hotspot/src/os_cpu/linux_mips/vm/thread_linux_mips.cpp b/hotspot/src/os_cpu/linux_mips/vm/thread_linux_mips.cpp new file mode 100644 -index 00000000..44f666d6 +index 0000000000..44f666d61f --- /dev/null +++ b/hotspot/src/os_cpu/linux_mips/vm/thread_linux_mips.cpp @@ -0,0 +1,99 @@ @@ -111703,7 +110983,7 @@ index 00000000..44f666d6 + diff --git a/hotspot/src/os_cpu/linux_mips/vm/thread_linux_mips.hpp b/hotspot/src/os_cpu/linux_mips/vm/thread_linux_mips.hpp new file mode 100644 -index 00000000..cb11c36a +index 0000000000..cb11c36ae5 --- /dev/null +++ b/hotspot/src/os_cpu/linux_mips/vm/thread_linux_mips.hpp @@ -0,0 +1,75 @@ @@ -111784,7 +111064,7 @@ index 00000000..cb11c36a +#endif // OS_CPU_LINUX_MIPS_VM_THREAD_LINUX_MIPS_HPP diff --git a/hotspot/src/os_cpu/linux_mips/vm/vmStructs_linux_mips.hpp b/hotspot/src/os_cpu/linux_mips/vm/vmStructs_linux_mips.hpp new file mode 100644 -index 00000000..b7454bf0 +index 0000000000..b7454bf045 --- /dev/null +++ b/hotspot/src/os_cpu/linux_mips/vm/vmStructs_linux_mips.hpp @@ -0,0 +1,55 @@ @@ -111845,7 +111125,7 @@ index 00000000..b7454bf0 +#endif // OS_CPU_LINUX_MIPS_VM_VMSTRUCTS_LINUX_MIPS_HPP diff --git a/hotspot/src/os_cpu/linux_mips/vm/vm_version_linux_mips.cpp b/hotspot/src/os_cpu/linux_mips/vm/vm_version_linux_mips.cpp new file mode 100644 -index 00000000..ce697823 +index 0000000000..ce697823b9 --- /dev/null +++ b/hotspot/src/os_cpu/linux_mips/vm/vm_version_linux_mips.cpp @@ -0,0 +1,28 @@ @@ -111878,7 +111158,7 @@ index 00000000..ce697823 +#include "runtime/os.hpp" +#include "vm_version_mips.hpp" diff --git a/hotspot/src/share/tools/hsdis/Makefile b/hotspot/src/share/tools/hsdis/Makefile -index 0d1b6089..a9754ce2 100644 +index 0d1b608944..a9754ce2ac 100644 --- a/hotspot/src/share/tools/hsdis/Makefile +++ b/hotspot/src/share/tools/hsdis/Makefile @@ -105,12 +105,25 @@ CFLAGS/sparc += -m32 @@ -111908,7 +111188,7 @@ index 0d1b6089..a9754ce2 100644 OUTFLAGS += -o $@ else diff --git a/hotspot/src/share/tools/hsdis/hsdis.c b/hotspot/src/share/tools/hsdis/hsdis.c -index 4fb49648..f6ef5bea 100644 +index 4fb4964870..f6ef5bea15 100644 --- a/hotspot/src/share/tools/hsdis/hsdis.c +++ b/hotspot/src/share/tools/hsdis/hsdis.c @@ -493,6 +493,16 @@ static const char* native_arch_name() { @@ -111929,7 +111209,7 @@ index 4fb49648..f6ef5bea 100644 res = "aarch64"; #endif diff --git a/hotspot/src/share/vm/adlc/main.cpp b/hotspot/src/share/vm/adlc/main.cpp -index 52044f12..50c58587 100644 +index 52044f12d4..50c585872e 100644 --- a/hotspot/src/share/vm/adlc/main.cpp +++ b/hotspot/src/share/vm/adlc/main.cpp @@ -22,6 +22,12 @@ @@ -111961,7 +111241,7 @@ index 52044f12..50c58587 100644 AD.addInclude(AD._CPP_file, "assembler_aarch64.inline.hpp"); AD.addInclude(AD._CPP_file, "nativeInst_aarch64.hpp"); diff --git a/hotspot/src/share/vm/asm/assembler.hpp b/hotspot/src/share/vm/asm/assembler.hpp -index f7f1ae1d..572aa997 100644 +index f7f1ae1d36..572aa997ca 100644 --- a/hotspot/src/share/vm/asm/assembler.hpp +++ b/hotspot/src/share/vm/asm/assembler.hpp @@ -22,6 +22,12 @@ @@ -112006,7 +111286,7 @@ index f7f1ae1d..572aa997 100644 #endif // SHARE_VM_ASM_ASSEMBLER_HPP diff --git a/hotspot/src/share/vm/asm/assembler.inline.hpp b/hotspot/src/share/vm/asm/assembler.inline.hpp -index 1a48cb31..8ac90e14 100644 +index 1a48cb3171..8ac90e1474 100644 --- a/hotspot/src/share/vm/asm/assembler.inline.hpp +++ b/hotspot/src/share/vm/asm/assembler.inline.hpp @@ -22,6 +22,12 @@ @@ -112036,7 +111316,7 @@ index 1a48cb31..8ac90e14 100644 # include "assembler_aarch64.inline.hpp" #endif diff --git a/hotspot/src/share/vm/asm/codeBuffer.cpp b/hotspot/src/share/vm/asm/codeBuffer.cpp -index d94ac406..f6b57811 100644 +index d94ac40655..f6b578111f 100644 --- a/hotspot/src/share/vm/asm/codeBuffer.cpp +++ b/hotspot/src/share/vm/asm/codeBuffer.cpp @@ -22,6 +22,12 @@ @@ -112061,7 +111341,7 @@ index d94ac406..f6b57811 100644 rtype == relocInfo::external_word_type, "code needs relocation information"); diff --git a/hotspot/src/share/vm/asm/codeBuffer.hpp b/hotspot/src/share/vm/asm/codeBuffer.hpp -index 02b619ad..c04560a0 100644 +index 02b619ad77..c04560a0bc 100644 --- a/hotspot/src/share/vm/asm/codeBuffer.hpp +++ b/hotspot/src/share/vm/asm/codeBuffer.hpp @@ -22,6 +22,12 @@ @@ -112091,7 +111371,7 @@ index 02b619ad..c04560a0 100644 }; diff --git a/hotspot/src/share/vm/asm/macroAssembler.hpp b/hotspot/src/share/vm/asm/macroAssembler.hpp -index 1482eb63..0be415b6 100644 +index 1482eb630b..0be415b6c5 100644 --- a/hotspot/src/share/vm/asm/macroAssembler.hpp +++ b/hotspot/src/share/vm/asm/macroAssembler.hpp @@ -22,6 +22,12 @@ @@ -112120,7 +111400,7 @@ index 1482eb63..0be415b6 100644 +#endif #endif // SHARE_VM_ASM_MACROASSEMBLER_HPP diff --git a/hotspot/src/share/vm/asm/macroAssembler.inline.hpp b/hotspot/src/share/vm/asm/macroAssembler.inline.hpp -index db3daa52..6f4e523c 100644 +index db3daa52e9..6f4e523c59 100644 --- a/hotspot/src/share/vm/asm/macroAssembler.inline.hpp +++ b/hotspot/src/share/vm/asm/macroAssembler.inline.hpp @@ -22,6 +22,12 @@ @@ -112150,7 +111430,7 @@ index db3daa52..6f4e523c 100644 # include "macroAssembler_aarch64.inline.hpp" #endif diff --git a/hotspot/src/share/vm/asm/register.hpp b/hotspot/src/share/vm/asm/register.hpp -index c5008901..6a20929e 100644 +index c500890181..6a20929e59 100644 --- a/hotspot/src/share/vm/asm/register.hpp +++ b/hotspot/src/share/vm/asm/register.hpp @@ -22,6 +22,12 @@ @@ -112180,7 +111460,7 @@ index c5008901..6a20929e 100644 # include "register_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/c1/c1_Defs.hpp b/hotspot/src/share/vm/c1/c1_Defs.hpp -index b0cd7637..b42b9de1 100644 +index b0cd763739..b42b9de1b5 100644 --- a/hotspot/src/share/vm/c1/c1_Defs.hpp +++ b/hotspot/src/share/vm/c1/c1_Defs.hpp @@ -22,6 +22,12 @@ @@ -112217,7 +111497,7 @@ index b0cd7637..b42b9de1 100644 # include "c1_Defs_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp b/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp -index f07e97a4..6bc367a8 100644 +index f07e97a4d3..6bc367a897 100644 --- a/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp +++ b/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp @@ -22,6 +22,12 @@ @@ -112244,7 +111524,7 @@ index f07e97a4..6bc367a8 100644 # include "c1_FpuStackSim_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/c1/c1_FrameMap.cpp b/hotspot/src/share/vm/c1/c1_FrameMap.cpp -index 1dac94d5..b1e37ec4 100644 +index 1dac94d58c..b1e37ec41c 100644 --- a/hotspot/src/share/vm/c1/c1_FrameMap.cpp +++ b/hotspot/src/share/vm/c1/c1_FrameMap.cpp @@ -22,6 +22,12 @@ @@ -112271,7 +111551,7 @@ index 1dac94d5..b1e37ec4 100644 # include "vmreg_aarch64.inline.hpp" #endif diff --git a/hotspot/src/share/vm/c1/c1_FrameMap.hpp b/hotspot/src/share/vm/c1/c1_FrameMap.hpp -index 41571e3d..c0e7b28e 100644 +index 41571e3d16..c0e7b28ea4 100644 --- a/hotspot/src/share/vm/c1/c1_FrameMap.hpp +++ b/hotspot/src/share/vm/c1/c1_FrameMap.hpp @@ -22,6 +22,12 @@ @@ -112298,7 +111578,7 @@ index 41571e3d..c0e7b28e 100644 # include "c1_FrameMap_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/c1/c1_LIR.cpp b/hotspot/src/share/vm/c1/c1_LIR.cpp -index fa37e7a0..5d33d3f7 100644 +index fa37e7a046..5d33d3f7a0 100644 --- a/hotspot/src/share/vm/c1/c1_LIR.cpp +++ b/hotspot/src/share/vm/c1/c1_LIR.cpp @@ -22,6 +22,12 @@ @@ -112680,7 +111960,7 @@ index fa37e7a0..5d33d3f7 100644 #endif diff --git a/hotspot/src/share/vm/c1/c1_LIR.hpp b/hotspot/src/share/vm/c1/c1_LIR.hpp -index 24b86202..aec77afe 100644 +index 24b8620211..aec77afe1f 100644 --- a/hotspot/src/share/vm/c1/c1_LIR.hpp +++ b/hotspot/src/share/vm/c1/c1_LIR.hpp @@ -22,6 +22,11 @@ @@ -113029,7 +112309,7 @@ index 24b86202..aec77afe 100644 void shift_right(LIR_Opr value, LIR_Opr count, LIR_Opr dst, LIR_Opr tmp); void unsigned_shift_right(LIR_Opr value, LIR_Opr count, LIR_Opr dst, LIR_Opr tmp); diff --git a/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp b/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp -index e5cd19f1..a18c5300 100644 +index e5cd19f17a..a18c53008b 100644 --- a/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp +++ b/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp @@ -22,6 +22,12 @@ @@ -113076,7 +112356,7 @@ index e5cd19f1..a18c5300 100644 _masm->build_frame(initial_frame_size_in_bytes(), bang_size_in_bytes()); } diff --git a/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp b/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp -index 1a68d458..ac0f4e7a 100644 +index 1a68d458d2..ac0f4e7a46 100644 --- a/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp +++ b/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp @@ -22,6 +22,12 @@ @@ -113121,7 +112401,7 @@ index 1a68d458..ac0f4e7a 100644 # include "c1_LIRAssembler_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp -index e98834d0..d1a987c6 100644 +index e98834d03a..d1a987c699 100644 --- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp +++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp @@ -22,6 +22,12 @@ @@ -113418,7 +112698,7 @@ index e98834d0..d1a987c6 100644 } return value; diff --git a/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp b/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp -index 27be79fe..57c253db 100644 +index 27be79fee1..57c253db69 100644 --- a/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp +++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp @@ -22,6 +22,12 @@ @@ -113467,7 +112747,7 @@ index 27be79fe..57c253db 100644 ciMethod *method, int frequency, int bci, bool backedge, bool notify); diff --git a/hotspot/src/share/vm/c1/c1_LinearScan.cpp b/hotspot/src/share/vm/c1/c1_LinearScan.cpp -index 1f6281bf..4549ff09 100644 +index 1f6281bf25..4549ff0928 100644 --- a/hotspot/src/share/vm/c1/c1_LinearScan.cpp +++ b/hotspot/src/share/vm/c1/c1_LinearScan.cpp @@ -22,6 +22,12 @@ @@ -113615,7 +112895,7 @@ index 1f6281bf..4549ff09 100644 case lir_add: case lir_sub: diff --git a/hotspot/src/share/vm/c1/c1_LinearScan.hpp b/hotspot/src/share/vm/c1/c1_LinearScan.hpp -index 96e6b3ba..576a07d7 100644 +index 96e6b3babf..576a07d73d 100644 --- a/hotspot/src/share/vm/c1/c1_LinearScan.hpp +++ b/hotspot/src/share/vm/c1/c1_LinearScan.hpp @@ -22,6 +22,12 @@ @@ -113642,7 +112922,7 @@ index 96e6b3ba..576a07d7 100644 # include "c1_LinearScan_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp b/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp -index 7e22bbaa..12aca7bf 100644 +index 7e22bbaa27..12aca7bf50 100644 --- a/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp +++ b/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp @@ -22,6 +22,12 @@ @@ -113669,7 +112949,7 @@ index 7e22bbaa..12aca7bf 100644 # include "c1_MacroAssembler_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/c1/c1_Runtime1.cpp b/hotspot/src/share/vm/c1/c1_Runtime1.cpp -index aebc3775..f1253506 100644 +index aebc377527..f1253506f6 100644 --- a/hotspot/src/share/vm/c1/c1_Runtime1.cpp +++ b/hotspot/src/share/vm/c1/c1_Runtime1.cpp @@ -22,6 +22,12 @@ @@ -113742,7 +113022,7 @@ index aebc3775..f1253506 100644 // Entry point for compiled code. We want to patch a nmethod. // We don't do a normal VM transition here because we want to diff --git a/hotspot/src/share/vm/c1/c1_globals.hpp b/hotspot/src/share/vm/c1/c1_globals.hpp -index 8f7f9f61..0e2d926b 100644 +index 8f7f9f61c9..0e2d926bdf 100644 --- a/hotspot/src/share/vm/c1/c1_globals.hpp +++ b/hotspot/src/share/vm/c1/c1_globals.hpp @@ -22,6 +22,12 @@ @@ -113769,7 +113049,7 @@ index 8f7f9f61..0e2d926b 100644 # include "c1_globals_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/classfile/bytecodeAssembler.cpp b/hotspot/src/share/vm/classfile/bytecodeAssembler.cpp -index f067419f..5aa19dc8 100644 +index f067419ffc..5aa19dc84f 100644 --- a/hotspot/src/share/vm/classfile/bytecodeAssembler.cpp +++ b/hotspot/src/share/vm/classfile/bytecodeAssembler.cpp @@ -22,6 +22,12 @@ @@ -113799,7 +113079,7 @@ index f067419f..5aa19dc8 100644 # include "bytes_sparc.hpp" #endif diff --git a/hotspot/src/share/vm/classfile/classFileStream.hpp b/hotspot/src/share/vm/classfile/classFileStream.hpp -index 9632c8c8..fad25c44 100644 +index 9632c8c8c2..fad25c44fc 100644 --- a/hotspot/src/share/vm/classfile/classFileStream.hpp +++ b/hotspot/src/share/vm/classfile/classFileStream.hpp @@ -22,6 +22,12 @@ @@ -113829,7 +113109,7 @@ index 9632c8c8..fad25c44 100644 # include "bytes_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/classfile/stackMapTable.hpp b/hotspot/src/share/vm/classfile/stackMapTable.hpp -index a36a7ba3..d7c1f086 100644 +index a36a7ba3cf..d7c1f08644 100644 --- a/hotspot/src/share/vm/classfile/stackMapTable.hpp +++ b/hotspot/src/share/vm/classfile/stackMapTable.hpp @@ -22,6 +22,12 @@ @@ -113859,7 +113139,7 @@ index a36a7ba3..d7c1f086 100644 # include "bytes_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/classfile/verifier.cpp b/hotspot/src/share/vm/classfile/verifier.cpp -index 2dddd1fd..4a20d15f 100644 +index 2dddd1fded..4a20d15f31 100644 --- a/hotspot/src/share/vm/classfile/verifier.cpp +++ b/hotspot/src/share/vm/classfile/verifier.cpp @@ -22,6 +22,12 @@ @@ -113889,7 +113169,7 @@ index 2dddd1fd..4a20d15f 100644 # include "bytes_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/code/codeBlob.cpp b/hotspot/src/share/vm/code/codeBlob.cpp -index aff2aaf0..9ba76007 100644 +index aff2aaf0ca..9ba76007cd 100644 --- a/hotspot/src/share/vm/code/codeBlob.cpp +++ b/hotspot/src/share/vm/code/codeBlob.cpp @@ -22,6 +22,12 @@ @@ -113919,7 +113199,7 @@ index aff2aaf0..9ba76007 100644 #include "c1/c1_Runtime1.hpp" #endif diff --git a/hotspot/src/share/vm/code/compiledIC.hpp b/hotspot/src/share/vm/code/compiledIC.hpp -index f910f118..e282a3f3 100644 +index f910f11886..e282a3f3af 100644 --- a/hotspot/src/share/vm/code/compiledIC.hpp +++ b/hotspot/src/share/vm/code/compiledIC.hpp @@ -22,6 +22,12 @@ @@ -113949,7 +113229,7 @@ index f910f118..e282a3f3 100644 //----------------------------------------------------------------------------- // The CompiledIC represents a compiled inline cache. diff --git a/hotspot/src/share/vm/code/relocInfo.hpp b/hotspot/src/share/vm/code/relocInfo.hpp -index ad55a2fd..81350482 100644 +index ad55a2fd93..813504821d 100644 --- a/hotspot/src/share/vm/code/relocInfo.hpp +++ b/hotspot/src/share/vm/code/relocInfo.hpp @@ -22,6 +22,12 @@ @@ -114043,7 +113323,7 @@ index ad55a2fd..81350482 100644 class virtual_call_Relocation : public CallRelocation { relocInfo::relocType type() { return relocInfo::virtual_call_type; } diff --git a/hotspot/src/share/vm/code/vmreg.hpp b/hotspot/src/share/vm/code/vmreg.hpp -index 07b595b6..5bc7131a 100644 +index 07b595b60a..5bc7131a8a 100644 --- a/hotspot/src/share/vm/code/vmreg.hpp +++ b/hotspot/src/share/vm/code/vmreg.hpp @@ -22,6 +22,12 @@ @@ -114086,7 +113366,7 @@ index 07b595b6..5bc7131a 100644 # include "vmreg_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/compiler/disassembler.cpp b/hotspot/src/share/vm/compiler/disassembler.cpp -index dfdd5f77..2dd0ff69 100644 +index dfdd5f77e7..2dd0ff69ac 100644 --- a/hotspot/src/share/vm/compiler/disassembler.cpp +++ b/hotspot/src/share/vm/compiler/disassembler.cpp @@ -22,6 +22,12 @@ @@ -114116,7 +113396,7 @@ index dfdd5f77..2dd0ff69 100644 #include "shark/sharkEntry.hpp" #endif diff --git a/hotspot/src/share/vm/compiler/disassembler.hpp b/hotspot/src/share/vm/compiler/disassembler.hpp -index 168851cc..8b632748 100644 +index 168851cc26..8b632748f2 100644 --- a/hotspot/src/share/vm/compiler/disassembler.hpp +++ b/hotspot/src/share/vm/compiler/disassembler.hpp @@ -22,6 +22,12 @@ @@ -114146,7 +113426,7 @@ index 168851cc..8b632748 100644 diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.hpp -index 733b5c91..678a1ee8 100644 +index 733b5c91ad..678a1ee836 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.hpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.hpp @@ -86,6 +86,9 @@ class CardTableExtension : public CardTableModRefBS { @@ -114160,7 +113440,7 @@ index 733b5c91..678a1ee8 100644 // Adaptive size policy support diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp -index 1dde1074..8b800b31 100644 +index 1dde10746d..8b800b31c5 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp @@ -105,6 +105,9 @@ ParMarkBitMap::mark_obj(HeapWord* addr, size_t size) @@ -114174,7 +113454,7 @@ index 1dde1074..8b800b31 100644 } return false; diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.inline.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.inline.hpp -index 6cf76353..4d34bc20 100644 +index 6cf76353d9..4d34bc209b 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.inline.hpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.inline.hpp @@ -33,6 +33,9 @@ void ParCompactionManager::push_objarray(oop obj, size_t index) @@ -114198,7 +113478,7 @@ index 6cf76353..4d34bc20 100644 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSCOMPACTIONMANAGER_INLINE_HPP diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp -index 0fa980ef..2f66493e 100644 +index 0fa980ef83..2f66493e0a 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp @@ -499,6 +499,9 @@ void ParallelCompactData::add_obj(HeapWord* addr, size_t len) @@ -114232,7 +113512,7 @@ index 0fa980ef..2f66493e 100644 const size_t end_bit = bitmap->find_obj_end(beg_bit, range_end); diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp -index 881f380c..461b8393 100644 +index 881f380cea..461b83930f 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp @@ -1329,6 +1329,9 @@ inline bool PSParallelCompact::mark_obj(oop obj) { @@ -114256,7 +113536,7 @@ index 881f380c..461b8393 100644 } } diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp -index a3313200..29101966 100644 +index a33132009c..291019660a 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp @@ -41,8 +41,9 @@ template @@ -114324,7 +113604,7 @@ index a3313200..29101966 100644 assert(o->is_forwarded(), "Sanity"); new_obj = o->forwardee(); diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.inline.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.inline.hpp -index 1a722a7c..4980be39 100644 +index 1a722a7ca7..4980be3946 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.inline.hpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.inline.hpp @@ -71,14 +71,22 @@ inline void PSScavenge::copy_and_push_safe_barrier(PSPromotionManager* pm, @@ -114367,7 +113647,7 @@ index 1a722a7c..4980be39 100644 new_obj = _pm->copy_to_survivor_space(o); } diff --git a/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp b/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp -index e14c50bf..8b386007 100644 +index e14c50bf01..8b3860070c 100644 --- a/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp +++ b/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp @@ -22,6 +22,12 @@ @@ -114395,7 +113675,7 @@ index e14c50bf..8b386007 100644 // This file contains the platform-independent parts diff --git a/hotspot/src/share/vm/interpreter/bytecode.hpp b/hotspot/src/share/vm/interpreter/bytecode.hpp -index 7e55fd00..a06dcd58 100644 +index 7e55fd009a..a06dcd58bc 100644 --- a/hotspot/src/share/vm/interpreter/bytecode.hpp +++ b/hotspot/src/share/vm/interpreter/bytecode.hpp @@ -22,6 +22,12 @@ @@ -114425,7 +113705,7 @@ index 7e55fd00..a06dcd58 100644 # include "bytes_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp -index 28843715..c17fe8d7 100644 +index 28843715c7..c17fe8d7e0 100644 --- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp +++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp @@ -22,6 +22,12 @@ @@ -114465,7 +113745,7 @@ index 28843715..c17fe8d7 100644 # include "bytecodeInterpreter_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp -index f5db0b4d..8adbf95a 100644 +index f5db0b4d9d..8adbf95acb 100644 --- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp +++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp @@ -22,6 +22,12 @@ @@ -114495,7 +113775,7 @@ index f5db0b4d..8adbf95a 100644 # include "bytecodeInterpreter_aarch64.inline.hpp" #endif diff --git a/hotspot/src/share/vm/interpreter/bytecodeStream.hpp b/hotspot/src/share/vm/interpreter/bytecodeStream.hpp -index b814b88d..e1f24216 100644 +index b814b88d5d..e1f2421600 100644 --- a/hotspot/src/share/vm/interpreter/bytecodeStream.hpp +++ b/hotspot/src/share/vm/interpreter/bytecodeStream.hpp @@ -22,6 +22,12 @@ @@ -114525,7 +113805,7 @@ index b814b88d..e1f24216 100644 # include "bytes_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/interpreter/bytecodes.cpp b/hotspot/src/share/vm/interpreter/bytecodes.cpp -index ce5632ea..7f8e8801 100644 +index ce5632ea19..7f8e880199 100644 --- a/hotspot/src/share/vm/interpreter/bytecodes.cpp +++ b/hotspot/src/share/vm/interpreter/bytecodes.cpp @@ -22,6 +22,12 @@ @@ -114555,7 +113835,7 @@ index ce5632ea..7f8e8801 100644 # include "bytes_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/interpreter/bytecodes.hpp b/hotspot/src/share/vm/interpreter/bytecodes.hpp -index c3463cd7..bdf4c487 100644 +index c3463cd76d..bdf4c487f0 100644 --- a/hotspot/src/share/vm/interpreter/bytecodes.hpp +++ b/hotspot/src/share/vm/interpreter/bytecodes.hpp @@ -22,6 +22,12 @@ @@ -114585,7 +113865,7 @@ index c3463cd7..bdf4c487 100644 # include "bytecodes_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/interpreter/cppInterpreter.hpp b/hotspot/src/share/vm/interpreter/cppInterpreter.hpp -index 6a644750..f9c540fb 100644 +index 6a6447503c..f9c540fb4a 100644 --- a/hotspot/src/share/vm/interpreter/cppInterpreter.hpp +++ b/hotspot/src/share/vm/interpreter/cppInterpreter.hpp @@ -22,6 +22,12 @@ @@ -114615,7 +113895,7 @@ index 6a644750..f9c540fb 100644 # include "cppInterpreter_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp b/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp -index 6a08a3f4..1fd19994 100644 +index 6a08a3f43f..1fd19994d7 100644 --- a/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp +++ b/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp @@ -22,6 +22,12 @@ @@ -114645,7 +113925,7 @@ index 6a08a3f4..1fd19994 100644 # include "cppInterpreterGenerator_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/interpreter/interpreter.hpp b/hotspot/src/share/vm/interpreter/interpreter.hpp -index ebfb68d3..610949f3 100644 +index ebfb68d36b..610949f3f7 100644 --- a/hotspot/src/share/vm/interpreter/interpreter.hpp +++ b/hotspot/src/share/vm/interpreter/interpreter.hpp @@ -22,6 +22,12 @@ @@ -114675,7 +113955,7 @@ index ebfb68d3..610949f3 100644 # include "interpreter_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp b/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp -index 1dc7cb29..92bbe6b4 100644 +index 1dc7cb2983..92bbe6b440 100644 --- a/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp +++ b/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp @@ -22,6 +22,12 @@ @@ -114705,7 +113985,7 @@ index 1dc7cb29..92bbe6b4 100644 # include "interpreterGenerator_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp -index cad9d290..85303e4b 100644 +index cad9d29008..85303e4b73 100644 --- a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp +++ b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp @@ -22,6 +22,12 @@ @@ -114744,7 +114024,7 @@ index cad9d290..85303e4b 100644 if (src_address == dest_address) { return; diff --git a/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp b/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp -index 472bf4d9..9a98d555 100644 +index 472bf4d94c..9a98d5559c 100644 --- a/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp +++ b/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp @@ -22,6 +22,12 @@ @@ -114783,7 +114063,7 @@ index 472bf4d9..9a98d555 100644 # include "interpreterRT_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/interpreter/templateInterpreter.hpp b/hotspot/src/share/vm/interpreter/templateInterpreter.hpp -index 5f76dca8..757860f4 100644 +index 5f76dca8a6..757860f43c 100644 --- a/hotspot/src/share/vm/interpreter/templateInterpreter.hpp +++ b/hotspot/src/share/vm/interpreter/templateInterpreter.hpp @@ -22,6 +22,12 @@ @@ -114813,7 +114093,7 @@ index 5f76dca8..757860f4 100644 # include "templateInterpreter_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp b/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp -index bd94bd02..28ca437e 100644 +index bd94bd02bc..28ca437eb2 100644 --- a/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp +++ b/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp @@ -22,6 +22,12 @@ @@ -114843,7 +114123,7 @@ index bd94bd02..28ca437e 100644 # include "templateInterpreterGenerator_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/interpreter/templateTable.hpp b/hotspot/src/share/vm/interpreter/templateTable.hpp -index 60d243c1..1b73822a 100644 +index 60d243c16a..1b73822abd 100644 --- a/hotspot/src/share/vm/interpreter/templateTable.hpp +++ b/hotspot/src/share/vm/interpreter/templateTable.hpp @@ -22,6 +22,12 @@ @@ -114882,7 +114162,7 @@ index 60d243c1..1b73822a 100644 }; diff --git a/hotspot/src/share/vm/jfr/utilities/jfrBigEndian.hpp b/hotspot/src/share/vm/jfr/utilities/jfrBigEndian.hpp -index 6d9ab39f..f4e9a4ca 100644 +index 6d9ab39fdd..f4e9a4ca69 100644 --- a/hotspot/src/share/vm/jfr/utilities/jfrBigEndian.hpp +++ b/hotspot/src/share/vm/jfr/utilities/jfrBigEndian.hpp @@ -116,7 +116,7 @@ inline T JfrBigEndian::read_unaligned(const address location) { @@ -114895,7 +114175,7 @@ index 6d9ab39f..f4e9a4ca 100644 #else #warning "Unconfigured platform" diff --git a/hotspot/src/share/vm/jfr/writers/jfrEncoders.hpp b/hotspot/src/share/vm/jfr/writers/jfrEncoders.hpp -index 42a8b719..f08f6ee1 100644 +index 42a8b719cd..f08f6ee13a 100644 --- a/hotspot/src/share/vm/jfr/writers/jfrEncoders.hpp +++ b/hotspot/src/share/vm/jfr/writers/jfrEncoders.hpp @@ -22,6 +22,12 @@ @@ -114925,7 +114205,7 @@ index 42a8b719..f08f6ee1 100644 // // The Encoding policy prescribes a template diff --git a/hotspot/src/share/vm/memory/barrierSet.hpp b/hotspot/src/share/vm/memory/barrierSet.hpp -index 13ff9b27..081b7074 100644 +index 13ff9b2738..081b70744d 100644 --- a/hotspot/src/share/vm/memory/barrierSet.hpp +++ b/hotspot/src/share/vm/memory/barrierSet.hpp @@ -27,6 +27,7 @@ @@ -114976,7 +114256,7 @@ index 13ff9b27..081b7074 100644 // at the address "start", which may not necessarily be HeapWord-aligned inline void write_ref_array(HeapWord* start, size_t count); diff --git a/hotspot/src/share/vm/memory/cardTableModRefBS.hpp b/hotspot/src/share/vm/memory/cardTableModRefBS.hpp -index 01e46888..80bd1518 100644 +index 01e4688836..80bd151873 100644 --- a/hotspot/src/share/vm/memory/cardTableModRefBS.hpp +++ b/hotspot/src/share/vm/memory/cardTableModRefBS.hpp @@ -316,6 +316,9 @@ public: @@ -115013,7 +114293,7 @@ index 01e46888..80bd1518 100644 // These are used by G1, when it uses the card table as a temporary data diff --git a/hotspot/src/share/vm/memory/cardTableRS.cpp b/hotspot/src/share/vm/memory/cardTableRS.cpp -index fb33a708..da22acba 100644 +index fb33a708ae..da22acba47 100644 --- a/hotspot/src/share/vm/memory/cardTableRS.cpp +++ b/hotspot/src/share/vm/memory/cardTableRS.cpp @@ -252,6 +252,9 @@ void ClearNoncleanCardWrapper::do_MemRegion(MemRegion mr) { @@ -115041,7 +114321,7 @@ index fb33a708..da22acba 100644 continue; } else { diff --git a/hotspot/src/share/vm/memory/cardTableRS.hpp b/hotspot/src/share/vm/memory/cardTableRS.hpp -index 25884fea..5d4e77f2 100644 +index 25884feac8..5d4e77f269 100644 --- a/hotspot/src/share/vm/memory/cardTableRS.hpp +++ b/hotspot/src/share/vm/memory/cardTableRS.hpp @@ -121,7 +121,14 @@ public: @@ -115061,7 +114341,7 @@ index 25884fea..5d4e77f2 100644 void write_ref_field_gc_work(void* field, oop new_val) { inline_write_ref_field_gc(field, new_val); diff --git a/hotspot/src/share/vm/memory/metaspace.cpp b/hotspot/src/share/vm/memory/metaspace.cpp -index fb0564ac..9cec7d43 100644 +index fb0564ac27..9cec7d4375 100644 --- a/hotspot/src/share/vm/memory/metaspace.cpp +++ b/hotspot/src/share/vm/memory/metaspace.cpp @@ -21,6 +21,13 @@ @@ -115103,7 +114383,7 @@ index fb0564ac..9cec7d43 100644 if (!metaspace_rs.is_reserved()) { #if INCLUDE_CDS diff --git a/hotspot/src/share/vm/oops/constantPool.hpp b/hotspot/src/share/vm/oops/constantPool.hpp -index 635bf6d1..18822d9f 100644 +index 635bf6d1bc..18822d9fcf 100644 --- a/hotspot/src/share/vm/oops/constantPool.hpp +++ b/hotspot/src/share/vm/oops/constantPool.hpp @@ -22,6 +22,12 @@ @@ -115134,7 +114414,7 @@ index 635bf6d1..18822d9f 100644 // A constantPool is an array containing class constants as described in the // class file. diff --git a/hotspot/src/share/vm/oops/klass.hpp b/hotspot/src/share/vm/oops/klass.hpp -index acef3348..23fc0b99 100644 +index acef334849..23fc0b9988 100644 --- a/hotspot/src/share/vm/oops/klass.hpp +++ b/hotspot/src/share/vm/oops/klass.hpp @@ -32,6 +32,9 @@ @@ -115169,7 +114449,7 @@ index acef3348..23fc0b99 100644 void accumulate_modified_oops() { if (has_modified_oops()) _accumulated_modified_oops = 1; } diff --git a/hotspot/src/share/vm/oops/oop.hpp b/hotspot/src/share/vm/oops/oop.hpp -index 0678c6b3..1cb20e35 100644 +index 0678c6b3fb..1cb20e351f 100644 --- a/hotspot/src/share/vm/oops/oop.hpp +++ b/hotspot/src/share/vm/oops/oop.hpp @@ -72,7 +72,13 @@ class oopDesc { @@ -115188,7 +114468,7 @@ index 0678c6b3..1cb20e35 100644 void release_set_mark(markOop m); markOop cas_set_mark(markOop new_mark, markOop old_mark); diff --git a/hotspot/src/share/vm/oops/oop.inline.hpp b/hotspot/src/share/vm/oops/oop.inline.hpp -index beec739d..8660c1e3 100644 +index beec739d38..8660c1e331 100644 --- a/hotspot/src/share/vm/oops/oop.inline.hpp +++ b/hotspot/src/share/vm/oops/oop.inline.hpp @@ -22,6 +22,12 @@ @@ -115218,7 +114498,7 @@ index beec739d..8660c1e3 100644 // Implementation of all inlined member functions defined in oop.hpp // We need a separate file to avoid circular references diff --git a/hotspot/src/share/vm/oops/oop.pcgc.inline.hpp b/hotspot/src/share/vm/oops/oop.pcgc.inline.hpp -index 8a460394..b28bb991 100644 +index 8a4603944e..b28bb99189 100644 --- a/hotspot/src/share/vm/oops/oop.pcgc.inline.hpp +++ b/hotspot/src/share/vm/oops/oop.pcgc.inline.hpp @@ -22,6 +22,12 @@ @@ -115244,7 +114524,7 @@ index 8a460394..b28bb991 100644 #endif // SHARE_VM_OOPS_OOP_PCGC_INLINE_HPP diff --git a/hotspot/src/share/vm/opto/buildOopMap.cpp b/hotspot/src/share/vm/opto/buildOopMap.cpp -index 91642f1d..5df185df 100644 +index 91642f1d7d..5df185df04 100644 --- a/hotspot/src/share/vm/opto/buildOopMap.cpp +++ b/hotspot/src/share/vm/opto/buildOopMap.cpp @@ -22,6 +22,12 @@ @@ -115274,7 +114554,7 @@ index 91642f1d..5df185df 100644 // The functions in this file builds OopMaps after all scheduling is done. // diff --git a/hotspot/src/share/vm/opto/bytecodeInfo.cpp b/hotspot/src/share/vm/opto/bytecodeInfo.cpp -index 7fd615d3..ad472e87 100644 +index 7fd615d35f..ad472e8722 100644 --- a/hotspot/src/share/vm/opto/bytecodeInfo.cpp +++ b/hotspot/src/share/vm/opto/bytecodeInfo.cpp @@ -361,9 +361,20 @@ bool InlineTree::try_to_inline(ciMethod* callee_method, ciMethod* caller_method, @@ -115299,7 +114579,7 @@ index 7fd615d3..ad472e87 100644 } diff --git a/hotspot/src/share/vm/opto/c2_globals.hpp b/hotspot/src/share/vm/opto/c2_globals.hpp -index 82d2efef..d373b204 100644 +index 82d2efef92..d373b20456 100644 --- a/hotspot/src/share/vm/opto/c2_globals.hpp +++ b/hotspot/src/share/vm/opto/c2_globals.hpp @@ -22,6 +22,12 @@ @@ -115329,7 +114609,7 @@ index 82d2efef..d373b204 100644 # include "c2_globals_arm.hpp" #endif diff --git a/hotspot/src/share/vm/opto/c2compiler.cpp b/hotspot/src/share/vm/opto/c2compiler.cpp -index 137f4960..f689d64a 100644 +index 137f49600d..f689d64a38 100644 --- a/hotspot/src/share/vm/opto/c2compiler.cpp +++ b/hotspot/src/share/vm/opto/c2compiler.cpp @@ -22,6 +22,12 @@ @@ -115357,7 +114637,7 @@ index 137f4960..f689d64a 100644 // register information defined by ADLC diff --git a/hotspot/src/share/vm/opto/chaitin.hpp b/hotspot/src/share/vm/opto/chaitin.hpp -index de6d443c..0b27dc93 100644 +index de6d443cd3..0b27dc9335 100644 --- a/hotspot/src/share/vm/opto/chaitin.hpp +++ b/hotspot/src/share/vm/opto/chaitin.hpp @@ -22,6 +22,12 @@ @@ -115399,7 +114679,7 @@ index de6d443c..0b27dc93 100644 void set_reg_pressure(int i) { _reg_pressure = i; } int reg_pressure() const { return _reg_pressure; } diff --git a/hotspot/src/share/vm/opto/compile.cpp b/hotspot/src/share/vm/opto/compile.cpp -index ae22ba84..9004dc0d 100644 +index ae22ba84d9..9004dc0d72 100644 --- a/hotspot/src/share/vm/opto/compile.cpp +++ b/hotspot/src/share/vm/opto/compile.cpp @@ -22,6 +22,12 @@ @@ -115427,7 +114707,7 @@ index ae22ba84..9004dc0d 100644 // -------------------- Compile::mach_constant_base_node ----------------------- diff --git a/hotspot/src/share/vm/opto/compile.hpp b/hotspot/src/share/vm/opto/compile.hpp -index b4f4cfef..d263ee2f 100644 +index b4f4cfefed..d263ee2fc4 100644 --- a/hotspot/src/share/vm/opto/compile.hpp +++ b/hotspot/src/share/vm/opto/compile.hpp @@ -1025,7 +1025,7 @@ class Compile : public Phase { @@ -115440,7 +114720,7 @@ index b4f4cfef..d263ee2f 100644 MAX_const_size = 128, MAX_stubs_size = 128 diff --git a/hotspot/src/share/vm/opto/gcm.cpp b/hotspot/src/share/vm/opto/gcm.cpp -index f51484ef..12457b7c 100644 +index f51484efb0..12457b7c34 100644 --- a/hotspot/src/share/vm/opto/gcm.cpp +++ b/hotspot/src/share/vm/opto/gcm.cpp @@ -22,6 +22,12 @@ @@ -115468,7 +114748,7 @@ index f51484ef..12457b7c 100644 diff --git a/hotspot/src/share/vm/opto/lcm.cpp b/hotspot/src/share/vm/opto/lcm.cpp -index c6178a71..2d492568 100644 +index c6178a715b..2d492568d9 100644 --- a/hotspot/src/share/vm/opto/lcm.cpp +++ b/hotspot/src/share/vm/opto/lcm.cpp @@ -22,6 +22,12 @@ @@ -115496,7 +114776,7 @@ index c6178a71..2d492568 100644 // Optimization - Graph Style diff --git a/hotspot/src/share/vm/opto/locknode.hpp b/hotspot/src/share/vm/opto/locknode.hpp -index b320f6bf..4bfb0ff0 100644 +index b320f6bfb2..4bfb0ff072 100644 --- a/hotspot/src/share/vm/opto/locknode.hpp +++ b/hotspot/src/share/vm/opto/locknode.hpp @@ -22,6 +22,12 @@ @@ -115524,7 +114804,7 @@ index b320f6bf..4bfb0ff0 100644 //------------------------------BoxLockNode------------------------------------ diff --git a/hotspot/src/share/vm/opto/matcher.cpp b/hotspot/src/share/vm/opto/matcher.cpp -index 6660b4b4..dec46861 100644 +index 6660b4b467..dec46861d3 100644 --- a/hotspot/src/share/vm/opto/matcher.cpp +++ b/hotspot/src/share/vm/opto/matcher.cpp @@ -22,6 +22,12 @@ @@ -115552,7 +114832,7 @@ index 6660b4b4..dec46861 100644 OptoReg::Name OptoReg::c_frame_pointer; diff --git a/hotspot/src/share/vm/opto/output.cpp b/hotspot/src/share/vm/opto/output.cpp -index 6032b72a..7fb4dea2 100644 +index 6032b72a9b..7fb4dea28e 100644 --- a/hotspot/src/share/vm/opto/output.cpp +++ b/hotspot/src/share/vm/opto/output.cpp @@ -22,6 +22,12 @@ @@ -115620,7 +114900,7 @@ index 6032b72a..7fb4dea2 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/hotspot/src/share/vm/opto/output.hpp b/hotspot/src/share/vm/opto/output.hpp -index ba728413..37f954de 100644 +index ba72841363..37f954de9b 100644 --- a/hotspot/src/share/vm/opto/output.hpp +++ b/hotspot/src/share/vm/opto/output.hpp @@ -22,6 +22,12 @@ @@ -115648,7 +114928,7 @@ index ba728413..37f954de 100644 class Arena; diff --git a/hotspot/src/share/vm/opto/regmask.cpp b/hotspot/src/share/vm/opto/regmask.cpp -index 352ccfb9..9a656d03 100644 +index 352ccfb9d9..9a656d03ee 100644 --- a/hotspot/src/share/vm/opto/regmask.cpp +++ b/hotspot/src/share/vm/opto/regmask.cpp @@ -22,6 +22,12 @@ @@ -115676,7 +114956,7 @@ index 352ccfb9..9a656d03 100644 #define RM_SIZE _RM_SIZE /* a constant private to the class RegMask */ diff --git a/hotspot/src/share/vm/opto/regmask.hpp b/hotspot/src/share/vm/opto/regmask.hpp -index 5ceebb3f..6d08b687 100644 +index 5ceebb3fb8..6d08b68731 100644 --- a/hotspot/src/share/vm/opto/regmask.hpp +++ b/hotspot/src/share/vm/opto/regmask.hpp @@ -22,6 +22,12 @@ @@ -115704,7 +114984,7 @@ index 5ceebb3f..6d08b687 100644 // Some fun naming (textual) substitutions: diff --git a/hotspot/src/share/vm/opto/runtime.cpp b/hotspot/src/share/vm/opto/runtime.cpp -index a43b37f2..f2bcafa2 100644 +index a43b37f2c5..f2bcafa2c5 100644 --- a/hotspot/src/share/vm/opto/runtime.cpp +++ b/hotspot/src/share/vm/opto/runtime.cpp @@ -22,6 +22,12 @@ @@ -115732,7 +115012,7 @@ index a43b37f2..f2bcafa2 100644 diff --git a/hotspot/src/share/vm/opto/type.cpp b/hotspot/src/share/vm/opto/type.cpp -index 58572f13..299d48b1 100644 +index 58572f137d..299d48b12a 100644 --- a/hotspot/src/share/vm/opto/type.cpp +++ b/hotspot/src/share/vm/opto/type.cpp @@ -22,6 +22,12 @@ @@ -115766,7 +115046,7 @@ index 58572f13..299d48b1 100644 { Bad, T_ILLEGAL, "vectors:", false, 0, relocInfo::none }, // VectorS { Bad, T_ILLEGAL, "vectord:", false, Op_RegL, relocInfo::none }, // VectorD diff --git a/hotspot/src/share/vm/prims/jniCheck.cpp b/hotspot/src/share/vm/prims/jniCheck.cpp -index 593ca8a1..82813b71 100644 +index 593ca8a1e3..82813b71fe 100644 --- a/hotspot/src/share/vm/prims/jniCheck.cpp +++ b/hotspot/src/share/vm/prims/jniCheck.cpp @@ -22,6 +22,12 @@ @@ -115796,7 +115076,7 @@ index 593ca8a1..82813b71 100644 // Complain every extra number of unplanned local refs #define CHECK_JNI_LOCAL_REF_CAP_WARN_THRESHOLD 32 diff --git a/hotspot/src/share/vm/prims/jni_md.h b/hotspot/src/share/vm/prims/jni_md.h -index 6209a664..271715d4 100644 +index 6209a66449..271715d4a2 100644 --- a/hotspot/src/share/vm/prims/jni_md.h +++ b/hotspot/src/share/vm/prims/jni_md.h @@ -22,6 +22,12 @@ @@ -115826,7 +115106,7 @@ index 6209a664..271715d4 100644 /* diff --git a/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp b/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp -index ab31d0d9..0d8570b7 100644 +index ab31d0d91e..0d8570b764 100644 --- a/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp +++ b/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp @@ -22,6 +22,12 @@ @@ -115856,7 +115136,7 @@ index ab31d0d9..0d8570b7 100644 // FIXME: fix Synthetic attribute // FIXME: per Serguei, add error return handling for ConstantPool::copy_cpool_bytes() diff --git a/hotspot/src/share/vm/prims/methodHandles.hpp b/hotspot/src/share/vm/prims/methodHandles.hpp -index db6e0618..84108285 100644 +index db6e06180d..841082859a 100644 --- a/hotspot/src/share/vm/prims/methodHandles.hpp +++ b/hotspot/src/share/vm/prims/methodHandles.hpp @@ -22,6 +22,12 @@ @@ -115887,7 +115167,7 @@ index db6e0618..84108285 100644 // Tracing static void trace_method_handle(MacroAssembler* _masm, const char* adaptername) PRODUCT_RETURN; diff --git a/hotspot/src/share/vm/runtime/atomic.inline.hpp b/hotspot/src/share/vm/runtime/atomic.inline.hpp -index 222f29cb..7c7c6edb 100644 +index 222f29cbf4..7c7c6edb27 100644 --- a/hotspot/src/share/vm/runtime/atomic.inline.hpp +++ b/hotspot/src/share/vm/runtime/atomic.inline.hpp @@ -22,6 +22,12 @@ @@ -115917,7 +115197,7 @@ index 222f29cb..7c7c6edb 100644 # include "atomic_linux_sparc.inline.hpp" #endif diff --git a/hotspot/src/share/vm/runtime/deoptimization.cpp b/hotspot/src/share/vm/runtime/deoptimization.cpp -index f91afdc4..36a924fd 100644 +index f91afdc416..36a924fd4f 100644 --- a/hotspot/src/share/vm/runtime/deoptimization.cpp +++ b/hotspot/src/share/vm/runtime/deoptimization.cpp @@ -22,6 +22,12 @@ @@ -115960,7 +115240,7 @@ index f91afdc4..36a924fd 100644 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC diff --git a/hotspot/src/share/vm/runtime/dtraceJSDT.hpp b/hotspot/src/share/vm/runtime/dtraceJSDT.hpp -index db568def..490c5f5a 100644 +index db568def34..490c5f5a4e 100644 --- a/hotspot/src/share/vm/runtime/dtraceJSDT.hpp +++ b/hotspot/src/share/vm/runtime/dtraceJSDT.hpp @@ -22,6 +22,12 @@ @@ -115990,7 +115270,7 @@ index db568def..490c5f5a 100644 class RegisteredProbes; typedef jlong OpaqueProbes; diff --git a/hotspot/src/share/vm/runtime/frame.cpp b/hotspot/src/share/vm/runtime/frame.cpp -index 338b7ad3..5a161133 100644 +index 338b7ad3a7..5a161133ba 100644 --- a/hotspot/src/share/vm/runtime/frame.cpp +++ b/hotspot/src/share/vm/runtime/frame.cpp @@ -22,6 +22,12 @@ @@ -116021,7 +115301,7 @@ index 338b7ad3..5a161133 100644 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC diff --git a/hotspot/src/share/vm/runtime/frame.hpp b/hotspot/src/share/vm/runtime/frame.hpp -index 2d80ecc2..4a9e6edb 100644 +index 2d80ecc208..4a9e6edb54 100644 --- a/hotspot/src/share/vm/runtime/frame.hpp +++ b/hotspot/src/share/vm/runtime/frame.hpp @@ -22,6 +22,12 @@ @@ -116062,7 +115342,7 @@ index 2d80ecc2..4a9e6edb 100644 # include "frame_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/runtime/frame.inline.hpp b/hotspot/src/share/vm/runtime/frame.inline.hpp -index 710b8230..704cc8df 100644 +index 710b82306a..704cc8df8f 100644 --- a/hotspot/src/share/vm/runtime/frame.inline.hpp +++ b/hotspot/src/share/vm/runtime/frame.inline.hpp @@ -22,6 +22,12 @@ @@ -116105,7 +115385,7 @@ index 710b8230..704cc8df 100644 #endif // SHARE_VM_RUNTIME_FRAME_INLINE_HPP diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp -index 23ce8af5..f36137aa 100644 +index 23ce8af569..f36137aabf 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp @@ -55,6 +55,12 @@ @@ -116170,7 +115450,7 @@ index 23ce8af5..f36137aa 100644 \ product(uintx, OldSize, ScaleForWordSize(4*M), \ diff --git a/hotspot/src/share/vm/runtime/icache.hpp b/hotspot/src/share/vm/runtime/icache.hpp -index ba81a06f..9c0cfdb7 100644 +index ba81a06ff5..9c0cfdb7d7 100644 --- a/hotspot/src/share/vm/runtime/icache.hpp +++ b/hotspot/src/share/vm/runtime/icache.hpp @@ -22,6 +22,12 @@ @@ -116201,7 +115481,7 @@ index ba81a06f..9c0cfdb7 100644 class ICacheStubGenerator : public StubCodeGenerator { diff --git a/hotspot/src/share/vm/runtime/java.cpp b/hotspot/src/share/vm/runtime/java.cpp -index 0a263b01..9ba0deca 100644 +index 0a263b017c..9ba0decaae 100644 --- a/hotspot/src/share/vm/runtime/java.cpp +++ b/hotspot/src/share/vm/runtime/java.cpp @@ -22,6 +22,12 @@ @@ -116231,7 +115511,7 @@ index 0a263b01..9ba0deca 100644 #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp" #include "gc_implementation/parallelScavenge/psScavenge.hpp" diff --git a/hotspot/src/share/vm/runtime/javaCalls.hpp b/hotspot/src/share/vm/runtime/javaCalls.hpp -index 6126bbe7..1747e2b2 100644 +index 6126bbe75e..1747e2b2ee 100644 --- a/hotspot/src/share/vm/runtime/javaCalls.hpp +++ b/hotspot/src/share/vm/runtime/javaCalls.hpp @@ -22,6 +22,12 @@ @@ -116261,7 +115541,7 @@ index 6126bbe7..1747e2b2 100644 // A JavaCallWrapper is constructed before each JavaCall and destructed after the call. // Its purpose is to allocate/deallocate a new handle block and to save/restore the last diff --git a/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp b/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp -index 129a01e2..c2b1b2e6 100644 +index 129a01e293..c2b1b2e6c3 100644 --- a/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp +++ b/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp @@ -22,6 +22,12 @@ @@ -116291,7 +115571,7 @@ index 129a01e2..c2b1b2e6 100644 # include "javaFrameAnchor_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/runtime/os.cpp b/hotspot/src/share/vm/runtime/os.cpp -index 96eed036..28c78409 100644 +index 96eed03670..28c78409e7 100644 --- a/hotspot/src/share/vm/runtime/os.cpp +++ b/hotspot/src/share/vm/runtime/os.cpp @@ -1122,7 +1122,8 @@ bool os::is_first_C_frame(frame* fr) { @@ -116305,7 +115585,7 @@ index 96eed036..28c78409 100644 // stack grows downwards; if old_fp is below current fp or if the stack // frame is too large, either the stack is corrupted or fp is not saved diff --git a/hotspot/src/share/vm/runtime/os.hpp b/hotspot/src/share/vm/runtime/os.hpp -index 836c231b..0ca6e645 100644 +index 836c231b03..0ca6e64598 100644 --- a/hotspot/src/share/vm/runtime/os.hpp +++ b/hotspot/src/share/vm/runtime/os.hpp @@ -22,6 +22,12 @@ @@ -116335,7 +115615,7 @@ index 836c231b..0ca6e645 100644 # include "os_linux_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/runtime/prefetch.inline.hpp b/hotspot/src/share/vm/runtime/prefetch.inline.hpp -index f4e30de3..fec16f84 100644 +index f4e30de34d..fec16f842c 100644 --- a/hotspot/src/share/vm/runtime/prefetch.inline.hpp +++ b/hotspot/src/share/vm/runtime/prefetch.inline.hpp @@ -46,6 +46,12 @@ @@ -116352,7 +115632,7 @@ index f4e30de3..fec16f84 100644 // Solaris #ifdef TARGET_OS_ARCH_solaris_x86 diff --git a/hotspot/src/share/vm/runtime/registerMap.hpp b/hotspot/src/share/vm/runtime/registerMap.hpp -index 67ef212d..1e26dfcb 100644 +index 67ef212d65..1e26dfcba4 100644 --- a/hotspot/src/share/vm/runtime/registerMap.hpp +++ b/hotspot/src/share/vm/runtime/registerMap.hpp @@ -22,6 +22,12 @@ @@ -116395,7 +115675,7 @@ index 67ef212d..1e26dfcb 100644 }; diff --git a/hotspot/src/share/vm/runtime/relocator.hpp b/hotspot/src/share/vm/runtime/relocator.hpp -index bb19c75f..53f3c9f6 100644 +index bb19c75fe6..53f3c9f6bd 100644 --- a/hotspot/src/share/vm/runtime/relocator.hpp +++ b/hotspot/src/share/vm/runtime/relocator.hpp @@ -22,6 +22,12 @@ @@ -116425,7 +115705,7 @@ index bb19c75f..53f3c9f6 100644 // This code has been converted from the 1.1E java virtual machine // Thanks to the JavaTopics group for using the code diff --git a/hotspot/src/share/vm/runtime/safepoint.cpp b/hotspot/src/share/vm/runtime/safepoint.cpp -index 440617c8..be0e4dd1 100644 +index 440617c802..be0e4dd13c 100644 --- a/hotspot/src/share/vm/runtime/safepoint.cpp +++ b/hotspot/src/share/vm/runtime/safepoint.cpp @@ -22,6 +22,12 @@ @@ -116457,7 +115737,7 @@ index 440617c8..be0e4dd1 100644 #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp" #include "gc_implementation/shared/suspendibleThreadSet.hpp" diff --git a/hotspot/src/share/vm/runtime/sharedRuntime.cpp b/hotspot/src/share/vm/runtime/sharedRuntime.cpp -index 5f540247..abcd6066 100644 +index 5f540247f9..abcd6066b9 100644 --- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp +++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp @@ -22,6 +22,12 @@ @@ -116498,7 +115778,7 @@ index 5f540247..abcd6066 100644 // G1 write-barrier pre: executed before a pointer store. diff --git a/hotspot/src/share/vm/runtime/sharedRuntimeTrig.cpp b/hotspot/src/share/vm/runtime/sharedRuntimeTrig.cpp -index 37880d8a..3987880b 100644 +index 37880d8a5c..3987880b16 100644 --- a/hotspot/src/share/vm/runtime/sharedRuntimeTrig.cpp +++ b/hotspot/src/share/vm/runtime/sharedRuntimeTrig.cpp @@ -22,6 +22,12 @@ @@ -116531,7 +115811,7 @@ index 37880d8a..3987880b 100644 static const double S1 = -1.66666666666666324348e-01, /* 0xBFC55555, 0x55555549 */ diff --git a/hotspot/src/share/vm/runtime/stackValueCollection.cpp b/hotspot/src/share/vm/runtime/stackValueCollection.cpp -index 87747683..fe81c1bf 100644 +index 8774768311..fe81c1bfd8 100644 --- a/hotspot/src/share/vm/runtime/stackValueCollection.cpp +++ b/hotspot/src/share/vm/runtime/stackValueCollection.cpp @@ -22,6 +22,12 @@ @@ -116561,7 +115841,7 @@ index 87747683..fe81c1bf 100644 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC diff --git a/hotspot/src/share/vm/runtime/statSampler.cpp b/hotspot/src/share/vm/runtime/statSampler.cpp -index 41f46962..3b430890 100644 +index 41f469622f..3b43089062 100644 --- a/hotspot/src/share/vm/runtime/statSampler.cpp +++ b/hotspot/src/share/vm/runtime/statSampler.cpp @@ -22,6 +22,12 @@ @@ -116591,7 +115871,7 @@ index 41f46962..3b430890 100644 // -------------------------------------------------------- // StatSamplerTask diff --git a/hotspot/src/share/vm/runtime/stubRoutines.hpp b/hotspot/src/share/vm/runtime/stubRoutines.hpp -index e18b9127..9bf93376 100644 +index e18b9127df..9bf933762a 100644 --- a/hotspot/src/share/vm/runtime/stubRoutines.hpp +++ b/hotspot/src/share/vm/runtime/stubRoutines.hpp @@ -22,6 +22,12 @@ @@ -116632,7 +115912,7 @@ index e18b9127..9bf93376 100644 static jint _verify_oop_count; diff --git a/hotspot/src/share/vm/runtime/thread.cpp b/hotspot/src/share/vm/runtime/thread.cpp -index e6586c40..3db678ff 100644 +index e6586c40cb..3db678ff48 100644 --- a/hotspot/src/share/vm/runtime/thread.cpp +++ b/hotspot/src/share/vm/runtime/thread.cpp @@ -22,6 +22,12 @@ @@ -116649,7 +115929,7 @@ index e6586c40..3db678ff 100644 #include "classfile/classLoader.hpp" #include "classfile/javaClasses.hpp" diff --git a/hotspot/src/share/vm/runtime/thread.hpp b/hotspot/src/share/vm/runtime/thread.hpp -index 1c19ab72..aa69217e 100644 +index 1c19ab7290..aa69217eef 100644 --- a/hotspot/src/share/vm/runtime/thread.hpp +++ b/hotspot/src/share/vm/runtime/thread.hpp @@ -22,6 +22,12 @@ @@ -116679,7 +115959,7 @@ index 1c19ab72..aa69217e 100644 # include "thread_linux_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/runtime/threadLocalStorage.hpp b/hotspot/src/share/vm/runtime/threadLocalStorage.hpp -index 58c1afc8..0938b2ed 100644 +index 58c1afc810..0938b2edda 100644 --- a/hotspot/src/share/vm/runtime/threadLocalStorage.hpp +++ b/hotspot/src/share/vm/runtime/threadLocalStorage.hpp @@ -22,6 +22,12 @@ @@ -116709,7 +115989,7 @@ index 58c1afc8..0938b2ed 100644 # include "threadLS_linux_aarch64.hpp" #endif diff --git a/hotspot/src/share/vm/runtime/virtualspace.cpp b/hotspot/src/share/vm/runtime/virtualspace.cpp -index 66392b75..5ced38d8 100644 +index 66392b75f1..5ced38d838 100644 --- a/hotspot/src/share/vm/runtime/virtualspace.cpp +++ b/hotspot/src/share/vm/runtime/virtualspace.cpp @@ -1,5 +1,6 @@ @@ -116749,7 +116029,7 @@ index 66392b75..5ced38d8 100644 } else { base = os::reserve_memory(size, NULL, alignment); diff --git a/hotspot/src/share/vm/runtime/vmStructs.cpp b/hotspot/src/share/vm/runtime/vmStructs.cpp -index 32e3921b..c6cc4c43 100644 +index 32e3921b2b..c6cc4c4329 100644 --- a/hotspot/src/share/vm/runtime/vmStructs.cpp +++ b/hotspot/src/share/vm/runtime/vmStructs.cpp @@ -22,6 +22,12 @@ @@ -116803,7 +116083,7 @@ index 32e3921b..c6cc4c43 100644 #endif // COMPILER2 diff --git a/hotspot/src/share/vm/runtime/vm_version.cpp b/hotspot/src/share/vm/runtime/vm_version.cpp -index 91f9c70f..d8dcfcfc 100644 +index 91f9c70f5a..d8dcfcfcca 100644 --- a/hotspot/src/share/vm/runtime/vm_version.cpp +++ b/hotspot/src/share/vm/runtime/vm_version.cpp @@ -22,6 +22,12 @@ @@ -116848,7 +116128,7 @@ index 91f9c70f..d8dcfcfc 100644 #define CPU IA32_ONLY("x86") \ IA64_ONLY("ia64") \ diff --git a/hotspot/src/share/vm/utilities/copy.hpp b/hotspot/src/share/vm/utilities/copy.hpp -index c1d82c70..73b858b8 100644 +index c1d82c7083..73b858b86e 100644 --- a/hotspot/src/share/vm/utilities/copy.hpp +++ b/hotspot/src/share/vm/utilities/copy.hpp @@ -22,6 +22,12 @@ @@ -116879,7 +116159,7 @@ index c1d82c70..73b858b8 100644 }; diff --git a/hotspot/src/share/vm/utilities/debug.cpp b/hotspot/src/share/vm/utilities/debug.cpp -index 58a32a2b..1026585f 100644 +index 58a32a2b83..1026585f84 100644 --- a/hotspot/src/share/vm/utilities/debug.cpp +++ b/hotspot/src/share/vm/utilities/debug.cpp @@ -690,6 +690,7 @@ void help() { @@ -116891,7 +116171,7 @@ index 58a32a2b..1026585f 100644 tty->print_cr(" - in gdb do 'set overload-resolution off' before calling pns()"); tty->print_cr(" - in dbx do 'frame 1' before calling pns()"); diff --git a/hotspot/src/share/vm/utilities/globalDefinitions.hpp b/hotspot/src/share/vm/utilities/globalDefinitions.hpp -index 81866b84..61fc0c48 100644 +index 81866b8409..61fc0c48a2 100644 --- a/hotspot/src/share/vm/utilities/globalDefinitions.hpp +++ b/hotspot/src/share/vm/utilities/globalDefinitions.hpp @@ -22,6 +22,12 @@ @@ -116921,7 +116201,7 @@ index 81866b84..61fc0c48 100644 /* * If a platform does not support native stack walking diff --git a/hotspot/src/share/vm/utilities/macros.hpp b/hotspot/src/share/vm/utilities/macros.hpp -index 599e1074..41ef06e2 100644 +index 599e1074de..41ef06e27f 100644 --- a/hotspot/src/share/vm/utilities/macros.hpp +++ b/hotspot/src/share/vm/utilities/macros.hpp @@ -22,6 +22,12 @@ @@ -116969,7 +116249,7 @@ index 599e1074..41ef06e2 100644 #ifndef PPC #define PPC diff --git a/hotspot/src/share/vm/utilities/taskqueue.hpp b/hotspot/src/share/vm/utilities/taskqueue.hpp -index bc06cacc..46be35a3 100644 +index bc06caccb4..46be35a325 100644 --- a/hotspot/src/share/vm/utilities/taskqueue.hpp +++ b/hotspot/src/share/vm/utilities/taskqueue.hpp @@ -121,11 +121,22 @@ protected: @@ -117153,7 +116433,7 @@ index bc06cacc..46be35a3 100644 // before the store just above. OrderAccess::fence(); diff --git a/hotspot/src/share/vm/utilities/vmError.cpp b/hotspot/src/share/vm/utilities/vmError.cpp -index fa7a3250..7098a98a 100644 +index fa7a32508e..7098a98a9f 100644 --- a/hotspot/src/share/vm/utilities/vmError.cpp +++ b/hotspot/src/share/vm/utilities/vmError.cpp @@ -22,6 +22,13 @@ @@ -117185,7 +116465,7 @@ index fa7a3250..7098a98a 100644 Abstract_VM_Version::vm_name(), Abstract_VM_Version::vm_release(), diff --git a/hotspot/test/compiler/criticalnatives/argumentcorruption/Test8167409.sh b/hotspot/test/compiler/criticalnatives/argumentcorruption/Test8167409.sh -index fcf1d04b..5b8e7dcc 100644 +index fcf1d04b6a..5b8e7dcce5 100644 --- a/hotspot/test/compiler/criticalnatives/argumentcorruption/Test8167409.sh +++ b/hotspot/test/compiler/criticalnatives/argumentcorruption/Test8167409.sh @@ -24,6 +24,12 @@ @@ -117221,7 +116501,7 @@ index fcf1d04b..5b8e7dcc 100644 cp ${TESTSRC}${FS}*.java ${THIS_DIR} diff --git a/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForOtherCPU.java b/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForOtherCPU.java -index fa9a6f20..885957cf 100644 +index fa9a6f208b..885957cf1c 100644 --- a/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForOtherCPU.java +++ b/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForOtherCPU.java @@ -34,11 +34,12 @@ import com.oracle.java.testlibrary.cli.predicate.OrPredicate; @@ -117240,7 +116520,7 @@ index fa9a6f20..885957cf 100644 @Override diff --git a/hotspot/test/compiler/testlibrary/sha/predicate/IntrinsicPredicates.java b/hotspot/test/compiler/testlibrary/sha/predicate/IntrinsicPredicates.java -index dc8c3984..2427b2bf 100644 +index dc8c398408..2427b2bf7b 100644 --- a/hotspot/test/compiler/testlibrary/sha/predicate/IntrinsicPredicates.java +++ b/hotspot/test/compiler/testlibrary/sha/predicate/IntrinsicPredicates.java @@ -62,18 +62,24 @@ public class IntrinsicPredicates { @@ -117271,7 +116551,7 @@ index dc8c3984..2427b2bf 100644 public static final BooleanSupplier SHA512_INSTRUCTION_AVAILABLE = new OrPredicate( diff --git a/hotspot/test/runtime/6929067/Test6929067.sh b/hotspot/test/runtime/6929067/Test6929067.sh -index 2bbb3401..1a5482e6 100644 +index 2bbb3401ce..1a5482e645 100644 --- a/hotspot/test/runtime/6929067/Test6929067.sh +++ b/hotspot/test/runtime/6929067/Test6929067.sh @@ -97,6 +97,10 @@ case "$ARCH" in @@ -117286,19 +116566,10 @@ index 2bbb3401..1a5482e6 100644 esac diff --git a/hotspot/test/runtime/Unsafe/RangeCheck.java b/hotspot/test/runtime/Unsafe/RangeCheck.java -index 9ded944c..0c8bcfb9 100644 +index 9ded944cb2..4d4ea2e048 100644 --- a/hotspot/test/runtime/Unsafe/RangeCheck.java +++ b/hotspot/test/runtime/Unsafe/RangeCheck.java -@@ -28,6 +28,8 @@ - * @library /testlibrary - */ - -+import org.jcp.xml.dsig.internal.dom.Utils; -+ - import com.oracle.java.testlibrary.*; - import sun.misc.Unsafe; - -@@ -43,6 +45,7 @@ public class RangeCheck { +@@ -43,6 +43,7 @@ public class RangeCheck { true, "-Xmx32m", "-XX:-TransmitErrorReport", @@ -117307,7 +116578,7 @@ index 9ded944c..0c8bcfb9 100644 OutputAnalyzer output = new OutputAnalyzer(pb.start()); diff --git a/hotspot/test/test_env.sh b/hotspot/test/test_env.sh -index 5ba4f28c..d9d8bb6b 100644 +index 5ba4f28c45..d9d8bb6b6b 100644 --- a/hotspot/test/test_env.sh +++ b/hotspot/test/test_env.sh @@ -211,6 +211,29 @@ if [ $? = 0 ] @@ -117341,7 +116612,7 @@ index 5ba4f28c..d9d8bb6b 100644 echo "VM_TYPE=${VM_TYPE}" echo "VM_BITS=${VM_BITS}" diff --git a/hotspot/test/testlibrary/com/oracle/java/testlibrary/Platform.java b/hotspot/test/testlibrary/com/oracle/java/testlibrary/Platform.java -index 6a140793..56a6375b 100644 +index 6a14079347..56a6375b5f 100644 --- a/hotspot/test/testlibrary/com/oracle/java/testlibrary/Platform.java +++ b/hotspot/test/testlibrary/com/oracle/java/testlibrary/Platform.java @@ -126,6 +126,10 @@ public class Platform { @@ -117367,7 +116638,7 @@ index 6a140793..56a6375b 100644 * Return a boolean for whether we expect to be able to attach * the SA to our own processes on this system. diff --git a/hotspot/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java b/hotspot/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java -index 7d56a4a3..41825e18 100644 +index 7d56a4a3bc..41825e18b3 100644 --- a/hotspot/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java +++ b/hotspot/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java @@ -43,7 +43,7 @@ import java.util.Set; @@ -117380,7 +116651,7 @@ index 7d56a4a3..41825e18 100644 OS("isAix", "isLinux", "isSolaris", "isWindows", "isOSX"), VM_TYPE("isClient", "isServer", "isGraal", "isMinimal"), diff --git a/jdk/make/Images.gmk b/jdk/make/Images.gmk -index 991c0af7..91716856 100644 +index 991c0af7b4..9171685655 100644 --- a/jdk/make/Images.gmk +++ b/jdk/make/Images.gmk @@ -23,6 +23,12 @@ @@ -117432,7 +116703,7 @@ index 991c0af7..91716856 100644 jre-overlay-image: $(JRE_OVERLAY_BIN_TARGETS) $(JRE_OVERLAY_LIB_TARGETS) \ diff --git a/jdk/make/gensrc/GensrcMisc.gmk b/jdk/make/gensrc/GensrcMisc.gmk -index 0e3dee5c..d428ac8c 100644 +index 0e3dee5ca3..66f19f4d25 100644 --- a/jdk/make/gensrc/GensrcMisc.gmk +++ b/jdk/make/gensrc/GensrcMisc.gmk @@ -23,6 +23,12 @@ @@ -117448,29 +116719,16 @@ index 0e3dee5c..d428ac8c 100644 include ProfileNames.gmk ################################################################################ -@@ -30,6 +36,11 @@ include ProfileNames.gmk - # string and the runtime name into the Version.java file. - # To be printed by java -version - -+company_name = -+ifneq ($(COMPANY_NAME),N/A) -+ company_name=($(COMPANY_NAME)) -+endif -+ - $(JDK_OUTPUTDIR)/gensrc/sun/misc/Version.java \ - $(PROFILE_VERSION_JAVA_TARGETS): \ - $(JDK_TOPDIR)/src/share/classes/sun/misc/Version.java.template -@@ -41,6 +52,8 @@ $(PROFILE_VERSION_JAVA_TARGETS): \ +@@ -39,6 +45,7 @@ $(PROFILE_VERSION_JAVA_TARGETS): \ + $(SED) -e 's/@@launcher_name@@/$(LAUNCHER_NAME)/g' \ + -e 's/@@java_version@@/$(RELEASE)/g' \ -e 's/@@java_runtime_version@@/$(FULL_VERSION)/g' \ ++ -e 's/@@loongson_runtime_name@@/$(LOONGSON_RUNTIME_NAME)/g' \ -e 's/@@java_runtime_name@@/$(RUNTIME_NAME)/g' \ -e 's/@@java_profile_name@@/$(call profile_version_name, $@)/g' \ -+ -e 's/@@company_name@@/$(company_name)/g' \ -+ -e 's/@@loongson_runtime_name@@/$(LOONGSON_RUNTIME_NAME)/g' \ $< > $@.tmp - $(MV) $@.tmp $@ - diff --git a/jdk/make/lib/SoundLibraries.gmk b/jdk/make/lib/SoundLibraries.gmk -index b59a9462..8ce97dc8 100644 +index b59a9462ec..8ce97dc854 100644 --- a/jdk/make/lib/SoundLibraries.gmk +++ b/jdk/make/lib/SoundLibraries.gmk @@ -23,6 +23,12 @@ @@ -117502,7 +116760,7 @@ index b59a9462..8ce97dc8 100644 LIBJSOUND_CFLAGS += -DX_ARCH=X_PPC64 endif diff --git a/jdk/src/share/classes/sun/misc/Version.java.template b/jdk/src/share/classes/sun/misc/Version.java.template -index 32e2586e..16b43a39 100644 +index 32e2586e79..e38541a9f7 100644 --- a/jdk/src/share/classes/sun/misc/Version.java.template +++ b/jdk/src/share/classes/sun/misc/Version.java.template @@ -23,6 +23,13 @@ @@ -117519,26 +116777,22 @@ index 32e2586e..16b43a39 100644 package sun.misc; import java.io.PrintStream; -@@ -43,6 +50,12 @@ public class Version { - +@@ -44,6 +51,9 @@ public class Version { private static final String java_runtime_version = "@@java_runtime_version@@"; -+ -+ private static final String company_name = -+ "@@company_name@@"; -+ + + private static final String loongson_runtime_name = + "@@loongson_runtime_name@@"; - ++ static { init(); -@@ -103,7 +116,12 @@ public class Version { + } +@@ -103,7 +113,11 @@ public class Version { /* Second line: runtime version (ie, libraries). */ - ps.print(java_runtime_name + " (build " + java_runtime_version); -+ ps.print(java_runtime_name + " "); -+ ++ ps.print(java_runtime_name); + if (loongson_runtime_name.length() > 0) { + ps.print(" ("+ loongson_runtime_name +")"); + } @@ -117546,18 +116800,9 @@ index 32e2586e..16b43a39 100644 if (java_profile_name.length() > 0) { // profile name -@@ -120,7 +138,7 @@ public class Version { - String java_vm_name = System.getProperty("java.vm.name"); - String java_vm_version = System.getProperty("java.vm.version"); - String java_vm_info = System.getProperty("java.vm.info"); -- ps.println(java_vm_name + " (build " + java_vm_version + ", " + -+ ps.println(java_vm_name + " " + company_name + " " + "(build " + java_vm_version + ", " + - java_vm_info + ")"); - } - diff --git a/jdk/src/solaris/bin/loongarch64/jvm.cfg b/jdk/src/solaris/bin/loongarch64/jvm.cfg new file mode 100644 -index 00000000..42a06755 +index 0000000000..42a06755da --- /dev/null +++ b/jdk/src/solaris/bin/loongarch64/jvm.cfg @@ -0,0 +1,36 @@ @@ -117599,7 +116844,7 @@ index 00000000..42a06755 +-client IGNORE diff --git a/jdk/src/solaris/bin/mips64/jvm.cfg b/jdk/src/solaris/bin/mips64/jvm.cfg new file mode 100644 -index 00000000..42a06755 +index 0000000000..42a06755da --- /dev/null +++ b/jdk/src/solaris/bin/mips64/jvm.cfg @@ -0,0 +1,36 @@ @@ -117640,7 +116885,7 @@ index 00000000..42a06755 +-server KNOWN +-client IGNORE diff --git a/jdk/test/jdk/jfr/event/os/TestCPUInformation.java b/jdk/test/jdk/jfr/event/os/TestCPUInformation.java -index 17c8419c..a8b76cb7 100644 +index 17c8419cbc..a8b76cb71a 100644 --- a/jdk/test/jdk/jfr/event/os/TestCPUInformation.java +++ b/jdk/test/jdk/jfr/event/os/TestCPUInformation.java @@ -54,8 +54,8 @@ public class TestCPUInformation { @@ -117655,13 +116900,15 @@ index 17c8419c..a8b76cb7 100644 } } diff --git a/jdk/test/sun/management/jmxremote/bootstrap/linux-loongarch64/launcher b/jdk/test/sun/management/jmxremote/bootstrap/linux-loongarch64/launcher -new file mode 100644 -index 00000000..e69de29b +new file mode 100755 +index 0000000000..66291c7522 +Binary files /dev/null and b/jdk/test/sun/management/jmxremote/bootstrap/linux-loongarch64/launcher differ diff --git a/jdk/test/sun/management/jmxremote/bootstrap/linux-mips64el/launcher b/jdk/test/sun/management/jmxremote/bootstrap/linux-mips64el/launcher new file mode 100644 -index 00000000..e69de29b +index 0000000000..5c8385ca12 +Binary files /dev/null and b/jdk/test/sun/management/jmxremote/bootstrap/linux-mips64el/launcher differ diff --git a/jdk/test/sun/security/pkcs11/PKCS11Test.java b/jdk/test/sun/security/pkcs11/PKCS11Test.java -index 5fc9c605..9db6a17d 100644 +index 5fc9c605de..9db6a17d66 100644 --- a/jdk/test/sun/security/pkcs11/PKCS11Test.java +++ b/jdk/test/sun/security/pkcs11/PKCS11Test.java @@ -21,6 +21,11 @@ @@ -117686,6 +116933,3 @@ index 5fc9c605..9db6a17d 100644 osMap.put("Windows-x86-32", new String[]{ PKCS11_BASE + "/nss/lib/windows-i586/".replace('/', SEP)}); osMap.put("Windows-amd64-64", new String[]{ --- -2.33.0 - diff --git a/add-Fix-aarch64-runtime-thread-signal-transfer-bug.patch b/add-Fix-aarch64-runtime-thread-signal-transfer-bug.patch index 8e17274c4597f408163f946040cd684224ad93f1..5adaf4b3e15f28e0b7aad3d6fd97d7e149493a0f 100644 --- a/add-Fix-aarch64-runtime-thread-signal-transfer-bug.patch +++ b/add-Fix-aarch64-runtime-thread-signal-transfer-bug.patch @@ -1,16 +1,82 @@ -From c4fd69c76c41b7b6168f1071d50143566f7d269e Mon Sep 17 00:00:00 2001 +From c4fd69c76c41b7b6168f1071d50143566f7d269e Date: Fri, 22 Sep 2023 14:48:33 +0800 Subject: [PATCH] add Fix-aarch64-runtime-thread-signal-transfer-bug --- - .../src/cpu/aarch64/vm/vm_version_aarch64.hpp | 7 ++ - hotspot/src/os/linux/vm/os_linux.cpp | 3 + - .../linux_aarch64/vm/thread_linux_aarch64.cpp | 69 +++++++++++++++++++ - .../linux_aarch64/vm/thread_linux_aarch64.hpp | 2 + - 4 files changed, 82 insertions(+), 5 deletions(-) + .../src/cpu/aarch64/vm/vm_version_aarch64.cpp | 47 +++++---- + .../src/cpu/aarch64/vm/vm_version_aarch64.hpp | 8 ++ + hotspot/src/os/linux/vm/os_linux.cpp | 7 ++ + .../linux_aarch64/vm/thread_linux_aarch64.cpp | 97 +++++++++++++++++++ + .../linux_aarch64/vm/thread_linux_aarch64.hpp | 3 + + 5 files changed, 141 insertions(+), 21 deletions(-) + +diff --git a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp +index 27ab00dd..839df4a3 100644 +--- a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp ++++ b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp +@@ -169,27 +169,7 @@ void VM_Version::get_processor_features() { + _features_str = strdup(buf); + _cpuFeatures = auxv; + +- int cpu_lines = 0; +- if (FILE *f = fopen("/proc/cpuinfo", "r")) { +- char buf[128], *p; +- while (fgets(buf, sizeof (buf), f) != NULL) { +- if ((p = strchr(buf, ':')) != NULL) { +- long v = strtol(p+1, NULL, 0); +- if (strncmp(buf, "CPU implementer", sizeof "CPU implementer" - 1) == 0) { +- _cpu = v; +- cpu_lines++; +- } else if (strncmp(buf, "CPU variant", sizeof "CPU variant" - 1) == 0) { +- _variant = v; +- } else if (strncmp(buf, "CPU part", sizeof "CPU part" - 1) == 0) { +- if (_model != v) _model2 = _model; +- _model = v; +- } else if (strncmp(buf, "CPU revision", sizeof "CPU revision" - 1) == 0) { +- _revision = v; +- } +- } +- } +- fclose(f); +- } ++ int cpu_lines = get_cpu_model(); + + // Enable vendor specific features + if (_cpu == CPU_CAVIUM) { +@@ -346,6 +326,31 @@ void VM_Version::get_processor_features() { + #endif + } + ++int VM_Version::get_cpu_model() { ++ int cpu_lines = 0; ++ if (FILE *f = fopen("/proc/cpuinfo", "r")) { ++ char buf[128], *p; ++ while (fgets(buf, sizeof (buf), f) != NULL) { ++ if ((p = strchr(buf, ':')) != NULL) { ++ long v = strtol(p+1, NULL, 0); ++ if (strncmp(buf, "CPU implementer", sizeof "CPU implementer" - 1) == 0) { ++ _cpu = v; ++ cpu_lines++; ++ } else if (strncmp(buf, "CPU variant", sizeof "CPU variant" - 1) == 0) { ++ _variant = v; ++ } else if (strncmp(buf, "CPU part", sizeof "CPU part" - 1) == 0) { ++ if (_model != v) _model2 = _model; ++ _model = v; ++ } else if (strncmp(buf, "CPU revision", sizeof "CPU revision" - 1) == 0) { ++ _revision = v; ++ } ++ } ++ } ++ fclose(f); ++ } ++ return cpu_lines; ++} ++ + void VM_Version::initialize() { + ResourceMark rm; diff --git a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.hpp b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.hpp -index 7f3a53262..9dfc3465e 100644 +index 7f3a5326..47353df9 100644 --- a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.hpp +++ b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.hpp @@ -63,6 +63,7 @@ public: @@ -21,7 +87,14 @@ index 7f3a53262..9dfc3465e 100644 CPU_INFINEON = 'I', CPU_MOTOROLA = 'M', CPU_NVIDIA = 'N', -@@ -93,6 +94,12 @@ public: +@@ -87,12 +88,19 @@ public: + CPU_DMB_ATOMICS = (1 << 31), + } cpuFeatureFlags; + ++ static int get_cpu_model(); + static const char* cpu_features() { return _features_str; } + static int cpu_family() { return _cpu; } + static int cpu_model() { return _model; } static int cpu_variant() { return _variant; } static int cpu_revision() { return _revision; } static int cpu_cpuFeatures() { return _cpuFeatures; } @@ -35,10 +108,21 @@ index 7f3a53262..9dfc3465e 100644 static ByteSize ctr_el0_offset() { return byte_offset_of(PsrInfo, ctr_el0); } static bool is_zva_enabled() { diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp -index 197b5c193..3ed8cde6b 100644 +index 2dde2587..647ef582 100644 --- a/hotspot/src/os/linux/vm/os_linux.cpp +++ b/hotspot/src/os/linux/vm/os_linux.cpp -@@ -5754,6 +5754,9 @@ void os::set_native_thread_name(const char *name) { +@@ -5576,6 +5576,10 @@ jint os::init_2(void) + Linux::is_floating_stack() ? "floating stack" : "fixed stack"); + } + ++#ifdef AARCH64 ++ JavaThread::os_linux_aarch64_options(active_processor_count(), argv_for_execvp); ++#endif ++ + if (UseNUMA) { + if (!Linux::libnuma_init()) { + UseNUMA = false; +@@ -5760,6 +5764,9 @@ void os::set_native_thread_name(const char *name) { const int rc = Linux::_pthread_setname_np(pthread_self(), buf); // ERANGE should not happen; all other errors should just be ignored. assert(rc != ERANGE, "pthread_setname_np failed"); @@ -49,7 +133,7 @@ index 197b5c193..3ed8cde6b 100644 } diff --git a/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.cpp b/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.cpp -index 87e42318a..bc4b03561 100644 +index 87e42318..8b0e2c98 100644 --- a/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.cpp +++ b/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.cpp @@ -25,6 +25,7 @@ @@ -60,7 +144,7 @@ index 87e42318a..bc4b03561 100644 // For Forte Analyzer AsyncGetCallTrace profiling support - thread is // currently interrupted by SIGPROF -@@ -39,6 +40,74 @@ bool JavaThread::pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext, +@@ -39,6 +40,102 @@ bool JavaThread::pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext, return pd_get_top_frame(fr_addr, ucontext, isInJava); } @@ -131,23 +215,52 @@ index 87e42318a..bc4b03561 100644 + } + } +} ++ ++void JavaThread::os_linux_aarch64_options(int apc, char **name) { ++ if (name == NULL) { ++ return; ++ } ++ VM_Version::get_cpu_model(); ++ if (VM_Version::is_hisi_enabled()) { ++ int i = 0; ++ int step = 0; ++ while (name[i] != NULL) { ++ if (stringHash(name[i]) == 1396789436) { ++ if (FLAG_IS_DEFAULT(ActiveProcessorCount) && (UseG1GC || UseParallelGC) && apc > 8) ++ FLAG_SET_DEFAULT(ActiveProcessorCount, 8); ++ break; ++ } else if (stringHash(name[i]) == 1594786418) { ++ step = 1; ++ } else if (step == 1 && stringHash(name[i]) == 237006690) { ++ if (name[i+1] != NULL) { ++ int cores = atoi(name[i+1]); ++ if (FLAG_IS_DEFAULT(ActiveProcessorCount) && cores > 0) ++ FLAG_SET_DEFAULT(ActiveProcessorCount, cores); ++ } ++ break; ++ } ++ i++; ++ } ++ } ++} + bool JavaThread::pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava) { assert(this->is_Java_thread(), "must be JavaThread"); JavaThread* jt = (JavaThread *)this; diff --git a/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.hpp b/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.hpp -index a2f0135c2..251e523df 100644 +index a2f0135c..f14ace0d 100644 --- a/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.hpp +++ b/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.hpp -@@ -66,6 +66,8 @@ +@@ -66,6 +66,9 @@ bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava); + void os_linux_aarch64_options(const char *name); ++ static void os_linux_aarch64_options(int apc, char **name); + bool pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext, bool isInJava); private: bool pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava); -- -2.22.0 +2.19.1 diff --git a/add-safe-compilation-flags.patch b/add-safe-compilation-flags.patch index ccd57a663bffc015999a8ec329536871ffc64114..bf61aca88aea52986c7822813f650d9323c6f446 100644 --- a/add-safe-compilation-flags.patch +++ b/add-safe-compilation-flags.patch @@ -48,8 +48,8 @@ index f3581c163..a405eb336 100644 # improving the quality of crash log stack traces involving jvm.dll. # These are always used in all compiles --CXX_FLAGS=$(EXTRA_CFLAGS) /nologo /W3 /WX -+CXX_FLAGS=$(EXTRA_CFLAGS) /nologo /W3 /WX /GS +-CXX_FLAGS=$(EXTRA_CFLAGS) /nologo /W3 /WX /wd4800 ++CXX_FLAGS=$(EXTRA_CFLAGS) /nologo /W3 /WX /wd4800 /GS # Let's add debug information when Full Debug Symbols is enabled !if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1" diff --git a/fix-log-bug-enhance-aes-hmac-performance.patch b/fix-log-bug-enhance-aes-hmac-performance.patch index c4110a17189c104a70107927ecc75b781e52fa47..a859556836293730380f8df8f4dea0a13aa9427d 100644 --- a/fix-log-bug-enhance-aes-hmac-performance.patch +++ b/fix-log-bug-enhance-aes-hmac-performance.patch @@ -149,7 +149,7 @@ index a405eb336..e5aed4418 100644 @@ -54,6 +54,9 @@ CXX=cl.exe # These are always used in all compiles - CXX_FLAGS=$(EXTRA_CFLAGS) /nologo /W3 /WX /GS + CXX_FLAGS=$(EXTRA_CFLAGS) /nologo /W3 /WX /wd4800 /GS +!if "$(MSC_VER)" > "1910" +CXX_FLAGS=$(EXTRA_CFLAGS) /nologo /W3 /GS /arch:IA32 +!endif diff --git a/fix_X509TrustManagerImpl_symantec_distrust.patch b/fix_X509TrustManagerImpl_symantec_distrust.patch index 65eeab574e11fab612e15f7535da3be6218528fa..777cba018c375417c2a84ce8dc20f495af652f24 100644 --- a/fix_X509TrustManagerImpl_symantec_distrust.patch +++ b/fix_X509TrustManagerImpl_symantec_distrust.patch @@ -40,13 +40,13 @@ index 54e1bfa0d..c1423dc5b 100644 // The numbers of certs now. - private static final int COUNT = 83; -+ private static final int COUNT = 102; ++ private static final int COUNT = 104; // SHA-256 of cacerts, can be generated with // shasum -a 256 cacerts | sed -e 's/../&:/g' | tr '[:lower:]' '[:upper:]' | cut -c1-95 private static final String CHECKSUM - = "2D:04:88:6C:52:53:54:EB:38:2D:BC:E0:AF:B7:82:F4:9E:32:A8:1A:1B:A3:AE:CF:25:CB:C2:F6:0F:4E:E1:20"; -+ = "2F:92:41:50:3B:2B:F2:AD:86:54:AB:2B:D4:AB:A2:92:8B:B6:1C:2B:58:A1:E3:1A:CE:43:43:FB:3E:94:2E:7E"; ++ = "1C:10:89:F9:32:8C:05:D1:10:90:27:7F:66:21:28:71:79:8F:55:44:6C:08:BA:00:48:C0:D4:7A:0D:3B:9C:45"; // map of cert alias to SHA-256 fingerprint @SuppressWarnings("serial") diff --git a/jdk8u-jdk8u412-b08.tar.xz b/jdk8u-jdk8u422-b05.tar.xz similarity index 82% rename from jdk8u-jdk8u412-b08.tar.xz rename to jdk8u-jdk8u422-b05.tar.xz index 41cfa2c9f1415ac1eb687d9ce7f4919ee9e95725..3fba88a6361cbf5235899dfc1b8713f5b489101a 100644 Binary files a/jdk8u-jdk8u412-b08.tar.xz and b/jdk8u-jdk8u422-b05.tar.xz differ diff --git a/openjdk-1.8.0.spec b/openjdk-1.8.0.spec index 4e3b32241768820ded940d7378b038ef62aceab7..cab489fdd901c7e6c687fdc85ebc26e33518a3ca 100644 --- a/openjdk-1.8.0.spec +++ b/openjdk-1.8.0.spec @@ -132,6 +132,12 @@ %global stapinstall powerpc64le %endif +# Need to support noarch for srpm build +%ifarch noarch +%global archinstall %{nil} +%global stapinstall %{nil} +%endif + %ifarch %{jit_arches} %global with_systemtap 1 %else @@ -166,13 +172,13 @@ %global origin_nice OpenJDK %global top_level_dir_name %{origin} %global repo jdk8u -%global revision jdk8u412-b08 +%global revision jdk8u422-b05 %global full_revision %{repo}-%{revision} # Define IcedTea version used for SystemTap tapsets and desktop files %global icedteaver 3.15.0 -%global updatever 412 -%global buildver b08 +%global updatever 422 +%global buildver b05 # priority must be 7 digits in total. The expression is workarounding tip %global priority 1800%{updatever} @@ -613,6 +619,7 @@ exit 0 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libunpack.so %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libverify.so %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libzip.so +%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libz.so %{_jvmdir}/%{jredir -- %{?1}}/lib/charsets.jar %{_jvmdir}/%{jredir -- %{?1}}/lib/classlist %{_jvmdir}/%{jredir -- %{?1}}/lib/content-types.properties @@ -936,7 +943,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever}.%{buildver} -Release: 5 +Release: 0 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # and this change was brought into RHEL-4. java-1.5.0-ibm packages # also included the epoch in their virtual provides. This created a @@ -1322,6 +1329,17 @@ Patch428: 8223486-split-if-update_uses-accesses-stale-idom-dat.patch Patch429: 8256488-Use-ldpq-stpq-instead-of-ld4-st4-for-small-c.patch Patch430: DependencyContext-mark_dependent_nmethods-crash-in-Dynamic-cds-mode.patch Patch431: 8138922-StubCodeDesc-constructor-publishes-partially-constructed.patch +Patch432: support-KAE-zip.patch +Patch433: Backport-6956385-URLConnection.getLastModified-leaks-file-han.patch +Patch434: Backport-8068864-C2-failed-modified-node-is-not-on-IGVN._work.patch +Patch435: Huawei-improve-GCTR-performance.patch +Patch436: Backport-8209362-sun-security-ssl-SSLSocketImpl-ReuseAddr.jav.patch +Patch437: Backport-7036144-GZIPInputStream-readTrailer-uses-faulty-avai.patch +Patch438: Huawei-Add-Aggressive-CDS.patch +Patch439: Backport-8151845-Comment-in-globals.hpp-for-MetaspaceSize-is-.patch +Patch440: Backport-8210706-G1-may-deadlock-when-starting-a-concurrent-c.patch +Patch441: Backport-8318889-Backport-Important-Fixed-Issues-in-Later-Ver.patch +Patch442: Huawei-Keep-objects-when-remove-unshareable-info.patch ############################################# # # Upstreamable patches @@ -1966,6 +1984,17 @@ pushd %{top_level_dir_name} %patch429 -p1 %patch430 -p1 %patch431 -p1 +%patch432 -p1 +%patch433 -p1 +%patch434 -p1 +%patch435 -p1 +%patch436 -p1 +%patch437 -p1 +%patch438 -p1 +%patch439 -p1 +%patch440 -p1 +%patch441 -p1 +%patch442 -p1 %endif %ifarch loongarch64 @@ -2624,6 +2653,39 @@ cjc.mainProgram(arg) %endif %changelog +* Thu Tue 16 2024 Autistic_boyya -1:1.8.0.422-b05.rolling +- modified 8014628-Support-AES-Encryption-with-HMAC-SHA2-for-Ke.patch +- modified 8136577_Make_AbortVMOnException_available_in_product_builds.patch +- modified Dynamic-CDS-Archive.patch +- modified add-safe-compilation-flags.patch +- modified fix-log-bug-enhance-aes-hmac-performance.patch +- modified fix_X509TrustManagerImpl_symantec_distrust.patch +- modified openjdk-1.8.0.spec +- modified update-cacerts-and-VerifyCACerts.java-test.patch +- Add Backport-6956385-URLConnection.getLastModified-leaks-file-han.patch +- Add Backport-7036144-GZIPInputStream-readTrailer-uses-faulty-avai.patch +- Add Backport-8068864-C2-failed-modified-node-is-not-on-IGVN._work.patch +- Add Backport-8151845-Comment-in-globals.hpp-for-MetaspaceSize-is-.patch +- Add Backport-8209362-sun-security-ssl-SSLSocketImpl-ReuseAddr.jav.patch +- Add Backport-8210706-G1-may-deadlock-when-starting-a-concurrent-c.patch +- Add Backport-8318889-Backport-Important-Fixed-Issues-in-Later-Ver.patch +- Add Huawei-Add-Aggressive-CDS.patch +- Add Huawei-Keep-objects-when-remove-unshareable-info.patch +- Add Huawei-improve-GCTR-performance.patch + +* Thu Jul 4 2024 Autistic_boyya -1:1.8.0.412-b08.9 +- Add support-KAE-zip.patch + +* Fri Jun 21 2024 songliyang -1:1.8.0.412-b08.8 +- Add noarch support for srpm build +- null the arg to solve openjdk-headless install error + +* Thu Jun 20 2024 aoqi -1:1.8.0.412-b08.7 +- update LoongArch64 port to 8u412 + +* Wed Jun 19 2024 neu-mobi -1:1.8.0.412-b08.6 +- Fix aarch64 runtime thread signal transfer bug + * Thu May 23 2024 Dingli Zhang -1:1.8.0.412-b08.5 - Fix build on riscv64 in prep stage diff --git a/support-KAE-zip.patch b/support-KAE-zip.patch new file mode 100644 index 0000000000000000000000000000000000000000..3f584e597e26891f23e09c364f7b882605c185f9 --- /dev/null +++ b/support-KAE-zip.patch @@ -0,0 +1,717 @@ +Subject: [PATCH] [Huawei]support KAE-zip + +--- + jdk/make/CompileLaunchers.gmk | 34 ++++--- + jdk/make/lib/CoreLibraries.gmk | 71 ++++++++++++++ + jdk/make/mapfiles/libzip/mapfile-vers | 3 + + .../share/classes/java/util/zip/Deflater.java | 10 +- + .../java/util/zip/GZIPInputStream.java | 14 +++ + .../java/util/zip/GZIPOutputStream.java | 20 ++++ + .../share/classes/java/util/zip/Inflater.java | 14 ++- + .../java/util/zip/InflaterOutputStream.java | 24 ++--- + jdk/src/share/lib/security/java.policy | 2 + + jdk/src/share/native/java/util/zip/Deflater.c | 37 +++++++ + jdk/src/share/native/java/util/zip/Inflater.c | 98 +++++++++++++++++++ + .../java/util/zip/DeflateIn_InflateOut.java | 74 +++++++++++++- + 12 files changed, 367 insertions(+), 34 deletions(-) + +diff --git a/jdk/make/CompileLaunchers.gmk b/jdk/make/CompileLaunchers.gmk +index de1ea9f4b..513e2ee1b 100644 +--- a/jdk/make/CompileLaunchers.gmk ++++ b/jdk/make/CompileLaunchers.gmk +@@ -474,17 +474,29 @@ ifeq ($(USE_EXTERNAL_LIBZ), true) + UNPACKEXE_ZIPOBJS := -lz + else + UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib +- UNPACKEXE_ZIPOBJS := $(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \ +- $(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \ +- $(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \ +- $(JDK_OUTPUTDIR)/objs/libzip/zadler32$(OBJ_SUFFIX) \ +- $(JDK_OUTPUTDIR)/objs/libzip/compress$(OBJ_SUFFIX) \ +- $(JDK_OUTPUTDIR)/objs/libzip/zutil$(OBJ_SUFFIX) \ +- $(JDK_OUTPUTDIR)/objs/libzip/inflate$(OBJ_SUFFIX) \ +- $(JDK_OUTPUTDIR)/objs/libzip/infback$(OBJ_SUFFIX) \ +- $(JDK_OUTPUTDIR)/objs/libzip/inftrees$(OBJ_SUFFIX) \ +- $(JDK_OUTPUTDIR)/objs/libzip/inffast$(OBJ_SUFFIX) +- ++ ifeq ($(OPENJDK_TARGET_OS), windows) ++ UNPACKEXE_ZIPOBJS := $(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \ ++ $(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \ ++ $(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \ ++ $(JDK_OUTPUTDIR)/objs/libzip/zadler32$(OBJ_SUFFIX) \ ++ $(JDK_OUTPUTDIR)/objs/libzip/compress$(OBJ_SUFFIX) \ ++ $(JDK_OUTPUTDIR)/objs/libzip/zutil$(OBJ_SUFFIX) \ ++ $(JDK_OUTPUTDIR)/objs/libzip/inflate$(OBJ_SUFFIX) \ ++ $(JDK_OUTPUTDIR)/objs/libzip/infback$(OBJ_SUFFIX) \ ++ $(JDK_OUTPUTDIR)/objs/libzip/inftrees$(OBJ_SUFFIX) \ ++ $(JDK_OUTPUTDIR)/objs/libzip/inffast$(OBJ_SUFFIX) ++ else ++ UNPACKEXE_ZIPOBJS := $(JDK_OUTPUTDIR)/objs/libz/zcrc32$(OBJ_SUFFIX) \ ++ $(JDK_OUTPUTDIR)/objs/libz/deflate$(OBJ_SUFFIX) \ ++ $(JDK_OUTPUTDIR)/objs/libz/trees$(OBJ_SUFFIX) \ ++ $(JDK_OUTPUTDIR)/objs/libz/zadler32$(OBJ_SUFFIX) \ ++ $(JDK_OUTPUTDIR)/objs/libz/compress$(OBJ_SUFFIX) \ ++ $(JDK_OUTPUTDIR)/objs/libz/zutil$(OBJ_SUFFIX) \ ++ $(JDK_OUTPUTDIR)/objs/libz/inflate$(OBJ_SUFFIX) \ ++ $(JDK_OUTPUTDIR)/objs/libz/infback$(OBJ_SUFFIX) \ ++ $(JDK_OUTPUTDIR)/objs/libz/inftrees$(OBJ_SUFFIX) \ ++ $(JDK_OUTPUTDIR)/objs/libz/inffast$(OBJ_SUFFIX) ++ endif + endif + + UNPACKEXE_LANG := C +diff --git a/jdk/make/lib/CoreLibraries.gmk b/jdk/make/lib/CoreLibraries.gmk +index d1cd1d3de..1af991693 100644 +--- a/jdk/make/lib/CoreLibraries.gmk ++++ b/jdk/make/lib/CoreLibraries.gmk +@@ -261,11 +261,76 @@ $(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM) + + ########################################################################################## + ++ifneq ($(USE_EXTERNAL_LIBZ), true) ++ ifneq ($(OPENJDK_TARGET_OS), windows) ++ BUILD_LIBZ_EXCLUDES := ++ ++ ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib ++ ifeq ($(OPENJDK_TARGET_OS), macosx) ++ ZLIB_CPPFLAGS += -DHAVE_UNISTD_H ++ endif ++ ++ BUILD_LIBZ_REORDER := ++ ifeq ($(OPENJDK_TARGET_OS), solaris) ++ ifneq ($(OPENJDK_TARGET_CPU), x86_64) ++ BUILD_LIBZ_REORDER := $(JDK_TOPDIR)/make/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU) ++ endif ++ endif ++ ++ ifeq ($(LIBZ_CAN_USE_MMAP), true) ++ BUILD_LIBZ_MMAP := -DUSE_MMAP ++ endif ++ ++ $(eval $(call SetupNativeCompilation,BUILD_LIBZ, \ ++ LIBRARY := z, \ ++ OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ ++ LANG := C, \ ++ OPTIMIZATION := LOW, \ ++ SRC := $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib, \ ++ EXCLUDES := $(LIBZ_EXCLUDES), \ ++ CFLAGS := $(CFLAGS_JDKLIB) \ ++ $(ZLIB_CPPFLAGS) \ ++ -I$(JDK_TOPDIR)/src/share/native/java/io \ ++ -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io, \ ++ CFLAGS_posix := $(BUILD_LIBZ_MMAP) -UDEBUG, \ ++ MAPFILE := , \ ++ REORDER := $(BUILD_LIBZ_REORDER), \ ++ LDFLAGS := $(LDFLAGS_JDKLIB) \ ++ $(call SET_SHARED_LIBRARY_ORIGIN) \ ++ $(EXPORT_Z_FUNCS), \ ++ LDFLAGS_windows := jvm.lib \ ++ $(WIN_JAVA_LIB), \ ++ LDFLAGS_SUFFIX_linux := , \ ++ LDFLAGS_SUFFIX_solaris := , \ ++ LDFLAGS_SUFFIX_aix := ,\ ++ LDFLAGS_SUFFIX_macosx := , \ ++ VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ ++ RC_FLAGS := $(RC_FLAGS) \ ++ -D "JDK_FNAME=z.dll" \ ++ -D "JDK_INTERNAL_NAME=z" \ ++ -D "JDK_FTYPE=0x2L", \ ++ OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libz, \ ++ DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) ++ ++ ++ $(BUILD_LIBZ): $(BUILD_LIBJAVA) ++ ++ BUILD_LIBRARIES += $(BUILD_LIBZ) ++ endif ++endif ++ ++########################################################################################## ++ + BUILD_LIBZIP_EXCLUDES := + ifeq ($(USE_EXTERNAL_LIBZ), true) ++ BUILD_LIBZIP_SRC := + LIBZ := -lz + LIBZIP_EXCLUDES += zlib + else ++ ifneq ($(OPENJDK_TARGET_OS), windows) ++ BUILD_LIBZIP_SRC := Adler32.c CRC32.c Deflater.c Inflater.c zip_util.c ZipFile.c ++ LIBZ := -lz ++ endif + ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib + ifeq ($(OPENJDK_TARGET_OS), macosx) + ZLIB_CPPFLAGS += -DHAVE_UNISTD_H +@@ -289,6 +354,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \ + LANG := C, \ + OPTIMIZATION := LOW, \ + SRC := $(JDK_TOPDIR)/src/share/native/java/util/zip, \ ++ INCLUDE_FILES := $(BUILD_LIBZIP_SRC), \ + EXCLUDES := $(LIBZIP_EXCLUDES), \ + CFLAGS := $(CFLAGS_JDKLIB) \ + $(ZLIB_CPPFLAGS) \ +@@ -315,9 +381,14 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \ + OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libzip, \ + DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) + ++ifneq ($(USE_EXTERNAL_LIBZ), true) ++ LIBZ := ++endif + + $(BUILD_LIBZIP): $(BUILD_LIBJAVA) + ++$(BUILD_LIBZIP): $(BUILD_LIBZ) ++ + BUILD_LIBRARIES += $(BUILD_LIBZIP) + + ########################################################################################## +diff --git a/jdk/make/mapfiles/libzip/mapfile-vers b/jdk/make/mapfiles/libzip/mapfile-vers +index 5d33990c3..5c6d27d0d 100644 +--- a/jdk/make/mapfiles/libzip/mapfile-vers ++++ b/jdk/make/mapfiles/libzip/mapfile-vers +@@ -38,13 +38,16 @@ SUNWprivate_1.1 { + Java_java_util_zip_Deflater_end; + Java_java_util_zip_Deflater_getAdler; + Java_java_util_zip_Deflater_init; ++ Java_java_util_zip_Deflater_initKae; + Java_java_util_zip_Deflater_initIDs; + Java_java_util_zip_Deflater_reset; + Java_java_util_zip_Deflater_setDictionary; + Java_java_util_zip_Inflater_end; + Java_java_util_zip_Inflater_getAdler; + Java_java_util_zip_Inflater_inflateBytes; ++ Java_java_util_zip_Inflater_inflateBytesKAE; + Java_java_util_zip_Inflater_init; ++ Java_java_util_zip_Inflater_initKae; + Java_java_util_zip_Inflater_initIDs; + Java_java_util_zip_Inflater_reset; + Java_java_util_zip_Inflater_setDictionary; +diff --git a/jdk/src/share/classes/java/util/zip/Deflater.java b/jdk/src/share/classes/java/util/zip/Deflater.java +index bffa397d9..a4ea40cf8 100644 +--- a/jdk/src/share/classes/java/util/zip/Deflater.java ++++ b/jdk/src/share/classes/java/util/zip/Deflater.java +@@ -81,6 +81,7 @@ class Deflater { + private boolean finish, finished; + private long bytesRead; + private long bytesWritten; ++ private boolean defalterUseKae; + + /** + * Compression method for the deflate algorithm (the only one currently +@@ -168,7 +169,13 @@ class Deflater { + public Deflater(int level, boolean nowrap) { + this.level = level; + this.strategy = DEFAULT_STRATEGY; +- this.zsRef = new ZStreamRef(init(level, DEFAULT_STRATEGY, nowrap)); ++ if (("true".equals(System.getProperty("GZIP_USE_KAE", "false"))) && ++ ("aarch64".equals(System.getProperty("os.arch")))) { ++ this.defalterUseKae = true; ++ } ++ this.zsRef = defalterUseKae ? ++ new ZStreamRef(initKae(level, DEFAULT_STRATEGY)) : ++ new ZStreamRef(init(level, DEFAULT_STRATEGY, nowrap)); + } + + /** +@@ -571,6 +578,7 @@ class Deflater { + + private static native void initIDs(); + private native static long init(int level, int strategy, boolean nowrap); ++ private native static long initKae(int level, int strategy); + private native static void setDictionary(long addr, byte[] b, int off, int len); + private native int deflateBytes(long addr, byte[] b, int off, int len, + int flush); +diff --git a/jdk/src/share/classes/java/util/zip/GZIPInputStream.java b/jdk/src/share/classes/java/util/zip/GZIPInputStream.java +index 0d57e8ab3..7fb753729 100644 +--- a/jdk/src/share/classes/java/util/zip/GZIPInputStream.java ++++ b/jdk/src/share/classes/java/util/zip/GZIPInputStream.java +@@ -54,6 +54,11 @@ class GZIPInputStream extends InflaterInputStream { + + private boolean closed = false; + ++ /* ++ * GZIP use KAE. ++ */ ++ private boolean gzipUseKae = false; ++ + /** + * Check to make sure that this stream has not been closed + */ +@@ -76,6 +81,12 @@ class GZIPInputStream extends InflaterInputStream { + public GZIPInputStream(InputStream in, int size) throws IOException { + super(in, new Inflater(true), size); + usesDefaultInflater = true; ++ if (("true".equals(System.getProperty("GZIP_USE_KAE", "false"))) && ++ ("aarch64".equals(System.getProperty("os.arch")))) { ++ gzipUseKae = true; ++ } ++ // file header will be readed by kae zlib when use kae ++ if (gzipUseKae) return; + readHeader(in); + } + +@@ -209,6 +220,9 @@ class GZIPInputStream extends InflaterInputStream { + * data set) + */ + private boolean readTrailer() throws IOException { ++ // file trailer will be readed by kae zlib when use kae ++ if (gzipUseKae) return true; ++ + InputStream in = this.in; + int n = inf.getRemaining(); + if (n > 0) { +diff --git a/jdk/src/share/classes/java/util/zip/GZIPOutputStream.java b/jdk/src/share/classes/java/util/zip/GZIPOutputStream.java +index 1c3f8592e..0f0be98bb 100644 +--- a/jdk/src/share/classes/java/util/zip/GZIPOutputStream.java ++++ b/jdk/src/share/classes/java/util/zip/GZIPOutputStream.java +@@ -52,6 +52,11 @@ class GZIPOutputStream extends DeflaterOutputStream { + */ + private final static int TRAILER_SIZE = 8; + ++ /* ++ * GZIP use KAE. ++ */ ++ private boolean gzipUseKae = false; ++ + /** + * Creates a new output stream with the specified buffer size. + * +@@ -91,6 +96,12 @@ class GZIPOutputStream extends DeflaterOutputStream { + size, + syncFlush); + usesDefaultDeflater = true; ++ if (("true".equals(System.getProperty("GZIP_USE_KAE", "false"))) && ++ ("aarch64".equals(System.getProperty("os.arch")))) { ++ gzipUseKae = true; ++ } ++ // file header will be writed by kae zlib when use kae ++ if (gzipUseKae) return; + writeHeader(); + crc.reset(); + } +@@ -160,6 +171,11 @@ class GZIPOutputStream extends DeflaterOutputStream { + int len = def.deflate(buf, 0, buf.length); + if (def.finished() && len <= buf.length - TRAILER_SIZE) { + // last deflater buffer. Fit trailer at the end ++ // file trailer will be writed by kae zlib when use kae ++ if (gzipUseKae) { ++ out.write(buf, 0, len); ++ return; ++ } + writeTrailer(buf, len); + len = len + TRAILER_SIZE; + out.write(buf, 0, len); +@@ -168,6 +184,10 @@ class GZIPOutputStream extends DeflaterOutputStream { + if (len > 0) + out.write(buf, 0, len); + } ++ // file trailer will be writed by kae zlib when use kae ++ if (gzipUseKae) { ++ return; ++ } + // if we can't fit the trailer at the end of the last + // deflater buffer, we write it separately + byte[] trailer = new byte[TRAILER_SIZE]; +diff --git a/jdk/src/share/classes/java/util/zip/Inflater.java b/jdk/src/share/classes/java/util/zip/Inflater.java +index c1eefe122..42e90f525 100644 +--- a/jdk/src/share/classes/java/util/zip/Inflater.java ++++ b/jdk/src/share/classes/java/util/zip/Inflater.java +@@ -80,6 +80,7 @@ class Inflater { + private boolean needDict; + private long bytesRead; + private long bytesWritten; ++ private boolean inflaterUseKae; + + private static final byte[] defaultBuf = new byte[0]; + +@@ -100,7 +101,11 @@ class Inflater { + * @param nowrap if true then support GZIP compatible compression + */ + public Inflater(boolean nowrap) { +- zsRef = new ZStreamRef(init(nowrap)); ++ if (("true".equals(System.getProperty("GZIP_USE_KAE", "false"))) && ++ ("aarch64".equals(System.getProperty("os.arch")))) { ++ inflaterUseKae = true; ++ } ++ zsRef = inflaterUseKae ? new ZStreamRef(initKae()): new ZStreamRef(init(nowrap)); + } + + /** +@@ -256,7 +261,9 @@ class Inflater { + synchronized (zsRef) { + ensureOpen(); + int thisLen = this.len; +- int n = inflateBytes(zsRef.address(), b, off, len); ++ int n = this.inflaterUseKae ? ++ inflateBytesKAE(zsRef.address(), b, off, len) : ++ inflateBytes(zsRef.address(), b, off, len); + bytesWritten += n; + bytesRead += (thisLen - this.len); + return n; +@@ -397,10 +404,13 @@ class Inflater { + + private native static void initIDs(); + private native static long init(boolean nowrap); ++ private native static long initKae(); + private native static void setDictionary(long addr, byte[] b, int off, + int len); + private native int inflateBytes(long addr, byte[] b, int off, int len) + throws DataFormatException; ++ private native int inflateBytesKAE(long addr, byte[] b, int off, int len) ++ throws DataFormatException; + private native static int getAdler(long addr); + private native static void reset(long addr); + private native static void end(long addr); +diff --git a/jdk/src/share/classes/java/util/zip/InflaterOutputStream.java b/jdk/src/share/classes/java/util/zip/InflaterOutputStream.java +index 02900c741..62c6bb153 100644 +--- a/jdk/src/share/classes/java/util/zip/InflaterOutputStream.java ++++ b/jdk/src/share/classes/java/util/zip/InflaterOutputStream.java +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2020, 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 +@@ -236,16 +236,9 @@ public class InflaterOutputStream extends FilterOutputStream { + + // Fill the decompressor buffer with output data + if (inf.needsInput()) { +- int part; +- +- if (len < 1) { +- break; +- } +- +- part = (len < 512 ? len : 512); +- inf.setInput(b, off, part); +- off += part; +- len -= part; ++ inf.setInput(b, off, len); ++ // Only use input buffer once. ++ len = 0; + } + + // Decompress and write blocks of output data +@@ -256,13 +249,14 @@ public class InflaterOutputStream extends FilterOutputStream { + } + } while (n > 0); + +- // Check the decompressor +- if (inf.finished()) { +- break; +- } ++ // Check for missing dictionary first + if (inf.needsDictionary()) { + throw new ZipException("ZLIB dictionary missing"); + } ++ // Check the decompressor ++ if (inf.finished() || (len == 0) /* no more input */ ) { ++ break; ++ } + } + } catch (DataFormatException ex) { + // Improperly formatted compressed (ZIP) data +diff --git a/jdk/src/share/lib/security/java.policy b/jdk/src/share/lib/security/java.policy +index 8b6289720..baec2ea15 100644 +--- a/jdk/src/share/lib/security/java.policy ++++ b/jdk/src/share/lib/security/java.policy +@@ -48,5 +48,7 @@ grant { + permission java.util.PropertyPermission "java.vm.name", "read"; + + permission java.util.PropertyPermission "sun.security.pkcs11.disableKeyExtraction", "read"; ++ ++ permission java.util.PropertyPermission "GZIP_USE_KAE", "read"; + }; + +diff --git a/jdk/src/share/native/java/util/zip/Deflater.c b/jdk/src/share/native/java/util/zip/Deflater.c +index c1bd34667..1b048e4f5 100644 +--- a/jdk/src/share/native/java/util/zip/Deflater.c ++++ b/jdk/src/share/native/java/util/zip/Deflater.c +@@ -37,6 +37,7 @@ + #include "java_util_zip_Deflater.h" + + #define DEF_MEM_LEVEL 8 ++#define KAE_DEFLATER_WindowBit 31 + + static jfieldID levelID; + static jfieldID strategyID; +@@ -104,6 +105,42 @@ Java_java_util_zip_Deflater_init(JNIEnv *env, jclass cls, jint level, + } + } + ++JNIEXPORT jlong JNICALL ++Java_java_util_zip_Deflater_initKae(JNIEnv *env, jclass cls, jint level, ++ jint strategy) ++{ ++ z_stream *strm = calloc(1, sizeof(z_stream)); ++ ++ if (strm == 0) { ++ JNU_ThrowOutOfMemoryError(env, 0); ++ return jlong_zero; ++ } else { ++ const char *msg; ++ int ret = deflateInit2(strm, level, Z_DEFLATED, KAE_DEFLATER_WindowBit, DEF_MEM_LEVEL, strategy); ++ switch (ret) { ++ case Z_OK: ++ return ptr_to_jlong(strm); ++ case Z_MEM_ERROR: ++ free(strm); ++ JNU_ThrowOutOfMemoryError(env, 0); ++ return jlong_zero; ++ case Z_STREAM_ERROR: ++ free(strm); ++ JNU_ThrowIllegalArgumentException(env, 0); ++ return jlong_zero; ++ default: ++ msg = ((strm->msg != NULL) ? strm->msg : ++ (ret == Z_VERSION_ERROR) ? ++ "zlib returned Z_VERSION_ERROR: " ++ "compile time and runtime zlib implementations differ" : ++ "unknown error initializing zlib library"); ++ free(strm); ++ JNU_ThrowInternalError(env, msg); ++ return jlong_zero; ++ } ++ } ++} ++ + JNIEXPORT void JNICALL + Java_java_util_zip_Deflater_setDictionary(JNIEnv *env, jclass cls, jlong addr, + jarray b, jint off, jint len) +diff --git a/jdk/src/share/native/java/util/zip/Inflater.c b/jdk/src/share/native/java/util/zip/Inflater.c +index 79bcdd5b6..fca207215 100644 +--- a/jdk/src/share/native/java/util/zip/Inflater.c ++++ b/jdk/src/share/native/java/util/zip/Inflater.c +@@ -41,6 +41,7 @@ + + #define ThrowDataFormatException(env, msg) \ + JNU_ThrowByName(env, "java/util/zip/DataFormatException", msg) ++#define KAE_INFLATER_WindowBit 31 + + static jfieldID needDictID; + static jfieldID finishedID; +@@ -94,6 +95,39 @@ Java_java_util_zip_Inflater_init(JNIEnv *env, jclass cls, jboolean nowrap) + } + } + ++JNIEXPORT jlong JNICALL ++Java_java_util_zip_Inflater_initKae(JNIEnv *env, jclass cls) ++{ ++ z_stream *strm = calloc(1, sizeof(z_stream)); ++ ++ if (strm == NULL) { ++ JNU_ThrowOutOfMemoryError(env, 0); ++ return jlong_zero; ++ } else { ++ const char *msg; ++ int ret = inflateInit2(strm, KAE_INFLATER_WindowBit); ++ switch (ret) { ++ case Z_OK: ++ return ptr_to_jlong(strm); ++ case Z_MEM_ERROR: ++ free(strm); ++ JNU_ThrowOutOfMemoryError(env, 0); ++ return jlong_zero; ++ default: ++ msg = ((strm->msg != NULL) ? strm->msg : ++ (ret == Z_VERSION_ERROR) ? ++ "zlib returned Z_VERSION_ERROR: " ++ "compile time and runtime zlib implementations differ" : ++ (ret == Z_STREAM_ERROR) ? ++ "inflateInit2 returned Z_STREAM_ERROR" : ++ "unknown error initializing zlib library"); ++ free(strm); ++ JNU_ThrowInternalError(env, msg); ++ return jlong_zero; ++ } ++ } ++} ++ + JNIEXPORT void JNICALL + Java_java_util_zip_Inflater_setDictionary(JNIEnv *env, jclass cls, jlong addr, + jarray b, jint off, jint len) +@@ -181,6 +215,70 @@ Java_java_util_zip_Inflater_inflateBytes(JNIEnv *env, jobject this, jlong addr, + } + } + ++JNIEXPORT jint JNICALL ++Java_java_util_zip_Inflater_inflateBytesKAE(JNIEnv *env, jobject this, jlong addr, ++ jarray b, jint off, jint len) ++{ ++ z_stream *strm = jlong_to_ptr(addr); ++ jarray this_buf = (jarray)(*env)->GetObjectField(env, this, bufID); ++ jint this_off = (*env)->GetIntField(env, this, offID); ++ jint this_len = (*env)->GetIntField(env, this, lenID); ++ ++ jbyte *in_buf; ++ jbyte *out_buf; ++ int ret; ++ ++ in_buf = (*env)->GetPrimitiveArrayCritical(env, this_buf, 0); ++ if (in_buf == NULL) { ++ if (this_len != 0 && (*env)->ExceptionOccurred(env) == NULL) ++ JNU_ThrowOutOfMemoryError(env, 0); ++ return 0; ++ } ++ out_buf = (*env)->GetPrimitiveArrayCritical(env, b, 0); ++ if (out_buf == NULL) { ++ (*env)->ReleasePrimitiveArrayCritical(env, this_buf, in_buf, 0); ++ if (len != 0 && (*env)->ExceptionOccurred(env) == NULL) ++ JNU_ThrowOutOfMemoryError(env, 0); ++ return 0; ++ } ++ strm->next_in = (Bytef *) (in_buf + this_off); ++ strm->next_out = (Bytef *) (out_buf + off); ++ strm->avail_in = this_len; ++ strm->avail_out = len; ++ ret = inflate(strm, Z_SYNC_FLUSH); ++ (*env)->ReleasePrimitiveArrayCritical(env, b, out_buf, 0); ++ (*env)->ReleasePrimitiveArrayCritical(env, this_buf, in_buf, 0); ++ ++ switch (ret) { ++ case Z_STREAM_END: ++ (*env)->SetBooleanField(env, this, finishedID, JNI_TRUE); ++ /* fall through */ ++ case Z_OK: ++ this_off += this_len - strm->avail_in; ++ (*env)->SetIntField(env, this, offID, this_off); ++ (*env)->SetIntField(env, this, lenID, strm->avail_in); ++ return (jint) (len - strm->avail_out); ++ case Z_NEED_DICT: ++ (*env)->SetBooleanField(env, this, needDictID, JNI_TRUE); ++ /* Might have consumed some input here! */ ++ this_off += this_len - strm->avail_in; ++ (*env)->SetIntField(env, this, offID, this_off); ++ (*env)->SetIntField(env, this, lenID, strm->avail_in); ++ return 0; ++ case Z_BUF_ERROR: ++ return 0; ++ case Z_DATA_ERROR: ++ ThrowDataFormatException(env, strm->msg); ++ return 0; ++ case Z_MEM_ERROR: ++ JNU_ThrowOutOfMemoryError(env, 0); ++ return 0; ++ default: ++ JNU_ThrowInternalError(env, strm->msg); ++ return 0; ++ } ++} ++ + JNIEXPORT jint JNICALL + Java_java_util_zip_Inflater_getAdler(JNIEnv *env, jclass cls, jlong addr) + { +diff --git a/jdk/test/java/util/zip/DeflateIn_InflateOut.java b/jdk/test/java/util/zip/DeflateIn_InflateOut.java +index dd69a7773..048d8e34c 100644 +--- a/jdk/test/java/util/zip/DeflateIn_InflateOut.java ++++ b/jdk/test/java/util/zip/DeflateIn_InflateOut.java +@@ -41,14 +41,31 @@ public class DeflateIn_InflateOut { + private static ByteArrayOutputStream baos; + private static InflaterOutputStream ios; + +- private static void reset() { ++ private static Inflater reset(byte[] dict) { + new Random(new Date().getTime()).nextBytes(data); + + bais = new ByteArrayInputStream(data); +- dis = new DeflaterInputStream(bais); ++ if (dict == null) { ++ dis = new DeflaterInputStream(bais); ++ } else { ++ Deflater def = new Deflater(); ++ def.setDictionary(dict); ++ dis = new DeflaterInputStream(bais, def); ++ } + + baos = new ByteArrayOutputStream(); +- ios = new InflaterOutputStream(baos); ++ if (dict == null) { ++ ios = new InflaterOutputStream(baos); ++ return null; ++ } else { ++ Inflater inf = new Inflater(); ++ ios = new InflaterOutputStream(baos, inf); ++ return inf; ++ } ++ } ++ ++ private static void reset() { ++ reset(null); + } + + /** Check byte arrays read/write. */ +@@ -216,6 +233,44 @@ public class DeflateIn_InflateOut { + check(numNotSkipped + numSkipBytes == numReadable); + } + ++ /** Check "needsDictionary()". */ ++ private static void NeedsDictionary() throws Throwable { ++ byte[] dict = {1, 2, 3, 4}; ++ Adler32 adler32 = new Adler32(); ++ adler32.update(dict); ++ long checksum = adler32.getValue(); ++ byte[] buf = new byte[512]; ++ ++ Inflater inf = reset(dict); ++ check(dis.available() == 1); ++ boolean dictSet = false; ++ for (;;) { ++ int len = dis.read(buf, 0, buf.length); ++ if (len < 0) { ++ break; ++ } else { ++ try { ++ ios.write(buf, 0, len); ++ if (dictSet == false) { ++ check(false, "Must throw ZipException without dictionary"); ++ return; ++ } ++ } catch (ZipException ze) { ++ check(dictSet == false, "Dictonary must be set only once"); ++ check(checksum == inf.getAdler(), "Incorrect dictionary"); ++ inf.setDictionary(dict); ++ // After setting the dictionary, we have to flush the ++ // InflaterOutputStream now in order to consume all the ++ // pending input data from the last, failed call to "write()". ++ ios.flush(); ++ dictSet = true; ++ } ++ } ++ } ++ check(dis.available() == 0); ++ ios.close(); ++ check(Arrays.equals(data, baos.toByteArray())); ++ } + + public static void realMain(String[] args) throws Throwable { + ArrayReadWrite(); +@@ -227,15 +282,24 @@ public class DeflateIn_InflateOut { + ByteReadByteWrite(); + + SkipBytes(); ++ ++ NeedsDictionary(); + } + + //--------------------- Infrastructure --------------------------- + static volatile int passed = 0, failed = 0; + static void pass() {passed++;} +- static void fail() {failed++; Thread.dumpStack();} +- static void fail(String msg) {System.out.println(msg); fail();} ++ static void fail() { fail(null); } ++ static void fail(String msg) { ++ failed++; ++ if (msg != null) { ++ System.err.println(msg); ++ } ++ Thread.dumpStack(); ++ } + static void unexpected(Throwable t) {failed++; t.printStackTrace();} + static void check(boolean cond) {if (cond) pass(); else fail();} ++ static void check(boolean cond, String msg) {if (cond) pass(); else fail(msg);} + static void equal(Object x, Object y) { + if (x == null ? y == null : x.equals(y)) pass(); + else fail(x + " not equal to " + y);} +-- +2.23.0 + diff --git a/update-cacerts-and-VerifyCACerts.java-test.patch b/update-cacerts-and-VerifyCACerts.java-test.patch index 4128a07b63afd355bbe18e3a7cfd327cd31e7e86..3bcc6f44392f5b2669c39d87c37b3b43ebcd0dfc 100644 --- a/update-cacerts-and-VerifyCACerts.java-test.patch +++ b/update-cacerts-and-VerifyCACerts.java-test.patch @@ -257,13 +257,13 @@ index dd107fc..791ddb6 100644 + File.separator + "security" + File.separator + "cacerts"; // The numbers of certs now. -- private static final int COUNT = 108; +- private static final int COUNT = 110; + private static final int COUNT = 83; // SHA-256 of cacerts, can be generated with // shasum -a 256 cacerts | sed -e 's/../&:/g' | tr '[:lower:]' '[:upper:]' | cut -c1-95 private static final String CHECKSUM -- = "81:D4:84:F6:92:78:A4:82:25:06:DC:42:25:C9:5D:6C:63:E4:99:CE:BC:ED:66:B3:8C:BA:E6:BA:6B:34:0F:01"; +- = "C1:68:B4:AC:51:BF:B5:C6:FD:20:69:17:E1:AF:E4:5B:01:9B:AA:3F:C3:9A:80:A8:51:53:74:2C:A2:04:B0:FF"; + = "2D:04:88:6C:52:53:54:EB:38:2D:BC:E0:AF:B7:82:F4:9E:32:A8:1A:1B:A3:AE:CF:25:CB:C2:F6:0F:4E:E1:20"; // map of cert alias to SHA-256 fingerprint