On Fri, 18 Sep 2020 20:51:17 GMT, Daniel D. Daugherty <dcu...@openjdk.org> wrote:
>> Robbin Ehn has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Removed double check, fix comment, removed not needed function, updated >> logs > > src/hotspot/share/prims/whitebox.cpp line 2032: > >> 2030: void do_thread(Thread* th) { >> 2031: assert(th->is_Java_thread(), "sanity"); >> 2032: JavaThread* jt = (JavaThread*)th; > > Can whitebox.cpp code use the new as_Java_thread() call? Yes it can. :) > src/hotspot/share/runtime/handshake.hpp line 45: > >> 43: // a single target/direct handshake or not, by the JavaThread that >> requested the >> 44: // handshake or the VMThread respectively. >> 45: class HandshakeClosure : public ThreadClosure, public CHeapObj<mtThread> >> { > > Just to be clear. You haven't added support for a handshake that > must only be executed by the target thread yet, right? That's > future work, if I remember correctly... AsyncHandshakeClosures have operations that must, by definition, be executed by the target thread (if they are executed at all). > src/hotspot/share/runtime/interfaceSupport.inline.hpp line 157: > >> 155: >> 156: // Threads shouldn't block if they are in the middle of printing, >> but... >> 157: ttyLocker::break_tty_lock_for_safepoint(os::current_thread_id()); > > Can you explain why you had to add this? > Did something show up in testing? Yes please explain as this looks really bad. ------------- PR: https://git.openjdk.java.net/jdk/pull/151