8213150: Add verification for locking by VMThread

Extend verification for all locking not just VMOperations, and fix CLDG lock to not be taken by VM thread.

Reviewed-by: rehn, dholmes
This commit is contained in:
Coleen Phillimore 2019-09-24 10:12:56 -04:00
parent 11d43732bc
commit e49e9292d3
14 changed files with 148 additions and 125 deletions

View file

@ -419,7 +419,7 @@ void ObjectSynchronizer::jni_exit(oop obj, Thread* THREAD) {
ObjectLocker::ObjectLocker(Handle obj, Thread* thread, bool do_lock) {
_dolock = do_lock;
_thread = thread;
_thread->check_for_valid_safepoint_state(false);
_thread->check_for_valid_safepoint_state();
_obj = obj;
if (_dolock) {