src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp

changeset 3823
37552638d24a
parent 3713
720b6a76dd9d
child 3900
d2a62e0f25eb
     1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Mon Jun 04 09:21:53 2012 +0200
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Tue Jun 05 22:30:24 2012 +0200
     1.3 @@ -359,10 +359,13 @@
     1.4    // (c) cause == _g1_humongous_allocation
     1.5    bool should_do_concurrent_full_gc(GCCause::Cause cause);
     1.6  
     1.7 -  // Keeps track of how many "full collections" (i.e., Full GCs or
     1.8 -  // concurrent cycles) we have completed. The number of them we have
     1.9 -  // started is maintained in _total_full_collections in CollectedHeap.
    1.10 -  volatile unsigned int _full_collections_completed;
    1.11 +  // Keeps track of how many "old marking cycles" (i.e., Full GCs or
    1.12 +  // concurrent cycles) we have started.
    1.13 +  volatile unsigned int _old_marking_cycles_started;
    1.14 +
    1.15 +  // Keeps track of how many "old marking cycles" (i.e., Full GCs or
    1.16 +  // concurrent cycles) we have completed.
    1.17 +  volatile unsigned int _old_marking_cycles_completed;
    1.18  
    1.19    // This is a non-product method that is helpful for testing. It is
    1.20    // called at the end of a GC and artificially expands the heap by
    1.21 @@ -673,8 +676,12 @@
    1.22             (size_t) _in_cset_fast_test_length * sizeof(bool));
    1.23    }
    1.24  
    1.25 +  // This is called at the start of either a concurrent cycle or a Full
    1.26 +  // GC to update the number of old marking cycles started.
    1.27 +  void increment_old_marking_cycles_started();
    1.28 +
    1.29    // This is called at the end of either a concurrent cycle or a Full
    1.30 -  // GC to update the number of full collections completed. Those two
    1.31 +  // GC to update the number of old marking cycles completed. Those two
    1.32    // can happen in a nested fashion, i.e., we start a concurrent
    1.33    // cycle, a Full GC happens half-way through it which ends first,
    1.34    // and then the cycle notices that a Full GC happened and ends
    1.35 @@ -683,14 +690,14 @@
    1.36    // false, the caller is the inner caller in the nesting (i.e., the
    1.37    // Full GC). If concurrent is true, the caller is the outer caller
    1.38    // in this nesting (i.e., the concurrent cycle). Further nesting is
    1.39 -  // not currently supported. The end of the this call also notifies
    1.40 +  // not currently supported. The end of this call also notifies
    1.41    // the FullGCCount_lock in case a Java thread is waiting for a full
    1.42    // GC to happen (e.g., it called System.gc() with
    1.43    // +ExplicitGCInvokesConcurrent).
    1.44 -  void increment_full_collections_completed(bool concurrent);
    1.45 +  void increment_old_marking_cycles_completed(bool concurrent);
    1.46  
    1.47 -  unsigned int full_collections_completed() {
    1.48 -    return _full_collections_completed;
    1.49 +  unsigned int old_marking_cycles_completed() {
    1.50 +    return _old_marking_cycles_completed;
    1.51    }
    1.52  
    1.53    G1HRPrinter* hr_printer() { return &_hr_printer; }

mercurial