Skip to content

Commit

Permalink
JavaThread comment update and synchronizer check before cast
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinjwalls committed May 3, 2024
1 parent 54086cc commit 2989ad4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/hotspot/share/runtime/javaThread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ class JavaThread: public Thread {
return (_suspend_flags & (_obj_deopt JFR_ONLY(| _trace_flag))) != 0;
}

// Fast-locking support (not for LM_LIGHTWEIGHT)
// Stack-locking support (not for LM_LIGHTWEIGHT)
bool is_lock_owned(address adr) const;

// Accessors for vframe array top
Expand Down
1 change: 1 addition & 0 deletions src/hotspot/share/runtime/synchronizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,7 @@ intptr_t ObjectSynchronizer::FastHashCode(Thread* current, oop obj) {
// Fall thru so we only have one place that installs the hash in
// the ObjectMonitor.
} else if (LockingMode == LM_LEGACY && mark.has_locker()
&& current->is_Java_thread()
&& JavaThread::cast(current)->is_lock_owned((address)mark.locker())) {
// This is a stack-lock owned by the calling thread so fetch the
// displaced markWord from the BasicLock on the stack.
Expand Down

0 comments on commit 2989ad4

Please sign in to comment.