diff --git a/hotspot/test/compiler/8009761/Test8009761.java b/hotspot/test/compiler/8009761/Test8009761.java index b41f49fd9b1..e1ca5817899 100644 --- a/hotspot/test/compiler/8009761/Test8009761.java +++ b/hotspot/test/compiler/8009761/Test8009761.java @@ -245,7 +245,8 @@ static public void main(String[] args) { m3(false, true); } catch(StackOverflowError soe) { } - if (c1 != count) { + // Allow number of recursive calls to vary by 1 + if ((c1 < (count - 1)) || (c1 > (count + 1))) { System.out.println("Failed: init recursive calls: " + c1 + ". After deopt " + count); System.exit(97); } else {