test/compiler/8009761/Test8009761.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/test/compiler/8009761/Test8009761.java Wed Jun 25 13:35:35 2014
--- new/test/compiler/8009761/Test8009761.java Wed Jun 25 13:35:35 2014
*** 38,47 ****
--- 38,48 ----
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=exclude,Test8009761::m2 -XX:-UseOnStackReplacement -XX:-BackgroundCompilation -Xss256K Test8009761
*/
public class Test8009761 {
private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
+ private static int COMP_LEVEL_SIMPLE = 1;
private static int COMP_LEVEL_FULL_OPTIMIZATION = 4;
private static Method m3 = null;
static Object m1(boolean deopt) {
// When running interpreted, on sparc, the caller's stack is
*** 254,264 ****
--- 255,269 ----
} catch(StackOverflowError soe) {
}
c1 = count;
// Force the compilation of m3() that will inline m1()
WHITE_BOX.enqueueMethodForCompilation(m3, COMP_LEVEL_FULL_OPTIMIZATION);
+ if(!WHITE_BOX.enqueueMethodForCompilation(m3, COMP_LEVEL_FULL_OPTIMIZATION)) {
+ // C2 compiler not available, compile with C1
+ WHITE_BOX.enqueueMethodForCompilation(m3, COMP_LEVEL_SIMPLE);
+ }
+
// Because background compilation is disabled, method should now be compiled
if(!WHITE_BOX.isMethodCompiled(m3)) {
throw new RuntimeException(m3 + " not compiled");
}
test/compiler/8009761/Test8009761.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File