--- old/test/jdk/com/sun/jdi/EATests.java 2020-07-12 22:24:47.815397660 +0200 +++ new/test/jdk/com/sun/jdi/EATests.java 2020-07-12 22:24:47.407396880 +0200 @@ -32,7 +32,6 @@ * * @run build TestScaffold VMConnection TargetListener TargetAdapter sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox - * sun.hotspot.WhiteBox$WhiteBoxPermission * @run compile -g EATests.java * @run driver EATests * -XX:+UnlockDiagnosticVMOptions @@ -91,7 +90,7 @@ * -Xbatch * -XX:-DoEscapeAnalysis -XX:-EliminateAllocations -XX:+EliminateLocks -XX:+EliminateNestedLocks -XX:-UseBiasedLocking * - * @comment Excercise -XX:DeoptimizeObjectsALot. Mostly to prevent bit-rot, because the option is meant to stress object deoptimization + * @comment Excercise -XX:+DeoptimizeObjectsALot. Mostly to prevent bit-rot, because the option is meant to stress object deoptimization * with non-synthetic workloads. * @run driver EATests * -XX:+UnlockDiagnosticVMOptions @@ -101,20 +100,20 @@ * -XX:+WhiteBoxAPI * -Xbatch * -XX:-DoEscapeAnalysis -XX:-EliminateAllocations -XX:+EliminateLocks -XX:+EliminateNestedLocks -XX:-UseBiasedLocking - * -XX:+IgnoreUnrecognizedVMOptions -XX:DeoptimizeObjectsALot=2 -XX:DeoptimizeObjectsALotThreadCount=2 + * -XX:+IgnoreUnrecognizedVMOptions -XX:+DeoptimizeObjectsALot */ +import com.sun.jdi.*; +import com.sun.jdi.event.*; +import compiler.testlibrary.CompilerUtils; +import compiler.whitebox.CompilerWhiteBoxTest; + import java.lang.reflect.Array; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.function.Function; -import com.sun.jdi.*; -import com.sun.jdi.event.*; - -import compiler.testlibrary.CompilerUtils; -import compiler.whitebox.CompilerWhiteBoxTest; import jdk.test.lib.Asserts; import sun.hotspot.WhiteBox; @@ -247,13 +246,13 @@ public final boolean UseJVMCICompiler; public final boolean EliminateAllocations; - public final int DeoptimizeObjectsALot; + public final boolean DeoptimizeObjectsALot; public TargetVMOptions(EATests env, ClassType testCaseBaseTargetClass) { Value val = testCaseBaseTargetClass.getValue(testCaseBaseTargetClass.fieldByName("EliminateAllocations")); EliminateAllocations = ((PrimitiveValue) val).booleanValue(); val = testCaseBaseTargetClass.getValue(testCaseBaseTargetClass.fieldByName("DeoptimizeObjectsALot")); - DeoptimizeObjectsALot = ((PrimitiveValue) val).intValue(); + DeoptimizeObjectsALot = ((PrimitiveValue) val).booleanValue(); val = testCaseBaseTargetClass.getValue(testCaseBaseTargetClass.fieldByName("UseJVMCICompiler")); UseJVMCICompiler = ((PrimitiveValue) val).booleanValue(); } @@ -724,7 +723,7 @@ public static final boolean UseJVMCICompiler = unbox(WB.getBooleanVMFlag("UseJVMCICompiler"), false); // read by debugger public static final boolean DoEscapeAnalysis = unbox(WB.getBooleanVMFlag("DoEscapeAnalysis"), UseJVMCICompiler); public static final boolean EliminateAllocations = unbox(WB.getBooleanVMFlag("EliminateAllocations"), UseJVMCICompiler); // read by debugger - public static final long DeoptimizeObjectsALot = WB.getIntVMFlag("DeoptimizeObjectsALot"); // read by debugger + public static final boolean DeoptimizeObjectsALot = WB.getBooleanVMFlag("DeoptimizeObjectsALot"); // read by debugger public static final long BiasedLockingBulkRebiasThreshold = WB.getIntxVMFlag("BiasedLockingBulkRebiasThreshold"); public static final long BiasedLockingBulkRevokeThreshold = WB.getIntxVMFlag("BiasedLockingBulkRevokeThreshold"); @@ -850,7 +849,7 @@ Asserts.assertEQ(testMethodName, frames[stackTraceDepth].getMethodName(), testCaseName + ": test method not found at depth " + testMethodDepth); // check if the frame is (not) deoptimized as expected - if (DeoptimizeObjectsALot == 0) { + if (!DeoptimizeObjectsALot) { if (testFrameShouldBeDeoptimized()) { Asserts.assertTrue(WB.isFrameDeoptimized(testMethodDepth+1), testCaseName + ": expected test method frame at depth " + testMethodDepth + " to be deoptimized"); @@ -1738,7 +1737,7 @@ ///////////////////////////////////////////////////////////////////////////// -// Object ref l1 is retrieved by the debugger at a location where nested lockes are ommitted. The +// Object ref l1 is retrieved by the debugger at a location where nested locks are omitted. The // accessed object is globally reachable already before the access, therefore no relocking is done. class EARelockingNestedInflatedTarget extends EATestCaseBaseTarget { @@ -2544,9 +2543,9 @@ @Override public boolean shouldSkip() { - // OOMEs because of realloc failures with DeoptimizeObjectsALot > 0 are too random. - // And graal currently doesn't provide all information about non-escaping objects in debug info - return super.shouldSkip() || (env.targetVMOptions.DeoptimizeObjectsALot > 0) || env.targetVMOptions.UseJVMCICompiler; + // OOMEs because of realloc failures with DeoptimizeObjectsALot are too random. + // And Graal currently doesn't provide all information about non-escaping objects in debug info + return super.shouldSkip() || env.targetVMOptions.DeoptimizeObjectsALot || env.targetVMOptions.UseJVMCICompiler; } } @@ -2584,9 +2583,9 @@ @Override public boolean shouldSkip() { - // OOMEs because of realloc failures with DeoptimizeObjectsALot > 0 are too random. - // And graal currently doesn't provide all information about non-escaping objects in debug info - return super.shouldSkip() || (DeoptimizeObjectsALot > 0) || UseJVMCICompiler; + // OOMEs because of realloc failures with DeoptimizeObjectsALot are too random. + // And Graal currently doesn't provide all information about non-escaping objects in debug info + return super.shouldSkip() || DeoptimizeObjectsALot || UseJVMCICompiler; } } @@ -2633,9 +2632,9 @@ @Override public boolean shouldSkip() { - // OOMEs because of realloc failures with DeoptimizeObjectsALot > 0 are too random. - // And graal currently doesn't provide all information about non-escaping objects in debug info - return super.shouldSkip() || (env.targetVMOptions.DeoptimizeObjectsALot > 0) || env.targetVMOptions.UseJVMCICompiler; + // OOMEs because of realloc failures with DeoptimizeObjectsALot are too random. + // And Graal currently doesn't provide all information about non-escaping objects in debug info + return super.shouldSkip() || env.targetVMOptions.DeoptimizeObjectsALot || env.targetVMOptions.UseJVMCICompiler; } } @@ -2689,9 +2688,9 @@ @Override public boolean shouldSkip() { - // OOMEs because of realloc failures with DeoptimizeObjectsALot > 0 are too random. - // And graal currently doesn't provide all information about non-escaping objects in debug info - return super.shouldSkip() || (DeoptimizeObjectsALot > 0) || UseJVMCICompiler; + // OOMEs because of realloc failures with DeoptimizeObjectsALot are too random. + // And Graal currently doesn't provide all information about non-escaping objects in debug info + return super.shouldSkip() || DeoptimizeObjectsALot || UseJVMCICompiler; } } @@ -2890,9 +2889,9 @@ @Override public boolean shouldSkip() { - // OOMEs because of realloc failures with DeoptimizeObjectsALot > 0 are too random. + // OOMEs because of realloc failures with DeoptimizeObjectsALot are too random. // And Graal currently doesn't support Force Early Return - return super.shouldSkip() || (env.targetVMOptions.DeoptimizeObjectsALot > 0) || env.targetVMOptions.UseJVMCICompiler; + return super.shouldSkip() || env.targetVMOptions.DeoptimizeObjectsALot || env.targetVMOptions.UseJVMCICompiler; } } @@ -2947,9 +2946,9 @@ @Override public boolean shouldSkip() { - // OOMEs because of realloc failures with DeoptimizeObjectsALot > 0 are too random. + // OOMEs because of realloc failures with DeoptimizeObjectsALot are too random. // And Graal currently doesn't support Force Early Return - return super.shouldSkip() || (DeoptimizeObjectsALot > 0) || UseJVMCICompiler; + return super.shouldSkip() || DeoptimizeObjectsALot || UseJVMCICompiler; } }