1.1 --- a/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp Mon Jun 04 09:21:53 2012 +0200 1.2 +++ b/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp Tue Jun 05 22:30:24 2012 +0200 1.3 @@ -64,7 +64,7 @@ 1.4 _should_initiate_conc_mark(should_initiate_conc_mark), 1.5 _target_pause_time_ms(target_pause_time_ms), 1.6 _should_retry_gc(false), 1.7 - _full_collections_completed_before(0) { 1.8 + _old_marking_cycles_completed_before(0) { 1.9 guarantee(target_pause_time_ms > 0.0, 1.10 err_msg("target_pause_time_ms = %1.6lf should be positive", 1.11 target_pause_time_ms)); 1.12 @@ -112,11 +112,11 @@ 1.13 1.14 GCCauseSetter x(g1h, _gc_cause); 1.15 if (_should_initiate_conc_mark) { 1.16 - // It's safer to read full_collections_completed() here, given 1.17 + // It's safer to read old_marking_cycles_completed() here, given 1.18 // that noone else will be updating it concurrently. Since we'll 1.19 // only need it if we're initiating a marking cycle, no point in 1.20 // setting it earlier. 1.21 - _full_collections_completed_before = g1h->full_collections_completed(); 1.22 + _old_marking_cycles_completed_before = g1h->old_marking_cycles_completed(); 1.23 1.24 // At this point we are supposed to start a concurrent cycle. We 1.25 // will do so if one is not already in progress. 1.26 @@ -181,17 +181,17 @@ 1.27 1.28 G1CollectedHeap* g1h = G1CollectedHeap::heap(); 1.29 1.30 - // In the doit() method we saved g1h->full_collections_completed() 1.31 - // in the _full_collections_completed_before field. We have to 1.32 - // wait until we observe that g1h->full_collections_completed() 1.33 + // In the doit() method we saved g1h->old_marking_cycles_completed() 1.34 + // in the _old_marking_cycles_completed_before field. We have to 1.35 + // wait until we observe that g1h->old_marking_cycles_completed() 1.36 // has increased by at least one. This can happen if a) we started 1.37 // a cycle and it completes, b) a cycle already in progress 1.38 // completes, or c) a Full GC happens. 1.39 1.40 // If the condition has already been reached, there's no point in 1.41 // actually taking the lock and doing the wait. 1.42 - if (g1h->full_collections_completed() <= 1.43 - _full_collections_completed_before) { 1.44 + if (g1h->old_marking_cycles_completed() <= 1.45 + _old_marking_cycles_completed_before) { 1.46 // The following is largely copied from CMS 1.47 1.48 Thread* thr = Thread::current(); 1.49 @@ -200,8 +200,8 @@ 1.50 ThreadToNativeFromVM native(jt); 1.51 1.52 MutexLockerEx x(FullGCCount_lock, Mutex::_no_safepoint_check_flag); 1.53 - while (g1h->full_collections_completed() <= 1.54 - _full_collections_completed_before) { 1.55 + while (g1h->old_marking_cycles_completed() <= 1.56 + _old_marking_cycles_completed_before) { 1.57 FullGCCount_lock->wait(Mutex::_no_safepoint_check_flag); 1.58 } 1.59 }