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

changeset 3268
8aae2050e83e
parent 3184
246daf2c601d
child 3269
53074c2c4600
     1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Wed Nov 02 08:04:23 2011 +0100
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Mon Nov 07 22:11:12 2011 -0500
     1.3 @@ -239,6 +239,9 @@
     1.4    // master free list when appropriate.
     1.5    SecondaryFreeRegionList   _secondary_free_list;
     1.6  
     1.7 +  // It keeps track of the old regions.
     1.8 +  MasterOldRegionSet        _old_set;
     1.9 +
    1.10    // It keeps track of the humongous regions.
    1.11    MasterHumongousRegionSet  _humongous_set;
    1.12  
    1.13 @@ -248,10 +251,21 @@
    1.14    // The block offset table for the G1 heap.
    1.15    G1BlockOffsetSharedArray* _bot_shared;
    1.16  
    1.17 -  // Move all of the regions off the free lists, then rebuild those free
    1.18 -  // lists, before and after full GC.
    1.19 -  void tear_down_region_lists();
    1.20 -  void rebuild_region_lists();
    1.21 +  // Tears down the region sets / lists so that they are empty and the
    1.22 +  // regions on the heap do not belong to a region set / list. The
    1.23 +  // only exception is the humongous set which we leave unaltered. If
    1.24 +  // free_list_only is true, it will only tear down the master free
    1.25 +  // list. It is called before a Full GC (free_list_only == false) or
    1.26 +  // before heap shrinking (free_list_only == true).
    1.27 +  void tear_down_region_sets(bool free_list_only);
    1.28 +
    1.29 +  // Rebuilds the region sets / lists so that they are repopulated to
    1.30 +  // reflect the contents of the heap. The only exception is the
    1.31 +  // humongous set which was not torn down in the first place. If
    1.32 +  // free_list_only is true, it will only rebuild the master free
    1.33 +  // list. It is called after a Full GC (free_list_only == false) or
    1.34 +  // after heap shrinking (free_list_only == true).
    1.35 +  void rebuild_region_sets(bool free_list_only);
    1.36  
    1.37    // The sequence of all heap regions in the heap.
    1.38    HeapRegionSeq _hrs;
    1.39 @@ -1124,6 +1138,10 @@
    1.40      }
    1.41    }
    1.42  
    1.43 +  void old_set_remove(HeapRegion* hr) {
    1.44 +    _old_set.remove(hr);
    1.45 +  }
    1.46 +
    1.47    void set_free_regions_coming();
    1.48    void reset_free_regions_coming();
    1.49    bool free_regions_coming() { return _free_regions_coming; }
    1.50 @@ -1153,6 +1171,7 @@
    1.51    void free_region_if_empty(HeapRegion* hr,
    1.52                              size_t* pre_used,
    1.53                              FreeRegionList* free_list,
    1.54 +                            OldRegionSet* old_proxy_set,
    1.55                              HumongousRegionSet* humongous_proxy_set,
    1.56                              HRRSCleanupTask* hrrs_cleanup_task,
    1.57                              bool par);
    1.58 @@ -1163,6 +1182,7 @@
    1.59    // (if par is true, it will do so by taking the ParGCRareEvent_lock).
    1.60    void update_sets_after_freeing_regions(size_t pre_used,
    1.61                                         FreeRegionList* free_list,
    1.62 +                                       OldRegionSet* old_proxy_set,
    1.63                                         HumongousRegionSet* humongous_proxy_set,
    1.64                                         bool par);
    1.65  
    1.66 @@ -1452,8 +1472,6 @@
    1.67    // asserted to be this type.
    1.68    static G1CollectedHeap* heap();
    1.69  
    1.70 -  void empty_young_list();
    1.71 -
    1.72    void set_region_short_lived_locked(HeapRegion* hr);
    1.73    // add appropriate methods for any other surv rate groups
    1.74  

mercurial