8204966: [TESTBUG] hotspot/test/compiler/whitebox/IsMethodCompilableTest.java test fails with -XX:CompileThreshold=1
authordbuck
Mon, 06 Aug 2018 22:30:37 -0400
changeset 51355 9fb336cee537
parent 51354 3cc181307917
child 51356 88d9be7f52c5
8204966: [TESTBUG] hotspot/test/compiler/whitebox/IsMethodCompilableTest.java test fails with -XX:CompileThreshold=1 Summary: enforce lower bound on number of loop iterations used to trigger OSR Reviewed-by: kvn, iignatyev
test/hotspot/jtreg/compiler/whitebox/CompilerWhiteBoxTest.java
--- a/test/hotspot/jtreg/compiler/whitebox/CompilerWhiteBoxTest.java	Mon Aug 06 20:44:14 2018 -0400
+++ b/test/hotspot/jtreg/compiler/whitebox/CompilerWhiteBoxTest.java	Mon Aug 06 22:30:37 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, 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
@@ -85,8 +85,8 @@
             BACKEDGE_THRESHOLD = THRESHOLD = 150000;
         } else {
             THRESHOLD = COMPILE_THRESHOLD;
-            BACKEDGE_THRESHOLD = COMPILE_THRESHOLD * Long.parseLong(getVMOption(
-                    "OnStackReplacePercentage"));
+            BACKEDGE_THRESHOLD = Math.max(10000, COMPILE_THRESHOLD *
+                    Long.parseLong(getVMOption("OnStackReplacePercentage")));
         }
     }