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

changeset 6552
8847586c9037
parent 6168
1de8e5356754
child 6876
710a3c8b516e
child 6930
570cb6369f17
     1.1 --- a/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp	Tue Apr 08 14:55:16 2014 -0700
     1.2 +++ b/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp	Thu Apr 03 17:49:31 2014 +0400
     1.3 @@ -57,10 +57,10 @@
     1.4  
     1.5    _threads = NEW_C_HEAP_ARRAY(ConcurrentG1RefineThread*, _n_threads, mtGC);
     1.6  
     1.7 -  int worker_id_offset = (int)DirtyCardQueueSet::num_par_ids();
     1.8 +  uint worker_id_offset = DirtyCardQueueSet::num_par_ids();
     1.9  
    1.10    ConcurrentG1RefineThread *next = NULL;
    1.11 -  for (int i = _n_threads - 1; i >= 0; i--) {
    1.12 +  for (uint i = _n_threads - 1; i != UINT_MAX; i--) {
    1.13      ConcurrentG1RefineThread* t = new ConcurrentG1RefineThread(this, next, worker_id_offset, i);
    1.14      assert(t != NULL, "Conc refine should have been created");
    1.15      if (t->osthread() == NULL) {
    1.16 @@ -87,7 +87,7 @@
    1.17  
    1.18  void ConcurrentG1Refine::stop() {
    1.19    if (_threads != NULL) {
    1.20 -    for (int i = 0; i < _n_threads; i++) {
    1.21 +    for (uint i = 0; i < _n_threads; i++) {
    1.22        _threads[i]->stop();
    1.23      }
    1.24    }
    1.25 @@ -96,7 +96,7 @@
    1.26  void ConcurrentG1Refine::reinitialize_threads() {
    1.27    reset_threshold_step();
    1.28    if (_threads != NULL) {
    1.29 -    for (int i = 0; i < _n_threads; i++) {
    1.30 +    for (uint i = 0; i < _n_threads; i++) {
    1.31        _threads[i]->initialize();
    1.32      }
    1.33    }
    1.34 @@ -104,7 +104,7 @@
    1.35  
    1.36  ConcurrentG1Refine::~ConcurrentG1Refine() {
    1.37    if (_threads != NULL) {
    1.38 -    for (int i = 0; i < _n_threads; i++) {
    1.39 +    for (uint i = 0; i < _n_threads; i++) {
    1.40        delete _threads[i];
    1.41      }
    1.42      FREE_C_HEAP_ARRAY(ConcurrentG1RefineThread*, _threads, mtGC);
    1.43 @@ -113,7 +113,7 @@
    1.44  
    1.45  void ConcurrentG1Refine::threads_do(ThreadClosure *tc) {
    1.46    if (_threads != NULL) {
    1.47 -    for (int i = 0; i < _n_threads; i++) {
    1.48 +    for (uint i = 0; i < _n_threads; i++) {
    1.49        tc->do_thread(_threads[i]);
    1.50      }
    1.51    }
    1.52 @@ -121,20 +121,20 @@
    1.53  
    1.54  void ConcurrentG1Refine::worker_threads_do(ThreadClosure * tc) {
    1.55    if (_threads != NULL) {
    1.56 -    for (int i = 0; i < worker_thread_num(); i++) {
    1.57 +    for (uint i = 0; i < worker_thread_num(); i++) {
    1.58        tc->do_thread(_threads[i]);
    1.59      }
    1.60    }
    1.61  }
    1.62  
    1.63 -int ConcurrentG1Refine::thread_num() {
    1.64 -  int n_threads = (G1ConcRefinementThreads > 0) ? G1ConcRefinementThreads
    1.65 +uint ConcurrentG1Refine::thread_num() {
    1.66 +  uint n_threads = (G1ConcRefinementThreads > 0) ? G1ConcRefinementThreads
    1.67                                                  : ParallelGCThreads;
    1.68 -  return MAX2<int>(n_threads, 1);
    1.69 +  return MAX2<uint>(n_threads, 1);
    1.70  }
    1.71  
    1.72  void ConcurrentG1Refine::print_worker_threads_on(outputStream* st) const {
    1.73 -  for (int i = 0; i < _n_threads; ++i) {
    1.74 +  for (uint i = 0; i < _n_threads; ++i) {
    1.75      _threads[i]->print_on(st);
    1.76      st->cr();
    1.77    }

mercurial