< prev index next >

test/compiler/whitebox/DeoptimizeMultipleOSRTest.java

Print this page




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import sun.hotspot.WhiteBox;
  25 import java.lang.reflect.Executable;
  26 import java.lang.reflect.Method;

  27 
  28 /*
  29  * @test DeoptimizeMultipleOSRTest
  30  * @bug 8061817
  31  * @library /testlibrary /../../test/lib
  32  * @modules java.management
  33  * @build DeoptimizeMultipleOSRTest
  34  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  35  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  36  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,DeoptimizeMultipleOSRTest::triggerOSR DeoptimizeMultipleOSRTest
  37  * @summary testing of WB::deoptimizeMethod()
  38  */
  39 public class DeoptimizeMultipleOSRTest {
  40     private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
  41     private static final long BACKEDGE_THRESHOLD = 150000;
  42     private Method method;
  43     private int counter = 0;
  44 
  45     public static void main(String[] args) throws Exception {
  46         DeoptimizeMultipleOSRTest test = new DeoptimizeMultipleOSRTest();
  47         test.test();
  48     }
  49 
  50     /**
  51      * Triggers two different OSR compilations for the same method and




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import sun.hotspot.WhiteBox;
  25 import java.lang.reflect.Executable;
  26 import java.lang.reflect.Method;
  27 import compiler.whitebox.CompilerWhiteBoxTest;
  28 
  29 /*
  30  * @test DeoptimizeMultipleOSRTest
  31  * @bug 8061817
  32  * @library /testlibrary /../../test/lib /
  33  * @modules java.management
  34  * @build DeoptimizeMultipleOSRTest
  35  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  36  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  37  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,DeoptimizeMultipleOSRTest::triggerOSR DeoptimizeMultipleOSRTest
  38  * @summary testing of WB::deoptimizeMethod()
  39  */
  40 public class DeoptimizeMultipleOSRTest {
  41     private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
  42     private static final long BACKEDGE_THRESHOLD = 150000;
  43     private Method method;
  44     private int counter = 0;
  45 
  46     public static void main(String[] args) throws Exception {
  47         DeoptimizeMultipleOSRTest test = new DeoptimizeMultipleOSRTest();
  48         test.test();
  49     }
  50 
  51     /**
  52      * Triggers two different OSR compilations for the same method and


< prev index next >