Mercurial > hg > truffle
diff src/share/vm/gc_implementation/parNew/parNewGeneration.cpp @ 4728:441e946dc1af
7121618: Change type of number of GC workers to unsigned int.
Summary: Change variables representing the number of GC workers to uint from int and size_t. Change the parameter in work(int i) to work(uint worker_id).
Reviewed-by: brutisso, tonyp
author | jmasa |
---|---|
date | Wed, 14 Dec 2011 13:34:57 -0800 |
parents | bca17e38de00 |
children | d903bf750e9f |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp Wed Dec 21 07:53:53 2011 -0500 +++ b/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp Wed Dec 14 13:34:57 2011 -0800 @@ -590,7 +590,7 @@ // called after a task is started. So "i" is based on // first-come-first-served. -void ParNewGenTask::work(int i) { +void ParNewGenTask::work(uint worker_id) { GenCollectedHeap* gch = GenCollectedHeap::heap(); // Since this is being done in a separate thread, need new resource // and handle marks. @@ -601,8 +601,8 @@ Generation* old_gen = gch->next_gen(_gen); - ParScanThreadState& par_scan_state = _state_set->thread_state(i); - assert(_state_set->is_valid(i), "Should not have been called"); + ParScanThreadState& par_scan_state = _state_set->thread_state(worker_id); + assert(_state_set->is_valid(worker_id), "Should not have been called"); par_scan_state.set_young_old_boundary(_young_old_boundary); @@ -755,7 +755,7 @@ ParScanThreadStateSet& state_set); private: - virtual void work(int i); + virtual void work(uint worker_id); virtual void set_for_termination(int active_workers) { _state_set.terminator()->reset_for_reuse(active_workers); } @@ -781,13 +781,13 @@ { } -void ParNewRefProcTaskProxy::work(int i) +void ParNewRefProcTaskProxy::work(uint worker_id) { ResourceMark rm; HandleMark hm; - ParScanThreadState& par_scan_state = _state_set.thread_state(i); + ParScanThreadState& par_scan_state = _state_set.thread_state(worker_id); par_scan_state.set_young_old_boundary(_young_old_boundary); - _task.work(i, par_scan_state.is_alive_closure(), + _task.work(worker_id, par_scan_state.is_alive_closure(), par_scan_state.keep_alive_closure(), par_scan_state.evacuate_followers_closure()); } @@ -802,9 +802,9 @@ _task(task) { } - virtual void work(int i) + virtual void work(uint worker_id) { - _task.work(i); + _task.work(worker_id); } };