equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2014, 2015, 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. |
117 @Override |
117 @Override |
118 public String[] getMethodsToCompileNames() { |
118 public String[] getMethodsToCompileNames() { |
119 return new String[] { getMethodWithLockName() }; |
119 return new String[] { getMethodWithLockName() }; |
120 } |
120 } |
121 |
121 |
122 public void lock(booleab forceAbort) { |
122 public void lock(boolean forceAbort) { |
123 synchronized(monitor) { |
123 synchronized(monitor) { |
124 if (forceAbort) { |
124 if (forceAbort) { |
125 // We're calling native method in order to force |
125 // We're calling native method in order to force |
126 // abort. It's done by explicit xabort call emitted |
126 // abort. It's done by explicit xabort call emitted |
127 // in SharedRuntime::generate_native_wrapper. |
127 // in SharedRuntime::generate_native_wrapper. |
128 // If an actuall JNI call will be replaced by |
128 // If an actual JNI call will be replaced by |
129 // intrinsic - we'll be in trouble, since xabort |
129 // intrinsic - we'll be in trouble, since xabort |
130 // will be no longer called and test may fail. |
130 // will be no longer called and test may fail. |
131 UNSAFE.addressSize(); |
131 UNSAFE.addressSize(); |
132 } |
132 } |
133 Test.field++; |
133 Test.field++; |