Skip to content

Commit

Permalink
Shenandoah does not throw OOME when this tests expects it
Browse files Browse the repository at this point in the history
  • Loading branch information
earthling-amzn committed Dec 19, 2024
1 parent 1d7e999 commit 04d0ee8
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions test/jdk/com/sun/jdi/EATests.java
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ public static class TargetVMOptions {
public final boolean DeoptimizeObjectsALot;
public final boolean DoEscapeAnalysis;
public final boolean ZGCIsSelected;
public final boolean ShenandoahGCIsSelected;
public final boolean StressReflectiveCode;

public TargetVMOptions(EATests env, ClassType testCaseBaseTargetClass) {
Expand All @@ -331,6 +332,8 @@ public TargetVMOptions(EATests env, ClassType testCaseBaseTargetClass) {
UseJVMCICompiler = ((PrimitiveValue) val).booleanValue();
val = testCaseBaseTargetClass.getValue(testCaseBaseTargetClass.fieldByName("ZGCIsSelected"));
ZGCIsSelected = ((PrimitiveValue) val).booleanValue();
val = testCaseBaseTargetClass.getValue(testCaseBaseTargetClass.fieldByName("ShenandoahGCIsSelected"));
ShenandoahGCIsSelected = ((PrimitiveValue) val).booleanValue();
val = testCaseBaseTargetClass.getValue(testCaseBaseTargetClass.fieldByName("StressReflectiveCode"));
StressReflectiveCode = ((PrimitiveValue) val).booleanValue();
}
Expand Down Expand Up @@ -820,6 +823,7 @@ public static boolean unbox(Boolean value, boolean dflt) {
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 ShenandoahGCIsSelected = GC.Shenandoah.isSelected();
public static final boolean StressReflectiveCode = unbox(WB.getBooleanVMFlag("StressReflectiveCode"), false);

public String testMethodName;
Expand Down Expand Up @@ -2684,8 +2688,9 @@ public boolean shouldSkip() {
// And Graal currently doesn't provide all information about non-escaping objects in debug info
return super.shouldSkip() ||
!env.targetVMOptions.EliminateAllocations ||
// With ZGC the OOME is not always thrown as expected
// With ZGC or Shenandoah the OOME is not always thrown as expected
env.targetVMOptions.ZGCIsSelected ||
env.targetVMOptions.ShenandoahGCIsSelected ||
env.targetVMOptions.DeoptimizeObjectsALot ||
env.targetVMOptions.UseJVMCICompiler;
}
Expand Down Expand Up @@ -2729,8 +2734,9 @@ public boolean shouldSkip() {
// And Graal currently doesn't provide all information about non-escaping objects in debug info
return super.shouldSkip() ||
!EliminateAllocations ||
// With ZGC the OOME is not always thrown as expected
// With ZGC or Shenandoah the OOME is not always thrown as expected
ZGCIsSelected ||
ShenandoahGCIsSelected ||
DeoptimizeObjectsALot ||
UseJVMCICompiler;
}
Expand Down Expand Up @@ -2782,8 +2788,9 @@ public boolean shouldSkip() {
// And Graal currently doesn't provide all information about non-escaping objects in debug info
return super.shouldSkip() ||
!env.targetVMOptions.EliminateAllocations ||
// With ZGC the OOME is not always thrown as expected
// With ZGC or Shenandoah the OOME is not always thrown as expected
env.targetVMOptions.ZGCIsSelected ||
env.targetVMOptions.ShenandoahGCIsSelected ||
env.targetVMOptions.DeoptimizeObjectsALot ||
env.targetVMOptions.UseJVMCICompiler;
}
Expand Down Expand Up @@ -2843,8 +2850,9 @@ public boolean shouldSkip() {
// And Graal currently doesn't provide all information about non-escaping objects in debug info
return super.shouldSkip() ||
!EliminateAllocations ||
// With ZGC the OOME is not always thrown as expected
// With ZGC or Shenandoah the OOME is not always thrown as expected
ZGCIsSelected ||
ShenandoahGCIsSelected ||
DeoptimizeObjectsALot ||
UseJVMCICompiler;
}
Expand Down Expand Up @@ -3049,8 +3057,9 @@ public boolean shouldSkip() {
// And Graal currently doesn't support Force Early Return
return super.shouldSkip() ||
!env.targetVMOptions.EliminateAllocations ||
// With ZGC the OOME is not always thrown as expected
// With ZGC or Shenandoah the OOME is not always thrown as expected
env.targetVMOptions.ZGCIsSelected ||
env.targetVMOptions.ShenandoahGCIsSelected ||
env.targetVMOptions.DeoptimizeObjectsALot ||
env.targetVMOptions.UseJVMCICompiler;
}
Expand Down Expand Up @@ -3111,8 +3120,9 @@ public boolean shouldSkip() {
// And Graal currently doesn't support Force Early Return
return super.shouldSkip() ||
!EliminateAllocations ||
// With ZGC the OOME is not always thrown as expected
// With ZGC or Shenandoah the OOME is not always thrown as expected
ZGCIsSelected ||
ShenandoahGCIsSelected ||
DeoptimizeObjectsALot ||
UseJVMCICompiler;
}
Expand Down

0 comments on commit 04d0ee8

Please sign in to comment.