Path: blob/master/test/hotspot/jtreg/vmTestbase/vm/compiler/coverage/parentheses/TestDescription.java
41161 views
/*1* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/222324/*25* @test26* @key randomness27* @modules java.base/jdk.internal.org.objectweb.asm:+open java.base/jdk.internal.misc:+open28*29* @summary converted from VM Testbase vm/compiler/coverage/parentheses.30* VM Testbase keywords: [quick, stressopt, jit]31* VM Testbase readme:32* DESCRIPTION33* This test works as follows:34* 1. Generates random proper list of following JVM instructions:35* -Integer constants: ICONST_M1, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_536* -Integer arithmetics: IADD, ISUB, IMUL, IAND, IOR, IXOR, ISHL, ISHR, INEG37* -Stack operations: DUP, SWAP38* -NOP39* (If loadFrom command line option is setted, test will be use instruction sequence from file.40* It is useful for reproducing failures.)41* 2. Executes this sequence in to ways: with TinyInstructionsExecutor and HotspotInstructionsExecutor.42* 3. Checks that results of execution are equals.43* For generation instructions test using right parentheses sequence. Open parenthesis "(" is correspondent to44* stack increasing instructions, ")" is corresponded stack decreasing instructions.45*46* @library /vmTestbase47* /test/lib48* @run main/othervm vm.compiler.coverage.parentheses.Parentheses49*/50515253