On Fri, 24 Mar 2023 10:10:58 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:
>> Roman Kennke has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Merge remote-tracking branch 'origin/JDK-8291555-v2' into JDK-8291555-v2 >> - Set condition flags correctly after fast-lock call on aarch64 > > src/hotspot/share/runtime/synchronizer.cpp line 923: > >> 921: static bool is_lock_owned(Thread* thread, oop obj) { >> 922: assert(UseFastLocking, "only call this with fast-locking enabled"); >> 923: return thread->is_Java_thread() ? >> reinterpret_cast<JavaThread*>(thread)->lock_stack().contains(obj) : false; > > Here and later, should use `JavaThread::cast(thread)` instead of > `reinterpret_cast<JavaThread*>`? It also sometimes subsumes the asserts, as > `JT::cast` checks the type. Only JavaThreads can own monitors so this function should take a JavaThread in the first place. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/10907#discussion_r1147499577