diff src/share/vm/runtime/synchronizer.cpp @ 702:b9fba36710f2

6699669: Hotspot server leaves synchronized block with monitor in bad state Summary: Remove usage of _highest_lock field in Thread so that is_lock_owned won't depend on the correct update of that field. Reviewed-by: never, dice, acorn
author xlu
date Mon, 06 Apr 2009 15:47:39 -0700
parents 0fbdb4381b99
children b30a2cd5e3a2 c18cbe5936b8 b96a3e44582f
line wrap: on
line diff
--- a/src/share/vm/runtime/synchronizer.cpp	Fri Apr 03 15:59:19 2009 -0700
+++ b/src/share/vm/runtime/synchronizer.cpp	Mon Apr 06 15:47:39 2009 -0700
@@ -1117,10 +1117,10 @@
 
           // Optimization: if the mark->locker stack address is associated
           // with this thread we could simply set m->_owner = Self and
-          // m->OwnerIsThread = 1.  Note that a thread can inflate an object
+          // m->OwnerIsThread = 1. Note that a thread can inflate an object
           // that it has stack-locked -- as might happen in wait() -- directly
           // with CAS.  That is, we can avoid the xchg-NULL .... ST idiom.
-          m->set_owner (mark->locker());
+          m->set_owner(mark->locker());
           m->set_object(object);
           // TODO-FIXME: assert BasicLock->dhw != 0.
 
@@ -1214,10 +1214,9 @@
       BiasedLocking::revoke_at_safepoint(obj);
     }
     assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now");
-  }
-
-  THREAD->update_highest_lock((address)lock);
-  slow_enter (obj, lock, THREAD) ;
+ }
+
+ slow_enter (obj, lock, THREAD) ;
 }
 
 void ObjectSynchronizer::fast_exit(oop object, BasicLock* lock, TRAPS) {