< prev index next >

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

Print this page




 261   uint young_region_length() const { return eden_region_length() +
 262                                             survivor_region_length(); }
 263 
 264   uint eden_region_length() const     { return _eden_region_length;     }
 265   uint survivor_region_length() const { return _survivor_region_length; }
 266   uint old_region_length() const      { return _old_region_length;      }
 267   uint optional_region_length() const { return _num_optional_regions; }
 268 
 269   // Reset the contents of the collection set.
 270   void clear();
 271 
 272   // Incremental collection set support
 273 
 274   // Initialize incremental collection set info.
 275   void start_incremental_building();
 276   // Start a new collection set increment.
 277   void update_incremental_marker() { _inc_build_state = Active; _inc_part_start = _collection_set_cur_length; }
 278   // Stop adding regions to the current collection set increment.
 279   void stop_incremental_building() { _inc_build_state = Inactive; }
 280 










 281   // Iterate over the current collection set increment applying the given HeapRegionClosure
 282   // from a starting position determined by the given worker id.
 283   void iterate_incremental_part_from(HeapRegionClosure* cl, HeapRegionClaimer* hr_claimer, uint worker_id, uint total_workers) const;
 284 
 285   // Returns the length of the current increment in number of regions.
 286   size_t increment_length() const { return _collection_set_cur_length - _inc_part_start; }
 287   // Returns the length of the whole current collection set in number of regions
 288   size_t cur_length() const { return _collection_set_cur_length; }
 289 
 290   // Iterate over the entire collection set (all increments calculated so far), applying
 291   // the given HeapRegionClosure on all of them.
 292   void iterate(HeapRegionClosure* cl) const;




 293 
 294   void iterate_optional(HeapRegionClosure* cl) const;
 295 
 296   size_t recorded_rs_length() { return _recorded_rs_length; }
 297 
 298   size_t bytes_used_before() const {
 299     return _bytes_used_before;
 300   }
 301 
 302   void reset_bytes_used_before() {
 303     _bytes_used_before = 0;
 304   }
 305 
 306   // Finalize the initial collection set consisting of all young regions potentially a
 307   // few old gen regions.
 308   void finalize_initial_collection_set(double target_pause_time_ms, G1SurvivorRegions* survivor);
 309   // Finalize the next collection set from the set of available optional old gen regions.
 310   bool finalize_optional_for_evacuation(double remaining_pause_time);
 311   // Abandon (clean up) optional collection set regions that were not evacuated in this
 312   // pause.


 261   uint young_region_length() const { return eden_region_length() +
 262                                             survivor_region_length(); }
 263 
 264   uint eden_region_length() const     { return _eden_region_length;     }
 265   uint survivor_region_length() const { return _survivor_region_length; }
 266   uint old_region_length() const      { return _old_region_length;      }
 267   uint optional_region_length() const { return _num_optional_regions; }
 268 
 269   // Reset the contents of the collection set.
 270   void clear();
 271 
 272   // Incremental collection set support
 273 
 274   // Initialize incremental collection set info.
 275   void start_incremental_building();
 276   // Start a new collection set increment.
 277   void update_incremental_marker() { _inc_build_state = Active; _inc_part_start = _collection_set_cur_length; }
 278   // Stop adding regions to the current collection set increment.
 279   void stop_incremental_building() { _inc_build_state = Inactive; }
 280 
 281   // Iterate the part of the collection set given by the offset and length applying the given
 282   // HeapRegionClosure. The worker_id will determine where in the part to start the iteration
 283   // to allow for more efficient parallel iteration.
 284   void iterate_part_from(HeapRegionClosure* cl,
 285                          HeapRegionClaimer* hr_claimer,
 286                          size_t offset,
 287                          size_t lenght,
 288                          uint worker_id,
 289                          uint total_workers) const;
 290 
 291   // Iterate over the current collection set increment applying the given HeapRegionClosure
 292   // from a starting position determined by the given worker id.
 293   void iterate_incremental_part_from(HeapRegionClosure* cl, HeapRegionClaimer* hr_claimer, uint worker_id, uint total_workers) const;
 294 
 295   // Returns the length of the current increment in number of regions.
 296   size_t increment_length() const { return _collection_set_cur_length - _inc_part_start; }
 297   // Returns the length of the whole current collection set in number of regions
 298   size_t cur_length() const { return _collection_set_cur_length; }
 299 
 300   // Iterate over the entire collection set (all increments calculated so far), applying
 301   // the given HeapRegionClosure on all of them.
 302   void iterate(HeapRegionClosure* cl) const;
 303   void par_iterate(HeapRegionClosure* cl,
 304                    HeapRegionClaimer* hr_claimer,
 305                    uint worker_id,
 306                    uint total_workers) const;
 307 
 308   void iterate_optional(HeapRegionClosure* cl) const;
 309 
 310   size_t recorded_rs_length() { return _recorded_rs_length; }
 311 
 312   size_t bytes_used_before() const {
 313     return _bytes_used_before;
 314   }
 315 
 316   void reset_bytes_used_before() {
 317     _bytes_used_before = 0;
 318   }
 319 
 320   // Finalize the initial collection set consisting of all young regions potentially a
 321   // few old gen regions.
 322   void finalize_initial_collection_set(double target_pause_time_ms, G1SurvivorRegions* survivor);
 323   // Finalize the next collection set from the set of available optional old gen regions.
 324   bool finalize_optional_for_evacuation(double remaining_pause_time);
 325   // Abandon (clean up) optional collection set regions that were not evacuated in this
 326   // pause.
< prev index next >