< prev index next >

test/compiler/c2/cr8004867/TestIntAtomicVolatile.java

Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke


  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 
  25 /**
  26  * @test
  27  * @bug 8004867
  28  * @summary VM crashing with assert "share/vm/opto/node.hpp:357 - assert(i < _max) failed: oob"
  29  *
  30  * @run main/othervm/timeout=300 -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:-TieredCompilation -XX:-OptimizeFill TestIntAtomicVolatile
  31  * @run main/othervm/timeout=300 -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:-TieredCompilation -XX:+OptimizeFill TestIntAtomicVolatile




  32  */
  33 


  34 import java.util.concurrent.atomic.AtomicIntegerArray;
  35 
  36 public class TestIntAtomicVolatile {
  37   private static final int ARRLEN = 97;
  38   private static final int ITERS  = 11000;
  39   private static final int OFFSET = 3;
  40   private static final int SCALE = 2;
  41   private static final int ALIGN_OFF = 8;
  42   private static final int UNALIGN_OFF = 5;
  43 
  44   public static void main(String args[]) {
  45     System.out.println("Testing Integer array atomic volatile operations");
  46     int errn = test(false);
  47     if (errn > 0) {
  48       System.err.println("FAILED: " + errn + " errors");
  49       System.exit(97);
  50     }
  51     System.out.println("PASSED");
  52   }
  53 




  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 
  25 /**
  26  * @test
  27  * @bug 8004867
  28  * @summary VM crashing with assert "share/vm/opto/node.hpp:357 - assert(i < _max) failed: oob"
  29  *
  30  * @run main/othervm/timeout=300 -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:-TieredCompilation
  31  *    -XX:-OptimizeFill
  32  *    compiler.c2.cr8004867.TestIntAtomicVolatile
  33  * @run main/othervm/timeout=300 -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:-TieredCompilation
  34  *    -XX:+OptimizeFill
  35  *    compiler.c2.cr8004867.TestIntAtomicVolatile
  36  */
  37 
  38 package compiler.c2.cr8004867;
  39 
  40 import java.util.concurrent.atomic.AtomicIntegerArray;
  41 
  42 public class TestIntAtomicVolatile {
  43   private static final int ARRLEN = 97;
  44   private static final int ITERS  = 11000;
  45   private static final int OFFSET = 3;
  46   private static final int SCALE = 2;
  47   private static final int ALIGN_OFF = 8;
  48   private static final int UNALIGN_OFF = 5;
  49 
  50   public static void main(String args[]) {
  51     System.out.println("Testing Integer array atomic volatile operations");
  52     int errn = test(false);
  53     if (errn > 0) {
  54       System.err.println("FAILED: " + errn + " errors");
  55       System.exit(97);
  56     }
  57     System.out.println("PASSED");
  58   }
  59 


< prev index next >