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 import java.io.File; 24 import java.io.FileWriter; 25 import java.io.IOException; 26 import java.lang.reflect.Method; 27 import java.util.Properties; 28 29 import com.oracle.java.testlibrary.ByteCodeLoader; 30 import com.oracle.java.testlibrary.Platform; 31 import jdk.internal.org.objectweb.asm.ClassVisitor; 32 import jdk.internal.org.objectweb.asm.ClassWriter; 33 import jdk.internal.org.objectweb.asm.Label; 34 import jdk.internal.org.objectweb.asm.MethodVisitor; 35 import static jdk.internal.org.objectweb.asm.Opcodes.*; 36 37 import sun.hotspot.WhiteBox; 38 import uncommontrap.Verifier; 39 40 /* 41 * @test 42 * @bug 8030976 8059226 43 * @library /testlibrary /compiler/testlibrary /../../test/lib 44 * @modules java.base/jdk.internal.org.objectweb.asm 45 * java.base/sun.misc 46 * java.compiler 47 * java.management 48 * jdk.jvmstat/sun.jvmstat.monitor 49 * @build TestUnstableIfTrap com.oracle.java.testlibrary.* uncommontrap.Verifier 50 * @run main ClassFileInstaller sun.hotspot.WhiteBox 51 * sun.hotspot.WhiteBox$WhiteBoxPermission 52 * @run main/othervm -Xbatch -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions 53 * -XX:+WhiteBoxAPI -XX:+LogCompilation 54 * -XX:CompileCommand=compileonly,UnstableIfExecutable.test 55 * -XX:LogFile=always_taken_not_fired.xml 56 * TestUnstableIfTrap ALWAYS_TAKEN false 57 * @run main/othervm -Xbatch -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions 58 * -XX:+WhiteBoxAPI -XX:+LogCompilation 59 * -XX:CompileCommand=compileonly,UnstableIfExecutable.test 60 * -XX:LogFile=always_taken_fired.xml 61 * TestUnstableIfTrap ALWAYS_TAKEN true 62 * @run main/othervm -Xbatch -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions 63 * -XX:+WhiteBoxAPI -XX:+LogCompilation 64 * -XX:CompileCommand=compileonly,UnstableIfExecutable.test 65 * -XX:LogFile=never_taken_not_fired.xml 66 * TestUnstableIfTrap NEVER_TAKEN false 67 * @run main/othervm -Xbatch -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions 68 * -XX:+WhiteBoxAPI -XX:+LogCompilation 69 * -XX:CompileCommand=compileonly,UnstableIfExecutable.test | 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 import java.io.File; 24 import java.io.FileWriter; 25 import java.io.IOException; 26 import java.lang.reflect.Method; 27 import java.util.Properties; 28 29 import jdk.test.lib.ByteCodeLoader; 30 import jdk.test.lib.Platform; 31 import jdk.internal.org.objectweb.asm.ClassVisitor; 32 import jdk.internal.org.objectweb.asm.ClassWriter; 33 import jdk.internal.org.objectweb.asm.Label; 34 import jdk.internal.org.objectweb.asm.MethodVisitor; 35 import static jdk.internal.org.objectweb.asm.Opcodes.*; 36 37 import sun.hotspot.WhiteBox; 38 import uncommontrap.Verifier; 39 40 /* 41 * @test 42 * @bug 8030976 8059226 43 * @library /testlibrary /compiler/testlibrary /../../test/lib 44 * @modules java.base/jdk.internal.org.objectweb.asm 45 * java.base/sun.misc 46 * java.compiler 47 * java.management 48 * jdk.jvmstat/sun.jvmstat.monitor 49 * @build TestUnstableIfTrap jdk.test.lib.* uncommontrap.Verifier 50 * @run main ClassFileInstaller sun.hotspot.WhiteBox 51 * sun.hotspot.WhiteBox$WhiteBoxPermission 52 * @run main/othervm -Xbatch -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions 53 * -XX:+WhiteBoxAPI -XX:+LogCompilation 54 * -XX:CompileCommand=compileonly,UnstableIfExecutable.test 55 * -XX:LogFile=always_taken_not_fired.xml 56 * TestUnstableIfTrap ALWAYS_TAKEN false 57 * @run main/othervm -Xbatch -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions 58 * -XX:+WhiteBoxAPI -XX:+LogCompilation 59 * -XX:CompileCommand=compileonly,UnstableIfExecutable.test 60 * -XX:LogFile=always_taken_fired.xml 61 * TestUnstableIfTrap ALWAYS_TAKEN true 62 * @run main/othervm -Xbatch -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions 63 * -XX:+WhiteBoxAPI -XX:+LogCompilation 64 * -XX:CompileCommand=compileonly,UnstableIfExecutable.test 65 * -XX:LogFile=never_taken_not_fired.xml 66 * TestUnstableIfTrap NEVER_TAKEN false 67 * @run main/othervm -Xbatch -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions 68 * -XX:+WhiteBoxAPI -XX:+LogCompilation 69 * -XX:CompileCommand=compileonly,UnstableIfExecutable.test |