changeset 9441:a72255eaef65

Merge
author andrew
date Thu, 22 Apr 2021 01:33:18 +0100
parents 2d0ba7271ce2 (current diff) 3c9174cba47b (diff)
children be4334c66da8
files
diffstat 6 files changed, 36 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp	Tue Apr 20 19:34:44 2021 +0100
+++ b/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp	Thu Apr 22 01:33:18 2021 +0100
@@ -1367,10 +1367,10 @@
       __ ldr(temp, Address(a, rscratch2, Address::lsl(exact_log2(size))));
       __ verify_oop(temp);
     } else {
-      __ ldrw(r16, Address(a, rscratch2, Address::lsl(exact_log2(size))));
+      __ ldrw(temp, Address(a, rscratch2, Address::lsl(exact_log2(size))));
       __ decode_heap_oop(temp); // calls verify_oop
     }
-    __ add(rscratch2, rscratch2, size);
+    __ add(rscratch2, rscratch2, 1);
     __ b(loop);
     __ bind(end);
   }
--- a/src/cpu/ppc/vm/frame_ppc.cpp	Tue Apr 20 19:34:44 2021 +0100
+++ b/src/cpu/ppc/vm/frame_ppc.cpp	Thu Apr 22 01:33:18 2021 +0100
@@ -67,8 +67,8 @@
     return false;
   }
 
-  // Unextended sp must be within the stack and above or equal sp
-  bool unextended_sp_safe = (unextended_sp < thread->stack_base()) && (unextended_sp >= sp);
+  // Unextended sp must be within the stack
+  bool unextended_sp_safe = (unextended_sp < thread->stack_base());
 
   if (!unextended_sp_safe) {
     return false;
@@ -76,9 +76,10 @@
 
   // An fp must be within the stack and above (but not equal) sp.
   bool fp_safe = (fp <= thread->stack_base()) &&  (fp > sp);
-  // an interpreter fp must be within the stack and above (but not equal) sp
-  bool fp_interp_safe = (fp <= thread->stack_base()) &&  (fp > sp) &&
-    ((fp - sp) >= (ijava_state_size + top_ijava_frame_abi_size));
+  // An interpreter fp must be within the stack and above (but not equal) sp.
+  // Moreover, it must be at least the size of the ijava_state structure.
+  bool fp_interp_safe = (fp <= thread->stack_base()) && (fp > sp) &&
+    ((fp - sp) >= ijava_state_size);
 
   // We know sp/unextended_sp are safe, only fp is questionable here
 
--- a/src/share/vm/adlc/output_h.cpp	Tue Apr 20 19:34:44 2021 +0100
+++ b/src/share/vm/adlc/output_h.cpp	Thu Apr 22 01:33:18 2021 +0100
@@ -2162,7 +2162,9 @@
 public:
   OutputMachOpcodes(FILE *hpp, FILE *cpp, FormDict &globals, ArchDesc &AD)
     : OutputMap(hpp, cpp, globals, AD, "MachOpcodes"),
-      begin_inst_chain_rule(-1), end_inst_chain_rule(-1), end_instructions(-1)
+      begin_inst_chain_rule(-1), end_inst_chain_rule(-1),
+      begin_rematerialize(-1), end_rematerialize(-1),
+      end_instructions(-1)
   {};
 
   void declaration() { }
--- a/test/Makefile	Tue Apr 20 19:34:44 2021 +0100
+++ b/test/Makefile	Thu Apr 22 01:33:18 2021 +0100
@@ -288,6 +288,9 @@
 # Ignore tests are not run and completely silent about it
 JTREG_IGNORE_OPTION = -ignore:quiet
 JTREG_BASIC_OPTIONS += $(JTREG_IGNORE_OPTION)
+# Multiply by 4 the timeout factor
+JTREG_TIMEOUT_OPTION =  -timeoutFactor:4
+JTREG_BASIC_OPTIONS += $(JTREG_TIMEOUT_OPTION)
 # Add any extra options
 JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS)
 # Set other vm and test options
--- a/test/gc/arguments/TestAggressiveHeap.java	Tue Apr 20 19:34:44 2021 +0100
+++ b/test/gc/arguments/TestAggressiveHeap.java	Thu Apr 22 01:33:18 2021 +0100
@@ -51,13 +51,18 @@
     // Option requires at least 256M, else error during option processing.
     private static final long minMemory = 256 * 1024 * 1024;
 
+    // Setting the heap to half of the physical memory is not suitable for
+    // a test environment with many tests running concurrently, setting to
+    // half of the required size instead.
+    private static final String heapSizeOption = "-Xmx128M";
+
     // bool UseParallelGC := true {product}
     private static final String parallelGCPattern =
         " *bool +UseParallelGC *:= *true +\\{product\\}";
 
     private static void testFlag() throws Exception {
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
-            option, "-XX:+PrintFlagsFinal", "-version");
+            option, heapSizeOption, "-XX:+PrintFlagsFinal", "-version");
 
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
 
--- a/test/runtime/Metaspace/FragmentMetaspace.java	Tue Apr 20 19:34:44 2021 +0100
+++ b/test/runtime/Metaspace/FragmentMetaspace.java	Thu Apr 22 01:33:18 2021 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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,7 +25,7 @@
  * @test
  * @library /runtime/testlibrary
  * @build GeneratedClassLoader
- * @run main/othervm/timeout=200 FragmentMetaspace
+ * @run main/othervm/timeout=200 -Xmx300m FragmentMetaspace
  */
 
 import java.io.IOException;
@@ -38,25 +38,34 @@
  */
 public class FragmentMetaspace {
 
+    public static Class<?> c;
+
     public static void main(String... args) {
-        runGrowing(Long.valueOf(System.getProperty("time", "80000")));
+        runGrowing(Long.valueOf(System.getProperty("time", "80000")),
+            Integer.valueOf(System.getProperty("iterations", "200")));
         // try to clean up and unload classes to decrease
         // class verification time in debug vm
         System.gc();
     }
 
-    private static void runGrowing(long time) {
+    private static void runGrowing(long time, int iterations) {
         long startTime = System.currentTimeMillis();
-        for (int i = 0; System.currentTimeMillis() < startTime + time; ++i) {
+        for (int i = 0; System.currentTimeMillis() < startTime + time && i < iterations; ++i) {
             try {
                 GeneratedClassLoader gcl = new GeneratedClassLoader();
 
-                Class<?> c = gcl.getGeneratedClasses(i, 100)[0];
+                // getGeneratedClasses throws a RuntimeException in cases where
+                // the javac exit code is not 0. If the original reason for the exception is
+                // a "java.lang.OutOfMemoryError: Java heap space",
+                // increase the heap size in the @run tag and rerun the test.
+                // The heap can be exhausted by this test, but heap exhaustion
+                // is not a failure mode of this test and should be ignored.
+                c = gcl.getGeneratedClasses(i, 100)[0];
                 c.newInstance();
                 c = null;
 
                 gcl = null;
-            } catch (IOException|InstantiationException|IllegalAccessException ex) {
+            } catch (IOException | InstantiationException | IllegalAccessException ex) {
                 throw new RuntimeException(ex);
             }
         }