On Thu, 14 Oct 2021 16:03:28 GMT, Daniel D. Daugherty <dcu...@openjdk.org> wrote:
>> A fix to reduce ThreadsListHandle overhead in relation to handshakes and >> we add sanity checks for ThreadsListHandles higher in the call stack. >> >> This fix was tested with Mach5 Tier[1-8]; Tier8 is still running. > > Daniel D. Daugherty has updated the pull request incrementally with one > additional commit since the last revision: > > 8249004.cr1.patch This has more moving pieces than the last version. I'm a bit uneasy about passing NULL as a thread to Handshake::execute(). This shouldn't be something that should happen. src/hotspot/share/runtime/handshake.cpp line 358: > 356: bool target_is_dead = false; > 357: if (target == nullptr) { > 358: target_is_dead = true; Why would you pass a NULL target thread to Handshake::execute? Why would the caller not check if the target is dead? src/hotspot/share/runtime/thread.cpp line 497: > 495: // placement somewhere in the calling context. > 496: bool Thread::is_JavaThread_protected_by_my_ThreadsList(const JavaThread* > p) { > 497: Thread* current_thread = Thread::current(); Shouldn't you call this on the current thread as "this" argument? ------------- PR: https://git.openjdk.java.net/jdk/pull/4677