< prev index next >

src/hotspot/share/gc/g1/g1CollectionSet.hpp

Print this page
rev 57223 : imported patch 8225484-changes-to-survivor-calculation


 156   // correspond to the first x entries in the collection set candidates.
 157   uint _num_optional_regions;
 158 
 159   // The number of bytes in the collection set before the pause. Set from
 160   // the incrementally built collection set at the start of an evacuation
 161   // pause, and updated as more regions are added to the collection set.
 162   size_t _bytes_used_before;
 163 
 164   // The number of cards in the remembered set in the collection set. Set from
 165   // the incrementally built collection set at the start of an evacuation
 166   // pause, and updated as more regions are added to the collection set.
 167   size_t _recorded_rs_length;
 168 
 169   enum CSetBuildType {
 170     Active,             // We are actively building the collection set
 171     Inactive            // We are not actively building the collection set
 172   };
 173 
 174   CSetBuildType _inc_build_state;
 175   size_t _inc_part_start;

 176 
 177   // Information about eden regions in the incremental collection set.
 178   struct IncCollectionSetRegionStat {
 179     // The predicted non-copy time that was added to the total incremental value
 180     // for the collection set.
 181     double _non_copy_time_ms;
 182     // The remembered set length that was added to the total incremental value
 183     // for the collection set.
 184     size_t _rs_length;
 185 
 186 #ifdef ASSERT
 187     // Resets members to "uninitialized" values.
 188     void reset() { _rs_length = ~(size_t)0; _non_copy_time_ms = -1.0; }
 189 #endif
 190   };
 191 
 192   IncCollectionSetRegionStat* _inc_collection_set_stats;
 193   // The associated information that is maintained while the incremental
 194   // collection set is being built with *young* regions. Used to populate
 195   // the recorded info for the evacuation pause.


 273                            uint survivor_cset_region_length);
 274 
 275   uint region_length() const       { return young_region_length() +
 276                                             old_region_length(); }
 277   uint young_region_length() const { return eden_region_length() +
 278                                             survivor_region_length(); }
 279 
 280   uint eden_region_length() const     { return _eden_region_length;     }
 281   uint survivor_region_length() const { return _survivor_region_length; }
 282   uint old_region_length() const      { return _old_region_length;      }
 283   uint optional_region_length() const { return _num_optional_regions; }
 284 
 285   // Reset the contents of the collection set.
 286   void clear();
 287 
 288   // Incremental collection set support
 289 
 290   // Initialize incremental collection set info.
 291   void start_incremental_building();
 292   // Start a new collection set increment.
 293   void update_incremental_marker() { _inc_build_state = Active; _inc_part_start = _collection_set_cur_length; }



 294   // Stop adding regions to the current collection set increment.
 295   void stop_incremental_building() { _inc_build_state = Inactive; }
 296 
 297   // Iterate over the current collection set increment applying the given HeapRegionClosure
 298   // from a starting position determined by the given worker id.
 299   void iterate_incremental_part_from(HeapRegionClosure* cl, HeapRegionClaimer* hr_claimer, uint worker_id, uint total_workers) const;
 300 
 301   // Returns the length of the current increment in number of regions.
 302   size_t increment_length() const { return _collection_set_cur_length - _inc_part_start; }
 303   // Returns the length of the whole current collection set in number of regions
 304   size_t cur_length() const { return _collection_set_cur_length; }
 305 
 306   // Iterate over the entire collection set (all increments calculated so far), applying
 307   // the given HeapRegionClosure on all of them.
 308   void iterate(HeapRegionClosure* cl) const;
 309 
 310   void iterate_optional(HeapRegionClosure* cl) const;
 311 
 312   size_t recorded_rs_length() { return _recorded_rs_length; }
 313 




 156   // correspond to the first x entries in the collection set candidates.
 157   uint _num_optional_regions;
 158 
 159   // The number of bytes in the collection set before the pause. Set from
 160   // the incrementally built collection set at the start of an evacuation
 161   // pause, and updated as more regions are added to the collection set.
 162   size_t _bytes_used_before;
 163 
 164   // The number of cards in the remembered set in the collection set. Set from
 165   // the incrementally built collection set at the start of an evacuation
 166   // pause, and updated as more regions are added to the collection set.
 167   size_t _recorded_rs_length;
 168 
 169   enum CSetBuildType {
 170     Active,             // We are actively building the collection set
 171     Inactive            // We are not actively building the collection set
 172   };
 173 
 174   CSetBuildType _inc_build_state;
 175   size_t _inc_part_start;
 176   uint _cur_eden_young_idx;
 177 
 178   // Information about eden regions in the incremental collection set.
 179   struct IncCollectionSetRegionStat {
 180     // The predicted non-copy time that was added to the total incremental value
 181     // for the collection set.
 182     double _non_copy_time_ms;
 183     // The remembered set length that was added to the total incremental value
 184     // for the collection set.
 185     size_t _rs_length;
 186 
 187 #ifdef ASSERT
 188     // Resets members to "uninitialized" values.
 189     void reset() { _rs_length = ~(size_t)0; _non_copy_time_ms = -1.0; }
 190 #endif
 191   };
 192 
 193   IncCollectionSetRegionStat* _inc_collection_set_stats;
 194   // The associated information that is maintained while the incremental
 195   // collection set is being built with *young* regions. Used to populate
 196   // the recorded info for the evacuation pause.


 274                            uint survivor_cset_region_length);
 275 
 276   uint region_length() const       { return young_region_length() +
 277                                             old_region_length(); }
 278   uint young_region_length() const { return eden_region_length() +
 279                                             survivor_region_length(); }
 280 
 281   uint eden_region_length() const     { return _eden_region_length;     }
 282   uint survivor_region_length() const { return _survivor_region_length; }
 283   uint old_region_length() const      { return _old_region_length;      }
 284   uint optional_region_length() const { return _num_optional_regions; }
 285 
 286   // Reset the contents of the collection set.
 287   void clear();
 288 
 289   // Incremental collection set support
 290 
 291   // Initialize incremental collection set info.
 292   void start_incremental_building();
 293   // Start a new collection set increment.
 294   void update_incremental_marker() {
 295     _inc_build_state = Active;
 296     _inc_part_start = _collection_set_cur_length;
 297   }
 298   // Stop adding regions to the current collection set increment.
 299   void stop_incremental_building() { _inc_build_state = Inactive; }
 300 
 301   // Iterate over the current collection set increment applying the given HeapRegionClosure
 302   // from a starting position determined by the given worker id.
 303   void iterate_incremental_part_from(HeapRegionClosure* cl, HeapRegionClaimer* hr_claimer, uint worker_id, uint total_workers) const;
 304 
 305   // Returns the length of the current increment in number of regions.
 306   size_t increment_length() const { return _collection_set_cur_length - _inc_part_start; }
 307   // Returns the length of the whole current collection set in number of regions
 308   size_t cur_length() const { return _collection_set_cur_length; }
 309 
 310   // Iterate over the entire collection set (all increments calculated so far), applying
 311   // the given HeapRegionClosure on all of them.
 312   void iterate(HeapRegionClosure* cl) const;
 313 
 314   void iterate_optional(HeapRegionClosure* cl) const;
 315 
 316   size_t recorded_rs_length() { return _recorded_rs_length; }
 317 


< prev index next >