--- old/src/hotspot/share/gc/g1/g1SATBCardTableModRefBS.cpp 2018-02-15 12:32:16.054317787 +0100 +++ new/src/hotspot/share/gc/g1/g1SATBCardTableModRefBS.cpp 2018-02-15 12:32:15.820307708 +0100 @@ -220,7 +220,7 @@ return *p == g1_young_card_val(); } -void G1SATBCardTableLoggingModRefBS::on_thread_create(JavaThread* thread) { +void G1SATBCardTableLoggingModRefBS::on_thread_attach(JavaThread* thread) { // This method initializes the SATB and dirty card queues before a // JavaThread is added to the Java thread list. Right now, we don't // have to do anything to the dirty card queue (it should have been @@ -250,9 +250,9 @@ } } -void G1SATBCardTableLoggingModRefBS::on_thread_destroy(JavaThread* thread) { +void G1SATBCardTableLoggingModRefBS::on_thread_detach(JavaThread* thread) { // Flush any deferred card marks, SATB buffers and dirty card queue buffers - CardTableModRefBS::on_thread_destroy(thread); + CardTableModRefBS::on_thread_detach(thread); thread->satb_mark_queue().flush(); thread->dirty_card_queue().flush(); } --- old/src/hotspot/share/gc/g1/g1SATBCardTableModRefBS.hpp 2018-02-15 12:32:16.594341047 +0100 +++ new/src/hotspot/share/gc/g1/g1SATBCardTableModRefBS.hpp 2018-02-15 12:32:16.350330537 +0100 @@ -154,8 +154,8 @@ void write_ref_field_post(T* field, oop new_val); void write_ref_field_post_slow(volatile jbyte* byte); - virtual void on_thread_create(JavaThread* thread); - virtual void on_thread_destroy(JavaThread* thread); + virtual void on_thread_attach(JavaThread* thread); + virtual void on_thread_detach(JavaThread* thread); virtual bool card_mark_must_follow_store() const { return true; --- old/src/hotspot/share/gc/g1/satbMarkQueue.cpp 2018-02-15 12:32:17.087362282 +0100 +++ new/src/hotspot/share/gc/g1/satbMarkQueue.cpp 2018-02-15 12:32:16.825350997 +0100 @@ -41,7 +41,7 @@ // created during a cycle and its SATB queue needs to be activated // before the thread starts running, we'll need to set its active // field to true. This is done in G1SATBCardTableLoggingModRefBS:: - // on_thread_create(). + // on_thread_attach(). PtrQueue(qset, permanent, false /* active */) { } --- old/src/hotspot/share/gc/shared/barrierSet.hpp 2018-02-15 12:32:17.658386877 +0100 +++ new/src/hotspot/share/gc/shared/barrierSet.hpp 2018-02-15 12:32:17.387375204 +0100 @@ -115,8 +115,8 @@ // is redone until it succeeds. This can e.g. prevent allocations from the slow path // to be in old. virtual void on_slowpath_allocation_exit(JavaThread* thread, oop new_obj) {} - virtual void on_thread_create(JavaThread* thread) {} - virtual void on_thread_destroy(JavaThread* thread) {} + virtual void on_thread_attach(JavaThread* thread) {} + virtual void on_thread_detach(JavaThread* thread) {} virtual void make_parsable(JavaThread* thread) {} protected: --- old/src/hotspot/share/gc/shared/cardTableModRefBS.cpp 2018-02-15 12:32:18.201410266 +0100 +++ new/src/hotspot/share/gc/shared/cardTableModRefBS.cpp 2018-02-15 12:32:17.944399196 +0100 @@ -627,7 +627,7 @@ #endif } -void CardTableModRefBS::on_thread_destroy(JavaThread* thread) { +void CardTableModRefBS::on_thread_detach(JavaThread* thread) { // The deferred store barriers must all have been flushed to the // card-table (or other remembered set structure) before GC starts // processing the card-table (or other remembered set). --- old/src/hotspot/share/gc/shared/cardTableModRefBS.hpp 2018-02-15 12:32:18.743433612 +0100 +++ new/src/hotspot/share/gc/shared/cardTableModRefBS.hpp 2018-02-15 12:32:18.496422973 +0100 @@ -357,7 +357,7 @@ virtual bool is_in_young(oop obj) const = 0; virtual void on_slowpath_allocation_exit(JavaThread* thread, oop new_obj); - virtual void on_thread_destroy(JavaThread* thread); + virtual void on_thread_detach(JavaThread* thread); virtual void make_parsable(JavaThread* thread) { flush_deferred_card_mark_barrier(thread); } --- 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;