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 * @test
26 * @key randomness
27 * @bug 8059022
28 * @modules java.base/jdk.internal.misc:+open
29 * @summary Validate barriers after Unsafe getReference, CAS and swap (GetAndSet)
30 * @requires vm.gc.Z & !vm.graal.enabled
31 * @library /test/lib
32 * @run main/othervm -XX:+UseZGC -XX:+UnlockDiagnosticVMOptions -XX:+ZVerifyViews -XX:ZCollectionInterval=1 -XX:-CreateCoredumpOnCrash -XX:CompileCommand=dontinline,*::mergeImpl* compiler.gcbarriers.UnsafeIntrinsicsTest
33 */
34
35 package compiler.gcbarriers;
36
37 import java.lang.reflect.Field;
38 import java.util.ArrayList;
39 import java.util.Random;
40 import jdk.test.lib.Utils;
41 import sun.misc.Unsafe;
42
43 public class UnsafeIntrinsicsTest {
44
45 /*
46 * This test triggers the loadbarriers by allocating a lot, keeping the objects alive and then
47 * letting them die in a way that maximizes fragmentation.
48 *
49 * All subtests (OperationType's) could run in parallel.
50 */
|
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 * @test
26 * @key randomness
27 * @bug 8059022
28 * @modules java.base/jdk.internal.misc:+open
29 * @summary Validate barriers after Unsafe getReference, CAS and swap (GetAndSet)
30 * @requires vm.gc.Z
31 * @library /test/lib
32 * @run main/othervm -XX:+UseZGC -XX:+UnlockDiagnosticVMOptions -XX:+ZVerifyViews -XX:ZCollectionInterval=1 -XX:-CreateCoredumpOnCrash -XX:CompileCommand=dontinline,*::mergeImpl* compiler.gcbarriers.UnsafeIntrinsicsTest
33 */
34
35 package compiler.gcbarriers;
36
37 import java.lang.reflect.Field;
38 import java.util.ArrayList;
39 import java.util.Random;
40 import jdk.test.lib.Utils;
41 import sun.misc.Unsafe;
42
43 public class UnsafeIntrinsicsTest {
44
45 /*
46 * This test triggers the loadbarriers by allocating a lot, keeping the objects alive and then
47 * letting them die in a way that maximizes fragmentation.
48 *
49 * All subtests (OperationType's) could run in parallel.
50 */
|