Skip to content

Commit 07c3021

Browse files
author
David Holmes
committed
8251460: Fix the biased-locking code in ObjectSynchronizer::FastHashCode
Reviewed-by: coleenp, dcubed, pchilanomate
1 parent 60745d1 commit 07c3021

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/hotspot/share/runtime/synchronizer.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,11 +1007,11 @@ intptr_t ObjectSynchronizer::FastHashCode(Thread* self, oop obj) {
10071007
if (obj->mark().has_bias_pattern()) {
10081008
// Handle for oop obj in case of STW safepoint
10091009
Handle hobj(self, obj);
1010-
// Relaxing assertion for bug 6320749.
1011-
assert(Universe::verify_in_progress() ||
1012-
!SafepointSynchronize::is_at_safepoint(),
1013-
"biases should not be seen by VM thread here");
1014-
BiasedLocking::revoke(hobj, JavaThread::current());
1010+
if (SafepointSynchronize::is_at_safepoint()) {
1011+
BiasedLocking::revoke_at_safepoint(hobj);
1012+
} else {
1013+
BiasedLocking::revoke(hobj, self);
1014+
}
10151015
obj = hobj();
10161016
assert(!obj->mark().has_bias_pattern(), "biases should be revoked by now");
10171017
}

0 commit comments

Comments
 (0)