--- old/src/hotspot/share/runtime/thread.cpp 2018-02-15 12:32:19.203453426 +0100 +++ new/src/hotspot/share/runtime/thread.cpp 2018-02-15 12:32:18.955442744 +0100 @@ -1994,7 +1994,7 @@ JvmtiExport::cleanup_thread(this); } - BarrierSet::barrier_set()->on_thread_destroy(this); + BarrierSet::barrier_set()->on_thread_detach(this); log_info(os, thread)("JavaThread %s (tid: " UINTX_FORMAT ").", exit_type == JavaThread::normal_exit ? "exiting" : "detaching", @@ -2043,7 +2043,7 @@ tlab().make_parsable(true); // retire TLAB, if any } - BarrierSet::barrier_set()->on_thread_destroy(this); + BarrierSet::barrier_set()->on_thread_detach(this); Threads::remove(this); this->smr_delete(); @@ -4302,7 +4302,7 @@ // The threads lock must be owned at this point assert_locked_or_safepoint(Threads_lock); - BarrierSet::barrier_set()->on_thread_create(p); + BarrierSet::barrier_set()->on_thread_attach(p); p->set_next(_thread_list); _thread_list = p;