8251460: Fix the biased-locking code in ObjectSynchronizer::FastHashCode
Reviewed-by: coleenp, dcubed, pchilanomate
This commit is contained in:
parent
60745d14ec
commit
07c3021936
@ -1007,11 +1007,11 @@ intptr_t ObjectSynchronizer::FastHashCode(Thread* self, oop obj) {
|
||||
if (obj->mark().has_bias_pattern()) {
|
||||
// Handle for oop obj in case of STW safepoint
|
||||
Handle hobj(self, obj);
|
||||
// Relaxing assertion for bug 6320749.
|
||||
assert(Universe::verify_in_progress() ||
|
||||
!SafepointSynchronize::is_at_safepoint(),
|
||||
"biases should not be seen by VM thread here");
|
||||
BiasedLocking::revoke(hobj, JavaThread::current());
|
||||
if (SafepointSynchronize::is_at_safepoint()) {
|
||||
BiasedLocking::revoke_at_safepoint(hobj);
|
||||
} else {
|
||||
BiasedLocking::revoke(hobj, self);
|
||||
}
|
||||
obj = hobj();
|
||||
assert(!obj->mark().has_bias_pattern(), "biases should be revoked by now");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user