Skip to content

Commit

Permalink
[Backport] Fix new fast-locking is_lock_owned of backport of 8291555
Browse files Browse the repository at this point in the history
Summary: Fix new fast-locking is_lock_owned.

Test Plan: CICD

Reviewed-by: yulei, ddh

Issue: #679
  • Loading branch information
mmyxym committed Nov 13, 2023
1 parent 3d46ae3 commit bdbe501
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/share/runtime/synchronizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1124,8 +1124,8 @@ ObjectSynchronizer::LockOwnership ObjectSynchronizer::query_lock_ownership
if (UseWispMonitor) {
self = WispThread::current(self);
}
return (owner == self ||
self->is_lock_owned((address)owner)) ? owner_self : owner_other;
bool lock_owned = UseAltFastLocking ? is_lock_owned(self, obj) : self->is_lock_owned((address)owner);
return (owner == self || lock_owned) ? owner_self : owner_other;
}

// CASE: neutral
Expand Down

0 comments on commit bdbe501

Please sign in to comment.