< prev index next >

src/hotspot/share/gc/g1/g1ConcurrentMark.cpp

Print this page




1528     G1CMDrainMarkingStackClosure g1_par_drain(_cm, task, false /* is_serial */);
1529 
1530     _proc_task.work(worker_id, g1_is_alive, g1_par_keep_alive, g1_par_drain);
1531   }
1532 };
1533 
1534 void G1CMRefProcTaskExecutor::execute(ProcessTask& proc_task, uint ergo_workers) {
1535   assert(_workers != NULL, "Need parallel worker threads.");
1536   assert(_g1h->ref_processor_cm()->processing_is_mt(), "processing is not MT");
1537   assert(_workers->active_workers() >= ergo_workers,
1538          "Ergonomically chosen workers(%u) should be less than or equal to active workers(%u)",
1539          ergo_workers, _workers->active_workers());
1540 
1541   G1CMRefProcTaskProxy proc_task_proxy(proc_task, _g1h, _cm);
1542 
1543   // We need to reset the concurrency level before each
1544   // proxy task execution, so that the termination protocol
1545   // and overflow handling in G1CMTask::do_marking_step() knows
1546   // how many workers to wait for.
1547   _cm->set_concurrency(ergo_workers);



1548   _workers->run_task(&proc_task_proxy, ergo_workers);

1549 }
1550 
1551 void G1ConcurrentMark::weak_refs_work(bool clear_all_soft_refs) {
1552   ResourceMark rm;
1553   HandleMark   hm;
1554 
1555   // Is alive closure.
1556   G1CMIsAliveClosure g1_is_alive(_g1h);
1557 
1558   // Inner scope to exclude the cleaning of the string table
1559   // from the displayed time.
1560   {
1561     GCTraceTime(Debug, gc, phases) debug("Reference Processing", _gc_timer_cm);
1562 
1563     ReferenceProcessor* rp = _g1h->ref_processor_cm();
1564 
1565     // See the comment in G1CollectedHeap::ref_processing_init()
1566     // about how reference processing currently works in G1.
1567 
1568     // Set the soft reference policy




1528     G1CMDrainMarkingStackClosure g1_par_drain(_cm, task, false /* is_serial */);
1529 
1530     _proc_task.work(worker_id, g1_is_alive, g1_par_keep_alive, g1_par_drain);
1531   }
1532 };
1533 
1534 void G1CMRefProcTaskExecutor::execute(ProcessTask& proc_task, uint ergo_workers) {
1535   assert(_workers != NULL, "Need parallel worker threads.");
1536   assert(_g1h->ref_processor_cm()->processing_is_mt(), "processing is not MT");
1537   assert(_workers->active_workers() >= ergo_workers,
1538          "Ergonomically chosen workers(%u) should be less than or equal to active workers(%u)",
1539          ergo_workers, _workers->active_workers());
1540 
1541   G1CMRefProcTaskProxy proc_task_proxy(proc_task, _g1h, _cm);
1542 
1543   // We need to reset the concurrency level before each
1544   // proxy task execution, so that the termination protocol
1545   // and overflow handling in G1CMTask::do_marking_step() knows
1546   // how many workers to wait for.
1547   _cm->set_concurrency(ergo_workers);
1548   if (ergo_workers == 1) {
1549     proc_task_proxy.work(0);
1550   } else {
1551     _workers->run_task(&proc_task_proxy, ergo_workers);
1552   }
1553 }
1554 
1555 void G1ConcurrentMark::weak_refs_work(bool clear_all_soft_refs) {
1556   ResourceMark rm;
1557   HandleMark   hm;
1558 
1559   // Is alive closure.
1560   G1CMIsAliveClosure g1_is_alive(_g1h);
1561 
1562   // Inner scope to exclude the cleaning of the string table
1563   // from the displayed time.
1564   {
1565     GCTraceTime(Debug, gc, phases) debug("Reference Processing", _gc_timer_cm);
1566 
1567     ReferenceProcessor* rp = _g1h->ref_processor_cm();
1568 
1569     // See the comment in G1CollectedHeap::ref_processing_init()
1570     // about how reference processing currently works in G1.
1571 
1572     // Set the soft reference policy


< prev index next >