8295413: com/sun/jdi/EATests.java fails with compiler flag -XX:+StressReflectiveCode
Reviewed-by: lmesnik, kvn, sspitsyn
This commit is contained in:
parent
65c84e0cf8
commit
08d3ef4fe6
@ -272,6 +272,7 @@ public class EATests extends TestScaffold {
|
||||
public final boolean DeoptimizeObjectsALot;
|
||||
public final boolean DoEscapeAnalysis;
|
||||
public final boolean ZGCIsSelected;
|
||||
public final boolean StressReflectiveCode;
|
||||
|
||||
public TargetVMOptions(EATests env, ClassType testCaseBaseTargetClass) {
|
||||
Value val;
|
||||
@ -286,6 +287,8 @@ public class EATests extends TestScaffold {
|
||||
UseJVMCICompiler = ((PrimitiveValue) val).booleanValue();
|
||||
val = testCaseBaseTargetClass.getValue(testCaseBaseTargetClass.fieldByName("ZGCIsSelected"));
|
||||
ZGCIsSelected = ((PrimitiveValue) val).booleanValue();
|
||||
val = testCaseBaseTargetClass.getValue(testCaseBaseTargetClass.fieldByName("StressReflectiveCode"));
|
||||
StressReflectiveCode = ((PrimitiveValue) val).booleanValue();
|
||||
}
|
||||
|
||||
}
|
||||
@ -395,6 +398,12 @@ abstract class EATestCaseBaseDebugger extends EATestCaseBaseShared {
|
||||
|
||||
public abstract void runTestCase() throws Exception;
|
||||
|
||||
@Override
|
||||
public boolean shouldSkip() {
|
||||
// Skip if StressReflectiveCode because it effectively disables escape analysis
|
||||
return super.shouldSkip() || env.targetVMOptions.StressReflectiveCode;
|
||||
}
|
||||
|
||||
public void run(EATests env) {
|
||||
this.env = env;
|
||||
if (shouldSkip()) {
|
||||
@ -764,6 +773,7 @@ abstract class EATestCaseBaseTarget extends EATestCaseBaseShared implements Runn
|
||||
public static final boolean EliminateAllocations = unbox(WB.getBooleanVMFlag("EliminateAllocations"), UseJVMCICompiler);
|
||||
public static final boolean DeoptimizeObjectsALot = WB.getBooleanVMFlag("DeoptimizeObjectsALot");
|
||||
public static final boolean ZGCIsSelected = GC.Z.isSelected();
|
||||
public static final boolean StressReflectiveCode = unbox(WB.getBooleanVMFlag("StressReflectiveCode"), false);
|
||||
|
||||
public String testMethodName;
|
||||
public int testMethodDepth;
|
||||
@ -793,6 +803,12 @@ abstract class EATestCaseBaseTarget extends EATestCaseBaseShared implements Runn
|
||||
public static final Long CONST_2_OBJ = Long.valueOf(2);
|
||||
public static final Long CONST_3_OBJ = Long.valueOf(3);
|
||||
|
||||
@Override
|
||||
public boolean shouldSkip() {
|
||||
// Skip if StressReflectiveCode because it effectively disables escape analysis
|
||||
return super.shouldSkip() || StressReflectiveCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Main driver of a test case.
|
||||
* <ul>
|
||||
|
Loading…
x
Reference in New Issue
Block a user