8219613: Use NonJavaThread PtrQueues

Init and use NJT queues, remove shared SATB queue.

Co-authored-by: Aleksey Shipilev <shade@redhat.com>
Reviewed-by: shade, zgu, pliden, tschatzl
This commit is contained in:
Kim Barrett 2019-03-05 19:54:33 -05:00
parent 8b57cdf5f8
commit 725a467ad8
25 changed files with 217 additions and 229 deletions

View file

@ -1311,7 +1311,9 @@ void NonJavaThread::remove_from_the_list() {
}
void NonJavaThread::pre_run() {
// Initialize BarrierSet-related data before adding to list.
assert(BarrierSet::barrier_set() != NULL, "invariant");
BarrierSet::barrier_set()->on_thread_attach(this);
add_to_the_list();
// This is slightly odd in that NamedThread is a subclass, but
@ -1322,6 +1324,8 @@ void NonJavaThread::pre_run() {
void NonJavaThread::post_run() {
JFR_ONLY(Jfr::on_thread_exit(this);)
// Clean up BarrierSet data before removing from list.
BarrierSet::barrier_set()->on_thread_detach(this);
remove_from_the_list();
// Ensure thread-local-storage is cleared before termination.
Thread::clear_thread_current();