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

Print this page




 555     _prev_marked_bytes = _next_marked_bytes;
 556     _next_marked_bytes = 0;
 557 
 558     guarantee(_prev_marked_bytes <=
 559               (size_t) (prev_top_at_mark_start() - bottom()) * HeapWordSize,
 560               "invariant");
 561   }
 562 
 563   // After an evacuation, we need to update _next_top_at_mark_start
 564   // to be the current top.  Note this is only valid if we have only
 565   // ever evacuated into this region.  If we evacuate, allocate, and
 566   // then evacuate we are in deep doodoo.
 567   void note_end_of_copying() {
 568     assert(top() >= _next_top_at_mark_start,
 569            "Increase only");
 570     // Survivor regions will be scanned on the start of concurrent
 571     // marking.
 572     if (!is_survivor()) {
 573       _next_top_at_mark_start = top();
 574     }

 575   }
 576 
 577   // Returns "false" iff no object in the region was allocated when the
 578   // last mark phase ended.
 579   bool is_marked() { return _prev_top_at_mark_start != bottom(); }
 580 
 581   // If "is_marked()" is true, then this is the index of the region in
 582   // an array constructed at the end of marking of the regions in a
 583   // "desirability" order.
 584   int sort_index() {
 585     return _sort_index;
 586   }
 587   void set_sort_index(int i) {
 588     _sort_index = i;
 589   }
 590 
 591   void init_top_at_conc_mark_count() {
 592     _top_at_conc_mark_count = bottom();
 593   }
 594 




 555     _prev_marked_bytes = _next_marked_bytes;
 556     _next_marked_bytes = 0;
 557 
 558     guarantee(_prev_marked_bytes <=
 559               (size_t) (prev_top_at_mark_start() - bottom()) * HeapWordSize,
 560               "invariant");
 561   }
 562 
 563   // After an evacuation, we need to update _next_top_at_mark_start
 564   // to be the current top.  Note this is only valid if we have only
 565   // ever evacuated into this region.  If we evacuate, allocate, and
 566   // then evacuate we are in deep doodoo.
 567   void note_end_of_copying() {
 568     assert(top() >= _next_top_at_mark_start,
 569            "Increase only");
 570     // Survivor regions will be scanned on the start of concurrent
 571     // marking.
 572     if (!is_survivor()) {
 573       _next_top_at_mark_start = top();
 574     }
 575     ContiguousSpace::set_saved_mark();
 576   }
 577 
 578   // Returns "false" iff no object in the region was allocated when the
 579   // last mark phase ended.
 580   bool is_marked() { return _prev_top_at_mark_start != bottom(); }
 581 
 582   // If "is_marked()" is true, then this is the index of the region in
 583   // an array constructed at the end of marking of the regions in a
 584   // "desirability" order.
 585   int sort_index() {
 586     return _sort_index;
 587   }
 588   void set_sort_index(int i) {
 589     _sort_index = i;
 590   }
 591 
 592   void init_top_at_conc_mark_count() {
 593     _top_at_conc_mark_count = bottom();
 594   }
 595