# HG changeset patch # User andrew # Date 1619051598 -3600 # Node ID a72255eaef654899cecda3a8b3eac59396729a51 # Parent 2d0ba7271ce2cef92e2f637e62e620c6a0626566# Parent 3c9174cba47b2d4b5ac8e91b8e641ea1ce65d32c Merge diff -r 2d0ba7271ce2 -r a72255eaef65 src/cpu/aarch64/vm/stubGenerator_aarch64.cpp --- 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); } diff -r 2d0ba7271ce2 -r a72255eaef65 src/cpu/ppc/vm/frame_ppc.cpp --- 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 diff -r 2d0ba7271ce2 -r a72255eaef65 src/share/vm/adlc/output_h.cpp --- 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() { } diff -r 2d0ba7271ce2 -r a72255eaef65 test/Makefile --- 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 diff -r 2d0ba7271ce2 -r a72255eaef65 test/gc/arguments/TestAggressiveHeap.java --- 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()); diff -r 2d0ba7271ce2 -r a72255eaef65 test/runtime/Metaspace/FragmentMetaspace.java --- 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); } }