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()) {
|
if (obj->mark().has_bias_pattern()) {
|
||||||
// Handle for oop obj in case of STW safepoint
|
// Handle for oop obj in case of STW safepoint
|
||||||
Handle hobj(self, obj);
|
Handle hobj(self, obj);
|
||||||
// Relaxing assertion for bug 6320749.
|
if (SafepointSynchronize::is_at_safepoint()) {
|
||||||
assert(Universe::verify_in_progress() ||
|
BiasedLocking::revoke_at_safepoint(hobj);
|
||||||
!SafepointSynchronize::is_at_safepoint(),
|
} else {
|
||||||
"biases should not be seen by VM thread here");
|
BiasedLocking::revoke(hobj, self);
|
||||||
BiasedLocking::revoke(hobj, JavaThread::current());
|
}
|
||||||
obj = hobj();
|
obj = hobj();
|
||||||
assert(!obj->mark().has_bias_pattern(), "biases should be revoked by now");
|
assert(!obj->mark().has_bias_pattern(), "biases should be revoked by now");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user