src/hotspot/share/gc/g1/g1ConcurrentMark.cpp
changeset 59221 cc3a82fc7bcb
parent 58002 01d31583f25c
child 59249 29b0d0b61615
equal deleted inserted replaced
59220:72e15d757e6c 59221:cc3a82fc7bcb
  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);