equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
23 */ |
23 */ |
24 |
24 |
25 package compiler.testlibrary.rtm; |
25 package compiler.testlibrary.rtm; |
26 |
26 |
27 import jdk.internal.misc.Unsafe; |
27 import jdk.internal.misc.Unsafe; |
28 import jdk.test.lib.unsafe.UnsafeHelper; |
|
29 |
28 |
30 /** |
29 /** |
31 * Current RTM locking implementation force transaction abort |
30 * Current RTM locking implementation force transaction abort |
32 * before native method call by explicit xabort(0) call. |
31 * before native method call by explicit xabort(0) call. |
33 */ |
32 */ |
34 class XAbortProvoker extends AbortProvoker { |
33 class XAbortProvoker extends AbortProvoker { |
35 // Following field have to be static in order to avoid escape analysis. |
34 // Following field have to be static in order to avoid escape analysis. |
36 @SuppressWarnings("UnsuedDeclaration") |
35 @SuppressWarnings("UnsuedDeclaration") |
37 private static int field = 0; |
36 private static int field = 0; |
38 private static final Unsafe UNSAFE = UnsafeHelper.getUnsafe(); |
37 private static final Unsafe UNSAFE = Unsafe.getUnsafe(); |
39 |
38 |
40 public XAbortProvoker() { |
39 public XAbortProvoker() { |
41 this(new Object()); |
40 this(new Object()); |
42 } |
41 } |
43 |
42 |