equal
deleted
inserted
replaced
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.Utils; |
28 import jdk.test.lib.unsafe.UnsafeHelper; |
29 |
29 |
30 /** |
30 /** |
31 * Current RTM locking implementation force transaction abort |
31 * Current RTM locking implementation force transaction abort |
32 * before native method call by explicit xabort(0) call. |
32 * before native method call by explicit xabort(0) call. |
33 */ |
33 */ |
34 class XAbortProvoker extends AbortProvoker { |
34 class XAbortProvoker extends AbortProvoker { |
35 // Following field have to be static in order to avoid escape analysis. |
35 // Following field have to be static in order to avoid escape analysis. |
36 @SuppressWarnings("UnsuedDeclaration") |
36 @SuppressWarnings("UnsuedDeclaration") |
37 private static int field = 0; |
37 private static int field = 0; |
38 private static final Unsafe UNSAFE = Utils.getUnsafe(); |
38 private static final Unsafe UNSAFE = UnsafeHelper.getUnsafe(); |
39 |
39 |
40 public XAbortProvoker() { |
40 public XAbortProvoker() { |
41 this(new Object()); |
41 this(new Object()); |
42 } |
42 } |
43 |
43 |