< prev index next >

src/share/vm/gc_implementation/g1/concurrentMark.cpp

Print this page
rev 8068 : 6407976: GC worker number should be unsigned
Reviewed-by: jwilhelm

*** 2318,2334 **** class G1CMRefProcTaskExecutor: public AbstractRefProcTaskExecutor { private: G1CollectedHeap* _g1h; ConcurrentMark* _cm; WorkGang* _workers; ! int _active_workers; public: G1CMRefProcTaskExecutor(G1CollectedHeap* g1h, ConcurrentMark* cm, WorkGang* workers, ! int n_workers) : _g1h(g1h), _cm(cm), _workers(workers), _active_workers(n_workers) { } // Executes the given task using concurrent marking worker threads. virtual void execute(ProcessTask& task); --- 2318,2334 ---- class G1CMRefProcTaskExecutor: public AbstractRefProcTaskExecutor { private: G1CollectedHeap* _g1h; ConcurrentMark* _cm; WorkGang* _workers; ! uint _active_workers; public: G1CMRefProcTaskExecutor(G1CollectedHeap* g1h, ConcurrentMark* cm, WorkGang* workers, ! uint n_workers) : _g1h(g1h), _cm(cm), _workers(workers), _active_workers(n_workers) { } // Executes the given task using concurrent marking worker threads. virtual void execute(ProcessTask& task);
*** 2634,2644 **** // want to abort remark and do concurrent marking again. task->record_end_time(); } } ! CMRemarkTask(ConcurrentMark* cm, int active_workers) : AbstractGangTask("Par Remark"), _cm(cm) { _cm->terminator()->reset_for_reuse(active_workers); } }; --- 2634,2644 ---- // want to abort remark and do concurrent marking again. task->record_end_time(); } } ! CMRemarkTask(ConcurrentMark* cm, uint active_workers) : AbstractGangTask("Par Remark"), _cm(cm) { _cm->terminator()->reset_for_reuse(active_workers); } };
*** 3197,3215 **** protected: G1CollectedHeap* _g1h; ConcurrentMark* _cm; BitMap* _cm_card_bm; uint _max_worker_id; ! int _active_workers; HeapRegionClaimer _hrclaimer; public: G1AggregateCountDataTask(G1CollectedHeap* g1h, ConcurrentMark* cm, BitMap* cm_card_bm, uint max_worker_id, ! int n_workers) : AbstractGangTask("Count Aggregation"), _g1h(g1h), _cm(cm), _cm_card_bm(cm_card_bm), _max_worker_id(max_worker_id), _active_workers(n_workers), _hrclaimer(_active_workers) { --- 3197,3215 ---- protected: G1CollectedHeap* _g1h; ConcurrentMark* _cm; BitMap* _cm_card_bm; uint _max_worker_id; ! uint _active_workers; HeapRegionClaimer _hrclaimer; public: G1AggregateCountDataTask(G1CollectedHeap* g1h, ConcurrentMark* cm, BitMap* cm_card_bm, uint max_worker_id, ! uint n_workers) : AbstractGangTask("Count Aggregation"), _g1h(g1h), _cm(cm), _cm_card_bm(cm_card_bm), _max_worker_id(max_worker_id), _active_workers(n_workers), _hrclaimer(_active_workers) {
*** 3222,3232 **** } }; void ConcurrentMark::aggregate_count_data() { ! int n_workers = _g1h->workers()->active_workers(); G1AggregateCountDataTask g1_par_agg_task(_g1h, this, &_card_bm, _max_worker_id, n_workers); _g1h->set_par_threads(n_workers); --- 3222,3232 ---- } }; void ConcurrentMark::aggregate_count_data() { ! uint n_workers = _g1h->workers()->active_workers(); G1AggregateCountDataTask g1_par_agg_task(_g1h, this, &_card_bm, _max_worker_id, n_workers); _g1h->set_par_threads(n_workers);
< prev index next >