< prev index next >

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

Print this page




 233   HeapRegion* _humongous_start_region;
 234 
 235   // True iff an attempt to evacuate an object in the region failed.
 236   bool _evacuation_failed;
 237 
 238   // Fields used by the HeapRegionSetBase class and subclasses.
 239   HeapRegion* _next;
 240   HeapRegion* _prev;
 241 #ifdef ASSERT
 242   HeapRegionSetBase* _containing_set;
 243 #endif // ASSERT
 244 
 245   // We use concurrent marking to determine the amount of live data
 246   // in each heap region.
 247   size_t _prev_marked_bytes;    // Bytes known to be live via last completed marking.
 248   size_t _next_marked_bytes;    // Bytes known to be live via in-progress marking.
 249 
 250   // The calculated GC efficiency of the region.
 251   double _gc_efficiency;
 252 
 253   static const uint InvalidCSetIndex = UINT_MAX;
 254 
 255   // The index in the optional regions array, if this region
 256   // is considered optional during a mixed collections.
 257   uint _index_in_opt_cset;
 258   int  _young_index_in_cset;
 259   SurvRateGroup* _surv_rate_group;
 260   int  _age_index;
 261 
 262   // The start of the unmarked area. The unmarked area extends from this
 263   // word until the top and/or end of the region, and is the part
 264   // of the region for which no marking was done, i.e. objects may
 265   // have been allocated in this part since the last mark phase.
 266   // "prev" is the top at the start of the last completed marking.
 267   // "next" is the top at the start of the in-progress marking (if any.)
 268   HeapWord* _prev_top_at_mark_start;
 269   HeapWord* _next_top_at_mark_start;
 270   // If a collection pause is in progress, this is the top at the start
 271   // of that pause.
 272 
 273   void init_top_at_mark_start() {
 274     assert(_prev_marked_bytes == 0 &&


 534   // Notify the region that we are about to start processing
 535   // self-forwarded objects during evac failure handling.
 536   void note_self_forwarding_removal_start(bool during_initial_mark,
 537                                           bool during_conc_mark);
 538 
 539   // Notify the region that we have finished processing self-forwarded
 540   // objects during evac failure handling.
 541   void note_self_forwarding_removal_end(size_t marked_bytes);
 542 
 543   void reset_during_compaction() {
 544     assert(is_humongous(),
 545            "should only be called for humongous regions");
 546 
 547     zero_marked_bytes();
 548     init_top_at_mark_start();
 549   }
 550 
 551   void calc_gc_efficiency(void);
 552   double gc_efficiency() const { return _gc_efficiency;}
 553 
 554   uint index_in_opt_cset() const {
 555     assert(has_index_in_opt_cset(), "Opt cset index not set.");
 556     return _index_in_opt_cset;
 557   }
 558   bool has_index_in_opt_cset() const { return _index_in_opt_cset != InvalidCSetIndex; }
 559   void set_index_in_opt_cset(uint index) { _index_in_opt_cset = index; }
 560   void clear_index_in_opt_cset() { _index_in_opt_cset = InvalidCSetIndex; }
 561 
 562   int  young_index_in_cset() const { return _young_index_in_cset; }
 563   void set_young_index_in_cset(int index) {
 564     assert( (index == -1) || is_young(), "pre-condition" );
 565     _young_index_in_cset = index;
 566   }
 567 
 568   int age_in_surv_rate_group() {
 569     assert( _surv_rate_group != NULL, "pre-condition" );
 570     assert( _age_index > -1, "pre-condition" );
 571     return _surv_rate_group->age_in_group(_age_index);
 572   }
 573 
 574   void record_surv_words_in_group(size_t words_survived) {
 575     assert( _surv_rate_group != NULL, "pre-condition" );
 576     assert( _age_index > -1, "pre-condition" );
 577     int age_in_group = age_in_surv_rate_group();
 578     _surv_rate_group->record_surviving_words(age_in_group, words_survived);
 579   }
 580 




 233   HeapRegion* _humongous_start_region;
 234 
 235   // True iff an attempt to evacuate an object in the region failed.
 236   bool _evacuation_failed;
 237 
 238   // Fields used by the HeapRegionSetBase class and subclasses.
 239   HeapRegion* _next;
 240   HeapRegion* _prev;
 241 #ifdef ASSERT
 242   HeapRegionSetBase* _containing_set;
 243 #endif // ASSERT
 244 
 245   // We use concurrent marking to determine the amount of live data
 246   // in each heap region.
 247   size_t _prev_marked_bytes;    // Bytes known to be live via last completed marking.
 248   size_t _next_marked_bytes;    // Bytes known to be live via in-progress marking.
 249 
 250   // The calculated GC efficiency of the region.
 251   double _gc_efficiency;
 252 


 253   // The index in the optional regions array, if this region
 254   // is considered optional during a mixed collections.
 255   uint _index_in_opt_cset;
 256   int  _young_index_in_cset;
 257   SurvRateGroup* _surv_rate_group;
 258   int  _age_index;
 259 
 260   // The start of the unmarked area. The unmarked area extends from this
 261   // word until the top and/or end of the region, and is the part
 262   // of the region for which no marking was done, i.e. objects may
 263   // have been allocated in this part since the last mark phase.
 264   // "prev" is the top at the start of the last completed marking.
 265   // "next" is the top at the start of the in-progress marking (if any.)
 266   HeapWord* _prev_top_at_mark_start;
 267   HeapWord* _next_top_at_mark_start;
 268   // If a collection pause is in progress, this is the top at the start
 269   // of that pause.
 270 
 271   void init_top_at_mark_start() {
 272     assert(_prev_marked_bytes == 0 &&


 532   // Notify the region that we are about to start processing
 533   // self-forwarded objects during evac failure handling.
 534   void note_self_forwarding_removal_start(bool during_initial_mark,
 535                                           bool during_conc_mark);
 536 
 537   // Notify the region that we have finished processing self-forwarded
 538   // objects during evac failure handling.
 539   void note_self_forwarding_removal_end(size_t marked_bytes);
 540 
 541   void reset_during_compaction() {
 542     assert(is_humongous(),
 543            "should only be called for humongous regions");
 544 
 545     zero_marked_bytes();
 546     init_top_at_mark_start();
 547   }
 548 
 549   void calc_gc_efficiency(void);
 550   double gc_efficiency() const { return _gc_efficiency;}
 551 
 552   uint index_in_opt_cset() const { return _index_in_opt_cset; }




 553   void set_index_in_opt_cset(uint index) { _index_in_opt_cset = index; }

 554 
 555   int  young_index_in_cset() const { return _young_index_in_cset; }
 556   void set_young_index_in_cset(int index) {
 557     assert( (index == -1) || is_young(), "pre-condition" );
 558     _young_index_in_cset = index;
 559   }
 560 
 561   int age_in_surv_rate_group() {
 562     assert( _surv_rate_group != NULL, "pre-condition" );
 563     assert( _age_index > -1, "pre-condition" );
 564     return _surv_rate_group->age_in_group(_age_index);
 565   }
 566 
 567   void record_surv_words_in_group(size_t words_survived) {
 568     assert( _surv_rate_group != NULL, "pre-condition" );
 569     assert( _age_index > -1, "pre-condition" );
 570     int age_in_group = age_in_surv_rate_group();
 571     _surv_rate_group->record_surviving_words(age_in_group, words_survived);
 572   }
 573 


< prev index next >