< prev index next >
test/compiler/rtm/locking/TestRTMTotalCountIncrRate.java
Print this page
rev 7600 : 8050486: compiler/rtm/ tests fail due to monitor deflation at safepoint synchronization
Reviewed-by:
*** 115,127 ****
return this.getClass().getName() + "::lock";
}
@Override
public String[] getMethodsToCompileNames() {
! return new String[] {
! getMethodWithLockName()
! };
}
public void lock() {
synchronized(monitor) {
Test.field++;
--- 115,125 ----
return this.getClass().getName() + "::lock";
}
@Override
public String[] getMethodsToCompileNames() {
! return new String[] { getMethodWithLockName() };
}
public void lock() {
synchronized(monitor) {
Test.field++;
*** 133,147 ****
* Test <inflate monitor>
*/
public static void main(String args[]) throws Throwable {
Asserts.assertGTE(args.length, 1, "One argument required.");
Test test = new Test();
!
! if (Boolean.valueOf(args[0])) {
AbortProvoker.inflateMonitor(test.monitor);
}
for (long i = 0L; i < Test.TOTAL_ITERATIONS; i++) {
test.lock();
}
}
}
--- 131,147 ----
* Test <inflate monitor>
*/
public static void main(String args[]) throws Throwable {
Asserts.assertGTE(args.length, 1, "One argument required.");
Test test = new Test();
! boolean shouldBeInflated = Boolean.valueOf(args[0]);
! if (shouldBeInflated) {
AbortProvoker.inflateMonitor(test.monitor);
}
for (long i = 0L; i < Test.TOTAL_ITERATIONS; i++) {
+ AbortProvoker.verifyMonitorState(test.monitor,
+ shouldBeInflated);
test.lock();
}
}
}
< prev index next >