提交 254d98ac 编写于 作者: G gromero

8204134: jtreg: Fix RTM abort provoker for various tests after "8149159: Clean up Unsafe"

Reviewed-by: kvn, iignatyev
上级 721ba6c5
...@@ -136,7 +136,7 @@ public class TestRTMAbortRatio { ...@@ -136,7 +136,7 @@ public class TestRTMAbortRatio {
public void lock(boolean abort) { public void lock(boolean abort) {
synchronized(monitor) { synchronized(monitor) {
if (abort) { if (abort) {
Test.UNSAFE.addressSize(); Test.UNSAFE.pageSize();
} }
} }
} }
......
...@@ -167,7 +167,7 @@ public class TestRTMAfterNonRTMDeopt { ...@@ -167,7 +167,7 @@ public class TestRTMAfterNonRTMDeopt {
synchronized(monitor) { synchronized(monitor) {
a[0]++; a[0]++;
if (abort) { if (abort) {
Test.field = Test.UNSAFE.addressSize(); Test.field = Test.UNSAFE.pageSize();
} }
} }
} catch (Throwable t) { } catch (Throwable t) {
......
...@@ -140,7 +140,7 @@ public class TestRTMDeoptOnLowAbortRatio { ...@@ -140,7 +140,7 @@ public class TestRTMDeoptOnLowAbortRatio {
public void forceAbort(boolean abort) { public void forceAbort(boolean abort) {
synchronized(monitor) { synchronized(monitor) {
if (abort) { if (abort) {
Test.UNSAFE.addressSize(); Test.UNSAFE.pageSize();
} }
} }
} }
......
...@@ -151,7 +151,7 @@ public class TestRTMLockingThreshold { ...@@ -151,7 +151,7 @@ public class TestRTMLockingThreshold {
public void lock(boolean abort) { public void lock(boolean abort) {
synchronized(monitor) { synchronized(monitor) {
if (abort) { if (abort) {
Test.field += Test.UNSAFE.addressSize(); Test.field += Test.UNSAFE.pageSize();
} }
} }
} }
......
...@@ -129,7 +129,7 @@ public class TestRTMTotalCountIncrRate { ...@@ -129,7 +129,7 @@ public class TestRTMTotalCountIncrRate {
// If an actual JNI call will be replaced by // If an actual JNI call will be replaced by
// intrinsic - we'll be in trouble, since xabort // intrinsic - we'll be in trouble, since xabort
// will be no longer called and test may fail. // will be no longer called and test may fail.
UNSAFE.addressSize(); UNSAFE.pageSize();
} }
Test.field++; Test.field++;
} }
......
...@@ -46,7 +46,7 @@ class XAbortProvoker extends AbortProvoker { ...@@ -46,7 +46,7 @@ class XAbortProvoker extends AbortProvoker {
@Override @Override
public void forceAbort() { public void forceAbort() {
synchronized(monitor) { synchronized(monitor) {
XAbortProvoker.field = UNSAFE.addressSize(); XAbortProvoker.field = UNSAFE.pageSize();
} }
} }
...@@ -54,7 +54,7 @@ class XAbortProvoker extends AbortProvoker { ...@@ -54,7 +54,7 @@ class XAbortProvoker extends AbortProvoker {
public String[] getMethodsToCompileNames() { public String[] getMethodsToCompileNames() {
return new String[] { return new String[] {
getMethodWithLockName(), getMethodWithLockName(),
Unsafe.class.getName() + "::addressSize" Unsafe.class.getName() + "::pageSize"
}; };
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册