--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp Mon May 25 11:39:43 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp Mon May 25 11:41:34 2015 +0200
@@ -4279,12 +4279,13 @@
Mutex* stats_lock() { return &_stats_lock; }
public:
- G1ParTask(G1CollectedHeap* g1h, RefToScanQueueSet *task_queues, G1RootProcessor* root_processor)
+ G1ParTask(G1CollectedHeap* g1h, RefToScanQueueSet *task_queues, G1RootProcessor* root_processor, uint n_workers)
: AbstractGangTask("G1 collection"),
_g1h(g1h),
_queues(task_queues),
_root_processor(root_processor),
- _terminator(0, _queues),
+ _terminator(n_workers, _queues),
+ _n_workers(n_workers),
_stats_lock(Mutex::leaf, "parallel G1 stats lock", true)
{}
@@ -4296,11 +4297,6 @@
ParallelTaskTerminator* terminator() { return &_terminator; }
- virtual void set_for_termination(uint active_workers) {
- terminator()->reset_for_reuse(active_workers);
- _n_workers = active_workers;
- }
-
// Helps out with CLD processing.
//
// During InitialMark we need to:
@@ -5343,7 +5339,7 @@
{
G1RootProcessor root_processor(this, n_workers);
- G1ParTask g1_par_task(this, _task_queues, &root_processor);
+ G1ParTask g1_par_task(this, _task_queues, &root_processor, n_workers);
// InitialMark needs claim bits to keep track of the marked-through CLDs.
if (g1_policy()->during_initial_mark_pause()) {
ClassLoaderDataGraph::clear_claimed_marks();