Skip to content

Commit

Permalink
Remove JavaThread's is_lock_owned
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinjwalls committed May 1, 2024
1 parent 17760bd commit ce92b92
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
5 changes: 0 additions & 5 deletions src/hotspot/share/runtime/javaThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1045,11 +1045,6 @@ JavaThread* JavaThread::active() {
}
}

bool JavaThread::is_lock_owned(address adr) const {
assert(LockingMode != LM_LIGHTWEIGHT, "should not be called with new lightweight locking");
return Thread::is_lock_owned(adr);
}

oop JavaThread::exception_oop() const {
return Atomic::load(&_exception_oop);
}
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/share/runtime/javaThread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,9 +672,6 @@ class JavaThread: public Thread {
return (_suspend_flags & (_obj_deopt JFR_ONLY(| _trace_flag))) != 0;
}

// Fast-locking support
bool is_lock_owned(address adr) const;

// Accessors for vframe array top
// The linked list of vframe arrays are sorted on sp. This means when we
// unpack the head must contain the vframe array to unpack.
Expand Down
5 changes: 0 additions & 5 deletions src/hotspot/share/runtime/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -527,11 +527,6 @@ void Thread::print_owned_locks_on(outputStream* st) const {
}
#endif // ASSERT

// We had to move these methods here, because vm threads get into ObjectSynchronizer::enter
// However, there is a note in JavaThread::is_lock_owned() about the VM threads not being
// used for compilation in the future. If that change is made, the need for these methods
// should be revisited, and they should be removed if possible.

bool Thread::is_lock_owned(address adr) const {
assert(LockingMode != LM_LIGHTWEIGHT, "should not be called with new lightweight locking");
return is_in_full_stack(adr);
Expand Down

0 comments on commit ce92b92

Please sign in to comment.