hotspot/test/compiler/whitebox/BlockingCompilation.java
author bharadwaj
Tue, 05 Apr 2016 20:32:54 +0000
changeset 37295 e00dfcc21fa1
parent 36608 f8bb5522b4e4
child 38218 f5ba1dea04eb
child 38152 80e5da81fb2c
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36597
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
     1
/*
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
     2
 * Copyright (c) 2016 SAP SE. All rights reserved.
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
     4
 *
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
     7
 * published by the Free Software Foundation.
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
     8
 *
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    13
 * accompanied this code).
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    14
 *
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    18
 *
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    21
 * questions.
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    22
 */
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    23
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    24
/*
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    25
 * @test
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    26
 * @bug 8150646
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    27
 * @summary Add support for blocking compiles through whitebox API
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    28
 * @library /testlibrary /test/lib /
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    29
 * @build sun.hotspot.WhiteBox
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    30
 *        compiler.testlibrary.CompilerUtils
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    31
 * @run main ClassFileInstaller sun.hotspot.WhiteBox
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    32
 *                              sun.hotspot.WhiteBox$WhiteBoxPermission
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    33
 *
36608
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    34
 * @run main/othervm/timeout=60
36597
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    35
 *        -Xbootclasspath/a:.
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    36
 *        -Xmixed
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    37
 *        -XX:+UnlockDiagnosticVMOptions
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    38
 *        -XX:+WhiteBoxAPI
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    39
 *        -XX:+PrintCompilation
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    40
 *        BlockingCompilation
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    41
 */
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    42
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    43
import java.lang.reflect.Method;
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    44
import java.util.Random;
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    45
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    46
import sun.hotspot.WhiteBox;
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    47
import compiler.testlibrary.CompilerUtils;
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    48
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    49
public class BlockingCompilation {
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    50
    private static final WhiteBox WB = WhiteBox.getWhiteBox();
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    51
    private static final Random RANDOM = new Random();
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    52
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    53
    public static int foo() {
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    54
        return RANDOM.nextInt();
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    55
    }
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    56
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    57
    public static void main(String[] args) throws Exception {
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    58
        Method m = BlockingCompilation.class.getMethod("foo");
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    59
        int[] levels = CompilerUtils.getAvailableCompilationLevels();
36608
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    60
        int highest_level = levels[levels.length-1];
36597
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    61
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    62
        // If there are no compilers available these tests don't make any sense.
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    63
        if (levels.length == 0) return;
36608
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    64
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    65
        // Make sure no compilations can progress, blocking compiles will hang
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    66
        WB.lockCompilation();
36597
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    67
36608
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    68
        // Verify method state before test
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    69
        if (WB.isMethodCompiled(m)) {
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    70
            throw new Exception("Should not be compiled after deoptimization");
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    71
        }
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    72
        if (WB.isMethodQueuedForCompilation(m)) {
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    73
            throw new Exception("Should not be enqueued on any level");
36597
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    74
        }
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    75
36608
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    76
        // Try compiling on highest available comp level.
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    77
        // If the compiles are blocking, this call will block until the test time out,
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    78
        // Progress == success
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    79
        // (Don't run with -Xcomp since that can cause long timeouts due to many compiles)
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    80
        WB.enqueueMethodForCompilation(m, highest_level);
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    81
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    82
        // restore state
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    83
        WB.unlockCompilation();
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    84
        while (!WB.isMethodCompiled(m)) {
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    85
          Thread.sleep(100);
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    86
        }
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    87
        WB.deoptimizeMethod(m);
36597
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    88
        WB.clearMethodState(m);
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    89
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    90
        // Blocking compilations on all levels, using the default versions of
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    91
        // WB.enqueueMethodForCompilation() and manually setting compiler directives.
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    92
        String directive = "[{ match: \"BlockingCompilation.foo\", BackgroundCompilation: false }]";
36608
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    93
        if (WB.addCompilerDirective(directive) != 1) {
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    94
            throw new Exception("Failed to add compiler directive");
36597
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    95
        }
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
    96
36608
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    97
        try {
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    98
            for (int l : levels) {
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
    99
                // Make uncompiled
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   100
                WB.deoptimizeMethod(m);
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   101
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   102
                // Verify that it's not compiled
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   103
                if (WB.isMethodCompiled(m)) {
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   104
                    throw new Exception("Should not be compiled after deoptimization");
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   105
                }
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   106
                if (WB.isMethodQueuedForCompilation(m)) {
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   107
                    throw new Exception("Should not be enqueued on any level");
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   108
                }
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   109
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   110
                // Add to queue and verify that it went well
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   111
                if (!WB.enqueueMethodForCompilation(m, l)) {
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   112
                    throw new Exception("Could not be enqueued for compilation");
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   113
                }
36597
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
   114
36608
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   115
                // Verify that it is compiled
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   116
                if (!WB.isMethodCompiled(m)) {
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   117
                    throw new Exception("Must be compiled here");
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   118
                }
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   119
                // And verify the level
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   120
                if (WB.getMethodCompilationLevel(m) != l) {
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   121
                    String msg = m + " should be compiled at level " + l +
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   122
                                 "(but is actually compiled at level " +
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   123
                                 WB.getMethodCompilationLevel(m) + ")";
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   124
                    System.out.println("==> " + msg);
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   125
                    throw new Exception(msg);
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   126
                }
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   127
            }
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   128
        } finally {
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   129
            WB.removeCompilerDirective(1);
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   130
        }
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   131
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   132
        // Clean up
36597
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
   133
        WB.deoptimizeMethod(m);
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
   134
        WB.clearMethodState(m);
36608
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   135
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   136
        // Make sure no compilations can progress, blocking compiles will hang
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   137
        WB.lockCompilation();
36597
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
   138
36608
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   139
        // Verify method state before test
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   140
        if (WB.isMethodCompiled(m)) {
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   141
            throw new Exception("Should not be compiled after deoptimization");
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   142
        }
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   143
        if (WB.isMethodQueuedForCompilation(m)) {
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   144
            throw new Exception("Should not be enqueued on any level");
36597
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
   145
        }
36608
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   146
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   147
        // Try compiling on highest available comp level.
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   148
        // If the compiles are blocking, this call will block until the test time out,
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   149
        // Progress == success
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   150
        // (Don't run with -Xcomp since that can cause long timeouts due to many compiles)
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   151
        WB.enqueueMethodForCompilation(m, highest_level);
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   152
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   153
        // restore state
f8bb5522b4e4 8151796: compiler/whitebox/BlockingCompilation.java fails due to method not compiled
neliasso
parents: 36597
diff changeset
   154
        WB.unlockCompilation();
36597
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
   155
    }
ee256e343585 8150646: Add support for blocking compiles though whitebox API
simonis
parents:
diff changeset
   156
}