RFR:8047290:Ensure consistent safepoint checking in MutexLockerEx
Max Ockner
max.ockner at oracle.com
Wed Oct 15 18:04:10 UTC 2014
Hi all,
I am a new member of the Hotspot runtime team in Burlington, MA.
Please review my first fix related to safepoint checking.
Summary: MutexLockerEx can either acquire a lock with or without a
safepoint check.
In some cases, a particular lock must either safepoint check always or
never to avoid deadlocking.
Some other locks have semantics which allow them to avoid deadlocks
despite having a safepoint check only some of the time.
All locks that are OK having inconsistent safepoint checks have been
marked. All locks that should never safepoint check and all locks that
should always safepoint check have also been marked.
When a MutexLockerEx acquires a lock with or without a safepoint check,
the lock's safepointAllowed marker is checked to ensure consistent
safepoint checking.
Webrev: http://oklahoma.us.oracle.com/~mockner/webrev/8047290/
Bug: https://bugs.openjdk.java.net/browse/JDK-8047290
Tested with:
jprt "-testset hotspot"
jtreg hotspot
vm.quick.testlist
Whitebox tests:
test/runtime/Safepoint/AssertSafepointCheckConsistency1.java: Test
expects Assert ("This lock should always have a safepoint check")
test/runtime/Safepoint/AssertSafepointCheckConsistency2.java: Test
expects Assert ("This lock should never have a safepoint check")
test/runtime/Safepoint/AssertSafepointCheckConsistency3.java: code
should not assert. (Lock is properly acquired with no safepoint check)
test/runtime/Safepoint/AssertSafepointCheckConsistency4.java: code
should not assert. (Lock is properly acquired with safepoint check)
Thanks,
Max
More information about the hotspot-dev
mailing list