--- old/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp 2020-01-16 01:05:12.436027044 -0500 +++ new/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp 2020-01-16 01:05:12.056006529 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -89,6 +89,11 @@ } } } + + if (num_max_threads > 0) { + G1BarrierSet::dirty_card_queue_set().set_primary_refinement_thread(_threads[0]); + } + return JNI_OK; } @@ -108,7 +113,7 @@ _threads[worker_id] = create_refinement_thread(worker_id, false); thread_to_activate = _threads[worker_id]; } - if (thread_to_activate != NULL && !thread_to_activate->is_active()) { + if (thread_to_activate != NULL) { thread_to_activate->activate(); } }