test/testlibrary_tests/whitebox/vm_flags/UintxTest.java

Mon, 28 Jul 2014 15:06:38 -0700

author
fzhinkin
date
Mon, 28 Jul 2014 15:06:38 -0700
changeset 6997
dbb05f6d93c4
parent 6963
0c48231c5c84
child 8441
cf1faa9100dd
permissions
-rw-r--r--

8051344: JVM crashed in Compile::start() during method parsing w/ UseRTMDeopt turned on
Summary: call rtm_deopt() only if there were no compilation bailouts before.
Reviewed-by: kvn

iignatyev@6963 1 /*
iignatyev@6963 2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
iignatyev@6963 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
iignatyev@6963 4 *
iignatyev@6963 5 * This code is free software; you can redistribute it and/or modify it
iignatyev@6963 6 * under the terms of the GNU General Public License version 2 only, as
iignatyev@6963 7 * published by the Free Software Foundation.
iignatyev@6963 8 *
iignatyev@6963 9 * This code is distributed in the hope that it will be useful, but WITHOUT
iignatyev@6963 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
iignatyev@6963 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
iignatyev@6963 12 * version 2 for more details (a copy is included in the LICENSE file that
iignatyev@6963 13 * accompanied this code).
iignatyev@6963 14 *
iignatyev@6963 15 * You should have received a copy of the GNU General Public License version
iignatyev@6963 16 * 2 along with this work; if not, write to the Free Software Foundation,
iignatyev@6963 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
iignatyev@6963 18 *
iignatyev@6963 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
iignatyev@6963 20 * or visit www.oracle.com if you need additional information or have any
iignatyev@6963 21 * questions.
iignatyev@6963 22 */
iignatyev@6963 23
iignatyev@6963 24 /*
iignatyev@6963 25 * @test UintxTest
iignatyev@6963 26 * @bug 8028756
iignatyev@6963 27 * @library /testlibrary /testlibrary/whitebox
iignatyev@6963 28 * @build UintxTest
iignatyev@6963 29 * @run main ClassFileInstaller sun.hotspot.WhiteBox
iignatyev@6963 30 * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI UintxTest
iignatyev@6963 31 * @summary testing of WB::set/getUintxVMFlag()
iignatyev@6963 32 * @author igor.ignatyev@oracle.com
iignatyev@6963 33 */
iignatyev@6963 34 import com.oracle.java.testlibrary.Platform;
iignatyev@6963 35
iignatyev@6963 36 public class UintxTest {
iignatyev@6963 37 private static final String FLAG_NAME = "TypeProfileLevel";
iignatyev@6963 38 private static final Long[] TESTS = {0L, 100L, (long) Integer.MAX_VALUE,
iignatyev@6963 39 (1L << 32L) - 1L, 1L << 32L};
iignatyev@6963 40 private static final Long[] EXPECTED_64 = TESTS;
iignatyev@6963 41 private static final Long[] EXPECTED_32 = {0L, 100L,
iignatyev@6963 42 (long) Integer.MAX_VALUE, (1L << 32L) - 1L, 0L};
iignatyev@6963 43
iignatyev@6963 44 public static void main(String[] args) throws Exception {
iignatyev@6963 45 VmFlagTest.runTest(FLAG_NAME, TESTS,
iignatyev@6963 46 Platform.is64bit() ? EXPECTED_64 : EXPECTED_32,
iignatyev@6963 47 VmFlagTest.WHITE_BOX::setUintxVMFlag,
iignatyev@6963 48 VmFlagTest.WHITE_BOX::getUintxVMFlag);
iignatyev@6963 49 }
iignatyev@6963 50 }
iignatyev@6963 51

mercurial