src/hotspot/share/gc/g1/g1CollectedHeap.hpp
changeset 51494 1906adbef2dc
parent 51405 8b23aa7cef47
child 51497 ec014e5694ec
equal deleted inserted replaced
51493:6b5f3f5fd63c 51494:1906adbef2dc
   167   MemoryPool* _survivor_pool;
   167   MemoryPool* _survivor_pool;
   168   MemoryPool* _old_pool;
   168   MemoryPool* _old_pool;
   169 
   169 
   170   static size_t _humongous_object_threshold_in_words;
   170   static size_t _humongous_object_threshold_in_words;
   171 
   171 
   172   // It keeps track of the old regions.
   172   // These sets keep track of old, archive and humongous regions respectively.
   173   HeapRegionSet _old_set;
   173   HeapRegionSet _old_set;
   174 
   174   HeapRegionSet _archive_set;
   175   // It keeps track of the humongous regions.
       
   176   HeapRegionSet _humongous_set;
   175   HeapRegionSet _humongous_set;
   177 
   176 
   178   virtual void initialize_serviceability();
   177   virtual void initialize_serviceability();
   179 
   178 
   180   void eagerly_reclaim_humongous_regions();
   179   void eagerly_reclaim_humongous_regions();
  1044 #endif // ASSERT
  1043 #endif // ASSERT
  1045 
  1044 
  1046   inline void old_set_add(HeapRegion* hr);
  1045   inline void old_set_add(HeapRegion* hr);
  1047   inline void old_set_remove(HeapRegion* hr);
  1046   inline void old_set_remove(HeapRegion* hr);
  1048 
  1047 
       
  1048   inline void archive_set_add(HeapRegion* hr);
       
  1049 
  1049   size_t non_young_capacity_bytes() {
  1050   size_t non_young_capacity_bytes() {
  1050     return (_old_set.length() + _humongous_set.length()) * HeapRegion::GrainBytes;
  1051     return (old_regions_count() + _archive_set.length() + humongous_regions_count()) * HeapRegion::GrainBytes;
  1051   }
  1052   }
  1052 
  1053 
  1053   // Determine whether the given region is one that we are using as an
  1054   // Determine whether the given region is one that we are using as an
  1054   // old GC alloc region.
  1055   // old GC alloc region.
  1055   bool is_old_gc_alloc_region(HeapRegion* hr);
  1056   bool is_old_gc_alloc_region(HeapRegion* hr);
  1230   void set_region_short_lived_locked(HeapRegion* hr);
  1231   void set_region_short_lived_locked(HeapRegion* hr);
  1231   // add appropriate methods for any other surv rate groups
  1232   // add appropriate methods for any other surv rate groups
  1232 
  1233 
  1233   const G1SurvivorRegions* survivor() const { return &_survivor; }
  1234   const G1SurvivorRegions* survivor() const { return &_survivor; }
  1234 
  1235 
  1235   uint survivor_regions_count() const {
  1236   uint eden_regions_count() const { return _eden.length(); }
  1236     return _survivor.length();
  1237   uint survivor_regions_count() const { return _survivor.length(); }
  1237   }
  1238   uint young_regions_count() const { return _eden.length() + _survivor.length(); }
  1238 
       
  1239   uint eden_regions_count() const {
       
  1240     return _eden.length();
       
  1241   }
       
  1242 
       
  1243   uint young_regions_count() const {
       
  1244     return _eden.length() + _survivor.length();
       
  1245   }
       
  1246 
       
  1247   uint old_regions_count() const { return _old_set.length(); }
  1239   uint old_regions_count() const { return _old_set.length(); }
  1248 
  1240   uint archive_regions_count() const { return _archive_set.length(); }
  1249   uint humongous_regions_count() const { return _humongous_set.length(); }
  1241   uint humongous_regions_count() const { return _humongous_set.length(); }
  1250 
  1242 
  1251 #ifdef ASSERT
  1243 #ifdef ASSERT
  1252   bool check_young_list_empty();
  1244   bool check_young_list_empty();
  1253 #endif
  1245 #endif