Path: blob/master/test/hotspot/jtreg/compiler/intrinsics/unsafe/HeapByteBufferTest.java
64507 views
/*1* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.2* Copyright (c) 2016, Red Hat Inc. All rights reserved.3* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.4*5* This code is free software; you can redistribute it and/or modify it6* under the terms of the GNU General Public License version 2 only, as7* published by the Free Software Foundation.8*9* This code is distributed in the hope that it will be useful, but WITHOUT10* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12* version 2 for more details (a copy is included in the LICENSE file that13* accompanied this code).14*15* You should have received a copy of the GNU General Public License version16* 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 USA20* or visit www.oracle.com if you need additional information or have any21* questions.22*/2324/**25* @test26* @bug 8026049 815116327* @summary Verify that byte buffers are correctly accessed.28* @modules java.base/jdk.internal.misc29* @library /test/lib30*31* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:-UseUnalignedAccesses -Djdk.test.lib.random.seed=4232* HeapByteBufferTest33* @run main/othervm -Djdk.test.lib.random.seed=4234* HeapByteBufferTest35*/3637/**38* @test39* @bug 828255540* @summary intermittent, check that spilling MoveF2I etc produce memory edge41* @modules java.base/jdk.internal.misc42* @library /test/lib43*44* @run main/othervm -Djdk.test.lib.random.seed=4245* -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:+OptoScheduling46* HeapByteBufferTest47* @run main/othervm48* -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:+OptoScheduling49* HeapByteBufferTest50*/5152public class HeapByteBufferTest extends ByteBufferTest {5354public HeapByteBufferTest(long iterations, boolean direct) {55super(iterations, direct);56}5758public static void main(String[] args) {59// The number of iterations is high to ensure that tiered60// compilation kicks in all the way up to C2.61long iterations = 100000;62if (args.length > 0)63iterations = Long.parseLong(args[0]);6465new HeapByteBufferTest(iterations, false).run();66}67}686970