equal
deleted
inserted
replaced
1609 // is not multi-threaded we use the current (VMThread) thread, |
1609 // is not multi-threaded we use the current (VMThread) thread, |
1610 // otherwise we use the work gang from the G1CollectedHeap and |
1610 // otherwise we use the work gang from the G1CollectedHeap and |
1611 // we utilize all the worker threads we can. |
1611 // we utilize all the worker threads we can. |
1612 bool processing_is_mt = rp->processing_is_mt(); |
1612 bool processing_is_mt = rp->processing_is_mt(); |
1613 uint active_workers = (processing_is_mt ? _g1h->workers()->active_workers() : 1U); |
1613 uint active_workers = (processing_is_mt ? _g1h->workers()->active_workers() : 1U); |
1614 active_workers = MAX2(MIN2(active_workers, _max_num_tasks), 1U); |
1614 active_workers = clamp(active_workers, 1u, _max_num_tasks); |
1615 |
1615 |
1616 // Parallel processing task executor. |
1616 // Parallel processing task executor. |
1617 G1CMRefProcTaskExecutor par_task_executor(_g1h, this, |
1617 G1CMRefProcTaskExecutor par_task_executor(_g1h, this, |
1618 _g1h->workers(), active_workers); |
1618 _g1h->workers(), active_workers); |
1619 AbstractRefProcTaskExecutor* executor = (processing_is_mt ? &par_task_executor : NULL); |
1619 AbstractRefProcTaskExecutor* executor = (processing_is_mt ? &par_task_executor : NULL); |