comparison src/share/vm/gc_implementation/g1/heapRegion.hpp @ 20274:a8137787acfe

8047821: G1 Does not use the save_marks functionality as intended Summary: Rename save_marks to record_top_and_timestamp and remove som unused but related methods Reviewed-by: stefank, ehelin
author mgerdin
date Thu, 26 Jun 2014 10:00:00 +0200
parents 9441d22e429a
children 1526a938e670
comparison
equal deleted inserted replaced
20273:9441d22e429a 20274:a8137787acfe
146 146
147 void set_bottom(HeapWord* value); 147 void set_bottom(HeapWord* value);
148 void set_end(HeapWord* value); 148 void set_end(HeapWord* value);
149 149
150 virtual HeapWord* saved_mark_word() const; 150 virtual HeapWord* saved_mark_word() const;
151 virtual void set_saved_mark(); 151 void record_top_and_timestamp();
152 void reset_gc_time_stamp() { _gc_time_stamp = 0; } 152 void reset_gc_time_stamp() { _gc_time_stamp = 0; }
153 unsigned get_gc_time_stamp() { return _gc_time_stamp; } 153 unsigned get_gc_time_stamp() { return _gc_time_stamp; }
154 154
155 // See the comment above in the declaration of _pre_dummy_top for an 155 // See the comment above in the declaration of _pre_dummy_top for an
156 // explanation of what it is. 156 // explanation of what it is.
199 enum HumongousType { 199 enum HumongousType {
200 NotHumongous = 0, 200 NotHumongous = 0,
201 StartsHumongous, 201 StartsHumongous,
202 ContinuesHumongous 202 ContinuesHumongous
203 }; 203 };
204
205 // Requires that the region "mr" be dense with objects, and begin and end
206 // with an object.
207 void oops_in_mr_iterate(MemRegion mr, ExtendedOopClosure* cl);
208 204
209 // The remembered set for this region. 205 // The remembered set for this region.
210 // (Might want to make this "inline" later, to avoid some alloc failure 206 // (Might want to make this "inline" later, to avoid some alloc failure
211 // issues.) 207 // issues.)
212 HeapRegionRemSet* _rem_set; 208 HeapRegionRemSet* _rem_set;
567 void set_next_dirty_cards_region(HeapRegion* hr) { _next_dirty_cards_region = hr; } 563 void set_next_dirty_cards_region(HeapRegion* hr) { _next_dirty_cards_region = hr; }
568 bool is_on_dirty_cards_region_list() const { return get_next_dirty_cards_region() != NULL; } 564 bool is_on_dirty_cards_region_list() const { return get_next_dirty_cards_region() != NULL; }
569 565
570 HeapWord* orig_end() { return _orig_end; } 566 HeapWord* orig_end() { return _orig_end; }
571 567
572 // Allows logical separation between objects allocated before and after.
573 void save_marks();
574
575 // Reset HR stuff to default values. 568 // Reset HR stuff to default values.
576 void hr_clear(bool par, bool clear_space, bool locked = false); 569 void hr_clear(bool par, bool clear_space, bool locked = false);
577 void par_clear(); 570 void par_clear();
578 571
579 // Get the start of the unmarked area in this region. 572 // Get the start of the unmarked area in this region.
580 HeapWord* prev_top_at_mark_start() const { return _prev_top_at_mark_start; } 573 HeapWord* prev_top_at_mark_start() const { return _prev_top_at_mark_start; }
581 HeapWord* next_top_at_mark_start() const { return _next_top_at_mark_start; } 574 HeapWord* next_top_at_mark_start() const { return _next_top_at_mark_start; }
582
583 // Apply "cl->do_oop" to (the addresses of) all reference fields in objects
584 // allocated in the current region before the last call to "save_mark".
585 void oop_before_save_marks_iterate(ExtendedOopClosure* cl);
586 575
587 // Note the start or end of marking. This tells the heap region 576 // Note the start or end of marking. This tells the heap region
588 // that the collector is about to start or has finished (concurrently) 577 // that the collector is about to start or has finished (concurrently)
589 // marking the heap. 578 // marking the heap.
590 579
766 } 755 }
767 756
768 void set_predicted_bytes_to_copy(size_t bytes) { 757 void set_predicted_bytes_to_copy(size_t bytes) {
769 _predicted_bytes_to_copy = bytes; 758 _predicted_bytes_to_copy = bytes;
770 } 759 }
771
772 #define HeapRegion_OOP_SINCE_SAVE_MARKS_DECL(OopClosureType, nv_suffix) \
773 virtual void oop_since_save_marks_iterate##nv_suffix(OopClosureType* cl);
774 SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES(HeapRegion_OOP_SINCE_SAVE_MARKS_DECL)
775 760
776 virtual CompactibleSpace* next_compaction_space() const; 761 virtual CompactibleSpace* next_compaction_space() const;
777 762
778 virtual void reset_after_compaction(); 763 virtual void reset_after_compaction();
779 764