test/compiler/6896617/Test6896617.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff test/compiler/6896617/Test6896617.java

test/compiler/6896617/Test6896617.java

Print this page
rev 7259 : 8044186: Introduce a reproducible random generator
Reviewed-by: iignatyev
Contributed-by: sergei.kovalev@oracle.com

*** 1,7 **** /* ! * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 23,39 **** /* * @test * @bug 6896617 * @summary Optimize sun.nio.cs.ISO_8859_1$Encode.encodeArrayLoop() with SSE instructions on x86 * @run main/othervm/timeout=1200 -Xbatch -Xmx256m Test6896617 * */ ! import java.util.*; ! import java.nio.*; ! import java.nio.charset.*; public class Test6896617 { final static int SIZE = 256; public static void main(String[] args) { --- 23,46 ---- /* * @test * @bug 6896617 * @summary Optimize sun.nio.cs.ISO_8859_1$Encode.encodeArrayLoop() with SSE instructions on x86 + * @library /testlibrary * @run main/othervm/timeout=1200 -Xbatch -Xmx256m Test6896617 * */ ! import com.oracle.java.testlibrary.Utils; ! import java.nio.ByteBuffer; ! import java.nio.CharBuffer; ! import java.nio.charset.Charset; ! import java.nio.charset.CharsetDecoder; ! import java.nio.charset.CharsetEncoder; ! import java.nio.charset.CodingErrorAction; ! import java.util.Arrays; ! import java.util.Random; public class Test6896617 { final static int SIZE = 256; public static void main(String[] args) {
*** 52,62 **** // Use internal API for tests. sun.nio.cs.ArrayEncoder arrenc = (sun.nio.cs.ArrayEncoder)enc; sun.nio.cs.ArrayDecoder arrdec = (sun.nio.cs.ArrayDecoder)dec; // Populate char[] with chars which can be encoded by ISO_8859_1 (<= 0xFF) ! Random rnd = new Random(0); int maxchar = 0xFF; char[] a = new char[SIZE]; byte[] b = new byte[SIZE]; char[] at = new char[SIZE]; byte[] bt = new byte[SIZE]; --- 59,69 ---- // Use internal API for tests. sun.nio.cs.ArrayEncoder arrenc = (sun.nio.cs.ArrayEncoder)enc; sun.nio.cs.ArrayDecoder arrdec = (sun.nio.cs.ArrayDecoder)dec; // Populate char[] with chars which can be encoded by ISO_8859_1 (<= 0xFF) ! Random rnd = Utils.getRandomInstance(); int maxchar = 0xFF; char[] a = new char[SIZE]; byte[] b = new byte[SIZE]; char[] at = new char[SIZE]; byte[] bt = new byte[SIZE];
test/compiler/6896617/Test6896617.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File